diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-07-30 19:19:30 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-07-30 21:51:30 -0700 |
commit | a82f6f410595de26e82eaf4818e41036f0bc2f9c (patch) | |
tree | 22620c1be70ce79387d8309ccb46aceb295db0fa /ecp5/arch.cc | |
parent | e4b044da52ce7d8fed2e461bec09c86cb293566d (diff) | |
download | nextpnr-a82f6f410595de26e82eaf4818e41036f0bc2f9c.tar.gz nextpnr-a82f6f410595de26e82eaf4818e41036f0bc2f9c.tar.bz2 nextpnr-a82f6f410595de26e82eaf4818e41036f0bc2f9c.zip |
Modify predictDelay signature
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r-- | ecp5/arch.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 88b5e4d4..23105df2 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -413,9 +413,13 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const return 200 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); } -delay_t Arch::predictDelay(WireId src, WireId dst) const +delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const; { - return 200 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); + const auto& driver = net_info->driver; + auto driver_loc = getBelLocation(driver.cell->bel); + auto sink_loc = getBelLocation(sink.cell->bel); + + return 200 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); } // ----------------------------------------------------------------------- |