From b07f0eebc894dce9220ab57808ff2e7103827fea Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Sat, 4 Aug 2018 18:47:42 -0700 Subject: Be cognisant that delay_t could be a non-integer type (if so, truncate to integer) --- common/timing.cc | 8 ++++---- 1 file 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 PortRefVector; -typedef std::map DelayFrequency; +typedef std::map 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 bins(num_bins + 1); unsigned max_freq = 0; for (const auto &i : slack_histogram) { -- cgit v1.2.3