aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-07-29 12:02:45 +0100
committergatecat <gatecat@ds0.me>2021-07-29 12:52:13 +0100
commit4ac00af6fadc0405867fdac84229d2cda390c108 (patch)
tree5fa123c4054040796e9fe484f564f4d13fdeb5c6 /common/timing.cc
parent0991003de9f3aa8870728ce70e5a247747eb302e (diff)
downloadnextpnr-4ac00af6fadc0405867fdac84229d2cda390c108.tar.gz
nextpnr-4ac00af6fadc0405867fdac84229d2cda390c108.tar.bz2
nextpnr-4ac00af6fadc0405867fdac84229d2cda390c108.zip
basectx: Add a field to store timing results
Signed-off-by: gatecat <gatecat@ds0.me>
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, "",