diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 2 | ||||
-rw-r--r-- | common/router1.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index ba45c195..bb55d4ff 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -484,7 +484,7 @@ struct Context : Arch, DeterministicRNG delay_t getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &sink) const; // provided by router1.cc - bool getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t &delay, + bool getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t *delay = nullptr, std::unordered_map<WireId, PipId> *route = nullptr, bool useEstimate = true); // -------------------------------------------------------------- diff --git a/common/router1.cc b/common/router1.cc index ad2d7c9e..03a06072 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -947,7 +947,7 @@ bool router1(Context *ctx, const Router1Cfg &cfg) } } -bool Context::getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t &delay, +bool Context::getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t *delay, std::unordered_map<WireId, PipId> *route, bool useEstimate) { RipupScoreboard scores; @@ -959,7 +959,8 @@ bool Context::getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t &del if (!router.routedOkay) return false; - delay = router.visited.at(dst_wire).delay; + if (delay != nullptr) + *delay = router.visited.at(dst_wire).delay; if (route != nullptr) { WireId cursor = dst_wire; |