Skip to content

add detailed routing stage parameter to reclustering utils #2584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 12, 2024
11 changes: 7 additions & 4 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 @@ -212,7 +213,9 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
std::unordered_set<AtomBlockId>* new_clb_atoms,
bool during_packing,
t_clustering_data& clustering_data,
t_lb_router_data*& router_data) {
t_lb_router_data*& router_data,
NocGroupId& temp_cluster_noc_grp_id,
enum e_detailed_routing_stages detailed_routing_stage) {
auto& helper_ctx = g_vpr_ctx.mutable_cl_helper();
auto& cluster_ctx = g_vpr_ctx.mutable_clustering();

Expand All @@ -238,7 +241,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,
helper_ctx.enable_pin_feasibility_filter,
Expand Down
13 changes: 10 additions & 3 deletions vpr/src/pack/re_cluster_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ 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
* specifies whether or not to run intra-cluster routing-based legality checking
* after adding the molecule to the cluster; default is the more conservative option,
* which is used in the top level re-clustering API functions
*/
bool start_new_cluster_for_mol(t_pack_molecule* molecule,
const t_logical_block_type_ptr& type,
Expand All @@ -89,7 +93,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 @@ -108,7 +113,9 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
std::unordered_set<AtomBlockId>* new_clb_atoms,
bool during_packing,
t_clustering_data& clustering_data,
t_lb_router_data*& router_data);
t_lb_router_data*& router_data,
NocGroupId& temp_cluster_noc_grp_id,
enum e_detailed_routing_stages detailed_routing_stage = E_DETAILED_ROUTE_FOR_EACH_ATOM);

/**
* @brief A function that fix the clustered netlist if the move is performed
Expand Down
Loading