2026-02-13 11:19:09 +01:00
|
|
|
# Test network editing, slow_drivers, replace_cell, connect/disconnect,
|
|
|
|
|
# parasitic-related functions, annotated delay/slew, and misc Sta.cc paths.
|
|
|
|
|
# Targets: Sta.cc makeInstance, deleteInstance, replaceCell, makeNet,
|
|
|
|
|
# deleteNet, connectPin, disconnectPin, makePortPin,
|
|
|
|
|
# slowDrivers, reportParasiticAnnotation,
|
|
|
|
|
# removeDelaySlewAnnotations, setArcDelay, setAnnotatedSlew,
|
|
|
|
|
# setPortExtPinCap, setPortExtWireCap, setPortExtFanout,
|
|
|
|
|
# setNetWireCap, connectedCap, setResistance,
|
|
|
|
|
# networkChanged, delaysInvalidFrom, replaceEquivCellBefore/After,
|
|
|
|
|
# Search.cc reportArrivals, reportTags, reportClkInfos,
|
|
|
|
|
# reportTagGroups, reportPathCountHistogram
|
|
|
|
|
source ../../test/helpers.tcl
|
|
|
|
|
|
|
|
|
|
read_liberty ../../test/nangate45/Nangate45_typ.lib
|
|
|
|
|
read_verilog search_test1.v
|
|
|
|
|
link_design search_test1
|
|
|
|
|
|
|
|
|
|
create_clock -name clk -period 10 [get_ports clk]
|
|
|
|
|
set_input_delay -clock clk 1.0 [get_ports in1]
|
|
|
|
|
set_input_delay -clock clk 1.0 [get_ports in2]
|
|
|
|
|
set_output_delay -clock clk 2.0 [get_ports out1]
|
|
|
|
|
|
|
|
|
|
# Baseline
|
|
|
|
|
report_checks -path_delay max > /dev/null
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# slow_drivers
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- slow_drivers ---"
|
|
|
|
|
set slow [sta::slow_drivers 3]
|
|
|
|
|
puts "slow drivers count: [llength $slow]"
|
|
|
|
|
foreach s $slow {
|
2026-02-19 15:30:23 +01:00
|
|
|
puts " [get_full_name $s]"
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Port external pin cap / wire cap / fanout
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- set_load (port ext pin cap) ---"
|
|
|
|
|
set_load -pin_load 0.01 [get_ports out1]
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
puts "--- set_load -wire_load ---"
|
|
|
|
|
set_load -wire_load 0.005 [get_ports out1]
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
puts "--- set_fanout_load ---"
|
|
|
|
|
set_fanout_load 4 [get_ports out1]
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Input drive / slew
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- set_input_transition ---"
|
|
|
|
|
set_input_transition 0.1 [get_ports in1]
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
puts "--- set_drive ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
set_drive 100 [get_ports in1]
|
|
|
|
|
report_checks -path_delay max
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- set_driving_cell ---"
|
|
|
|
|
set_driving_cell -lib_cell BUF_X1 -pin Z [get_ports in1]
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# set_net_wire_cap (if net wire delay mode)
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- set_wire_load_mode ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
set_wire_load_mode enclosed
|
|
|
|
|
report_checks -path_delay max
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Tag, group, info reporting
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_tags ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_tags
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- report_clk_infos ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_clk_infos
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- report_tag_groups ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_tag_groups
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- report_path_count_histogram ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_path_count_histogram
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- tag/group/path counts ---"
|
|
|
|
|
puts "tags: [sta::tag_count]"
|
|
|
|
|
puts "tag_groups: [sta::tag_group_count]"
|
|
|
|
|
puts "clk_infos: [sta::clk_info_count]"
|
|
|
|
|
puts "paths: [sta::path_count]"
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_tag_arrivals for a vertex
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_tag_arrivals ---"
|
|
|
|
|
set v [sta::worst_slack_vertex max]
|
|
|
|
|
if { $v != "NULL" } {
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_tag_arrivals_cmd $v 1
|
|
|
|
|
sta::report_tag_arrivals_cmd $v 0
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_arrival_entries / report_required_entries
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_arrival_entries ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_arrival_entries
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- report_required_entries ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
sta::report_required_entries
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# find_requireds
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- find_requireds ---"
|
|
|
|
|
sta::find_requireds
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_annotated_delay / report_annotated_check
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_annotated_delay ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
report_annotated_delay
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
puts "--- report_annotated_check ---"
|
2026-02-19 15:30:23 +01:00
|
|
|
report_annotated_check
|
2026-02-13 11:19:09 +01:00
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_disabled_edges
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_disabled_edges ---"
|
|
|
|
|
report_disabled_edges
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Network editing: make_instance, connect, disconnect
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- network editing ---"
|
|
|
|
|
set edit_net [make_net new_net]
|
|
|
|
|
puts "new_net: [get_full_name $edit_net]"
|
|
|
|
|
|
|
|
|
|
puts "--- make_instance ---"
|
|
|
|
|
set new_inst [make_instance new_buf BUF_X1]
|
|
|
|
|
puts "new_inst: [get_full_name $new_inst]"
|
|
|
|
|
|
|
|
|
|
puts "--- connect_pin ---"
|
|
|
|
|
connect_pin $edit_net new_buf/A
|
|
|
|
|
|
|
|
|
|
connect_pin $edit_net new_buf/Z
|
|
|
|
|
|
|
|
|
|
puts "--- disconnect_pin ---"
|
|
|
|
|
disconnect_pin $edit_net new_buf/Z
|
|
|
|
|
|
|
|
|
|
puts "--- disconnect_pin A ---"
|
|
|
|
|
disconnect_pin $edit_net new_buf/A
|
|
|
|
|
|
|
|
|
|
puts "--- delete_instance ---"
|
|
|
|
|
delete_instance $new_inst
|
|
|
|
|
|
|
|
|
|
puts "--- delete_net ---"
|
|
|
|
|
delete_net $edit_net
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# replace_cell
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- replace_cell ---"
|
|
|
|
|
set old_inst [get_cells buf1]
|
|
|
|
|
replace_cell $old_inst BUF_X2
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
puts "--- replace_cell back ---"
|
|
|
|
|
replace_cell $old_inst BUF_X1
|
|
|
|
|
report_checks -path_delay max
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# write_verilog
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- write_verilog ---"
|
|
|
|
|
set verilog_out [make_result_file "search_test1_edited.v"]
|
|
|
|
|
write_verilog $verilog_out
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# write_sdc
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- write_sdc ---"
|
|
|
|
|
set sdc_out [make_result_file "search_test1_edited.sdc"]
|
|
|
|
|
write_sdc $sdc_out
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Vertex arrival/required/slack queries
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- vertex queries ---"
|
|
|
|
|
set wv [sta::worst_slack_vertex max]
|
|
|
|
|
if { $wv != "NULL" } {
|
2026-02-19 15:30:23 +01:00
|
|
|
set warr [sta::vertex_worst_arrival_path $wv max]
|
|
|
|
|
if { $warr != "NULL" } {
|
|
|
|
|
puts "worst_arrival pin: [get_full_name [$warr pin]]"
|
|
|
|
|
puts "worst_arrival arrival: [$warr arrival]"
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
2026-02-19 15:30:23 +01:00
|
|
|
set wslk [sta::vertex_worst_slack_path $wv max]
|
|
|
|
|
if { $wslk != "NULL" } {
|
|
|
|
|
puts "worst_slack pin: [get_full_name [$wslk pin]]"
|
|
|
|
|
puts "worst_slack slack: [$wslk slack]"
|
2026-02-13 11:19:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_path_end_header/footer
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_path_end header/footer ---"
|
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 pes [find_timing_paths -path_delay max -endpoint_count 3]
|
2026-02-13 11:19:09 +01:00
|
|
|
foreach pe $pes {
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# report_checks -format json
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- json format ---"
|
|
|
|
|
report_checks -path_delay max -format json
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# set_report_path_field_properties (ReportPath.cc)
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- set_report_path_field_properties ---"
|
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
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
# Report checks min_max variants
|
|
|
|
|
############################################################
|
|
|
|
|
puts "--- report_checks -path_delay min_max ---"
|
|
|
|
|
report_checks -path_delay min_max
|