aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-07-30 14:29:55 +0100
committerGitHub <noreply@github.com>2021-07-30 14:29:55 +0100
commitef1fbfc651ea328dfb703c3b79d5b9ea123f2f0d (patch)
tree41f9aec86a1d468a0302243c8f6c567d46c666b6 /common/timing.cc
parent8466985bc709d6c2e0e6f5f030abec119ae2305a (diff)
parentd2007a386c1a2db7917d7048ea6206ae1218d141 (diff)
downloadnextpnr-ef1fbfc651ea328dfb703c3b79d5b9ea123f2f0d.tar.gz
nextpnr-ef1fbfc651ea328dfb703c3b79d5b9ea123f2f0d.tar.bz2
nextpnr-ef1fbfc651ea328dfb703c3b79d5b9ea123f2f0d.zip
Merge pull request #787 from YosysHQ/gatecat/report
Add JSON utilisation and timing report
Diffstat (limited to 'common/timing.cc')
-rw-r--r--common/timing.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/timing.cc b/common/timing.cc
index d110498c..0cdb5be2 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -1315,6 +1315,8 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
if (print_fmax) {
log_break();
unsigned max_width = 0;
+ auto &result = ctx->timing_result;
+ result.clock_fmax.clear();
for (auto &clock : clock_reports)
max_width = std::max<unsigned>(max_width, clock.first.str(ctx).size());
for (auto &clock : clock_reports) {
@@ -1324,6 +1326,9 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
if (ctx->nets.at(clock.first)->clkconstr)
target = 1000 / ctx->getDelayNS(ctx->nets.at(clock.first)->clkconstr->period.minDelay());
+ result.clock_fmax[clock.first].achieved = clock_fmax[clock.first];
+ result.clock_fmax[clock.first].constraint = target;
+
bool passed = target < clock_fmax[clock.first];
if (!warn_on_failure || passed)
log_info("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",