Skip to content

Commit

Permalink
Merge pull request #2584 from verilog-to-routing/add_det_route_stage_…
Browse files Browse the repository at this point in the history
…option_to_reclustering_utils

add detailed routing stage parameter to reclustering utils
  • Loading branch information
vaughnbetz authored Jun 12, 2024
2 parents d9dec1f + f73396b commit 2bf5d27
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
9 changes: 6 additions & 3 deletions vpr/src/pack/re_cluster_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
t_clustering_data& clustering_data,
t_lb_router_data** router_data,
PartitionRegion& temp_cluster_pr,
NocGroupId& temp_cluster_noc_grp_id) {
NocGroupId& temp_cluster_noc_grp_id,
enum e_detailed_routing_stages detailed_routing_stage) {
auto& atom_ctx = g_vpr_ctx.atom();
auto& floorplanning_ctx = g_vpr_ctx.mutable_floorplanning();
auto& helper_ctx = g_vpr_ctx.mutable_cl_helper();
Expand Down Expand Up @@ -164,7 +165,7 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
helper_ctx.num_models,
helper_ctx.max_cluster_size,
clb_index,
E_DETAILED_ROUTE_FOR_EACH_ATOM,
detailed_routing_stage,
*router_data,
0,
enable_pin_feasibility_filter,
Expand Down Expand Up @@ -213,7 +214,9 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
bool during_packing,
t_clustering_data& clustering_data,
t_lb_router_data*& router_data,
enum e_detailed_routing_stages detailed_routing_stage,
bool enable_pin_feasibility_filter) {

auto& helper_ctx = g_vpr_ctx.mutable_cl_helper();
auto& cluster_ctx = g_vpr_ctx.mutable_clustering();

Expand All @@ -239,7 +242,7 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
helper_ctx.num_models,
helper_ctx.max_cluster_size,
new_clb,
E_DETAILED_ROUTE_FOR_EACH_ATOM,
detailed_routing_stage,
router_data,
0,
enable_pin_feasibility_filter,
Expand Down
21 changes: 19 additions & 2 deletions vpr/src/pack/re_cluster_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ void remove_mol_from_cluster(const t_pack_molecule* molecule,
* @param mode: the mode of the new cluster
* @param clb_index: the cluster block Id of the newly created cluster block
* @param during_packing: true if this function is called during packing, false if it is called during placement
* @param clustering_data: A data structure containing helper data for the clustering process
* @param clustering_data: A data structure containing helper data for the clustering process
* (is updated if this function is called during packing, especially intra_lb_routing data member).
* @param router_data: returns the intra logic block router data.
* @param temp_cluster_pr: returns the partition region of the new cluster.
* @param temp_cluster_noc_grp_id returns the NoC group ID of the new cluster
* @param detailed_routing_stage: options are E_DETAILED_ROUTE_FOR_EACH_ATOM (default) and E_DETAILED_ROUTE_AT_END_ONLY.
* This argument specifies whether or not to run an intra-cluster routing-based legality
* check after adding the molecule to the cluster; default is the more conservative option.
* This argument is passed down to try_pack_mol; if E_DETAILED_ROUTE_AT_END_ONLY is passed,
* the function does not run a detailed intra-cluster routing-based legality check.
* If many molecules will be added to a cluster, this option enables use of a single
* routing check on the completed cluster (vs many incremental checks).
*/
bool start_new_cluster_for_mol(t_pack_molecule* molecule,
const t_logical_block_type_ptr& type,
Expand All @@ -89,7 +96,8 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
t_clustering_data& clustering_data,
t_lb_router_data** router_data,
PartitionRegion& temp_cluster_pr,
NocGroupId& temp_cluster_noc_grp_id);
NocGroupId& temp_cluster_noc_grp_id,
enum e_detailed_routing_stages detailed_routing_stage = E_DETAILED_ROUTE_FOR_EACH_ATOM);

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

/**
Expand Down

0 comments on commit 2bf5d27

Please sign in to comment.