docs(cts): correct sink_clustering_size auto-selection description#10603
docs(cts): correct sink_clustering_size auto-selection description#10603Avi71 wants to merge 1 commit into
Conversation
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>
There was a problem hiding this comment.
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.
| | `-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. | |
There was a problem hiding this comment.
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".
| | `-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. | |
| | `-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. | |
There was a problem hiding this comment.
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".
| | `-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. | |
There was a problem hiding this comment.
Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:
- Contribution Guide: https://openroad.readthedocs.io/en/latest/contrib/contributing.html
- Build Instructions: https://openroad.readthedocs.io/en/latest/contrib/BuildWithCMake.html
Please ensure:
- CI passes
- Code is properly formatted
- Tests are included where applicable
A maintainer will review shortly!
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
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.