aboutsummaryrefslogtreecommitdiffstats
path: root/common/place
diff options
context:
space:
mode:
authorArjen Roodselaar <arjen@oxide.computer>2022-12-20 13:10:37 -0800
committerArjen Roodselaar <arjen@oxide.computer>2022-12-20 13:10:37 -0800
commitbe1f700b0b3099dd7762bf8cbe23ecca4b77fe5b (patch)
treef7417121130cac5fd44671a440a4dbaf2fb6e9ea /common/place
parent923458a2c90ee295cf6502a83ca6182d1d281f48 (diff)
downloadnextpnr-be1f700b0b3099dd7762bf8cbe23ecca4b77fe5b.tar.gz
nextpnr-be1f700b0b3099dd7762bf8cbe23ecca4b77fe5b.tar.bz2
nextpnr-be1f700b0b3099dd7762bf8cbe23ecca4b77fe5b.zip
Set divisor instead of absolute value
Diffstat (limited to 'common/place')
-rw-r--r--common/place/placer_heap.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/common/place/placer_heap.cc b/common/place/placer_heap.cc
index ae04118b..781a7646 100644
--- a/common/place/placer_heap.cc
+++ b/common/place/placer_heap.cc
@@ -1817,10 +1817,15 @@ PlacerHeapCfg::PlacerHeapCfg(Context *ctx)
timing_driven = ctx->setting<bool>("timing_driven");
solverTolerance = 1e-5;
placeAllAtOnce = false;
- cell_placement_timeout = ctx->setting<int>("placerHeap/cellPlacementTimeout",
- // Set a conservative default. This is a rather large number and could probably
- // be shaved down, but for now it will keep the process from running indefinite.
- std::max(10000, (int(ctx->cells.size()) * int(ctx->cells.size()) / 8) + 1));
+
+ int timeout_divisor = ctx->setting<int>("placerHeap/cellPlacementTimeout", 8);
+ if (timeout_divisor > 0) {
+ // Set a conservative default. This is a rather large number and could probably
+ // be shaved down, but for now it will keep the process from running indefinite.
+ cell_placement_timeout = std::max(10000, (int(ctx->cells.size()) * int(ctx->cells.size()) / timeout_divisor));
+ } else {
+ cell_placement_timeout = 0;
+ }
hpwl_scale_x = 1;
hpwl_scale_y = 1;