From a436facfd0a610c8b055e07d3a72e4122df677c6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 23 Jul 2018 12:44:26 +0200 Subject: Add fallback to estimateDelay() in getNetinfoRouteDelay() Signed-off-by: Clifford Wolf --- common/nextpnr.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'common/nextpnr.cc') 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; } -- cgit v1.2.3