From a82f6f410595de26e82eaf4818e41036f0bc2f9c Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 30 Jul 2018 19:19:30 -0700 Subject: Modify predictDelay signature --- ecp5/arch.cc | 8 ++++++-- ecp5/arch.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'ecp5') 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)); } // ----------------------------------------------------------------------- diff --git a/ecp5/arch.h b/ecp5/arch.h index 13f2db1f..400d6e55 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -776,7 +776,7 @@ struct Arch : BaseCtx // ------------------------------------------------- delay_t estimateDelay(WireId src, WireId dst) const; - delay_t predictDelay(WireId src, WireId dst) const; + delay_t predictDelay(const NetInfo *net_info, const PortRef &sink) const; delay_t getDelayEpsilon() const { return 20; } delay_t getRipupDelayPenalty() const { return 200; } float getDelayNS(delay_t v) const { return v * 0.001; } -- cgit v1.2.3