Skip to content

Commit 39edfb4

Browse files
committed
Merge branch 'fix_rr_graph_direct_link' of https://github.com/verilog-to-routing/vtr-verilog-to-routing into flat_routing
2 parents 06d896f + 91d39f5 commit 39edfb4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

vpr/src/route/rr_graph.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,12 +3444,20 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
34443444
}
34453445
}
34463446

3447-
int target_sub_tile = z + directs[i].sub_tile_offset;
3448-
if (relative_ipin >= target_type->sub_tiles[target_sub_tile].num_phy_pins) continue;
3447+
int target_cap = z + directs[i].sub_tile_offset;
3448+
const t_sub_tile* target_sub_tile = nullptr;
3449+
for (const auto& sub_tile : target_type->sub_tiles) {
3450+
if (sub_tile.capacity.is_in_range(target_cap)) {
3451+
target_sub_tile = &sub_tile;
3452+
break;
3453+
}
3454+
}
3455+
VTR_ASSERT(target_sub_tile != nullptr);
3456+
if (relative_ipin >= target_sub_tile->num_phy_pins) continue;
34493457

34503458
//If this block has capacity > 1 then the pins of z position > 0 are offset
34513459
//by the number of pins per capacity instance
3452-
int ipin = get_physical_pin_from_capacity_location(target_type, relative_ipin, target_sub_tile);
3460+
int ipin = get_physical_pin_from_capacity_location(target_type, relative_ipin, target_cap);
34533461

34543462
/* Add new ipin edge to list of edges */
34553463
std::vector<RRNodeId> inodes;

0 commit comments

Comments
 (0)