From a8c110b045744626f882e2a31ed8b3364f9a65db Mon Sep 17 00:00:00 2001 From: Ross Schlaikjer Date: Sun, 30 Aug 2020 17:43:29 -0400 Subject: Add option to print critical path source code In order to make debugging the critical path easier, add an option that will log the location each net was defined, if known. If the file that contains the definition is known, and is readable, also print the part of the source HDL responsible for the signal definition. --- common/command.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common/command.cc') diff --git a/common/command.cc b/common/command.cc index 3dc0d968..d0087fc9 100644 --- a/common/command.cc +++ b/common/command.cc @@ -158,6 +158,10 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("no-tmdriv", "disable timing-driven placement"); general.add_options()("sdf", po::value(), "SDF delay back-annotation file to write"); general.add_options()("sdf-cvc", "enable tweaks for SDF file compatibility with the CVC simulator"); + general.add_options()("print-critical-path-source", + "print the source code associated with each net in the critical path"); + general.add_options()("critical-path-source-max-lines", po::value(), + "max number of source lines to print per critical path report entry"); general.add_options()("placed-svg", po::value(), "write render of placement to SVG file"); general.add_options()("routed-svg", po::value(), "write render of routing to SVG file"); @@ -179,6 +183,13 @@ void CommandHandler::setupContext(Context *ctx) ctx->debug = true; } + if (vm.count("print-critical-path-source")) { + ctx->print_critical_path_source = true; + } + if (vm.count("critical-path-source-max-lines")) { + ctx->critical_path_source_max_lines = vm["critical-path-source-max-lines"].as(); + } + if (vm.count("force")) { ctx->force = true; } -- cgit v1.2.3 From cba4753c22f07173b1992a2dee08cc5a4a3c971e Mon Sep 17 00:00:00 2001 From: Ross Schlaikjer Date: Sun, 30 Aug 2020 18:19:41 -0400 Subject: Only print filenames for now, default on --- common/command.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'common/command.cc') diff --git a/common/command.cc b/common/command.cc index d0087fc9..f0d028ce 100644 --- a/common/command.cc +++ b/common/command.cc @@ -158,10 +158,8 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("no-tmdriv", "disable timing-driven placement"); general.add_options()("sdf", po::value(), "SDF delay back-annotation file to write"); general.add_options()("sdf-cvc", "enable tweaks for SDF file compatibility with the CVC simulator"); - general.add_options()("print-critical-path-source", - "print the source code associated with each net in the critical path"); - general.add_options()("critical-path-source-max-lines", po::value(), - "max number of source lines to print per critical path report entry"); + general.add_options()("no-print-critical-path-source", + "disable printing of the source lines associated with each net in the critical path"); general.add_options()("placed-svg", po::value(), "write render of placement to SVG file"); general.add_options()("routed-svg", po::value(), "write render of routing to SVG file"); @@ -183,11 +181,8 @@ void CommandHandler::setupContext(Context *ctx) ctx->debug = true; } - if (vm.count("print-critical-path-source")) { - ctx->print_critical_path_source = true; - } - if (vm.count("critical-path-source-max-lines")) { - ctx->critical_path_source_max_lines = vm["critical-path-source-max-lines"].as(); + if (vm.count("no-print-critical-path-source")) { + ctx->disable_critical_path_source_print = true; } if (vm.count("force")) { -- cgit v1.2.3