aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/arch.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-12-19 16:41:34 +0000
committergatecat <gatecat@ds0.me>2021-12-19 17:15:15 +0000
commitddb084e9a8a0cba10536951236cde824526e8071 (patch)
treed03ba5688367cb476a06b19d04ca78d0352afce3 /gowin/arch.cc
parent56d550733346000584b9490fac0953fe07124035 (diff)
downloadnextpnr-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 'gowin/arch.cc')
-rw-r--r--gowin/arch.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc
index 99e0ce61..801540cc 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -1171,11 +1171,12 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
return (dx + dy) * args.delayScale + args.delayOffset;
}
-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
{
- const auto &driver = net_info->driver;
- auto driver_loc = getBelLocation(driver.cell->bel);
- auto sink_loc = getBelLocation(sink.cell->bel);
+ NPNR_UNUSED(src_pin);
+ NPNR_UNUSED(dst_pin);
+ auto driver_loc = getBelLocation(src_bel);
+ auto sink_loc = getBelLocation(dst_bel);
int dx = abs(sink_loc.x - driver_loc.x);
int dy = abs(sink_loc.y - driver_loc.y);