Commit Graph

9602 Commits

Author SHA1 Message Date
Matthew Ballance 4bd96875fe
Merge 1117a11d4d into cd30c22d1c 2026-04-20 11:45:14 -07:00
Geza Lore cd30c22d1c
Optimize more Dfg patterns (#7452) 2026-04-20 18:28:11 +01:00
dependabot[bot] 81f6cdc32c
CI: Bump actions/upload-pages-artifact from 4 to 5 in the everything group (#7453) 2026-04-20 19:16:37 +02:00
em2machine 23ca23b7b5
Fix for ariane/CVA6 false member call on object error (#7445) (#7450)
Fixes #7445.
2026-04-20 18:21:59 +02:00
Geza Lore f3c63d017a Optimize Sel patterns in DfgPeephole 2026-04-20 09:01:31 +01:00
Geza Lore ffd2c5c69e Optimize temporary insertion in DfgPeephole 2026-04-20 09:01:31 +01:00
Geza Lore 93d7d9c417 Optimize DfgDataType::hash() 2026-04-20 09:01:31 +01:00
Yilou Wang 935b2564eb
Use NFA in SVA pass (V3AssertNfa: NFA-based multi-lcycle SVA evaluation engine) (#7430) 2026-04-20 07:43:18 +02:00
Geza Lore e82bd52fa3
Optimize arithmetic right shift (>>>) in DfgBreakCycles (#7447) 2026-04-19 20:28:17 +01:00
Geza Lore 60b41c7822
Optimize DfgBreakCycles IndependentBits analysis ordering (#7446)
Perform the data flow analysis based on reverse post-order numbering of
vertices. This speeds up convergence by ~10x. Partial fix for #7201.
2026-04-19 19:48:02 +01:00
Geza Lore 97454a1bc5
Remove multi-threaded FST tracing (#7443)
Remove parallel (using the FST library writer thread) and offloaded
(separate Verilator internal thread) tracing (only used by FST). These
are not compatible with #6992, and #5806 should yield better performance
in all cases.

Consequently mark '--trace-threads' and '--trace-fst-thread' options as
deprecated
2026-04-19 16:02:12 +01:00
Christian Hecken f7a349c5a7
Fix uvm_hdl_release_and_read not reading release value or checking for success (#7425) 2026-04-19 08:24:07 -04:00
Yilou Wang 29a93fe5bc
Fix internal error on `dist` under implication operator in constraints (#7440) (#7442)
Fixes #7440
2026-04-19 08:03:19 +02:00
Wilson Snyder 707dcea914 Commentary/Tests: Describe PARAMNODEFAULT as top.
Fixes #7441.
2026-04-18 11:34:19 -04:00
Wilson Snyder 0537999b1d Commentary: Changes update 2026-04-18 11:27:54 -04:00
github action 1117a11d4d Apply 'make format' 2026-04-18 05:09:52 +00:00
Matthew Ballance 417c422ca2 Fix: preserve unsupported cross options in AST for line coverage tracking
The 'Enum fixes' refactor changed visit(AstCoverCross*) in V3LinkParse
to discard unsupported cross options (e.g. option.per_instance) without
adding an AstCoverOption node to optionsp. This broke V3Coverage line
tracking: since V3Coverage builds linescov by walking the AST, deleted
nodes are never visited and their source lines are excluded from the
coverage range.

Restore the original behaviour: always create an AstCoverOption node
and add it to optionsp regardless of whether the option type is
supported. The COVERIGN warning is still emitted for unsupported
options. V3Covergroup does not consume cross optionsp, so the extra
nodes are inert but allow V3Coverage to track the source line for
annotation (t_vlcov_covergroup annotation golden: line 151
'option.per_instance = 1;' now correctly annotated as %000001).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 05:09:52 +00:00
github action a3e51c7b36 Apply 'make format' 2026-04-18 05:09:52 +00:00
Matthew Ballance 6a8c045d7a Break up covergroup reporting logic
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 05:09:52 +00:00
Matthew Ballance db62c103de Add non-const range value
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 05:09:52 +00:00
Matthew Ballance cd1c8341e0 Add bin-count limit check
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 05:09:52 +00:00
Matthew Ballance 7a9a999f38 t_covergroup_autobins_bad: add non-constant range bin test cases
Add test cases for non-constant range bounds in coverpoint bins:
- bins b_range with non-constant lower bound
- bins b_range2 with non-constant upper bound

Update golden file to reflect new error locations and messages.

Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 05:09:52 +00:00
Matthew Ballance 934d66667e Convert local vars to user*p and replace direct deleteTree with pushDeletep
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance 5990090d82 Resolve fuzzy match of sample
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance b869cdeeea Enum fixes
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance 9649a4cdb5 Remove unneeded .cpp test files
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance ecbccaac6c Order enums
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance ef90608281 Migrate to new test format
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance d0d919c66c Correct accidentally-removed visit method (and debug output)
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
Matthew Ballance 97d4920182 Show all cross bins
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:58 +00:00
github action 4f270c3e41 Apply 'make format' 2026-04-18 00:44:58 +00:00
Matthew Ballance 271ddc8044 Close code coverage gaps
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance be7a947899 More code-coverage updates
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance f8dbafc1f3 Code coverage improvements
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
github action 4ca3ff5ad3 Apply 'make format' 2026-04-18 00:44:57 +00:00
Matthew Ballance 10afed99aa Fix golden files after adding SPDX copyright line to .v files
Adding the SPDX-FileCopyrightText line to t_covergroup_auto_bin_max_bad.v
and t_covergroup_cross_opt_unsup.v shifted all line numbers by 1.
Update the corresponding .out golden files to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 49b4b3aac6 Fix missing SPDX-FileCopyrightText in covergroup test files
Add missing SPDX-FileCopyrightText headers to four test files that
were created without them, causing t_dist_copyright to fail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 07e3337f80 covergroup: Close coverage gaps per patch_coverage_plan
- V3AstAttr.h: Add LCOV_EXCL_START/STOP and LCOV_EXCL_LINE to the
  unreachable methods of VCoverBinsType, VCoverOptionType, VTransRepType
  enum wrappers (default ctors, int ctors, operator en(), and the
  first/third operator== overloads that are never called by production code)

- V3AstNodes.cpp: Add LCOV_EXCL_BR_LINE to AstCoverTransItem::dump() and
  dumpJson() branches that check m_repType != VTransRepType::NONE; these are
  unreachable because all repetition bin forms ([*], [->], [=]) produce
  nullptr via BBCOVERIGN and the node is never constructed with non-NONE type

- V3Covergroup.cpp: Fix optp->prettyName() -> optp->optionType().ascii() in
  extractCoverpointOptions() error message so the option name is printed
  correctly instead of an empty string; the non-constant option-value error
  path (lines 199-202) is unreachable in practice — the SV spec requires
  option values to be constant expressions and V3Width enforces this before
  covergroup lowering

- V3LinkParse.cpp: Mark the else branch in visit(AstCoverCross*) with
  LCOV_EXCL_START/STOP; it is unreachable because all non-option items in
  cross_body_item produce nullptr via BBCOVERIGN and addNextNull filters nulls

- t_covergroup_unsup.v: Add ignore_bins/illegal_bins with [] array form to
  exercise the corresponding grammar branches separately from bins []

- t_covergroup_args.v: Add cg_clocked(int) covergroup (clocked + constructor
  args) to exercise the loop-past-sentinel branch in createCovergroupMethods
  (line 1137); add cg_toplevel at file scope to exercise the m_modp==null
  branch (line 1269 false branch) in visit(AstCovergroup*)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 084eee0761 Fix CI regressions post-rebase: test coverage and crash fixes
- V3Covergroup.cpp: fix crash when coverpoint option value is non-const
  (VN_AS → VN_CAST with graceful error emission)
- V3Width.cpp: remove non-ASCII em-dash in comment (whitespace check)
- t_covergroup_cross_opt_unsup: new test for COVERIGN on cross options
- t_covergroup_auto_bin_max_bad: new test for non-const auto_bin_max error
- t_vlcov_covergroup: add --Wno-COVERIGN flag; update golden files for
  new covergroups added to t_covergroup_cross.v

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance ee87094c35 More coverage-closure test updates
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance aa912537f3 Coverage fixes
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 77e2c0b4e2 Remove dead guards
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance feb11da024 Fix CI regressions from covergroup changes
V3DfgOptimizer: Remove SenItem special case added in commit 20970c7dd.
By the time the scoped DFG pass runs (pipeline line 439), V3Active has
already deleted all AstCovergroup nodes (line 423). The SenItem block was
therefore unnecessary — and harmful, as it set HasExtRdRefs on ALL clock
signals in sensitivity lists, preventing clock-gate deduplication.
Fixes t_opt_dedupe_clk_gate (got 4 deduped instead of expected 2).

V3Width: Restore constifyEdit guard in visit(AstInsideRange*) with null
checks. The guard was needed so that negative literals (e.g. AstNegate
wrapping a Const) in covergroup bin ranges are folded to constants before
V3Width visits them as expressions. Without it, V3Width sees a bare NEGATE
under INSIDERANGE with m_vup==nullptr and fires v3fatalSrc.
Fixes t_covergroup_negative_ranges.

Root-cause note: t_debug_width was failing due to the SenItem DFG change
above, not the constifyEdit. t_opt_const.v (used by t_debug_width) has no
inside-range expressions, so constifyEdit was never triggered for that test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance e578838c75 Increase dump coverage
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 64f6ab5069 Fix whitespace issues
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
github action 3ae3f52e2d Apply 'make format' 2026-04-18 00:44:57 +00:00
Matthew Ballance 7b0c443f65 Improve code coverage and add coverage report production to more tests
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 3088782e28 Checkpoint on closing coverage holes
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance ae4fb13879 Combine/minimize cross and transition tests
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance fe9d9846d6 Update t_vlcov_covergroup to produce its own data instead of relying on a cached file
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00