From 3eae094860d8a672d77663db23bc07bb77f5a254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Mai?= Date: Mon, 4 May 2026 15:54:18 +0000 Subject: [PATCH 1/2] mpl: check Pusher moves overlaps correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Mai --- src/mpl/src/pusher.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mpl/src/pusher.cpp b/src/mpl/src/pusher.cpp index 0cd794afaf0..6d8376d5758 100644 --- a/src/mpl/src/pusher.cpp +++ b/src/mpl/src/pusher.cpp @@ -179,16 +179,15 @@ void Pusher::pushMacroClusterToCoreBoundaries( } std::vector hard_macros = macro_cluster->getHardMacros(); + // Check based on the shape of the macro cluster to avoid iterating each + // of its HardMacros. + odb::Rect cluster_box = macro_cluster->getBBox(); for (const auto& [boundary, distance] : boundaries_distance) { if (distance == 0) { continue; } - // Check based on the shape of the macro cluster to avoid iterating each - // of its HardMacros. - odb::Rect cluster_box = macro_cluster->getBBox(); - moveMacroClusterBox(cluster_box, boundary, distance); debugPrint(logger_, From 384e3946d0d15c0ad9cd9a3432954fa7b0d15930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Mai?= Date: Wed, 13 May 2026 18:54:30 +0000 Subject: [PATCH 2/2] mpl: update test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Mai --- src/mpl/test/cpp/TestPusher.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mpl/test/cpp/TestPusher.cpp b/src/mpl/test/cpp/TestPusher.cpp index c4250daf8e4..48f78915119 100644 --- a/src/mpl/test/cpp/TestPusher.cpp +++ b/src/mpl/test/cpp/TestPusher.cpp @@ -296,9 +296,7 @@ TEST_F(TestPusher, PushRevertedVertical) // When pushing a macro cluster toward its closest boundaries would cause an // overlap with a macro diagonal to the pushed macro, push the macro the bottom -// The Pusher is biased by the Boundary enum ordering of boundaries (B > L > T > -// R), the current behaviour results in overlapping macros. -// TODO: update the overlap code +// The Pusher is biased by the Boundary enum ordering (B > L > T > R). TEST_F(TestPusher, PushRevertedBiased) { auto root = makeRootWithStdCells(); @@ -316,7 +314,7 @@ TEST_F(TestPusher, PushRevertedBiased) pusher.pushMacrosToCoreBoundaries(); // Last push (left) is reverted, bottom push is kept - EXPECT_EQ(raw_hard_macro_1->getX(), 0); + EXPECT_EQ(raw_hard_macro_1->getX(), 10000); EXPECT_EQ(raw_hard_macro_1->getY(), 0); }