Move target_freq update after budget update
This commit is contained in:
parent
5622dc0444
commit
21d46fb633
@ -175,17 +175,8 @@ void assign_budget(Context *ctx)
|
|||||||
void update_budget(Context *ctx)
|
void update_budget(Context *ctx)
|
||||||
{
|
{
|
||||||
UpdateMap updates;
|
UpdateMap updates;
|
||||||
delay_t default_slack = delay_t(1.0e12 / ctx->target_freq);
|
|
||||||
delay_t min_slack = compute_min_slack(ctx, &updates, nullptr);
|
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
|
// Update the budgets
|
||||||
for (auto &net : ctx->nets) {
|
for (auto &net : ctx->nets) {
|
||||||
for (size_t i = 0; i < net.second->users.size(); ++i) {
|
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)
|
void compute_fmax(Context *ctx, bool print_fmax, bool print_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user