File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -2962,12 +2962,24 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
2962
2962
}
2963
2963
}
2964
2964
2965
- int target_sub_tile = z + directs[i].sub_tile_offset ;
2966
- if (relative_ipin >= target_type->sub_tiles [target_sub_tile].num_phy_pins ) continue ;
2965
+ // directs[i].sub_tile_offset is added to from_capacity(z) to get the
2966
+ // target_capacity
2967
+ int target_cap = z + directs[i].sub_tile_offset ;
2968
+
2969
+ // Iterate over all sub_tiles to get the sub_tile which the target_cap belongs to.
2970
+ const t_sub_tile* target_sub_tile = nullptr ;
2971
+ for (const auto & sub_tile : target_type->sub_tiles ) {
2972
+ if (sub_tile.capacity .is_in_range (target_cap)) {
2973
+ target_sub_tile = &sub_tile;
2974
+ break ;
2975
+ }
2976
+ }
2977
+ VTR_ASSERT (target_sub_tile != nullptr );
2978
+ if (relative_ipin >= target_sub_tile->num_phy_pins ) continue ;
2967
2979
2968
2980
// If this block has capacity > 1 then the pins of z position > 0 are offset
2969
2981
// by the number of pins per capacity instance
2970
- int ipin = get_physical_pin_from_capacity_location (target_type, relative_ipin, target_sub_tile );
2982
+ int ipin = get_physical_pin_from_capacity_location (target_type, relative_ipin, target_cap );
2971
2983
2972
2984
/* Add new ipin edge to list of edges */
2973
2985
std::vector<RRNodeId> inodes;
You can’t perform that action at this time.
0 commit comments