Skip to content

dpl: modify default algorithm to negotiation legalizer#10226

Open
gudeh wants to merge 29 commits into
The-OpenROAD-Project:masterfrom
gudeh:dpl-negotiation-default
Open

dpl: modify default algorithm to negotiation legalizer#10226
gudeh wants to merge 29 commits into
The-OpenROAD-Project:masterfrom
gudeh:dpl-negotiation-default

Conversation

@gudeh
Copy link
Copy Markdown
Contributor

@gudeh gudeh commented Apr 22, 2026

Summary

Modify DPL default algorithm from diamond search to negotiation legalizer. Switch the toggle from -use_negotiation to -use_old_diamond.

Type of Change

  • New feature

Impact

All DPL calls will use the negotiation legalizer instead of the former diamond search.

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 signed my commits (DCO).

gudeh added 3 commits April 22, 2026 08:38
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
…alizer

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 22, 2026

after reviewing the updated tests I realized there is something wrong with upf_aes, which is composed of regions.

Copy link
Copy Markdown
Contributor

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

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 transitions the default detailed placement legalizer to the NegotiationLegalizer and introduces a -use_old_diamond flag for the legacy engine. Key feedback includes fixing a logic error in Opendp.cpp where the legacy flag incorrectly persists across sessions due to bitwise OR assignment. Refactoring is also suggested to eliminate duplicated code for illegal cell identification in NegotiationLegalizerPass.cpp. Furthermore, the reviewer noted that several test expectation files were updated to include diff failure messages, which undermines the verification process; these should be corrected by updating the underlying golden reference files instead.

Comment thread src/dpl/src/Opendp.cpp
Comment on lines +95 to +100
std::vector<int> illegal_cells;
for (int idx : active) {
if (!cells_[idx].fixed && !isCellLegal(idx)) {
illegal_cells.push_back(idx);
}
}
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.

medium

The logic to identify illegal cells for diamond recovery is duplicated between Phase 1 (lines 95-100) and Phase 2 (lines 156-161). This logic should be refactored into a helper method to improve maintainability and reduce code duplication. Additionally, there is a minor inconsistency in the warning messages between the two phases: Phase 1 includes a newline and the word "old" (line 105), while Phase 2 does not (line 165). It would be better to make these messages consistent for easier log parsing.

References
  1. To improve maintainability and reduce redundancy, extract duplicated logic into a helper function to avoid code duplication.

Comment thread src/grt/test/repair_antennas_allow_congestion.ok Outdated
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Copy Markdown
Member

Is the current option in use by ORFS?

@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 22, 2026

Is the current option in use by ORFS?

We need an update on ORFS too for removing the -use_negotiation option.

@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 22, 2026

secure-CI presented 3 fatals! At least one of them negotiation legalizer is not converging to a solution! I will investigate further.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

gudeh added 2 commits April 23, 2026 10:35
stop every iteration on iterative mode, include stop on final state,
introduce iterative_jump to stop at desired iteration

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 23, 2026

sky130hd/aes - [ERROR GRT-0116] Global routing finished with congestion, utilization go above 60%. Here is a final congestion heatmap from master for reference:
image

nangate45/swerv - [ERROR GRT-0116] Global routing finished with congestion. Also has acceptable utilization of up to 72.2%.

sky130hd/gcd - second GRT/DPL call negotation did not converge. Although, it starts with 98.4% utilization.

@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 23, 2026

I also noticed all instances in upf_aes test are being solved with diamond search. The diamond search is used as a fallback when we can't find a solution for a few instances.

GPL finishes with some region-less instances (top-level) on top of other regions, in the following image they are the ones in green:
image

@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 23, 2026

Even with current default behavior we get this awkward legalization because region-less instances are placed in other regions by gpl
image
image
here is the instances with module view. The green and pink instances on the top-level (by the right), are buffers inserted by rsz!
image

…oves in grey, track current-iter movers

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh
Copy link
Copy Markdown
Contributor Author

gudeh commented Apr 23, 2026

anyway, the situation with UPF is unrelated to the negotiation legalizer.

gudeh added 4 commits April 23, 2026 17:24
…sites,

print table similar to gpl with controled number of lines, less verbose,
rename overflow to violations

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions github-actions Bot added size/M and removed size/S labels Apr 23, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/dpl/src/graphics/Graphics.cpp Outdated
Comment thread src/dpl/src/graphics/Graphics.cpp
gudeh added 3 commits April 24, 2026 10:39
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh gudeh force-pushed the dpl-negotiation-default branch from b831c65 to 41ed990 Compare April 25, 2026 08:02
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

clang-tidy review says "All clean, LGTM! 👍"

gudeh added 3 commits May 4, 2026 16:54
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

clang-tidy review says "All clean, LGTM! 👍"

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.

2 participants