This commit is contained in:
Eddie Hung 2018-07-23 19:25:00 -07:00
parent ee2e6ed1c6
commit adc1a86648
2 changed files with 4 additions and 12 deletions

View File

@ -613,7 +613,7 @@ bool router1(Context *ctx)
std::unordered_set<IdString> normalRouteNets, ripupQueue; 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())); log_info("routing queue contains %d jobs.\n", int(jobQueue.size()));
update_budget(ctx); update_budget(ctx);

View File

@ -174,16 +174,8 @@ void update_budget(Context *ctx)
if (port.second.type == PORT_OUT) { if (port.second.type == PORT_OUT) {
IdString clock_domain = ctx->getPortClock(cell.second.get(), port.first); IdString clock_domain = ctx->getPortClock(cell.second.get(), port.first);
if (clock_domain != IdString()) { if (clock_domain != IdString()) {
auto net = port.second.net; if (port.second.net)
if (net) { follow_net_update(ctx, port.second.net, 0, delay_t(1.0e12 / ctx->target_freq), updates);
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);
}
} }
} }
} }
@ -192,7 +184,7 @@ void update_budget(Context *ctx)
// Update the budgets // Update the budgets
for (auto &net : ctx->nets) { for (auto &net : ctx->nets) {
for (size_t i = 0; i < net.second->users.size(); ++i) { 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 pi = &user.cell->ports.at(user.port);
auto it = updates.find(pi); auto it = updates.find(pi);
if (it == updates.end()) continue; if (it == updates.end()) continue;