aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddie.hung+gitlab@gmail.com>2018-07-28 02:55:37 +0000
committerEddie Hung <eddie.hung+gitlab@gmail.com>2018-07-28 02:55:37 +0000
commit48b9d05d85dd2192b194cc7f931dfd2ac7663778 (patch)
treefdfe258a0bb8688fe3ad3efd77867dd555199ed1
parent56d551d4071194b0484395cdd1418cdacd56679f (diff)
parent0bbe309a260dc690a27e882c52f12437a119b4b1 (diff)
downloadnextpnr-48b9d05d85dd2192b194cc7f931dfd2ac7663778.tar.gz
nextpnr-48b9d05d85dd2192b194cc7f931dfd2ac7663778.tar.bz2
nextpnr-48b9d05d85dd2192b194cc7f931dfd2ac7663778.zip
Merge branch 'redist_slack' into 'redist_slack'
Redist slack See merge request eddiehung/nextpnr!12
-rw-r--r--common/timing.cc8
-rw-r--r--ice40/arch.cc16
2 files changed, 20 insertions, 4 deletions
diff --git a/common/timing.cc b/common/timing.cc
index afaddbdf..f720b772 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -160,10 +160,10 @@ void assign_budget(Context *ctx)
for (size_t i = 0; i < net.second->users.size(); ++i) {
auto &user = net.second->users[i];
auto pi = &user.cell->ports.at(user.port);
+ auto budget = ctx->getNetinfoRouteDelay(net.second.get(), i);
auto it = updates.find(pi);
- if (it == updates.end())
- continue;
- auto budget = ctx->getNetinfoRouteDelay(net.second.get(), i) - it->second;
+ if (it != updates.end())
+ budget += it->second;
user.budget = ctx->getBudgetOverride(net.second.get(), i, budget);
// Post-update check
@@ -196,7 +196,7 @@ void update_budget(Context *ctx)
auto budget = ctx->getNetinfoRouteDelay(net.second.get(), i);
auto it = updates.find(pi);
if (it != updates.end())
- budget -= it->second;
+ budget += it->second;
user.budget = ctx->getBudgetOverride(net.second.get(), i, budget);
// Post-update check
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 4e9baf7e..cfafa2d8 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -584,6 +584,22 @@ 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;
}