Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/mpl/src/pusher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,15 @@ void Pusher::pushMacroClusterToCoreBoundaries(
}

std::vector<HardMacro*> 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_,
Expand Down
6 changes: 2 additions & 4 deletions src/mpl/test/cpp/TestPusher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}

Expand Down
Loading