Skip to content

Commit 1d5af4f

Browse files
committed
cts: update regression tests that uses the apply_ndr cmd arg
Signed-off-by: Jonas Gava <[email protected]>
1 parent 685c85b commit 1d5af4f

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

src/cts/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ clock_tree_synthesis
6262
[-sink_clustering_buffer]
6363
[-obstruction_aware]
6464
[-apply_ndr]
65+
[-ndr_strategy strategy]
6566
[-insertion_delay]
6667
[-dont_use_dummy_load]
6768
[-sink_buffer_max_cap_derate derate_value]
@@ -92,7 +93,7 @@ clock_tree_synthesis
9293
| `-num_static_layers` | Set the number of static layers. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
9394
| `-sink_clustering_buffer` | Set the sink clustering buffer(s) to be used. |
9495
| `-obstruction_aware` | Enables obstruction-aware buffering such that clock buffers are not placed on top of blockages or hard macros. This option may reduce legalizer displacement, leading to better latency, skew or timing QoR. The default value is `False`, and the allowed values are bool. |
95-
| `-apply_ndr` | Applies 2X spacing non-default rule to all clock nets except leaf-level nets. The default value is `False`. |
96+
| `-apply_ndr` | Applies 2X spacing non-default rule to clock nets except leaf-level nets following some strategy. There are four strategy options: `none, root_only, half, full`. The default value is `root_only`. |
9697
| `-dont_use_dummy_load` | Don't apply dummy buffer or inverter cells at clock tree leaves to balance loads. The default values is `False`. |
9798
| `-sink_buffer_max_cap_derate` | Use this option to control automatic buffer selection. To favor strong(weak) drive strength buffers use a small(large) value. The default value is `0.01`, meaning that buffers are selected by derating max cap limit by 0.01. The value of 1.0 means no derating of max cap limit. |
9899
| `-delay_buffer_derate` | This option balances latencies between macro cells and registers by inserting delay buffers. The default value is `1.0`, meaning all needed delay buffers are inserted. A value of 0.5 means only half of necessary delay buffers are inserted. A value of 0.0 means no insertion of delay buffers. |

src/cts/test/cts_aux.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,14 @@ def clock_tree_synthesis(
5454
sink_clustering_levels=None,
5555
num_static_layers=None,
5656
sink_clustering_buffer=None,
57-
apply_ndr=False,
57+
apply_ndr=None,
5858
):
5959
cts = design.getTritonCts()
6060
parms = cts.getParms()
6161

6262
# Boolean
6363
parms.setSinkClustering(sink_clustering_enable)
6464
parms.setBalanceLevels(balance_levels)
65-
parms.setApplyNDR(apply_ndr)
6665

6766
if is_pos_int(sink_clustering_size):
6867
parms.setSinkClusteringSize(sink_clustering_size)
@@ -120,6 +119,9 @@ def clock_tree_synthesis(
120119
else:
121120
cts.setSinkBuffer("")
122121

122+
if apply_ndr != None:
123+
parms.setApplyNDR(apply_ndr)
124+
123125
if design.getBlock() == None:
124126
utl.error(utl.CTS, 604, "No design block found.")
125127

src/cts/test/simple_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
root_buf="CLKBUF_X3",
1818
buf_list="CLKBUF_X3",
1919
wire_unit=20,
20-
apply_ndr=True,
20+
apply_ndr="root_only",
2121
)
2222

2323
cts_aux.report_cts(design)

src/cts/test/simple_test.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set_wire_rc -clock -layer metal3
1010
clock_tree_synthesis -root_buf CLKBUF_X3 \
1111
-buf_list CLKBUF_X3 \
1212
-wire_unit 20 \
13-
-apply_ndr
13+
-apply_ndr root_only
1414

1515
report_cts
1616

src/cts/test/simple_test_hier.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create_clock -period 5 clk
2121

2222
set_wire_rc -clock -layer metal3
2323

24-
clock_tree_synthesis -root_buf CLKBUF_X3 -buf_list CLKBUF_X3 -wire_unit 20 -apply_ndr
24+
clock_tree_synthesis -root_buf CLKBUF_X3 -buf_list CLKBUF_X3 -wire_unit 20 -apply_ndr root_only
2525

2626
set verilog_file [make_result_file simple_test_hier_out.v]
2727
write_verilog $verilog_file

src/cts/test/twice.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ set_wire_rc -clock -layer metal3
1111
clock_tree_synthesis -root_buf CLKBUF_X3 \
1212
-buf_list CLKBUF_X3 \
1313
-wire_unit 20 \
14-
-apply_ndr
14+
-apply_ndr root_only
1515

1616
clock_tree_synthesis -root_buf CLKBUF_X3 \
1717
-buf_list CLKBUF_X3 \
1818
-wire_unit 20 \
19-
-apply_ndr
19+
-apply_ndr root_only
2020

2121
set def_file [make_result_file twice.def]
2222
write_def $def_file

0 commit comments

Comments
 (0)