Skip to content

dpl: equalize site weight between width and height - #11249

Open
gudeh wants to merge 3 commits into
The-OpenROAD-Project:masterfrom
gudeh:dpl-equalize-site-weight
Open

dpl: equalize site weight between width and height#11249
gudeh wants to merge 3 commits into
The-OpenROAD-Project:masterfrom
gudeh:dpl-equalize-site-weight

Conversation

@gudeh

@gudeh gudeh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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:
image

With the current PR they move to the closest available space.

Type of Change

  • Bug fix

Impact

We get up to 25% reduction in displacement at stage 3-5 for public designs:
image

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

The changes in this PR come from #11121

@gudeh
gudeh requested a review from a team as a code owner August 26, 2026 21:57
@gudeh
gudeh requested a review from osamahammad21 August 26, 2026 21:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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);
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant