cts: add regression test for single-sink cluster buffer balance (#9070)#10728
cts: add regression test for single-sink cluster buffer balance (#9070)#10728saurav-fermions wants to merge 1 commit into
Conversation
…OpenROAD-Project#9070) CTS sink clustering could leave isolated sinks in single-sink (orphan) clusters that bypassed the clkbuf_leaf_ buffer level, giving those sinks one fewer buffer in their clock path than clustered sinks and creating skew (issue The-OpenROAD-Project#9070, visible on sky130hd/aes). The source fix (every non-empty cluster, including single-sink ones, gets a leaf buffer in HTreeBuilder::preSinkClustering) is already in place. This adds a regression test that reproduces the orphan condition: a dense block of >200 sinks plus several far-apart isolated sinks that each form their own single-sink cluster. It asserts balanced clock-path buffer depth (CTS-0012 minimum == CTS-0013 maximum). Verified: with the fix reverted the test design reports min 3 / max 4 buffers; with the fix it reports min 4 / max 4. Registered in both CMake and Bazel. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
There was a problem hiding this comment.
Code Review
This pull request introduces a new regression test, sink_clustering_single_sink, to ensure that single-sink (orphan) clusters do not bypass the leaf-buffer level during CTS sink clustering. The review feedback correctly identifies that some of the isolated orphan sinks are placed outside the defined die area (up to 3,850,000 DBUs, whereas the die area is set to 2,600,000 DBUs) and suggests increasing the die area to prevent potential downstream issues.
|
|
||
| $block setDefUnits [$tech getDbUnitsPerMicron] | ||
| set rect [odb::Rect] | ||
| $rect init 0 0 2600000 2600000 |
There was a problem hiding this comment.
The die area is initialized to 2600000 x 2600000 DBUs, but the isolated orphan sinks are placed at coordinates up to 3850000 DBUs (far + off where far = 2000000 and the maximum offset is 1850000). This places several instances outside the defined die area, which can lead to unexpected behavior or downstream failures. Consider increasing the die area to at least 4000000 x 4000000 DBUs to fully enclose all placed instances.
$rect init 0 0 4000000 4000000
Summary
Adds a regression test for single-sink ('orphan') cluster sink-buffer balance in TritonCTS. The behavior is already correct on current master; this test guards against regression of the per-cluster sink buffer for single-sink clusters (whose absence otherwise caused a buffer-depth/latency imbalance). Test-only, no code change.
Type of Change
Impact
Test-only; no code or golden change.
Verification
ctest -R '^cts\.'passes with the added test.Related Issues
Fixes #9070
Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).