Skip to content

Flat Routing Online Document #2450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 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,13 @@ 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.

**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