Skip to content

Commit dd026a5

Browse files
committed
[VPR] Add comments about creating high-level APIs to shadow mirror_nodes()
1 parent 0d96487 commit dd026a5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

vpr/src/device/rr_spatial_lookup.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,27 @@ class RRSpatialLookup {
9999
* Considering a bounding box (x, y)->(x + width, y + height) of a multi-height and multi-width grid,
100100
* SOURCE and SINK nodes are indexable in any location inside the boundry.
101101
*
102+
* An example of usage:
103+
*
104+
* // Create a empty lookup
105+
* RRSpatialLookup rr_lookup;
106+
* // Adding other nodes ...
107+
* // Copy the nodes whose types are SOURCE at (1, 1) to (1, 2)
108+
* rr_lookup.mirror_nodes(vtr::Point<int>(1, 1),
109+
* vtr::Point<int>(1, 2),
110+
* SOURCE,
111+
* TOP);
112+
*
102113
* Note: currently this function only accepts SOURCE/SINK nodes. May unlock for the other types
103114
* depending on needs
115+
*
116+
* TODO: Consider to make a high-level API to duplicate the nodes for large blocks.
117+
* Then this API can become a private one
118+
* For example,
119+
* expand_nodes(source_coordinate, bounding_box_coordinate, type, side);
120+
* Alternatively, we can rework the ``find_node()`` API so that we always search the lowest (x,y)
121+
* corner when dealing with large blocks. But this may require the data structure to be dependent
122+
* on DeviceGrid information (it needs to identify if a grid has height > 1 as well as width > 1)
104123
*/
105124
void mirror_nodes(const vtr::Point<int>& src_coord,
106125
const vtr::Point<int>& des_coord,

0 commit comments

Comments
 (0)