diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:54:23 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:54:23 -0700 |
commit | 76a7d67f74d6d97f556859dd6677af8fc4cb920a (patch) | |
tree | 626f0ee4c250c9b4dd0615b5ea3eb01773ed8ea7 /common | |
parent | b07f0eebc894dce9220ab57808ff2e7103827fea (diff) | |
download | nextpnr-76a7d67f74d6d97f556859dd6677af8fc4cb920a.tar.gz nextpnr-76a7d67f74d6d97f556859dd6677af8fc4cb920a.tar.bz2 nextpnr-76a7d67f74d6d97f556859dd6677af8fc4cb920a.zip |
Revert "Be cognisant that delay_t could be a non-integer type (if so, truncate to integer)"
This reverts commit b07f0eebc894dce9220ab57808ff2e7103827fea.
Diffstat (limited to 'common')
-rw-r--r-- | common/timing.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/timing.cc b/common/timing.cc index 2e3c6c7d..c046c76f 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<int, unsigned> DelayFrequency; +typedef std::map<delay_t, unsigned> DelayFrequency; struct Timing { @@ -239,9 +239,9 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_path) if (print_histogram) { constexpr unsigned num_bins = 20; unsigned bar_width = 60; - int min_slack = slack_histogram.begin()->first; - int max_slack = slack_histogram.rbegin()->first; - int bin_size = (max_slack - min_slack) / num_bins; + auto min_slack = slack_histogram.begin()->first; + auto max_slack = slack_histogram.rbegin()->first; + auto bin_size = (max_slack - min_slack) / num_bins; std::vector<unsigned> bins(num_bins + 1); unsigned max_freq = 0; for (const auto &i : slack_histogram) { |