dpl: equalize site weight between width and height - #11249
Conversation
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the displacement calculation in NegotiationLegalizer to measure displacement in site widths on both axes, ensuring row jumps are priced correctly relative to horizontal site steps. It introduces cached row Y coordinates (row_y_dbu_) and helper methods rowDispInSites and displacementInSites to calculate distances accurately. The metrics, search window logic, and target cost calculations are updated to use these new helpers. There are no review comments, so I have no additional feedback to provide.
| } | ||
| // The one definition of displacement: site widths on both axes. Pass the | ||
| // cell's own x/y for how far it has moved. | ||
| [[nodiscard]] int displacementInSites(const NegCell& cell, |
There was a problem hiding this comment.
@osamahammad21 you mentioned being worried about changes in displacement. Notice that this function is the same as before, it previously already considered the displacement in sites:
[[nodiscard]] int displacement() const
{
return std::abs(x - init_x) + std::abs(y - init_y);
}
Summary
Currently DPL negotiation legalizer consider the same weight on its cost function for width and height of a site. This does not make sense since they do not have the same dimensions in DBU.
We make moves such as this one, notice the empty space by the lef of the moved instances:

With the current PR they move to the closest available space.
Type of Change
Impact
We get up to 25% reduction in displacement at stage 3-5 for public designs:

Verification
./etc/Build.sh).Related Issues
The changes in this PR come from #11121