command: Allow debug output for just placer or router
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
466de95312
commit
b3b79122e1
@ -106,6 +106,9 @@ po::options_description CommandHandler::getGeneralOptions()
|
||||
general.add_options()("log,l", po::value<std::string>(),
|
||||
"log file, all log messages are written to this file regardless of -q");
|
||||
general.add_options()("debug", "debug output");
|
||||
general.add_options()("debug-placer", "debug output from placer only");
|
||||
general.add_options()("debug-router", "debug output from router only");
|
||||
|
||||
general.add_options()("force,f", "keep running after errors");
|
||||
#ifndef NO_GUI
|
||||
general.add_options()("gui", "start gui");
|
||||
@ -374,8 +377,12 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
|
||||
|
||||
if (do_place) {
|
||||
run_script_hook("pre-place");
|
||||
bool saved_debug = ctx->debug;
|
||||
if (vm.count("debug-placer"))
|
||||
ctx->debug = true;
|
||||
if (!ctx->place() && !ctx->force)
|
||||
log_error("Placing design failed.\n");
|
||||
ctx->debug = saved_debug;
|
||||
ctx->check();
|
||||
if (vm.count("placed-svg"))
|
||||
ctx->writeSVG(vm["placed-svg"].as<std::string>(), "scale=50 hide_routing");
|
||||
@ -383,8 +390,12 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
|
||||
|
||||
if (do_route) {
|
||||
run_script_hook("pre-route");
|
||||
bool saved_debug = ctx->debug;
|
||||
if (vm.count("debug-router"))
|
||||
ctx->debug = true;
|
||||
if (!ctx->route() && !ctx->force)
|
||||
log_error("Routing design failed.\n");
|
||||
ctx->debug = saved_debug;
|
||||
run_script_hook("post-route");
|
||||
if (vm.count("routed-svg"))
|
||||
ctx->writeSVG(vm["routed-svg"].as<std::string>(), "scale=500");
|
||||
|
Loading…
Reference in New Issue
Block a user