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;