Skip to content

Commit b0d7723

Browse files
committed
[vpr][place] skip the block if it is seen before when adding the connection between io blocks
1 parent 518f4a9 commit b0d7723

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

vpr/src/place/initial_placement.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ static std::vector<ClusterBlockId> find_centroid_loc(const t_pl_macro& pl_macro,
473473
}
474474
std::vector<ClusterBlockId> connected_blocks_to_update;
475475
std::unordered_set<ClusterBlockId> seen_blocks;
476+
seen_blocks.insert(head_blk);
476477

477478
//iterate over the from block pins
478479
for (ClusterPinId pin_id : cluster_ctx.clb_nlist.block_pins(head_blk)) {
@@ -541,13 +542,10 @@ static std::vector<ClusterBlockId> find_centroid_loc(const t_pl_macro& pl_macro,
541542

542543
if (is_io_type(cluster_ctx.clb_nlist.block_type(head_blk)) && acc_weight != 0) {
543544
for (const auto& block : cluster_ctx.clb_nlist.blocks()) {
544-
if (seen_blocks.find(block) == seen_blocks.end()) {
545-
continue;
546-
}
547-
if (block == head_blk) {
548-
continue;
549-
}
550545
if (is_io_type(cluster_ctx.clb_nlist.block_type(block))) {
546+
if (seen_blocks.find(block) != seen_blocks.end()) {
547+
continue;
548+
}
551549
if (is_block_placed(block, block_locs)) {
552550
acc_x += block_locs[block].loc.x;
553551
acc_y += block_locs[block].loc.y;

0 commit comments

Comments
 (0)