diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:47:42 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-04 18:47:42 -0700 |
commit | b07f0eebc894dce9220ab57808ff2e7103827fea (patch) | |
tree | 375dc609ee2613eef54950dea17f3b3b0711f402 /common | |
parent | aebb39c65125573386165dee3afbb93d6a18241e (diff) | |
download | nextpnr-b07f0eebc894dce9220ab57808ff2e7103827fea.tar.gz nextpnr-b07f0eebc894dce9220ab57808ff2e7103827fea.tar.bz2 nextpnr-b07f0eebc894dce9220ab57808ff2e7103827fea.zip |
Be cognisant that delay_t could be a non-integer type (if so, truncate to integer)
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 c046c76f..2e3c6c7d 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 { @@ -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; - auto min_slack = slack_histogram.begin()->first; - auto max_slack = slack_histogram.rbegin()->first; - auto bin_size = (max_slack - min_slack) / num_bins; + int min_slack = slack_histogram.begin()->first; + int max_slack = slack_histogram.rbegin()->first; + int 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) { |