aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/timing.cc34
1 files changed, 19 insertions, 15 deletions
diff --git a/common/timing.cc b/common/timing.cc
index f720b772..e0ddd2aa 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -143,18 +143,6 @@ void assign_budget(Context *ctx)
UpdateMap updates;
delay_t min_slack = compute_min_slack(ctx, &updates, nullptr);
- // If user has not specified a frequency, adjust the target frequency dynamically
- // TODO(eddieh): Tune these factors
- if (!ctx->user_freq) {
- if (min_slack < 0)
- ctx->target_freq = 1e12 / (default_slack - 0.95 * min_slack);
- else
- ctx->target_freq = 1e12 / (default_slack - 1.2 * min_slack);
- if (ctx->verbose)
- log_info("minimum slack for this assign = %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) {
@@ -180,6 +168,18 @@ void assign_budget(Context *ctx)
}
}
+ // If user has not specified a frequency, adjust the target frequency dynamically
+ // TODO(eddieh): Tune these factors
+ if (!ctx->user_freq) {
+ if (min_slack < 0)
+ ctx->target_freq = 1e12 / (default_slack - 0.95 * min_slack);
+ else
+ ctx->target_freq = 1e12 / (default_slack - 1.2 * min_slack);
+ if (ctx->verbose)
+ log_info("minimum slack for this assign = %d, target Fmax for next update = %.2f MHz\n", min_slack,
+ ctx->target_freq / 1e6);
+ }
+
log_info("Checksum: 0x%08x\n", ctx->checksum());
}
@@ -215,12 +215,16 @@ void update_budget(Context *ctx)
}
}
- // If user has not specified a frequency, adjust the frequency dynamically:
+ // If user has not specified a frequency, adjust the target frequency dynamically
+ // TODO(eddieh): Tune these factors
if (!ctx->user_freq) {
delay_t default_slack = delay_t(1.0e12 / ctx->target_freq);
- ctx->target_freq = 1e12 / (default_slack - min_slack);
+ if (min_slack < 0)
+ ctx->target_freq = 1e12 / (default_slack - 0.95 * min_slack);
+ else
+ ctx->target_freq = 1e12 / (default_slack - 1.2 * min_slack);
if (ctx->verbose)
- log_info("minimum slack for this update = %d, target Fmax for next update = %.2f MHz\n", min_slack,
+ log_info("minimum slack for this assign = %d, target Fmax for next update = %.2f MHz\n", min_slack,
ctx->target_freq / 1e6);
}
}