diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-23 12:44:26 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-23 12:44:26 +0200 |
commit | a436facfd0a610c8b055e07d3a72e4122df677c6 (patch) | |
tree | 3d10f3f61cd3a8daba94e5a00fec414a315d01af /common | |
parent | 27c523682601e7b504c924a00bec98743fd3477c (diff) | |
download | nextpnr-a436facfd0a610c8b055e07d3a72e4122df677c6.tar.gz nextpnr-a436facfd0a610c8b055e07d3a72e4122df677c6.tar.bz2 nextpnr-a436facfd0a610c8b055e07d3a72e4122df677c6.zip |
Add fallback to estimateDelay() in getNetinfoRouteDelay()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc index 74747642..2c50c9a1 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -92,7 +92,7 @@ delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const { WireId src_wire = getNetinfoSourceWire(net_info); WireId cursor = getNetinfoSinkWire(net_info, user_idx); - delay_t delay = getWireDelay(src_wire).maxDelay(); + delay_t delay = 0; while (cursor != WireId() && cursor != src_wire) { auto it = net_info->wires.find(cursor); @@ -104,6 +104,11 @@ delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const cursor = getPipSrcWire(pip); } + if (cursor == src_wire) + delay += getWireDelay(src_wire).maxDelay(); + else + delay += estimateDelay(src_wire, cursor); + return delay; } |