Skip to content

Commit cabf2ea

Browse files
Update vpr_utils.cpp
1 parent 70e4f5a commit cabf2ea

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

vpr/src/util/vpr_utils.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,6 +2279,26 @@ bool is_inter_cluster_node(t_physical_tile_type_ptr physical_tile,
22792279
}
22802280
}
22812281

2282+
bool is_inter_cluster_node(const RRGraphView& rr_graph_view,
2283+
RRNodeId node_id) {
2284+
auto node_type = rr_graph_view.node_type(node_id);
2285+
if (node_type == CHANX || node_type == CHANY) {
2286+
return true;
2287+
} else {
2288+
int x_low = rr_graph_view.node_xlow(node_id);
2289+
int y_low = rr_graph_view.node_ylow(node_id);
2290+
int layer = rr_graph_view.node_layer(node_id);
2291+
int node_ptc = rr_graph_view.node_ptc_num(node_id);
2292+
const t_physical_tile_type_ptr physical_tile = g_vpr_ctx.device().grid.get_physical_type({x_low, y_low, layer});
2293+
if (node_type == IPIN || node_type == OPIN) {
2294+
return is_pin_on_tile(physical_tile, node_ptc);
2295+
} else {
2296+
VTR_ASSERT_DEBUG(node_type == SINK || node_type == SOURCE);
2297+
return is_class_on_tile(physical_tile, node_ptc);
2298+
}
2299+
}
2300+
}
2301+
22822302
int get_rr_node_max_ptc(const RRGraphView& rr_graph_view,
22832303
RRNodeId node_id,
22842304
bool is_flat) {

0 commit comments

Comments
 (0)