diff options
author | gatecat <gatecat@ds0.me> | 2021-12-19 16:41:34 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-12-19 17:15:15 +0000 |
commit | ddb084e9a8a0cba10536951236cde824526e8071 (patch) | |
tree | d03ba5688367cb476a06b19d04ca78d0352afce3 /machxo2/arch.cc | |
parent | 56d550733346000584b9490fac0953fe07124035 (diff) | |
download | nextpnr-ddb084e9a8a0cba10536951236cde824526e8071.tar.gz nextpnr-ddb084e9a8a0cba10536951236cde824526e8071.tar.bz2 nextpnr-ddb084e9a8a0cba10536951236cde824526e8071.zip |
archapi: Use arbitrary rather than actual placement in predictDelay
This makes predictDelay be based on an arbitrary belpin pair rather
than a arc of a net based on cell placement. This way 'what-if'
decisions can be evaluated without actually changing placement;
potentially useful for parallel placement.
A new helper predictArcDelay behaves like the old predictDelay to
minimise the impact on existing passes; only arches need be updated.
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'machxo2/arch.cc')
-rw-r--r-- | machxo2/arch.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/machxo2/arch.cc b/machxo2/arch.cc index a201adf1..6c0e48ce 100644 --- a/machxo2/arch.cc +++ b/machxo2/arch.cc @@ -387,16 +387,17 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const return (abs(dst.location.x - src.location.x) + abs(dst.location.y - src.location.y)) * (0.01 + 0.01); } -delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const +delay_t Arch::predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdString dst_pin) const { - BelId src = net_info->driver.cell->bel; - BelId dst = sink.cell->bel; + NPNR_UNUSED(src_pin); + NPNR_UNUSED(dst_pin); - NPNR_ASSERT(src != BelId()); - NPNR_ASSERT(dst != BelId()); + NPNR_ASSERT(src_bel != BelId()); + NPNR_ASSERT(dst_bel != BelId()); // TODO: Same deal applies here as with estimateDelay. - return (abs(dst.location.x - src.location.x) + abs(dst.location.y - src.location.y)) * (0.01 + 0.01); + return (abs(dst_bel.location.x - src_bel.location.x) + abs(dst_bel.location.y - src_bel.location.y)) * + (0.01 + 0.01); } ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const |