Skip to content

[Place] Centriod Initial Placement #3018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[vpr][place] if block doens't have any connected block placed, place …
…it close to other connected blocks
  • Loading branch information
amin1377 committed May 7, 2025
commit 3d61bf11e9e70caf991456f9adf3f82bbab22606
13 changes: 12 additions & 1 deletion vpr/src/place/initial_placement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,16 +544,27 @@ static std::vector<ClusterBlockId> find_centroid_loc(const t_pl_macro& pl_macro,
}
}

if (is_io_type(cluster_ctx.clb_nlist.block_type(head_blk)) && acc_weight != 0) {
if (is_io_type(cluster_ctx.clb_nlist.block_type(head_blk))) {
for (const auto& block : cluster_ctx.clb_nlist.blocks()) {
if (is_io_type(cluster_ctx.clb_nlist.block_type(block))) {
if (is_block_placed(block, block_locs)) {
acc_x += block_locs[block].loc.x;
acc_y += block_locs[block].loc.y;
layer_count[block_locs[block].loc.layer]++;
acc_weight++;
}
}
}
} else {
if (acc_weight == 0) {
for (const auto& block : cluster_ctx.clb_nlist.blocks()) {
if (is_block_placed(block, block_locs)) {
acc_x += block_locs[block].loc.x;
acc_y += block_locs[block].loc.y;
layer_count[block_locs[block].loc.layer]++;
acc_weight++;
}
}
}

//Calculate the centroid location
Expand Down
Loading