diff --git a/vpr/src/pack/re_cluster_util.cpp b/vpr/src/pack/re_cluster_util.cpp index d8e8271c028..68e04e4b888 100644 --- a/vpr/src/pack/re_cluster_util.cpp +++ b/vpr/src/pack/re_cluster_util.cpp @@ -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(); @@ -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, @@ -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(); @@ -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, diff --git a/vpr/src/pack/re_cluster_util.h b/vpr/src/pack/re_cluster_util.h index 722f725180c..78606f51fce 100644 --- a/vpr/src/pack/re_cluster_util.h +++ b/vpr/src/pack/re_cluster_util.h @@ -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, @@ -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 @@ -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, @@ -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); /**