2026-02-13 11:19:09 +01:00
|
|
|
# Test ReportPath.cc expanded report paths, JSON format internals,
|
|
|
|
|
# PathExpanded.cc, and PathEnd report variants.
|
|
|
|
|
# Targets: ReportPath.cc reportPathEnds, reportJson, reportEndpointHeader,
|
|
|
|
|
# reportEndLine, reportSummaryLine, reportSlackOnly,
|
|
|
|
|
# reportFull for various PathEnd types, reportPathEndHeader/Footer
|
|
|
|
|
source ../../test/helpers.tcl
|
|
|
|
|
|
|
|
|
|
read_liberty ../../test/nangate45/Nangate45_typ.lib
|
|
|
|
|
read_verilog search_crpr_data_checks.v
|
|
|
|
|
link_design search_crpr_data_checks
|
|
|
|
|
|
|
|
|
|
create_clock -name clk1 -period 10 [get_ports clk1]
|
|
|
|
|
create_clock -name clk2 -period 8 [get_ports clk2]
|
|
|
|
|
set_propagated_clock [get_clocks clk1]
|
|
|
|
|
set_propagated_clock [get_clocks clk2]
|
|
|
|
|
|
|
|
|
|
set_input_delay -clock clk1 1.0 [get_ports in1]
|
|
|
|
|
set_input_delay -clock clk1 1.0 [get_ports in2]
|
|
|
|
|
set_output_delay -clock clk1 2.0 [get_ports out1]
|
|
|
|
|
set_output_delay -clock clk2 2.0 [get_ports out2]
|
|
|
|
|
|
|
|
|
|
# Cross-domain false path
|
|
|
|
|
set_false_path -from [get_clocks clk1] -to [get_clocks clk2]
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks full_clock_expanded with CRPR ---"
|
|
|
|
|
report_checks -path_delay max -format full_clock_expanded
|
|
|
|
|
report_checks -path_delay min -format full_clock_expanded
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks -to each output ---"
|
|
|
|
|
report_checks -to [get_ports out1] -path_delay max -format full_clock_expanded
|
|
|
|
|
report_checks -to [get_ports out2] -path_delay max -format full_clock_expanded
|
|
|
|
|
report_checks -to [get_ports out1] -path_delay min -format full_clock_expanded
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks -from specific pins ---"
|
|
|
|
|
report_checks -from [get_pins reg1/CK] -path_delay max -format full_clock_expanded
|
|
|
|
|
report_checks -from [get_ports in1] -path_delay max -format full_clock
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks with various fields ---"
|
|
|
|
|
report_checks -path_delay max -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
report_checks -path_delay min -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks with -no_line_splits ---"
|
|
|
|
|
report_checks -path_delay max -no_line_splits
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks with digits ---"
|
|
|
|
|
report_checks -path_delay max -digits 6
|
|
|
|
|
report_checks -path_delay min -digits 6
|
|
|
|
|
|
|
|
|
|
puts "--- report_checks JSON format ---"
|
|
|
|
|
report_checks -path_delay max -format json
|
|
|
|
|
report_checks -path_delay min -format json
|
|
|
|
|
|
2026-02-23 15:05:29 +01:00
|
|
|
puts "--- report_checks JSON with endpoint_count ---"
|
|
|
|
|
report_checks -path_delay max -format json -endpoint_count 3
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- find_timing_paths and iterate ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
set paths [find_timing_paths -path_delay max -endpoint_count 5 -group_path_count 10]
|
2026-02-13 11:19:09 +01:00
|
|
|
puts "Found [llength $paths] paths"
|
|
|
|
|
|
|
|
|
|
# Report each path individually with different formats
|
|
|
|
|
set idx 0
|
|
|
|
|
foreach pe $paths {
|
|
|
|
|
set p [$pe path]
|
|
|
|
|
puts "Path $idx:"
|
|
|
|
|
puts " pin: [get_full_name [$pe pin]]"
|
|
|
|
|
puts " slack: [$pe slack]"
|
|
|
|
|
puts " arrival: [$p arrival]"
|
|
|
|
|
puts " required: [$p required]"
|
|
|
|
|
|
|
|
|
|
# Expanded path pins
|
|
|
|
|
set pins [$p pins]
|
|
|
|
|
puts " path_pins: [llength $pins]"
|
|
|
|
|
|
|
|
|
|
# Check path start
|
|
|
|
|
set sp [$p start_path]
|
|
|
|
|
if { $sp != "NULL" } {
|
|
|
|
|
puts " start_path pin: [get_full_name [$sp pin]]"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
incr idx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
puts "--- report_path_end with prev_end chaining ---"
|
test: Fix post-merge build errors and regolden .ok files
After merging upstream changes, fix all build errors in C++ test files
and regolden Tcl test golden files to match updated code output.
Build fixes:
- dcalc/test/cpp/TestDcalc.cc: Fix const char* loop iterations, use
EXPECT_NEAR for uninitialized subnormal float comparison
- liberty/test/cpp/TestLibertyStaBasicsB.cc: Wrap tests using removed
LibertyBuilder() default constructor in #if 0
- liberty/test/cpp/TestLibertyStaCallbacks.cc: Fix LibertyBuilder()
call to use sta_->debug()/report(); wrap old visitor tests in #if 0
- search/test/cpp/TestSearchStaDesignB.cc: Fix pg->name() nullptr
comparison (now returns std::string&)
- search/test/cpp/TestSearchStaInit.cc: Fix 5 clkPinsInvalid/isIdealClock
tests to expect throw (API now requires linked network)
Tcl test fixes:
- Remove calls to removed APIs: report_path_end_header/footer, report_path_end2
from 6 search test scripts; regolden their .ok files
- Regolden .ok files for liberty (15), graph (1), network (8),
parasitics (3), sdc (3), util (2), verilog (8) modules to reflect
upstream format changes (timing arcs output, pin ordering, spacing)
All 6103 tests now pass.
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 09:11:08 +01:00
|
|
|
# report_path_end_header/footer/2 removed from API
|
2026-02-13 11:19:09 +01:00
|
|
|
foreach pe $paths {
|
test: Fix post-merge build errors and regolden .ok files
After merging upstream changes, fix all build errors in C++ test files
and regolden Tcl test golden files to match updated code output.
Build fixes:
- dcalc/test/cpp/TestDcalc.cc: Fix const char* loop iterations, use
EXPECT_NEAR for uninitialized subnormal float comparison
- liberty/test/cpp/TestLibertyStaBasicsB.cc: Wrap tests using removed
LibertyBuilder() default constructor in #if 0
- liberty/test/cpp/TestLibertyStaCallbacks.cc: Fix LibertyBuilder()
call to use sta_->debug()/report(); wrap old visitor tests in #if 0
- search/test/cpp/TestSearchStaDesignB.cc: Fix pg->name() nullptr
comparison (now returns std::string&)
- search/test/cpp/TestSearchStaInit.cc: Fix 5 clkPinsInvalid/isIdealClock
tests to expect throw (API now requires linked network)
Tcl test fixes:
- Remove calls to removed APIs: report_path_end_header/footer, report_path_end2
from 6 search test scripts; regolden their .ok files
- Regolden .ok files for liberty (15), graph (1), network (8),
parasitics (3), sdc (3), util (2), verilog (8) modules to reflect
upstream format changes (timing arcs output, pin ordering, spacing)
All 6103 tests now pass.
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-03-11 09:11:08 +01:00
|
|
|
sta::report_path_end $pe
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
puts "--- report_path_ends as sequence ---"
|
|
|
|
|
sta::report_path_ends $paths
|
|
|
|
|
|
|
|
|
|
puts "--- set_report_path_format json then report ---"
|
|
|
|
|
sta::set_report_path_format json
|
2026-02-23 15:05:29 +01:00
|
|
|
set paths2 [find_timing_paths -path_delay max -endpoint_count 3]
|
2026-02-13 11:19:09 +01:00
|
|
|
foreach pe $paths2 {
|
|
|
|
|
set p [$pe path]
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
sta::set_report_path_format full
|
|
|
|
|
|
|
|
|
|
puts "--- set_report_path_format full_clock_expanded ---"
|
|
|
|
|
sta::set_report_path_format full_clock_expanded
|
|
|
|
|
set paths3 [find_timing_paths -path_delay max]
|
|
|
|
|
foreach pe $paths3 {
|
|
|
|
|
set p [$pe path]
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
sta::set_report_path_format full
|
|
|
|
|
|
|
|
|
|
puts "--- PathEnd vertex access ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
set paths_v [find_timing_paths -path_delay max -endpoint_count 2]
|
2026-02-19 15:30:23 +01:00
|
|
|
foreach pe $paths_v {
|
|
|
|
|
set v [$pe vertex]
|
|
|
|
|
puts "vertex: [get_full_name [$v pin]]"
|
2026-02-23 15:05:29 +01:00
|
|
|
# TODO: Vertex is_clock and has_downstream_clk_pin methods removed from SWIG
|
|
|
|
|
# puts " is_clock: [$v is_clock]"
|
|
|
|
|
# puts " has_downstream_clk_pin: [$v has_downstream_clk_pin]"
|
|
|
|
|
puts " is_clock: skipped (API removed)"
|
|
|
|
|
puts " has_downstream_clk_pin: skipped (API removed)"
|
2026-02-19 15:30:23 +01:00
|
|
|
break
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
puts "--- find_timing_paths min_max ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
set paths_mm [find_timing_paths -path_delay min_max -endpoint_count 3]
|
2026-02-13 11:19:09 +01:00
|
|
|
puts "min_max paths: [llength $paths_mm]"
|
|
|
|
|
foreach pe $paths_mm {
|
|
|
|
|
puts " min_max: [$pe min_max] slack=[$pe slack]"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
puts "--- report_tns/wns ---"
|
|
|
|
|
report_tns
|
|
|
|
|
report_wns
|
|
|
|
|
report_worst_slack -max
|
|
|
|
|
report_worst_slack -min
|
|
|
|
|
report_tns -digits 6
|
|
|
|
|
report_wns -digits 6
|
|
|
|
|
report_worst_slack -max -digits 6
|
|
|
|
|
|
|
|
|
|
puts "--- search debug info ---"
|
|
|
|
|
puts "tag_group_count: [sta::tag_group_count]"
|
|
|
|
|
puts "tag_count: [sta::tag_count]"
|
|
|
|
|
puts "clk_info_count: [sta::clk_info_count]"
|
|
|
|
|
puts "path_count: [sta::path_count]"
|