From b783c5459edfa2a5b85256b95eb75c41d5328575 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 24 Oct 2025 22:04:58 -0700 Subject: [PATCH] [core] hotfix on corner case where the IPIN may not exist in direct connections --- .../tileable_rr_graph/tileable_rr_graph_gsb.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_gsb.cpp b/vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_gsb.cpp index ba3ed6e57f..8b5305b51e 100644 --- a/vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_gsb.cpp +++ b/vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_gsb.cpp @@ -1761,6 +1761,10 @@ void build_direct_connections_for_one_gsb(const RRGraphView& rr_graph, /* directs[i].sub_tile_offset is added to from_capacity(z) to get the target_capacity */ int to_subtile_cap = z + directs[i].sub_tile_offset; + /* If the destination subtile is out of range, there is no qualified IPINs */ + if (to_subtile_cap < 0 || to_subtile_cap >= to_grid_type->capacity) { + continue; + } /* Iterate over all sub_tiles to get the sub_tile which the target_cap belongs to. */ const t_sub_tile* to_sub_tile = nullptr; for (const t_sub_tile& sub_tile : to_grid_type->sub_tiles) {