aboutsummaryrefslogtreecommitdiffstats
path: root/common/placer1.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-12-30 10:53:13 +0100
committerDavid Shah <dave@ds0.me>2019-03-22 10:31:54 +0000
commit9cd5980d35ac7174ce577b89efac7f4d4a5f8ada (patch)
treeb1c5cc23ee9eb9735aabc3b5a076cb50d4688c98 /common/placer1.cc
parentbd0a33022baf78751052e1655557d2e42932504e (diff)
downloadnextpnr-9cd5980d35ac7174ce577b89efac7f4d4a5f8ada.tar.gz
nextpnr-9cd5980d35ac7174ce577b89efac7f4d4a5f8ada.tar.bz2
nextpnr-9cd5980d35ac7174ce577b89efac7f4d4a5f8ada.zip
placer1: Add (currently-unused) option for fanout threshold for timing cost calc
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/placer1.cc')
-rw-r--r--common/placer1.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/placer1.cc b/common/placer1.cc
index 4f9d6a87..b180ebfb 100644
--- a/common/placer1.cc
+++ b/common/placer1.cc
@@ -498,7 +498,7 @@ class SAPlacer
if (other_cell != nullptr)
new_dist += get_constraints_distance(ctx, other_cell);
delta = lambda * (moveChange.timing_delta / std::max<double>(last_timing_cost, epsilon)) +
- (1 - lambda) * (double(moveChange.wirelen_delta) / std::max<double>(last_wirelen_cost, epsilon));
+ (1 - lambda) * (double(moveChange.wirelen_delta) / std::max<double>(last_wirelen_cost, epsilon));
delta += (cfg.constraintWeight / temp) * (new_dist - old_dist) / last_wirelen_cost;
n_move++;
// SA acceptance criterea
@@ -729,7 +729,7 @@ class SAPlacer
if (ignore_net(ni))
continue;
net_bounds[ni->udata] = get_net_bounds(ni);
- if (ctx->timing_driven)
+ if (ctx->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);
}
@@ -806,7 +806,7 @@ class SAPlacer
mc.bounds_changed_nets.push_back(pn->udata);
mc.already_bounds_changed[pn->udata] = true;
}
- if (ctx->timing_driven) {
+ if (ctx->timing_driven && int(pn->users.size()) < cfg.timingFanoutThresh) {
// Output ports - all arcs change timing
if (port.second.type == PORT_OUT) {
int cc;
@@ -913,6 +913,7 @@ Placer1Cfg::Placer1Cfg(Context *ctx) : Settings(ctx)
minBelsForGridPick = get<int>("placer1/minBelsForGridPick", 64);
budgetBased = get<bool>("placer1/budgetBased", false);
startTemp = get<float>("placer1/startTemp", 1);
+ timingFanoutThresh = std::numeric_limits<int>::max();
}
bool placer1(Context *ctx, Placer1Cfg cfg)