diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-02 09:13:19 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-02 09:13:19 +0200 |
commit | 5c47b6034efd3898b666a18dd81cf4ae633a18c1 (patch) | |
tree | f5a4e55efc5f8a73192a7484bb2b30a7dc9d9a80 /common/command.cc | |
parent | eff1a1341a14c105ecf3bd8c559bf425915c3e01 (diff) | |
download | nextpnr-5c47b6034efd3898b666a18dd81cf4ae633a18c1.tar.gz nextpnr-5c47b6034efd3898b666a18dd81cf4ae633a18c1.tar.bz2 nextpnr-5c47b6034efd3898b666a18dd81cf4ae633a18c1.zip |
added no-place and no-route options
Diffstat (limited to 'common/command.cc')
-rw-r--r-- | common/command.cc | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/common/command.cc b/common/command.cc index e7ffef93..dc83f84d 100644 --- a/common/command.cc +++ b/common/command.cc @@ -137,6 +137,8 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("placer-budgets", "use budget rather than criticality in placer timing weights"); general.add_options()("pack-only", "pack design only without placement or routing"); + general.add_options()("no-route", "process design without routing"); + general.add_options()("no-place", "process design without placement"); general.add_options()("ignore-loops", "ignore combinational loops in timing analysis"); @@ -282,25 +284,33 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx) execute_python_file(filename.c_str()); } else #endif - if (vm.count("json") || vm.count("load")) { - run_script_hook("pre-pack"); - if (!ctx->pack() && !ctx->force) - log_error("Packing design failed.\n"); - assign_budget(ctx.get()); - ctx->check(); - print_utilisation(ctx.get()); - run_script_hook("pre-place"); - - if (!vm.count("pack-only")) { + if (vm.count("json") || vm.count("load")) { + bool do_pack = true; + bool do_place = vm.count("pack-only")==0 && vm.count("no-place")==0; + bool do_route = vm.count("pack-only")==0 && vm.count("no-route")==0; + + if (do_pack) { + run_script_hook("pre-pack"); + if (!ctx->pack() && !ctx->force) + log_error("Packing design failed.\n"); + assign_budget(ctx.get()); + ctx->check(); + print_utilisation(ctx.get()); + } + + if (do_place) { + run_script_hook("pre-place"); if (!ctx->place() && !ctx->force) log_error("Placing design failed.\n"); ctx->check(); - run_script_hook("pre-route"); + } + if (do_route) { + run_script_hook("pre-route"); if (!ctx->route() && !ctx->force) log_error("Routing design failed.\n"); + run_script_hook("post-route"); } - run_script_hook("post-route"); customBitstream(ctx.get()); } |