Commit Graph

1160 Commits

Author SHA1 Message Date
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
Wilson Snyder 4a10c9ef6f Internals: Rename. No functional change. 2023-11-11 20:47:10 -05:00
Wilson Snyder 9a0254a118
Optimize timing-delayed queue (#4584). (#4669) 2023-11-11 10:04:10 -05:00
Wilson Snyder f3ae4b8786 Fix spelling 2023-11-10 23:25:53 -05:00
Anthony Donlon ab06ace1f6
Fix trace when using SystemC with certain configurations (#4676) 2023-11-09 07:48:23 -05:00
Marlon James 5ba7084815
Fix VPI TOP level variable iteration (#3919) (#4618) 2023-11-07 07:47:55 -05:00
Wilson Snyder dc10118d3b
Fix C++20 compilation errors (#4670) 2023-11-06 07:13:31 -05:00
Geza Lore dc346b7ffa
Remove deprecated options (#4663) 2023-11-04 17:28:36 +00:00
Geza Lore 30318a6654 C++11 cleanup 2023-10-28 11:26:48 +01:00
Ryszard Rozak e6135981a5
Fix dynamic casts of null values (#4631) 2023-10-27 15:58:40 +02: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
Krzysztof Boroński f91259f46d
Fix insertion at queue's end (#4619)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2023-10-25 17:41:28 +02:00
Marlon James cf6e362972
Support VPI variables of real and string data types (#4594) 2023-10-24 20:46:20 -04:00
Geza Lore 95c4ade718
Unify code generation for trace declarations in both trace formats (#4612)
This patch adds some abstract enums to pass to the trace decl* APIs, so
the VCD/FST specific code can be kept in verilated_{vcd,fst}_*.cc, and
removed from V3Emit*. It also reworks the generation of the trace init
functions (those that call 'decl*' for the signals) such that the scope
hierarchy is traversed precisely once during initialization, which
simplifies the FST writer. This later change also has the side effect of
fixing tracing of nested interfaces when traced via an interface
reference - see the change in the expected t_interface_ref_trace - which
previously were missed.
2023-10-24 16:33:29 +01:00
Geza Lore d1b6224c2b
Associate trace codes with function indices (#4610)
For each traced variable, also register the trace function index that
will write it.
2023-10-23 16:01:55 +01:00
Geza Lore 165a2ef1b8 Separate tracing of const values from non-const values
Some values emitted to the trace files are constant (e.g.: actual
parameter values), and never change. Previously we used to trace these
in the 'full' dumps, which also included all other truly variable
signals. This patch introduces a new generated trace function 'const',
to complement the 'full' and 'chg' flavour, and 'const' now only
contains the constant signals, while 'full' and 'chg' contain only the
truly variable signals. The generate 'full' and 'chg' trace functions
now have exactly the same shape. Note that 'const' signals are still
traced using the 'full*' dump methods of the trace buffers, so there is
no need for a third flavour of those.
2023-10-23 14:07:52 +01:00
Ryszard Rozak 774c10396c
Fix try_put method of unbounded mailbox (#4608) 2023-10-23 14:33:22 +02:00
Marlon James 33c5b5feb8
Add sv_vpi_user.h from IEEE 1800-2017 Annex M (#4606) 2023-10-22 20:41:40 -04:00
Geza Lore 4c0edd2efb Improve --prof-exec infrastructure and report
Again --prof-exec have bit-rotted a little with all the recent changes
to the structure of the generated code. This patch contains a few
improvements:
- Repalce the eval/evl_loop begin/end events with generic
  section_push/section_pop events, that can be arbitrarily sprinkled
  into the generate code (so long as they are matched correctly) to
  measure various sections. The report then contains a nested profile
  of the sections, and the VCD trace shows the section names.
- Better handling of exec graphs
- Clearer overall statistics
2023-10-21 21:09:03 +01:00
Geza Lore a09506a0ad Trivial simplification of V3EmitCModel
Still some remains of the --threads 0 mode. Remove unnecessary complexity
from V3EmitCModel. (Also don't pretend there is an MTask in single
threaded mode, when there really isn't.)
2023-10-21 20:41:46 +01:00
Geza Lore b78ea06829 Make VL_LOCK_SPINS configurable
It's unlikely one value fits all use case, so making VL_LOCK_SPINS
configurable at model build time.

For testing, we reduce the value as we expect high contention.
2023-10-21 18:05:53 +01:00
Mariusz Glebocki c7a0613c57
Support Clang 16 (#4592) 2023-10-20 15:47:09 -04:00
Aleksander Kiryk 83a0085c4d
Support `wait fork` (#4586) 2023-10-20 07:13:57 -04:00
Wilson Snyder a773a52559 Cleanup some IEEE references 2023-10-19 19:26:36 -04:00
Wilson Snyder 263697e491 Commentary (#4580) 2023-10-18 08:15:55 -04:00
Wilson Snyder 8b44a54bb2
Support Verilated precompiled header compilations (#4580) 2023-10-18 08:08:15 -04:00
Ryszard Rozak 3bb9c7ee92
Fix dictionaries with keys of class types (#4576) 2023-10-17 17:15:24 +02: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
Wilson Snyder 46f8a659b3 Fix shift to remove operation side effects (#4563). 2023-10-14 22:34:37 -04:00
Wilson Snyder 3940a214d0 Internals: Reorder some shift functions for next commit. No functional change. 2023-10-14 22:23:58 -04:00
Varun Koyyalagunta edfd3d7206
Fix large constant buffer overflow (#4556) 2023-10-13 07:08:58 +09:00
Wilson Snyder d699caf255 Revert fix Verilated Makefile to get CXX etc. from environment (#4549) (#4554). 2023-10-12 04:22:58 -04:00
Gus Smith a4b7c39a9a
Fix Verilated Makefile to get CXX etc. from enviorment (#4549) (#4554) 2023-10-10 17:53:02 -04:00
Ryszard Rozak 1c738c6b83
Fix object destruction after a copy constructor (#4540) (#4541) 2023-10-05 07:21:33 -04:00
Wilson Snyder 537650a2cd Fix stream of 32 bit (#4536). 2023-10-03 22:10:50 -04:00
Ryszard Rozak a3c154dcd3
Fix this in a constructor (#4533) 2023-10-03 14:32:18 +02:00
Wilson Snyder 84ccb23098 Fix C++11 compiler constexpr return error 2023-09-26 22:43:17 -04:00
Anthony Donlon be45a9b7d5
Style: Update clang-format config to make formatted code consistent between versions. No functional change (#4520) 2023-09-26 15:05:57 -04:00
Wilson Snyder 470f480bc1 Fix -m32 compile issue 2023-09-19 07:23:35 -04:00
Wilson Snyder 24ff3155ae Support randc (#4349). 2023-09-18 21:17:21 -04:00
Kamil Rakoczy 8bd6d7c5b1
Internals: Add V3ThreadSafety (#4477) 2023-09-13 07:57:48 -04:00
Ryszard Rozak c40e34b134
Support assignments of stream expressions on queues to packed values (#4458) 2023-09-06 15:25:48 +02:00
Wilson Snyder 36932d31c4 Fix C++11 missing C++14's std::make_unique. 2023-09-01 18:07:15 -04:00
Wilson Snyder ed25aaaad9 Internals: Fix g++ std11 warning. No functional change. 2023-09-01 17:59:30 -04:00
Wilson Snyder 147aa41ba5 Internals: Fix virt call in constructor warning. No functional change. 2023-09-01 17:58:17 -04:00
Wilson Snyder 8c480fd39e Internals: Fix cppcheck warnings 2023-08-31 18:29:58 -04:00
Yinan Xu b4b74d72f0
Add prepareClone and atClone APIs for Verilated models (#3503) (#4444)
This API is used if the user copies the process using `fork`
and similar OS-level mechanisms. The `at_clone` member function
ensures that all model-allocated resources are re-allocated, such
that the copied child process/model can simulate correctly.

A typical allocated resource is the thread pool, which every model
has its own pool.
2023-08-30 07:02:55 -04:00
Ryszard Rozak 2daa32b98b
Support assignments of packed values to stream expressions on queues (#4401) 2023-08-25 11:24:12 +02:00