From 0daffec2a0efdbea36201eeb5666d208a10d0226 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 30 Jul 2018 15:35:40 +0200 Subject: Add predictDelay Arch API Signed-off-by: Clifford Wolf --- common/nextpnr.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common') 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) -- cgit v1.2.3