aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)