Merge branch 'assign_budget_evenly' into assign_budget_speedup
Conflicts: common/timing.cc
This commit is contained in:
commit
665202e936
@ -138,6 +138,7 @@ class SAPlacer
|
|||||||
if ((placed_cells - constr_placed_cells) % 500 != 0)
|
if ((placed_cells - constr_placed_cells) % 500 != 0)
|
||||||
log_info(" initial placement placed %d/%d cells\n", int(placed_cells - constr_placed_cells),
|
log_info(" initial placement placed %d/%d cells\n", int(placed_cells - constr_placed_cells),
|
||||||
int(autoplaced.size()));
|
int(autoplaced.size()));
|
||||||
|
if (ctx->slack_redist_iter > 0)
|
||||||
assign_budget(ctx);
|
assign_budget(ctx);
|
||||||
ctx->yield();
|
ctx->yield();
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ typedef std::map<int, unsigned> DelayFrequency;
|
|||||||
struct Timing
|
struct Timing
|
||||||
{
|
{
|
||||||
Context *ctx;
|
Context *ctx;
|
||||||
|
bool net_delays;
|
||||||
bool update;
|
bool update;
|
||||||
delay_t min_slack;
|
delay_t min_slack;
|
||||||
PortRefVector current_path;
|
PortRefVector current_path;
|
||||||
@ -47,9 +48,10 @@ struct Timing
|
|||||||
delay_t min_remaining_budget;
|
delay_t min_remaining_budget;
|
||||||
};
|
};
|
||||||
|
|
||||||
Timing(Context *ctx, bool update, PortRefVector *crit_path = nullptr, DelayFrequency *slack_histogram = nullptr)
|
Timing(Context *ctx, bool net_delays, bool update, PortRefVector *crit_path = nullptr,
|
||||||
: ctx(ctx), update(update), min_slack(1.0e12 / ctx->target_freq), crit_path(crit_path),
|
DelayFrequency *slack_histogram = nullptr)
|
||||||
slack_histogram(slack_histogram)
|
: ctx(ctx), net_delays(net_delays), update(update), min_slack(1.0e12 / ctx->target_freq),
|
||||||
|
crit_path(crit_path), slack_histogram(slack_histogram)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ struct Timing
|
|||||||
net_budget = budget;
|
net_budget = budget;
|
||||||
pl = std::max(1, path_length);
|
pl = std::max(1, path_length);
|
||||||
}
|
}
|
||||||
auto delay = ctx->getNetinfoRouteDelay(net, usr);
|
auto delay = net_delays ? ctx->getNetinfoRouteDelay(net, usr) : delay_t();
|
||||||
net_budget = std::min(net_budget, follow_user_port(usr, pl, slack - delay));
|
net_budget = std::min(net_budget, follow_user_port(usr, pl, slack - delay));
|
||||||
if (update)
|
if (update)
|
||||||
usr.budget = std::min(usr.budget, delay + net_budget);
|
usr.budget = std::min(usr.budget, delay + net_budget);
|
||||||
@ -311,7 +313,7 @@ void assign_budget(Context *ctx, bool quiet)
|
|||||||
log_info("Annotating ports with timing budgets for target frequency %.2f MHz\n", ctx->target_freq / 1e6);
|
log_info("Annotating ports with timing budgets for target frequency %.2f MHz\n", ctx->target_freq / 1e6);
|
||||||
}
|
}
|
||||||
|
|
||||||
Timing timing(ctx, true /* update */);
|
Timing timing(ctx, ctx->slack_redist_iter > 0 /* net_delays */, true /* update */);
|
||||||
timing.assign_budget();
|
timing.assign_budget();
|
||||||
|
|
||||||
if (!quiet || ctx->verbose) {
|
if (!quiet || ctx->verbose) {
|
||||||
@ -353,7 +355,7 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_path)
|
|||||||
PortRefVector crit_path;
|
PortRefVector crit_path;
|
||||||
DelayFrequency slack_histogram;
|
DelayFrequency slack_histogram;
|
||||||
|
|
||||||
Timing timing(ctx, false /* update */, print_path ? &crit_path : nullptr,
|
Timing timing(ctx, true /* net_delays */, false /* update */, print_path ? &crit_path : nullptr,
|
||||||
print_histogram ? &slack_histogram : nullptr);
|
print_histogram ? &slack_histogram : nullptr);
|
||||||
auto min_slack = timing.walk_paths();
|
auto min_slack = timing.walk_paths();
|
||||||
|
|
||||||
|
@ -366,6 +366,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!ctx->pack() && !ctx->force)
|
if (!ctx->pack() && !ctx->force)
|
||||||
log_error("Packing design failed.\n");
|
log_error("Packing design failed.\n");
|
||||||
|
assign_budget(ctx.get());
|
||||||
ctx->check();
|
ctx->check();
|
||||||
print_utilisation(ctx.get());
|
print_utilisation(ctx.get());
|
||||||
if (!vm.count("pack-only")) {
|
if (!vm.count("pack-only")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user