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>
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>
- 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>
- 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>
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>
Upstream commit 7607f0e7f changed how while loops over queue.size() are
emitted, adding an __Vrepeat0 temporary variable.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>