From 2d35d99ed27bdbe3c654a642aa4c1cc4d4d2cb70 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 11 Nov 2018 13:52:19 +0100 Subject: Show wires in tree for ECP5 as well --- gui/designwidget.cc | 9 +++++++-- 1 file 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(ctx, belMap, belGetter, ElementType::BEL))); } -#ifdef ARCH_ICE40 { TreeModel::ElementXYRoot::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(wire->x, wire->y)].push_back(wireid); } +#endif +#ifdef ARCH_ECP5 + for (const auto& wire : ctx->getWires()) { + wireMap[std::pair(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>( new TreeModel::ElementXYRoot(ctx, wireMap, wireGetter, ElementType::WIRE))); } -#endif { TreeModel::ElementXYRoot::ElementMap pipMap; -- cgit v1.2.3