Skip to content

docs(cts): correct sink_clustering_size auto-selection description#10603

Open
Avi71 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Avi71:Avi71-patch-1
Open

docs(cts): correct sink_clustering_size auto-selection description#10603
Avi71 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Avi71:Avi71-patch-1

Conversation

@Avi71

@Avi71 Avi71 commented Jun 7, 2026

Copy link
Copy Markdown

Summary

Updated the src/cts/README.md. When -sink_clustering_size is not set, clustering is based on buffer max cap, not a fixed choice from {10, 20, 30}. The cluster size is PDK-dependent and may be less than 10.

Fixes #10602

Type of Change

  • Documentation update

Impact

The impact of this documentation inaccuracy is that users designing CTS parameter sweeps will miss the actual operating range of the auto-selection algorithm. For example, we initially designed our sweep around {10, 20, 30} based on the README, only to discover the auto-selected value was 8, outside the documented range entirely. A correct description of the formula would allow users to make more informed decisions about which cluster sizes to explore relative to the auto-selected value for their specific design.

When -sink_clustering_size is not set, clustering is based on buffer max cap, not a fixed choice from {10, 20, 30}. The cluster size is PDK-dependent and may be less than 10.

Fixes The-OpenROAD-Project#10602

Signed-off-by: Avi71 <33029441+Avi71@users.noreply.github.com>
@Avi71 Avi71 requested a review from a team as a code owner June 7, 2026 08:10
@Avi71 Avi71 requested a review from luis201420 June 7, 2026 08:10

@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 updates the documentation in src/cts/README.md to clarify the default behavior of the -sink_clustering_size parameter when it is not specified. The reviewer noted that the implementation actually uses the sink buffer's maximum fanout rather than its maximum capacitance to determine the default clustering size, and suggested correcting the documentation to reflect this.

Comment thread src/cts/README.md
| `-clustering_unbalance_ratio` | Value determines each cluster's maximum capacity during CKMeans. A value of `0.5` (i.e., 50%) means that each cluster will have exactly half of all sinks for a specific region (half for each branch). The default value is `0.6`, and the allowed values are floats `[0, 1.0]`. |
| `-sink_clustering_enable` | Enables pre-clustering of sinks to create one level of sub-tree before building H-tree. Each cluster is driven by buffer which becomes end point of H-tree structure. |
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified the size will be automatically chosen between `10, 20 or 30` based on the tree buffer max cap. |
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified, sinks will be clustered based on buffer max cap. |

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 description states that clustering is based on the "buffer max cap". However, looking at the implementation in TritonCTS.cpp (lines 228-236), the default clustering size is determined by sinkMaxFanout via getBufferFanoutLimit(sinkBuffer), which retrieves the maximum fanout limit of the sink buffer (from SDC or Liberty), not its maximum capacitance (max cap). To avoid confusion, this should be corrected to "the sink buffer's maximum fanout".

Suggested change
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified, sinks will be clustered based on buffer max cap. |
| -sink_clustering_size | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers [0, MAX_INT]. If this is not specified, sinks will be clustered based on the sink buffer's maximum fanout. |

Comment thread src/cts/README.md
| `-sink_clustering_levels` | ... |
| `-sink_clustering_max_diameter` | Specifies maximum diameter (in microns) of sink cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified the diameter will be automatically chosen between `50, 100 or 200`, based on the tree buffer max cap. |
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified the size will be automatically chosen between `10, 20 or 30` based on the tree buffer max cap. |
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified, sinks will be clustered based on buffer max cap. |

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 description states that clustering is based on the "buffer max cap". However, looking at the implementation in TritonCTS.cpp (lines 228-236), the default clustering size is determined by sinkMaxFanout via getBufferFanoutLimit(sinkBuffer), which retrieves the maximum fanout limit of the sink buffer (from SDC or Liberty), not its maximum capacitance (max cap). To avoid confusion, this should be corrected to "the sink buffer's maximum fanout".

Suggested change
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified, sinks will be clustered based on buffer max cap. |
| -sink_clustering_size | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers [0, MAX_INT]. If this is not specified, sinks will be clustered based on the sink buffer's maximum fanout. |

@github-actions github-actions 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.

Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:

Please ensure:

  • CI passes
  • Code is properly formatted
  • Tests are included where applicable
    A maintainer will review shortly!

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.

CTS Documentation Bug: sink_clustering_size Auto-Selection Description Incorrect

1 participant