aboutsummaryrefslogtreecommitdiffstats
path: root/common/kernel/command.cc
diff options
context:
space:
mode:
authormyrtle <gatecat@ds0.me>2022-12-21 07:10:09 +0000
committerGitHub <noreply@github.com>2022-12-21 07:10:09 +0000
commita80d63b26810e2e5dab8d3d626f9b3052f734c95 (patch)
treedce6d0396f6da46f4b5c39a1533c6d3d6415c549 /common/kernel/command.cc
parentb101f0092cea6f4195307ebcd693286872ed8288 (diff)
parentbe1f700b0b3099dd7762bf8cbe23ecca4b77fe5b (diff)
downloadnextpnr-a80d63b26810e2e5dab8d3d626f9b3052f734c95.tar.gz
nextpnr-a80d63b26810e2e5dab8d3d626f9b3052f734c95.tar.bz2
nextpnr-a80d63b26810e2e5dab8d3d626f9b3052f734c95.zip
Merge pull request #1066 from arjenroodselaar/place_timeout
Timeout when legal placement can't be found for cell
Diffstat (limited to 'common/kernel/command.cc')
-rw-r--r--common/kernel/command.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/kernel/command.cc b/common/kernel/command.cc
index c548509f..65aa0299 100644
--- a/common/kernel/command.cc
+++ b/common/kernel/command.cc
@@ -189,6 +189,8 @@ po::options_description CommandHandler::getGeneralOptions()
general.add_options()("placer-heap-critexp", po::value<int>(),
"placer heap criticality exponent (int, default: 2)");
general.add_options()("placer-heap-timingweight", po::value<int>(), "placer heap timing weight (int, default: 10)");
+ general.add_options()("placer-heap-cell-placement-timeout", po::value<int>(),
+ "allow placer to attempt up to max(10000, total cells^2 / N) iterations to place a cell (int N, default: 8, 0 for no timeout)");
#if !defined(__wasm)
general.add_options()("parallel-refine", "use new experimental parallelised engine for placement refinement");
@@ -328,6 +330,10 @@ void CommandHandler::setupContext(Context *ctx)
if (vm.count("placer-heap-timingweight"))
ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(vm["placer-heap-timingweight"].as<int>());
+ if (vm.count("placer-heap-cell-placement-timeout"))
+ ctx->settings[ctx->id("placerHeap/cellPlacementTimeout")] =
+ std::to_string(std::max(0, vm["placer-heap-cell-placement-timeout"].as<int>()));
+
if (vm.count("parallel-refine"))
ctx->settings[ctx->id("placerHeap/parallelRefine")] = true;