diff options
author | gatecat <gatecat@ds0.me> | 2021-12-19 18:46:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 18:46:10 +0000 |
commit | 62a3e093856063180526b7189d5e711a98036fa0 (patch) | |
tree | d03ba5688367cb476a06b19d04ca78d0352afce3 /gowin | |
parent | 56d550733346000584b9490fac0953fe07124035 (diff) | |
parent | ddb084e9a8a0cba10536951236cde824526e8071 (diff) | |
download | nextpnr-62a3e093856063180526b7189d5e711a98036fa0.tar.gz nextpnr-62a3e093856063180526b7189d5e711a98036fa0.tar.bz2 nextpnr-62a3e093856063180526b7189d5e711a98036fa0.zip |
Merge pull request #883 from YosysHQ/gatecat/new-predictdelay
archapi: Use arbitrary rather than actual placement in predictDelay [breaking change]
Diffstat (limited to 'gowin')
-rw-r--r-- | gowin/arch.cc | 9 | ||||
-rw-r--r-- | gowin/arch.h | 2 |
2 files changed, 6 insertions, 5 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); diff --git a/gowin/arch.h b/gowin/arch.h index aa751a4f..931a0aa1 100644 --- a/gowin/arch.h +++ b/gowin/arch.h @@ -419,7 +419,7 @@ struct Arch : BaseArch<ArchRanges> const std::vector<GroupId> &getGroupGroups(GroupId group) const override; delay_t estimateDelay(WireId src, WireId dst) const override; - delay_t predictDelay(const NetInfo *net_info, const PortRef &sink) const override; + delay_t predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdString dst_pin) const override; delay_t getDelayEpsilon() const override { return 0.01; } delay_t getRipupDelayPenalty() const override { return 0.4; } float getDelayNS(delay_t v) const override { return v; } |