aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-30 15:35:40 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-30 15:35:40 +0200
commit0daffec2a0efdbea36201eeb5666d208a10d0226 (patch)
treeeffbd8bfd41387213ee0ae3c899e1b25b47e4476 /common/nextpnr.cc
parentb5f90d381481dc3658c408b162aa433e183f79f4 (diff)
downloadnextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.tar.gz
nextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.tar.bz2
nextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.zip
Add predictDelay Arch API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common/nextpnr.cc')
-rw-r--r--common/nextpnr.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index cf1b5982..5b0a45ed 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -93,7 +93,9 @@ delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const
WireId src_wire = getNetinfoSourceWire(net_info);
if (src_wire == WireId())
return 0;
- WireId cursor = getNetinfoSinkWire(net_info, user_idx);
+
+ WireId dst_wire = getNetinfoSinkWire(net_info, user_idx);
+ WireId cursor = dst_wire;
delay_t delay = 0;
while (cursor != WireId() && cursor != src_wire) {
@@ -107,11 +109,9 @@ delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const
}
if (cursor == src_wire)
- delay += getWireDelay(src_wire).maxDelay();
- else
- delay += estimateDelay(src_wire, cursor);
+ return delay + getWireDelay(src_wire).maxDelay();
- return delay;
+ return predictDelay(src_wire, dst_wire);
}
static uint32_t xorshift32(uint32_t x)