Skip to content

Commit f302bdc

Browse files
committed
move lookup update to start_new_cluster... for consistency
1 parent 029fb01 commit f302bdc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

vpr/src/pack/re_cluster.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,6 @@ bool move_mol_to_new_cluster(t_pack_molecule* molecule,
7373
//Commit or revert the move
7474
if (is_created) {
7575
commit_mol_move(old_clb, new_clb, during_packing, true);
76-
// Update the clb-->atoms lookup table
77-
helper_ctx.atoms_lookup.resize(helper_ctx.total_clb_num);
78-
for (int i_atom = 0; i_atom < molecule_size; ++i_atom) {
79-
if (molecule->atom_block_ids[i_atom]) {
80-
helper_ctx.atoms_lookup[new_clb].insert(molecule->atom_block_ids[i_atom]);
81-
}
82-
}
83-
8476
VTR_LOGV(verbosity > 4, "Atom:%zu is moved to a new cluster\n", molecule->atom_block_ids[molecule->root]);
8577
} else {
8678
revert_mol_move(old_clb, molecule, old_router_data, during_packing, clustering_data);

vpr/src/pack/re_cluster_util.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
190190
int molecule_size = get_array_size_of_molecule(molecule);
191191
update_cluster_pb_stats(molecule, molecule_size, clb_index, true);
192192

193+
// Update the clb-->atoms lookup table
194+
helper_ctx.atoms_lookup.resize(helper_ctx.total_clb_num);
195+
for (int i_atom = 0; i_atom < molecule_size; ++i_atom) {
196+
if (molecule->atom_block_ids[i_atom]) {
197+
helper_ctx.atoms_lookup[clb_index].insert(molecule->atom_block_ids[i_atom]);
198+
}
199+
}
200+
193201
//If you are still in packing, update the clustering data. Otherwise, update the clustered netlist.
194202
if (during_packing) {
195203
clustering_data.intra_lb_routing.push_back((*router_data)->saved_lb_nets);

0 commit comments

Comments
 (0)