Commit Graph

162 Commits

Author SHA1 Message Date
Wilson Snyder 7d3c58d21c Docs: Notes about `--x-initial-edge` (#6377 comment) 2025-09-04 09:09:54 -04:00
Geza Lore 636a6b8cd2
Optimize complex combinational logic in DFG (#6298)
This patch adds DfgLogic, which is a vertex that represents a whole,
arbitrarily complex combinational AstAlways or AstAssignW in the
DfgGraph.

Implementing this requires computing the variables live at entry to the
AstAlways (variables read by the block), so there is a new
ControlFlowGraph data structure and a classical data-flow analysis based
live variable analysis to do that at the variable level (as opposed to
bit/element level).

The actual CFG construction and live variable analysis is best effort,
and might fail for currently unhandled constructs or data types. This
can be extended later.

V3DfgAstToDfg is changed to convert the Ast into an initial DfgGraph
containing only DfgLogic, DfgVertexSplice and DfgVertexVar vertices.

The DfgLogic are then subsequently synthesized into primitive operations
by the new V3DfgSynthesize pass, which is a combination of the old
V3DfgAstToDfg conversion and new code to handle AstAlways blocks with
complex flow control.

V3DfgSynthesize by default will synthesize roughly the same constructs
as V3DfgAstToDfg used to handle before, plus any logic that is part of a
combinational cycle within the DfgGraph. This enables breaking up these
cycles, for which there are extensions to V3DfgBreakCycles in this patch
as well. V3DfgSynthesize will then delete all non synthesized or non
synthesizable DfgLogic vertices and the rest of the Dfg pipeline is
identical, with minor changes to adjust for the changed representation.

Because with this change we can now eliminate many more UNOPTFLAT, DFG
has been disabled in all the tests that specifically target testing the
scheduling and reporting of circular combinational logic.
2025-08-19 15:06:38 +01:00
Wilson Snyder 48a12fb0f4 Document and test `+verilator+rand+reset+2` usage (#6285 partial) 2025-08-16 11:47:19 -04:00
Wilson Snyder 833c31b031 Add `-DVERILATOR=1` definition to compiler flags when using verilated.mk. 2025-07-28 18:01:50 -04:00
Geza Lore ce77bac99a
Break some combinational cycles in DFG (#6168)
Added an algorithm that can break some combinational cycles in DFG, by
attempting to trace driver logic until we escape the cycle. This can
eliminate a decent portion of UNOPTFLAT warnings. E.g. due to this code:

```systemverilog
assign a[0] = .....;
assign a[1] = ~a[0];
```
2025-07-10 18:46:45 +01: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 7a3f1f16ca
Optimize DFG before V3Gate (#6141) 2025-07-01 17:55:08 -04:00
Wilson Snyder 916a89761e Add `--work` library-selection option (#5891 partial). 2025-06-29 20:17:27 -04:00
Wilson Snyder 3defaf8ffb Rename Verilator Config Files to Verilator Control Files.
Avoids conflict with IEEE `config`.  No functional change intended.
2025-06-27 20:38:01 -04:00
Geza Lore 2daa09a255
Optimize constify within Expand and Subst (#6111)
These passes blow up the Ast size on some designs, so delaying running V3Const
until after the whole pass can notably increase peak memory usage. In this
patch we apply V3Const per CFunc within these passes, which saves on memory.
Added -fno-const-eager to disable the intra-pass V3Const application, for
debugging.
2025-06-23 17:58:26 -04:00
Wilson Snyder 4c2eb8c0b8 Commentary: Fix broken links 2025-06-15 14:51:56 -04:00
Wilson Snyder 40881d7e79 Commentary: Changes update 2025-05-29 18:59:51 -04:00
Bartłomiej Chmiel 9cc4cc0efd
Add `--hierarchical-threads` (#6037) 2025-05-26 09:37:35 -04:00
Wilson Snyder f8359adcc0 Commentary: Changes update 2025-05-20 22:51:07 -04:00
Wilson Snyder 66667b6172
Support SARIF JSON diagnostic output with `--diagnostics-sarif`. (#6017) 2025-05-17 15:46:15 -04:00
Wilson Snyder 8100bc64a0 Commentary 2025-05-11 22:36:16 -04:00
Wilson Snyder d0424862f9 Commentary: Changes update 2025-05-10 13:22:26 -04:00
Wilson Snyder 51616ecf2f Internals: Rename to instances, and other minor cleanups 2025-05-04 14:57:10 -04:00
Wilson Snyder e837f780a2 Commentary 2025-05-03 04:25:01 -04:00
Wilson Snyder 8b52bd817f Add PROCINITASSIGN on initial assignments to process variables (#2481). 2025-04-30 22:00:06 -04:00
Wilson Snyder c9be36911f Cleanup documentated option sort order, and enforce with test 2025-04-26 17:14:49 -04:00
Wilson Snyder 0984fd045f Change `--trace` to `--trace-vcd`. 2025-04-05 10:46:39 -04:00
Wilson Snyder 4dd49e1244 Commentary: Changes update 2025-03-25 08:24:19 -04:00
Bartłomiej Chmiel fabded95df
Support multi-thread hierarchical simulation (#2583) (#5871) 2025-03-24 18:39:29 -04:00
Wilson Snyder 64caa700d3 Commentary: Changes update 2025-03-12 07:58:26 -04:00
Geza Lore d9701e6406
Automatically split some packed variables (#5843)
This patch adds a heuristic to V3SplitVar, and it attempts to split up
packed variables that are only referenced via constant index,
non-overlapping bit/range selects. This can eliminate some UNOPTFLAT cases.
2025-03-09 10:31:01 -04:00
Wilson Snyder a62f7fe4ae Commentary: Changes update 2025-03-07 18:03:01 -05:00
Mateusz Gancarz 9b4509f7d9
Add `--trace-saif` for SAIF power traces (#5812) 2025-03-07 10:41:29 -05:00
Wilson Snyder d232923051 Change `--output-groups` to default to value of `--build-jobs`.
Those using build farms may need to now use `--output-groups 0` or otherwise.
2025-02-24 20:38:08 -05:00
Wilson Snyder 5daf7385f1 Commentary: Changes update 2025-02-24 04:04:23 -05:00
Kamil Rakoczy 2e1fa8f338
Add `--preproc-resolve` for modules in preprocessor output (#5789)
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2025-02-22 04:47:54 +10:00
Wilson Snyder 2d0149b703 Commentary: Changes update 2025-02-19 17:00:29 -05:00
Todd Strader 34ced254c0
Support expression coverage (#5719) 2025-02-19 16:42:23 -05:00
Krzysztof Bieganski 283f6c7433
Add `--preproc-token-limit` (#5768) 2025-02-07 10:32:12 -05:00
Wilson Snyder 6281385ee8 Commentary/Internals: Sort option names. No functional change. 2025-01-24 21:31:57 -05:00
Bartłomiej Chmiel 0507fb4655
Improve hierarchical DPI wrapper scheduling performance (#2583) (#5734) 2025-01-20 14:24:09 -05:00
Andrew Nolte f8dd65c7cd Add `--public-ignore` to ignore public metacomments (#7819) 2025-01-11 12:29:39 -05:00
Wilson Snyder 76b2ac9cc1 Support `+incdir` with multiple directories. 2025-01-05 19:30:39 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder 7a8f71e7d8 Add `--fno-slice` to disable array assignment slicing (#5644). 2024-11-28 13:49:34 -05:00
Wilson Snyder 25d75ee86f Add `--fno-inline-funcs` to disable function inlining. 2024-11-25 19:59:10 -05:00
Wilson Snyder 749b0345df Commentary: Changes update 2024-11-23 22:06:07 -05:00
Wilson Snyder 9bde98e912 Commentary 2024-11-14 21:07:45 -05:00
Wilson Snyder 3ffea76e11 Add `--no-std-waiver` and default reading of standard lint waivers file (#5607). 2024-11-12 22:11:19 -05:00
Wilson Snyder 0bf413b260 Add `lint_off --contents` in configuration files. (#5606) 2024-11-12 20:21:16 -05:00
Wilson Snyder a5b2cb6ddf Commentary: Changes update 2024-11-12 17:19:42 -05:00
Wilson Snyder 779cf9248a Cleanup/standardize configuration file string handling 2024-11-12 11:29:27 -05:00
Wilson Snyder 4d95f6f7b8 Add `--waiver-multiline` for context-sensitive `--waiver-output`. 2024-11-11 20:00:26 -05:00
Wilson Snyder 7c8ff1d19c Add `--no-std-package` as subset-alias of `--no-std`. 2024-11-11 08:30:07 -05:00
Geza Lore 03bd1bfc63
Move Concat balancing from DFG to FuncOpt (#5602)
This means it applies more widely, e.g. inside sequential logic.
2024-11-10 17:23:11 +00:00