aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-11-11 11:08:34 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2018-11-11 11:08:34 +0100
commita445ae37ee3c485495170ccadd7b0ce71297019f (patch)
tree25ad4aedd588e4369e7c5438f1b519091afda50d /gui
parentb8870bb99c24d2998ca5bb5245589dd9d0703ea4 (diff)
downloadnextpnr-a445ae37ee3c485495170ccadd7b0ce71297019f.tar.gz
nextpnr-a445ae37ee3c485495170ccadd7b0ce71297019f.tar.bz2
nextpnr-a445ae37ee3c485495170ccadd7b0ce71297019f.zip
Pip visible for all archs
Diffstat (limited to 'gui')
-rw-r--r--gui/designwidget.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index f7805320..561d5361 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -315,21 +315,21 @@ void DesignWidget::newContext(Context *ctx)
->loadData(ctx, std::unique_ptr<TreeModel::ElementXYRoot<WireId>>(
new TreeModel::ElementXYRoot<WireId>(ctx, wireMap, wireGetter, ElementType::WIRE)));
}
+#endif
{
TreeModel::ElementXYRoot<PipId>::ElementMap pipMap;
- for (int i = 0; i < ctx->chip_info->num_pips; i++) {
- const auto pip = &ctx->chip_info->pip_data[i];
- PipId pipid;
- pipid.index = i;
- pipMap[std::pair<int, int>(pip->x, pip->y)].push_back(pipid);
+ for (const auto& pip : ctx->getPips()) {
+ auto loc = ctx->getPipLocation(pip);
+ pipMap[std::pair<int, int>(loc.x, loc.y)].push_back(pip);
}
auto pipGetter = [](Context *ctx, PipId id) { return ctx->getPipName(id); };
+
getTreeByElementType(ElementType::PIP)
->loadData(ctx, std::unique_ptr<TreeModel::ElementXYRoot<PipId>>(
new TreeModel::ElementXYRoot<PipId>(ctx, pipMap, pipGetter, ElementType::PIP)));
}
-#endif
+
getTreeByElementType(ElementType::CELL)
->loadData(ctx, std::unique_ptr<TreeModel::IdStringList>(new TreeModel::IdStringList(ElementType::CELL)));
getTreeByElementType(ElementType::NET)