aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch.cc6
-rw-r--r--ice40/arch.h3
-rw-r--r--ice40/main.cc6
3 files changed, 14 insertions, 1 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index eff1d9b9..84856402 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -659,7 +659,11 @@ delay_t Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, de
// -----------------------------------------------------------------------
-bool Arch::place() { return placer1(getCtx()); }
+bool Arch::place() {
+ Placer1Cfg cfg;
+ cfg.constraintWeight = placer_constraintWeight;
+ return placer1(getCtx(), cfg);
+}
bool Arch::route()
{
diff --git a/ice40/arch.h b/ice40/arch.h
index 98361132..b9b4f3c5 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -797,6 +797,9 @@ struct Arch : BaseCtx
}
NPNR_ASSERT_FALSE("Expected PLL pin to share an output with an SB_IO D_IN_{0,1}");
}
+
+ float placer_constraintWeight = 10;
+
};
NEXTPNR_NAMESPACE_END
diff --git a/ice40/main.cc b/ice40/main.cc
index 41d264ad..60f5b444 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -106,6 +106,8 @@ int main(int argc, char *argv[])
options.add_options()("seed", po::value<int>(), "seed value for random number generator");
options.add_options()("slack_redist_iter", po::value<int>(),
"number of iterations between slack redistribution");
+ options.add_options()("cstrweight", po::value<float>(), "placer weighting for relative constraint satisfaction");
+
options.add_options()("version,V", "show version");
options.add_options()("tmfuzz", "run path delay estimate fuzzer");
options.add_options()("test", "check architecture database integrity");
@@ -318,6 +320,10 @@ int main(int argc, char *argv[])
ctx->slack_redist_iter = vm["slack_redist_iter"].as<int>();
}
+ if (vm.count("cstrweight")) {
+ ctx->placer_constraintWeight = vm["cstrweight"].as<float>();
+ }
+
if (vm.count("svg")) {
std::cout << "<svg xmlns=\"http://www.w3.org/2000/svg\" "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";