diff options
author | David Shah <dave@ds0.me> | 2018-12-05 12:31:35 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2018-12-06 10:53:01 +0000 |
commit | 56dfd5564a2581bcb04a927cfc3161acae662064 (patch) | |
tree | 39c2a4a04d79e5ba0a8105e8d581e82e41b35b4a | |
parent | 2b84b33cd697a1dfa46ed4bc231644177add2b83 (diff) | |
download | nextpnr-56dfd5564a2581bcb04a927cfc3161acae662064.tar.gz nextpnr-56dfd5564a2581bcb04a927cfc3161acae662064.tar.bz2 nextpnr-56dfd5564a2581bcb04a927cfc3161acae662064.zip |
timing: Fix xclock crit calc and compiler warnings
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | common/timing.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/common/timing.cc b/common/timing.cc index 6965307d..b15327fb 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -96,8 +96,8 @@ struct Timing delay_t min_slack; CriticalPathMap *crit_path; DelayFrequency *slack_histogram; - IdString async_clock; NetCriticalityMap *net_crit; + IdString async_clock; struct TimingData { @@ -472,8 +472,6 @@ struct Timing continue; if (startdomain.first.clock == async_clock) continue; - const delay_t net_length_plus_one = nd.max_path_length + 1; - auto &net_min_remaining_budget = nd.min_remaining_budget; if (nd.min_required.empty()) nd.min_required.resize(net->users.size(), std::numeric_limits<delay_t>::max()); delay_t net_min_required = std::numeric_limits<delay_t>::max(); @@ -584,7 +582,7 @@ struct Timing worst_slack.at(startdomain.first) = std::min(worst_slack.at(startdomain.first), slack); else worst_slack[startdomain.first] = slack; - nc.slack.at(i) = std::min(nc.slack.at(i), slack); + nc.slack.at(i) = slack; } if (ctx->debug) log_break(); @@ -610,10 +608,10 @@ struct Timing delay_t dmax = crit_path->at(ClockPair{startdomain.first, startdomain.first}).path_delay; for (size_t i = 0; i < net->users.size(); i++) { float criticality = 1.0f - (float(nc.slack.at(i) - worst_slack.at(startdomain.first)) / dmax); - nc.criticality.at(i) = std::max(nc.criticality.at(i), criticality); + nc.criticality.at(i) = criticality; } - nc.max_path_length = std::max(nc.max_path_length, nd.max_path_length); - nc.cd_worst_slack = std::min(nc.cd_worst_slack, worst_slack.at(startdomain.first)); + nc.max_path_length = nd.max_path_length; + nc.cd_worst_slack = worst_slack.at(startdomain.first); } } #if 0 |