diff options
author | gatecat <gatecat@ds0.me> | 2021-03-05 10:04:35 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-03-05 10:04:35 +0000 |
commit | 8a4bf3a7805080db2c8f2e797a0f12aad7c99f5d (patch) | |
tree | 8f22e8d97135b98c2de51c36a6d25e2f252b40ac /common | |
parent | 98d1c5a411a9b349298384d32627f0fa1229986f (diff) | |
download | nextpnr-8a4bf3a7805080db2c8f2e797a0f12aad7c99f5d.tar.gz nextpnr-8a4bf3a7805080db2c8f2e797a0f12aad7c99f5d.tar.bz2 nextpnr-8a4bf3a7805080db2c8f2e797a0f12aad7c99f5d.zip |
timing: Integration tweaks
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common')
-rw-r--r-- | common/placer1.cc | 1 | ||||
-rw-r--r-- | common/placer_heap.cc | 1 | ||||
-rw-r--r-- | common/timing.cc | 10 | ||||
-rw-r--r-- | common/timing.h | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/common/placer1.cc b/common/placer1.cc index 63e2f438..c8b0d385 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -241,6 +241,7 @@ class SAPlacer auto saplace_start = std::chrono::high_resolution_clock::now(); // Invoke timing analysis to obtain criticalities + tmg.setup_only = true; if (!cfg.budgetBased) tmg.setup(); diff --git a/common/placer_heap.cc b/common/placer_heap.cc index a19d68fa..3ee8503c 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -143,6 +143,7 @@ class HeAPPlacer : ctx(ctx), cfg(cfg), fast_bels(ctx, /*check_bel_available=*/true, -1), tmg(ctx) { Eigen::initParallel(); + tmg.setup_only = true; tmg.setup(); } diff --git a/common/timing.cc b/common/timing.cc index 77206c30..8229f143 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -174,7 +174,7 @@ void TimingAnalyser::topo_sort() } } bool no_loops = topo.sort(); - if (!no_loops) { + if (!no_loops && verbose_mode) { log_info("Found %d combinational loops:\n", int(topo.loops.size())); int i = 0; for (auto &loop : topo.loops) { @@ -463,10 +463,12 @@ void TimingAnalyser::compute_criticality() auto &pd = ports.at(p); for (auto &pdp : pd.domain_pairs) { auto &dp = domain_pairs.at(pdp.first); - pdp.second.criticality = + float crit = 1.0f - (float(pdp.second.setup_slack) - float(dp.worst_setup_slack)) / float(-dp.worst_setup_slack); - NPNR_ASSERT(pdp.second.criticality >= -0.00001f && pdp.second.criticality <= 1.00001f); - pd.worst_crit = std::max(pd.worst_crit, pdp.second.criticality); + crit = std::min(crit, 1.0f); + crit = std::max(crit, 0.0f); + pdp.second.criticality = crit; + pd.worst_crit = std::max(pd.worst_crit, crit); } } } diff --git a/common/timing.h b/common/timing.h index 0ba1d479..63c0fc74 100644 --- a/common/timing.h +++ b/common/timing.h @@ -141,6 +141,7 @@ struct TimingAnalyser } bool setup_only = false; + bool verbose_mode = false; private: void init_ports(); |