@@ -292,31 +292,31 @@ static t_pack_molecule* get_highest_gain_molecule(t_pb* cur_pb,
292
292
int transitive_fanout_threshold,
293
293
const int feasible_block_array_size);
294
294
295
- void add_cluster_molecule_candidates_by_connectivity_and_timing (t_pb* cur_pb,
296
- t_cluster_placement_stats* cluster_placement_stats_ptr,
297
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
298
- const int feasible_block_array_size);
295
+ static void add_cluster_molecule_candidates_by_connectivity_and_timing (t_pb* cur_pb,
296
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
297
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
298
+ const int feasible_block_array_size);
299
299
300
- void add_cluster_molecule_candidates_by_highfanout_connectivity (t_pb* cur_pb,
301
- t_cluster_placement_stats* cluster_placement_stats_ptr,
302
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
303
- const int feasible_block_array_size);
300
+ static void add_cluster_molecule_candidates_by_highfanout_connectivity (t_pb* cur_pb,
301
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
302
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
303
+ const int feasible_block_array_size);
304
304
305
- void add_cluster_molecule_candidates_by_attraction_group (t_pb* cur_pb,
306
- t_cluster_placement_stats* cluster_placement_stats_ptr,
307
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
308
- AttractionInfo& attraction_groups,
309
- const int feasible_block_array_size);
310
-
311
- void add_cluster_molecule_candidates_by_transitive_connectivity (t_pb* cur_pb,
305
+ static void add_cluster_molecule_candidates_by_attraction_group (t_pb* cur_pb,
312
306
t_cluster_placement_stats* cluster_placement_stats_ptr,
313
307
const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
314
- vtr::vector<ClusterBlockId, std::vector<AtomNetId>>& clb_inter_blk_nets,
315
- const ClusterBlockId cluster_index,
316
- int transitive_fanout_threshold,
308
+ AttractionInfo& attraction_groups,
317
309
const int feasible_block_array_size);
318
310
319
- bool check_free_primitives_for_molecule_atoms (t_pack_molecule* molecule, t_cluster_placement_stats* cluster_placement_stats_ptr);
311
+ static void add_cluster_molecule_candidates_by_transitive_connectivity (t_pb* cur_pb,
312
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
313
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
314
+ vtr::vector<ClusterBlockId, std::vector<AtomNetId>>& clb_inter_blk_nets,
315
+ const ClusterBlockId cluster_index,
316
+ int transitive_fanout_threshold,
317
+ const int feasible_block_array_size);
318
+
319
+ static bool check_free_primitives_for_molecule_atoms (t_pack_molecule* molecule, t_cluster_placement_stats* cluster_placement_stats_ptr);
320
320
321
321
static t_pack_molecule* get_molecule_for_cluster (t_pb* cur_pb,
322
322
const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
@@ -2055,7 +2055,8 @@ static void mark_and_update_partial_gain(const AtomNetId net_id, enum e_gain_upd
2055
2055
/* ****************************************/
2056
2056
static void update_total_gain (float alpha, float beta, bool timing_driven, bool connection_driven, t_pb* pb, AttractionInfo& attraction_groups) {
2057
2057
/* Updates the total gain array to reflect the desired tradeoff between*
2058
- *input sharing (sharinggain) and path_length minimization (timinggain)*/
2058
+ *input sharing (sharinggain) and path_length minimization (timinggain)
2059
+ *input each time a new molecule is added to the cluster.*/
2059
2060
auto & atom_ctx = g_vpr_ctx.atom ();
2060
2061
t_pb* cur_pb = pb;
2061
2062
@@ -2126,8 +2127,10 @@ static void update_cluster_stats(const t_pack_molecule* molecule,
2126
2127
const int high_fanout_net_threshold,
2127
2128
const SetupTimingInfo& timing_info,
2128
2129
AttractionInfo& attraction_groups) {
2129
- /* Updates cluster stats such as gain, used pins, and clock structures. Also
2130
- * keeps track of which attraction group the cluster belongs to. */
2130
+ /* Routine that is called each time a new molecule is added to the cluster.
2131
+ * Makes calls to update cluster stats such as the gain map for atoms, used pins, and clock structures,
2132
+ * in order to reflect the new content of the cluster.
2133
+ * Also keeps track of which attraction group the cluster belongs to. */
2131
2134
2132
2135
int molecule_size;
2133
2136
int iblock;
@@ -2163,6 +2166,7 @@ static void update_cluster_stats(const t_pack_molecule* molecule,
2163
2166
cur_pb->pb_stats ->num_child_blocks_in_pb ++;
2164
2167
2165
2168
if (atom_grp_id != AttractGroupId::INVALID ()) {
2169
+ /* TODO: Allow clusters to have more than one attraction group. */
2166
2170
cur_pb->pb_stats ->attraction_grp_id = atom_grp_id;
2167
2171
}
2168
2172
@@ -2465,10 +2469,10 @@ static t_pack_molecule* get_highest_gain_molecule(t_pb* cur_pb,
2465
2469
return molecule;
2466
2470
}
2467
2471
2468
- void add_cluster_molecule_candidates_by_connectivity_and_timing (t_pb* cur_pb,
2469
- t_cluster_placement_stats* cluster_placement_stats_ptr,
2470
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2471
- const int feasible_block_array_size) {
2472
+ static void add_cluster_molecule_candidates_by_connectivity_and_timing (t_pb* cur_pb,
2473
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
2474
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2475
+ const int feasible_block_array_size) {
2472
2476
VTR_ASSERT (cur_pb->pb_stats ->num_feasible_blocks == NOT_VALID);
2473
2477
2474
2478
cur_pb->pb_stats ->num_feasible_blocks = 0 ;
@@ -2493,10 +2497,10 @@ void add_cluster_molecule_candidates_by_connectivity_and_timing(t_pb* cur_pb,
2493
2497
}
2494
2498
}
2495
2499
2496
- void add_cluster_molecule_candidates_by_highfanout_connectivity (t_pb* cur_pb,
2497
- t_cluster_placement_stats* cluster_placement_stats_ptr,
2498
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2499
- const int feasible_block_array_size) {
2500
+ static void add_cluster_molecule_candidates_by_highfanout_connectivity (t_pb* cur_pb,
2501
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
2502
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2503
+ const int feasible_block_array_size) {
2500
2504
/* Because the packer ignores high fanout nets when marking what blocks
2501
2505
* to consider, use one of the ignored high fanout net to fill up lightly
2502
2506
* related blocks */
@@ -2532,11 +2536,11 @@ void add_cluster_molecule_candidates_by_highfanout_connectivity(t_pb* cur_pb,
2532
2536
cur_pb->pb_stats ->tie_break_high_fanout_net = AtomNetId::INVALID (); /* Mark off that this high fanout net has been considered */
2533
2537
}
2534
2538
2535
- void add_cluster_molecule_candidates_by_attraction_group (t_pb* cur_pb,
2536
- t_cluster_placement_stats* cluster_placement_stats_ptr,
2537
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2538
- AttractionInfo& attraction_groups,
2539
- const int feasible_block_array_size) {
2539
+ static void add_cluster_molecule_candidates_by_attraction_group (t_pb* cur_pb,
2540
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
2541
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2542
+ AttractionInfo& attraction_groups,
2543
+ const int feasible_block_array_size) {
2540
2544
auto & atom_ctx = g_vpr_ctx.atom ();
2541
2545
2542
2546
// If the current cluster belongs to an attraction group, add all of the atoms
@@ -2563,13 +2567,13 @@ void add_cluster_molecule_candidates_by_attraction_group(t_pb* cur_pb,
2563
2567
}
2564
2568
}
2565
2569
2566
- void add_cluster_molecule_candidates_by_transitive_connectivity (t_pb* cur_pb,
2567
- t_cluster_placement_stats* cluster_placement_stats_ptr,
2568
- const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2569
- vtr::vector<ClusterBlockId, std::vector<AtomNetId>>& clb_inter_blk_nets,
2570
- const ClusterBlockId cluster_index,
2571
- int transitive_fanout_threshold,
2572
- const int feasible_block_array_size) {
2570
+ static void add_cluster_molecule_candidates_by_transitive_connectivity (t_pb* cur_pb,
2571
+ t_cluster_placement_stats* cluster_placement_stats_ptr,
2572
+ const std::multimap<AtomBlockId, t_pack_molecule*>& atom_molecules,
2573
+ vtr::vector<ClusterBlockId, std::vector<AtomNetId>>& clb_inter_blk_nets,
2574
+ const ClusterBlockId cluster_index,
2575
+ int transitive_fanout_threshold,
2576
+ const int feasible_block_array_size) {
2573
2577
// TODO: For now, only done by fan-out; should also consider fan-in
2574
2578
2575
2579
cur_pb->pb_stats ->explore_transitive_fanout = false ;
@@ -2593,7 +2597,7 @@ void add_cluster_molecule_candidates_by_transitive_connectivity(t_pb* cur_pb,
2593
2597
}
2594
2598
}
2595
2599
2596
- bool check_free_primitives_for_molecule_atoms (t_pack_molecule* molecule, t_cluster_placement_stats* cluster_placement_stats_ptr) {
2600
+ static bool check_free_primitives_for_molecule_atoms (t_pack_molecule* molecule, t_cluster_placement_stats* cluster_placement_stats_ptr) {
2597
2601
auto & atom_ctx = g_vpr_ctx.atom ();
2598
2602
bool success = true ;
2599
2603
@@ -2603,7 +2607,7 @@ bool check_free_primitives_for_molecule_atoms(t_pack_molecule* molecule, t_clust
2603
2607
auto blk_id2 = molecule->atom_block_ids [i_atom];
2604
2608
if (!exists_free_primitive_for_atom_block (cluster_placement_stats_ptr, blk_id2)) {
2605
2609
/* TODO: debating whether to check if placement exists for molecule
2606
- * (more robust) or individual atom blocks (faster) */
2610
+ * (more robust) or individual atom blocks (faster) (Jason Luu) */
2607
2611
success = false ;
2608
2612
break ;
2609
2613
}
0 commit comments