Skip to content

Commit 2bf5d27

Browse files
authored
Merge pull request #2584 from verilog-to-routing/add_det_route_stage_option_to_reclustering_utils
add detailed routing stage parameter to reclustering utils
2 parents d9dec1f + f73396b commit 2bf5d27

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

vpr/src/pack/re_cluster_util.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
129129
t_clustering_data& clustering_data,
130130
t_lb_router_data** router_data,
131131
PartitionRegion& temp_cluster_pr,
132-
NocGroupId& temp_cluster_noc_grp_id) {
132+
NocGroupId& temp_cluster_noc_grp_id,
133+
enum e_detailed_routing_stages detailed_routing_stage) {
133134
auto& atom_ctx = g_vpr_ctx.atom();
134135
auto& floorplanning_ctx = g_vpr_ctx.mutable_floorplanning();
135136
auto& helper_ctx = g_vpr_ctx.mutable_cl_helper();
@@ -164,7 +165,7 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
164165
helper_ctx.num_models,
165166
helper_ctx.max_cluster_size,
166167
clb_index,
167-
E_DETAILED_ROUTE_FOR_EACH_ATOM,
168+
detailed_routing_stage,
168169
*router_data,
169170
0,
170171
enable_pin_feasibility_filter,
@@ -213,7 +214,9 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
213214
bool during_packing,
214215
t_clustering_data& clustering_data,
215216
t_lb_router_data*& router_data,
217+
enum e_detailed_routing_stages detailed_routing_stage,
216218
bool enable_pin_feasibility_filter) {
219+
217220
auto& helper_ctx = g_vpr_ctx.mutable_cl_helper();
218221
auto& cluster_ctx = g_vpr_ctx.mutable_clustering();
219222

@@ -239,7 +242,7 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
239242
helper_ctx.num_models,
240243
helper_ctx.max_cluster_size,
241244
new_clb,
242-
E_DETAILED_ROUTE_FOR_EACH_ATOM,
245+
detailed_routing_stage,
243246
router_data,
244247
0,
245248
enable_pin_feasibility_filter,

vpr/src/pack/re_cluster_util.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,18 @@ void remove_mol_from_cluster(const t_pack_molecule* molecule,
7272
* @param mode: the mode of the new cluster
7373
* @param clb_index: the cluster block Id of the newly created cluster block
7474
* @param during_packing: true if this function is called during packing, false if it is called during placement
75-
* @param clustering_data: A data structure containing helper data for the clustering process
75+
* @param clustering_data: A data structure containing helper data for the clustering process
7676
* (is updated if this function is called during packing, especially intra_lb_routing data member).
7777
* @param router_data: returns the intra logic block router data.
7878
* @param temp_cluster_pr: returns the partition region of the new cluster.
7979
* @param temp_cluster_noc_grp_id returns the NoC group ID of the new cluster
80+
* @param detailed_routing_stage: options are E_DETAILED_ROUTE_FOR_EACH_ATOM (default) and E_DETAILED_ROUTE_AT_END_ONLY.
81+
* This argument specifies whether or not to run an intra-cluster routing-based legality
82+
* check after adding the molecule to the cluster; default is the more conservative option.
83+
* This argument is passed down to try_pack_mol; if E_DETAILED_ROUTE_AT_END_ONLY is passed,
84+
* the function does not run a detailed intra-cluster routing-based legality check.
85+
* If many molecules will be added to a cluster, this option enables use of a single
86+
* routing check on the completed cluster (vs many incremental checks).
8087
*/
8188
bool start_new_cluster_for_mol(t_pack_molecule* molecule,
8289
const t_logical_block_type_ptr& type,
@@ -89,7 +96,8 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
8996
t_clustering_data& clustering_data,
9097
t_lb_router_data** router_data,
9198
PartitionRegion& temp_cluster_pr,
92-
NocGroupId& temp_cluster_noc_grp_id);
99+
NocGroupId& temp_cluster_noc_grp_id,
100+
enum e_detailed_routing_stages detailed_routing_stage = E_DETAILED_ROUTE_FOR_EACH_ATOM);
93101

94102
/**
95103
* @brief A function that packs a molecule into an existing cluster
@@ -101,6 +109,14 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
101109
* @param clustering_data: A data structure containing helper data for the clustering process
102110
* (is updated if this function is called during packing, especially intra_lb_routing data member).
103111
* @param router_data: returns the intra logic block router data.
112+
* @param temp_cluster_noc_grp_id returns the NoC group ID of the new cluster
113+
* @param detailed_routing_stage: options are E_DETAILED_ROUTE_FOR_EACH_ATOM (default) and E_DETAILED_ROUTE_AT_END_ONLY.
114+
* This argument specifies whether or not to run an intra-cluster routing-based legality
115+
* check after adding the molecule to the cluster; default is the more conservative option.
116+
* This argument is passed down to try_pack_mol; if E_DETAILED_ROUTE_AT_END_ONLY is passed,
117+
* the function does not run a detailed intra-cluster routing-based legality check.
118+
* If many molecules will be added to a cluster, this option enables use of a single
119+
* routing check on the completed cluster (vs many incremental checks).
104120
* @param enable_pin_feasibility_filter: do a pin couting based legality check (before or in place of intra-cluster routing check).
105121
*/
106122
bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
@@ -110,6 +126,7 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
110126
bool during_packing,
111127
t_clustering_data& clustering_data,
112128
t_lb_router_data*& router_data,
129+
enum e_detailed_routing_stages detailed_routing_stage = E_DETAILED_ROUTE_FOR_EACH_ATOM,
113130
bool enable_pin_feasibility_filter = true);
114131

115132
/**

0 commit comments

Comments
 (0)