From d2ff5fec0812b149c5938fcc388b8efa033f40e6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 19 Jun 2018 12:49:40 +0200 Subject: Add rng to Context, start using ctx->verbose Signed-off-by: Clifford Wolf --- ice40/main.cc | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'ice40') 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()); + } + if (vm.count("svg")) { std::cout << "\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(); - 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); } } -- cgit v1.2.3