Skip to content

Commit a235e5c

Browse files
committed
[vpr][utils] add comment for get_atom_pin_rr_node_id
1 parent aaa7845 commit a235e5c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

vpr/src/util/vpr_utils.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,15 @@ RRNodeId get_atom_pin_rr_node_id(const AtomPinId& atom_pin_id) {
17261726
auto& place_ctx = g_vpr_ctx.placement();
17271727
auto& device_ctx = g_vpr_ctx.device();
17281728

1729+
/*
1730+
* To get the RRNodeId for an atom pin, we need to:
1731+
* 1. Find the atom block that the pin belongs to
1732+
* 2. Find the cluster block that the atom block is a part of
1733+
* 3. Find the physical tile that the cluster block is located on
1734+
* 4. Find the physical pin number of the atom pin (corresponds to ptc number of the RR node)
1735+
* 5. Call get_pin_rr_node_id to get the RRNodeId for the pin
1736+
*/
1737+
17291738
AtomBlockId atom_blk_id = atom_nlist.pin_block(atom_pin_id);
17301739
ClusterBlockId clb_blk_id = atom_lookup.atom_clb(atom_blk_id);
17311740

vpr/src/util/vpr_utils.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ RRNodeId get_pin_rr_node_id(const RRSpatialLookup& rr_spatial_lookup,
248248
const int root_j,
249249
int pin_physical_num);
250250

251+
/**
252+
* @brief Returns the RR node ID for the given atom pin ID.
253+
* **Warning**: This function should be called only if flat-router is enabled,
254+
* since, otherwise, the routing resources inside clusters are not added to the RR graph.
255+
* @param atom_pin_id The atom pin ID.
256+
*/
251257
RRNodeId get_atom_pin_rr_node_id(const AtomPinId& atom_pin_id);
252258

253259
RRNodeId get_class_rr_node_id(const RRSpatialLookup& rr_spatial_lookup,

0 commit comments

Comments
 (0)