Skip to content

Commit 24bcc96

Browse files
authored
Merge pull request #3957 from The-OpenROAD-Project-staging/secure-fix-kf-issue
lec: fix cell filtering and update kepler-formal
2 parents 5101376 + a383bc4 commit 24bcc96

File tree

12 files changed

+67
-35
lines changed

12 files changed

+67
-35
lines changed

flow/designs/asap7/aes-block/rules-base.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -3710.0,
35+
"value": -5150.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -52,11 +52,11 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -3650.0,
55+
"value": -4295.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
59-
"value": -22.5,
59+
"value": -25.9,
6060
"compare": ">="
6161
},
6262
"globalroute__timing__hold__tns": {

flow/designs/nangate45/ariane133/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 840911,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/nangate45/swerv_wrapper/rules-base.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.267,
31+
"value": -0.197,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
@@ -48,7 +48,7 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.246,
51+
"value": -0.398,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
@@ -80,19 +80,19 @@
8080
"compare": "<="
8181
},
8282
"finish__timing__setup__ws": {
83-
"value": -0.248,
83+
"value": -0.185,
8484
"compare": ">="
8585
},
8686
"finish__timing__setup__tns": {
8787
"value": -87.5,
8888
"compare": ">="
8989
},
9090
"finish__timing__hold__ws": {
91-
"value": -0.107,
91+
"value": -0.1,
9292
"compare": ">="
9393
},
9494
"finish__timing__hold__tns": {
95-
"value": -0.407,
95+
"value": -0.4,
9696
"compare": ">="
9797
},
9898
"finish__design__instance__area": {

flow/designs/rapidus2hp/cva6/rules-base.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.138,
31+
"value": -0.111,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -287.0,
35+
"value": -243.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,7 +48,7 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.255,
51+
"value": -0.261,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
@@ -60,11 +60,11 @@
6060
"compare": ">="
6161
},
6262
"globalroute__timing__hold__tns": {
63-
"value": -0.108,
63+
"value": -0.1,
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.255,
67+
"value": -0.261,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
@@ -76,7 +76,7 @@
7676
"compare": ">="
7777
},
7878
"finish__timing__hold__tns": {
79-
"value": -0.108,
79+
"value": -0.1,
8080
"compare": ">="
8181
},
8282
"finish__design__instance__area": {

flow/designs/rapidus2hp/cva6/rules-verific.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.157,
31+
"value": -0.14,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -518.0,
35+
"value": -412.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -52,7 +52,7 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -650.0,
55+
"value": -697.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -68,7 +68,7 @@
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -650.0,
71+
"value": -697.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/rapidus2hp/hercules_is_int/rules-base.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -142.0,
35+
"value": -132.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.134,
51+
"value": -0.103,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -1010.0,
55+
"value": -898.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.134,
67+
"value": -0.103,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -1010.0,
71+
"value": -898.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/sky130hd/chameleon/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"compare": ">="
4545
},
4646
"globalroute__antenna_diodes_count": {
47-
"value": 188,
47+
"value": 218,
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {

flow/designs/sky130hd/microwatt/rules-base.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -311.0,
35+
"value": -352.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -72,7 +72,7 @@
7272
"compare": "<="
7373
},
7474
"detailedroute__antenna__violating__nets": {
75-
"value": 5,
75+
"value": 6,
7676
"compare": "<="
7777
},
7878
"detailedroute__antenna_diodes_count": {
@@ -99,4 +99,4 @@
9999
"value": 5578282,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/scripts/lec_check.tcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
proc write_lec_verilog { filename } {
2+
set remove_cells [find_physical_only_masters]
23
if { [env_var_exists_and_non_empty REMOVE_CELLS_FOR_LEC] } {
3-
write_verilog -remove_cells $::env(REMOVE_CELLS_FOR_LEC) $::env(RESULTS_DIR)/$filename
4-
} else {
5-
write_verilog $::env(RESULTS_DIR)/$filename
4+
lappend remove_cells {*}$::env(REMOVE_CELLS_FOR_LEC)
65
}
6+
write_verilog -remove_cells $remove_cells $::env(RESULTS_DIR)/$filename
77
}
88

99
proc write_lec_script { step file1 file2 } {
@@ -25,7 +25,7 @@ proc run_lec_test { step file1 file2 } {
2525
# tclint-disable-next-line command-args
2626
eval exec $::env(KEPLER_FORMAL_EXE) --config $::env(OBJECTS_DIR)/${step}_lec_test.yml
2727
try {
28-
set count [exec grep -c "Found difference" $::env(LOG_DIR)/${step}_lec_check.log]]
28+
set count [exec grep -c "Found difference" $::env(LOG_DIR)/${step}_lec_check.log]
2929
} trap CHILDSTATUS {results options} {
3030
# This block executes if grep returns a non-zero exit code
3131
set count 0

flow/scripts/util.tcl

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,27 @@ proc is_physical_only_master { master } {
229229
return 0
230230
}
231231

232+
# Returns 1 if the master has no signal pins (only power/ground or none).
233+
proc has_signal_pins { master } {
234+
foreach mterm [$master getMTerms] {
235+
set sig_type [$mterm getSigType]
236+
if { $sig_type != "POWER" && $sig_type != "GROUND" } {
237+
return 1
238+
}
239+
}
240+
return 0
241+
}
242+
243+
# Returns 1 if the master has a corresponding liberty cell.
244+
proc has_liberty_cell { master } {
245+
set master_name [$master getName]
246+
set lib_cells [get_lib_cells -quiet */$master_name]
247+
if { $lib_cells == {} } {
248+
return 0
249+
}
250+
return 1
251+
}
252+
232253
# Finds all physical-only masters in the current database and
233254
# returns their names.
234255
proc find_physical_only_masters { } {
@@ -237,8 +258,19 @@ proc find_physical_only_masters { } {
237258
set physical_only_masters [list]
238259
foreach lib $libs {
239260
foreach master [$lib getMasters] {
261+
set master_name [$master getName]
240262
if { [is_physical_only_master $master] } {
241-
lappend physical_only_masters [$master getName]
263+
lappend physical_only_masters $master_name
264+
continue
265+
}
266+
267+
# Consider cells with no signal pins and no liberty cell as physical-only
268+
if { [has_liberty_cell $master] == 0 } {
269+
if { [has_signal_pins $master] == 0 } {
270+
lappend physical_only_masters $master_name
271+
} else {
272+
puts "Warning: master $master_name has signal pins but no liberty cell"
273+
}
242274
}
243275
}
244276
}

0 commit comments

Comments
 (0)