Skip to content

Commit 6b95998

Browse files
doxygen comments for functions in rr_graph_switch_utils
1 parent c1c2c14 commit 6b95998

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

vpr/src/route/rr_graph_generation/rr_graph_switch_utils.h

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ struct t_arch_switch_inf;
88
struct t_rr_switch_inf;
99
class RRGraphBuilder;
1010

11-
// Sets the spec for the rr_switch based on the arch switch
11+
/**
12+
* @brief Initialize one rr_switch entry from an architecture switch.
13+
*
14+
* Copies electrical parameters from the architecture switch at @p arch_switch_idx,
15+
* resolving fanin-dependent delay and buffer sizing into a concrete rr_switch entry.
16+
*
17+
* @param rr_graph_builder RR graph builder providing access to rr_switch storage.
18+
* @param arch_sw_inf Map of architecture switch indices to their definitions.
19+
* @param arch_switch_idx Index of the source architecture switch.
20+
* @param rr_switch_idx Index of the destination rr_switch to fill.
21+
* @param fanin Fan-in used to evaluate delay (e.g., Tdel(fanin)).
22+
* @param R_minW_nmos Reference R for a minimum-width nMOS (for AUTO buf sizing).
23+
* @param R_minW_pmos Reference R for a minimum-width pMOS (for AUTO buf sizing).
24+
*/
1225
void load_rr_switch_from_arch_switch(RRGraphBuilder& rr_graph_builder,
1326
const std::map<int, t_arch_switch_inf>& arch_sw_inf,
1427
int arch_switch_idx,
@@ -17,10 +30,29 @@ void load_rr_switch_from_arch_switch(RRGraphBuilder& rr_graph_builder,
1730
const float R_minW_nmos,
1831
const float R_minW_pmos);
1932

33+
/// @brief Create a fully-specified rr_switch from a single architecture switch.
34+
/// @return A populated rr_switch descriptor.
2035
t_rr_switch_inf create_rr_switch_from_arch_switch(const t_arch_switch_inf& arch_sw_inf,
2136
const float R_minW_nmos,
2237
const float R_minW_pmos);
2338

39+
40+
/**
41+
* @brief Allocate and populate rr_switch entries for all fan-ins used in the RR graph.
42+
*
43+
* Expands each architecture switch into one or more rr_switches keyed by observed
44+
* fan-ins; updates RR nodes to reference rr_switch indices; and provides a mapping
45+
* from (arch_switch, fanin) --> rr_switch. Also returns a representative IPIN
46+
* connection-block switch index.
47+
*
48+
* @param rr_graph_builder RR graph builder providing storage and remapping.
49+
* @param switch_fanin_remap Output: for each arch switch, maps fanin --> rr_switch index.
50+
* @param arch_sw_inf Map of architecture switch indices to their definitions.
51+
* @param R_minW_nmos Reference R for a minimum-width nMOS (for AUTO buf sizing).
52+
* @param R_minW_pmos Reference R for a minimum-width pMOS (for AUTO buf sizing).
53+
* @param wire_to_arch_ipin_switch Architecture index of the IPIN connection-block switch.
54+
* @param wire_to_rr_ipin_switch Output: rr_switch index of the representative IPIN cblock switch.
55+
*/
2456
void alloc_and_load_rr_switch_inf(RRGraphBuilder& rr_graph_builder,
2557
std::vector<std::map<int, int>>& switch_fanin_remap,
2658
const std::map<int, t_arch_switch_inf>& arch_sw_inf,

0 commit comments

Comments
 (0)