2026-02-13 11:19:09 +01:00
|
|
|
# Test ReportPath.cc: All report_path format variants with field combinations,
|
|
|
|
|
# reportPathFull, reportPath3, set_report_path_format, set_report_path_fields,
|
|
|
|
|
# set_report_path_field_order, reportHierPinsThru, reportInputExternalDelay,
|
|
|
|
|
# drvrFanout, hasExtInputDriver, clkNetworkDelayIdealProp,
|
|
|
|
|
# descriptionField, descriptionNet.
|
|
|
|
|
# Also exercises reportStartpoint, reportEndpoint, reportGroup for
|
|
|
|
|
# different PathEnd types, and report_path_cmd with different formats.
|
|
|
|
|
# Targets: ReportPath.cc reportPathFull, reportPath3, reportPath4/5/6,
|
|
|
|
|
# setReportFieldOrder, setReportFields, reportPathLine with fields,
|
|
|
|
|
# reportStartpoint, reportEndpoint, reportGroup,
|
|
|
|
|
# reportRequired, reportSlack, reportCommonClkPessimism,
|
|
|
|
|
# reportClkUncertainty, pathStartpoint, pathEndpoint
|
|
|
|
|
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]
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# All format x fields combinations
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- format full + all field combos ---"
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance}
|
|
|
|
|
report_checks -path_delay max -format full -fields {slew}
|
|
|
|
|
report_checks -path_delay max -format full -fields {fanout}
|
|
|
|
|
report_checks -path_delay max -format full -fields {input_pin}
|
|
|
|
|
report_checks -path_delay max -format full -fields {net}
|
|
|
|
|
report_checks -path_delay max -format full -fields {src_attr}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance slew}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance fanout}
|
|
|
|
|
report_checks -path_delay max -format full -fields {slew fanout}
|
|
|
|
|
report_checks -path_delay max -format full -fields {input_pin net}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance slew fanout}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance slew fanout input_pin}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance slew fanout input_pin net}
|
|
|
|
|
report_checks -path_delay max -format full -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
|
|
|
|
|
puts "--- format full_clock + fields ---"
|
|
|
|
|
report_checks -path_delay max -format full_clock -fields {capacitance slew fanout}
|
|
|
|
|
report_checks -path_delay max -format full_clock -fields {input_pin net src_attr}
|
|
|
|
|
report_checks -path_delay max -format full_clock -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
|
|
|
|
|
puts "--- format full_clock_expanded + fields ---"
|
|
|
|
|
report_checks -path_delay max -format full_clock_expanded -fields {capacitance slew fanout}
|
|
|
|
|
report_checks -path_delay max -format full_clock_expanded -fields {input_pin net src_attr}
|
|
|
|
|
report_checks -path_delay max -format full_clock_expanded -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
report_checks -path_delay min -format full_clock_expanded -fields {capacitance slew fanout input_pin net src_attr}
|
|
|
|
|
|
|
|
|
|
puts "--- format short + fields ---"
|
|
|
|
|
report_checks -path_delay max -format short -fields {capacitance}
|
|
|
|
|
report_checks -path_delay max -format short -fields {slew}
|
|
|
|
|
report_checks -path_delay max -format short -fields {capacitance slew fanout}
|
|
|
|
|
|
|
|
|
|
puts "--- format end ---"
|
|
|
|
|
report_checks -path_delay max -format end
|
|
|
|
|
report_checks -path_delay min -format end
|
|
|
|
|
|
|
|
|
|
puts "--- format summary ---"
|
|
|
|
|
report_checks -path_delay max -format summary
|
|
|
|
|
report_checks -path_delay min -format summary
|
|
|
|
|
|
|
|
|
|
puts "--- format slack_only ---"
|
|
|
|
|
report_checks -path_delay max -format slack_only
|
|
|
|
|
report_checks -path_delay min -format slack_only
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_path_cmd with different internal formats
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_path_cmd with formats ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
set paths [find_timing_paths -path_delay max -endpoint_count 3]
|
2026-02-13 11:19:09 +01:00
|
|
|
foreach pe $paths {
|
|
|
|
|
set p [$pe path]
|
|
|
|
|
|
|
|
|
|
# Full format
|
|
|
|
|
sta::set_report_path_format full
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
|
|
|
|
|
# Full clock
|
|
|
|
|
sta::set_report_path_format full_clock
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
|
|
|
|
|
# Full clock expanded
|
|
|
|
|
sta::set_report_path_format full_clock_expanded
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
|
|
|
|
|
# JSON
|
|
|
|
|
sta::set_report_path_format json
|
|
|
|
|
sta::report_path_cmd $p
|
|
|
|
|
|
|
|
|
|
sta::set_report_path_format full
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
############################################################
|
2026-03-21 11:23:36 +01:00
|
|
|
# set_report_path_field_properties
|
2026-02-13 11:19:09 +01:00
|
|
|
############################################################
|
|
|
|
|
puts "--- field properties ---"
|
2026-03-21 11:23:36 +01:00
|
|
|
sta::set_report_path_field_properties "delay" "Delay" 12 0
|
2026-02-13 11:19:09 +01:00
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
2026-03-21 11:23:36 +01:00
|
|
|
sta::set_report_path_field_properties "total" "Total" 14 0
|
2026-02-13 11:19:09 +01:00
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# set_report_path_no_split
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_path_no_split ---"
|
|
|
|
|
sta::set_report_path_no_split 1
|
|
|
|
|
report_checks -path_delay max -fields {capacitance slew fanout}
|
|
|
|
|
sta::set_report_path_no_split 0
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Digits
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- digits ---"
|
|
|
|
|
report_checks -path_delay max -digits 2
|
|
|
|
|
report_checks -path_delay max -digits 4
|
|
|
|
|
report_checks -path_delay max -digits 6
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Per-endpoint reporting
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- per-endpoint ---"
|
|
|
|
|
report_checks -to [get_ports out1] -path_delay max -format full_clock_expanded -fields {capacitance slew fanout input_pin net}
|
|
|
|
|
report_checks -to [get_ports out2] -path_delay max -format full_clock_expanded -fields {capacitance slew fanout input_pin net}
|
|
|
|
|
report_checks -to [get_ports out1] -path_delay min -format full_clock_expanded -fields {capacitance slew fanout}
|
|
|
|
|
report_checks -to [get_ports out2] -path_delay min -format full_clock_expanded -fields {capacitance slew fanout}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# From specific pins
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- from pins ---"
|
|
|
|
|
report_checks -from [get_pins reg1/CK] -path_delay max -format full_clock_expanded -fields {capacitance slew}
|
|
|
|
|
report_checks -from [get_ports in1] -path_delay max -format full_clock -fields {slew fanout}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# min_max
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- min_max ---"
|
|
|
|
|
report_checks -path_delay min_max -format full_clock_expanded -fields {capacitance slew fanout}
|
|
|
|
|
|
|
|
|
|
############################################################
|
2026-02-23 15:05:29 +01:00
|
|
|
# report_checks JSON with endpoint_count
|
2026-02-13 11:19:09 +01:00
|
|
|
############################################################
|
|
|
|
|
puts "--- JSON endpoint count ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
report_checks -path_delay max -format json -endpoint_count 5
|
|
|
|
|
report_checks -path_delay min -format json -endpoint_count 5
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_checks with -corner
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- corner ---"
|
2026-02-23 15:05:29 +01:00
|
|
|
set corner [sta::cmd_scene]
|
|
|
|
|
report_checks -path_delay max -corner $corner -format full_clock_expanded -fields {capacitance slew}
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# set_input_transition and verify report includes it
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- input_transition in report ---"
|
|
|
|
|
set_input_transition 0.15 [get_ports in1]
|
|
|
|
|
report_checks -from [get_ports in1] -path_delay max -format full_clock_expanded -fields {slew}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# set_driving_cell and report
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- driving_cell in report ---"
|
|
|
|
|
set_driving_cell -lib_cell BUF_X2 -pin Z [get_ports in2]
|
|
|
|
|
report_checks -from [get_ports in2] -path_delay max -format full_clock_expanded -fields {capacitance slew}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_path_end_header/footer with min paths
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_path_end min ---"
|
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-23 15:05:29 +01:00
|
|
|
set min_paths [find_timing_paths -path_delay min -endpoint_count 5]
|
2026-02-13 11:19:09 +01:00
|
|
|
foreach pe $min_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
|
|
|
}
|