From 8974ef332737bcf2f37cdd59b2c9767fa187fdf3 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Sat, 4 Aug 2018 18:55:03 -0700 Subject: [PATCH] Slack histogram to use ps granularity via int(Arch::getDelayNS() * 1000) --- common/timing.cc | 8 +++++--- 1 file 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 PortRefVector; -typedef std::map DelayFrequency; +typedef std::map 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;