diff options
Diffstat (limited to 'common/timing.cc')
-rw-r--r-- | common/timing.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/common/timing.cc b/common/timing.cc index f46df189..69927841 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -34,6 +34,7 @@ void TimingAnalyser::setup() { init_ports(); get_cell_delays(); + get_route_delays(); topo_sort(); setup_port_domains(); reset_times(); @@ -129,6 +130,15 @@ void TimingAnalyser::get_cell_delays() } } +void TimingAnalyser::get_route_delays() +{ + for (auto net : sorted(ctx->nets)) { + NetInfo *ni = net.second; + for (auto &usr : ni->users) + ports.at(CellPortKey(usr)).route_delay = DelayPair(ctx->getNetinfoRouteDelay(ni, usr)); + } +} + void TimingAnalyser::topo_sort() { TopoSort<CellPortKey> topo; @@ -396,7 +406,7 @@ void TimingAnalyser::print_fmax() for (auto &req : pd.required) { if (pd.arrival.count(req.first)) { auto &arr = pd.arrival.at(req.first); - double fmax = 1000.0 / (arr.value.maxDelay() - req.second.value.minDelay()); + double fmax = 1000.0 / ctx->getDelayNS(arr.value.maxDelay() - req.second.value.minDelay()); if (!domain_fmax.count(req.first) || domain_fmax.at(req.first) > fmax) domain_fmax[req.first] = fmax; } |