Skip to content

Commit fe5cad8

Browse files
committed
[Router] Added Code Comments and Documentation for Connection Routers
Added Doxygen-style code comments and documentation for connection routers, including the ConnectionRouter abstract class, the Parallel- ConnectionRouter concrete class, and the SerialConnectionRouter concrete class. Updated the helper messages for command-line options added for parallel connection router.
1 parent c9e1819 commit fe5cad8

10 files changed

+690
-340
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
==========
2+
Connection Router
3+
==========
4+
5+
ConnectionRouter
6+
---------
7+
.. doxygenfile:: connection_router.h
8+
:project: vpr
9+
10+
SerialConnectionRouter
11+
----------
12+
.. doxygenclass:: SerialConnectionRouter
13+
:project: vpr
14+
15+
ParallelConnectionRouter
16+
----------
17+
.. doxygenclass:: ParallelConnectionRouter
18+
:project: vpr

doc/src/api/vprinternals/vpr_router.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ VPR Router
99

1010
router_heap
1111
router_lookahead
12+
router_connection_router

vpr/src/base/read_options.cpp

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,32 +2660,62 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
26602660
.show_in(argparse::ShowIn::HELP_ONLY);
26612661

26622662
route_timing_grp.add_argument<bool, ParseOnOff>(args.enable_parallel_connection_router, "--enable_parallel_connection_router")
2663-
.help("TODO")
2663+
.help(
2664+
"Controls whether the parallel connection router is used during a single connection routing."
2665+
" When enabled, the parallel connection router accelerates the path search for individual"
2666+
" source-sink connections using multi-threading without altering the net routing order.")
26642667
.default_value("off")
26652668
.show_in(argparse::ShowIn::HELP_ONLY);
26662669

26672670
route_timing_grp.add_argument(args.post_target_prune_fac, "--post_target_prune_fac")
2668-
.help("TODO")
2671+
.help(
2672+
"Controls the post-target pruning heuristic calculation in the parallel connection router."
2673+
" This parameter is used as a multiplicative factor applied to the VPR heuristic"
2674+
" (not guaranteed to be admissible, i.e., might over-predict the cost to the sink)"
2675+
" to calculate the 'stopping heuristic' when pruning nodes after the target has been"
2676+
" reached. The 'stopping heuristic' must be admissible for the path search algorithm"
2677+
" to guarantee optimal paths and be deterministic. Values of this parameter are"
2678+
" architecture-specific and have to be empirically found."
2679+
" This parameter has no effect if --enable_parallel_connection_router is not set.")
26692680
.default_value("1.2")
26702681
.show_in(argparse::ShowIn::HELP_ONLY);
26712682

26722683
route_timing_grp.add_argument(args.post_target_prune_offset, "--post_target_prune_offset")
2673-
.help("TODO")
2684+
.help(
2685+
"Controls the post-target pruning heuristic calculation in the parallel connection router."
2686+
" This parameter is used as a subtractive offset together with --post_target_prune_fac"
2687+
" to apply an affine transformation on the VPR heuristic to calculate the 'stopping"
2688+
" heuristic'. The 'stopping heuristic' must be admissible for the path search"
2689+
" algorithm to guarantee optimal paths and be deterministic. Values of this"
2690+
" parameter are architecture-specific and have to be empirically found."
2691+
" This parameter has no effect if --enable_parallel_connection_router is not set."
26742692
.default_value("0.0")
26752693
.show_in(argparse::ShowIn::HELP_ONLY);
26762694

26772695
route_timing_grp.add_argument<int>(args.multi_queue_num_threads, "--multi_queue_num_threads")
2678-
.help("TODO")
2696+
.help(
2697+
"Controls the number of threads used by MultiQueue-based parallel connection router."
2698+
" If not explicitly specified, defaults to 1, implying the parallel connection router"
2699+
" works in 'serial' mode using only one main thread to route."
2700+
" This parameter has no effect if --enable_parallel_connection_router is not set.")
26792701
.default_value("1")
26802702
.show_in(argparse::ShowIn::HELP_ONLY);
26812703

26822704
route_timing_grp.add_argument<int>(args.multi_queue_num_queues, "--multi_queue_num_queues")
2683-
.help("TODO")
2705+
.help(
2706+
"Controls the number of queues used by MultiQueue in the parallel connection router."
2707+
" Must be set >= 2. A common configuration for this parameter is the number of threads"
2708+
" used by MultiQueue * 4 (the number of queues per thread)."
2709+
" This parameter has no effect if --enable_parallel_connection_router is not set.")
26842710
.default_value("2")
26852711
.show_in(argparse::ShowIn::HELP_ONLY);
26862712

26872713
route_timing_grp.add_argument<bool, ParseOnOff>(args.multi_queue_direct_draining, "--multi_queue_direct_draining")
2688-
.help("TODO")
2714+
.help(
2715+
"Controls whether to enable queue draining optimization for MultiQueue-based parallel connection"
2716+
" router. When enabled, queues can be emptied quickly by draining all elements if no further"
2717+
" solutions need to be explored in the path search to guarantee optimality or determinism after"
2718+
" reaching the target. This parameter has no effect if --enable_parallel_connection_router is not set.")
26892719
.default_value("off")
26902720
.show_in(argparse::ShowIn::HELP_ONLY);
26912721

0 commit comments

Comments
 (0)