Skip to content

Cts fix level creation infint loop - #11019

Merged
precisionmoon merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_level_creation_infint_loop
Aug 5, 2026
Merged

Cts fix level creation infint loop#11019
precisionmoon merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_level_creation_infint_loop

Conversation

@arthurjolo

Copy link
Copy Markdown
Contributor

Summary

This PR prevents an infinite loop during the CTS level creation. It is possible that 2 sinks always cluster together during level creation and the maxHPWL never drops below maxWl, creating an infinite loop.

Type of Change

  • Bug fix

Impact

Add a check if the maxHPWL drops after creating a level. If it doesn't, it means that creating more levels will never meet the conditions maxHPWL < maxWl, and it stops creating levels.

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

[Link issues here]

Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
@arthurjolo arthurjolo self-assigned this Jul 29, 2026

@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 introduces a stop criterion in the H-Tree builder loop within HTreeBuilder.cpp. Specifically, it tracks the previous maximum half-perimeter wire length (HPWL) and terminates the loop early if the current HPWL does not improve. Additionally, a new integration test max_wl_two_sinks is added to verify this behavior and prevent regressions where the loop would otherwise run to maximum depth. There are no review comments, and I have no feedback to provide.

@arthurjolo
arthurjolo marked this pull request as ready for review July 30, 2026 12:08
@arthurjolo
arthurjolo requested a review from a team as a code owner July 30, 2026 12:08
@arthurjolo
arthurjolo requested a review from precisionmoon July 30, 2026 12:08
@precisionmoon
precisionmoon merged commit 744c58d into The-OpenROAD-Project:master Aug 5, 2026
17 checks passed
@precisionmoon
precisionmoon deleted the cts_fix_level_creation_infint_loop branch August 5, 2026 20:20
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