Skip to content

Commit 0f394fc

Browse files
consider CHANZ in RRSpatialLookup::find_channel_nodes()
1 parent b4dd148 commit 0f394fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libs/librrgraph/src/base/rr_spatial_lookup.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ std::vector<RRNodeId> RRSpatialLookup::find_channel_nodes(int layer,
149149
int x,
150150
int y,
151151
e_rr_type type) const {
152-
/* Pre-check: node type should be routing tracks! */
153-
if (type != e_rr_type::CHANX && type != e_rr_type::CHANY) {
154-
return std::vector<RRNodeId>();
152+
// Pre-check: node type should be routing tracks.
153+
if (type != e_rr_type::CHANX && type != e_rr_type::CHANY && type != e_rr_type::CHANZ) {
154+
return {};
155155
}
156156

157157
return find_nodes(layer, x, y, type);
@@ -167,7 +167,7 @@ std::vector<RRNodeId> RRSpatialLookup::find_nodes_at_all_sides(int layer,
167167
/* TODO: Consider to access the raw data like find_node() rather than calling find_node() many times, which hurts runtime */
168168
if (rr_type == e_rr_type::IPIN || rr_type == e_rr_type::OPIN) {
169169
indices.reserve(NUM_2D_SIDES);
170-
//For pins, we need to look at all the sides of the current grid tile
170+
// For pins, we need to look at all the sides of the current grid tile
171171
for (e_side side : TOTAL_2D_SIDES) {
172172
RRNodeId rr_node_index = find_node(layer, x, y, rr_type, ptc, side);
173173
if (rr_node_index) {
@@ -176,7 +176,7 @@ std::vector<RRNodeId> RRSpatialLookup::find_nodes_at_all_sides(int layer,
176176
}
177177
indices.shrink_to_fit();
178178
} else {
179-
//Sides do not affect non-pins so there should only be one per ptc
179+
// Sides do not affect non-pins so there should only be one per ptc
180180
RRNodeId rr_node_index = find_node(layer, x, y, rr_type, ptc);
181181
if (rr_node_index) {
182182
indices.push_back(rr_node_index);

0 commit comments

Comments
 (0)