aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/timing.cc12
-rw-r--r--common/timing.h1
2 files changed, 12 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;
}
diff --git a/common/timing.h b/common/timing.h
index de30ee61..1205cba5 100644
--- a/common/timing.h
+++ b/common/timing.h
@@ -132,6 +132,7 @@ struct TimingAnalyser
private:
void init_ports();
void get_cell_delays();
+ void get_route_delays();
void topo_sort();
void setup_port_domains();