Skip to content

Commit 6e34cdf

Browse files
authored
Merge pull request #2450 from verilog-to-routing/flat_router_doc
Flat Routing Online Document
2 parents ed4a43a + c54c4d3 commit 6e34cdf

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
lines changed

doc/src/vpr/command_line_usage.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,14 @@ VPR uses a negotiated congestion algorithm (based on Pathfinder) to perform rout
11201120

11211121
.. seealso:: :ref:`timing_driven_router_options`
11221122

1123+
.. option:: --flat_routing {on | off}
1124+
1125+
If this option is enabled, the *run-flat* router is used instead of the *two-stage* router.
1126+
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.
1127+
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.
1128+
1129+
**Default:** ``OFF`
1130+
11231131
.. option:: --max_router_iterations <int>
11241132
11251133
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.

vpr/src/base/read_options.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ t_options read_options(int argc, const char** argv) {
3131

3232
struct ParseOnOff {
3333
ConvertedValue<bool> from_str(std::string str) {
34+
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
3435
ConvertedValue<bool> conv_value;
3536
if (str == "on")
3637
conv_value.set_value(true);
@@ -42,7 +43,6 @@ struct ParseOnOff {
4243
conv_value.set_error(msg.str());
4344
}
4445
return conv_value;
45-
;
4646
}
4747

4848
ConvertedValue<std::string> to_str(bool val) {
@@ -2441,9 +2441,9 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
24412441
.default_value("1")
24422442
.show_in(argparse::ShowIn::HELP_ONLY);
24432443

2444-
route_grp.add_argument(args.flat_routing, "--flat_routing")
2444+
route_grp.add_argument<bool, ParseOnOff>(args.flat_routing, "--flat_routing")
24452445
.help("Enable VPR's flat routing (routing the nets from the source primitive to the destination primitive)")
2446-
.default_value("false")
2446+
.default_value("off")
24472447
.show_in(argparse::ShowIn::HELP_ONLY);
24482448

24492449
route_grp.add_argument(args.has_choking_spot, "--has_choking_spot")

vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ qor_parse_file=qor_vpr_titan.txt
4141
# Pass requirements
4242
pass_requirements_file=pass_requirements_vpr_titan.txt
4343

44-
script_params=-starting_stage vpr --route_chan_width 300 --max_router_iterations 400 --router_lookahead map --flat_routing true
44+
script_params=-starting_stage vpr --route_chan_width 300 --max_router_iterations 400 --router_lookahead map --flat_routing on
4545

vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_router_lookahead_run_flat/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ qor_parse_file=qor_rr_graph.txt
2727
pass_requirements_file=pass_requirements_verify_rr_graph.txt
2828

2929
# Script parameters
30-
script_params = -verify_inter_cluster_router_lookahead -verify_intra_cluster_router_lookahead --route_chan_width 130 --flat_routing true
30+
script_params = -verify_inter_cluster_router_lookahead -verify_intra_cluster_router_lookahead --route_chan_width 130 --flat_routing on

vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/verify_rr_graph_run_flat/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ qor_parse_file=qor_rr_graph.txt
2727
pass_requirements_file=pass_requirements_verify_rr_graph.txt
2828

2929
# Script parameters
30-
script_params = -verify_rr_graph --route_chan_width 130 --flat_routing true
30+
script_params = -verify_rr_graph --route_chan_width 130 --flat_routing on

vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_depop_run_flat/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ qor_parse_file=qor_standard.txt
2929
pass_requirements_file=pass_requirements.txt
3030

3131
#Script parameters
32-
script_params=-track_memory_usage --max_router_iterations 300 --flat_routing true --has_choking_spot true
32+
script_params=-track_memory_usage --max_router_iterations 300 --flat_routing on --has_choking_spot true

vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/vtr_reg_qor_large_run_flat/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ qor_parse_file=qor_large.txt
3131
pass_requirements_file=pass_requirements.txt
3232

3333
#Script parameters
34-
script_params=-track_memory_usage -max_router_iterations 300 --flat_routing true
34+
script_params=-track_memory_usage -max_router_iterations 300 --flat_routing on

vtr_flow/tasks/regression_tests/vtr_reg_strong/strong_flat_router/config/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ qor_parse_file=qor_standard.txt
2424
# Pass requirements
2525
pass_requirements_file=pass_requirements.txt
2626

27-
script_params_common=-track_memory_usage --route_chan_width 100 --max_router_iterations 100 --router_lookahead map --flat_routing true
27+
script_params_common=-track_memory_usage --route_chan_width 100 --max_router_iterations 100 --router_lookahead map --flat_routing on
2828
script_params_list_add =
2929
script_params_list_add = --router_algorithm parallel --num_workers 4

0 commit comments

Comments
 (0)