Repository navigation
Conversation
With two stacked cells every touched bin overflowed, the diagonal one by 0.5e6, so the test never showed lightly covered bins staying under capacity. Use one cell, which overflows only the bin it covers fully, and check the hand-computed 7.5e6 / 64e6. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces synthetic and metamorphic global placement tests for the gpl module, including a DesignBuilder helper to construct small designs directly in odb. It adds tests verifying that the placer recovers expected structures (chains, lattices, and clusters) and spreads unconnected cells, as well as metamorphic tests comparing placement quality under mirroring, translation, and instance shuffling. Feedback is provided regarding a potential iterator invalidation issue in metamorphic_test.cpp when destroying boxes while iterating over pin->getBoxes().
… tests gpl_design_builder builds small designs directly in odb (chain, lattice, unconnected cells, and two unrelated clusters) whose good placement is known in advance. known_answer_test checks that placement recovers that structure: chain order along x, lattice rows and columns spread over the core, separated clusters, and even spreading of unconnected cells under uniform density. The connected cases run with and without initial placement. metamorphic_test places gcd and compares it with mirrored IO pins, shuffled instance order, and a translated design, within 0.2% HPWL. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
openroad-ci
force-pushed
the
gpl-design-builder
branch
from
November 9, 2026 06:30
666cc2f to
f22fefa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds synthetic designs whose good placement is known in advance, and tests that check gpl recovers it. Part of moving gpl's golden tests to semantic C++ tests.
gpl_design_builderis a test-only library. It builds small designs directly in odb on a fixed 20 × 20 µm core, using one master with a pin on each side, so no LEF, DEF or liberty is needed. It has four generators:known_answer_testchecks the structure of the placement. The connected designs run both with initial placement and with Nesterov placement alone.ChainLinesUpInOrderLatticeKeepsItsShapeUnrelatedClustersStayApartDensitySpreadsUnconnectedCellsmetamorphic_testplaces gcd and compares the result with three changed versions of the design, allowing a 0.2% HPWL difference:The measured differences are 0.012–0.034%. The tolerance is tight enough to catch a density force biased to one side, which moves the mirrored HPWL by 0.7%.
I checked the tests by breaking gpl on purpose:
DensitySpreadsUnconnectedCellsskips initial placement. When no cell is on a net, initial placement collapses them all into one stack at the core center. There the density force is zero, and Nesterov placement fails with GPL-0305. That is tracked as a separate fix.The PR also includes two small fixes:
PartialOverlapOverflowsOnlyFullBinsnow places one cell. The test uses it so that only the fully covered bin overflows, and it asserts the hand-computed overflow, 7.5/64. With two cells, every bin the cells touched overflowed.place_ios_testnow depends on//src/utlfor theutl/Logger.hit includes, which the layering check requires.