Commit Graph

2207 Commits

Author SHA1 Message Date
Jaehyun Kim b98c2d0bcc test: harden module Tcl coverage tests
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-24 14:08:56 +09:00
Jaehyun Kim bc728e1668 Remove accidentally committed non-source files from tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-24 12:09:09 +09:00
Jaehyun Kim 8adbcc0d6d Merge upstream STA update and adapt all tests to new API
Major upstream refactoring: Corner→Scene, Mode architecture, warning
format change (Warning ID:), command renames, and many API signature
changes. Adapted all C++ test files and TCL test scripts/expected
output files to pass with the new API. 6159/6159 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 23:05:29 +09:00
Jaehyun Kim 7173c10cc1 test: strengthen assertions, add sorted SDC diff, and clean up tests
- Split oversized test files to stay under 5,000 lines per file:
  TestSdc.cc → TestSdcClasses.cc, TestSdcStaInit.cc, TestSdcStaDesign.cc
  TestSearchStaDesign.cc → TestSearchStaDesign.cc, TestSearchStaDesignB.cc
  TestLibertyStaBasics.cc → TestLibertyStaBasics.cc, TestLibertyStaBasicsB.cc
  TestNetwork.cc → TestNetwork.cc, TestNetworkB.cc
- Replace ~200+ (void) casts with proper EXPECT_* assertions across all
  C++ test files (dcalc, liberty, network, sdc, search, power, spice, util)
- Remove ~55 SUCCEED() and EXPECT_TRUE(true) no-op assertions
- Fix 6 load-only Tcl tests by adding diff_files verification with
  22 new .sdcok golden reference files
- Delete 7 orphan .ok files with no matching .tcl tests
- Add how_to_write_good_tests.md and TODO6.md documenting test quality rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 17:36:45 +09:00
Jaehyun Kim a242c3f2f2 Refactor test suites and strengthen cpp test assertions 2026-02-23 14:13:29 +09:00
Jaehyun Kim b6d598a119 test: strengthen assertions, add sorted SDC diff, and clean up tests
- Add diff_files_sorted to test/helpers.tcl for hash-order-independent
  SDC comparison (fixes non-deterministic write_sdc output ordering)
- Use diff_files_sorted in sdc_derate_disable_deep and
  sdc_port_delay_advanced tests
- Remove stale coverage percentages from test comments (Comment 1)
- Remove unnecessary catch blocks in search property tests (Comment 3)
- Strengthen load-only tests with actual data verification (Comment 8)
- Remove orphan .ok files for deleted monolithic tests (Comment 9)
- Add golden .sdcok/.libok/.vok/.sdfok files for SDC/liberty/verilog
  write-and-diff tests
- Add -B (clean rebuild) option to make_coverage_report.sh
- Replace (void) casts and EXPECT_TRUE(true) with real assertions in
  TestSdc.cc and TestVerilog.cc

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 11:50:23 +09:00
Matt Liberty a14a16c3ad
Merge pull request #288 from The-OpenROAD-Project-staging/pull-rel_3.0
Pull 3.0 with multimode from parallaxsw
2026-02-22 19:43:57 +00:00
Jaehyun Kim c72a42e827 test: strengthen liberty and verilog test assertions
Add meaningful verification to liberty ECSM, sky130 corners, writer,
and roundtrip tests. Expand verilog specify, escaped-write, remove-cells,
write, and writer tests with content checks, roundtrip validation, and
error guards. Update corresponding .ok golden files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-23 00:22:31 +09:00
Jaehyun Kim e0f47a92f4 test: remove empty if-bodies and meaningless status prints
Negate conditions in empty if-body assertions so the FAIL message
is printed directly (e.g. `if { $x != 0 } { } else { puts FAIL }`
becomes `if { $x == 0 } { puts FAIL }`).  Remove dead if/else blocks
where both branches were empty, strip meaningless status-only puts
from Tcl tests and their .ok golden files, and wrap a long line in
search_report_gated_datacheck.tcl to stay within 80 columns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 23:43:31 +09:00
Jaehyun Kim a58d7e4cc6 test: add explicit assertions to all cpp test cases
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 21:14:35 +09:00
Jaehyun Kim 10104f85ea test: load ECSM liberty from checked-in file
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 20:37:11 +09:00
Jaehyun Kim b55fcabee4 test: improve test stability and assertions
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 20:34:07 +09:00
Jaehyun Kim 76b12eb2d2 test: Improve test assertions and stabilize multimodule write test
Strengthen C++ test assertions in TestSdc and TestSearch with actual
value checks. Stabilize verilog_multimodule_write by using clear_sta
for isolated roundtrips. Add report_checks to wireload model tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 19:25:58 +09:00
Jaehyun Kim 0693e7d479 test: Strengthen C++ test assertions with meaningful checks
Replace empty-body checks and trivial file-existence assertions with
actual content verification and state validation in C++ unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 18:52:36 +09:00
Jaehyun Kim e5d8d8c970 test: Remove empty-body assertions and fix test issues from review feedback
Remove useless empty-body if-blocks that check file size/existence without
doing anything, replacing them with meaningful puts output where appropriate.
Split monolithic verilog test files into individual per-test files with
their own .ok golden files. Update .ok files to match actual output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-22 18:52:36 +09:00
Martin Povišer 9a14ce0870 Fix null deref in findClkDelays
This was observed to cause crashes in write_timing_model.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2026-02-21 22:25:48 +01:00
Jaehyun Kim 98e00b0348 test: Delete dead code from Tcl tests and remove broken write_gate_spice tests
Remove dead code blocks that reference non-exposed Tcl commands (e.g.,
sta::find_pi_pole_residue) and delete all write_gate_spice catch blocks
from spice tests since write_gate_spice_cmd SWIG binding is missing,
making all write_gate_spice calls always fail. Added bug report for the
missing binding. All 6531 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:40:50 +09:00
Jaehyun Kim 2d2762437a test: Remove unnecessary catch blocks from Tcl tests across all modules
Remove bare catch blocks that silently swallowed errors instead of
properly testing them. Fix underlying issues revealed by catch removal
including wrong API calls ([$role name] on strings, invalid properties
like cell_leakage_power/is_register, nonexistent Tcl bindings) and
incorrect library names. Update golden .ok files to match new output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:07:40 +09:00
Jaehyun Kim 726a64a961 test: Add explanatory comments to all catch blocks in Tcl tests
Document why each catch block is needed across 48 test files,
covering liberty, search, sdc, spice, network, parasitics, util,
and verilog modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:39:36 +09:00
Jaehyun Kim ce45133c84 test: Fix wrong API calls in Tcl tests and remove unnecessary catches
Replace wrong/non-existent command calls with correct OpenSTA APIs:
- sta::pin_slack → get_property $pin slack_max_rise
- sta::slow_drivers_cmd → sta::slow_drivers
- set_latch_borrow_limit → set_max_time_borrow
- remove_data_check → unset_data_check
- remove_clock → delete_clock
- reset_path → unset_path_exceptions
- sta::report_path_end 3-arg → sta::report_path_end2
- sta::design_power "NULL" → sta::design_power [sta::cmd_corner]
- report_path $path → sta::report_path_cmd $path
- connect_pin 3-arg → connect_pin net inst/port
- set_power_activity positional → -input_ports flag
- sta::is_clock [get_ports] → sta::is_clock [sta::get_port_pin]
- get_property $inst lib_name → liberty_cell/liberty_library
- get_property $pin net_name → [$pin net] + get_full_name
- get_property $net is_power → $net is_power method
- Removed unnecessary catch around sta::write_liberty

23 catch blocks removed. Tests now execute real API calls instead
of silently failing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:32:08 +09:00
Jaehyun Kim 812d26f14c test: Apply review feedback - part4
Remove unnecessary catch blocks in network, parasitics, sdc, spice,
and util test modules. Add report_checks after set_wire_load_model
in parasitics_wireload.tcl to verify timing changes per wireload.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:13:55 +09:00
Jaehyun Kim 5c9b4d7a15 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>
2026-02-20 13:46:30 +09:00
Jaehyun Kim e57c8043cd test: Apply review feedback - part3
Remove unnecessary catch blocks from Tcl test files across all modules,
add report_checks after each set_wire_load_model in liberty_wireload,
rewrite liberty_sky130_corners for actual multi-corner timing analysis
with define_corners, and expand C++ tests (TestSearchIncremental 8→36,
TestPower 71→96, TestSpice 98→126 tests).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:05:07 +09:00
Jaehyun Kim 547737f71e test: Apply review feedback - part2
- Remove stale line-number coverage comments (# Targets: line NNN, hit=0)
- Remove useless file-existence checks from verilog/sdf tests
- Delete 21 orphaned dcalc Tcl tests (C++ tests already cover them)
- Rename liberty_ccsn_ecsm -> liberty_ccsn (no ECSM libs available)
- Fix liberty_sky130_corners to use define_corners/-corner for real multi-corner testing
- Add report_checks per wireload model in liberty_wireload
- Fix test/regression to work from test/ directory (label mismatch)
- Refactor all module CMakeLists.txt with sta_module_tests() macro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 01:13:42 +09:00
Jaehyun Kim 6799b1909a test: Apply review feedback - part1
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-19 23:30:23 +09:00
Martin Povišer 7adcf74a57 Fix deprecation warning
Signed-off-by: Martin Povišer <povik@cutebit.org>
2026-02-19 15:15:36 +01:00
Martin Povišer d252a27586 Regolden tests
Signed-off-by: Martin Povišer <povik@cutebit.org>
2026-02-19 11:32:22 +01:00
Martin Povišer f493ef0138 Restore lost `Sta::arrival` variant
Signed-off-by: Martin Povišer <povik@cutebit.org>
2026-02-19 11:31:38 +01:00
Martin Povišer 0d34825700 Merge remote-tracking branch 'parallax/rel_3.0' into pull-rel_3.0 2026-02-19 11:31:08 +01:00
Matt Liberty 703acbeb82
Merge pull request #287 from The-OpenROAD-Project-staging/add-ci
Add ci
2026-02-18 16:49:22 +00:00
Vitor Bandeira c3400ec7fe ci: add gha
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-02-18 14:40:31 +00:00
Vitor Bandeira c9c94a0660 ci: add new ci code
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-02-18 14:32:25 +00:00
James Cherry d19d99dc19 init Parasitics::coupling_cap_factor_ resolves #383 2026-02-17 11:08:29 -07:00
James Cherry aca993e9ee Sta::clearNonSdc clear sim resolves #382
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-17 11:03:05 -07:00
Matt Liberty 857316ff00 Add cmake_policy(SET CMP0074 NEW) # Use <PackageName>_ROOT in find_package
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-02-14 15:20:16 +00:00
James Cherry 54a3cc0721 revert bb23f157
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-13 09:02:22 -07:00
Jaehyun Kim fdb24d8132 test: Remove redundant results folder
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-14 00:06:27 +09:00
James Cherry bb23f15732 Sdc::deleteDeratingFactors resolves #381
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-13 08:01:26 -07:00
Jaehyun Kim c147d63880 sdc: Fix dangling pointer issue in `Sdc::deleteDeratingFactors()`
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-13 22:53:41 +09:00
Jaehyun Kim b77779f7a6 test: Refactoring. Standardize Google Test naming conventions by removing `R#_` prefixes, improve temporary file creation with `mkstemp`, etc
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-13 20:36:42 +09:00
Jaehyun Kim d6c09372ba test: Initial upload
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-13 19:19:09 +09:00
James Cherry 8925c985b6 Merge branch 'master' into rel_3.0 2026-02-12 08:33:19 -07:00
James Cherry 78bb19c9eb Report::printToBufferAppend resolves #379
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-12 08:32:45 -07:00
James Cherry 52b49f823f centos docker
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 12:41:41 -07:00
James Cherry b92db09fd2 Merge branch 'master' into rel_3.0 2026-02-11 09:23:12 -07:00
James Cherry 506914e0a1 Report::printToBufferAppend resolves #379
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 09:21:50 -07:00
James Cherry 4c157f46ee InternalPower::related_pg_port string->port
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:33:09 -07:00
James Cherry 4689eecacd clang-format
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:12:12 -07:00
James Cherry 4823a4e1e0 Merge branch 'master' into rel_3.0
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:11:44 -07:00
James Cherry f08cdd165a Power::findLeakagePower
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-11 08:03:34 -07:00