Commit Graph

4977 Commits

Author SHA1 Message Date
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
Matthew Ballance 8dd992efdb Adjust code patterns based on PR feedback
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
github action 4a16d39d72 Apply 'make format' 2026-04-18 00:44:57 +00:00
Matthew Ballance 3334d91e49 Fix t_debug_emitv golden file: update while-loop emit after upstream unroll change
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>
2026-04-18 00:44:57 +00:00
Matthew Ballance 9601b74dab Fix golden file: update BASICDTYPE 'logic' to 'bit' after upstream four-state cleanup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance e0aa381384 Added verilator_coverage test for covergroups
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 8e2977b969 Add coverage report output for covergroup
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
github action bf0f8d6035 Apply 'make format' 2026-04-18 00:44:57 +00:00
Matthew Ballance 5ad6b62615 Update unsupported and clean up warnings
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 52e7874134 Update format of unsupported messages for consistency
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 1e16c8bcdd Aligned with C++14 and fixed a couple non-ascii characters
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance c659fe900a Refactor loops in V3Active ; add three tests to vlt_all, so they run with threading
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 48e3b7888a Remove low-value tests ; Rename tests to better-align with their purpose ; Move to using coverage.dat to assess correctness
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 0cfc093dd9 Fix constifyParamsEdit regression in visit(AstInsideRange*)
The original code called V3Const::constifyParamsEdit() in
V3Width::visit(AstInsideRange*) to fold negative bin bounds
(e.g., NEGATE(100) -> -100) for covergroup bins. Since
constifyParamsEdit uses m_required=true, it errored on any
non-constant expression -- breaking the upstream test
t_constraint_array_index_simple which uses a foreach loop
variable 'i' in an inside constraint expression.

Fix: Remove the unconditional constifyParamsEdit calls from
V3Width::visit(AstInsideRange*). Instead:
- In V3Width: when m_vup is null (covergroup bin context,
  not an expression context), use constifyEdit (m_required=false)
  to fold constant arithmetic before iterating children.
- In V3Covergroup: call constifyEdit at the two sites that
  cast InsideRange bounds to AstConst for bin expansion.

This moves the covergroup-specific concern to the right layer
(V3Covergroup) while keeping V3Width safe for all contexts.

Also update golden files for t_covergroup_trans_3value,
t_covergroup_trans_restart, and t_covergroup_with_sample_args_too_many_bad
whose line numbers shifted by 1 due to the SPDX copyright header
additions in the previous commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 0f76f47864 Add missing SPDX-FileCopyrightText headers to covergroup test files
All new covergroup test files were missing the canonical
SPDX-FileCopyrightText line required by t_dist_copyright.
Add it above the existing SPDX-License-Identifier line in each file.
Also canonicalize t_covergroup_with_sample_args_too_many_bad.py to
use SPDX form instead of prose copyright comment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance c25bb8ab17 Update golden files after rebase onto upstream/master
Upstream commit 07ed6aef5 'Tests: Verilog format' reformatted several
Verilog test files, shifting line/column numbers in compiler output.
Also pick up upstream's improved 'Too many arguments' error message
which now includes the declaration location.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance d35df728d7 Restore t_covergroup_with_sample_args_too_many_bad test
This test was added upstream in a364704e3 and should not have been
deleted. The driver normalizes version strings (?v=X.Y -> ?v=latest)
and 'Exiting due to...' messages, so the upstream .out file is
compatible with our branch's error output as-is.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:57 +00:00
Matthew Ballance 7a307eaed6 Convert 'if' tests to assertion macros
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
github action d7109df592 Apply 'make format' 2026-04-18 00:44:56 +00:00
Matthew Ballance cdfb990ac5 Cleaned up coverpoint-bin warning around 'excessive size'
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance 880829e321 Update debug_emitv to include covergroup constructs ; update emit of covergroup debug content
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance 7620ad9d7e Test clean-ups, resolve an internal error masked by the checking strategy, and add 'automatic' to remove warnings
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance d4595a0643 t_covergroup_with_sample_args_too_many_bad: remove redundant test
'sample' argument count checking is generic function/task behavior
already covered by t_func_bad and similar tests. Removing this test
eliminates fragility from upstream error message/caret changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:56 +00:00
github action ff269866a6 Apply 'make format' 2026-04-18 00:44:56 +00:00
Matthew Ballance bbb7930b6a Correct indent on coverage tests ; add required test drivers ; back out CMakeLists pch change and adjust test that required it to no longer need it
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance 698f66dcf3 Update golden file for covergroup fileline fix
The covergroup keyword fileline fix (using $<fl>1 instead of $<fl>2)
shifts error column from the name position to the 'covergroup' keyword.
Update the golden output for t_covergroup_in_class_duplicate_bad to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance fa371faff4 Refactoring node locations and enums ; Delete coverpoints after V3Covergroup so they don't accidentally hit the generators
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance 3c77283fe3 Rename funccov tests to covergroup
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
Matthew Ballance 8b3e84d352 Refactoring before renaming tests
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-18 00:44:56 +00:00
github action b5c5852e1c Apply 'make format' 2026-04-18 00:44:56 +00:00
Matthew Ballance 8a6c05870a Add function coverage (funccov) and covergroup support
Implement functional coverage collection via covergroups, coverpoints,
and cross coverage bins. Introduces V3CoverageFunctional pass and
verilated_funccov.h runtime support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 00:44:56 +00:00
Ryszard Rozak ba508c00d2
Support `until_with` property (#7290 partial) (#7436) 2026-04-17 06:33:36 -04:00
Yilou Wang 72952fd3fb
Fix inline constraint on array-indexed randomize target (#7431) (#7434)
Fixes #7431.
2026-04-16 11:02:22 -04:00
Kamil Danecki 3587ac48a4
Fix modification of members of object with const handle (#7433)
Signed-off-by: Kamil Danecki <kdanecki@internships.antmicro.com>
2026-04-16 09:43:12 -04:00
Wilson Snyder 4fe121e5aa Commentary: Changes update 2026-04-15 17:46:08 -04:00
github action 885fbaf075 Apply 'make format' 2026-04-15 12:11:06 +00:00
Rowan Goemans c143c2fdd2
Fix side-effect loss when slicing array expressions (#7427) (#7429)
Fixes #7427.
2026-04-15 08:10:11 -04:00
Todd Strader 7f571971ca
Optimize trace code for faster compiles on repeated types (#6707) (#6832) 2026-04-14 19:16:21 -04:00
Yilou Wang 38b7734530
Fix subclass with rand_mode(0) getting randomized (#7376) (#7383)
Fixes #7376.
2026-04-14 16:47:24 -04:00
Geza Lore ab0264deca
Optimize more Dfg peephole patterns (#7423) 2026-04-14 16:22:54 +01:00
Wilson Snyder 7e3400b37d Fix virtual interface implied comparison with null (#7421).
Fixes #7421.
2026-04-14 07:25:02 -04:00
Yilou Wang 9eb2ba4c54
Support 2**n expressions in constraint randomization (#7422) 2026-04-14 07:17:53 -04:00
Wilson Snyder 2770e649ba Commentary: Changes update 2026-04-13 21:09:24 -04:00
Wilson Snyder ec4f66120c Test: Remove old Makefile rules 2026-04-13 21:09:09 -04:00