aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorEddie Hung <e.hung@imperial.ac.uk>2018-07-23 19:25:00 -0700
committerEddie Hung <e.hung@imperial.ac.uk>2018-07-23 19:25:00 -0700
commitadc1a86648453b6bbc96ed6c3eb9d1ac0cdc0bbc (patch)
tree01a5734706c4e3a6682e668dae346cb246492460 /common
parentee2e6ed1c6c6f7fe13f7d20a2310626f445d8612 (diff)
downloadnextpnr-adc1a86648453b6bbc96ed6c3eb9d1ac0cdc0bbc.tar.gz
nextpnr-adc1a86648453b6bbc96ed6c3eb9d1ac0cdc0bbc.tar.bz2
nextpnr-adc1a86648453b6bbc96ed6c3eb9d1ac0cdc0bbc.zip
Oops
Diffstat (limited to 'common')
-rw-r--r--common/router1.cc2
-rw-r--r--common/timing.cc14
2 files changed, 4 insertions, 12 deletions
diff --git a/common/router1.cc b/common/router1.cc
index f4f0d75b..dbf97af7 100644
--- a/common/router1.cc
+++ b/common/router1.cc
@@ -613,7 +613,7 @@ bool router1(Context *ctx)
std::unordered_set<IdString> normalRouteNets, ripupQueue;
- if (iterCnt == 1 && ctx->verbose)
+ if (ctx->verbose || iterCnt == 1)
log_info("routing queue contains %d jobs.\n", int(jobQueue.size()));
update_budget(ctx);
diff --git a/common/timing.cc b/common/timing.cc
index dd0bf52a..53b2f132 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -174,16 +174,8 @@ void update_budget(Context *ctx)
if (port.second.type == PORT_OUT) {
IdString clock_domain = ctx->getPortClock(cell.second.get(), port.first);
if (clock_domain != IdString()) {
- auto net = port.second.net;
- if (net) {
- delay_t delay = 0;
- if (port.second.name != net->driver.port) {
- const auto& users = net->users;
- auto it = std::find_if(users.begin(), users.end(), [&port](const PortRef& pr) { return pr.port == port.second.name; });
- delay = ctx->getNetinfoRouteDelay(net, std::distance(users.begin(), it));
- }
- follow_net_update(ctx, net, 0, delay_t(1.0e12 / ctx->target_freq - delay), updates);
- }
+ if (port.second.net)
+ follow_net_update(ctx, port.second.net, 0, delay_t(1.0e12 / ctx->target_freq), updates);
}
}
}
@@ -192,7 +184,7 @@ void update_budget(Context *ctx)
// Update the budgets
for (auto &net : ctx->nets) {
for (size_t i = 0; i < net.second->users.size(); ++i) {
- auto user = net.second->users[i];
+ auto& user = net.second->users[i];
auto pi = &user.cell->ports.at(user.port);
auto it = updates.find(pi);
if (it == updates.end()) continue;