diff --git a/doc/src/vpr/command_line_usage.rst b/doc/src/vpr/command_line_usage.rst index fc575e08a13..fa0cd49017b 100644 --- a/doc/src/vpr/command_line_usage.rst +++ b/doc/src/vpr/command_line_usage.rst @@ -1120,6 +1120,14 @@ VPR uses a negotiated congestion algorithm (based on Pathfinder) to perform rout .. seealso:: :ref:`timing_driven_router_options` +.. option:: --flat_routing {on | off} + + If this option is enabled, the *run-flat* router is used instead of the *two-stage* router. + This means that during the routing stage, all nets, both intra- and inter-cluster, are routed directly from one primitive pin to another primitive pin. + This increases routing time but can improve routing quality by re-arranging LUT inputs and exposing additional optimization opportunities in architectures with local intra-cluster routing that is not a full crossbar. + + **Default:** ``OFF` + .. option:: --max_router_iterations The number of iterations of a Pathfinder-based router that will be executed before a circuit is declared unrouteable (if it hasn’t routed successfully yet) at a given channel width. diff --git a/vpr/src/base/read_options.cpp b/vpr/src/base/read_options.cpp index 0764b76f947..b734b82b850 100644 --- a/vpr/src/base/read_options.cpp +++ b/vpr/src/base/read_options.cpp @@ -31,6 +31,7 @@ t_options read_options(int argc, const char** argv) { struct ParseOnOff { ConvertedValue from_str(std::string str) { + std::transform(str.begin(), str.end(), str.begin(), ::tolower); ConvertedValue conv_value; if (str == "on") conv_value.set_value(true); @@ -42,7 +43,6 @@ struct ParseOnOff { conv_value.set_error(msg.str()); } return conv_value; - ; } ConvertedValue to_str(bool val) { @@ -2441,9 +2441,9 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg .default_value("1") .show_in(argparse::ShowIn::HELP_ONLY); - route_grp.add_argument(args.flat_routing, "--flat_routing") + route_grp.add_argument(args.flat_routing, "--flat_routing") .help("Enable VPR's flat routing (routing the nets from the source primitive to the destination primitive)") - .default_value("false") + .default_value("off") .show_in(argparse::ShowIn::HELP_ONLY); route_grp.add_argument(args.has_choking_spot, "--has_choking_spot") diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/config/config.txt index aafaa2a7def..ee25489239f 100644 --- a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/config/config.txt @@ -41,5 +41,5 @@ qor_parse_file=qor_vpr_titan.txt # Pass requirements pass_requirements_file=pass_requirements_vpr_titan.txt -script_params=-starting_stage vpr --route_chan_width 300 --max_router_iterations 400 --router_lookahead map --flat_routing true +script_params=-starting_stage vpr --route_chan_width 300 --max_router_iterations 400 --router_lookahead map --flat_routing on diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_router_lookahead_run_flat/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_router_lookahead_run_flat/config/config.txt index 67c2c9f502a..fa513365115 100644 --- a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_router_lookahead_run_flat/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_router_lookahead_run_flat/config/config.txt @@ -27,4 +27,4 @@ qor_parse_file=qor_rr_graph.txt pass_requirements_file=pass_requirements_verify_rr_graph.txt # Script parameters -script_params = -verify_inter_cluster_router_lookahead -verify_intra_cluster_router_lookahead --route_chan_width 130 --flat_routing true +script_params = -verify_inter_cluster_router_lookahead -verify_intra_cluster_router_lookahead --route_chan_width 130 --flat_routing on diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_rr_graph_run_flat/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_rr_graph_run_flat/config/config.txt index 8200d0b72ba..9a3155eb899 100644 --- a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_rr_graph_run_flat/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_rr_graph_run_flat/config/config.txt @@ -27,4 +27,4 @@ qor_parse_file=qor_rr_graph.txt pass_requirements_file=pass_requirements_verify_rr_graph.txt # Script parameters -script_params = -verify_rr_graph --route_chan_width 130 --flat_routing true +script_params = -verify_rr_graph --route_chan_width 130 --flat_routing on diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_depop_run_flat/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_depop_run_flat/config/config.txt index 01eba58da65..3cf73435272 100755 --- a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_depop_run_flat/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_depop_run_flat/config/config.txt @@ -29,4 +29,4 @@ qor_parse_file=qor_standard.txt pass_requirements_file=pass_requirements.txt #Script parameters -script_params=-track_memory_usage --max_router_iterations 300 --flat_routing true --has_choking_spot true +script_params=-track_memory_usage --max_router_iterations 300 --flat_routing on --has_choking_spot true diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_run_flat/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_run_flat/config/config.txt index be28691892d..43482b7e4a9 100755 --- a/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_run_flat/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_run_flat/config/config.txt @@ -31,4 +31,4 @@ qor_parse_file=qor_large.txt pass_requirements_file=pass_requirements.txt #Script parameters -script_params=-track_memory_usage -max_router_iterations 300 --flat_routing true +script_params=-track_memory_usage -max_router_iterations 300 --flat_routing on diff --git a/vtr_flow/tasks/regression_tests/vtr_reg_strong/strong_flat_router/config/config.txt b/vtr_flow/tasks/regression_tests/vtr_reg_strong/strong_flat_router/config/config.txt index 4e4071f98c2..d59d17d4831 100644 --- a/vtr_flow/tasks/regression_tests/vtr_reg_strong/strong_flat_router/config/config.txt +++ b/vtr_flow/tasks/regression_tests/vtr_reg_strong/strong_flat_router/config/config.txt @@ -24,6 +24,6 @@ qor_parse_file=qor_standard.txt # Pass requirements pass_requirements_file=pass_requirements.txt -script_params_common=-track_memory_usage --route_chan_width 100 --max_router_iterations 100 --router_lookahead map --flat_routing true +script_params_common=-track_memory_usage --route_chan_width 100 --max_router_iterations 100 --router_lookahead map --flat_routing on script_params_list_add = script_params_list_add = --router_algorithm parallel --num_workers 4