Commit Graph

1309 Commits

Author SHA1 Message Date
Wilson Snyder 6e204ed0dd Internals: Cleanup 'error error' on fatals 2024-12-11 08:52:41 -05:00
Wilson Snyder b0f898cec8 Internals: Determine needing verilated_std without symbol table 2024-12-01 11:35:00 -05:00
Wilson Snyder 0c820c3068 Internals: Standardize template argument names. No functional change. 2024-11-29 20:20:38 -05:00
Wilson Snyder 990ccd6763 Internals: Standardize on `template<typename`. No functional change. 2024-11-29 18:01:50 -05:00
Ryszard Rozak 5470cf9fa9
Support randomize size constraints with restrictions (#5582 partial) (#5611) 2024-11-15 10:45:06 -05:00
Tom Manner c98744b914
Internals: Fix `VerilatedContext::randSeed` comments (#5609) 2024-11-14 11:07:23 -05:00
Wilson Snyder 3ffea76e11 Add `--no-std-waiver` and default reading of standard lint waivers file (#5607). 2024-11-12 22:11:19 -05:00
Krzysztof Starecki 1d06364284
Support vpiDefName (#5572) 2024-11-12 11:28:39 -05:00
Yilou Wang a173883b2d
Support basic constrained random for multi-dimensional dynamic array and queue (#5591) 2024-11-08 14:04:58 -05:00
Wilson Snyder 9689a4f58a Internals: Support VL_UNREACHABLE in C++23/MSVC. No functional change intended. 2024-10-31 21:29:13 -04:00
Todd Strader dab826bef9
VPI error instead of fatal for vpi_get_value() on large signals (#5571) 2024-10-31 17:02:37 -04:00
Wilson Snyder 36888fac5d Fix long module names crashing string handling (#5546). 2024-10-22 09:25:58 -04:00
Krzysztof Boroński 7ccc93d9df
Fix reduction methods for verilated types (#5542) 2024-10-18 19:51:44 -04:00
Yilou Wang c05c48aaf3
Support unpacked array Constrained Randomization (#5437) (#5489) 2024-10-02 10:29:47 -04:00
Wilson Snyder 48faf8d036 Fix tracing when name() is empty (#5470). 2024-09-21 08:25:14 -04:00
Wilson Snyder 0fe8c73d19 Fix `$fatal` to not be affected by `+verilator+error+limit` (#5135). 2024-09-13 20:45:44 -04:00
Wilson Snyder 521c5c2f75 Fix extra events in traces (#5405). 2024-09-10 19:14:52 -04:00
Wilson Snyder 3525484730 Commentary 2024-09-10 19:04:55 -04:00
Arkadiusz Kozdra 4a58997604
Support basic constrained queue randomization (#5413)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-09-10 09:33:14 -04:00
Wilson Snyder 7b41d2046d Fix GTKWave clang 18 warning 2024-09-07 10:12:09 -04:00
Wilson Snyder e4ff0909dc Tests: Misc test cleanups from Python branch. 2024-09-03 21:42:06 -04:00
Wilson Snyder 7a74ddc1af Internals: Fix some getter/setter ordering. No functional change intended. 2024-09-02 18:48:49 -04:00
Krzysztof Bieganski 088862d449
Support appending to queue via `[]` (#5421) 2024-09-02 09:45:47 -04:00
github action e9f758ce67 Apply 'make format' 2024-09-02 01:13:41 +00:00
Wilson Snyder df594ee430 Tests: Fix ll scan test. 2024-09-01 20:59:42 -04:00
Arkadiusz Kozdra 5cb6f370e9
Internals: Emit rand constraint right away. No functional change intended. (#5409)
This change gets rid of most of the shared pointers and useless memory
allocations.  Also takes advantage of higher-arity bvxor/concat to
reduce amount of data sent to the solver.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-28 16:11:39 +02:00
Kaleb Barrett e04ef5d83a
Add method to check if there are VPI callbacks of the given type (#5399) 2024-08-27 17:36:51 -04:00
Krzysztof Bieganski f623db7d68
Normalize types in constraints (#5407)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-27 12:53:44 +02:00
Wilson Snyder 8741fd17ad Internals: cppcheck cleanups. No functional change intended. 2024-08-23 18:24:34 -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 13e0fc7c27
Fix virtual interface null checks (#5391) 2024-08-21 05:40:52 -04:00
Wilson Snyder 05e5f1955e Update include/gtkwave from upstream 2024-08-20 15:23:53 -04:00
Kaleb Barrett 6f3f64e63f
Add --timing flag as Verilated cc define (#5383) 2024-08-18 20:02:54 +03:00
Arkadiusz Kozdra 367249ec84
Add parsing but otherwise ignore std::randomize (#5354) 2024-08-09 17:21:32 -04:00
Arkadiusz Kozdra e6fe367bdb
Support streams to/from arrays of wide data (#5334) 2024-08-06 16:18:16 +01:00
Arkadiusz Kozdra a32b8d80f9
Support streaming operator on arrays and wide data (#5326)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-06 08:48:46 -04: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 1609c23fea Fix cputime being zero 2024-07-28 13:14:10 -04:00
Wilson Snyder 0419ed0430 Fix initializing static array in dynamic arrays and queues (#5287). 2024-07-24 06:06:57 -04:00
Andrew Nolte 60f9e21d8c
Fix `--x-assign` to be independent from `+verilator+rand+reset` (#5214) 2024-07-14 17:04:00 -04:00
Wilson Snyder 131623de34 Internals: Favor s string literals. No functional change. 2024-07-14 11:39:45 -04: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
Liam Braun ca4858eb7f
Fix concurrency for mailbox and semaphores (#5222) 2024-07-03 22:29:32 +01:00
Arkadiusz Kozdra 85356f464f
State-dependent constraints (#5217)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-07-01 20:19:15 +02:00
Wilson Snyder 3315a6e431 Internals: Also cleanup gettes/setters in .cpp. No functional change intended. 2024-06-22 19:50:59 -04:00
github action ba0183131c Apply 'make format' 2024-06-22 22:58:42 +00:00
Ryan Ziegler e1580b9c3d
Internals: Reorder class getters/setters (#5197). No functional change intended. 2024-06-22 18:57:54 -04:00
Wilson Snyder 2641bc98aa Update include/gtkwave from upstream 2024-06-15 08:14:43 -04:00
Wilson Snyder ad2862ce3f Fix DPI import of null C-string (#5179). 2024-06-14 22:50:54 -04:00
Wilson Snyder f96e99542c Internals: Fix cppcheck warnings. No functional change. 2024-06-13 21:29:03 -04:00
Wilson Snyder 6f0a36318e Tests: Fix test stability (#5167 update). 2024-06-11 20:55:01 -04:00
Wilson Snyder fd1e4d9e45 Add assertion on reusing VerilatedContext (#5167). 2024-06-11 19:38:58 -04:00
Wilson Snyder 920ed5ca3d Internals: Avoid unordered_map/set. No functional change intended. 2024-06-11 18:52:09 -04:00
Bartłomiej Chmiel 13114f2efe
Fix SystemC BITS_PER_DIGIT in VL_ASSIGN_SBW (#5170)
The BITS_PER_DIGIT macro value differs between SystemC versions,
thus referencing it directly is required.
2024-06-10 20:45:49 -04:00
Paul Bowen-Huggett 9ff06c1664
Fix 'experimental/coroutine' file not found on macOS (#5030) (#5031) (#5151)
libcxx has removed the experimental/coroutine include file in favor of
the C++20-standard coroutine include. If the latter is available we
use it otherwise falling back to the existing experimental version (in
which case we also disable the deprecated-experimental-coroutine warning).

(See also https://reviews.llvm.org/D108697.)
2024-06-08 08:33:50 -04:00
Kaleb Barrett 0d3cb86a44
Fix VerilatedVpiPutHolder class (#5156) 2024-06-07 22:25:33 -04:00
github action e834b5be2d Apply 'make format' 2024-05-29 20:56:45 +00:00
Kaleb Barrett bd7689f59a
Fix overflow of string on VPI reads (#5145) (#5146) 2024-05-29 16:55:46 -04:00
Kaleb Barrett 3496eb80a5
Improve VerilatedVpiPutHolder storage requirements (#5144) 2024-05-29 08:39:08 -04:00
Pawel Jewstafjew 913679f261
Fix output C++ type error on change detect of I/O arrays (#5125) (#5131)
operand order reversed for AstCMethodHard "neq"
interface between C-style arrays and VlUnpacked
overloads added to VlUnpacked::neq(), VlUnpacked::assign()
VlUnpacked::operator=() added

Fixes  #5125
2024-05-22 12:53:28 +01:00
Ethan Sifferman d9078df650
Fix 4-state value support for $readmem (#5070) (#5078) 2024-05-21 17:27:32 -04:00
Arkadiusz Kozdra 739be2f782
Support constrained randomization with external solvers (#4947) 2024-05-17 10:38:34 -04:00
Arkadiusz Kozdra 9a8e68928d
Internals: Move getenvStr to verilatedos. (#5118)
* Internals: Move getenvStr to verilatedos. No functional change intended.
* Fix POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-05-13 10:23:51 -04:00
Todd Strader 19cccd170e
Fix vpiInertialDelay for memories (#5113) 2024-05-10 18:49:43 -04:00
Yinan Xu ce5cad17a8
Add increasing of stack size when possible (#5071) (#5104) 2024-05-08 22:40:42 -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
Vito Gamberini 64ba569f0d
Fix MacOS missing <type_traits> header (#5096) (#5097) 2024-05-02 21:38:36 -04:00
Todd Strader c99364b81a
Support vpiInertialDelay (#5087) 2024-05-01 18:56:50 -04:00
Aleksander Kiryk 8e0301c287
Fix bound queue printing (#5032) 2024-04-29 21:52:06 -04:00
Wilson Snyder 5601056ed0 Tests: Check for bad event methods 2024-04-28 13:10:25 -04:00
Todd Strader 25fd8ef5c0
Add VPI eval needed tracking (#5065) 2024-04-25 09:07:31 -04:00
Gökçe Aydos a9664b8d16
Remove $(info) which cannot be silenced by `-MAKEFLAGS '--quiet'` (#5059) 2024-04-20 08:48:16 -05:00
Wilson Snyder 5d8da6b4ac Fix width extension on delays (#5045). 2024-04-13 08:16:59 -04:00
Wilson Snyder 8e44487354 Tests: update style 2024-04-13 08:02:25 -04:00
Wilson Snyder 1012c054e6 Fix `$system` with string argument (#5042). 2024-04-11 17:31:14 -04:00
Krzysztof Bieganski 7ca2d6470a
Fix consecutive zero-delays (#5038)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-04-05 16:48:47 -04:00
Wilson Snyder 28718f964a
Fix tracing replicated hierarchical models (#5027) (#5029) 2024-03-30 16:00:52 -04:00
Wilson Snyder 1d486e3a59 Rename statsPrintSummary() 2024-03-30 13:19:47 -04:00
Wilson Snyder 840970e8f7 Internals: Add VL_MT_SAFE flags 2024-03-30 11:54:29 -04:00
Wilson Snyder e390d6779d Internals: Rename threadsInModel() 2024-03-30 11:13:14 -04:00
Wilson Snyder 0114cb67ca Fix $readmem with missing newline (#5019). 2024-03-27 18:42:20 -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 4df9e2e0e5
Add printing summary reports (#4909) (#5018) 2024-03-25 07:03:17 -04:00
Wilson Snyder 71d76c993c Fix MSVC++ warnings. No functional change. 2024-03-24 10:19:26 -04:00
Wilson Snyder 38ad328956 Remove duplicate stop ignored messages 2024-03-22 19:35:42 -04:00
Fuad Ismail 1c79df8630
Support stream operation on unpacked array (#4714) (#5006) 2024-03-21 18:26:42 -04:00
Wilson Snyder ba47da6587 Internals: Move vl_timescaled_double to verilated_funcs.h. No functional change intended 2024-03-10 22:34:32 -04:00
Wilson Snyder 2c27f22900 Remove unused vltstd::exchange, should be using C++14 std::exchange instead 2024-03-10 22:32:51 -04:00
Wilson Snyder 7694a7bf41 Fix suggestion of ulimit -s (#4956) 2024-03-10 11:20:25 -04:00
Wilson Snyder 11bfe7a7bb cppcheck fixes. No functional change. 2024-03-07 19:20:00 -05:00
Andrew Nolte 6db149c588
Fix generate blocks in vpi_iterate (#3609) (#4913) 2024-03-06 18:33:30 -05:00
Geza Lore 0fed5f8b3e
Avoid creating redundant vertices in V3DfgPeephole (#4944)
Add a new data-structure V3DfgCache, which can be used to retrieve
existing vertices with some given inputs vertices. Use this in
V3DfgPeephole to eliminate the creation of redundant vertices.

Overall this is performance neutral, but is in prep for some future
work.
2024-03-06 18:01:52 +00:00
Wilson Snyder 3f0d434f82 Gtkwave: Update from upstream for warning cleanup (#4941) 2024-03-03 19:24:03 -05:00
Wilson Snyder 2cdc5ea48b Fix unaligned access in --trace --runtime-debug (#4941). 2024-03-03 12:33:11 -05:00
Kefa Chen 5f1dc73a1b
Support public packed struct / union (#860) (#4878) 2024-03-03 10:23:04 -05:00
Wilson Snyder 3786f59e03 Change to IEEE 1800-2023 warning mentions 2024-03-02 10:15:19 -05:00
Wilson Snyder fa7234ff68 Support 1800-2023 DPI headers, svGetTime/svgGetTimeUnit/svGetTimePrecision methods. 2024-03-02 10:15:19 -05:00
Wilson Snyder e320b0b581 Internals: Favor const_iterators. No functional change intended. 2024-02-25 17:12:13 -05:00
Wilson Snyder d1dec38f38 Fix integer compare warning (#4887). No functional change. 2024-02-13 18:37:41 -05:00
Wilson Snyder 248de2be2e Fix coverage with member 2024-02-08 21:51:36 -05:00
Wilson Snyder 8ab576f7e6 Internals: Use std::to_string. No functional change intended. 2024-02-04 14:38:25 -05:00
Bartłomiej Chmiel c702fc944e
Fix SystemC biguint sign desynchronization (#4870)
* Fix writing to SystemC values with `VL_ASSIGN_SBW`

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
Co-authored-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
2024-02-02 07:00:13 -05:00
Wilson Snyder 22687a6901 Internals: Use C++14 quoted literal std::string 2024-01-28 21:00:20 -05:00
Wilson Snyder eecdf4b0f3 Internals: Use C++14 exchange 2024-01-28 21:00:20 -05:00
Wilson Snyder e3e5f30ba1
Check for C++14 without also accepting GNU C++11 (#4865) 2024-01-28 19:42:29 -05:00
Wilson Snyder ce174743bb Fix some MSVC warnings 2024-01-28 14:47:14 -05:00
Wilson Snyder a84be1844f MSVC fix, part of fix of null (#4862). 2024-01-28 11:05:38 -05:00
Wilson Snyder 9ccef4180f Fix $fwrite of null (#4862). 2024-01-28 09:05:50 -05:00
github action 0b8daf4ae4 Apply 'make format' 2024-01-23 18:06:10 +00:00
Paul Swirhun 6c0c88cfc4
Fix unsafe write in wide array insertion (#4850) (#4855) 2024-01-23 13:05:27 -05:00
Wilson Snyder 1a2c9ca813 Updat GTKwave libraries from upstream 2024-01-21 13:59:54 -05:00
Wilson Snyder 3a5248a919 Internals: Mark structs final/VL_NOT_FINAL. No functional change intended. 2024-01-20 15:06:46 -05:00
Wilson Snyder 1a92502788 Add --main support for dumping coverage, and +verilator+coverage+file runtime option. 2024-01-20 12:28:49 -05:00
Wilson Snyder 89cfa0737f Internals: Fix cppcheck warnings 2024-01-17 19:48:07 -05:00
Anthony Donlon f80c167d65
Fix warnings in verilated_sc_trace.h for Clang. No functional change. (#4807) (#4827) 2024-01-17 19:30:42 -05:00
Tim Hutt 5073f208af
Internals: Use more standard syntax for avoiding unused variable warnings (#4826) 2024-01-13 15:34:59 -05:00
Larry Doolittle c9d7486d16
Fix maybe-uninitialized compiler warning (#4820) (#4822) 2024-01-12 13:09:34 -05:00
Wilson Snyder 19cb366e5d Update ifdef (#4805) (#4807). No functional change. 2024-01-08 07:35:34 -05:00
Wilson Snyder 69043549d6 Fix const anon union (#4800) 2024-01-06 17:26:07 -05:00
Wilson Snyder 68e4eeb53e Add predicted stack overflow warning (#4799). 2024-01-06 16:16:14 -05:00
Wilson Snyder 0ca90257a5 Add predicted stack overflow warning (#4799). 2024-01-06 16:14:58 -05:00
Anthony Donlon 7507c5f56c
Support SystemC 3.0.0 public review version (#4805) (#4807) 2024-01-06 06:01:35 -05:00
Wilson Snyder 47b129bf07 Commentary 2024-01-05 07:14:40 -05:00
Marlon James 8ea814e4b4
Fix VPI parameter iteration (#4798) 2024-01-02 18:57:34 -05:00
Marlon James 0195fe9dfd
Add `vpiConstType` support to `vpi_get_str()` (#4797) 2024-01-02 18:52:57 -05:00
Marlon James e430ea13f4
Fix `vpi_get()` and `vpi_get64()` to return vpiUndefined on errors (#4795)
See IEEE 1800-2017 section 38.6 and 38.7.
2024-01-02 16:25:14 -05:00
Paul Wright 3adb31f53b
Fix $time not rounding up (#4790) (#4792) 2024-01-01 20:11:46 -05:00
Wilson Snyder 3eaed3b6f5
Remove deprecated 32-bit pointer mode (#4791). 2024-01-01 10:16:48 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder 4655ee014b Fix max multiply width. (#4781) 2023-12-31 11:42:06 -05:00
Wilson Snyder ca3b5fbe99 Add verilated asserts that VL_MULS_MAX_WORDS does not overflow (#4781). No functional change intended. 2023-12-30 15:31:58 -05:00
Wilson Snyder 9de6612cde Avoid shift by 32 even if later masked, to avoid sanitizer warning (#4781). No functional change intended. 2023-12-30 14:46:57 -05:00
Rasfunk 2d7e8b58e4
Require C++14 or newer (#4784) (#4786) 2023-12-29 10:39:00 -05:00
Wilson Snyder 1a43afe6f7 Fix $finish twice to no longer exit (#4757). 2023-12-24 11:02:52 -05:00
Wilson Snyder 69b779b4a8 Internals: Cleanup cpp-check warnings. No functional change. 2023-12-20 07:49:03 -05:00
Todd Strader 5ec9bfc47d
Support packages in vpi_handle_by_name() (#4768) 2023-12-15 17:32:23 -05:00
Todd Strader 1066f06ec1
Support VPI parameter iteration (#4765) 2023-12-15 13:53:13 -05:00
Todd Strader fced4d6e57
Support vpiConstType in vpi_get() (#4761) 2023-12-14 20:37:47 -05:00
Ryszard Rozak a811f2e17d
Support inside operator on unpacked arrays and queues (#4751) 2023-12-12 09:20:22 +01:00
Geza Lore 5d99534d54
Improve W primitive operations with -Oz (#4733) 2023-12-02 22:59:30 +00:00
Geza Lore f048cff093
Add inline for VL_ATTR_ALWINLINE, even on non GNU-C platforms (#4734)
This is required to avoid multiple definition errors at link time for
functions defined in headers and marked VL_ATTR_ALWINLINE.
2023-12-02 21:51:59 +00:00
Krzysztof Boroński bd38c8fe3c
Fix # 0 delays for process resumption, etc. (#4697) 2023-12-01 13:08:58 -05:00
Todd Strader 9a0748d8ed
vpi_iterate packages with vpiInstance (#4726) 2023-12-01 07:34:09 -05:00
Wilson Snyder a022b672a0 Fix 0**0 with wide numbers (#4721). 2023-11-26 17:11:22 -05:00
Wilson Snyder 58d9a5ebac Use newline instead of endl, for fewer stream flushes 2023-11-24 11:45:52 -05:00
Wilson Snyder c8063e5732 Internals: Misc cleanups in V3Graph and V3Dead. No functional change. 2023-11-12 22:08:08 -05:00
Wilson Snyder 30a0d62436 Fix assignment of class reference to itself causing double free.
Test in next commit.
2023-11-12 07:30:56 -05:00
Wilson Snyder 91d0f25442 Internals: Fix style of iterator. No functional change. 2023-11-11 20:52:23 -05:00