Skip to content

Commit 1223a61

Browse files
committed
mpl:
1) Fix lower/upper bounds' order of Std Cell SoftMacro's width curve. 2) Ensure that the width/height lists are updated when shrinking clusters during a restart process inside annealing. Signed-off-by: Arthur Koucher <[email protected]>
1 parent d433423 commit 1223a61

File tree

5 files changed

+418
-403
lines changed

5 files changed

+418
-403
lines changed

src/mpl/src/SimulatedAnnealingCore.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,11 @@ void SimulatedAnnealingCore<T>::useBestValidResult()
849849
graphics_->doNotSkip();
850850
}
851851
calPenalty();
852+
853+
if (!isValid()) {
854+
logger_->critical(
855+
utl::MPL, 51, "The best valid result is being evaluated as invalid!");
856+
}
852857
}
853858

854859
template <class T>

src/mpl/src/hier_rtlmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ bool HierRTLMP::runFineShaping(Cluster* parent,
20862086
width = std::sqrt(area / min_ar_);
20872087
}
20882088
std::vector<std::pair<float, float>> width_list;
2089-
width_list.emplace_back(width, area / width);
2089+
width_list.emplace_back(area / width /* min */, width /* max */);
20902090
macros[soft_macro_id_map[cluster->getName()]].setShapes(width_list, area);
20912091
} else if (cluster->getClusterType() == HardMacroCluster) {
20922092
macros[soft_macro_id_map[cluster->getName()]].setShapes(

src/mpl/src/object.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,16 @@ void SoftMacro::shrinkArea(float percent)
10941094
return;
10951095
}
10961096

1097+
for (std::pair<float, float>& width_curve : width_list_) {
1098+
width_curve.first *= percent;
1099+
width_curve.second *= percent;
1100+
}
1101+
1102+
for (std::pair<float, float>& height_curve : height_list_) {
1103+
height_curve.first *= percent;
1104+
height_curve.second *= percent;
1105+
}
1106+
10971107
width_ = width_ * percent;
10981108
height_ = height_ * percent;
10991109
area_ = width_ * height_;

0 commit comments

Comments
 (0)