Skip to content

Commit 3d0373c

Browse files
author
Muhammad Haris Zafar
committed
Adding comments for each refactored api
1 parent 2c70dc8 commit 3d0373c

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

vpr/src/device/rr_graph_builder.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,32 @@ class RRGraphBuilder {
6969
node_storage_.set_node_coordinates(id, x1, y1, x2, y2);
7070
}
7171

72-
inline void set_node_track_num(RRNodeId id, short new_track_num) {
73-
node_storage_.set_node_track_num(id, new_track_num);
72+
/** @brief Set the node_ptc_num; The ptc (pin, track, or class) number is an integer
73+
* that allows you to differentiate between wires, pins or sources/sinks with overlapping x,y coordinates or extent.
74+
* This is useful for drawing rr-graphs nicely.
75+
*
76+
* The ptc_num carries different meanings for different node types
77+
* (true in VPR RRG that is currently supported, may not be true in customized RRG)
78+
* CHANX or CHANY: the track id in routing channels
79+
* OPIN or IPIN: the index of pins in the logic block data structure
80+
* SOURCE and SINK: the class id of a pin (indicating logic equivalence of pins) in the logic block data structure */
81+
inline void set_node_ptc_num(RRNodeId id, short new_ptc_num) {
82+
node_storage_.set_node_ptc_num(id, new_ptc_num);
7483
}
7584

85+
/** @brief set_node_pin_num() is designed for logic blocks, which are IPIN and OPIN nodes */
7686
inline void set_node_pin_num(RRNodeId id, short new_pin_num) {
7787
node_storage_.set_node_pin_num(id, new_pin_num);
7888
}
7989

80-
inline void set_node_class_num(RRNodeId id, short new_class_num) {
81-
node_storage_.set_node_class_num(id, new_class_num);
90+
/** @brief set_node_track_num() is designed for routing tracks, which are CHANX and CHANY nodes */
91+
inline void set_node_track_num(RRNodeId id, short new_track_num) {
92+
node_storage_.set_node_track_num(id, new_track_num);
8293
}
8394

84-
inline void set_node_ptc_num(RRNodeId id, short new_ptc_num) {
85-
node_storage_.set_node_ptc_num(id, new_ptc_num);
95+
/** @brief set_ node_class_num() is designed for routing source and sinks, which are SOURCE and SINK nodes */
96+
inline void set_node_class_num(RRNodeId id, short new_class_num) {
97+
node_storage_.set_node_class_num(id, new_class_num);
8698
}
8799

88100
/** @brief Set the node direction; The node direction is only available of routing channel nodes, such as x-direction routing tracks (CHANX) and y-direction routing tracks (CHANY). For other nodes types, this value is not meaningful and should be set to NONE. */

0 commit comments

Comments
 (0)