Skip to content

Commit

Permalink
Merge pull request verilog-to-routing#2450 from verilog-to-routing/fl…
Browse files Browse the repository at this point in the history
…at_router_doc

Flat Routing Online Document
  • Loading branch information
vaughnbetz committed Dec 2, 2023
2 parents ed4a43a + c54c4d3 commit 6e34cdf
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions doc/src/vpr/command_line_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <int>
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.
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ t_options read_options(int argc, const char** argv) {

struct ParseOnOff {
ConvertedValue<bool> from_str(std::string str) {
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
ConvertedValue<bool> conv_value;
if (str == "on")
conv_value.set_value(true);
Expand All @@ -42,7 +43,6 @@ struct ParseOnOff {
conv_value.set_error(msg.str());
}
return conv_value;
;
}

ConvertedValue<std::string> to_str(bool val) {
Expand Down Expand Up @@ -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<bool, ParseOnOff>(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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6e34cdf

Please sign in to comment.