Commit Graph

528 Commits

Author SHA1 Message Date
Krzysztof Starecki 69dce205d3
Support multidimensional array access via VPI (#2812) (#5573) 2025-01-09 19:04:26 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder a2f327f729 Support `extern constraint` 2024-12-12 08:16:19 -05:00
Wilson Snyder a247041cab Internals: Refactor 713dab27 to avoid IfaceRef being known in LinkCells 2024-12-03 12:00:56 -05:00
Wilson Snyder 2d71d66cf5 Commentary 2024-11-30 22:35:36 -05:00
Wilson Snyder e44f34dde3 Improve concat lint error & cleanups for future commit. 2024-11-30 18:56:00 -05:00
Wilson Snyder f631587a20 Internals: Rename classOrPackageSkip as kept confusing with member accessor. No functional change. 2024-11-29 16:57:18 -05:00
Wilson Snyder 9f8fcaf827 Fix linking types of typedefs 2024-11-29 16:09:39 -05:00
Wilson Snyder 93090c56ee Fix mis-aliasing of instances with mailbox parameter types (#5632 partial). 2024-11-29 09:20:02 -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 8db9db7e25 Internals: Rename same() function. No functional change. 2024-11-28 15:01:58 -05:00
Wilson Snyder a934d965be Internals: Rename isInoutish 2024-11-25 18:25:36 -05:00
Ryszard Rozak 5470cf9fa9
Support randomize size constraints with restrictions (#5582 partial) (#5611) 2024-11-15 10:45:06 -05:00
Wilson Snyder 4257fcf9d0 Change parsing of cells to be non-symbol table sensitive. 2024-11-10 12:08:37 -05:00
Wilson Snyder 4969125e5a Add error on soft constraints of randc 2024-11-09 12:45:55 -05:00
Wilson Snyder 3fae11595a Support `pure constraint`. 2024-11-09 12:05:26 -05:00
github action 08279645ca Apply 'make format' 2024-10-06 22:10:07 +00:00
Wilson Snyder 28ecd8e908 Support `local` and `protected` on `typedef` (#5460). 2024-10-06 18:08:40 -04:00
Wilson Snyder d0ec6092b3 Change package import/export to link post-parsing, prep for later commit. 2024-09-28 20:55:22 -04:00
Wilson Snyder 3ae18af8dd Fix short-circuting on method calls (#5486). 2024-09-24 20:24:27 -04:00
Wilson Snyder 0fe8c73d19 Fix `$fatal` to not be affected by `+verilator+error+limit` (#5135). 2024-09-13 20:45:44 -04:00
Krzysztof Bieganski afb8428db4
Support IEEE-compliant intra-assign delays (#3711) (#5441) 2024-09-06 18:13:52 -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 b1927e4fb5
Fix infinite recursion due to recursive functions/tasks (#5398) 2024-08-26 12:18:52 -04:00
Krzysztof Bieganski 930f35acc9
Support `constraint_mode` (#5338) 2024-08-21 06:16:44 -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
Ryszard Rozak 3426ee5170
Fix purity of functions with AstJumpBlock or AstStmtExpr (#5332) 2024-08-06 16:07:38 +01:00
Bartłomiej Chmiel 7d5e19365e
Support assertcontrol directive type (#5310)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
2024-08-05 17:54:13 -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
Wilson Snyder 0419ed0430 Fix initializing static array in dynamic arrays and queues (#5287). 2024-07-24 06:06:57 -04:00
Wilson Snyder 131623de34 Internals: Favor s string literals. No functional change. 2024-07-14 11:39:45 -04:00
Krzysztof Bieganski abb46c9cb2
Refactor `AstMemberSel` creation with `AstVar` (#5251)
No functional change intended.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-07-11 16:42:58 +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
Bartłomiej Chmiel 9e2c8aefc8
Add `--pins-sc-uint-bool` to force SystemC uint type (#5192) 2024-06-25 05:27:09 -04:00
Wilson Snyder f96e99542c Internals: Fix cppcheck warnings. No functional change. 2024-06-13 21:29:03 -04: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 739be2f782
Support constrained randomization with external solvers (#4947) 2024-05-17 10:38:34 -04:00
Bartłomiej Chmiel 2a9f29912c
Add parameterless assert control system tasks (#5010)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Co-authored-by: Ryszard Rozak <rrozak@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
Co-authored-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-05-08 08:31:34 -04:00
Geza Lore 80b08b71aa
Support NBAs to arrays inside loops (#5092)
For NBAs that might execute a dynamic number of times in a single
evaluation (specifically: those that assign to array elements inside
loops), we introduce a new run-time VlNBACommitQueue data-structure
(currently a vector), which stores all pending updates and the necessary
info to reconstruct the LHS reference of the AstAssignDly at run-time.

All variables needing a commit queue has their corresponding unique
commit queue.

All NBAs to a variable that requires a commit queue go through the
commit queue. This is necessary to preserve update order in sequential
code, e.g.:
 a[7] <= 10
 for (int i = 1 ; i < 10; ++i) a[i] <= i;
 a[2] <= 10
needs to end with array elements 1..9 being 1, 10, 3, 4, 5, 6, 7, 8, 9.

This enables supporting common forms of NBAs to arrays on the left hand
side of <= in non-suspendable/non-fork code. (Suspendable/fork
implementation is unclear to me so I left it unchanged, see #5084).

Any NBA that does not need a commit queue (i.e.: those that were
supported before), use the same scheme as before, and this patch should
have no effect on the generated code for those NBAs.
2024-05-03 07:45:49 -04:00
Andrew Nolte 63fa6accc4
[Vpi] Fix missing scopes 2 (#4965) 2024-04-01 23:11:15 -04:00
Wilson Snyder 1ed5557d2d
Support 1800-2023 class and function :initial, :extends, :final virtual overrides (#5025). (#5025) 2024-03-27 23:57:58 -04:00
Wilson Snyder 0ff77fc352 Internals: Remove extra single-line {}. No functional change. 2024-03-27 17:57:49 -04:00
Wilson Snyder 341963e820 Internals: Avoid '%Error' so can grep logs for real errors 2024-03-27 09:00:34 -04:00
Geza Lore e8a9662eb5
Simplify LogicMTask/ExecMTask IDs (#4990)
There is no strong need to re-map LogicMTask IDs and it just adds extra
processing. Instead we just allocate a separate set of ExecMTask IDs as
they are created, which can also be used as the unique profiling ID as
well. The only effect on the output of this is the change in mtask IDs
emitted, which was fairly arbitrary to begin with.
2024-03-16 14:02:17 +00:00
Wilson Snyder 4a439beae5 Add error on missing pure virtual functions (#4961). 2024-03-11 18:56:30 -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
Kefa Chen 5f1dc73a1b
Support public packed struct / union (#860) (#4878) 2024-03-03 10:23:04 -05:00
Yutetsu TAKATSUKASA da9521a351
Internals: Add --debug-width option for developers to check width consistency (#4923) 2024-03-02 08:57:26 -05:00
Yutetsu TAKATSUKASA 65b632a7dd
Improve assertion for unique case (#4892)
- Use parallel_case, unique, and unique0 in error message
- Distinguish multiple match and no match
- Show the case value that triggers the assertion
2024-02-13 21:53:32 +09:00
Szymon Gizler d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00
Wilson Snyder 715dce546f Fix debug infinite loop when bad coverage pointers 2024-02-07 19:57:02 -05:00
Wilson Snyder d6f8ccd20b Add `unroll_disable` and `unroll_full` loop control metacomments (#3260). 2024-01-26 07:49:07 -05:00
Wilson Snyder 21e85f87bc Fix compilation error on multi-inherited interface class usage (#4819). 2024-01-23 19:36:11 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Ryszard Rozak a811f2e17d
Support inside operator on unpacked arrays and queues (#4751) 2023-12-12 09:20:22 +01:00
Wilson Snyder feae9ca4aa
Internals: Use astgen for cross-node pointers. No functional change intended. (#4727) 2023-11-30 19:58:16 -05:00
Krzysztof Boroński cc982ec7fe
Fix range access to fields under classes that depend on parameter resolution (#4681)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-11-15 14:24:41 +01:00
Wilson Snyder c8063e5732 Internals: Misc cleanups in V3Graph and V3Dead. No functional change. 2023-11-12 22:08:08 -05:00
Wilson Snyder 9d7f5bdc26 Internals: Dump CFunc entry points. 2023-11-11 20:34:51 -05: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 dc10118d3b
Fix C++20 compilation errors (#4670) 2023-11-06 07:13:31 -05:00
Geza Lore 3c144ada53
Delete AstNode user5 (#4638)
This saves about 5% memory. V3AstUserAllocator is appropriate for most use
cases, performance is marginally up as we are mostly D-cache bound on
large designs.
2023-10-29 01:12:27 +01: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
Chih-Mao Chen 98252634fc
Include systemc instead of systemc.h in model header files (#4622) (#4623)
This may require that SystemC programs add:
using namespace sc_core;
using namespace sc_dt;
2023-10-26 14:36:18 -04: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
Geza Lore 34708bbba1 Respect --dump-tree-addrids in tree dumps 2023-10-25 18:17:26 +01:00
Marlon James cf6e362972
Support VPI variables of real and string data types (#4594) 2023-10-24 20:46:20 -04:00
Krzysztof Bieganski 7b12f6a1dd
Support NBAs in non-inlined functions/tasks (#4496) (#4572) 2023-10-20 20:01:45 -04:00
Wilson Snyder b7233d063f Internals: Fix same() called outside of sameTree (#4561). 2023-10-18 17:36:21 -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 99ea16d7fd
Fix dynamic triggers for named events (#4571) 2023-10-16 11:06:41 -04:00
Aleksander Kiryk ad3bcbb1bb
Support `disable fork` (#4125) (#4569) 2023-10-16 14:02:29 +02:00
Yutetsu TAKATSUKASA 25dde58297
Internals: Use VN_AS instead of static_cast. Fix some wrong types. (#4561) 2023-10-16 05:17:52 -04:00
Anthony Donlon bba3487dc4
Internals: Fix hash and comparison function for AstBasicDType (#4564) 2023-10-15 15:15:46 -04:00
Wilson Snyder 684aba0e90 Fix purity calculation during V3Const simplifying Ast 2023-10-15 06:25:42 -04:00
Anthony Donlon 7ce0bd1181
Fix broken link error for enum references (#4551) 2023-10-10 17:55:40 -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
Ryszard Rozak 44e7d2ebe6
Internals: rename VPurity class and related functions. No functional change (#4523) 2023-09-29 12:23:51 +02: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 4636e9cffb
Fix passing arguments by reference (#3385 partial) (#4489) 2023-09-20 07:33:11 -04:00
Wilson Snyder 24ff3155ae Support randc (#4349). 2023-09-18 21:17:21 -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 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 c52ba28dd0 Tests: Fix commentary to unify issue references. 2023-09-15 18:12:11 -04:00
Ryszard Rozak b66c4153b1
Compute purity of AstCMethodHard (#4460) 2023-09-11 13:06:15 +02:00
Krzysztof Bieganski fb1fc46b06
Internals: Rework self pointers (#4396) 2023-09-08 07:34:35 -04:00
Ryszard Rozak 91227d26bb
Internals: Rename pure to dpiPure. No functional change. (#4461) 2023-09-08 08:51:19 +02:00
Ryszard Rozak 2d9bc73709
Fix dtype of condition operation on class objects (#4345) (#4352) 2023-08-07 05:54:30 -04:00
Krzysztof Bieganski 9caa79a7ea
Internals: Remove the name field from `AstVarRef` (#4395) 2023-08-03 02:52:52 -04:00
Wilson Snyder f94c1b32e5 Internals: Make V3MemberMap to remove member cache (#4350) 2023-07-08 12:40:27 -04:00
Wilson Snyder ff4923cf67 Internals: Make V3MemberMap towards removing member cache (#4350) 2023-07-08 12:27:50 -04:00
Ryszard Rozak 242f661644
Fix selects of static members (#4326) 2023-06-30 09:12:22 +02:00
Ryszard Rozak b517fb5ee3
Support some stream operations on queues (#4292) 2023-06-13 22:46:42 -04:00
github action a7b0551d23 Apply 'make format' 2023-06-03 14:11:23 +00:00
John Wehle dc34968fe7
Add class specific same methods for AstVarScope, AstVar, and AstScope (#4203) (#4250) 2023-06-03 10:07:39 -04:00