diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:55:03 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:55:03 -0700 |
commit | 8974ef332737bcf2f37cdd59b2c9767fa187fdf3 (patch) | |
tree | d9d014b3181166fe7131ecc31a4a4afcdf054539 /common | |
parent | 76a7d67f74d6d97f556859dd6677af8fc4cb920a (diff) | |
download | nextpnr-8974ef332737bcf2f37cdd59b2c9767fa187fdf3.tar.gz nextpnr-8974ef332737bcf2f37cdd59b2c9767fa187fdf3.tar.bz2 nextpnr-8974ef332737bcf2f37cdd59b2c9767fa187fdf3.zip |
Slack histogram to use ps granularity via int(Arch::getDelayNS() * 1000)
Diffstat (limited to 'common')
-rw-r--r-- | common/timing.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/timing.cc b/common/timing.cc index c046c76f..f6c5f001 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -27,7 +27,7 @@ NEXTPNR_NAMESPACE_BEGIN typedef std::vector<const PortRef *> PortRefVector; -typedef std::map<delay_t, unsigned> DelayFrequency; +typedef std::map<int, unsigned> DelayFrequency; struct Timing { @@ -81,8 +81,10 @@ struct Timing if (crit_path) *crit_path = current_path; } - if (slack_histogram) - (*slack_histogram)[slack]++; + if (slack_histogram) { + int slack_ps = ctx->getDelayNS(slack) * 1000; + (*slack_histogram)[slack_ps]++; + } } else { // Default to the path ending here, if no further paths found value = slack / path_length; |