Commit Graph

194 Commits

Author SHA1 Message Date
Geza Lore da51021b0a
Internals: Simplify AstForeach header handling (#7126)
Rename AstSelLoopVars to AstForeachHeader, and make it a non-NodeExpr.
Tweak parser to always create an AstForeachHeader, so no need to fix it
up later.
2026-02-22 18:57:12 +00:00
Yilou Wang 1717df0261
Support solve..before constraints (#5647) (#7123) 2026-02-22 11:33:18 -05:00
Geza Lore 579acced99
Internals: Make AstArg into an AstNode, not Expr (#7122) 2026-02-22 14:40:51 +00:00
Yilou Wang 443678d8c4
Support array reduction methods without 'with' clause in constraints for dynamic arrays (#7104) (#7108) 2026-02-22 09:23:02 -05:00
Geza Lore 78ee787bb1
Internals: Clean up AstArg usage in AstNodeFTaskRef (#7121)
- Strengthen type of AstNodeFTaskRef::pinsp to be List[AstArg]
- Rename 'pinsp' to 'argsp'
- Add default constructor arguments
2026-02-22 10:38:37 +00:00
Geza Lore e023113b79
Internals: Carry 'with' clause as op4 on AstNodeFTaskRef (#7114)
op4 is now available to carry the 'with' clause explicitly instead of
being part of the argument lit. Will strengthen 'pinsp' to be
List[AstArg] next.
2026-02-22 09:15:28 +00:00
Yilou Wang f25a85ea57
Fix associative array size() constraint generating invalid resize() call (#7103) (#7112) 2026-02-20 10:54:02 -05:00
Yilou Wang 0e26b049ea
Support function calls with random arguments in constraints (#7061) (#7083) 2026-02-19 15:37:55 +05:30
Ryszard Rozak 5d0352ab46
Fix conditional expressions in constraints (#7087) 2026-02-17 11:40:15 -05:00
Yilou Wang ed3aa43657
Fix enum variables in constraint solver producing invalid enum values (#7058) (#7065) 2026-02-16 22:44:38 -05:00
Yilou Wang 4357aee09a
Fix randomize() on null object handle crashing instead of returning 0 (#7059) (#7066) 2026-02-16 22:43:57 -05:00
Yilou Wang 994ef82e76
Support unique constraint on explicit array element subsets (#7057) (#7064) 2026-02-16 19:46:46 -05:00
Wilson Snyder 14a94b6de9 Internals: Add addNextNull. No functional change intended. 2026-02-16 08:09:29 -05:00
Kamil Danecki 821eacebea
Support power expressions with constant exponent in constraints (#7073) 2026-02-16 06:01:24 -05:00
Yilou Wang 9b1b9a5b3b
Fix randc cyclic behavior broken with constraints (#7029) (#7035) 2026-02-12 10:58:04 -05:00
Yilou Wang e41436bd4a
Support inherited and nested pre/post_randomize callbacks (#7049) (#7053) 2026-02-11 09:33:57 -08:00
Yilou Wang 554fcef627
Fix rand_mode()/constraint_mode() when used as function arguments (#7051) (#7055) 2026-02-11 09:33:09 -08:00
Yilou Wang 996a4b6e1a
Fix constraint_mode()/rand_mode() in constructor being overwritten by init code (#7054) 2026-02-11 09:32:08 -08:00
Yilou Wang 84350859e0
Support System Functions in Constraint Blocks (#7028) (#7036) 2026-02-11 05:19:25 -08:00
Pawel Kojma 5d12ae3a2f
Fix non-member identifiers used inside constraints (#7033) 2026-02-11 05:18:24 -08:00
Wilson Snyder 67bff893bf Fix whitespace 2026-02-10 20:17:22 -05:00
Yilou Wang 2bb807a931
Fix Inline foreach constraints on dynamic arrays of class objects (#7030) (#7037) 2026-02-10 15:22:31 -08:00
Yilou Wang 925543676e
Fix rand_mode() on nested object variables causes Z3 solver error (#7031) (#7034) 2026-02-10 13:59:09 -05:00
Yilou Wang 8791e6c5f2
Support constraint_mode() on static constraints (#7027) (#7038) 2026-02-10 13:58:35 -05:00
Igor Zaworski a660fa54a7
Fix unique constraint in derived class (#7022) 2026-02-09 09:56:38 -05:00
Geza Lore f0afcede10
Internals: Use pure expressions in V3Randomize (#6974) 2026-02-01 05:09:19 +00:00
Pawel Kojma 30e6cd9092
Fix accessing non-rand struct member in constraints (#6960) 2026-01-28 07:33:16 -05:00
Wilson Snyder 7c6c6a684b Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
Pawel Kojma c4dcdeab9a
Add parsing of solve-before inside foreach (#6934) 2026-01-20 07:14:11 -05:00
Wilson Snyder 50b6954cfc Internals: cppcheck cleanups 2026-01-17 23:18:09 -05:00
Srinivasan Venkataramanan 6fc9089a77
Support `unique` constraints (on 1D static arrays) (#6810) (#6878) 2026-01-16 08:42:09 -05:00
Yilou Wang 31f8be0b85
Support detailed failure info for constraint violations (#6617) (#6883)
* logging for the unsatisfied constraints

* Apply 'make format'

* fix teh quote error in the array indexing

* Apply 'make format'

* Len change for the hash for randomity when named assertion is used

* seperate name assertion and satisfied case

* Apply 'make format'

* simply comments and display info

* refine code and fix protect case

* format

* update display in test and .out file

* add an enable flag and warning type, add a protect_id version test and update out files

* Apply 'make format'

* simplify some comments

* update out file, ready to be merged.

* update .py file to set the hash key solid

* rename and reformate the warning message to follow the verilator style

* add a nowarn test

* Apply 'make format'

* ordering

---------

Co-authored-by: Udaya Raj Subedi <075bei047.udaya@pcampus.edu.np>
Co-authored-by: github action <action@example.com>
2026-01-12 15:53:49 +01:00
Ryszard Rozak 97d5844f2e
Support dynamic array elements in std::randomize (#6896) 2026-01-08 09:02:28 -05:00
Yilou Wang 6abfaf23a5
fix access flags in MemberSel randomization assignments (#6892) 2026-01-08 09:02:13 +01:00
Jakub Wasilewski 72a6da5ac8
Support complex expressions as std::randomize arguments (#6860) 2026-01-05 14:37:36 -05:00
Wilson Snyder 13327fa9c0 Copyright year update. 2026-01-01 07:22:09 -05:00
Wilson Snyder f6b966ed16 Fix `randc` on extended class (#6852). 2025-12-21 19:56:55 -05:00
Wilson Snyder ffa87540cc Fix randcase under fork (#6843). 2025-12-20 21:25:01 -05:00
Pawel Kojma 5244766b7b
Support reduction or in constraints (#6840) 2025-12-19 12:37:20 -05:00
Yilou Wang 41937ecbe4
Fix member select of variable without randmode (#6800) (#6833) 2025-12-18 06:49:04 -05:00
Yilou Wang f097e8a34e
Fix write variable placement for global constraints (#6740) (#6750) (#6797) 2025-12-11 14:16:34 -05:00
Geza Lore e2c05ae15e
Fix select assignment expansion (#6757) 2025-12-05 10:07:53 -05:00
Yilou Wang 22cd9bcadc
Support rand_mode in global constraint gathering (#6740) (#6752) 2025-12-04 07:16:03 -05:00
Yilou Wang e25c66de07
Support complex std::randomize patterns (#6736) (#6737) 2025-12-01 16:26:16 -05:00
Wilson Snyder 1583c79a8a Add assert (#6740 partial) 2025-11-28 09:55:19 -05:00
Yilou Wang f4654a451b
Support array reference arguments into 'std::randomize()' (#6384) (#6719) 2025-11-26 15:50:24 +03:00
Igor Zaworski 98d0eac149
Fix of deleting linked node in V3Randomize (#6718)
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
2025-11-21 07:07:50 -05:00
Yilou Wang 00988aed70
Support General Global Constraints (#6709) (#6711) 2025-11-19 11:08:42 -05:00
Yilou Wang 048c97f0ae
Support `std::randomize(){...}` (#4706) (#6573) 2025-11-14 14:32:01 -05:00
Yilou Wang 0853aa7515
Support basic global constraints (#6551) (#6552) 2025-11-05 07:14:03 -05:00