aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-07-28 11:20:28 +0100
committergatecat <gatecat@ds0.me>2021-07-28 11:20:28 +0100
commit14c676ab494e5a412fde9f6c303317df1d7e1b80 (patch)
treee6c18bd9613a43f65276cf809a9623f15d19a66b /common
parenteb6817c259bf0a757eb923a7418a43d2dd32f732 (diff)
downloadnextpnr-14c676ab494e5a412fde9f6c303317df1d7e1b80.tar.gz
nextpnr-14c676ab494e5a412fde9f6c303317df1d7e1b80.tar.bz2
nextpnr-14c676ab494e5a412fde9f6c303317df1d7e1b80.zip
timing: Allow overriding of route delays
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common')
-rw-r--r--common/timing.cc7
-rw-r--r--common/timing.h6
2 files changed, 10 insertions, 3 deletions
diff --git a/common/timing.cc b/common/timing.cc
index 6a91b6e5..d110498c 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -38,10 +38,11 @@ void TimingAnalyser::setup()
run();
}
-void TimingAnalyser::run()
+void TimingAnalyser::run(bool update_route_delays)
{
reset_times();
- get_route_delays();
+ if (update_route_delays)
+ get_route_delays();
walk_forward();
walk_backward();
compute_slack();
@@ -149,6 +150,8 @@ void TimingAnalyser::get_route_delays()
}
}
+void TimingAnalyser::set_route_delay(CellPortKey port, DelayPair value) { ports.at(port).route_delay = value; }
+
void TimingAnalyser::topo_sort()
{
TopoSort<CellPortKey> topo;
diff --git a/common/timing.h b/common/timing.h
index c5799b41..6548757b 100644
--- a/common/timing.h
+++ b/common/timing.h
@@ -97,9 +97,13 @@ struct TimingAnalyser
public:
TimingAnalyser(Context *ctx) : ctx(ctx){};
void setup();
- void run();
+ void run(bool update_route_delays = true);
void print_report();
+ // This is used when routers etc are not actually binding detailed routing (due to congestion or an abstracted
+ // model), but want to re-run STA with their own calculated delays
+ void set_route_delay(CellPortKey port, DelayPair value);
+
float get_criticality(CellPortKey port) const { return ports.at(port).worst_crit; }
float get_setup_slack(CellPortKey port) const { return ports.at(port).worst_setup_slack; }
float get_domain_setup_slack(CellPortKey port) const