test: Apply review feedback - part1

Signed-off-by: Jaehyun Kim <[email protected]>
This commit is contained in:
Jaehyun Kim
2026-02-19 23:30:23 +09:00
parent fdb24d8132
commit 6799b1909a
585 changed files with 5549 additions and 99794 deletions
-30
View File
@@ -25,65 +25,53 @@ set_output_delay -clock clk 0 [get_ports out1]
puts "--- get_cells with wildcard * ---"
set cells_star [get_cells buf*]
puts "buf* cells: [llength $cells_star]"
puts "PASS: get_cells wildcard *"
# Wildcard: '?' single char
puts "--- get_cells with ? wildcard ---"
set cells_q [get_cells buf?]
puts "buf? cells: [llength $cells_q]"
puts "PASS: get_cells wildcard ?"
# Wildcard: exact match (no wildcards)
puts "--- get_cells exact match ---"
set cells_exact [get_cells buf1]
puts "buf1 cells: [llength $cells_exact]"
puts "PASS: get_cells exact match"
# Wildcard: '*' matching everything
puts "--- get_cells * ---"
set cells_all [get_cells *]
puts "* cells: [llength $cells_all]"
puts "PASS: get_cells *"
# get_pins with wildcards
puts "--- get_pins with wildcards ---"
set pins_star [get_pins buf1/*]
puts "buf1/* pins: [llength $pins_star]"
puts "PASS: get_pins wildcard"
set pins_q [get_pins buf1/?]
puts "buf1/? pins: [llength $pins_q]"
puts "PASS: get_pins ? wildcard"
set pins_all [get_pins */*]
puts "*/* pins: [llength $pins_all]"
puts "PASS: get_pins */*"
# get_ports with wildcards
puts "--- get_ports with wildcards ---"
set ports_star [get_ports *1]
puts "*1 ports: [llength $ports_star]"
puts "PASS: get_ports wildcard"
set ports_all [get_ports *]
puts "* ports: [llength $ports_all]"
puts "PASS: get_ports *"
# get_nets with wildcards
puts "--- get_nets with wildcards ---"
set nets_star [get_nets n*]
puts "n* nets: [llength $nets_star]"
puts "PASS: get_nets wildcard"
# Pattern that matches nothing
puts "--- non-matching patterns ---"
set rc [catch {get_cells zzz_nonexistent} msg]
puts "get_cells nonexistent: rc=$rc"
puts "PASS: non-matching pattern"
set rc [catch {get_pins zzz_nonexistent/*} msg]
puts "get_pins nonexistent: rc=$rc"
puts "PASS: non-matching pin pattern"
#---------------------------------------------------------------
# get_lib_cells with wildcards (exercises PatternMatch::match)
@@ -91,15 +79,12 @@ puts "PASS: non-matching pin pattern"
puts "--- get_lib_cells with wildcards ---"
set lc1 [get_lib_cells NangateOpenCellLibrary/BUF*]
puts "BUF* lib_cells: [llength $lc1]"
puts "PASS: get_lib_cells wildcard"
set lc2 [get_lib_cells NangateOpenCellLibrary/DFF_X?]
puts "DFF_X? lib_cells: [llength $lc2]"
puts "PASS: get_lib_cells ? wildcard"
set lc3 [get_lib_cells NangateOpenCellLibrary/*]
puts "* lib_cells: [llength $lc3]"
puts "PASS: get_lib_cells *"
#---------------------------------------------------------------
# Debug.cc coverage: set_debug with various levels, stats
@@ -108,17 +93,14 @@ puts "--- set_debug with level > 0 ---"
sta::set_debug "search" 3
sta::set_debug "graph" 2
sta::set_debug "delay_calc" 1
puts "PASS: set_debug multiple modules"
# Trigger debug check path by running timing with debug on
report_checks
puts "PASS: report_checks with debug on"
# Turn off debug levels
sta::set_debug "search" 0
sta::set_debug "graph" 0
sta::set_debug "delay_calc" 0
puts "PASS: set_debug all off"
#---------------------------------------------------------------
# Error.cc: FileNotWritable path
@@ -126,7 +108,6 @@ puts "PASS: set_debug all off"
puts "--- FileNotWritable error path ---"
set rc [catch { write_sdf "/nonexistent_dir/no_write.sdf" } msg]
if { $rc != 0 } {
puts "PASS: caught FileNotWritable for bad path"
} else {
puts "INFO: no error for bad write path"
}
@@ -134,7 +115,6 @@ if { $rc != 0 } {
# Try write to read-only path
set rc [catch { log_begin "/proc/nonexistent_log" } msg]
if { $rc != 0 } {
puts "PASS: caught error for unwritable log path"
} else {
log_end
puts "INFO: log_begin succeeded on /proc path"
@@ -148,13 +128,10 @@ set_input_transition 0.1 [get_ports in1]
set_input_transition 0.2 [get_ports in1] -rise
set_input_transition 0.15 [get_ports in1] -fall
report_checks -fields {slew cap}
puts "PASS: report_checks with rise/fall transitions"
report_checks -path_delay min -fields {slew cap input_pins}
puts "PASS: report_checks min with fields"
report_checks -path_delay max -fields {slew cap input_pins}
puts "PASS: report_checks max with fields"
#---------------------------------------------------------------
# RiseFallMinMax / RiseFallValues coverage
@@ -163,14 +140,12 @@ puts "--- set_load rise/fall ---"
set_load -min 0.05 [get_ports out1]
set_load -max 0.1 [get_ports out1]
report_checks
puts "PASS: report_checks with min/max loads"
set_load -rise -min 0.02 [get_ports out1]
set_load -fall -min 0.03 [get_ports out1]
set_load -rise -max 0.08 [get_ports out1]
set_load -fall -max 0.09 [get_ports out1]
report_checks
puts "PASS: report_checks with rise/fall min/max loads"
set_load 0 [get_ports out1]
@@ -182,14 +157,12 @@ with_output_to_variable v1 {
report_checks
}
puts "v1 captured [string length $v1] chars"
puts "PASS: with_output_to_variable"
with_output_to_variable v2 {
report_checks -path_delay min
report_checks -path_delay max
}
puts "v2 captured [string length $v2] chars"
puts "PASS: with_output_to_variable multiple reports"
#---------------------------------------------------------------
# Redirect string with content
@@ -199,6 +172,3 @@ sta::redirect_string_begin
report_checks -fields {slew cap input_pins}
set rstr [sta::redirect_string_end]
puts "redirect string: [string length $rstr] chars"
puts "PASS: redirect_string with full report"
puts "ALL PASSED"