Commit Graph

173 Commits

Author SHA1 Message Date
Yilou Wang a3e7fc89af final refining 2025-10-23 16:23:31 +02:00
Yilou Wang 8a85bf6c81 refine the code and improve the branch coverage 2025-10-22 22:15:06 +02:00
Yilou Wang 514a1c6050 rm IS_RANDOMIZED_INLINE_GLOBAL 2025-10-22 17:29:17 +02:00
github action a4d3ccacbf Apply 'make format' 2025-10-22 14:30:44 +00:00
Yilou Wang 3dddb90fc5 try to improve the coverage 2025-10-22 16:29:30 +02:00
github action 6ae6b7817e Apply 'make format' 2025-10-22 08:19:15 +00:00
Yilou Wang 0b8a7171ef refine and fix 2025-10-22 10:18:02 +02:00
github action 6cd4d84c7e Apply 'make format' 2025-10-20 20:53:32 +00:00
Yilou Wang 69281ab33c var_naming and revert 2025-10-20 22:52:06 +02:00
Yilou Wang 64d48e4879
Merge branch 'master' into new_branch_for_global_rand 2025-10-19 11:59:03 +02:00
github action d5ec5a0eb0 Apply 'make format' 2025-10-19 09:57:28 +00:00
Yilou Wang 7c8d5a7468 naming adjustment and leak-error fixing 2025-10-19 11:55:59 +02:00
Yilou Wang 2679c8a235 leaked node fix 2025-10-12 15:53:28 +02:00
Yilou Wang 36a94a4fc5 fix leaked node 2025-10-11 23:24:14 +02:00
github action 0adb467cea Apply 'make format' 2025-10-11 20:12:38 +00:00
Yilou Wang 87e1381ffe fix cpp style 2025-10-11 22:11:29 +02:00
github action feb8934185 Apply 'make format' 2025-10-11 15:57:28 +00:00
Yilou Wang 468d6fec0f remove debug cout messages 2025-10-11 17:52:47 +02:00
Yilou Wang c29e2601cb fix normal randomize case 2025-10-11 17:44:20 +02:00
Yilou Wang 76a60df6fd temp store 2025-10-11 17:34:48 +02:00
github action f9487374b5 Apply 'make format' 2025-10-09 18:32:39 +00:00
Yilou Wang 591d74c5d8 add tests 2025-10-09 20:31:04 +02:00
Yilou Wang b69e0569cf remove redundant debug info and modify comments 2025-10-09 16:02:59 +02:00
github action 809fba224b Apply 'make format' 2025-10-09 13:31:58 +00:00
Yilou Wang 9793737878 global rand traversal fix 2025-10-09 15:30:39 +02:00
Wilson Snyder 165622a9e9 Add NORETURN warning on functions without return values (#6534). 2025-10-07 21:06:11 -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
github action 0c32d90b38 Apply 'make format' 2025-09-28 09:12:04 +00:00
Udaya Raj Subedi c5671e9e0b MInor bug fix for the global rand 2025-09-28 11:10:36 +02:00
Wilson Snyder 3b623dc12e Internals: Refactor to create VCMethod (#3715). No functional change intended. 2025-09-27 08:22:17 -04:00
Wilson Snyder 4ad1dde723 Internals: Emit newlines for AstCStmt automatically. No functional change intended. 2025-09-26 08:25:47 -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 a647747260 Add IMPLICITSTATIC also on procedure variables. 2025-09-21 19:52:19 -04:00
Geza Lore e0e8503151
Internals: Make all AstBegin constructor arguments explicit (#6464) 2025-09-20 13:16:03 -04:00
github action 88e70eaed8 Apply 'make format' 2025-09-19 14:13:39 +00:00
Yilou Wang 77f6b85d1f 1 2025-09-19 16:11:58 +02:00
github action 358c5a7d72 Apply 'make format' 2025-09-19 09:05:12 +00:00
Yilou Wang 65142e7e7a merge and refine the code 2025-09-19 11:03:56 +02:00
Geza Lore a44907b700
Fix memory leaks - batch 4 (#6439) 2025-09-16 19:22:36 +01:00
Geza Lore 56927fb955
Fix memory leaks - batch 3 (#6419) 2025-09-11 12:01:36 +01:00
Geza Lore dd11d5a598
Fix memory leaks - batch 1 (#6411) 2025-09-09 22:39:44 +01:00
Wilson Snyder 0d1f036f17 Add error on non-packed struct randc (#5999). 2025-09-06 08:24:19 -04:00
Igor Zaworski 4070db9990
Fix rand variable inside constraint (#6315) 2025-09-04 06:19:08 -04:00
Wilson Snyder e32108713d Fix randomize on function-local variable (#6234). 2025-08-27 21:25:40 -04:00
Geza Lore 6f69c990fd
Internals: Remove AstCondBound and AstNodeCond (#6293) (#6294)
Fixes #6293
2025-08-15 15:49:06 -07:00
Wilson Snyder 3ca1c9b6dd Internals: Fix and enforce brace new constructors. No functional change intended. 2025-08-08 18:21:12 -04:00
Wilson Snyder d1f851e1e1 Internals: Optimize empty 'if' into StmtExpr 2025-08-08 05:10:40 -04:00
Wilson Snyder dca504c706 Internals: Use UINFOTREE istead of dumpTree 2025-08-02 13:44:40 -04:00
Ryszard Rozak a5b0a0d9dd
Add support for `$countones` in constraints (#6144) (#6235) 2025-07-28 16:14:03 +02:00
Yilou Wang 10ac99ac05
Support randomization of scope variables with 'std::randomize()' (#5438) (#6185) 2025-07-25 12:13:46 +02:00