Commit Graph

997 Commits

Author SHA1 Message Date
Matthew Ballance 2c371c88bd Update unsupported and clean up warnings
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-05 21:10:49 +00:00
Matthew Ballance cbf6c64d05 Update format of unsupported messages for consistency
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-05 21:10:49 +00:00
Matthew Ballance 8eb03568fd Cleanup mis-merge ; move initial Ast manipulation out of Grammar
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-05 21:10:48 +00:00
Matthew Ballance 94a65f8e64 Comment new Ast classes, clean up accidentally added members, clean up a few interim workarounds, and adjust approach to stay out of sensitive paths
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-05 21:10:48 +00:00
Matthew Ballance 464be2c85b 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-05 21:10:33 +00:00
Matthew Ballance 80dd984780 Fix infinite recursion in visit(AstCovergroup*) and fileline
Two bugs in the covergroup -> AstClass transformation in V3LinkParse:

1. Infinite recursion: when a covergroup has a clocking event (e.g.
   `@(posedge clk)`), visit(AstCovergroup*) embeds a sentinel
   AstCovergroup node inside the new AstClass to carry the event for
   V3Covergroup.cpp. The subsequent iterate(cgClassp) call then visits
   the sentinel via visit(AstNodeModule*) -> iterateChildren -> which
   hits visit(AstCovergroup*) again, creating another class with another
   sentinel, infinitely.

   Fix: skip transformation in visit(AstCovergroup*) when already inside
   a covergroup class (m_modp->isCovergroup()), so sentinel nodes are
   left alone.

2. Wrong fileline column: AstCovergroup was created with the fileline of
   the identifier token ($<fl>2, the name position) rather than the
   'covergroup' keyword token ($<fl>1). This caused warnings about the
   covergroup to point to the name column instead of the keyword column.

   Fix: use $<fl>1 (the 'covergroup' keyword fileline) when constructing
   AstCovergroup in the parser.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-05 21:10:33 +00:00
Matthew Ballance 15bcf7b2fb Parser clean-up
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-04-05 21:10:33 +00:00
Matthew Ballance 10b590c6ac verilog.y: fix accidental DEL omissions for wait_order, expect, property case
Three node deletions were accidentally dropped from the initial covergroup
commit as collateral damage:
- wait_order (no-stmt variant): restore DEL($3) for vrdList
- expect (no-stmt variant): restore DEL($3) for property_spec
- property_exprCaseIf yIF/yELSE: restore DEL($3) for condition expr

In all three cases $3 is an AstNode* that is not assigned to $$ and would
be leaked without the deletion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-05 21:10:32 +00:00
Matthew Ballance d9060bc9d3 Gate V3Covergroup pass on useCovergroup() flag
Add v3Global.useCovergroup() flag (following the useRandSequence()
pattern) that is set to true when a covergroup_declaration is parsed.
Gate the V3Covergroup::covergroup() pass in Verilator.cpp on this flag
so the pass is skipped entirely for designs with no covergroups.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-05 21:10:32 +00:00
Matthew Ballance 20970c7dde 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-05 21:08:09 +00:00
Wilson Snyder dbd4823323 Fix error on illegal nand/nor binary operators (#7353).
Fixes #7353.
2026-03-31 18:35:27 -04:00
Yilou Wang bf453361f6
Support consecutive repetition [*N] in SVA properties (#7311) 2026-03-30 07:01:33 -04:00
Wilson Snyder 5036af3d37 Commentary: Refer to latest standard where can 2026-03-29 18:06:12 -04:00
Yilou Wang 55e5f01758
Support SVA goto repetition [->N] in concurrent assertions (#7310) 2026-03-27 10:31:15 -04:00
Yilou Wang e0963bd587
Fix false ASSIGNIN on interface input ports driven from outside (#7322) 2026-03-26 12:30:16 -04:00
Yilou Wang 3ddf7ad6ec
Support ##[M:N] range cycle delay in SVA sequences (#7312) 2026-03-26 10:08:22 -04:00
Artur Bieniek aff85cef19
Support more than one dot in defparam (#7262)
Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
2026-03-24 09:20:46 -04:00
Yilou Wang 0b2bf991a6
Support boolean and/or in sequence expressions (#7285) 2026-03-24 08:56:14 -04:00
Yilou Wang 921607fd35
Support property-local variables and sequence match items (#7286) 2026-03-22 06:21:57 -07:00
Yilou Wang a8bccab8e6
Support named sequence declarations and instances in assertions (#7283) 2026-03-20 10:24:46 -04:00
Yilou Wang a0a684109f
Support modport export/import task prototypes and out-of-block definitions (#7277) 2026-03-18 19:20:34 -04:00
Wilson Snyder 602ee384de
Support $sformat with runtime format string (#7212). (#7257)
Fixes #7212.
2026-03-14 22:43:56 -04:00
Yilou Wang 7cd49a8028
Support dist and solve...before inside foreach constraints (#7245) (#7253) 2026-03-13 11:05:18 -04:00
Wilson Snyder 08c6d5bde5 Improve some display error handling (#7212 prep) 2026-03-12 07:49:21 -04:00
Pawel Kojma 4e6eafd994
Allow constant expressions without parentheses in PATHPULSE$ declaration (#7199) 2026-03-11 06:01:33 -04:00
Geza Lore f7c5454d91
Internals: Strengthen AstNodeExpr operand types (#7138) 2026-02-23 20:55:08 +00:00
Geza Lore da51021b0a
Internals: Simplify AstForeach header handling (#7126)
Rename AstSelLoopVars to AstForeachHeader, and make it a non-NodeExpr.
Tweak parser to always create an AstForeachHeader, so no need to fix it
up later.
2026-02-22 18:57:12 +00:00
Geza Lore 78ee787bb1
Internals: Clean up AstArg usage in AstNodeFTaskRef (#7121)
- Strengthen type of AstNodeFTaskRef::pinsp to be List[AstArg]
- Rename 'pinsp' to 'argsp'
- Add default constructor arguments
2026-02-22 10:38:37 +00:00
Artur Bieniek da28c67e60
Fix #0 delays to control fork scheduling (#6730 repair) (#6891)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2026-02-17 21:51:11 -05:00
Wilson Snyder 14a94b6de9 Internals: Add addNextNull. No functional change intended. 2026-02-16 08:09:29 -05:00
Srinivasan Venkataramanan 7c1b348b41 Support `$get_initial_random_seed` (#7056) (#7069).
Fixes #7056.
2026-02-16 05:57:44 -05:00
Geza Lore 3dd2b762e7
Fix scope tree in traces in hierarchical mode (#7042) 2026-02-12 20:54:03 -05:00
Pawel Kojma b9ef4a6c48
Add parsing of coverpoint identifier in place of covergroup range list (#6961) 2026-01-30 07:05:57 -05:00
Wilson Snyder 5547833dde Add UNSUPPORTED error on IEEE complex ports (#2844 partial) 2026-01-28 19:14:10 -05:00
Wilson Snyder 7c6c6a684b Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
Wilson Snyder d3ecba7699 Internals: Cleanup some verilog.y dead since IEEE 2017 2026-01-26 15:51:19 -05:00
Wilson Snyder ddbcd66722 Support `extern module` as a forward-declaration that is ignored. 2026-01-22 19:00:26 -05:00
Pawel Kojma c4dcdeab9a
Add parsing of solve-before inside foreach (#6934) 2026-01-20 07:14:11 -05:00
Wilson Snyder 50b6954cfc Internals: cppcheck cleanups 2026-01-17 23:18:09 -05:00
Jose Drowne 12080dfcb1
Internals: Add AST nodes for tagged union parsing (#6867 partial) (#6881) 2026-01-17 14:15:52 -05:00
Wilson Snyder 8a24897c13 Fix `foreach` with mid-index empty commas (#6910).
Fixes #6910.
2026-01-12 19:17:17 -05:00
Wilson Snyder a3d0f16185 Fix syntax error on unsupported defparam array (#6915). 2026-01-12 17:34:10 -05:00
Wilson Snyder 54b130e43f Add check for automatic variable in continuous assignment LHS 2026-01-10 18:54:27 -05:00
Ryszard Rozak da14e7c4bb
Fix `disable iff` in simple properties (#6890) 2026-01-07 07:02:52 -08:00
Wilson Snyder 13327fa9c0 Copyright year update. 2026-01-01 07:22:09 -05:00
Wilson Snyder 4080284e53
Fix warning lint directive ordering and consistency (#4185) (#5368) (#5610) (#6876). 2025-12-30 20:31:34 -05:00
Wilson Snyder 2025b81614
Internals: Refactor V3Error, and handle UNDRIVEN/UNSUPPORTED/WIDTH consistently (#6874) 2025-12-30 07:08:25 -05:00
Thomas Aldrian 361ab194ff
Internals: Modport expression parsing and tests (#2601 partial) (#6848) 2025-12-21 08:58:21 -05:00
Dan Ruelas-Petrisko 394d9cf168
Support `-libmap` (#5891 partial) (#6764) 2025-12-16 11:21:46 -05:00
Wilson Snyder dc00bf2484 Fix 'void(' mis-throwing assertion 2025-12-13 21:43:27 -05:00