diff options
Diffstat (limited to 'common/command.cc')
-rw-r--r-- | common/command.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/command.cc b/common/command.cc index 7f276193..c175cd27 100644 --- a/common/command.cc +++ b/common/command.cc @@ -173,6 +173,9 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("router2-heatmap", po::value<std::string>(), "prefix for router2 resource congestion heatmaps"); + general.add_options()("report", po::value<std::string>(), + "write timing and utilization report in JSON format to file"); + general.add_options()("placed-svg", po::value<std::string>(), "write render of placement to SVG file"); general.add_options()("routed-svg", po::value<std::string>(), "write render of routing to SVG file"); @@ -424,6 +427,14 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx) ctx->writeSDF(f, vm.count("sdf-cvc")); } + if (vm.count("report")) { + std::string filename = vm["report"].as<std::string>(); + std::ofstream f(filename); + if (!f) + log_error("Failed to open report file '%s' for writing.\n", filename.c_str()); + ctx->writeReport(f); + } + #ifndef NO_PYTHON deinit_python(); #endif |