diff options
author | David Shah <davey1576@gmail.com> | 2018-08-05 16:36:35 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-08-05 16:36:35 +0200 |
commit | b3acd8095fdcffe0dc116218d824a6c03562b69e (patch) | |
tree | 66c70ea8c501e5334f5fc962b3d9f494dcccec3f /common | |
parent | ba97c233fb6e4502f3465a602f997cc2382f0e06 (diff) | |
download | nextpnr-b3acd8095fdcffe0dc116218d824a6c03562b69e.tar.gz nextpnr-b3acd8095fdcffe0dc116218d824a6c03562b69e.tar.bz2 nextpnr-b3acd8095fdcffe0dc116218d824a6c03562b69e.zip |
timing: Fix slack histogram segfault with no paths
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/timing.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/timing.cc b/common/timing.cc index f6c5f001..d37a0f59 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -238,7 +238,7 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_path) delay_t default_slack = delay_t(1.0e12 / ctx->target_freq); log_info("estimated Fmax = %.2f MHz\n", 1e6 / (default_slack - min_slack)); - if (print_histogram) { + if (print_histogram && slack_histogram.size() > 0) { constexpr unsigned num_bins = 20; unsigned bar_width = 60; auto min_slack = slack_histogram.begin()->first; |