test: Apply review feedback - part4

Remove unnecessary catch blocks in network, parasitics, sdc, spice,
and util test modules. Add report_checks after set_wire_load_model
in parasitics_wireload.tcl to verify timing changes per wireload.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jaehyun Kim
2026-02-20 14:13:55 +09:00
parent 5c9b4d7a15
commit 812d26f14c
14 changed files with 248 additions and 403 deletions

View File

@@ -131,19 +131,13 @@ if { $rc4 == 0 } {
puts "--- write_path_spice max slack ---"
set spice_dir2 [make_result_file spice_adv_path]
file mkdir $spice_dir2
set rc5 [catch {
write_path_spice \
-path_args {-sort_by_slack -path_delay max} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg5]
if { $rc5 == 0 } {
} else {
puts "INFO: write_path_spice max slack: $msg5"
}
write_path_spice \
-path_args {-sort_by_slack -path_delay max} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice min path
@@ -151,19 +145,13 @@ if { $rc5 == 0 } {
puts "--- write_path_spice min path ---"
set spice_dir3 [make_result_file spice_adv_min]
file mkdir $spice_dir3
set rc6 [catch {
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg6]
if { $rc6 == 0 } {
} else {
puts "INFO: write_path_spice min: $msg6"
}
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice with hspice
@@ -171,20 +159,14 @@ if { $rc6 == 0 } {
puts "--- write_path_spice hspice ---"
set spice_dir4 [make_result_file spice_adv_hspice]
file mkdir $spice_dir4
set rc7 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
} msg7]
if { $rc7 == 0 } {
} else {
puts "INFO: write_path_spice hspice: $msg7"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
#---------------------------------------------------------------
# write_path_spice with xyce
@@ -192,17 +174,11 @@ if { $rc7 == 0 } {
puts "--- write_path_spice xyce ---"
set spice_dir5 [make_result_file spice_adv_xyce]
file mkdir $spice_dir5
set rc8 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir5 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
} msg8]
if { $rc8 == 0 } {
} else {
puts "INFO: write_path_spice xyce: $msg8"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir5 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce

View File

@@ -70,19 +70,13 @@ close $subckt_fh
puts "--- write_path_spice max ngspice ---"
set dir1 [make_result_file spice_gcd_max]
file mkdir $dir1
set rc [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir1 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice max: $msg"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir1 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND
#---------------------------------------------------------------
# write_path_spice with min path
@@ -90,19 +84,13 @@ if { $rc == 0 } {
puts "--- write_path_spice min ---"
set dir2 [make_result_file spice_gcd_min]
file mkdir $dir2
set rc [catch {
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice min: $msg"
}
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND
#---------------------------------------------------------------
# write_path_spice with hspice
@@ -111,20 +99,14 @@ if { $rc == 0 } {
puts "--- write_path_spice hspice ---"
set dir3 [make_result_file spice_gcd_hspice]
file mkdir $dir3
set rc [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND \
-simulator hspice
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice hspice: $msg"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND \
-simulator hspice
#---------------------------------------------------------------
# write_path_spice with xyce
@@ -133,20 +115,14 @@ if { $rc == 0 } {
puts "--- write_path_spice xyce ---"
set dir4 [make_result_file spice_gcd_xyce]
file mkdir $dir4
set rc [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND \
-simulator xyce
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice xyce: $msg"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VPWR \
-ground VGND \
-simulator xyce
#---------------------------------------------------------------
# write_path_spice with specific from/to

View File

@@ -104,19 +104,13 @@ close $subckt_fh
puts "--- write_path_spice max ---"
set spice_dir1 [make_result_file spice_mp_max]
file mkdir $spice_dir1
set rc1 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir1 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg1]
if { $rc1 == 0 } {
} else {
puts "INFO: write_path_spice max: $msg1"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir1 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice with min path
@@ -124,19 +118,13 @@ if { $rc1 == 0 } {
puts "--- write_path_spice min ---"
set spice_dir2 [make_result_file spice_mp_min]
file mkdir $spice_dir2
set rc2 [catch {
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg2]
if { $rc2 == 0 } {
} else {
puts "INFO: write_path_spice min: $msg2"
}
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice with specific from/to
@@ -164,20 +152,14 @@ if { $rc3 == 0 } {
puts "--- write_path_spice hspice ---"
set spice_dir4 [make_result_file spice_mp_hspice]
file mkdir $spice_dir4
set rc4 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
} msg4]
if { $rc4 == 0 } {
} else {
puts "INFO: write_path_spice hspice: $msg4"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
#---------------------------------------------------------------
# write_path_spice with xyce
@@ -185,20 +167,14 @@ if { $rc4 == 0 } {
puts "--- write_path_spice xyce ---"
set spice_dir5 [make_result_file spice_mp_xyce]
file mkdir $spice_dir5
set rc5 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir5 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
} msg5]
if { $rc5 == 0 } {
} else {
puts "INFO: write_path_spice xyce: $msg5"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir5 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
#---------------------------------------------------------------
# write_gate_spice with multiple cells and transitions

View File

@@ -77,19 +77,13 @@ close $subckt_fh
puts "--- write_path_spice min path ---"
set spice_dir_min [make_result_file spice_min_out]
file mkdir $spice_dir_min
set rc1 [catch {
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir_min \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg1]
if { $rc1 == 0 } {
} else {
puts "INFO: write_path_spice min: $msg1"
}
write_path_spice \
-path_args {-path_delay min} \
-spice_directory $spice_dir_min \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice - max path
@@ -97,19 +91,13 @@ if { $rc1 == 0 } {
puts "--- write_path_spice max path ---"
set spice_dir_max [make_result_file spice_max_out]
file mkdir $spice_dir_max
set rc2 [catch {
write_path_spice \
-path_args {-path_delay max -sort_by_slack} \
-spice_directory $spice_dir_max \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg2]
if { $rc2 == 0 } {
} else {
puts "INFO: write_path_spice max: $msg2"
}
write_path_spice \
-path_args {-path_delay max -sort_by_slack} \
-spice_directory $spice_dir_max \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
#---------------------------------------------------------------
# write_path_spice with hspice simulator
@@ -117,20 +105,14 @@ if { $rc2 == 0 } {
puts "--- write_path_spice hspice ---"
set spice_dir_hs [make_result_file spice_hs_out]
file mkdir $spice_dir_hs
set rc3 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir_hs \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
} msg3]
if { $rc3 == 0 } {
} else {
puts "INFO: write_path_spice hspice: $msg3"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir_hs \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
#---------------------------------------------------------------
# write_path_spice with xyce simulator
@@ -138,20 +120,14 @@ if { $rc3 == 0 } {
puts "--- write_path_spice xyce ---"
set spice_dir_xy [make_result_file spice_xy_out]
file mkdir $spice_dir_xy
set rc4 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir_xy \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
} msg4]
if { $rc4 == 0 } {
} else {
puts "INFO: write_path_spice xyce: $msg4"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir_xy \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
#---------------------------------------------------------------
# write_path_spice with different -from/-to constraints

View File

@@ -106,51 +106,33 @@ if { $rc == 0 } {
puts "--- write_path_spice to out1 ---"
set spice_dir2 [file join $spice_dir path_out1]
file mkdir $spice_dir2
set rc [catch {
write_path_spice \
-path_args {-to out1 -path_delay max} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice to out1: $msg"
}
write_path_spice \
-path_args {-to out1 -path_delay max} \
-spice_directory $spice_dir2 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
puts "--- write_path_spice to out2 ---"
set spice_dir3 [file join $spice_dir path_out2]
file mkdir $spice_dir3
set rc [catch {
write_path_spice \
-path_args {-to out2 -path_delay max} \
-spice_directory $spice_dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice to out2: $msg"
}
write_path_spice \
-path_args {-to out2 -path_delay max} \
-spice_directory $spice_dir3 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
puts "--- write_path_spice with ngspice ---"
set spice_dir4 [file join $spice_dir path_ng]
file mkdir $spice_dir4
set rc [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator ngspice
} msg]
if { $rc == 0 } {
} else {
puts "INFO: write_path_spice ngspice: $msg"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir4 \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator ngspice

View File

@@ -38,20 +38,13 @@ puts $subckt_fh "M2 Q D VSS VSS nmos W=1u L=100n"
puts $subckt_fh ".ends"
close $subckt_fh
# Attempt write_path_spice - exercises the Tcl command parsing and
# C++ WritePathSpice code paths. Catch errors since subckt definitions
# may not perfectly match, but the code path is exercised for coverage.
set rc [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg]
if { $rc == 0 } {
diff_files $test_name.spok [file join $spice_dir path_1.sp]
} else {
puts "FAIL: write_path_spice returned error: $msg"
}
# write_path_spice - exercises the Tcl command parsing and
# C++ WritePathSpice code paths.
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
diff_files $test_name.spok [file join $spice_dir path_1.sp]

View File

@@ -43,51 +43,33 @@ puts $subckt_fh ".ends"
close $subckt_fh
puts "--- write_path_spice default ---"
set rc1 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
} msg1]
if { $rc1 == 0 } {
} else {
puts "INFO: write_path_spice default: $msg1"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS
puts "--- write_path_spice with -simulator hspice ---"
set rc2 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
} msg2]
if { $rc2 == 0 } {
} else {
puts "INFO: write_path_spice hspice: $msg2"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator hspice
puts "--- write_path_spice with -simulator xyce ---"
set rc3 [catch {
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
} msg3]
if { $rc3 == 0 } {
} else {
puts "INFO: write_path_spice xyce: $msg3"
}
write_path_spice \
-path_args {-sort_by_slack} \
-spice_directory $spice_dir \
-lib_subckt_file $subckt_file \
-model_file $model_file \
-power VDD \
-ground VSS \
-simulator xyce
puts "--- write_gate_spice ---"
set gate_spice_file [file join $spice_dir gate_test.sp]