Commit Graph

10 Commits

Author SHA1 Message Date
Geza Lore 1c86ff0af2
Fix corner case bugs in module and variable inlining (#6322)
There were a couple corner case bugs in V3Inline, and one in Dfg when
dealing with inlining of modules/variables.

V3Inline:
- Invalid code generated when inlining an input that also had an
  assignment to it (Throws an ASSIGNIN, but this is sometimes reasonable
  to do, e.g. hiererchical reference to an unonnected input port)
- Inlining (aliasing) publicly writeable input port.
- Inlining forcable port connected to constant.

Dfg:
- Inining publicly writeable variables

The tests that cover these are the same and fixing one will trigger the
other bug, so fixing them all in one go. Also cleanup V3Inline to be less
out of order and rely less on unique APIs only used by V3Inine (will
remove those in follow up patch).

Small step towards #6280.
2025-08-22 21:43:49 +01:00
Igor Zaworski b95a974ff1
Support generic interfaces (#6272) 2025-08-22 06:44:35 -04:00
Wilson Snyder 88046c8063 Internals: Rename AstSenTree pointers to sentreep. No functional change intended except JSON. 2025-08-17 19:14:34 -04:00
Geza Lore c3d86626ee
Internals: Remove unused AstNodeModule 'activesp' child (#6138) 2025-06-29 09:56:44 -04:00
Wilson Snyder b26a19279a Support simple `checker` blocks (#4066). 2025-04-06 23:42:49 -04:00
Wilson Snyder 27d3eb5b7b Fix UNOPTFLAT warnings with `--coverage-trace` and always_comb (#5821). 2025-03-02 20:02:55 -05:00
Zhou Shen 589612f914
Fix can't locate scope error in interface task delayed assignment (#5462) (#5568) 2024-11-02 09:42:57 -04:00
Andrew Nolte 63fa6accc4
[Vpi] Fix missing scopes 2 (#4965) 2024-04-01 23:11:15 -04:00
Geza Lore 5e1fc6e24d
Add DFG 'regularize' pass, and improve variable removal (#4937)
This functionality used to be distributed in the removeVars pass and the
final dfgToAst conversion. Instead added a new 'regularize' pass to
convert DFGs into forms that can be trivially converted back to Ast, and
a new 'eliminateVars' pass to remove/repalce redundant variables. This
simplifies dfgToAst significantly and makes the code a bit easier to
follow.

The new 'regularize' pass will ensure that every sub-expression with
multiple uses is assigned to a temporary (unless it's a trivial memory
reference or constant), and will also eliminate or replace redundant
variables. Overall it is a performance neutral change but it does
enable some later improvements which required the graph to be in this
form, and this also happens to be the form required for the dfgToAst
conversion.
2024-03-02 19:49:29 +00:00
Szymon Gizler d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00