diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-31 17:51:56 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-31 17:51:56 +0000 |
commit | 70747b93555c1a8a55c247420446f4410dc2b2f8 (patch) | |
tree | a875532bd46d6cd4eeb66154ea07c054241ec7cd /ice40/arch.cc | |
parent | b55ccc12f0b2ac964cb4ff72b191fee2c4e1bdad (diff) | |
parent | b884d6bcf32575c4495c2dfb02d095c7fb195eae (diff) | |
download | nextpnr-70747b93555c1a8a55c247420446f4410dc2b2f8.tar.gz nextpnr-70747b93555c1a8a55c247420446f4410dc2b2f8.tar.bz2 nextpnr-70747b93555c1a8a55c247420446f4410dc2b2f8.zip |
Merge branch 'redist_slack' into 'redist_slack'
# Conflicts:
# common/timing.cc
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r-- | ice40/arch.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index f3004155..e15abdd1 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -618,9 +618,40 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const // offset = 500; // } + // Estimate for output mux + for (const auto &bp : getWireBelPins(src)) { + if (bp.pin == PIN_O && getBelType(bp.bel) == TYPE_ICESTORM_LC) { + offset += 330; + break; + } + } + + // Estimate for input mux + for (const auto &bp : getWireBelPins(dst)) { + if ((bp.pin == PIN_I0 || bp.pin == PIN_I1 || bp.pin == PIN_I2 || bp.pin == PIN_I3) && + getBelType(bp.bel) == TYPE_ICESTORM_LC) { + offset += 260; + break; + } + } + return xscale * abs(xd) + yscale * abs(yd) + offset; } +delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, 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) + return 0; + return 250; + } + return budget; +} + // ----------------------------------------------------------------------- bool Arch::place() { return placer1(getCtx()); } |