From f646ec790a79f29d6964f3b7e30088f044b4a4e9 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 31 Jul 2018 19:31:54 -0700 Subject: Modify the getNetinfo*() functions and getBudgetOverride() to not use user_idx and to take a PortRef& instead --- ice40/arch.cc | 3 +-- ice40/arch.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'ice40') diff --git a/ice40/arch.cc b/ice40/arch.cc index bdfb13fe..18887a3c 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -642,11 +642,10 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const return xscale * abs(xd) + yscale * abs(yd) + offset; } -delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const +delay_t Arch::getBudgetOverride(const NetInfo *net_info, const PortRef& sink, delay_t budget) const { const auto &driver = net_info->driver; if (driver.port == id_cout) { - const auto &sink = net_info->users[user_idx]; auto driver_loc = getBelLocation(driver.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel); if (driver_loc.y == sink_loc.y) diff --git a/ice40/arch.h b/ice40/arch.h index 92698b4d..d813c038 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -702,7 +702,7 @@ struct Arch : BaseCtx delay_t getRipupDelayPenalty() const { return 200; } float getDelayNS(delay_t v) const { return v * 0.001; } uint32_t getDelayChecksum(delay_t v) const { return v; } - delay_t getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const; + delay_t getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const; // ------------------------------------------------- -- cgit v1.2.3