Commit Graph

792 Commits

Author SHA1 Message Date
Pieter Kapsenberg
d1836b7b6f
Traces show array instances using brackets instead of parens (#3092) (#3095) 2021-08-12 20:40:44 +03:00
Wilson Snyder
b8e804f05b Internals: Some clang-tidy cleanups. No functional change intended. 2021-07-25 13:38:27 -04:00
Wilson Snyder
b90fce55f4 Includes: Refactor verilated.h and deprecate verilated_heavy.h (#2701). 2021-07-24 10:00:33 -04:00
Wilson Snyder
ab13a2ebdc Internals: Use C++11 const and initializers. No functional change intended. 2021-07-24 08:36:11 -04:00
Geza Lore
9907d211ff Make VlWide and VlUnpacked C++20 compatible aggregates.
C++20 requires that aggregate types do not have a user declared
constructor, not even an explicitly defaulted one. We need these types
to be aggregates for static initialization.

Fixes #3076.
2021-07-23 12:57:45 +01:00
Wilson Snyder
36599133bf Add --prof-c to pass profiling to compiler (#3059). 2021-07-07 19:12:52 -04:00
Geza Lore
19398efc4c Remove no-op VL_CELL. No functional change intended. 2021-06-19 20:42:38 +01:00
Wilson Snyder
8d737271ca Allow configure override of AR program (#2999). 2021-06-19 10:00:31 -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
Geza Lore
c75a686081
Internals: Update to clang-format-11 (#3021) 2021-06-14 14:50:40 -04:00
Geza Lore
6016e74b55 Drop ambiguous overloads in VlWide
The 32-bit build fails with the ambiguous overload present.
2021-06-14 00:37:33 +01:00
Geza Lore
c207e98306
Implement a distinct constant pool (#3013)
What previously used to be per module static constants created in
V3Table and V3Prelim are now merged globally within the whole model and
emitted as part of a separate constant pool. Members of the constant
pool are global variables which are declared lazily when used (similar to
loose methods).
2021-06-13 15:05:55 +01:00
Geza Lore
60d5f0e86b
Emit model implementation as loose methods. (#3006)
This patch introduces the concept of 'loose' methods, which semantically
are methods, but are declared as global functions, and are passed an
explicit 'self' pointer. This enables these methods to be declared
outside the class, only when they are needed, therefore removing the
header dependency. The bulk of the emitted model implementation now uses
loose methods.
2021-06-13 14:33:11 +01:00
Geza Lore
5555f20bd2 Improve ccache-report 2021-06-09 19:14:11 +01:00
Geza Lore
809701d7c6 Add missing 'inline' to function in verilated.h
Otherwise we get a separate copy of this function in every
compilation unit including this header.
2021-06-08 23:46:07 +01:00
Geza Lore
0edf1f0c94
Add ccache-report target to standard Makefile (#3011)
Using the standard model Makefile, when in addition to an explicit
target, the target 'ccache-report' is also given, a summary of ccache
hits/misses during this invocation of 'make' will be prited at the end
of the build.
2021-06-07 00:56:30 +01:00
Wilson Snyder
31bb73e3de Fix MCD close also closing stdout (#2931). 2021-06-06 19:32:48 -04:00
Pieter Kapsenberg
e4dcbb22e3
Fix unused variable warnings (#2991) 2021-05-30 20:19:35 -04:00
Wilson Snyder
0f7ec6c9ba Fix missing array include (#2966) 2021-05-17 18:24:18 -04:00
Wilson Snyder
bdc162db87 Fix 16.04 gcc warning 2021-05-16 18:38:43 -04:00
Yutetsu TAKATSUKASA
31779b8b8b
Format time string using integer (#2940)
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2021-05-16 19:01:03 +09:00
Wilson Snyder
88fed4bc2f Commentary on traces (#2925) 2021-05-13 18:57:39 -04:00
Wilson Snyder
3718fe1ca1 Commentary (trigger rebuild) 2021-05-13 18:34:20 -04:00
Yutetsu TAKATSUKASA
e3b20a3ea2
Internals: Mark VerilatedContextImp::timeFormatSuffix() const (#2947) 2021-05-11 11:45:43 -04:00
Yutetsu TAKATSUKASA
39ce2f77f4
Internals: Remove VerilatedVcd::m_suffixesp. No functional change is intended. (#2933)
Reasons are:
- it's error prone to keep updating whennever m_suffixes is resized
- invalid pointer may be set when there is not signal to trace as in t_trace_dumporder_bad
2021-05-07 20:45:58 -04:00
Yutetsu TAKATSUKASA
9797af0ad4
Introduce a macro VL_ATTR_NO_SANITIZE_ALIGN to suppress unaligned access check in ubsan (#2929)
* Add VL_ATTR_NO_SANITIZE_ALIGN macro to disable alignment check of ubsan

* Mark a function VL_ATTR_NO_SANITIZE_ALIGN because the function is intentionally using unaligned access for the sake of performance.

Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2021-05-08 07:16:40 +09:00
Yutetsu TAKATSUKASA
1e4839e5d1
Fix casting to integer not to cause integer overflow. (#2930) 2021-05-07 12:00:36 -04:00
Philipp Wagner
44fd205e12
Fix make support for gmake 3.x (#2920) (#2921)
The "file" make function is only available in gmake 4.x, which isn't
available on RHEL/CentOS 7. Use alternative syntax to support older
gmake versions.

Fixes #2920
2021-05-06 12:07:15 -04:00
Krzysztof Bieganski
5290062549
Fix bounds check in VL_SEL_IWII (#2910) 2021-05-03 17:59:41 -04:00
Wilson Snyder
2022ec43cf Update gtkwave from upstream. 2021-04-24 11:00:35 -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
David Metz
f5ad5cf034
Fix dumping waveforms to multiple FST files (#2889) 2021-04-14 16:52:14 -04:00
HyungKi Jeong
0d6099b2b7
Fix MinGW not supportting 'localtime_r'. (#2882) 2021-04-09 10:40:41 -04:00
github action
52fc134272 Apply clang-format 2021-04-07 13:56:12 +00:00
Àlex Torregrosa
2b2680770b
Improve scope types in FST and VCD traces (#2805). 2021-04-07 09:55:11 -04:00
Àlex Torregrosa
a29ac44af9
Add FST SystemC tracing (#2806) 2021-04-06 16:18:58 -04:00
Wilson Snyder
e9c7f40bb4 Internals: Prefer using over typedef. No functional change. 2021-03-29 21:28:08 -04:00
Wilson Snyder
8992e2ec02 Commentary 2021-03-28 11:50:05 -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
b6c393e9f0 Add VerilatedCovContext::forcePerInstance (#2793). 2021-03-19 22:24:00 -04:00
Wilson Snyder
82710a55a4 Quieter archive (broke few commits ago) 2021-03-19 20:58:42 -04:00
Wilson Snyder
c20bced485 Fix --output-split with class extends (#2839). 2021-03-17 18:25:54 -04:00
Wilson Snyder
e6b19d557e Fix false $dumpfile warning on model save (#2834). 2021-03-14 09:08:17 -04:00
Wilson Snyder
4261f72bd2 Fix exceeding command-line ar limit (#2834). 2021-03-13 15:10:56 -05:00
Wilson Snyder
6a189a1f81 Fix exceeding command-line ar limit (#2834). 2021-03-13 15:09:10 -05:00
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