aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-19 12:49:40 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-19 12:49:40 +0200
commitd2ff5fec0812b149c5938fcc388b8efa033f40e6 (patch)
tree3c7c77aa2808357023bef33de5347a4d6c63fa69 /ice40/main.cc
parent8067ed9af0742f552ae19fb2d8ac3755511c4998 (diff)
downloadnextpnr-d2ff5fec0812b149c5938fcc388b8efa033f40e6.tar.gz
nextpnr-d2ff5fec0812b149c5938fcc388b8efa033f40e6.tar.bz2
nextpnr-d2ff5fec0812b149c5938fcc388b8efa033f40e6.zip
Add rng to Context, start using ctx->verbose
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc24
1 files changed, 10 insertions, 14 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index 4fb5ea24..0ea3dc98 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -61,7 +61,6 @@ int main(int argc, char *argv[])
{
namespace po = boost::program_options;
int rc = 0;
- bool verbose = false;
std::string str;
log_files.push_back(stdout);
@@ -130,10 +129,6 @@ int main(int argc, char *argv[])
return 1;
}
- if (vm.count("verbose")) {
- verbose = true;
- }
-
ArchArgs chipArgs;
if (vm.count("lp384")) {
@@ -197,6 +192,14 @@ int main(int argc, char *argv[])
init_python(argv[0]);
python_export_global("ctx", ctx);
+ if (vm.count("verbose")) {
+ ctx.verbose = true;
+ }
+
+ if (vm.count("seed")) {
+ ctx.rngseed(vm["seed"].as<int>());
+ }
+
if (vm.count("svg")) {
std::cout << "<svg xmlns=\"http://www.w3.org/2000/svg\" "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";
@@ -225,16 +228,9 @@ int main(int argc, char *argv[])
pack_design(&ctx);
print_utilisation(&ctx);
- 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(&ctx, seed);
- route_design(&ctx, verbose);
+ place_design_sa(&ctx);
+ route_design(&ctx);
}
}