Skip to content

Commit a3a6b16

Browse files
authored
[core] hotfix on corner case where the IPIN may not exist in direct connections (#3319)
1 parent 0502b83 commit a3a6b16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_gsb.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,10 @@ void build_direct_connections_for_one_gsb(const RRGraphView& rr_graph,
17611761

17621762
/* directs[i].sub_tile_offset is added to from_capacity(z) to get the target_capacity */
17631763
int to_subtile_cap = z + directs[i].sub_tile_offset;
1764+
/* If the destination subtile is out of range, there is no qualified IPINs */
1765+
if (to_subtile_cap < 0 || to_subtile_cap >= to_grid_type->capacity) {
1766+
continue;
1767+
}
17641768
/* Iterate over all sub_tiles to get the sub_tile which the target_cap belongs to. */
17651769
const t_sub_tile* to_sub_tile = nullptr;
17661770
for (const t_sub_tile& sub_tile : to_grid_type->sub_tiles) {

0 commit comments

Comments
 (0)