Skip to content

Commit 7bda82c

Browse files
committed
mpl: remove wrong pointer assignment and use correct metrics pointer
Signed-off-by: Arthur Koucher <[email protected]>
1 parent 5c41ccf commit 7bda82c

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

src/mpl/src/clusterEngine.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ void ClusteringEngine::run()
9494
}
9595
}
9696

97-
void ClusteringEngine::setDesignMetrics(Metrics* design_metrics)
98-
{
99-
design_metrics_ = design_metrics;
100-
}
101-
10297
void ClusteringEngine::setTree(PhysicalHierarchy* tree)
10398
{
10499
tree_ = tree;

src/mpl/src/clusterEngine.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ class ClusteringEngine
155155

156156
void run();
157157

158-
void setDesignMetrics(Metrics* design_metrics);
159158
void setTree(PhysicalHierarchy* tree);
160159

161160
// Methods to update the tree as the hierarchical

src/mpl/src/hier_rtlmp.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,8 @@ void HierRTLMP::runMultilevelAutoclustering()
284284
clustering_engine_ = std::make_unique<ClusteringEngine>(
285285
block_, network_, logger_, tritonpart_);
286286

287-
// Set target structures
288-
clustering_engine_->setDesignMetrics(metrics_);
287+
// Set target structure
289288
clustering_engine_->setTree(tree_.get());
290-
291289
clustering_engine_->run();
292290

293291
if (!tree_->has_unfixed_macros) {
@@ -890,8 +888,11 @@ void HierRTLMP::setPinAccessBlockages()
890888
return;
891889
}
892890

891+
const Metrics* top_module_metrics
892+
= tree_->maps.module_to_metrics.at(block_->getTopModule()).get();
893+
893894
// Avoid creating blockages with zero depth.
894-
if (metrics_->getStdCellArea() == 0.0) {
895+
if (top_module_metrics->getStdCellArea() == 0.0) {
895896
return;
896897
}
897898

src/mpl/src/hier_rtlmp.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ namespace mpl {
6767
struct BundledNet;
6868
class Cluster;
6969
class HardMacro;
70-
class Metrics;
7170
struct Rect;
7271
class SoftMacro;
7372
class Snapper;
@@ -330,9 +329,6 @@ class HierRTLMP
330329
float flip_prob_ = 0.4;
331330
float resize_prob_ = 0.4;
332331

333-
// statistics of the design
334-
Metrics* metrics_ = nullptr;
335-
336332
// since we convert from the database unit to the micrometer
337333
// during calculation, we may loss some accuracy.
338334
const float conversion_tolerance_ = 0.01;

0 commit comments

Comments
 (0)