Skip to content

Commit 78afdc2

Browse files
add find_pin_nodes_at_side() to RRSpatialLookup
1 parent ea14ba1 commit 78afdc2

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

libs/librrgraph/src/base/rr_spatial_lookup.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,18 @@ std::vector<RRNodeId> RRSpatialLookup::find_grid_nodes_at_all_sides(int layer,
210210
return nodes;
211211
}
212212

213+
std::vector<RRNodeId> RRSpatialLookup::find_pin_nodes_at_side(int layer,
214+
int x,
215+
int y,
216+
e_rr_type pin_type,
217+
e_side side) const {
218+
VTR_ASSERT(pin_type == e_rr_type::OPIN || pin_type == e_rr_type::IPIN);
219+
220+
std::vector<RRNodeId> nodes = find_nodes(layer,x, y, pin_type, side);
221+
return nodes;
222+
223+
}
224+
213225
void RRSpatialLookup::reserve_nodes(int layer,
214226
int x,
215227
int y,

libs/librrgraph/src/base/rr_spatial_lookup.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ class RRSpatialLookup {
139139
int y,
140140
e_rr_type rr_type) const;
141141

142+
143+
std::vector<RRNodeId> find_pin_nodes_at_side(int layer,
144+
int x,
145+
int y,
146+
e_rr_type pin_type,
147+
e_side side) const;
148+
142149
/* -- Mutators -- */
143150
public:
144151
/** @brief Reserve the memory for a list of nodes at (layer, x, y) location with given type and side */

0 commit comments

Comments
 (0)