diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-04 13:41:42 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-04 13:41:42 +0200 |
commit | bd36cc12755e4c90cfdaaa593e5af31c5ba38fa5 (patch) | |
tree | 062552e994990605fac8ab40ea44102d72eecf7b /common | |
parent | 700e68746ae5cf4d9b7761c4bfa515e4af5fb2b4 (diff) | |
download | nextpnr-bd36cc12755e4c90cfdaaa593e5af31c5ba38fa5.tar.gz nextpnr-bd36cc12755e4c90cfdaaa593e5af31c5ba38fa5.tar.bz2 nextpnr-bd36cc12755e4c90cfdaaa593e5af31c5ba38fa5.zip |
Refactor ice40 timing fuzzer used to create delay estimates
Signed-off-by: Clifford Wolf <clifford@clifford.at>
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; |