Commit Graph

2442 Commits

Author SHA1 Message Date
Jaehyun Kim cf9a2772f8 build: Replace ./make_coverage_report.sh with ./etc/Build.sh & ./etc/CodeCoverage.sh like OpenROAD
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 11:56:20 +09:00
Jaehyun Kim 55259b894b test: Add `save_ok` script
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 11:12:27 +09:00
Jaehyun Kim d35d5661b4 test: Auto-detect new *.{tcl,ok} test cases in test and examples folders
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 10:57:35 +09:00
Jaehyun Kim c40b8b24bb test: Make `./test/regression -j32` run all test cases including C++ unit tests
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 10:15:53 +09:00
Jaehyun Kim 9bbac53157 test: Make ctest run C++ unit tests
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 09:51:10 +09:00
Jaehyun Kim 72e3eaddba test: Make BUILD_TESTS on-by-default
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-02-27 09:50:16 +09:00
Matt Liberty 8e08483e0e
Merge pull request #289 from The-OpenROAD-Project-staging/sta_write_verilog_fix
Fix write_verilog escape seq Issue 3826
2026-02-26 21:54:18 +00:00
James Cherry 95d5ebb47c test/helpers.tcl
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-26 09:32:20 -08:00
Kazuto Iris a2cd40f57c
fix: Revert "Expose 'TimingType' from `TimingArc`. (#380)" (#390)
Now the `TimingArcSet` class in `TimingArc.hh` has two identical declarations of the `timingType()` member function with the same signature, return type and implementation, which causes an overload conflict error during the build process.

This reverts commit f0c9971015.
2026-02-25 18:08:47 -08:00
dsengupta0628 2d1a4f03e6 fix indentation
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
2026-02-25 20:39:11 +00:00
dsengupta0628 cd6f564caf Renamed tests to match prlx repo, updated test to repro error without my fix
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
2026-02-25 20:33:15 +00:00
dsengupta0628 db46579a39 resolve conflict
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
2026-02-25 20:14:59 +00:00
dsengupta0628 03f976128f fix merge
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
2026-02-25 19:48:36 +00:00
Matt Liberty 2d7fc5c82b
Merge pull request #281 from hzeller/feature-20251024-cfg-dest
Use same location for StaConfig.hh output as in cmake.
2026-02-25 19:42:38 +00:00
Matt Liberty 215eeee40c
Merge pull request #295 from The-OpenROAD-Project-staging/stable_sort
Use stable sort again
2026-02-25 19:21:57 +00:00
Matt Liberty 6737553991
Merge pull request #293 from fredowski/bazel-macos
bazel/macos: Changed bazel BUILD file to have MachineApple.cc for Macos build
2026-02-25 19:15:42 +00:00
Matt Liberty 7b9c3e40fb
Merge pull request #290 from fredowski/bazel-tcl
bazel/tcl: migrate from rules_hdl tcl to bazel BCR tcl version
2026-02-25 19:12:58 +00:00
Matt Liberty 8ee6bb01b7
Merge pull request #296 from hzeller/feature-20260224-flex-bison
Use bison/flex starlark from //bazel package.
2026-02-25 19:12:28 +00:00
Matt Liberty 9daf8117d5
Merge pull request #297 from The-OpenROAD-Project-staging/parallax-update
Parallax update
2026-02-25 16:40:09 +00:00
Robert O'Callahan f0c9971015
Expose 'TimingType' from `TimingArc`. (#380)
When using the OpenSTA Liberty file parser as a general-purpose Liberty reader, it's useful to be able to
extract the original `TimingType` for a timing arc, and trivial to support.
2026-02-25 08:13:51 -08:00
Matt Liberty b0d171d9fb Merge remote-tracking branch 'parallax/master' into parallax-update
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-02-25 16:09:34 +00:00
Martin Povišer fe31eef7a6 Use stable sort again
Before the multi-mode refactor the sort helpers wrapped stable_sort,
switch to stable_sort again as the sorting influences which vertex is
returned from Sta::worstSlack().

Signed-off-by: Martin Povišer <povik@cutebit.org>
2026-02-25 16:50:59 +01:00
James Cherry d1bfb1df2e define_scene use filename or library name resolves #386
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-25 07:29:18 -08:00
James Cherry 79ebc3469b report_path -path_group w/-default resolves openroad issue #9439
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-24 16:45:03 -08:00
James Cherry 795c190edb ClkLatency::findClkDelays unclocked regs resolves #385
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-24 15:07:33 -08:00
James Cherry b69645ed44 make_scene missing mode error resolves #384
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-24 14:48:16 -08:00
Henner Zeller 102925b677 Use bison/flex starlark from //bazel package.
Context PR:
https://github.com/The-OpenROAD-Project/OpenROAD/pull/9536

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-02-24 10:00:13 -08:00
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
Friedrich Beckmann 72c4fc49cb bazel/macos: use MachineApple.cc on MacOS
On MacOS the MachineApple.cc must be used instead of
MachineLinux.cc. I added a select statement.

Signed-off-by: Friedrich Beckmann <friedrich.beckmann@tha.de>
2026-02-22 22:56:31 +01:00
Friedrich Beckmann 7937b647b6 bazel/tcl: migrate from rules_hdl tcl to bazel BCR version
The tcl version in the bazel central registry supports MacOS and
it can be used via MODULES.bazel instead of WORKSPACE.

Signed-off-by: Friedrich Beckmann <friedrich.beckmann@tha.de>
2026-02-22 22:13:47 +01: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