Wilson Snyder
ce79c4ebf9
Fix class unpacked-array compile error ( #2774 ).
2021-03-13 12:47:19 -05:00
Wilson Snyder
abcb9cc91b
Add VlWide to WDataInP. Part of coming commit.
2021-03-12 21:16:07 -05:00
Wilson Snyder
689d5b5090
Internals: Add std:: to make_pair. No functional change.
2021-03-12 18:17:49 -05: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
Drew Taussig
3651321679
Fix for MSVC++ compile error ( #2831 ) ( #2833 )
2021-03-11 13:30:23 -05:00
Wilson Snyder
9483ebefae
Internal code coverage cleanups.
2021-03-07 21:05:15 -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
caa9c99837
Commentary
2021-03-07 08:28:13 -05:00
Wilson Snyder
8c3ad591ae
Internals: Add additional mutex exclusion checks. No functional change.
2021-03-06 18:29:11 -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
90773f4980
Internals: Avoid coverage base class. No functional change.
2021-03-03 18:58:54 -05:00
David Turner
e81abdb616
Fix slice-assign overflow bug ( #2803 ) ( #2811 )
2021-03-01 18:20:56 -05:00
Wilson Snyder
5489bbcc41
Fix deadlock when error in flush routines
2021-02-27 14:43:52 -05:00
Wilson Snyder
206bd416aa
Internals: Cleanup some RANDOM functions.
2021-02-24 22:13:24 -05:00
Wilson Snyder
30c34e4975
Internals: Avoid extra typedef. No functional change.
2021-02-24 21:13:00 -05:00
Wilson Snyder
a886f28c85
Internals: Use static_assert
2021-02-23 19:02:04 -05:00
Wilson Snyder
8c2ee6c5ab
With -DVL_NO_LEGACY hide all outdated API routines
2021-02-22 22:59:23 -05:00
Wilson Snyder
6ada513fa5
Internal: Don't serialize debug, turn on each run.
2021-02-22 22:39:57 -05:00
Wilson Snyder
9f381f7617
Remove old SP_AUTO_COVER3 define
2021-02-22 22:27:33 -05:00
Wilson Snyder
48986ccdeb
Remove VL_TIME_I, rarely/never used and too little precision.
2021-02-21 21:56:43 -05:00
Wilson Snyder
0f8e494c76
Tests: Add t_verilated_legacy
2021-02-21 21:49:55 -05:00
Wilson Snyder
9650aefa42
Internals: Cleanup unneeded {}. No functional change
2021-02-21 21:25:21 -05:00
Wilson Snyder
3ae75926e4
Inline old VL_CTOR macros.
2021-02-21 12:12:11 -05:00
Wilson Snyder
e44563fddc
Tests: Use vl_time_stamp64 where reasonable
2021-02-16 20:14:30 -05:00
Wilson Snyder
43cf5693d1
Fix shifts by > 32 bit values ( #2785 ).
2021-02-14 11:15:12 -05:00
github action
af5fc4f1ad
Apply clang-format
2021-02-03 19:41:25 +00:00
Àlex Torregrosa
e77e4e1fe6
Improve struct scopes when dumping structs to VCD ( #2776 )
2021-02-03 14:40:21 -05:00
Yutetsu TAKATSUKASA
b82085fbc6
Internals: Use size_t to compare with vector::capacity(). No functional change intended. ( #2758 )
2021-01-16 09:47:27 -05:00
Wilson Snyder
3bb8fbe73b
Internal coverage improvements
2021-01-13 20:01:10 -05:00
Philipp Wagner
b7c26dbea9
Fix to include limits header for std::numeric_limits ( #2747 )
...
Code using `std::numeric_limits` wasn't including the limits header,
leading to a compilation error in Fedora Rawhide (GCC 11.0).
2021-01-11 11:23:54 -05:00
Wilson Snyder
bd602d0e2d
Copyright year update
2021-01-01 10:29:54 -05:00
Wilson Snyder
93476a7372
Internals: Convert vlcovgen to python3. No functional change.
2020-12-23 16:54:05 -05:00
Wilson Snyder
b7a533109d
Fix cppcheck warnings. No functional change intended.
2020-12-23 15:22:02 -05:00
Wilson Snyder
941e5c659a
Fix cppcheck parse error
2020-12-23 15:22:02 -05:00
Nandu Raj
1124829500
Fix $urandom_range maximum value ( #2723 )
2020-12-22 07:52:38 -05:00
Yutetsu TAKATSUKASA
4096dee598
Use files from gtkwave3-gtk3, not from gtkwave3 ( #2718 )
2020-12-21 07:06:03 +09:00
HyungKi Jeong
36f41e08a5
Fix to allow inheriting 'VerilatedVcdFile' class. ( #2720 )
2020-12-20 12:18:09 -05:00
Yutetsu TAKATSUKASA
cb4ddd3213
Update files from GTKWave f119b35816e605e753fc1a24ae121a3787615b26 ( #2716 )
2020-12-19 09:13:18 -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
43811821d6
Backout GTKwave update 7deac509c6
2020-12-18 21:03:02 -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
7deac509c6
GTKwave updates from upstream.
2020-12-18 19:33:57 -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
Todd Strader
a88965a124
Fix scope map for multiple construction ( #2710 )
2020-12-17 12:21:40 -05:00
Wilson Snyder
ff702174d8
Report double calls to vpi_release_handle when using VL_DEBUG
2020-12-16 19:10:17 -05:00
Wilson Snyder
d5d6598d75
Internals: spacing
2020-12-16 19:08:10 -05:00
Yutetsu TAKATSUKASA
ce9293fcb3
Fix memory leaks found in trace related tests ( #2708 )
...
* Fix memory leak of t_trace_cat and t_trace_cat_renew
* Fix memory leak of t_trace_c_api
* Fix memory leak in t_trace_public_func and t_trace_public_func_vlt
* Fix memory leaks in t_flat_build (and probably more).
* Use unique_ptr in testcases
2020-12-17 08:31:47 +09:00
Yutetsu TAKATSUKASA
738ee3d4eb
Fix memory leaks when using shared protect-lib ( #2707 )
...
* Guarantee mechanism to initialize just once is now in VerilatedInitializer. No functional change is intended.
* Make sure to initialize Verilated::NonInitialized just once. Fixes
memory leak in t_prot_lib_shared and t_hier_block_prot_lib_shared.
* Call setup() and teardown() of Verilated::NonSerialized.
2020-12-16 12:30:58 -05:00
Yutetsu TAKATSUKASA
f98782c061
Tests: Fix use-after-free in fst testcases ( #2709 )
2020-12-16 10:00:13 -05:00
Wilson Snyder
c54360485e
Fix over-iterating dpi dimensions ( #2703 ).
2020-12-15 22:09:24 -05:00
Wilson Snyder
3590f7e206
Remove unused VL_DISABLE_INTRINSICS, use VL_PORTABLE_ONLY instead
2020-12-13 19:14:09 -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
Wilson Snyder
517fdb7587
Support queue of arrays
2020-12-12 19:19:32 -05:00
Wilson Snyder
93304f3b82
Internals: Reorder library code. No functional change.
2020-12-12 08:58:03 -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
82d8fe0c27
Internal coverage fixes
2020-12-10 22:01:56 -05:00
Wilson Snyder
af0e535015
Internals: Remove Xnor node type.
...
Convert to Not(Xor(x)) up front, to help code coverage and optimize out extra nots sooner.
2020-12-10 00:04:10 -05:00
Wilson Snyder
ab4ad9965c
Fix DPI open array handling issues, and do internal coverage ( #2350 ).
2020-12-09 22:15:34 -05:00
Wilson Snyder
7d05be802d
Misc internal coverage hole and related bug fixes
2020-12-09 19:18:12 -05:00
Wilson Snyder
74ef35d3b3
Support $cast and new CASTCONST warning.
2020-12-05 22:58:36 -05:00
Wilson Snyder
e3c32adad4
Rename static/thread misnamed variables. No functional change.
2020-12-01 19:32:01 -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
014e43f0ef
Reset index counts on clearing verilated_cov (static removal)
2020-12-01 18:30:25 -05:00
Wilson Snyder
9a9931fb9d
Support complex function arguments.
2020-11-28 13:46:14 -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
e85a2e860e
Support 'with item.index'.
2020-11-23 23:18:58 -05:00
Wilson Snyder
b684995292
Support $random and $urandom seeds.
2020-11-19 21:32:33 -05:00
Wilson Snyder
b6ded59c2b
Internals: Use and enforce class final for ~5% performance boost.
2020-11-18 21:32:16 -05:00
Wilson Snyder
c0888c1b0f
Internals: Use newline instead of endl to avoid unneeded flush.
2020-11-18 21:03:23 -05:00
Yutetsu TAKATSUKASA
b500e57991
Add an overload of VL_CVT_PACK_STR_NN for lvalue ( #2651 )
2020-11-19 06:52:03 +09:00
Yutetsu TAKATSUKASA
19e4013ab5
Allow conversion from const void * to QData ( #2650 )
2020-11-18 23:44:45 +09:00
Wilson Snyder
82b2af3b83
Commentary
2020-11-17 22:48:37 -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
Wilson Snyder
0505816d31
Fix C++14 deprecated random_shuffle.
2020-11-03 08:52:47 -05:00
Wilson Snyder
48bcf66ac7
Fix C++14 deprecated random_shuffle.
2020-11-02 20:07:58 -05:00
Wilson Snyder
0145d9d514
Fix C++14 deprecated random_shuffle.
2020-11-02 19:55:01 -05:00
Wilson Snyder
2aedc91151
Support queue and associative array 'with' statements. ( #2616 )
2020-11-01 10:56:07 -05:00
Wilson Snyder
3a53b32a32
Move queue code before assoc, as assoc will eventually use queues. No functional change.
2020-10-30 22:49:55 -04:00
Wilson Snyder
51b0963e61
Internals: Favor const for map keys. No functional change intended.
2020-10-30 18:00:40 -04:00
Yutetsu TAKATSUKASA
05ff96bea3
Fix SEGV when $fgets, $sscanf, or $fscanf is used with string ( #2604 )
...
* Add a test to use string for $fgets
* Use dedicated function for $fgets to std::string
* share the implementation of $fgets
* Pass -1 for bitwidth of std::string to distinguish from POD
* add checks for scanf with string
* apply clang-format
2020-10-28 08:37:12 +09: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
95d1272269
Support associative array pattern assignments and defaults.
2020-10-25 21:05:22 -04:00
Wilson Snyder
046c0a7aa1
Fix queue assignment with different limits, negative indicies
2020-10-24 22:08:11 -04:00
Wilson Snyder
51d1235cda
Shorter stringify of empty queues, and better queue tests
2020-10-24 18:00:40 -04:00
Wilson Snyder
5d3dd52f13
Support queue slicing ( #2326 ).
2020-10-18 13:23:39 -04:00
Wilson Snyder
4576644591
Prep for future queue slicing.
2020-10-17 21:09:10 -04:00
Wilson Snyder
8750352495
Internal coverage: Cleanup some savable errors and coverage.
2020-10-13 19:26:16 -04:00
Markus Krause
0a9ae154be
introduce define for FST tracing ( #2592 )
...
This is to allow C++ verilator toplevel to support
multiple modes of waveform tracing
VM_TRACE_FST can be used inside a #if VM_TRACE
section to switch between classic .vcd tracing and the
more compact .fst format supported by GTKWAVE
2020-10-10 21:17:39 -04:00
Rafal Kapuscik
7be343fd7c
Support 'this' ( #2585 ).
2020-10-08 07:54:01 -04:00
Wilson Snyder
efbcb094ca
Fix flushCall for backward compatibility ( #2580 ).
2020-10-04 07:47:25 -04:00
Wilson Snyder
5033c906fd
Commentary ( #2577 )
2020-09-30 16:55:26 -04:00
Wilson Snyder
87e4a86fbb
Internal coverage improvements
2020-09-18 21:27:36 -04:00
Yutetsu TAKATSUKASA
70eb99b050
Fix double-free on shared protect-lib ( #2526 )
...
* Add a test to use shared object of protect-lib
* Add a guard to call ctor/dtor just once even when a protec-lib is shared object.
* Pass .a to linker in leaf-last order for older ld.
* Add -flat_namespace for mac
2020-08-31 08:22:31 -04:00
Wilson Snyder
ba5779c69e
Fix queues as class members ( #2525 ).
2020-08-29 12:56:43 -04:00
Wilson Snyder
069eb97eca
SystemC 2.3.0 or newer (SYSTEMC_VERSION >= 20111121) is now required.
2020-08-29 10:45:47 -04:00
Wilson Snyder
687edba969
Make: less verbose archive
2020-08-27 18:47:12 -04:00
Wilson Snyder
02e83da2fa
Fix Travis/GCC warnings.
2020-08-27 08:47:34 -04:00
Yutetsu TAKATSUKASA
ef04ada12b
Fix test failure on FreeBSD ( #2521 )
...
* Don't use thin-archive to merge multiple archives because it is gnu-ar specific.
* remove -time option that may caues -Wunused-command-line-argument warning
2020-08-27 07:52:48 +09:00
Wilson Snyder
3ad3944f2c
Fix Travis/GCC warnings. For VPI/DPI still avoid C++11.
2020-08-24 18:49:36 -04:00
Wilson Snyder
f4a72946eb
Support $urandom, $urandom_range without stability.
2020-08-23 08:42:50 -04:00
Wilson Snyder
143050e034
Fix fwrite GCC warning
2020-08-22 21:34:41 -04:00
Wilson Snyder
698e0fbbd1
configure: Try compiler flags to get to C++11 ( #2502 )
2020-08-17 07:40:07 -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
7c54a451a9
C++11: Remove pre-c11 VL_OVERRIDE etc. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
2118038cb9
Commentary
2020-08-15 14:22:50 -04:00
Wilson Snyder
9927e8b3ee
clang-format uses C++11 style. No functional change.
2020-08-15 09:48:08 -04:00
Yutetsu TAKATSUKASA
953a442827
Support hierarchical verilation using protect lib ( #2206 )
2020-08-15 09:43:53 -04:00
Wilson Snyder
f3b28c5c74
Remove configure --enable-prec11-final
2020-08-15 09:39:59 -04:00
Wilson Snyder
74754d94c3
Codacy fix
2020-08-06 22:03:00 -04:00
Wilson Snyder
98cd925fda
Fix non-32 bit conversion to float ( #2495 ).
2020-08-06 21:56:43 -04:00
Wilson Snyder
edf6a40f19
Fix VL_CONSTHI truncation ( #2473 )
2020-07-18 17:35:20 -04:00
Wilson Snyder
1488f9130d
Enable simple function localparams ( #2461 )
2020-07-15 19:31:19 -04:00
Marshal Qiao
d55c233427
Fix bad delete in verilated_save.h ( #2462 )
2020-07-14 06:39:00 -04:00
Wilson Snyder
7e7447812c
Fix modulus exception ( #2460 )
2020-07-11 08:17:16 -04:00
Wilson Snyder
b35b5aacfa
Fix division exception ( #2460 )
2020-07-10 22:28:02 -04:00
Wilson Snyder
dced49a804
Internals: Cleanup branch coverage. No functional change.
2020-07-10 19:17:21 -04:00
Fan Shupei
04c96694e6
Add $writememb support ( #2450 )
2020-07-01 17:32:15 -04:00
Wilson Snyder
a2abd361db
gtkwave: Update to match spacing of upstream. No functional change.
2020-06-30 19:16:10 -04:00
Geza Lore
09806d7576
Update fstapi.c to latest (fix undefined thread behaviour)
2020-06-30 19:50:41 +01:00
Geza Lore
7342cf278a
Travis: Add 32-bit build on focal
2020-06-28 20:11:22 +01:00
Geza Lore
378d947702
Travis: Add FreeBSD build + portability fixes
2020-06-28 15:37:24 +01:00
Stephen Henry
98b5417e04
Disable argument template type deduction. ( #2426 )
...
Fixes #2421 , #2435 relating to 32-bit build failures.
2020-06-28 10:54:15 +01:00
Wilson Snyder
b1495f0742
Commentary ( #2423 )
2020-06-14 10:44:57 -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
c5d61da5d2
Internal coverage: Fix coverage of tests that abort. No functional change intended.
2020-06-05 08:00:22 -04:00
Wilson Snyder
a433096d5a
Internals: Fix misc internal coverage holes. No functional change intended.
2020-06-04 19:49:39 -04:00
Wilson Snyder
c3271aa891
Fix duplicate VLCOVGEN short code
2020-06-02 21:42:24 -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
Wilson Snyder
ae448e5ef9
Fix older GCC compiler error.
2020-06-01 09:08:50 -04:00
Wilson Snyder
a57826b125
Line Coverage now tracks all statement lines, not just branch lines.
2020-05-31 15:52:17 -04:00
Geza Lore
95534fa5c5
Remove unused headers ( #2389 )
2020-05-31 20:21:07 +01:00
Wilson Snyder
b60a92eed3
Fix pre-C11 compiler warning.
2020-05-30 21:11:37 -04: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