timing: Fixes to criticality calculation
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
254c5ea359
commit
0f40e5fe8c
@ -599,6 +599,22 @@ struct Timing
|
||||
nc.cd_worst_slack = std::min(nc.cd_worst_slack, worst_slack.at(startdomain.first));
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->debug) {
|
||||
for (auto &nc : *net_crit) {
|
||||
NetInfo *net = ctx->nets.at(nc.first).get();
|
||||
log_info("Net %s maxlen %d worst_slack %.02fns: \n", nc.first.c_str(ctx), nc.second.max_path_length,
|
||||
ctx->getDelayNS(nc.second.cd_worst_slack));
|
||||
if (!nc.second.criticality.empty() && !nc.second.slack.empty()) {
|
||||
for (size_t i = 0; i < net->users.size(); i++) {
|
||||
log_info(" user %s.%s slack %.02fns crit %.03f\n", net->users.at(i).cell->name.c_str(ctx),
|
||||
net->users.at(i).port.c_str(ctx), ctx->getDelayNS(nc.second.slack.at(i)),
|
||||
nc.second.criticality.at(i));
|
||||
}
|
||||
}
|
||||
log_break();
|
||||
}
|
||||
}
|
||||
}
|
||||
return min_slack;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class TimingOptimiser
|
||||
log_info(" Iteration %d...\n", i);
|
||||
get_criticalities(ctx, &net_crit);
|
||||
setup_delay_limits();
|
||||
auto crit_paths = find_crit_paths(0.98, 1000);
|
||||
auto crit_paths = find_crit_paths(0.92, 1000);
|
||||
for (auto &path : crit_paths)
|
||||
optimise_path(path);
|
||||
#if 1
|
||||
@ -372,6 +372,9 @@ class TimingOptimiser
|
||||
TimingPortClass tpclass = ctx->getPortTimingClass(cell, port.first, ccount);
|
||||
if (tpclass != TMG_COMB_OUTPUT)
|
||||
continue;
|
||||
bool is_path = ctx->getCellDelay(cell, fwd_cursor->port, port.first, combDelay);
|
||||
if (!is_path)
|
||||
continue;
|
||||
auto &crits = net_crit.at(pn->name).criticality;
|
||||
for (size_t i = 0; i < crits.size(); i++) {
|
||||
if (used_ports.count(&(pn->users.at(i))))
|
||||
@ -427,8 +430,11 @@ class TimingOptimiser
|
||||
}
|
||||
|
||||
if (path_cells.size() < 3) {
|
||||
if (ctx->debug) {
|
||||
log_info("Too few moveable cells; skipping path\n");
|
||||
log_break();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
IdString last_cell;
|
||||
|
Loading…
Reference in New Issue
Block a user