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
Yutetsu TAKATSUKASA
0658a7654f
Add tests of tracing SystemC model verilated with --hierarchical ( #3252 )
...
* Tests: Add t_hier_block_sc_trace(fst|vcd) that tests tracing hierarchical block on SystemC.
* Add a check that elaboration is done before a trace file is opened.
* Add a check that elaboration is done before trace() is called to verilated SystemC model.
* Tests: call sc_core::sc_start(sc_core::SC_ZERO_TIME) before opening a trace file
* Tests: Fix t_trace_two_sc to call sc_start before opening trace
* Use vl_fatal as suggested in PR review.
2021-12-23 08:41:11 +09:00
Wilson Snyder
7526151670
Fix bad ending address on $readmem ( #3205 ).
2021-12-21 19:55:04 -05:00
Wilson Snyder
560b59f97f
Use C++11 standard types for MacOS portability ( #3254 ).
2021-12-21 13:18:05 -05:00
Geza Lore
ff425369ac
Reduce .rodata footprint of trace initialization ( #3250 )
...
Trace initialization (tracep->decl* functions) used to explicitly pass
the complete hierarchical names of signals as string constants. This
contains a lot of redundancy (path prefixes), does not scale well with
large designs and resulted in .rodata sections (the string constants) in
ELF executables being extremely large.
This patch changes the API of trace initialization that allows pushing
and popping name prefixes as we walk the hierarchy tree, which are
prepended to declared signal names at run-time during trace
initialization. This in turn allows us to emit repeat path/name
components only once, effectively removing all duplicate path prefixes.
On SweRV EH1 this reduces the .rodata section in a --trace build by 94%.
Additionally, trace declarations are now emitted in lexical order by
hierarchical signal names, and the top level trace initialization
function respects --output-split-ctrace.
2021-12-19 15:15:07 +00:00
Wilson Snyder
8696e38e6f
Primary inputs and outputs (VL_INW/VL_OUTW) now use VlWide type ( #3236 ).
2021-12-09 19:41:33 -05:00
Adrien Le Masle
c3f17ce2c4
Fix VL_STREAML_FAST_QQI with 64 bit left-hand-side ( #3232 ) ( #3235 )
2021-12-09 17:30:04 -05:00
Wilson Snyder
b7d20b102b
Internals: Remove unused and cleanup VL_ASSIGNSEL.
2021-12-05 11:59:49 -05:00
Wilson Snyder
293a5f402b
Fix timescale portability on Arm64 ( #3222 ).
2021-11-28 15:47:19 -05:00
Wilson Snyder
692306ef44
Optimize $random concatenates/selects ( #3114 ).
2021-11-28 14:17:28 -05:00
Wilson Snyder
98037cad56
Internals: Optimize VL_RANDOM to have unclean output
2021-11-28 14:00:19 -05:00
Wilson Snyder
61e3536163
Internals: Remove some unused arguments.
2021-11-28 13:44:16 -05:00
Wilson Snyder
a1a186a86c
Internals: Remove some unused arguments.
2021-11-28 13:07:37 -05:00
Wilson Snyder
cd737065f2
Internals: More const. No functional change intended.
2021-11-26 17:55:36 -05:00
Wilson Snyder
393b9e435d
Internals: Revert previous commit const for clang.
2021-11-25 09:47:06 -05:00
Wilson Snyder
e87a726989
Internals: More const. No functional change intended.
2021-11-25 09:05:50 -05:00
Wilson Snyder
0abc856be9
Fix %0 format on $value$plusargs.
2021-11-17 17:54:07 -05:00
Wilson Snyder
899de9a282
Add --lib-create, similar to --protect-lib but without protections ( #3200 ).
2021-11-14 09:39:31 -05:00
Wilson Snyder
90102d9867
Commentary
2021-10-25 21:02:02 -04:00
Iru Cai
9731ec76e3
Fix $urandom_range when the range is 0 ... UINT_MAX ( #3161 )
2021-10-11 06:45:19 -06:00
Wilson Snyder
4739956cfe
Internals: Add missing const. No functional change.
2021-10-05 21:20:22 -04:00
Wilson Snyder
55da66164b
Fix verilator_gantt time on Arm.
2021-10-04 22:13:34 -04:00
Wilson Snyder
9029da5ab8
Add profile-guided optmization of mtasks ( #3150 ).
2021-09-26 22:51:11 -04:00
Wilson Snyder
44809f1843
Remove unused CFG_CXXFLAGS_STD_OLDEST
2021-09-26 16:01:25 -04:00
Wilson Snyder
c2819923c5
Verilator_gantt now shows the predicted mtask times, eval times, and additional statistics.
2021-09-23 22:59:36 -04:00
Wilson Snyder
68f1432a68
Gantt: Subtract common start in slowpath to reduce collection measurement error.
2021-09-23 19:43:20 -04:00
Wilson Snyder
d09b6a7d2c
Include processor information in verilator_gantt data file.
2021-09-05 11:56:28 -04:00
Wilson Snyder
cd56dfee1c
Update GTKwave from upstream.
2021-09-01 20:45:41 -04:00
Wilson Snyder
959793cde3
Internals: Cleanup VL_VALUE_STRING_MAX widths ( #3050 ).
2021-08-23 21:13:33 -04:00
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