aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-11-11 13:52:19 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2018-11-11 13:52:19 +0100
commit2d35d99ed27bdbe3c654a642aa4c1cc4d4d2cb70 (patch)
treec299a42afbdd2fa584cfcdcd7851d39c5f7b5d05 /gui
parent5d11af5a251850576431d4ac210d9ca1af375888 (diff)
downloadnextpnr-2d35d99ed27bdbe3c654a642aa4c1cc4d4d2cb70.tar.gz
nextpnr-2d35d99ed27bdbe3c654a642aa4c1cc4d4d2cb70.tar.bz2
nextpnr-2d35d99ed27bdbe3c654a642aa4c1cc4d4d2cb70.zip
Show wires in tree for ECP5 as well
Diffstat (limited to 'gui')
-rw-r--r--gui/designwidget.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index e99637bf..20a81a7d 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -302,21 +302,26 @@ void DesignWidget::newContext(Context *ctx)
new TreeModel::ElementXYRoot<BelId>(ctx, belMap, belGetter, ElementType::BEL)));
}
-#ifdef ARCH_ICE40
{
TreeModel::ElementXYRoot<WireId>::ElementMap wireMap;
+#ifdef ARCH_ICE40
for (int i = 0; i < ctx->chip_info->num_wires; i++) {
const auto wire = &ctx->chip_info->wire_data[i];
WireId wireid;
wireid.index = i;
wireMap[std::pair<int, int>(wire->x, wire->y)].push_back(wireid);
}
+#endif
+#ifdef ARCH_ECP5
+ for (const auto& wire : ctx->getWires()) {
+ wireMap[std::pair<int, int>(wire.location.x, wire.location.y)].push_back(wire);
+ }
+#endif
auto wireGetter = [](Context *ctx, WireId id) { return ctx->getWireName(id); };
getTreeByElementType(ElementType::WIRE)
->loadData(ctx, std::unique_ptr<TreeModel::ElementXYRoot<WireId>>(
new TreeModel::ElementXYRoot<WireId>(ctx, wireMap, wireGetter, ElementType::WIRE)));
}
-#endif
{
TreeModel::ElementXYRoot<PipId>::ElementMap pipMap;