@@ -62,7 +62,6 @@ static void add_molecule_to_pb_stats_candidates(
62
62
PackMoleculeId molecule_id,
63
63
ClusterGainStats& cluster_gain_stats,
64
64
t_logical_block_type_ptr cluster_type,
65
- int max_queue_size,
66
65
AttractionInfo& attraction_groups,
67
66
const Prepacker& prepacker,
68
67
const AtomNetlist& atom_netlist,
@@ -747,9 +746,7 @@ PackMoleculeId GreedyCandidateSelector::get_next_candidate_for_cluster(
747
746
// then we need to clear the feasible blocks list and reset the number of pops.
748
747
// This ensures that we can continue searching for feasible blocks for the remaining
749
748
// steps (2.transitive, 3.high fanout, 4.attraction group).
750
- if (cluster_gain_stats.feasible_blocks .empty () ||
751
- cluster_gain_stats.current_stage_candidates_proposed_limit_reached ()
752
- ){
749
+ if (cluster_gain_stats.feasible_blocks .empty () || cluster_gain_stats.current_stage_candidates_proposed_limit_reached ()) {
753
750
cluster_gain_stats.feasible_blocks .clear ();
754
751
cluster_gain_stats.num_candidates_proposed = 0 ;
755
752
}
@@ -788,7 +785,8 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_connectivity_an
788
785
const ClusterLegalizer& cluster_legalizer,
789
786
AttractionInfo& attraction_groups) {
790
787
791
- cluster_gain_stats.explore_transitive_fanout = true ; /* If no legal molecules found, enable exploration of molecules two hops away */
788
+ cluster_gain_stats.explore_transitive_fanout = true ; /* If no legal molecules found, enable exploration of molecules two hops away */
789
+ cluster_gain_stats.candidates_propose_limit = packer_opts_.feasible_block_array_size ; // set the limit of candidates to propose
792
790
793
791
for (AtomBlockId blk_id : cluster_gain_stats.marked_blocks ) {
794
792
// Get the molecule that contains this block.
@@ -799,7 +797,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_connectivity_an
799
797
add_molecule_to_pb_stats_candidates (molecule_id,
800
798
cluster_gain_stats,
801
799
cluster_legalizer.get_cluster_type (legalization_cluster_id),
802
- packer_opts_.feasible_block_array_size ,
803
800
attraction_groups,
804
801
prepacker_,
805
802
atom_netlist_,
@@ -815,6 +812,7 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_transitive_conn
815
812
AttractionInfo& attraction_groups) {
816
813
// TODO: For now, only done by fan-out; should also consider fan-in
817
814
cluster_gain_stats.explore_transitive_fanout = false ;
815
+ cluster_gain_stats.candidates_propose_limit = std::min (packer_opts_.feasible_block_array_size , AAPACK_MAX_TRANSITIVE_EXPLORE); // set the limit of candidates to propose
818
816
819
817
/* First time finding transitive fanout candidates therefore alloc and load them */
820
818
load_transitive_fanout_candidates (cluster_gain_stats,
@@ -828,8 +826,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_transitive_conn
828
826
add_molecule_to_pb_stats_candidates (molecule_id,
829
827
cluster_gain_stats,
830
828
cluster_legalizer.get_cluster_type (legalization_cluster_id),
831
- std::min (packer_opts_.feasible_block_array_size ,
832
- AAPACK_MAX_TRANSITIVE_EXPLORE),
833
829
attraction_groups,
834
830
prepacker_,
835
831
atom_netlist_,
@@ -848,6 +844,7 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_highfanout_conn
848
844
* related blocks */
849
845
850
846
AtomNetId net_id = cluster_gain_stats.tie_break_high_fanout_net ;
847
+ cluster_gain_stats.candidates_propose_limit = std::min (packer_opts_.feasible_block_array_size , AAPACK_MAX_TRANSITIVE_EXPLORE); // set the limit of candidates to propose
851
848
852
849
int count = 0 ;
853
850
for (AtomPinId pin_id : atom_netlist_.net_pins (net_id)) {
@@ -862,8 +859,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_highfanout_conn
862
859
add_molecule_to_pb_stats_candidates (molecule_id,
863
860
cluster_gain_stats,
864
861
cluster_legalizer.get_cluster_type (legalization_cluster_id),
865
- std::min (packer_opts_.feasible_block_array_size ,
866
- AAPACK_MAX_HIGH_FANOUT_EXPLORE),
867
862
attraction_groups,
868
863
prepacker_,
869
864
atom_netlist_,
@@ -891,6 +886,7 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_attraction_grou
891
886
* group molecules for candidate molecules.
892
887
*/
893
888
AttractGroupId grp_id = cluster_gain_stats.attraction_grp_id ;
889
+ cluster_gain_stats.candidates_propose_limit = packer_opts_.feasible_block_array_size ; // set the limit of candidates to propose
894
890
if (grp_id == AttractGroupId::INVALID ()) {
895
891
return ;
896
892
}
@@ -923,7 +919,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_attraction_grou
923
919
add_molecule_to_pb_stats_candidates (molecule_id,
924
920
cluster_gain_stats,
925
921
cluster_legalizer.get_cluster_type (legalization_cluster_id),
926
- packer_opts_.feasible_block_array_size ,
927
922
attraction_groups,
928
923
prepacker_,
929
924
atom_netlist_,
@@ -945,7 +940,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_attraction_grou
945
940
add_molecule_to_pb_stats_candidates (molecule_id,
946
941
cluster_gain_stats,
947
942
cluster_legalizer.get_cluster_type (legalization_cluster_id),
948
- packer_opts_.feasible_block_array_size ,
949
943
attraction_groups,
950
944
prepacker_,
951
945
atom_netlist_,
@@ -960,7 +954,6 @@ void GreedyCandidateSelector::add_cluster_molecule_candidates_by_attraction_grou
960
954
static void add_molecule_to_pb_stats_candidates (PackMoleculeId molecule_id,
961
955
ClusterGainStats& cluster_gain_stats,
962
956
t_logical_block_type_ptr cluster_type,
963
- int max_queue_size,
964
957
AttractionInfo& attraction_groups,
965
958
const Prepacker& prepacker,
966
959
const AtomNetlist& atom_netlist,
0 commit comments