aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-17 16:14:58 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-17 16:14:58 +0200
commit4fe8ba5e9ae9e3676ff1276473854dd667794b5c (patch)
tree4e3368abd94bb4f9bf4c7e91bb06d47d13122fe5 /ice40/main.cc
parent105cde328bb228cbba37cbd730dc60a206d5a219 (diff)
parentf66999a8830c5829872b93ce15491de1673cb4e3 (diff)
downloadnextpnr-4fe8ba5e9ae9e3676ff1276473854dd667794b5c.tar.gz
nextpnr-4fe8ba5e9ae9e3676ff1276473854dd667794b5c.tar.bz2
nextpnr-4fe8ba5e9ae9e3676ff1276473854dd667794b5c.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into chipdbng
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index eb92d92f..c43bffa7 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -82,6 +82,8 @@ int main(int argc, char *argv[])
"PCF constraints file to ingest");
options.add_options()("asc", po::value<std::string>(),
"asc bitstream file to write");
+ options.add_options()("seed", po::value<int>(),
+ "seed value for random number generator");
options.add_options()("version,V", "show version");
options.add_options()("lp384", "set device type to iCE40LP384");
options.add_options()("lp1k", "set device type to iCE40LP1K");
@@ -223,8 +225,16 @@ int main(int argc, char *argv[])
pack_design(&design);
print_utilisation(&design);
+
+ int seed = 1;
+ if (vm.count("seed")) {
+ seed = vm["seed"].as<int>();
+ if (seed == 0)
+ log_error("seed must be non-zero value");
+ }
+
if (!vm.count("pack-only")) {
- place_design_sa(&design);
+ place_design_sa(&design, seed);
route_design(&design, verbose);
}
}