Skip to content

Commit e02b3d2

Browse files
committed
[VPR] Use standard API to get the number of pins per block in a subtile
1 parent 0aca71d commit e02b3d2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

vpr/src/util/vpr_utils.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,17 +2354,14 @@ int get_post_placement_physical_pin(t_physical_tile_type_ptr physical_tile,
23542354
/* Find the relative capacity of the logical_block in this sub tile */
23552355
int relative_capacity = sub_tile_capacity - physical_tile->sub_tiles[sub_tile_index].capacity.low;
23562356

2357-
/* Find the maximum number of pins among all the logical blocks in the equivalent site list
2358-
* of the sub tile. Otherwise, the current logical block may have smaller number of pins
2357+
/* Find the number of pins per block in the equivalent site list
2358+
* of the sub tile. Otherwise, the current logical block may have smaller/larger number of pins
23592359
* than other logical blocks that can be placed in the sub-tile. This will lead to an error
23602360
* when computing the pin index!
23612361
*/
2362-
int max_logical_block_num_pins = logical_block->pb_type->num_pins;
2363-
for (t_logical_block_type_ptr eq_lb : physical_tile->sub_tiles[sub_tile_index].equivalent_sites) {
2364-
max_logical_block_num_pins = std::max(max_logical_block_num_pins, eq_lb->pb_type->num_pins);
2365-
}
2362+
int block_num_pins = physical_tile->sub_tiles[sub_tile_index].num_phy_pins / physical_tile->sub_tiles[sub_tile_index].capacity.total();
23662363

2367-
return relative_capacity * max_logical_block_num_pins
2364+
return relative_capacity * block_num_pins
23682365
+ physical_tile->sub_tiles[sub_tile_index].sub_tile_to_tile_pin_indices[sub_tile_physical_pin];
23692366
}
23702367

0 commit comments

Comments
 (0)