Skip to content

CTS: fix one sink on cluster#10515

Merged
maliberty merged 55 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_one_sink_on_cluster
Jun 12, 2026
Merged

CTS: fix one sink on cluster#10515
maliberty merged 55 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cts_fix_one_sink_on_cluster

Conversation

@openroad-ci

Copy link
Copy Markdown
Member

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

@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 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>
Signed-off-by: luis201420 <luisemv@precisioninno.com>
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

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 June 2, 2026 04:50
@openroad-ci openroad-ci requested a review from precisionmoon June 2, 2026 04:50
@github-actions github-actions Bot added size/L and removed size/M labels Jun 2, 2026
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>
@github-actions github-actions Bot added size/XL and removed size/L labels Jun 10, 2026
@maliberty maliberty merged commit 32f4bd8 into The-OpenROAD-Project:master Jun 12, 2026
16 checks passed
@maliberty maliberty deleted the cts_fix_one_sink_on_cluster branch June 12, 2026 15:03
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