aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-27 19:52:58 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-27 19:52:58 -0700
commit0bbe309a260dc690a27e882c52f12437a119b4b1 (patch)
treefdfe258a0bb8688fe3ad3efd77867dd555199ed1 /common
parent02b3bda7f6ecec2e6896e46b03938871c236a52d (diff)
downloadnextpnr-0bbe309a260dc690a27e882c52f12437a119b4b1.tar.gz
nextpnr-0bbe309a260dc690a27e882c52f12437a119b4b1.tar.bz2
nextpnr-0bbe309a260dc690a27e882c52f12437a119b4b1.zip
Fix sign of slack redistribution again
Diffstat (limited to 'common')
-rw-r--r--common/timing.cc8
1 files changed, 4 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