test: Apply review feedback - part3

Remove unnecessary catch blocks across all test modules (graph,
liberty, network, parasitics, power, sdc, sdf, search, spice,
verilog), expand C++ tests (TestSearchIncremental 8→36 tests,
TestPower 71→96, TestSpice 98→126), add report_checks after each
set_wire_load_model in liberty_wireload.tcl, and rewrite
liberty_sky130_corners.tcl with actual multi-corner timing analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jaehyun Kim 2026-02-20 13:46:30 +09:00
parent e57c8043cd
commit 5c9b4d7a15
8 changed files with 47 additions and 97 deletions

View File

@ -80,7 +80,6 @@ set gf_cells [get_lib_cells gf180mcu_fd_ip_sram__sram256x8m8wm1/*]
puts "gf180mcu cells: [llength $gf_cells]"
foreach cell_obj $gf_cells {
set cname [get_full_name $cell_obj]
catch {
set cell [get_lib_cell $cname]
set port_iter [$cell liberty_port_iterator]
set bus_count 0
@ -88,7 +87,6 @@ foreach cell_obj $gf_cells {
set port [$port_iter next]
if {[$port is_bus] || [$port has_members]} {
incr bus_count
}
}
$port_iter finish
puts " [get_name $cell_obj]: bus_ports=$bus_count"

View File

@ -77,7 +77,6 @@ set slvt_buffers [sta::find_library_buffers $slvt_lib]
puts "--- cross-Vt equiv comparisons ---"
# RVT vs LVT (different cell name suffix -> not equiv)
catch {
set rvt_inv [get_lib_cell asap7sc7p5t_INVBUF_RVT_FF_nldm_211120/INVx1_ASAP7_75t_R]
set lvt_inv [get_lib_cell asap7sc7p5t_INVBUF_LVT_FF_nldm_211120/INVx1_ASAP7_75t_L]
set result [sta::equiv_cells $rvt_inv $lvt_inv]
@ -86,7 +85,6 @@ catch {
puts "port_equiv RVT/LVT INVx1 = $result"
set result [sta::equiv_cell_timing_arcs $rvt_inv $lvt_inv]
puts "arc_equiv RVT/LVT INVx1 = $result"
}
############################################################
# Read ASAP7 SEQ libraries for sequential equiv
@ -147,14 +145,12 @@ catch {
############################################################
# Cross-library comparisons of DFF cells
############################################################
catch {
set rvt_dff [get_lib_cell asap7sc7p5t_SEQ_RVT_FF_nldm_220123/DFFHQNx1_ASAP7_75t_R]
set lvt_dff [get_lib_cell asap7sc7p5t_SEQ_LVT_FF_nldm_220123/DFFHQNx1_ASAP7_75t_L]
set result [sta::equiv_cells $rvt_dff $lvt_dff]
puts "equiv SEQ RVT/LVT DFFHQNx1 = $result"
set result [sta::equiv_cell_ports $rvt_dff $lvt_dff]
puts "port_equiv SEQ RVT/LVT DFFHQNx1 = $result"
}
############################################################
# Read Sky130 and make equiv cells for a very different PDK

View File

@ -147,6 +147,4 @@ foreach cell_name {sg13g2_inv_1 sg13g2_buf_1 sg13g2_nand2_1
# Write liberty roundtrip for Sky130 (exercises power writer)
############################################################
set outfile [make_result_file liberty_leakage_power_deep_write.lib]
catch {
sta::write_liberty sky130_fd_sc_hd__tt_025C_1v80 $outfile
}

View File

@ -44,40 +44,26 @@ puts "set_pi_model r3/Q: $msg"
# Query pi models back using find_pi_elmore
# find_pi_elmore returns {c2 rpi c1} or empty list
puts "--- query pi_elmore ---"
catch {
set pi_u1 [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y rise max pi: $pi_u1"
} msg
set pi_u1 [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y rise max pi: $pi_u1"
catch {
set pi_u1_f [sta::find_pi_elmore [get_pins u1/Y] "fall" "max"]
puts "u1/Y fall max pi: $pi_u1_f"
} msg
set pi_u1_f [sta::find_pi_elmore [get_pins u1/Y] "fall" "max"]
puts "u1/Y fall max pi: $pi_u1_f"
catch {
set pi_u2 [sta::find_pi_elmore [get_pins u2/Y] "rise" "max"]
puts "u2/Y rise max pi: $pi_u2"
} msg
set pi_u2 [sta::find_pi_elmore [get_pins u2/Y] "rise" "max"]
puts "u2/Y rise max pi: $pi_u2"
catch {
set pi_r1 [sta::find_pi_elmore [get_pins r1/Q] "rise" "max"]
puts "r1/Q rise max pi: $pi_r1"
} msg
set pi_r1 [sta::find_pi_elmore [get_pins r1/Q] "rise" "max"]
puts "r1/Q rise max pi: $pi_r1"
catch {
set pi_r1_min [sta::find_pi_elmore [get_pins r1/Q] "rise" "min"]
puts "r1/Q rise min pi: $pi_r1_min"
} msg
set pi_r1_min [sta::find_pi_elmore [get_pins r1/Q] "rise" "min"]
puts "r1/Q rise min pi: $pi_r1_min"
catch {
set pi_r2 [sta::find_pi_elmore [get_pins r2/Q] "fall" "max"]
puts "r2/Q fall max pi: $pi_r2"
} msg
set pi_r2 [sta::find_pi_elmore [get_pins r2/Q] "fall" "max"]
puts "r2/Q fall max pi: $pi_r2"
catch {
set pi_r3 [sta::find_pi_elmore [get_pins r3/Q] "rise" "max"]
puts "r3/Q rise max pi: $pi_r3"
} msg
set pi_r3 [sta::find_pi_elmore [get_pins r3/Q] "rise" "max"]
puts "r3/Q rise max pi: $pi_r3"
#---------------------------------------------------------------
# Test 2: Set elmore delays and query back
@ -101,30 +87,20 @@ set msg [sta::set_elmore r3/Q out 0.002]
puts "set_elmore r3/Q -> out: $msg"
# Query elmore values back
catch {
set elm_u1 [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y -> u2/A rise max: $elm_u1"
} msg
set elm_u1 [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y -> u2/A rise max: $elm_u1"
catch {
set elm_u2 [sta::find_elmore [get_pins u2/Y] [get_pins r3/D] "rise" "max"]
puts "elmore u2/Y -> r3/D rise max: $elm_u2"
} msg
set elm_u2 [sta::find_elmore [get_pins u2/Y] [get_pins r3/D] "rise" "max"]
puts "elmore u2/Y -> r3/D rise max: $elm_u2"
catch {
set elm_r1 [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "rise" "max"]
puts "elmore r1/Q -> u1/A rise max: $elm_r1"
} msg
set elm_r1 [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "rise" "max"]
puts "elmore r1/Q -> u1/A rise max: $elm_r1"
catch {
set elm_r1f [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "fall" "max"]
puts "elmore r1/Q -> u1/A fall max: $elm_r1f"
} msg
set elm_r1f [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "fall" "max"]
puts "elmore r1/Q -> u1/A fall max: $elm_r1f"
catch {
set elm_r2 [sta::find_elmore [get_pins r2/Q] [get_pins u2/B] "rise" "max"]
puts "elmore r2/Q -> u2/B rise max: $elm_r2"
} msg
set elm_r2 [sta::find_elmore [get_pins r2/Q] [get_pins u2/B] "rise" "max"]
puts "elmore r2/Q -> u2/B rise max: $elm_r2"
catch {
set elm_r3 [sta::find_elmore [get_pins r3/Q] [get_pins out] "rise" "max"]
@ -185,15 +161,11 @@ puts "re-set elmore u2/Y -> r3/D: $msg"
report_checks
# Query overridden values
catch {
set pi_u1_new [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y rise max pi (new): $pi_u1_new"
} msg
set pi_u1_new [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y rise max pi (new): $pi_u1_new"
catch {
set elm_u1_new [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y -> u2/A (new): $elm_u1_new"
} msg
set elm_u1_new [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y -> u2/A (new): $elm_u1_new"
#---------------------------------------------------------------
# Test 6: Now override with SPEF
@ -214,30 +186,20 @@ report_parasitic_annotation -report_unannotated
#---------------------------------------------------------------
puts "--- Test 7: query parasitics after SPEF ---"
catch {
set pi_u1_spef [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y pi after SPEF: $pi_u1_spef"
} msg
set pi_u1_spef [sta::find_pi_elmore [get_pins u1/Y] "rise" "max"]
puts "u1/Y pi after SPEF: $pi_u1_spef"
catch {
set pi_u2_spef [sta::find_pi_elmore [get_pins u2/Y] "rise" "max"]
puts "u2/Y pi after SPEF: $pi_u2_spef"
} msg
set pi_u2_spef [sta::find_pi_elmore [get_pins u2/Y] "rise" "max"]
puts "u2/Y pi after SPEF: $pi_u2_spef"
catch {
set pi_r1_spef [sta::find_pi_elmore [get_pins r1/Q] "rise" "max"]
puts "r1/Q pi after SPEF: $pi_r1_spef"
} msg
set pi_r1_spef [sta::find_pi_elmore [get_pins r1/Q] "rise" "max"]
puts "r1/Q pi after SPEF: $pi_r1_spef"
catch {
set elm_u1_spef [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y->u2/A after SPEF: $elm_u1_spef"
} msg
set elm_u1_spef [sta::find_elmore [get_pins u1/Y] [get_pins u2/A] "rise" "max"]
puts "elmore u1/Y->u2/A after SPEF: $elm_u1_spef"
catch {
set elm_r1_spef [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "rise" "max"]
puts "elmore r1/Q->u1/A after SPEF: $elm_r1_spef"
} msg
set elm_r1_spef [sta::find_elmore [get_pins r1/Q] [get_pins u1/A] "rise" "max"]
puts "elmore r1/Q->u1/A after SPEF: $elm_r1_spef"
catch {
set elm_r3_spef [sta::find_elmore [get_pins r3/Q] [get_pins out] "rise" "max"]

View File

@ -145,10 +145,10 @@ puts "DFF_X1/D name: [get_property $lp_d name]"
puts "DFF_X1/D full_name: [get_property $lp_d full_name]"
puts "DFF_X1/D direction: [get_property $lp_d direction]"
puts "DFF_X1/D capacitance: [get_property $lp_d capacitance]"
catch { puts "DFF_X1/D is_clock: [get_property $lp_d is_clock]" }
puts "DFF_X1/D is_clock: [get_property $lp_d is_clock]"
catch { puts "DFF_X1/D is_register_clock: [get_property $lp_d is_register_clock]" }
set lp_ck [get_lib_pins NangateOpenCellLibrary/DFF_X1/CK]
catch { puts "DFF_X1/CK is_clock: [get_property $lp_ck is_clock]" }
puts "DFF_X1/CK is_clock: [get_property $lp_ck is_clock]"
catch { puts "DFF_X1/CK is_register_clock: [get_property $lp_ck is_register_clock]" }
puts "--- Library properties ---"

View File

@ -50,8 +50,8 @@ catch { puts "lport function: [get_property $lport function]" }
puts "lport capacitance: [get_property $lport capacitance]"
catch { puts "lport max_capacitance: [get_property $lport max_capacitance]" }
catch { puts "lport max_transition: [get_property $lport max_transition]" }
catch { puts "lport is_register_clock: [get_property $lport is_register_clock]" }
catch { puts "lport is_clock: [get_property $lport is_clock]" }
puts "lport is_register_clock: [get_property $lport is_register_clock]"
puts "lport is_clock: [get_property $lport is_clock]"
puts "--- LibertyCell extra properties ---"
set buf_cell [get_lib_cells NangateOpenCellLibrary/BUF_X1]

View File

@ -74,16 +74,14 @@ puts "--- set_clock_uncertainty between clocks ---"
set_clock_uncertainty -from [get_clocks clk1] -to [get_clocks clk2] -setup 0.3
report_checks -path_delay max
catch { unset_clock_uncertainty -from [get_clocks clk1] -to [get_clocks clk2] -setup }
unset_clock_uncertainty -from [get_clocks clk1] -to [get_clocks clk2] -setup
############################################################
# Clock sense
############################################################
puts "--- set_clock_sense ---"
catch {
set_clock_sense -positive [get_pins ck1buf1/Z] -clocks [get_clocks clk1]
report_checks -path_delay max
}
set_clock_sense -positive [get_pins ck1buf1/Z] -clocks [get_clocks clk1]
report_checks -path_delay max
############################################################
# Timing derate -early/-late on design level

View File

@ -58,10 +58,8 @@ catch {
}
puts "--- Network edit: disconnect_pin ---"
catch {
disconnect_pin new_buf1 A
puts "disconnect_pin done"
}
disconnect_pin new_buf1 A
puts "disconnect_pin done"
puts "--- Network edit: delete_net ---"
delete_net [get_nets new_net1]