aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorEddie Hung <e.hung@imperial.ac.uk>2018-07-26 21:35:37 -0700
committerEddie Hung <e.hung@imperial.ac.uk>2018-07-26 21:35:37 -0700
commit21d46fb633383909609a9f8adbb543ae6e7ed70c (patch)
tree46488e8d5b07803cd14624af84b6cc549b9b11ee /common/timing.cc
parent5622dc04448cadf6ea162b7d54e3d26301b2b05b (diff)
downloadnextpnr-21d46fb633383909609a9f8adbb543ae6e7ed70c.tar.gz
nextpnr-21d46fb633383909609a9f8adbb543ae6e7ed70c.tar.bz2
nextpnr-21d46fb633383909609a9f8adbb543ae6e7ed70c.zip
Move target_freq update after budget update
Diffstat (limited to 'common/timing.cc')
-rw-r--r--common/timing.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/timing.cc b/common/timing.cc
index 5534b1c8..7f28ef75 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -175,17 +175,8 @@ void assign_budget(Context *ctx)
void update_budget(Context *ctx)
{
UpdateMap updates;
- delay_t default_slack = delay_t(1.0e12 / ctx->target_freq);
delay_t min_slack = compute_min_slack(ctx, &updates, nullptr);
- // If user has not specified a frequency, adjust the frequency dynamically:
- if (!ctx->user_freq) {
- ctx->target_freq = 1e12 / (default_slack - min_slack);
- if (ctx->verbose)
- log_info("minimum slack for this update = %d, target Fmax for next update = %.2f MHz\n", min_slack,
- ctx->target_freq / 1e6);
- }
-
// Update the budgets
for (auto &net : ctx->nets) {
for (size_t i = 0; i < net.second->users.size(); ++i) {
@@ -211,6 +202,15 @@ void update_budget(Context *ctx)
}
}
}
+
+ // If user has not specified a frequency, adjust the frequency dynamically:
+ if (!ctx->user_freq) {
+ delay_t default_slack = delay_t(1.0e12 / ctx->target_freq);
+ ctx->target_freq = 1e12 / (default_slack - min_slack);
+ if (ctx->verbose)
+ log_info("minimum slack for this update = %d, target Fmax for next update = %.2f MHz\n", min_slack,
+ ctx->target_freq / 1e6);
+ }
}
void compute_fmax(Context *ctx, bool print_fmax, bool print_path)