diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-15 15:23:51 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-15 15:23:51 +0200 |
commit | 8d5724f4fd8e384ac59b8a94ec6979593239976c (patch) | |
tree | 6af101bd26dc4a28f9210a92daa5aca5fe3b28fb /common/placer1.cc | |
parent | 95280060b869f266beaff023dd63d74905c39ef4 (diff) | |
download | nextpnr-8d5724f4fd8e384ac59b8a94ec6979593239976c.tar.gz nextpnr-8d5724f4fd8e384ac59b8a94ec6979593239976c.tar.bz2 nextpnr-8d5724f4fd8e384ac59b8a94ec6979593239976c.zip |
moved some context variables to settings
Diffstat (limited to 'common/placer1.cc')
-rw-r--r-- | common/placer1.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/placer1.cc b/common/placer1.cc index 89e4f919..a2272b83 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -219,7 +219,7 @@ class SAPlacer if ((placed_cells - constr_placed_cells) % 500 != 0) log_info(" initial placement placed %d/%d cells\n", int(placed_cells - constr_placed_cells), int(autoplaced.size())); - if (cfg.budgetBased && ctx->slack_redist_iter > 0) + if (cfg.budgetBased && ctx->setting<int>("slack_redist_iter") > 0) assign_budget(ctx); ctx->yield(); auto iplace_end = std::chrono::high_resolution_clock::now(); @@ -370,16 +370,16 @@ class SAPlacer ctx->shuffle(autoplaced); // Legalisation is a big change so force a slack redistribution here - if (ctx->slack_redist_iter > 0 && cfg.budgetBased) + if (ctx->setting<int>("slack_redist_iter") > 0 && cfg.budgetBased) assign_budget(ctx, true /* quiet */); } require_legal = false; - } else if (cfg.budgetBased && ctx->slack_redist_iter > 0 && iter % ctx->slack_redist_iter == 0) { + } else if (cfg.budgetBased && ctx->setting<int>("slack_redist_iter") > 0 && iter % ctx->setting<int>("slack_redist_iter") == 0) { assign_budget(ctx, true /* quiet */); } // Invoke timing analysis to obtain criticalities - if (!cfg.budgetBased && ctx->timing_driven) + if (!cfg.budgetBased && ctx->setting<bool>("timing_driven")) get_criticalities(ctx, &net_crit); // Need to rebuild costs after criticalities change setup_costs(); @@ -804,7 +804,7 @@ class SAPlacer if (ignore_net(ni)) continue; net_bounds[ni->udata] = get_net_bounds(ni); - if (ctx->timing_driven && int(ni->users.size()) < cfg.timingFanoutThresh) + if (ctx->setting<bool>("timing_driven") && int(ni->users.size()) < cfg.timingFanoutThresh) for (size_t i = 0; i < ni->users.size(); i++) net_arc_tcost[ni->udata][i] = get_timing_cost(ni, i); } @@ -1021,7 +1021,7 @@ class SAPlacer } } - if (ctx->timing_driven && int(pn->users.size()) < cfg.timingFanoutThresh) { + if (ctx->setting<bool>("timing_driven") && int(pn->users.size()) < cfg.timingFanoutThresh) { // Output ports - all arcs change timing if (port.second.type == PORT_OUT) { int cc; @@ -1061,7 +1061,7 @@ class SAPlacer if (md.already_bounds_changed_x[bc] == MoveChangeData::NO_CHANGE) md.wirelen_delta += md.new_net_bounds[bc].hpwl() - net_bounds[bc].hpwl(); - if (ctx->timing_driven) { + if (ctx->setting<bool>("timing_driven")) { for (const auto &tc : md.changed_arcs) { double old_cost = net_arc_tcost.at(tc.first).at(tc.second); double new_cost = get_timing_cost(net_by_udata.at(tc.first), tc.second); |