Commit Graph

972 Commits

Author SHA1 Message Date
Wilson Snyder 780163b91e Internals: Avoid extra op#() calls. No functional change intended. 2025-03-16 14:34:19 -04:00
Wilson Snyder 77cc93c176 Fix detecting bad datatype on $countones (#5674). 2025-03-15 21:57:10 -04:00
Wilson Snyder 418fc2c246 Fix reduction-or on class pointers (prep #5674) 2025-03-15 21:46:37 -04:00
Ryszard Rozak 9a6598b36f
Fix streaming of unpacked arrays concatenations (#5856) 2025-03-13 13:56:29 +01:00
Wilson Snyder 8026b2a7f3 Fix checking built-in method arguments (#5839) 2025-03-08 14:11:12 -05:00
Wilson Snyder 24dbb0bc5c Internals: V3Width call refactoring. No functional change. 2025-03-08 12:44:30 -05:00
Wilson Snyder 51fcb881d5 Fix error on out-of-range lvalue part select (#5820). 2025-03-08 11:05:58 -05:00
Wilson Snyder 8e87a99628 Fix `rand_mode` method with cast (#5831). 2025-03-05 21:43:50 -05:00
Wilson Snyder ce211ebceb Internals: Make some auto more explicit. No functional change. 2025-03-02 17:01:35 -05:00
Wilson Snyder 098ee6fa7a Internals: Cleanup some missing VL_RESTORERs. No functional change intended. 2025-02-27 21:18:27 -05:00
Wilson Snyder fdf29b970f Fix VL_UNLIKELY with constructors 2025-01-11 15:27:11 -05:00
Wilson Snyder 78d6ec8114 Fix error message when call task as a function (#3089). 2025-01-04 12:55:15 -05:00
Wilson Snyder 88dd95980a Internal cleanups, remove extra iterate, but no functional change intended 2025-01-04 12:50:55 -05:00
Wilson Snyder 1d0563212e Fix pattern assignment to real inside struct (#5713). 2025-01-03 19:39:48 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder 9a3dcaa10b Fix spelling 2024-12-19 21:30:14 -05:00
Ryszard Rozak c093b24342
Fix width extension of operands of `inside` operator (#5685) 2024-12-19 15:51:51 +01:00
Wilson Snyder 4b4ca90c71 Internals: Create FuncRef/TaskRef directly from Func/Task pointer. No functional change intended 2024-12-15 09:15:49 -05:00
Wilson Snyder e44f34dde3 Improve concat lint error & cleanups for future commit. 2024-11-30 18:56:00 -05:00
Wilson Snyder 7efa0fc82a Internals: Rewrite skipRefp to avoid recursion and fix const-ness. No functional change intended. 2024-11-29 08:10:51 -05:00
Wilson Snyder 99daa8d24b Support `default disable iff` and `$inferred_disable` (#4016). 2024-11-26 22:27:32 -05:00
Greg Davill 904be103df
Support parameter names in pattern initialization (#5593) (#5596) 2024-11-14 07:25:58 -05:00
Wilson Snyder a68da7e220 Internals: Style cleanup. Ignore whitespace if diff. No functional change. 2024-11-10 10:59:18 -05:00
Yilou Wang e47208d9b3
Support queue's assignment `push_back/push_front('{})` (#5585) (#5586)
Co-authored-by: Udaya Raj Subedi <075bei047.udaya@pcampus.edu.np>
2024-11-06 17:31:48 -05:00
Wilson Snyder 87bd8fefa0 Add error on `wait` with missing `.triggered`. (#4457) 2024-11-05 01:22:56 -05:00
Wilson Snyder 753ea29df8 Add error on illegal enum base type (#3010). 2024-11-05 00:58:46 -05:00
Todd Strader 83081aaefc
Fix struct literal on pattern assignment (#5552) (#5559) 2024-10-24 18:50:57 -04:00
Ryszard Rozak 4cd69f9feb
Fix queue element access (#5551) 2024-10-24 09:40:54 -04:00
Ryszard Rozak 0dce97b09d
Fix assignments of concatenation to queues and dynamic arrays (#5540) 2024-10-15 07:35:59 -04:00
Wilson Snyder 2fc94557a0 Fix error on enums with x/z using .name(), and internal refactoring 2024-10-11 22:37:48 -04:00
Wilson Snyder b873c23cf2 Internals: Refactor into V3Width enumSelect function 2024-10-07 21:44:07 -04:00
Wilson Snyder 28ecd8e908 Support `local` and `protected` on `typedef` (#5460). 2024-10-06 18:08:40 -04:00
github action bdd37e40fe Apply 'make format' 2024-10-06 08:02:10 +00:00
Wilson Snyder 4b713e9882 Fix pattern initialization with typedef key (#5512). 2024-10-06 04:01:15 -04:00
Arkadiusz Kozdra 91c8866ac3
Fix exponential ConcatN (#5488)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
Co-authored-by: Szymon Gizler <sgizler@internships.antmicro.com>
2024-09-26 05:12:24 -04:00
Wilson Snyder 02e88e3848 Fix suppression of WIDTH* warnings when immediately under a size cast (#3417). 2024-09-19 22:56:47 -04:00
Wilson Snyder 19170badd3 Fix warning IEEE reference (#5453) 2024-09-15 11:05:48 -04:00
Arkadiusz Kozdra 0b7510befa
Support basic dist constraints (#5431) 2024-09-12 05:20:36 -07:00
Wilson Snyder 22d6bb8180 Fix display with multiple string formats (#5311). 2024-09-11 08:41:11 -04:00
Arkadiusz Kozdra ef259f63ca
Fix randomize treated as std::randomize in classes (#5436) 2024-09-10 09:10:36 -04:00
Wilson Snyder 55ae48ac13 Commentary 2024-09-08 11:11:20 -04:00
Wilson Snyder c83ee391bb Fix associative array next/prev/first/last mis-propagating constants (#5435). 2024-09-07 15:25:35 -04:00
Arkadiusz Kozdra 409efa1249 Internals: Factor out creating clocking event. No functional change.
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-09-04 07:57:51 -04:00
Krzysztof Bieganski 088862d449
Support appending to queue via `[]` (#5421) 2024-09-02 09:45:47 -04:00
Krzysztof Bieganski d896f1ff08
Fix queue `[$-i]` select as reference argument (#5411)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-28 17:29:12 +02:00
Wilson Snyder e927536099 Reduce --debugi 2 verbosity 2024-08-27 07:28:27 -04:00
Wilson Snyder f0cd6dd95c Fix REALCVT warning on integral timescale conversions (#5378). 2024-08-24 08:01:28 -04:00
Bartłomiej Chmiel ffe76717c6
Thread pool rewrite (#5161)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
Co-authored-by: Krzysztof Bieganski <kbieganski@antmicro.com>
Co-authored-by: Arkadiusz Kozdra <akozdra@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2024-08-23 08:36:49 -04:00
Krzysztof Bieganski 930f35acc9
Support `constraint_mode` (#5338) 2024-08-21 06:16:44 -04:00
Krzysztof Bieganski 13e0fc7c27
Fix virtual interface null checks (#5391) 2024-08-21 05:40:52 -04:00
Drew Ranck 48c71ef76c
Support default value on module input (#5358) (#5373) 2024-08-15 10:04:07 -04:00
Wilson Snyder 4573e04488 Fix segfault after unsupported member call (#5359). 2024-08-13 14:39:37 -04:00
Krzysztof Bieganski 6cb0a41857
Support inline random variable control (#5317)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-13 14:20:31 -04:00
Wilson Snyder 24b097b228 Improve new class error (#5359) 2024-08-11 10:09:05 -04:00
Arkadiusz Kozdra 367249ec84
Add parsing but otherwise ignore std::randomize (#5354) 2024-08-09 17:21:32 -04:00
Arkadiusz Kozdra 78555b683c
Fix missing type coercion in 'inside {array}' (#5340) 2024-08-08 03:46:41 -04:00
Wilson Snyder c2e44dbd99 Fix $sformat with array arguments (#5330). 2024-08-08 03:32:07 -04:00
Krzysztof Boroński 45ee949cc4
Internals: Disambiguate variable references under `with` clauses of `randomize()` methods (#5277) 2024-08-02 11:45:17 -04:00
Arkadiusz Kozdra a61178bd89
Internals: Convert foreach loops in V3Begin as well as V3Width (#5283) 2024-08-02 08:29:05 -04:00
Krzysztof Bieganski 2f5c58b345
Support `rand_mode` (#5273)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-07-31 22:30:48 +01:00
Arkadiusz Kozdra 1600cc01a4
Internals: clean up begin blocks and lifetimes in foreach loops (#5306)
According to IEEE 1800-2023 12.7.3, the loop creates an implicit block
around it, containing declarations of the loop variables with automatic
lifetime.

No functional change intended.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-07-26 05:50:29 -04:00
Wilson Snyder cb5d03ff0b Fix WIDTHEXPAND on left shift of intuitive amount (#5284). 2024-07-24 06:39:27 -04:00
github action 2727c33219 Apply 'make format' 2024-07-24 10:07:59 +00:00
Wilson Snyder 0419ed0430 Fix initializing static array in dynamic arrays and queues (#5287). 2024-07-24 06:06:57 -04:00
Arkadiusz Kozdra 43377ed8b0
Add support for `this.randomize with` (#5282)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-07-19 09:14:56 +02:00
Arkadiusz Kozdra 0a9b31bb30
Add warning on dist in constraints (#5264) 2024-07-15 21:01:33 -04:00
Krzysztof Bieganski 34e37d7bd0
Keep one member map for randomize method creation (#5263)
No functional change intended.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-07-15 16:42:41 +02:00
Krzysztof Boroński 3cf9606ea9
Support inline constraints for class randomization methods (#5234)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2024-07-12 16:18:18 +02:00
Bartłomiej Chmiel 11da07d3b9
Support `$assertcontrol` assertion_type (#5236)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
Co-authored-by: Ryszard Rozak <rrozak@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2024-07-10 05:06:13 -04:00
Arkadiusz Kozdra 2cfec0ecc3
Support clocking blocks in virtual interfaces (#5235) 2024-07-09 18:31:58 -04:00
Wilson Snyder fe0b210a0c Fix errors on using string in incorrect format (#5340). 2024-07-09 08:29:22 -04:00
Arkadiusz Kozdra 442c9bc316
Support parsing and otherwise ignoring inline constraints (#5126) 2024-06-13 08:38:20 -04:00
Arkadiusz Kozdra e9f59e44a5
Fix non-constant replication in concats (#5171)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-06-10 11:21:43 -04:00
Geza Lore 2bc883f3b3
Extend out-of-range select (#5159) (#5164) 2024-06-09 17:05:14 -04:00
Geza Lore 29db25b70e
Reset radix in width warnings (#5166) 2024-06-09 14:39:17 +01:00
github action 962efa3691 Apply 'make format' 2024-06-09 02:45:26 +00:00
Valentin Atepalikhin 4babba16d6
Support 2D dynamic array initialization (#4700) (#5122)
* Support 2D dynamic array initialization (#4700)
- new[] on sub arrays (as per original issue)
- Built-in methods for sub-arrays
- Initialization and literals assignmensts
- Dynamic array as an element for other arrays and queues
2024-06-08 22:44:45 -04:00
Wilson Snyder 7c9fa8647c Fix string to be more standard (#5082) (#5083). 2024-05-31 21:51:12 -04:00
Arkadiusz Kozdra 45eb5b8a5c
Fix method calls parsing in constraints (#5110) 2024-05-10 06:37:19 -04:00
Wilson Snyder 3cb4033c97 Fix width extension of unpacked array select (#5095). 2024-05-02 20:41:39 -04:00
Wilson Snyder 8044833c74 Fix `$typename` on array.min and others (#5049). 2024-05-01 20:07:13 -04:00
Wilson Snyder 4982f63da2 Update coverage for last commit 2024-04-30 19:34:41 -04:00
Wilson Snyder 71bc60fb91 Add error on zero width select (#5028). 2024-04-30 18:38:37 -04:00
Arkadiusz Kozdra 5b839699ac
Support empty queue as dynarray default value (#5055)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-04-18 11:53:23 -05:00
Wilson Snyder 5d8da6b4ac Fix width extension on delays (#5045). 2024-04-13 08:16:59 -04:00
github action d397e0d838 Apply 'make format' 2024-03-28 11:32:57 +00:00
Arkadiusz Kozdra f645382f11
Support inside range with implicit type conversion (#5026)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-03-28 07:31:45 -04:00
Wilson Snyder 28b9216f8a Fix tracing class parameters (#5014). 2024-03-27 20:07:46 -04:00
Wilson Snyder ea8f86dd30 Internals: Prefer '(void)' to avoid unused var. No functional change. 2024-03-27 18:07:14 -04:00
Wilson Snyder 0ff77fc352 Internals: Remove extra single-line {}. No functional change. 2024-03-27 17:57:49 -04:00
Wilson Snyder db60b92613 Fix internal error on missing pattern key (#5023) 2024-03-27 08:41:58 -04:00
Geza Lore 9b729b80e0
Plug memory leaks (#5016) 2024-03-23 22:12:43 +00:00
Fuad Ismail 1c79df8630
Support stream operation on unpacked array (#4714) (#5006) 2024-03-21 18:26:42 -04:00
Wilson Snyder d3b93a1113 Fix object reference to conditional null : null 2024-03-16 09:12:18 -04:00
Wilson Snyder 5f8c06c805 Internals: Add AstNode::isNull(). No functional change. 2024-03-16 09:12:18 -04:00
Wilson Snyder 49022c3e73 Add error on calling static function without object (#4962). 2024-03-11 18:23:55 -04:00
Arkadiusz Kozdra f78783e187
Internals: Use LogOr/LogAnd on inside operator expansion (#4951)
This will help introducing constrained randomization, as SMT solvers
treat booleans and 1-bit vectors as incompatible types.
2024-03-08 08:17:41 -05:00
Wilson Snyder 0ec32ee404 Parse 1800-2023 map expressions and throw UNSUPPORTED 2024-03-02 10:15:19 -05:00
Wilson Snyder 3786f59e03 Change to IEEE 1800-2023 warning mentions 2024-03-02 10:15:19 -05:00
Wilson Snyder 89cfa0737f Internals: Fix cppcheck warnings 2024-01-17 19:48:07 -05:00
Szymon Gizler 5f52c066e5
Internals: Add serializeOnly() and dumpTreeEitherLevel() (#4815) (#4715). No functional change intended. 2024-01-09 10:35:13 -05:00
Wilson Snyder a36a07c297 Internals: Favor UASSERT over v3fatalSrc. No functional change intended. 2024-01-05 18:00:06 -05:00
github action 4172c0f29e Apply 'make format' 2024-01-03 12:13:21 +00:00
Pengcheng Xu ec01008fe3
Change zero replication width error to ZEROREPL warning (#4753) (#4762) 2024-01-03 07:11:50 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
github action 8e1c0b0852 Apply 'make format' 2023-12-21 12:49:55 +00:00
Jordan McConnon 56d6791205
Support invoking interface methods on virtual interface variables (#4774) (#4775) 2023-12-21 07:49:07 -05:00
Ryszard Rozak a811f2e17d
Support inside operator on unpacked arrays and queues (#4751) 2023-12-12 09:20:22 +01:00
Ryszard Rozak ca5a7d7656
Add class name in the error msg about calling 'new' on virtual class (#4739) 2023-12-05 16:31:59 +01:00
Krzysztof Bieganski ea2084392f
Support --timing triggers for virtual interfaces (#4673) 2023-12-04 22:11:07 -05:00
Ryszard Rozak 2dba76a7c2
Fix access type of function arguments (#4692) (#4694) 2023-11-14 17:02:13 -05:00
Wilson Snyder 9fd5634778 Internals: Remove unneeded private's. No functional change 2023-11-13 21:37:45 -05:00
Geza Lore 47588f343b
astgen: Enforce the use of aliased operand accessors (#4688)
This patch enforces the use of the most specific accessors for operands
which have an '@astgen alias' declaration, by making the superclass
accessors of the same operands private. This ensures client code is
cleaner as you can't use multiple different methods to reference the
same operands (which we used to in some places). Also prep for some
refactoring.
2023-11-12 18:30:48 +00:00
Wilson Snyder 99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) (#4683) 2023-11-11 20:20:37 -05:00
Wilson Snyder cad2780219 Fix display with no % printing assoc array (#4376). 2023-11-11 15:28:44 -05:00
Wilson Snyder f3ae4b8786 Fix spelling 2023-11-10 23:25:53 -05:00
Ryszard Rozak a764c70b4a
Fix handling of static keyword in methods (#4649) 2023-10-31 08:15:54 -04:00
Geza Lore d60f180f43 Avoid double traversal of maps
The typical find/if-not-exists-insert pattern can be achieved with 1
lookup instead of 2 using emplace with a sentinel value. Also maps value
initialize their values when inserted with the [] operator, this is
defined and so there is no need to explicitly insert zeroes for integer
values.
2023-10-28 13:41:43 +01:00
Krzysztof Boroński a87fb57656
Allow assigning events (#4403)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-10-26 16:38:47 +02:00
Aleksander Kiryk 83a0085c4d
Support `wait fork` (#4586) 2023-10-20 07:13:57 -04:00
Wilson Snyder b5828a7ce9 Fix header order botched by clang-format in recent commit. 2023-10-18 06:37:46 -04:00
github action 770cd24f27 Apply 'make format' 2023-10-18 02:50:27 +00:00
Wilson Snyder 431bb1ed16
Support compiling Verilator with gcc/clang precompiled headers (#4579) 2023-10-17 22:49:28 -04:00
Krzysztof Bieganski bc9ff6d1bf
Fix interface comparison (#4570) 2023-10-16 11:05:39 -04:00
Aleksander Kiryk ad3bcbb1bb
Support `disable fork` (#4125) (#4569) 2023-10-16 14:02:29 +02:00
Yutetsu TAKATSUKASA 4e2c63c8cb
Support concatenation of unpacked arrays (#4558) 2023-10-15 12:53:35 -04:00
Mariusz Glebocki a5ee8b39ef
Internals: Remove use of V3Width code from V3AstNodes (#4537). No functional change intended.
`getCommonClassTypep` and its helper code has been moved to AstNode
class. This is a lot better place for this functionality. Moreover, it
allowed to get rid of the dependency on V3Width from generic AST-related
code.
2023-10-09 17:43:27 -04:00
Wilson Snyder e2343c03e0 Internals: Create V3WidthCommit from overly fat header. No functional change intended. 2023-10-06 23:18:26 -04:00
Wilson Snyder 0e0df1fb3b Fix enum functions in localparams (#3999). 2023-10-06 22:38:46 -04:00
Ryszard Rozak 1b8228b642
Fix stream operations with operands of struct type (#4531) (#4532) 2023-10-03 07:23:20 -04:00
Wilson Snyder 732d03f4e5 Fix conversion of integers in $display %e (#4528). 2023-10-01 13:00:16 -04:00
Mariusz Glebocki 28bd7e5b19
Rework multithreading handling to separate by code units that use/never use it. (#4228) 2023-09-24 22:12:23 -04:00
Ryszard Rozak 47b3f464a9
Disable conversion of impure logical expressions to bitwise expressions (#487 partial) (#4437) 2023-09-18 09:21:30 -04:00
Wilson Snyder ab13548018 Support resizing function call inout arguments (#4467). 2023-09-17 18:23:44 -04:00
Wilson Snyder 761adf1cf0 Internals: Add cloneTreePure to prepare for side effect check.
Use cloneTreePure when what is being cloned must be side-effect free.
Use cloneTree when safe to contain side effects (e.g. cloning module).
2023-09-16 22:50:54 -04:00
Wilson Snyder 8bd1c63b32 Support function non-constant default arguments (#4470). 2023-09-16 17:37:25 -04:00
Wilson Snyder 05d04a3959 Internals: Fix misnamed member. No functional change. 2023-09-15 23:02:34 -04:00
Wilson Snyder aa608472ae Support recursive function calls (#3267). 2023-09-15 20:46:31 -04:00
Ryszard Rozak 96857c5f95
Fix the error message when the type of ref argument is wrong (#4490) 2023-09-15 07:17:24 -04:00
Ryszard Rozak 6c6f03cf7c
Fix static cast from a stream type (#4469) (#4485) 2023-09-12 11:06:12 -04:00
Ryszard Rozak b66c4153b1
Compute purity of AstCMethodHard (#4460) 2023-09-11 13:06:15 +02:00
Wilson Snyder 2f2f0164ff Internals: Use specific types on some cloneTrees. No functional change. 2023-09-08 21:51:59 -04:00
Wilson Snyder 0c7d485417 Fix error printing internal name() 2023-09-06 21:07:06 -04:00
Wilson Snyder 8c480fd39e Internals: Fix cppcheck warnings 2023-08-31 18:29:58 -04:00
Wilson Snyder 373265752f Fix display %x formatting of real. 2023-08-30 17:21:33 -04:00
Wilson Snyder ccdb52c1d9 Fix lifetime unknown error on enum.name (#4448). 2023-08-30 07:20:25 -04:00
Anthony Donlon cf6566b9bc
Internal: Optimize program size by refactoring error reporting routines (#4446) 2023-08-29 16:54:32 -04:00
Ryszard Rozak 2daa32b98b
Support assignments of packed values to stream expressions on queues (#4401) 2023-08-25 11:24:12 +02:00
Ryszard Rozak 2d9bc73709
Fix dtype of condition operation on class objects (#4345) (#4352) 2023-08-07 05:54:30 -04:00
Aleksander Kiryk 4afa14b612
Internals: Remove m_pkgp and m_classp from WidthVisitor (#4402) 2023-08-05 03:07:23 -04:00