@@ -394,7 +394,7 @@ t_pack_molecule* get_molecule_by_num_ext_inputs(const int ext_inps,
394394 t_molecule_link* ptr = unclustered_list_head[ext_inps].next ;
395395 while (ptr != nullptr ) {
396396 /* TODO: Get better candidate atom block in future, eg. return most timing critical or some other smarter metric */
397- if (ptr->moleculeptr -> valid ) {
397+ if (!cluster_legalizer. is_mol_clustered ( ptr->moleculeptr ) ) {
398398 /* TODO: I should be using a better filtering check especially when I'm
399399 * dealing with multiple clock/multiple global reset signals where the clock/reset
400400 * packed in matters, need to do later when I have the circuits to check my work */
@@ -1197,7 +1197,7 @@ t_pack_molecule* get_highest_gain_molecule(t_pb* cur_pb,
11971197 cur_pb->pb_stats ->num_feasible_blocks --;
11981198 int index = cur_pb->pb_stats ->num_feasible_blocks ;
11991199 molecule = cur_pb->pb_stats ->feasible_blocks [index];
1200- VTR_ASSERT (molecule-> valid == true );
1200+ VTR_ASSERT (!cluster_legalizer. is_mol_clustered ( molecule) );
12011201 return molecule;
12021202 }
12031203
@@ -1218,7 +1218,7 @@ void add_cluster_molecule_candidates_by_connectivity_and_timing(t_pb* cur_pb,
12181218 for (AtomBlockId blk_id : cur_pb->pb_stats ->marked_blocks ) {
12191219 if (!cluster_legalizer.is_atom_clustered (blk_id)) {
12201220 t_pack_molecule* molecule = prepacker.get_atom_molecule (blk_id);
1221- if (molecule-> valid ) {
1221+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
12221222 if (cluster_legalizer.is_molecule_compatible (molecule, legalization_cluster_id)) {
12231223 add_molecule_to_pb_stats_candidates (molecule,
12241224 cur_pb->pb_stats ->gain , cur_pb, feasible_block_array_size, attraction_groups);
@@ -1251,7 +1251,7 @@ void add_cluster_molecule_candidates_by_highfanout_connectivity(t_pb* cur_pb,
12511251
12521252 if (!cluster_legalizer.is_atom_clustered (blk_id)) {
12531253 t_pack_molecule* molecule = prepacker.get_atom_molecule (blk_id);
1254- if (molecule-> valid ) {
1254+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
12551255 if (cluster_legalizer.is_molecule_compatible (molecule, legalization_cluster_id)) {
12561256 add_molecule_to_pb_stats_candidates (molecule,
12571257 cur_pb->pb_stats ->gain , cur_pb, std::min (feasible_block_array_size, AAPACK_MAX_HIGH_FANOUT_EXPLORE), attraction_groups);
@@ -1328,7 +1328,7 @@ void add_cluster_molecule_candidates_by_attraction_group(t_pb* cur_pb,
13281328 if (!cluster_legalizer.is_atom_clustered (atom_id)
13291329 && std::find (candidate_types.begin (), candidate_types.end (), cluster_type) != candidate_types.end ()) {
13301330 t_pack_molecule* molecule = prepacker.get_atom_molecule (atom_id);
1331- if (molecule-> valid ) {
1331+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
13321332 if (cluster_legalizer.is_molecule_compatible (molecule, legalization_cluster_id)) {
13331333 add_molecule_to_pb_stats_candidates (molecule,
13341334 cur_pb->pb_stats ->gain , cur_pb, feasible_block_array_size, attraction_groups);
@@ -1359,7 +1359,7 @@ void add_cluster_molecule_candidates_by_attraction_group(t_pb* cur_pb,
13591359 if (!cluster_legalizer.is_atom_clustered (blk_id)
13601360 && std::find (candidate_types.begin (), candidate_types.end (), cluster_type) != candidate_types.end ()) {
13611361 t_pack_molecule* molecule = prepacker.get_atom_molecule (blk_id);
1362- if (molecule-> valid ) {
1362+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
13631363 if (cluster_legalizer.is_molecule_compatible (molecule, legalization_cluster_id)) {
13641364 add_molecule_to_pb_stats_candidates (molecule,
13651365 cur_pb->pb_stats ->gain , cur_pb, feasible_block_array_size, attraction_groups);
@@ -1390,7 +1390,7 @@ void add_cluster_molecule_candidates_by_transitive_connectivity(t_pb* cur_pb,
13901390 /* Only consider candidates that pass a very simple legality check */
13911391 for (const auto & transitive_candidate : cur_pb->pb_stats ->transitive_fanout_candidates ) {
13921392 t_pack_molecule* molecule = transitive_candidate.second ;
1393- if (molecule-> valid ) {
1393+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
13941394 if (cluster_legalizer.is_molecule_compatible (molecule, legalization_cluster_id)) {
13951395 add_molecule_to_pb_stats_candidates (molecule,
13961396 cur_pb->pb_stats ->gain , cur_pb, std::min (feasible_block_array_size, AAPACK_MAX_TRANSITIVE_EXPLORE), attraction_groups);
@@ -1659,7 +1659,7 @@ t_pack_molecule* get_highest_gain_seed_molecule(int& seed_index,
16591659 t_pack_molecule* best = nullptr ;
16601660
16611661 t_pack_molecule* molecule = prepacker.get_atom_molecule (blk_id);
1662- if (molecule-> valid ) {
1662+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
16631663 if (best == nullptr || (best->base_gain ) < (molecule->base_gain )) {
16641664 best = molecule;
16651665 }
@@ -1764,7 +1764,7 @@ void load_transitive_fanout_candidates(LegalizationClusterId legalization_cluste
17641764 pb_stats->gain [blk_id] += 0.001 ;
17651765 }
17661766 t_pack_molecule* molecule = prepacker.get_atom_molecule (blk_id);
1767- if (molecule-> valid ) {
1767+ if (!cluster_legalizer. is_mol_clustered ( molecule) ) {
17681768 transitive_fanout_candidates.insert ({molecule->atom_block_ids [molecule->root ], molecule});
17691769 }
17701770 }
0 commit comments