diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-23 14:14:18 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-23 14:14:18 +0000 |
commit | 14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9 (patch) | |
tree | 79af7f375362eeae2a0d9ee96c1bc6f09ab8fcce /gui/designwidget.cc | |
parent | dfdeb21690181044a95c2b2d64c197c999507b0c (diff) | |
parent | e647604e2a584917ad2fc9acfe838a1395c613c2 (diff) | |
download | nextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.tar.gz nextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.tar.bz2 nextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.zip |
Merge branch 'master' into 'master'
Master
See merge request eddiehung/nextpnr!7
Diffstat (limited to 'gui/designwidget.cc')
-rw-r--r-- | gui/designwidget.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc index a59307f0..91ec5163 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -497,6 +497,14 @@ void DesignWidget::onItemSelectionChanged() addProperty(topItem, QVariant::String, "Conflicting Cell", ctx->getConflictingBelCell(bel).c_str(ctx),
ElementType::CELL);
+ QtProperty *belpinsItem = addSubGroup(topItem, "Ports");
+ for (const auto &item : ctx->getBelPins(bel)) {
+ QtProperty *portInfoItem = addSubGroup(belpinsItem, ctx->portPinToId(item).c_str(ctx));
+ addProperty(portInfoItem, QVariant::String, "Name", ctx->portPinToId(item).c_str(ctx));
+ addProperty(portInfoItem, QVariant::Int, "Type", int(ctx->getBelPinType(bel, item)));
+ WireId wire = ctx->getBelPinWire(bel, item);
+ addProperty(portInfoItem, QVariant::String, "Wire", ctx->getWireName(wire).c_str(ctx), ElementType::WIRE);
+ }
} else if (type == ElementType::WIRE) {
WireId wire = ctx->getWireByName(c);
QtProperty *topItem = addTopLevelProperty("Wire");
@@ -515,23 +523,14 @@ void DesignWidget::onItemSelectionChanged() addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay());
addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay());
- QtProperty *belpinItem = addSubGroup(topItem, "BelPin Uphill");
- BelPin uphill = ctx->getBelPinUphill(wire);
- if (uphill.bel != BelId())
- addProperty(belpinItem, QVariant::String, "Bel", ctx->getBelName(uphill.bel).c_str(ctx), ElementType::BEL);
- else
- addProperty(belpinItem, QVariant::String, "Bel", "", ElementType::BEL);
-
- addProperty(belpinItem, QVariant::String, "PortPin", ctx->portPinToId(uphill.pin).c_str(ctx), ElementType::BEL);
-
- QtProperty *downhillItem = addSubGroup(topItem, "BelPin Downhill");
- for (const auto &item : ctx->getBelPinsDownhill(wire)) {
+ QtProperty *belpinsItem = addSubGroup(topItem, "BelPins");
+ for (const auto &item : ctx->getWireBelPins(wire)) {
QString belname = "";
if (item.bel != BelId())
belname = ctx->getBelName(item.bel).c_str(ctx);
QString pinname = ctx->portPinToId(item.pin).c_str(ctx);
- QtProperty *dhItem = addSubGroup(downhillItem, belname + "-" + pinname);
+ QtProperty *dhItem = addSubGroup(belpinsItem, belname + "-" + pinname);
addProperty(dhItem, QVariant::String, "Bel", belname, ElementType::BEL);
addProperty(dhItem, QVariant::String, "PortPin", pinname);
}
|