diff options
-rw-r--r-- | common/router1.cc | 8 | ||||
-rw-r--r-- | ecp5/archdefs.h | 11 | ||||
-rw-r--r-- | generic/archdefs.h | 9 | ||||
-rw-r--r-- | gui/designwidget.cc | 15 | ||||
-rw-r--r-- | ice40/archdefs.h | 11 |
5 files changed, 38 insertions, 16 deletions
diff --git a/common/router1.cc b/common/router1.cc index de5caa5a..e9a9bc4b 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -143,12 +143,12 @@ struct Router thisVisitCntLimit = (thisVisitCnt * 3) / 2; for (auto pip : ctx->getPipsDownhill(qw.wire)) { - delay_t next_delay = qw.delay + ctx->getPipDelay(pip).avgDelay(); + delay_t next_delay = qw.delay + ctx->getPipDelay(pip).maxDelay(); WireId next_wire = ctx->getPipDstWire(pip); bool foundRipupNet = false; thisVisitCnt++; - next_delay += ctx->getWireDelay(next_wire).avgDelay(); + next_delay += ctx->getWireDelay(next_wire).maxDelay(); if (!ctx->checkWireAvail(next_wire)) { if (!ripup) @@ -228,7 +228,7 @@ struct Router : ctx(ctx), scores(scores), ripup(ripup), ripup_penalty(ripup_penalty) { std::unordered_map<WireId, delay_t> src_wires; - src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay(); + src_wires[src_wire] = ctx->getWireDelay(src_wire).maxDelay(); route(src_wires, dst_wire); routedOkay = visited.count(dst_wire); @@ -286,7 +286,7 @@ struct Router log(" Source wire: %s\n", ctx->getWireName(src_wire).c_str(ctx)); std::unordered_map<WireId, delay_t> src_wires; - src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay(); + src_wires[src_wire] = ctx->getWireDelay(src_wire).maxDelay(); ripup_net(ctx, net_name); ctx->bindWire(src_wire, net_name, STRENGTH_WEAK); diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index 941607ba..40442e1b 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -32,9 +32,14 @@ struct DelayInfo { delay_t delay = 0; - delay_t raiseDelay() const { return delay; } - delay_t fallDelay() const { return delay; } - delay_t avgDelay() const { return delay; } + delay_t minRaiseDelay() const { return delay; } + delay_t maxRaiseDelay() const { return delay; } + + delay_t minFallDelay() const { return delay; } + delay_t maxFallDelay() const { return delay; } + + delay_t minDelay() const { return delay; } + delay_t maxDelay() const { return delay; } DelayInfo operator+(const DelayInfo &other) const { diff --git a/generic/archdefs.h b/generic/archdefs.h index 06d4ec6e..b318d5af 100644 --- a/generic/archdefs.h +++ b/generic/archdefs.h @@ -29,11 +29,14 @@ struct DelayInfo { delay_t delay = 0; - delay_t raiseDelay() const { return delay; } + delay_t minRaiseDelay() const { return delay; } + delay_t maxRaiseDelay() const { return delay; } - delay_t fallDelay() const { return delay; } + delay_t minFallDelay() const { return delay; } + delay_t maxFallDelay() const { return delay; } - delay_t avgDelay() const { return delay; } + delay_t minDelay() const { return delay; } + delay_t maxDelay() const { return delay; } DelayInfo operator+(const DelayInfo &other) const { diff --git a/gui/designwidget.cc b/gui/designwidget.cc index f7ae82f5..c40e58d3 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -507,6 +507,14 @@ void DesignWidget::onItemSelectionChanged() addProperty(topItem, QVariant::String, "Conflicting Net", ctx->getConflictingWireNet(wire).c_str(ctx),
ElementType::NET);
+ DelayInfo delay = ctx->getWireDelay(wire);
+
+ QtProperty *delayItem = addSubGroup(topItem, "Delay");
+ addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRaiseDelay());
+ addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRaiseDelay());
+ 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())
@@ -566,9 +574,10 @@ void DesignWidget::onItemSelectionChanged() DelayInfo delay = ctx->getPipDelay(pip);
QtProperty *delayItem = addSubGroup(topItem, "Delay");
- addProperty(delayItem, QVariant::Double, "Raise", delay.raiseDelay());
- addProperty(delayItem, QVariant::Double, "Fall", delay.fallDelay());
- addProperty(delayItem, QVariant::Double, "Average", delay.avgDelay());
+ addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRaiseDelay());
+ addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRaiseDelay());
+ addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay());
+ addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay());
} else if (type == ElementType::NET) {
NetInfo *net = ctx->nets.at(c).get();
diff --git a/ice40/archdefs.h b/ice40/archdefs.h index dec6f702..8a7449a8 100644 --- a/ice40/archdefs.h +++ b/ice40/archdefs.h @@ -29,9 +29,14 @@ struct DelayInfo { delay_t delay = 0; - delay_t raiseDelay() const { return delay; } - delay_t fallDelay() const { return delay; } - delay_t avgDelay() const { return delay; } + delay_t minRaiseDelay() const { return delay; } + delay_t maxRaiseDelay() const { return delay; } + + delay_t minFallDelay() const { return delay; } + delay_t maxFallDelay() const { return delay; } + + delay_t minDelay() const { return delay; } + delay_t maxDelay() const { return delay; } DelayInfo operator+(const DelayInfo &other) const { |