Commit Graph

92 Commits

Author SHA1 Message Date
Wilson Snyder 165622a9e9 Add NORETURN warning on functions without return values (#6534). 2025-10-07 21:06:11 -04:00
Wilson Snyder 269476df6e Add FUNCTIMCTL now as a named error, so can disable (#6385). 2025-09-25 19:19:31 -04:00
Todd Strader aa6fbd35db
Add HIERPARAM error code (#6456) (#6484) 2025-09-25 10:27:26 -04:00
Wilson Snyder b455f9b591 Add ASSIGNEQEXPR when use `=` inside expressions (#5567). 2025-09-14 08:28:47 -04:00
Wilson Snyder a9f95f2f08 Fix false CONSTVAR error on initializers (#4992). 2025-09-09 19:27:43 -04:00
Wilson Snyder f8f5f8f84b Commentary: Fix warning documentation, add consistency test. 2025-09-09 19:14:48 -04:00
Wilson Snyder f41e36b99f Commentary: Convert docs examples to 2 space indents. 2025-09-06 07:51:49 -04:00
Wilson Snyder c90f9e53b7
Add ALWNEVER warning, for `always @*` that never execute (#6291) (#6303) 2025-08-18 12:00:53 -04:00
Wilson Snyder 60cbbf0ec1 Add error on mismatching prototypes (#6207). 2025-08-11 19:50:47 -04:00
Wilson Snyder 309129ebcf Add PARAMNODEFAULT error, for parameters without defaults. 2025-08-03 15:27:37 -04:00
Wilson Snyder 7d43a935bd Add SPECIFYIGN warning for specify constructs that were previously silently ignored. 2025-07-18 19:32:34 -04:00
Wilson Snyder 1f0357ba93 Add NOEFFECT warning, replacing previous `foreach` error. 2025-07-16 08:18:57 -04:00
Wilson Snyder 2f199f20cf Add ENUMITEMWIDTH error, and apply to X-extended and ranged values. 2025-07-12 14:14:17 -04:00
Wilson Snyder f77af4e6f6 Important: Change `--assert` to be the default; use `--no-assert` for legacy behavior and faster runtimes. 2025-07-03 19:36:28 -04:00
Geza Lore bc892deacc
Safely support non-overlapping blocking/non-blocking assignments (#6137)
The manual for the BLKANDNBLK warning describes that it is safe to
disable that error if the updated ranges are non-overlapping. This
however was not true (see the added t_nba_mixed_update* tests).

In this patch we change V3Delayed to use a new ShadowVarMasked
scheme for variables that have mixed blocking and non-blocking 
updates (or the FlagUnique scheme for unpacked variables), which
is in fact safe to use when the updated parts are non-overlapping.

Furthermore, mixed assignments are safe as far as scheduling is
concerned if either:

- They are to independent parts (bits/members/etc) (with this patch)
- Or if the blocking assignment is in clocked (or suspendable) logic.

The risk in scheduling is a race between the Post scheduled NBA
commit, and blocking assignments in combinational logic, which might
order incorrectly.

The second point highlights that we can handle stuff like this safely,
which is sometimes used in testbenches:

```systemverilog
always @(posedge clk) begin
    if ($time == 0) a = 0;
end

always @(posedge clk) begin
    if ($time > 0) a <= 2;
end
````

The only dangerous case is:

```systemverilog
always @(posedge clk) foo[idx] <= val;
assign foo[0] = bar;
```

Whit this patch, this will still resolve fine at run-time if 'idx' is
never zero, but might resolve incorrectly if 'idx' is zero.

With the above in mind, the BLKANDNBLK warning is now only issued if:

- We can't prove that the assignments are to non-overlapping bits
- And the blocking assignment is in combinational logic

These are the cases that genuinely require user attention to resolve.

With this patch, there are no more BLKANDNBLK warnings in the RTLMeter
designs.

Fixes #6122.
2025-06-28 20:45:45 +01:00
Wilson Snyder 189d094202 Commentary 2025-06-27 22:31:51 -04:00
Wilson Snyder 4c2eb8c0b8 Commentary: Fix broken links 2025-06-15 14:51:56 -04:00
Wilson Snyder 1c357ba508 Commentary 2025-06-10 08:17:45 -04:00
Todd Strader 9fc223d3ee
Commentary: FPGA PROCASSINIT guidance (#6067) 2025-06-06 09:59:05 -04:00
Wilson Snyder 8031ca2616 Add `MODMISSING` error, in place of unnamed error (#6054). 2025-05-29 21:02:00 -04:00
Wilson Snyder f8359adcc0 Commentary: Changes update 2025-05-20 22:51:07 -04:00
Wilson Snyder 6bb16d6c52 Disable symbol from parser: Support redeclaring type as non-type; major parsing change (#2412). 2025-05-18 07:13:37 -04:00
Wilson Snyder 66667b6172
Support SARIF JSON diagnostic output with `--diagnostics-sarif`. (#6017) 2025-05-17 15:46:15 -04:00
Wilson Snyder e837f780a2 Commentary 2025-05-03 04:25:01 -04:00
Wilson Snyder 3b8d10cae5 Commentary 2025-05-02 07:35:38 -04:00
Wilson Snyder 8b52bd817f Add PROCINITASSIGN on initial assignments to process variables (#2481). 2025-04-30 22:00:06 -04:00
Wilson Snyder 38dd9a344e Improve documentation for BADVLTPRAGMA 2025-04-30 20:32:30 -04:00
Wilson Snyder 9b3fccdcb7 Add BADVLTPRAGMA on unknown Verilator pragmas (#5945). 2025-04-29 18:18:54 -04:00
Wilson Snyder c9be36911f Cleanup documentated option sort order, and enforce with test 2025-04-26 17:14:49 -04:00
Wilson Snyder 14e7b1076e Commentary: Changes update 2025-04-02 23:17:39 -04:00
Brian Li 559d990e82
Support command-line overriding `define (#5900) (#5908) 2025-04-01 07:33:49 -04:00
Wilson Snyder e171463fa2 Add COVERIGN warning, as a more specific UNSUPPORTED error. 2025-01-06 18:48:32 -05:00
Wilson Snyder 481adf8fe7 Commentary 2025-01-06 17:56:50 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Todd Strader 079a53e820
Commentary: SYMRSVDWORD + VPI documentation (#5696) 2024-12-19 17:14:15 -05:00
Wilson Snyder 8f4490628f Commentary: Clarify some warning messages. 2024-07-20 17:50:14 -04:00
Arkadiusz Kozdra d4c3e35f97
Support `$psprintf` system function (#4314) (#5169)
`$psprintf` is a non-standard system function present in some other
simulators, and has been rejected for standardization by IEEE because
of being basically the same as `$sformatf`.

To encourage users to fix their codebase, a warning is emitted by
default, but it gets otherwise interpreted as `$sformatf` as early as
during lexing.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>

* wording/formatting

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>

---------

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-06-10 08:38:26 -04:00
Geza Lore 80b08b71aa
Support NBAs to arrays inside loops (#5092)
For NBAs that might execute a dynamic number of times in a single
evaluation (specifically: those that assign to array elements inside
loops), we introduce a new run-time VlNBACommitQueue data-structure
(currently a vector), which stores all pending updates and the necessary
info to reconstruct the LHS reference of the AstAssignDly at run-time.

All variables needing a commit queue has their corresponding unique
commit queue.

All NBAs to a variable that requires a commit queue go through the
commit queue. This is necessary to preserve update order in sequential
code, e.g.:
 a[7] <= 10
 for (int i = 1 ; i < 10; ++i) a[i] <= i;
 a[2] <= 10
needs to end with array elements 1..9 being 1, 10, 3, 4, 5, 6, 7, 8, 9.

This enables supporting common forms of NBAs to arrays on the left hand
side of <= in non-suspendable/non-fork code. (Suspendable/fork
implementation is unclear to me so I left it unchanged, see #5084).

Any NBA that does not need a commit queue (i.e.: those that were
supported before), use the same scheme as before, and this patch should
have no effect on the generated code for those NBAs.
2024-05-03 07:45:49 -04:00
Wilson Snyder 3d57256070 Commentary: Changes update 2024-03-04 08:22:36 -05:00
Wilson Snyder 214173c6b8 Support 1800-2023 preprocessor ifdef expressions; add PREPROC zero warning. 2024-03-02 10:15:19 -05:00
Wilson Snyder 3786f59e03 Change to IEEE 1800-2023 warning mentions 2024-03-02 10:15:19 -05:00
Pengcheng Xu ec01008fe3
Change zero replication width error to ZEROREPL warning (#4753) (#4762) 2024-01-03 07:11:50 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder a773a52559 Cleanup some IEEE references 2023-10-19 19:26:36 -04:00
Wilson Snyder c14eae6d56 Add SIDEEFFECT warning on mishandled side effect cases (#487 partial) 2023-10-15 06:44:35 -04:00
Wilson Snyder 472ad90d83 Change lint_off to not propagate upwards to files including where the lint_off is. 2023-10-09 04:12:01 -04:00
Wilson Snyder 7f38414276 Internals: Rename addIgnoreMatch. No functional change. 2023-10-08 01:02:23 -04:00
Wilson Snyder 24ff3155ae Support randc (#4349). 2023-09-18 21:17:21 -04:00
Wilson Snyder 10c1653e72 Fix ZERODLY to not warn on 'wait(0)'. 2023-09-15 08:53:29 -04:00
Wilson Snyder a5eccc199b Commentary: Changes update 2023-07-27 04:01:28 -04:00