Slack histogram to use ps granularity via int(Arch::getDelayNS() * 1000)

This commit is contained in:
Eddie Hung 2018-08-04 18:55:03 -07:00
parent 76a7d67f74
commit 8974ef3327

View File

@ -27,7 +27,7 @@
NEXTPNR_NAMESPACE_BEGIN NEXTPNR_NAMESPACE_BEGIN
typedef std::vector<const PortRef *> PortRefVector; typedef std::vector<const PortRef *> PortRefVector;
typedef std::map<delay_t, unsigned> DelayFrequency; typedef std::map<int, unsigned> DelayFrequency;
struct Timing struct Timing
{ {
@ -81,8 +81,10 @@ struct Timing
if (crit_path) if (crit_path)
*crit_path = current_path; *crit_path = current_path;
} }
if (slack_histogram) if (slack_histogram) {
(*slack_histogram)[slack]++; int slack_ps = ctx->getDelayNS(slack) * 1000;
(*slack_histogram)[slack_ps]++;
}
} else { } else {
// Default to the path ending here, if no further paths found // Default to the path ending here, if no further paths found
value = slack / path_length; value = slack / path_length;