Wilson Snyder
b9d7819faa
Internals: Fix some cppcheck issues. Some dump functions fixed.
2022-07-30 10:01:39 -04:00
Wilson Snyder
99bdc27be3
Internals: Cleanup some statics, trivial part towards ( #3419 )
2022-05-15 14:26:55 -04:00
Wilson Snyder
e02f97854c
Deprecate 'vluint64_t' and similar types ( #3255 ).
2022-03-27 15:27:40 -04:00
Wilson Snyder
50094ca296
Internals: Add cpplint control file and related cleanups
2022-01-09 16:49:38 -05:00
Wilson Snyder
15b32dc140
Internals: cpplint cleanups. No functional change.
2022-01-08 12:01:39 -05:00
Wilson Snyder
4cd56b1fb9
Use C++11 standard types for MacOS portability ( #3254 ) ( #3257 ).
2022-01-01 16:04:20 -05:00
Wilson Snyder
ca42be982c
Copyright year update.
2022-01-01 08:26:40 -05:00
Wilson Snyder
cd737065f2
Internals: More const. No functional change intended.
2021-11-26 17:55:36 -05:00
Wilson Snyder
e87a726989
Internals: More const. No functional change intended.
2021-11-25 09:05:50 -05:00
Wilson Snyder
959793cde3
Internals: Cleanup VL_VALUE_STRING_MAX widths ( #3050 ).
2021-08-23 21:13:33 -04:00
Wilson Snyder
b8e804f05b
Internals: Some clang-tidy cleanups. No functional change intended.
2021-07-25 13:38:27 -04:00
Wilson Snyder
ab13a2ebdc
Internals: Use C++11 const and initializers. No functional change intended.
2021-07-24 08:36:11 -04:00
Wilson Snyder
52cde49a6f
Internals: Add more const. No functional change.
2021-06-18 22:24:08 -04:00
Wilson Snyder
5fddf51e8c
Internals: Favor VlWide over WData arrays. No functional change intended.
2021-06-17 21:17:25 -04:00
Todd Strader
f446295274
Public interface params ( #2901 )
2021-04-21 13:46:13 -04:00
Todd Strader
a1cd55225c
more vpi_get_str() ( #2894 )
2021-04-21 08:09:19 -04:00
Wilson Snyder
e9b5721fb0
Internals: Remove VL_FUNC as __func__ part of C++11
2021-03-28 11:14:51 -04:00
Wilson Snyder
ca01d6f18d
Internals: Add some std::'s. No functional change intended.
2021-03-26 21:23:18 -04:00
Wilson Snyder
2e158d88c1
Commentary. Remove dox comments from private members,
2021-03-20 21:11:53 -04:00
Wilson Snyder
a1ab295b74
Commentary: Cleanup all include/* header comments.
2021-03-20 17:46:00 -04:00
Wilson Snyder
3a55600913
Internals: Restyle with C++11 using replacing typedef
2021-03-12 18:10:45 -05:00
Wilson Snyder
404b323f8c
Internals: Remove some unnecessary typedefs. No functional change.
2021-03-12 17:26:53 -05:00
Wilson Snyder
2cad22a22a
Add simulation context (VerilatedContext) ( #2660 ). ( #2813 )
...
** Add simulation context (VerilatedContext) to allow multiple fully independent
models to be in the same process. Please see the updated examples.
** Add context->time() and context->timeInc() API calls, to set simulation time.
These now are recommended in place of the legacy sc_time_stamp().
2021-03-07 11:01:54 -05:00
Wilson Snyder
47dcbd4b8a
Internal: Remove deprecated/insecure functions. No functional change intended.
2021-03-06 10:34:03 -05:00
Wilson Snyder
018d994781
Convert VPI to singleton, part of ( #2660 ).
2021-03-04 19:23:40 -05:00
Wilson Snyder
ed2f8dc097
Internals: Rename some internal functions etc to avoid _V
2021-03-03 22:53:50 -05:00
Wilson Snyder
be31fdcfe4
Use Google-style-guide header guard naming, to avoid __ prefix.
2021-03-03 21:57:07 -05:00
Wilson Snyder
8c2ee6c5ab
With -DVL_NO_LEGACY hide all outdated API routines
2021-02-22 22:59:23 -05:00
Wilson Snyder
9650aefa42
Internals: Cleanup unneeded {}. No functional change
2021-02-21 21:25:21 -05:00
Wilson Snyder
bd602d0e2d
Copyright year update
2021-01-01 10:29:54 -05:00
Wilson Snyder
b7a533109d
Fix cppcheck warnings. No functional change intended.
2020-12-23 15:22:02 -05:00
Wilson Snyder
1e34ae31d2
Fix vpi_release_handle to be called implicitly per IEEE ( #2706 ).
2020-12-18 21:16:57 -05:00
Wilson Snyder
3797b5bca1
Check for vpi_release_handle even when no VL_DEBUG
2020-12-18 20:46:43 -05:00
Wilson Snyder
c39a8b439a
Internals: Use emplace instead of insert(make_pair(...)). No functional change intended.
2020-12-18 18:24:47 -05:00
Wilson Snyder
ff702174d8
Report double calls to vpi_release_handle when using VL_DEBUG
2020-12-16 19:10:17 -05:00
Marlon James
457d1a66f2
Fix VPI memory word indexing ( #2695 )
...
* Test that indexing into memory word fails
* VPI: don't index into memory word
Memory and memory words share a VerilatedVar, so check for memory word before attempting to index.
2020-12-12 22:47:47 -05:00
Marlon James
30546afdab
Fix VPI range iterator null return ( #2691 )
...
* Test that range iterator exhausts after 1 dimension
* Separate range iterator from range object
Range iterators should return NULL after all ranges have been returned
2020-12-12 08:11:08 -05:00
Wilson Snyder
b054d937cb
Rename static/thread misnamed variables. No functional change.
2020-12-01 19:01:20 -05:00
Wilson Snyder
212e8fb14b
Internals: Cleanup some inlines, use constexpr. No functional change intended.
2020-12-01 18:49:03 -05:00
Wilson Snyder
f2d8e45d72
For performance, use unordered_set/map where possible. No functional change intended.
2020-11-25 20:57:30 -05:00
Wilson Snyder
b6ded59c2b
Internals: Use and enforce class final for ~5% performance boost.
2020-11-18 21:32:16 -05:00
Marlon James
899e7bacb2
Fix VPI callback list iteration ( #2644 )
...
The end iterator always points to an element past the end of the list.
When new elements are added to the back of the list, they are inserted
before the end iterator.
Instead, track the last element in the list at the start of processing
and stop after it's been processed.
2020-11-17 17:19:51 -05:00
Wilson Snyder
1b0a48ea02
Internals: Use C++11 = default where obvious. No functional change intended.
2020-11-16 19:56:16 -05:00
Wilson Snyder
f6f7684ccd
Internal member initialization. No functional change intended.
2020-11-15 15:40:35 -05:00
Wilson Snyder
44eb362a18
clang-tidy cleanups. No functional change intended.
2020-11-10 21:40:14 -05:00
Kaleb Barrett
1c2384cb3d
Fix iteration over mutating list bug in VPI impl ( #2588 )
...
Previously, in any given VPI callback, if the callback body registered
the same callback, that registering would be processed in the currently
executing call to the call*Cbs function. In the worse case, this could
lead to an infinite loop.
2020-11-06 17:56:15 -05:00
Marlon James
34b8ed4cf0
Return bool from callValueCbs() ( #2589 ) ( #2605 )
...
* Return bool from callValueCbs()
Returns true if any registered callback was called, else false.
* Add test for callCbs() and callValueCbs()
2020-10-26 21:55:27 -04:00
Wilson Snyder
02e83da2fa
Fix Travis/GCC warnings.
2020-08-27 08:47:34 -04:00
Wilson Snyder
6013b54f7b
clang-tidy cleanups. No functional change intended.
2020-08-16 14:55:46 -04:00
Wilson Snyder
78aee6f4e7
C++11: Use sized enums (+4% performance).
2020-08-16 12:05:35 -04:00
Wilson Snyder
ee9d6dd63f
C++11: Favor auto, range for. No functional change intended.
2020-08-16 11:44:06 -04:00
Wilson Snyder
72d2cff0a1
C++11: Use member declaration initalizations. No functional change intended.
2020-08-16 11:44:06 -04:00
Wilson Snyder
033e7ac020
C++11: Use member declaration initalizations. No functional change intended.
2020-08-16 11:44:06 -04:00
Wilson Snyder
042d3eed23
C++11: Use override where possible. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
c0127599df
C++11: Use nullptr. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
dced49a804
Internals: Cleanup branch coverage. No functional change.
2020-07-10 19:17:21 -04:00
Ludwig Rogiers
c367b671b6
Support VPI parameter and localparam ( #2370 )
2020-06-12 18:38:01 -04:00
Geza Lore
fac89c5d62
Close trace on vl_fatal/vl_finish ( #2414 )
...
This is required to get the last bit of FST trace and close the FST file
properly on $stop or assertion failure.
2020-06-12 07:15:42 +01:00
Wilson Snyder
a433096d5a
Internals: Fix misc internal coverage holes. No functional change intended.
2020-06-04 19:49:39 -04:00
Ludwig Rogiers
2b6353b36e
Support vpi_handle type vpiLeftRange and vpiRightRange for vpiRange objects ( #2395 )
...
* Implement vpi_handle type vpiLeftRange and vpiRightRange for vpiRange objects
* Change VerilatedVpioConst type to vpiConstant
2020-06-02 08:04:22 -04:00
Wilson Snyder
6ce878cb0d
Fix some clang-tidy warnings
2020-06-01 23:16:17 -04:00
Geza Lore
95534fa5c5
Remove unused headers ( #2389 )
2020-05-31 20:21:07 +01:00
Geza Lore
9712ceedd7
Internals: Remove empty statements. No functional change intended.
...
Remove stray semicolons, mostly by capturing them in macros accurately.
This removes a ton on lint warnings from CLion.
2020-05-30 19:13:18 +01:00
Ludwig Rogiers
460315128b
Fix vpi_get_value() error message when passing unsupported vpiHandle. ( #2378 )
2020-05-29 08:10:22 -04:00
Wilson Snyder
5089ac6119
Remove VL_ULL as ULL now in MSVC & C++11
2020-05-28 20:32:07 -04:00
Ludwig Rogiers
101314a572
Add VPI error reset to vpi_get_time() ( #2347 )
2020-05-22 07:09:47 -04:00
Wilson Snyder
17e7da77f0
Misc internal coverage improvements.
2020-05-16 18:02:54 -04:00
Stephen Henry
1a0da2e4ec
Support multi-channel descriptor (MCD) I/O ( #2197 )
2020-05-14 18:03:00 -04:00
Wilson Snyder
d4f7f5297a
Support IEEE time units and time precisions, #234 . ( #2253 )
...
Includes `timescale, $printtimescale, $timeformat.
VL_TIME_MULTIPLIER, VL_TIME_PRECISION, VL_TIME_UNIT have been removed
and the time precision must now match the SystemC time precision.
To get closer behavior to older versions, use e.g. --timescale-override
"1ps/1ps".
2020-04-15 19:39:03 -04:00
Wilson Snyder
5c966ec510
clang-format many files. No functional change.
...
Use nodist/clang_formatter to reformat files that are now clean.
2020-04-13 22:52:23 -04:00
Wilson Snyder
50535a1894
Internals: cppcheck 1.90 fixes. No functional change intended.
2020-04-05 18:57:47 -04:00
Wilson Snyder
a13eab55f5
Internals: Add missing VL_DO_CLEARs. No functional change.
2020-04-04 13:06:31 -04:00
Wilson Snyder
38a31ae168
Cleanup misc clang-tidy warnings. No functional change intended
2020-04-03 22:31:54 -04:00
Matthew Ballance
510be53521
Expose VPI cbNextDeadline via the public API ( #2212 )
...
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2020-03-28 13:47:21 -04:00
Wilson Snyder
1ce360ed5b
Add SPDX license identifiers. No functional change.
2020-03-21 11:24:24 -04:00
Wilson Snyder
0aabe6ce00
Internals: Fix cppcheck warning including missing init.
2020-02-03 22:10:29 -05:00
Wilson Snyder
623c4ec103
Internals: Create VL_DO_DANGLING. No functional change intended.
2020-01-16 20:17:11 -05:00
Wilson Snyder
f23fe8fd84
Update copyright year.
2020-01-06 18:05:53 -05:00
Stefan Wallentowitz
3ac6745658
Add vpiTimeUnit and allow to specify time as string, bug1636.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-12-13 19:11:37 -05:00
Wilson Snyder
700f2072c0
Framework for WDatas being vectors of 64-bit EDatas, but not supporting this at this time.
2019-12-08 21:36:38 -05:00
Matthew Ballance
f63dfd7028
Fix VPI timed callbacks to be one-shot, pull5.
...
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-11-19 22:44:33 -05:00
Wilson Snyder
5811ec07e6
Update URLs to https://verilator.org
2019-11-07 22:33:59 -05:00
Stefan Wallentowitz
633131b984
Return vpiModule when it is the scope.
...
Return the vpiModule when it is searched for by name and not the vpiScope,
now that we actually have it (one step further to supporting vpiModule in
complete).
Signed-off-by: Stefan Wallentowitz <stefan@wallentowitz.de>
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-10-02 18:47:12 -04:00
Stefan Wallentowitz
045ff25f80
Support vpiModule, bug1469.
...
Add very basic support for vpiModule. Basically it allows to traverse
the module tree to find a variable etc. It does not support more than
vpi_iterate and vpi_scan for vpiModule along basic operations like
vpi_get_str on vpiModule.
The support is added non-intrusively to non-VPI verilator runs. It
essentially:
- Tracks the creation of cell instances and keeps them alive until
the emit phase. They are there converted to scopes if modules.
- Emits empty (don't add anything during construction)
VerilatedScopes for all inlined modules, only for those inlined
modules that are on the hierarchical path to public variables.
- Adds VerilatedHierarchy as abstraction to structure of the
scopes. It is only created for VPI designs. It allows to traverse
the hierarchy from the top (NULL).
Signed-off-by: Stefan Wallentowitz <stefan@wallentowitz.de>
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-10-01 21:57:45 -04:00
Stefan Wallentowitz
99a8845a96
Fix VerilatedVpioVar vpiMemory/vpiReg accessor, bug1528.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-09-27 00:01:09 -04:00
Philipp Wagner
d7b6b53c4d
Make callCbs() public.
...
VerilatedVpi::callCbs() can be used by the user to signal
simulation-related callbacks, e.g.
VerilatedVpi::callCbs(cbStartOfSimulation).
The information if any callbacks have been called may be important to
drive an evaluation until no further changes are observed.
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
Signed-off-by: Philipp Wagner <mail@philipp-wagner.com>
Signed-off-by: Stefan Wallentowitz <stefan@wallentowitz.de>
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-09-21 07:43:20 -04:00
Stefan Wallentowitz
8686ed9b00
Fix vpiType accessor, bug1510.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-09-18 12:24:19 -04:00
Stefan Wallentowitz
32e1207782
Fix vpiType accessor, bug1509.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-09-18 07:22:59 -04:00
Wilson Snyder
01ef7122e9
Internals: Add lcov code coverage markers.
2019-06-30 22:37:03 -04:00
Wilson Snyder
96c70ea2df
Internals: Fix some long lines in include files. No functional change.
...
When merging, recommend using "git merge -Xignore-all-space"
2019-05-14 22:49:32 -04:00
Wilson Snyder
f96942a526
Internals: Detab and fix spacing style issues in include files. No functional change.
...
When merging, recommend using "git merge -Xignore-all-space"
2019-05-08 21:13:38 -04:00
Wilson Snyder
8a4aeddbb0
Copyright year update.
2019-01-03 19:17:22 -05:00
Wilson Snyder
8170391573
Internals: Fix spacing of comments. No functional change.
2018-11-28 19:59:10 -05:00
Wilson Snyder
304a24d03a
Internals: Fix many clang-tidy issues. No functional change intended.
2018-10-14 18:39:33 -04:00
Wilson Snyder
595419b370
Internals: Sort includes for clang-tidy. No functional change intended.
2018-10-14 07:04:18 -04:00
Wilson Snyder
75f28fd446
Internals: Fix spacing of function calls. No functional change.
2018-08-25 09:52:45 -04:00
Wilson Snyder
1c5c9e2435
cppcheck fixes
2018-06-12 21:14:20 -04:00
Wilson Snyder
770045676f
Internals: Split some extremely long lines. No functional change.
2018-03-10 16:32:04 -05:00
Wilson Snyder
22573d238b
Internals: Fix GCC8 cppcheck warnings. No functional change.
2018-02-07 20:16:53 -05:00
Wilson Snyder
8e65d93d6d
Copyright year update. No functional change.
2018-01-02 18:05:06 -05:00