Commit Graph

329 Commits

Author SHA1 Message Date
Zhou Shen 23cf8fae69 Fix the issue of inst para with the wrong initial values. (#5890) 2025-12-23 23:57:32 +08:00
em2machine 3ceac0b37e
Fix parameterized class module parameters (#6754) (#6834) 2025-12-19 12:57:15 -05:00
em2machine 6f43ad8607
Fix type deduction for variable parameterized classes (#6281) (#6813) 2025-12-17 08:08:44 -05:00
em2machine aff501f5c4
Fix resolution of specialized typedefs (#6754) (#6808) 2025-12-12 15:20:15 -05:00
em2machine 2995748d46
Fix parameterized class function (#6659) (#6802) 2025-12-12 04:17:08 -08:00
Wilson Snyder ec38fb723d Internals: Remove added debug to avoid false leak warning 2025-12-08 21:33:21 -05:00
Wilson Snyder 29ae520e69 Fix class param static not found again error (#6768). 2025-12-08 20:11:28 -05:00
Wilson Snyder ae480c5f76 Fix enum item references in class extends with parameters. 2025-12-07 15:26:52 -05:00
em2machine c2cba8bfc6
Fix localparam type assignment from interface type parameters (#6637) (#6732) 2025-12-06 09:42:59 -05:00
Wilson Snyder 8293a8d035 Fix multitop cross references (#6699). 2025-11-26 06:09:29 -05:00
Wilson Snyder 5c0ad5bd1f
Internals: cppcheck fixes. No functional change. (#6687) 2025-11-12 18:54:22 -05:00
Paul Swirhun aaafa6e8df
Fix local interface parameter hierarchical access (#6661) (#6666)
Co-authored-by: Paul Swirhun <paulswirhun@gmail.com>
2025-11-09 10:48:55 -05:00
Paul Swirhun e27613ed45
Fix interface parameter access in parameter map (#6587) (#6621) (#6623)
Co-authored-by: Paul Swirhun <paulswirhun@gmail.com>
2025-10-31 23:06:26 -04:00
Paul Swirhun 10935ee031
Fix HIERPARAM to be suppressed for interface ports (#6587) (#6609)
Co-authored-by: Paul Swirhun <paulswirhun@gmail.com>
2025-10-31 15:49:30 -04:00
Igor Zaworski 2ac7cf51a9
Optimization of typedef params (#6543) (#6547) 2025-10-10 10:05:47 -04:00
Igor Zaworski 1a91ab02cf
Fix passing typedef value as parameter (#6543) 2025-10-09 10:08:06 -04:00
Wilson Snyder caca1fcef0 Internals: Change order of V3Number constructor args to follow V3Const. No functional change intended. 2025-09-30 22:04:24 -04:00
Geza Lore 603f4c615a
Improve Loop unrolling (#6480) (#6493)
This patch implements #6480. All loop statements are represented using
AstLoop and AstLoopTest.

This necessitates rework of the loop unroller to handle loops of
arbitrary form. To enable this, I have split the old unroller used for
'generate for' statements and moved it into V3Param, and subsequently
rewrote V3Unroll to handle the new representation. V3Unroll can now
unroll more complex loops, including with loop conditions containing
multiple variable references or inlined functions.

Handling the more generic code also requires some restrictions. If a
loop contains any of the following, it cannot be unrolled:
- A timing control that might suspend the loop
- A non-inlined call to a non-pure function

These constructs can change the values of variables in the loop, so are
generally not safe to unroll if they are present. (We could still unroll
if all the variables needed for unrolling are automatic, however we
don't do that right now.)

These restrictions seem ok in the benchmark suite, where the new
unroller can generally unroll many more loops than before.
2025-09-29 15:25:25 +01:00
Wilson Snyder 8c7c6c594a Internals: Rename VStringSet/VStringList. No functional change. 2025-09-27 20:51:37 -04:00
Wilson Snyder 1761622e14 Fix unused parameterized class causing internal error (#4013). 2025-09-26 20:50:47 -04:00
Todd Strader aa6fbd35db
Add HIERPARAM error code (#6456) (#6484) 2025-09-25 10:27:26 -04:00
Wilson Snyder fd12ab3413 Fix interface exposure with `--public-depth` or `--trace-depth` (#5758). 2025-09-23 22:05:51 -04:00
Geza Lore 800af37975
Internals: Refactor generate construct Ast handling (#6280) (#6470)
Internals: Refactor generate construct Ast handling (#6280)

We introduce AstNodeGen, the common base class of AstGenBlock,
AstGenCase, AstGenFor, and AstGenIf, which together represent all SV
generate constructs. Subsequently remove AstNodeFor, AstNodeCase
(AstCase is now directly derived from AstNodeStmt) and adjust internals
to work on the new representation.

Output is identical modulo hashes do to changed AstNode type ids, no
functional change intended.

Step towards #6280.
2025-09-23 19:49:01 +01:00
Wilson Snyder b794c7c8d4 Add error on parameter values from hierarchical paths (#1626) (#6456). 2025-09-22 22:24:45 -04:00
Wilson Snyder a4db488b02 Internals: Fix some object-less asserts 2025-09-20 17:40:50 -04:00
Wilson Snyder 7f85d7f453 Add error on localparam value from hierarchical path (#6456). 2025-09-20 09:59:48 -04:00
Artur Bieniek 3c8b8b65d0
Fix relinking super functions to parametrized class (#6431) (#6438)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-17 08:07:04 -04:00
Geza Lore a44907b700
Fix memory leaks - batch 4 (#6439) 2025-09-16 19:22:36 +01:00
Wilson Snyder 12c524ac06 Internals: Refactoring (#6433 prep). No functional change intended. 2025-09-14 21:50:19 -04:00
Wilson Snyder 06c3c87f4e Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:47:51 -04:00
Wilson Snyder 121193e49b Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:39:45 -04:00
Wilson Snyder d7b8ede53f Internals: Refactoring V3Param. No functional change intended. 2025-09-13 22:07:13 -04:00
Artur Bieniek 1f61351e8f
Fix resolving parameters (#6388) (#6418) (#6421) (#6438) (#6429)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-12 14:24:07 -04:00
Artur Bieniek 990ee994db
Fix resolving parameters (#6388) (#6418) (#6421) 2025-09-12 07:18:12 -04:00
Geza Lore 56927fb955
Fix memory leaks - batch 3 (#6419) 2025-09-11 12:01:36 +01:00
Geza Lore f1396fbced
Fix memory leaks - batch 2 (#6417) 2025-09-10 22:42:45 +01:00
Artur Bieniek 1923d23cff
Fix resolving default params upon instantiation or reference (#4497) (#6388)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
Co-authored-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2025-09-10 07:58:15 -04:00
Geza Lore dd11d5a598
Fix memory leaks - batch 1 (#6411) 2025-09-09 22:39:44 +01:00
Geza Lore 5ffa05fba0
Fix AddressSanitizer issues (#6406)
These are all genuine bugs, brief descriptions.

1. V3OrderCFuncEmitter.h used to delete a node early that was still
   reference in a graph dump later. Not a big deal, it can be deleted
   later at the end of V3Order.

2. V3Param.cpp: this one is tricky. The variable referenced by
   AstVarXRef was deleted at the end of `visit(AstGenCase*)`, but then
   `visit(AstVarXRef*)` checks `nodep->varp()` (already deleted) to see
   if it's in an interface.

3. V3String::wildMatch is sometimes called with an empty 's' (the string
   we are matching against tha pattern 'p'), in which case it used to go
   off into the woods. Added check on call. An arbitrary number of `*`
   will still match the empty string.

4. V3Task.cpp: There was an error reported for an unsupported construct,
   then a subsequent SEGV. Just signal the error upward so we bail on an
   error in a more graceful way.

5. verylog.y: Some unsupported constructs failed to set the parsed node,
   so some memory thrash made it into some code downstream. Just parse
   these into nullptr.

Also increased the timeout on one test, which sometimes tripped with
asan on GCC during heavy host load.
2025-09-09 13:55:00 +01:00
Wilson Snyder 703f0d8c5d Commentary: spelling 2025-08-25 18:47:08 -04:00
Igor Zaworski b95a974ff1
Support generic interfaces (#6272) 2025-08-22 06:44:35 -04:00
Geza Lore 327d55d13d
Internals: Fix remaining cppcheck errors (#6319)
Fixed the non const-related issue and added suppressions for the const
ones. With that `make cppcheck` should be clean.
2025-08-21 09:43:37 +01:00
Wilson Snyder b14539569f Internals: Check and enforce member brace initialization. No functional change intended 2025-08-17 13:20:52 -04:00
github action dc049fdd74 Apply 'make format' 2025-08-06 21:30:37 +00:00
Michael Bedford Taylor 218659f4e8
Support parameter resolution of 1D unpacked array slices (#6257) (#6268) 2025-08-06 17:29:40 -04:00
Wilson Snyder dca504c706 Internals: Use UINFOTREE istead of dumpTree 2025-08-02 13:44:40 -04:00
Wilson Snyder f3560837ec Add error on missing forward declarations (#6207). 2025-07-26 17:11:35 -04:00
Igor Zaworski 98b8d43a4a
Fix parameter-dependent type linking (#6170) 2025-07-21 07:30:10 -04:00
Kamil Rakoczy 58ea7ad361
Fix class typedef elaboration (#6080) 2025-06-10 12:03:26 -04:00
Todd Strader d49efa79df
Fix type operator for interface signals (#6050) (#6049) 2025-06-06 11:29:33 -04:00