38
38
#include " vtr_vector.h"
39
39
#include " vtr_vector_map.h"
40
40
41
- /* *
42
- * @brief Counts the total number of logic models that the architecture can
43
- * implement.
44
- *
45
- * @param user_models A linked list of logic models.
46
- * @return The total number of models in the linked list
47
- */
48
- static size_t count_models (const t_model* user_models) {
49
- if (user_models == nullptr )
50
- return 0 ;
51
-
52
- size_t n_models = 0 ;
53
- const t_model* cur_model = user_models;
54
- while (cur_model != nullptr ) {
55
- n_models++;
56
- cur_model = cur_model->next ;
57
- }
58
-
59
- return n_models;
60
- }
61
-
62
- /*
63
- * @brief Gets the max cluster size that any logical block can have.
64
- *
65
- * This is the maximum number of primitives any cluster can contain.
66
- */
67
- static size_t calc_max_cluster_size (const std::vector<t_logical_block_type>& logical_block_types) {
68
- size_t max_cluster_size = 0 ;
69
- for (const t_logical_block_type& blk_type : logical_block_types) {
70
- if (is_empty_type (&blk_type))
71
- continue ;
72
- int cur_cluster_size = get_max_primitives_in_pb_type (blk_type.pb_type );
73
- max_cluster_size = std::max<int >(max_cluster_size, cur_cluster_size);
74
- }
75
- return max_cluster_size;
76
- }
77
-
78
41
/*
79
42
* @brief Allocates the stats stored within the pb of a cluster.
80
43
*
@@ -471,15 +434,11 @@ try_place_atom_block_rec(const t_pb_graph_node* pb_graph_node,
471
434
const AtomBlockId blk_id,
472
435
t_pb* cb,
473
436
t_pb** parent,
474
- const int max_models,
475
- const int max_cluster_size,
476
437
const LegalizationClusterId cluster_id,
477
438
vtr::vector_map<AtomBlockId, LegalizationClusterId>& atom_cluster,
478
- const t_intra_cluster_placement_stats* cluster_placement_stats_ptr,
479
439
const PackMoleculeId molecule_id,
480
440
t_lb_router_data* router_data,
481
441
int verbosity,
482
- const int feasible_block_array_size,
483
442
const Prepacker& prepacker,
484
443
const vtr::vector_map<MoleculeChainId, t_clustering_chain_info>& clustering_chain_info) {
485
444
const AtomContext& atom_ctx = g_vpr_ctx.atom ();
@@ -493,10 +452,10 @@ try_place_atom_block_rec(const t_pb_graph_node* pb_graph_node,
493
452
if (pb_graph_node->parent_pb_graph_node != cb->pb_graph_node ) {
494
453
t_pb* my_parent = nullptr ;
495
454
block_pack_status = try_place_atom_block_rec (pb_graph_node->parent_pb_graph_node , blk_id, cb,
496
- &my_parent, max_models, max_cluster_size, cluster_id,
455
+ &my_parent, cluster_id,
497
456
atom_cluster,
498
- cluster_placement_stats_ptr, molecule_id, router_data,
499
- verbosity, feasible_block_array_size,
457
+ molecule_id, router_data,
458
+ verbosity,
500
459
prepacker, clustering_chain_info);
501
460
parent_pb = my_parent;
502
461
} else {
@@ -1272,15 +1231,11 @@ e_block_pack_status ClusterLegalizer::try_pack_molecule(PackMoleculeId molecule_
1272
1231
atom_blk_id,
1273
1232
cluster.pb ,
1274
1233
&parent,
1275
- num_models_,
1276
- max_cluster_size_,
1277
1234
cluster_id,
1278
1235
atom_cluster_,
1279
- cluster.placement_stats ,
1280
1236
molecule_id,
1281
1237
cluster.router_data ,
1282
1238
log_verbosity_,
1283
- feasible_block_array_size_,
1284
1239
prepacker_,
1285
1240
clustering_chain_info_);
1286
1241
}
@@ -1644,15 +1599,11 @@ bool ClusterLegalizer::check_cluster_legality(LegalizationClusterId cluster_id)
1644
1599
1645
1600
ClusterLegalizer::ClusterLegalizer (const AtomNetlist& atom_netlist,
1646
1601
const Prepacker& prepacker,
1647
- const std::vector<t_logical_block_type>& logical_block_types,
1648
1602
std::vector<t_lb_type_rr_node>* lb_type_rr_graphs,
1649
- const t_model* user_models,
1650
- const t_model* library_models,
1651
1603
const std::vector<std::string>& target_external_pin_util_str,
1652
1604
const t_pack_high_fanout_thresholds& high_fanout_thresholds,
1653
1605
ClusterLegalizationStrategy cluster_legalization_strategy,
1654
1606
bool enable_pin_feasibility_filter,
1655
- int feasible_block_array_size,
1656
1607
int log_verbosity) : prepacker_(prepacker) {
1657
1608
// Verify that the inputs are valid.
1658
1609
VTR_ASSERT_SAFE (lb_type_rr_graphs != nullptr );
@@ -1669,14 +1620,8 @@ ClusterLegalizer::ClusterLegalizer(const AtomNetlist& atom_netlist,
1669
1620
clustering_chain_info_.resize (prepacker_.get_num_molecule_chains ());
1670
1621
// Pre-compute the max size of any molecule.
1671
1622
max_molecule_size_ = prepacker.get_max_molecule_size ();
1672
- // Calculate the max cluster size
1673
- // - Limit maximum number of elements for each cluster to MAX_SHORT
1674
- max_cluster_size_ = calc_max_cluster_size (logical_block_types);
1675
- VTR_ASSERT (max_cluster_size_ < MAX_SHORT);
1676
1623
// Get a reference to the rr graphs.
1677
1624
lb_type_rr_graphs_ = lb_type_rr_graphs;
1678
- // Get the number of models in the architecture.
1679
- num_models_ = count_models (user_models) + count_models (library_models);
1680
1625
// Find all NoC router atoms.
1681
1626
std::vector<AtomBlockId> noc_atoms = find_noc_router_atoms (atom_netlist);
1682
1627
update_noc_reachability_partitions (noc_atoms,
@@ -1686,7 +1631,6 @@ ClusterLegalizer::ClusterLegalizer(const AtomNetlist& atom_netlist,
1686
1631
// Copy the options passed by the user
1687
1632
cluster_legalization_strategy_ = cluster_legalization_strategy;
1688
1633
enable_pin_feasibility_filter_ = enable_pin_feasibility_filter;
1689
- feasible_block_array_size_ = feasible_block_array_size;
1690
1634
log_verbosity_ = log_verbosity;
1691
1635
}
1692
1636
0 commit comments