Skip to content

CTS: fix one sink on cluster#10515

Open
openroad-ci wants to merge 45 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_one_sink_on_cluster
Open

CTS: fix one sink on cluster#10515
openroad-ci wants to merge 45 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_one_sink_on_cluster

Conversation

@openroad-ci
Copy link
Copy Markdown
Collaborator

Summary

The sink clustering algorithm sometimes generates clusters with a single sink, which negatively impacts the skew.
This modification adds a function that attempts to repair these single-sink clusters by merging them into other clusters or adding sinks that are close to them.
If repair is not possible, a buffer will then be added to these types of clusters as well.

Type of Change

  • Breaking change

Impact

This modification is expected to result in a better clock tree construction, as it resolves the issue of clusters with only one sink.

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).

Related Issues

Fix issue #9070

Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
luis201420 added 14 commits May 4, 2026 18:02
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
…solutions

Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
@openroad-ci openroad-ci requested a review from a team as a code owner May 26, 2026 16:13
@openroad-ci openroad-ci requested a review from luis201420 May 26, 2026 16:13
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 introduces a new method repairClusteringSolution in SinkClustering to repair single-sink clusters by either merging them into nearby clusters or moving nearby sinks. It also integrates this repair step into findBestMatching and updates the corresponding test expectations. The review feedback highlights a critical signed/unsigned comparison bug in the repair loop where decrementing the signed index c to -1 and comparing it against the unsigned cluster_num causes premature loop termination. Additionally, the reviewer suggests declaring loop variables consistently to avoid warnings and refactoring the inner loop to use index-based iteration to prevent unnecessary copies of Point<double>.

Comment thread src/cts/src/SinkClustering.cpp Outdated
Comment thread src/cts/src/SinkClustering.cpp Outdated
Comment thread src/cts/src/SinkClustering.cpp
Signed-off-by: luis201420 <luisemv@precisioninno.com>
@luis201420
Copy link
Copy Markdown
Contributor

These modifications require updating the metrics (PR The-OpenROAD-Project/OpenROAD-flow-scripts#4262)

@maliberty
Copy link
Copy Markdown
Member

You also need to update metrics in the test/ directory in OR

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.

3 participants