From 74eebc489f8df48ee526e17a69c70944658b34d4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 18 Aug 2018 14:13:45 +0200 Subject: [PATCH] Add arch attributes display to GUI Signed-off-by: Clifford Wolf --- gui/designwidget.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 896ef071..1b0e617e 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -411,6 +411,11 @@ void DesignWidget::onSelectionChanged(const QItemSelection &, const QItemSelecti addProperty(topItem, QVariant::String, "Conflicting Cell", ctx->nameOf(ctx->getConflictingBelCell(bel)), ElementType::CELL); + QtProperty *attrsItem = addSubGroup(topItem, "Attributes"); + for (auto &item : ctx->getBelAttrs(bel)) { + addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str()); + } + QtProperty *belpinsItem = addSubGroup(topItem, "Ports"); for (const auto &item : ctx->getBelPins(bel)) { QtProperty *portInfoItem = addSubGroup(belpinsItem, item.c_str(ctx)); @@ -433,6 +438,11 @@ void DesignWidget::onSelectionChanged(const QItemSelection &, const QItemSelecti addProperty(topItem, QVariant::String, "Conflicting Net", ctx->nameOf(ctx->getConflictingWireNet(wire)), ElementType::NET); + QtProperty *attrsItem = addSubGroup(topItem, "Attributes"); + for (auto &item : ctx->getWireAttrs(wire)) { + addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str()); + } + DelayInfo delay = ctx->getWireDelay(wire); QtProperty *delayItem = addSubGroup(topItem, "Delay"); @@ -492,6 +502,11 @@ void DesignWidget::onSelectionChanged(const QItemSelection &, const QItemSelecti addProperty(topItem, QVariant::String, "Dest Wire", ctx->getWireName(ctx->getPipDstWire(pip)).c_str(ctx), ElementType::WIRE); + QtProperty *attrsItem = addSubGroup(topItem, "Attributes"); + for (auto &item : ctx->getPipAttrs(pip)) { + addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str()); + } + DelayInfo delay = ctx->getPipDelay(pip); QtProperty *delayItem = addSubGroup(topItem, "Delay");