1818#include < fstream>
1919#include " vpr_constraints_writer.h"
2020#include " region.h"
21- #include " re_cluster_util.h"
2221
2322void write_vpr_floorplan_constraints (const char * file_name, int expand, bool subtile, int horizontal_partitions, int vertical_partitions) {
2423 VprConstraints constraints;
@@ -47,6 +46,7 @@ void write_vpr_floorplan_constraints(const char* file_name, int expand, bool sub
4746void setup_vpr_floorplan_constraints_one_loc (VprConstraints& constraints, int expand, bool subtile) {
4847 auto & cluster_ctx = g_vpr_ctx.clustering ();
4948 auto & place_ctx = g_vpr_ctx.placement ();
49+ ClusterAtomsLookup atoms_lookup;
5050
5151 int part_id = 0 ;
5252 /*
@@ -77,9 +77,9 @@ void setup_vpr_floorplan_constraints_one_loc(VprConstraints& constraints, int ex
7777 part.set_part_region (pr);
7878 constraints.add_partition (part);
7979
80- std::unordered_set <AtomBlockId>* atoms = cluster_to_atoms (blk_id);
80+ std::vector <AtomBlockId> atoms = atoms_lookup. atoms_in_cluster (blk_id);
8181
82- for (auto atom_id : * atoms) {
82+ for (auto atom_id : atoms) {
8383 constraints.add_constrained_atom (atom_id, partid);
8484 }
8585 part_id++;
@@ -90,6 +90,7 @@ void setup_vpr_floorplan_constraints_cutpoints(VprConstraints& constraints, int
9090 auto & cluster_ctx = g_vpr_ctx.clustering ();
9191 auto & place_ctx = g_vpr_ctx.placement ();
9292 auto & device_ctx = g_vpr_ctx.device ();
93+ ClusterAtomsLookup atoms_lookup;
9394
9495 // calculate the cutpoint values according to the grid size
9596 // load two arrays - one for horizontal cutpoints and one for vertical
@@ -150,7 +151,7 @@ void setup_vpr_floorplan_constraints_cutpoints(VprConstraints& constraints, int
150151 * appropriate region accordingly
151152 */
152153 for (auto blk_id : cluster_ctx.clb_nlist .blocks ()) {
153- std::unordered_set <AtomBlockId>* atoms = cluster_to_atoms (blk_id);
154+ std::vector <AtomBlockId> atoms = atoms_lookup. atoms_in_cluster (blk_id);
154155 int x = place_ctx.block_locs [blk_id].loc .x ;
155156 int y = place_ctx.block_locs [blk_id].loc .y ;
156157 int width = device_ctx.grid .width ();
@@ -182,7 +183,7 @@ void setup_vpr_floorplan_constraints_cutpoints(VprConstraints& constraints, int
182183
183184 VTR_ASSERT (got != region_atoms.end ());
184185
185- for (auto atom_id : * atoms) {
186+ for (auto atom_id : atoms) {
186187 got->second .push_back (atom_id);
187188 }
188189 }
0 commit comments