timing_opt: Reduce iterations to 30, tidy up logging

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2018-12-06 11:00:16 +00:00
parent 56dfd5564a
commit b732e42fa3
2 changed files with 13 additions and 18 deletions

View File

@ -83,27 +83,22 @@ class TimingOptimiser
bool optimise() bool optimise()
{ {
log_info("Running timing-driven placement optimisation...\n"); log_info("Running timing-driven placement optimisation...\n");
#if 1 if (ctx->verbose)
timing_analysis(ctx, false, true, false, false); timing_analysis(ctx, false, true, false, false);
#endif for (int i = 0; i < 30; i++) {
for (int i = 0; i < 100; i++) {
log_info(" Iteration %d...\n", i); log_info(" Iteration %d...\n", i);
get_criticalities(ctx, &net_crit); get_criticalities(ctx, &net_crit);
setup_delay_limits(); setup_delay_limits();
auto crit_paths = find_crit_paths(0.98, 50000); auto crit_paths = find_crit_paths(0.98, 50000);
for (auto &path : crit_paths) for (auto &path : crit_paths)
optimise_path(path); optimise_path(path);
#if 1 if (ctx->verbose)
timing_analysis(ctx, false, true, false, false); timing_analysis(ctx, false, true, false, false);
#endif
} }
return true; return true;
} }
private: private:
// Ratio of available to already-candidates to begin borrowing
const float borrow_thresh = 0.2;
void setup_delay_limits() void setup_delay_limits()
{ {
max_net_delay.clear(); max_net_delay.clear();
@ -475,7 +470,8 @@ class TimingOptimiser
if (ctx->debug) { if (ctx->debug) {
for (auto cell : path_cells) { for (auto cell : path_cells) {
log_info("Candidate neighbours for %s (%s):\n", cell.c_str(ctx), ctx->getBelName(ctx->cells[cell]->bel).c_str(ctx)); log_info("Candidate neighbours for %s (%s):\n", cell.c_str(ctx),
ctx->getBelName(ctx->cells[cell]->bel).c_str(ctx));
for (auto neigh : cell_neighbour_bels.at(cell)) { for (auto neigh : cell_neighbour_bels.at(cell)) {
log_info(" %s\n", ctx->getBelName(neigh).c_str(ctx)); log_info(" %s\n", ctx->getBelName(neigh).c_str(ctx));
} }
@ -593,8 +589,8 @@ class TimingOptimiser
route_to_solution.push_back(cursor); route_to_solution.push_back(cursor);
} }
if (ctx->debug) if (ctx->debug)
log_info("Found a solution with cost %.02f ns (existing path %.02f ns)\n", ctx->getDelayNS(lowest->second), log_info("Found a solution with cost %.02f ns (existing path %.02f ns)\n",
ctx->getDelayNS(original_delay)); ctx->getDelayNS(lowest->second), ctx->getDelayNS(original_delay));
for (auto rt_entry : boost::adaptors::reverse(route_to_solution)) { for (auto rt_entry : boost::adaptors::reverse(route_to_solution)) {
CellInfo *cell = ctx->cells.at(rt_entry.first).get(); CellInfo *cell = ctx->cells.at(rt_entry.first).get();
cell_swap_bel(cell, rt_entry.second); cell_swap_bel(cell, rt_entry.second);

View File

@ -638,7 +638,6 @@ bool Arch::place()
} else { } else {
return true; return true;
} }
} }
bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); } bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }