Skip to content

Commit 6587aed

Browse files
committed
comments are updated
1 parent 3a91f65 commit 6587aed

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

vpr/src/base/vpr_context.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,6 @@ struct DeviceContext : public Context {
169169
* for client functions: GUI, placer, router, timing analyzer etc.
170170
*/
171171
RRGraphView rr_graph{rr_nodes, rr_graph_builder.node_lookup(), rr_indexed_data, rr_graph_builder.rr_segments(), rr_graph_builder.rr_switch()};
172-
173-
///@brief Autogenerated in build_rr_graph based on switch fan-in. [0..(num_rr_switches-1)]
174-
//vtr::vector<RRSwitchId, t_rr_switch_inf> rr_switch_inf;
175-
176-
///@brief Wire segment types in RR graph
177-
//vtr::vector<RRSegmentId, t_segment_inf> rr_segments;
178-
179172
int num_arch_switches;
180173
t_arch_switch_inf* arch_switch_inf; // [0..(num_arch_switches-1)]
181174

vpr/src/device/rr_graph_builder.h

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class RRGraphBuilder {
4141
/** @brief Return a writable object for update the fast look-up of rr_node */
4242
RRSpatialLookup& node_lookup();
4343

44-
/** @brief Add a rr_segment to the routing resource graph. Return an valid id if successful.*/
44+
/** @brief Add a rr_segment to the routing resource graph. Return an valid id if successful.
45+
* - Each rr_segment contains the detailed information of a routing track, which is denoted by a node in CHANX or CHANY type.
46+
* - It is frequently used by client functions in timing and routability prediction.
47+
*/
4548
inline RRSegmentId add_rr_segment(const t_segment_inf& segment_info) {
4649
//Allocate an ID
4750
RRSegmentId segment_id = RRSegmentId(segment_ids_.size());
@@ -51,12 +54,17 @@ class RRGraphBuilder {
5154

5255
return segment_id;
5356
}
54-
/** @brief Return a writable list of all the rr_segments */
57+
/** TODO @brief Return a writable list of all the rr_segments
58+
* .. warning:: It is not recommended to use this API unless you have to. The API may be deprecated later, and future APIs will designed to return a specific data from the rr_segments.
59+
*/
5560
inline vtr::vector<RRSegmentId, t_segment_inf>& rr_segments() {
5661
return rr_segments_;
5762
}
5863

59-
/** @brief Add a rr_swtich_inf to the routing resource graph. Return an valid id if successful.*/
64+
/** @brief Add a rr_switch to the routing resource graph. Return an valid id if successful.
65+
* - Each rr_switch contains the detailed information of a routing switch interconnecting two routing resource nodes.
66+
* - It is frequently used by client functions in timing prediction.
67+
*/
6068
inline RRSwitchId add_rr_switch(const t_rr_switch_inf& switch_info) {
6169
//Allocate an ID
6270
RRSwitchId switch_id = RRSwitchId(switch_ids_.size());
@@ -66,7 +74,9 @@ class RRGraphBuilder {
6674

6775
return switch_id;
6876
}
69-
/** @brief Return a writable list of all the rr_switch_inf */
77+
/** TODO @brief Return a writable list of all the rr_switches
78+
* .. warning:: It is not recommended to use this API unless you have to. The API may be deprecated later, and future APIs will designed to return a specific data from the rr_switches.
79+
*/
7080
inline vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch() {
7181
return rr_switch_inf_;
7282
}
@@ -280,17 +290,16 @@ class RRGraphBuilder {
280290
/* Fast look-up for rr nodes */
281291
RRSpatialLookup node_lookup_;
282292

283-
/* Segment relatex data
284-
* Segment info should be corrected annotated for each rr_node
285-
* whose type is CHANX and CHANY
293+
/** Wire segment types in RR graph
294+
* - Each rr_segment contains the detailed information of a routing track, which is denoted by a node in CHANX or CHANY type.
295+
* - We use a fly-weight data structure here, in the same philosophy as the rr_indexed_data. See detailed explanation in the t_segment_inf data structure
286296
*/
287297
vtr::vector<RRSegmentId, t_segment_inf> rr_segments_; /* detailed information about the segments, which are used in the RRGraph */
288298
vtr::vector<RRSegmentId, RRSegmentId> segment_ids_; /* unique identifiers for routing segments which are used in the RRGraph */
289-
/* Switch related data
290-
* Note that so far there has been no need to remove
291-
* switches, so no such facility exists
299+
/* Autogenerated in build_rr_graph based on switch fan-in.
300+
* - Each rr_switch contains the detailed information of a routing switch interconnecting two routing resource nodes.
301+
* - We use a fly-weight data structure here, in the same philosophy as the rr_indexed_data. See detailed explanation in the t_rr_switch_inf data structure
292302
*/
293-
/* Unique identifiers for switches which are used in the RRGraph */
294303
vtr::vector<RRSwitchId, RRSwitchId> switch_ids_;
295304
/* Detailed information about the switches, which are used in the RRGraph */
296305
vtr::vector<RRSwitchId, t_rr_switch_inf> rr_switch_inf_;

0 commit comments

Comments
 (0)