From 576ef6bf6f7ac833b5ea6440ca14ee985f1a55be Mon Sep 17 00:00:00 2001 From: Arthur Koucher Date: Tue, 6 Aug 2024 19:45:01 -0300 Subject: [PATCH] mpl2: throw critical for when things happen Signed-off-by: Arthur Koucher --- src/mpl2/src/clusterEngine.cpp | 44 ++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/src/mpl2/src/clusterEngine.cpp b/src/mpl2/src/clusterEngine.cpp index 886fb2d960b..c44a5a229dd 100644 --- a/src/mpl2/src/clusterEngine.cpp +++ b/src/mpl2/src/clusterEngine.cpp @@ -1545,11 +1545,16 @@ void ClusteringEngine::mergeChildrenBelowThresholds( if (small_children[i]->isSameConnSignature( *small_children[j], tree_->min_net_count_for_connection)) { - /* - Guaranteed merge. - */ if (attemptMerge(small_children[i], small_children[j])) { cluster_class[j] = i; + } else { + logger_->critical( + MPL, + 23, + "Merge attempt between siblings {} and {} with same " + "connection signature failed!", + small_children[i]->getName(), + small_children[j]->getName()); } } } @@ -1568,11 +1573,16 @@ void ClusteringEngine::mergeChildrenBelowThresholds( || small_children[j]->getNumStdCell() > dust_cluster_std_cell) { continue; } - /* - Guaranteed merge. - */ + if (attemptMerge(small_children[i], small_children[j])) { cluster_class[j] = i; + } else { + logger_->critical( + MPL, + 24, + "Merge attempt between dust siblings {} and {} failed!", + small_children[i]->getName(), + small_children[j]->getName()); } } } @@ -1996,12 +2006,15 @@ void ClusteringEngine::groupSingleMacroClusters( "Merging interconnected macro clusters {} and {}", macro_clusters[j]->getId(), macro_clusters[i]->getId()); - - /* - Guaranteed merge. - */ if (attemptMerge(macro_clusters[i], macro_clusters[j])) { macro_class[j] = i; + } else { + logger_->critical(MPL, + 28, + "Merge attempt between interconnected macro " + "siblings {} and {} failed!", + macro_clusters[i]->getName(), + macro_clusters[j]->getName()); } } else { // We need this so we can distinguish arrays of interconnected macros @@ -2015,11 +2028,16 @@ void ClusteringEngine::groupSingleMacroClusters( "Merging same signature clusters {} and {}.", macro_clusters[j]->getId(), macro_clusters[i]->getId()); - /* - Guaranteed merge. - */ if (attemptMerge(macro_clusters[i], macro_clusters[j])) { macro_class[j] = i; + } else { + logger_->critical( + MPL, + 29, + "Merge attempt between macro siblings {} and {} with " + "same connection signature failed!", + macro_clusters[i]->getName(), + macro_clusters[j]->getName()); } } }