Skip to content

Commit 0a9608e

Browse files
Remove atom_clb and atom_net global context mutation from packer
1 parent 5090124 commit 0a9608e

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

vpr/src/pack/pack.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,8 @@ bool try_pack(const t_packer_opts& packer_opts,
250250
VPR_FATAL_ERROR(VPR_ERROR_OTHER, "Failed to find device which satisfies resource requirements required: %s (available %s)", resource_reqs.c_str(), resource_avail.c_str());
251251
}
252252

253-
//Reset clustering for re-packing
254-
for (auto net : g_vpr_ctx.atom().netlist().nets()) {
255-
g_vpr_ctx.mutable_atom().mutable_lookup().remove_atom_net(net);
256-
}
253+
//Reset floorplanning constraints for re-packing
257254
g_vpr_ctx.mutable_floorplanning().cluster_constraints.clear();
258-
//attraction_groups.reset_attraction_groups();
259255

260256
// Reset the cluster legalizer for re-clustering.
261257
cluster_legalizer.reset();

vpr/src/util/vpr_utils.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ int num_ext_inputs_atom_block(AtomBlockId blk_id) {
13661366

13671367
/**
13681368
* @brief Free pb and remove its lookup data.
1369-
* CLB lookup data is removed from the global context
1369+
* CLB lookup data is *not* removed from the global context
13701370
* and PB to Atom bimap data is removed from atom_pb_bimap
13711371
*
13721372
* @param pb
@@ -1411,11 +1411,8 @@ void free_pb(t_pb* pb, AtomPBBimap& atom_pb_bimap) {
14111411

14121412
} else {
14131413
/* Primitive */
1414-
auto& atom_ctx = g_vpr_ctx.mutable_atom();
14151414
auto blk_id = atom_pb_bimap.pb_atom(pb);
14161415
if (blk_id) {
1417-
//Update atom netlist mapping
1418-
atom_ctx.mutable_lookup().set_atom_clb(blk_id, ClusterBlockId::INVALID());
14191416
atom_pb_bimap.set_atom_pb(blk_id, nullptr);
14201417
}
14211418
atom_pb_bimap.set_atom_pb(AtomBlockId::INVALID(), pb);

0 commit comments

Comments
 (0)