Skip to content

Commit 6370b02

Browse files
committed
rsz: Enhanced repair_clk_nets1.tcl for better test coverage
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent a581e8b commit 6370b02

File tree

2 files changed

+91
-16
lines changed

2 files changed

+91
-16
lines changed

src/rsz/test/repair_clk_nets1.ok

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44
[INFO ODB-0131] Created 3 components and 12 component-terminals.
55
[INFO ODB-0132] Created 2 special nets and 6 connections.
66
[INFO ODB-0133] Created 4 nets and 6 connections.
7+
8+
# Set CLOCK type for all nets in the target path.
79
[WARNING RSZ-0065] max wire length less than 693u increases wire delays.
810
[INFO RSZ-0047] Found 1 long wires.
911
[INFO RSZ-0048] Inserted 3 buffers in 1 nets.
10-
CLOCK
12+
13+
# All nets in the path should be CLOCK type.
14+
in1: CLOCK
15+
n1: CLOCK
16+
n2: CLOCK
17+
net3: CLOCK
18+
net2: CLOCK
19+
net1: CLOCK
20+
out1: CLOCK
1121
Driver length delay
1222
Startpoint: in1 (clock source 'in1')
1323
Endpoint: out1 (output port)
@@ -16,27 +26,66 @@ Path Type: max
1626

1727
Cap Slew Delay Time Description
1828
-----------------------------------------------------------------------
19-
0.97 0.00 0.00 0.00 ^ in1 (in)
29+
1.02 0.00 0.00 0.00 ^ in1 (in)
2030
0.00 0.00 0.00 ^ u1/A (BUF_X1)
21-
0.97 0.01 0.02 0.02 ^ u1/Z (BUF_X1)
31+
1.01 0.01 0.02 0.02 ^ u1/Z (BUF_X1)
2232
0.01 0.00 0.02 ^ u2/A (BUF_X1)
23-
6.59 0.02 0.03 0.05 ^ u2/Z (BUF_X1)
24-
0.02 0.00 0.05 ^ wire3/A (BUF_X8)
25-
42.96 0.01 0.03 0.08 ^ wire3/Z (BUF_X8)
26-
0.04 0.03 0.11 ^ wire2/A (BUF_X16)
27-
55.02 0.01 0.03 0.14 ^ wire2/Z (BUF_X16)
28-
0.06 0.05 0.19 ^ wire1/A (BUF_X16)
29-
43.61 0.01 0.03 0.22 ^ wire1/Z (BUF_X16)
30-
0.04 0.03 0.25 ^ u3/A (BUF_X1)
31-
0.00 0.01 0.02 0.27 ^ u3/Z (BUF_X1)
32-
0.01 0.00 0.27 ^ out1 (out)
33-
0.27 data arrival time
33+
40.52 0.08 0.10 0.11 ^ u2/Z (BUF_X1)
34+
0.09 0.04 0.15 ^ wire3/A (BUF_X8)
35+
42.96 0.01 0.03 0.18 ^ wire3/Z (BUF_X8)
36+
0.04 0.03 0.22 ^ wire2/A (BUF_X16)
37+
55.02 0.01 0.03 0.24 ^ wire2/Z (BUF_X16)
38+
0.06 0.05 0.29 ^ wire1/A (BUF_X16)
39+
43.61 0.01 0.03 0.32 ^ wire1/Z (BUF_X16)
40+
0.04 0.03 0.36 ^ u3/A (BUF_X1)
41+
0.10 0.01 0.03 0.38 ^ u3/Z (BUF_X1)
42+
0.01 0.00 0.38 ^ out1 (out)
43+
0.38 data arrival time
3444
-----------------------------------------------------------------------
3545
(Path is unconstrained)
3646

3747

48+
49+
# Check new buffer locations.
3850
Instance: u2, Location (unit: DBU): 0 0
3951
Instance: wire3, Location (unit: DBU): 902584 1383
4052
Instance: wire2, Location (unit: DBU): 1718366 1341
4153
Instance: wire1, Location (unit: DBU): 2858308 1283
4254
Instance: u3, Location (unit: DBU): 3998000 0
55+
56+
# Call sta::network_changed. Timing should be the same.
57+
Startpoint: in1 (clock source 'in1')
58+
Endpoint: out1 (output port)
59+
Path Group: unconstrained
60+
Path Type: max
61+
62+
Cap Slew Delay Time Description
63+
-----------------------------------------------------------------------
64+
1.02 0.00 0.00 0.00 ^ in1 (in)
65+
0.00 0.00 0.00 ^ u1/A (BUF_X1)
66+
1.01 0.01 0.02 0.02 ^ u1/Z (BUF_X1)
67+
0.01 0.00 0.02 ^ u2/A (BUF_X1)
68+
40.52 0.08 0.10 0.11 ^ u2/Z (BUF_X1)
69+
0.09 0.04 0.15 ^ wire3/A (BUF_X8)
70+
42.96 0.01 0.03 0.18 ^ wire3/Z (BUF_X8)
71+
0.04 0.03 0.22 ^ wire2/A (BUF_X16)
72+
55.02 0.01 0.03 0.24 ^ wire2/Z (BUF_X16)
73+
0.06 0.05 0.29 ^ wire1/A (BUF_X16)
74+
43.61 0.01 0.03 0.32 ^ wire1/Z (BUF_X16)
75+
0.04 0.03 0.36 ^ u3/A (BUF_X1)
76+
0.10 0.01 0.03 0.38 ^ u3/Z (BUF_X1)
77+
0.01 0.00 0.38 ^ out1 (out)
78+
0.38 data arrival time
79+
-----------------------------------------------------------------------
80+
(Path is unconstrained)
81+
82+
83+
84+
# All nets in the path should be CLOCK type after network_changed.
85+
in1: CLOCK
86+
n1: CLOCK
87+
n2: CLOCK
88+
net3: CLOCK
89+
net2: CLOCK
90+
net1: CLOCK
91+
out1: CLOCK

src/rsz/test/repair_clk_nets1.tcl

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,31 @@ read_lef Nangate45/Nangate45.lef
55
read_def repair_wire1.def
66
create_clock in1 -period 10
77

8+
# If set_propagated_clock setting is omitted, `in1` is assumed to be
9+
# an ideal clock.
10+
# `estimate_parasitics -placement` does not compute RC for ideal clock nets.
11+
# Therefore, executing set_propagated_clock is crucial for calculating
12+
# an accurate RC.
13+
set_propagated_clock in1
14+
815
source Nangate45/Nangate45.rc
916
set_wire_rc -layer metal3
1017
estimate_parasitics -placement
1118

12-
foreach net_name {in1 n2 n2} {
19+
puts "\n# Set CLOCK type for all nets in the target path."
20+
foreach net_name {in1 n1 n2 out1} {
1321
[sta::sta_to_db_net [get_net $net_name]] setSigType CLOCK
1422
}
1523

1624
# wire length = 1500u -> 2 buffers required
1725
repair_clock_nets -max_wire_length 600
1826

19-
puts [[sta::sta_to_db_net [get_net net1]] getSigType]
27+
puts "\n# All nets in the path should be CLOCK type."
28+
foreach pin_name {u1/A u1/Z u2/Z wire3/Z wire2/Z wire1/Z u3/Z} {
29+
set net [get_net -of_object [get_pins $pin_name]]
30+
set net_name [get_name $net]
31+
puts "$net_name: [[sta::sta_to_db_net $net] getSigType]"
32+
}
2033

2134
report_long_wires 4
2235
report_checks -unconstrained -fields {input slew cap} -rise_to out1
@@ -26,8 +39,21 @@ proc location { inst_name args } {
2639
puts "Instance: $inst_name, Location (unit: DBU): [$inst getLocation]"
2740
}
2841

42+
puts "\n# Check new buffer locations."
2943
location u2
3044
location wire3
3145
location wire2
3246
location wire1
3347
location u3
48+
49+
puts "\n# Call sta::network_changed. Timing should be the same."
50+
sta::network_changed
51+
estimate_parasitics -placement
52+
report_checks -unconstrained -fields {input slew cap} -rise_to out1
53+
54+
puts "\n# All nets in the path should be CLOCK type after network_changed."
55+
foreach pin_name {u1/A u1/Z u2/Z wire3/Z wire2/Z wire1/Z u3/Z} {
56+
set net [get_net -of_object [get_pins $pin_name]]
57+
set net_name [get_name $net]
58+
puts "$net_name: [[sta::sta_to_db_net $net] getSigType]"
59+
}

0 commit comments

Comments
 (0)