Commit Graph

528 Commits

Author SHA1 Message Date
Wilson Snyder
cba05480ba Fix clang warning. 2020-04-06 20:13:24 -04:00
Wilson Snyder
2abbae8dd0 Internals: Remove strncpy to appease codacity. 2020-04-06 19:26:31 -04:00
Wilson Snyder
50535a1894 Internals: cppcheck 1.90 fixes. No functional change intended. 2020-04-05 18:57:47 -04:00
Wilson Snyder
763f621d4c Deprecate VL_ULL. 2020-04-05 16:45:53 -04:00
Wilson Snyder
efaf375887 Configuring with ccache present now defaults to using it; see OBJCACHE in the manual. 2020-04-05 16:10:33 -04:00
Wilson Snyder
a494ad5ec7 Support $ferror, #1638. 2020-04-05 11:22:05 -04:00
Wilson Snyder
e55338f927 Support $fflush without arguments, #1638. 2020-04-05 10:11:28 -04:00
Wilson Snyder
6eadb8e771 Add simplistic class support with many restrictions, see manual, #377. 2020-04-05 09:30:23 -04:00
Wilson Snyder
9fdb026e95 Add VM_C11 for future need of C++11 2020-04-04 20:48:03 -04:00
Wilson Snyder
5302a9d0e6 Internals: clang-format cleanups. No functional change. 2020-04-04 17:55:37 -04:00
Wilson Snyder
e07e9390f6 Internals: clang-format cleanups. No functional change. 2020-04-04 14:09:21 -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
Wilson Snyder
6f4a8fe695 Fix Travis-CI failures. 2020-04-02 09:22:10 -04:00
Wilson Snyder
4361c4b57a Add vlsint8_t types. 2020-03-31 21:30:18 -04:00
Wilson Snyder
e6beab4037 Fix implicit conversion of floats to wide integers. 2020-03-31 20:42:07 -04:00
Sean Cross
a1a2650f1e
Modernize va args (#2214)
Verilator uses a form of variadic macros that are nonstandard, making it
unable to be compiled under MSVC.  Replace the old synax with the
standard syntax.  This fixes MSVC usage.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-29 10:29:12 -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
08a51e3e09 Fix VCD open with empty filename, #2198. 2020-03-24 17:32:47 -04:00
Wilson Snyder
75ebe7a4be Update gtkwave from upstream. 2020-03-21 21:45:57 -04:00
Wilson Snyder
1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Wilson Snyder
5d9d1cc09f Internals: Favor const_iterator (in a few obvious spots, more needed). No functional change. 2020-03-15 18:34:09 -04:00
Wilson Snyder
6c6d70a5e5 Fix FST when multi-model tracing. 2020-03-07 18:39:58 -05:00
Wilson Snyder
e70cba77e6 Add support for dynamic arrays, #379. 2020-03-07 10:24:27 -05:00
Wilson Snyder
905067d13f Fix $dumpvar multithreaded assert, broke last commit. 2020-03-02 07:43:10 -05:00
Wilson Snyder
30a33a6104 Add support for and , #2126. 2020-03-01 21:39:23 -05:00
Wilson Snyder
0ca0e07354 Internals: Vcd doesn't need code when registering. No functional change intended. 2020-02-29 20:42:52 -05:00
Wilson Snyder
991d81cd0a Recommend -Os. 2020-02-27 07:46:34 -05:00
Wilson Snyder
23eb96579c Fix duplicate __STDC_FORMAT_MACROS definition. 2020-02-24 18:11:41 -05:00
Wilson Snyder
28e19cef90 Fix undeclared VL_SHIFTR_WWQ, #2114. 2020-02-23 19:33:37 -05:00
Tobias Wölfel
18f8cd0529
Allow assert disable (#2168)
* Add +verilator+noassert flag

This allows to disable the assert check per simulation argument.

* Add AssertOn check for assert

Insert the check AssertOn to allow disabling of asserts.
Asserts can be disabled by not using the `--assert` flag or by calling
`AssertOn(false)`, or passing the "+verilator+noassert" runtime flag.
Add tests for this behavior.
Bad tests check that the assert still causes a stop.
Non bad tests check that asserts are properly disabled and cause no stop
of the simulation.

Fixes #2162.

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>

* Correct file location

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>

* Add description for single test execution

Without this description it is not obvious how to run a single test from
the regression test suite.

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>
2020-02-15 18:17:23 -06:00
Wilson Snyder
70358e8587 Fix compiler warning. 2020-02-08 10:58:07 -05:00
Wilson Snyder
f7bad37e88 Fix GCC 4.4.7 errors. 2020-02-08 07:09:41 -05:00
Wilson Snyder
0d6ebf21b3 Suggest svSetScope, #2152. 2020-02-07 17:59:02 -05:00
Wilson Snyder
0aabe6ce00 Internals: Fix cppcheck warning including missing init. 2020-02-03 22:10:29 -05:00
Wilson Snyder
a8ad97eef2 Add VL_CACHE_LINE_BYTES and use 64 as defult. 2020-02-01 20:28:03 -05:00
Wilson Snyder
68fa82fb14 Support $typename, and use to cleanup error messages. 2020-01-26 13:21:25 -05:00
Wilson Snyder
11380bc3b2 Merge from upstream gtkwave includes. 2020-01-23 17:48:27 -05:00
Wilson Snyder
4266d31443 Internals: Add VL_OVERRIDE to includes. No functional change intended. 2020-01-21 18:02:23 -05:00
Yutetsu TAKATSUKASA
fbdf5f2dad Internals: Mark all visit() with VL_OVERRIDE. Closes #2132.
* Add VL_OVERRIDE macro so that compiler can tell my typo when trying to override a function.

* Mark visit() with VL_OVERRIDE. No functional change intended.
2020-01-21 17:35:56 -05:00
Matthew Ballance
d87648c258 Correct FST-support issue with some GCC versions. Closes #2129. 2020-01-20 17:33:40 -05:00
Wilson Snyder
09199f79a6 Internals: Add VL_DO_CLEAR delete protections. No functional change intended. 2020-01-18 10:29:49 -05:00
Wilson Snyder
623c4ec103 Internals: Create VL_DO_DANGLING. No functional change intended. 2020-01-16 20:17:11 -05:00
Tobias Rosenkranz
b41b9417b9 Fix sign compare warning. Closes #2112. 2020-01-15 07:40:22 -05:00
Pieter Kapsenberg
4443ab34fd Support left justified . Closes #2101. 2020-01-15 07:32:45 -05:00
Wilson Snyder
e9a309ea8d Clang warning fix. 2020-01-15 07:27:04 -05:00
Wilson Snyder
918df2e618 Support / with assoc arrarys. Closes #2100. 2020-01-14 07:01:17 -05:00
Wilson Snyder
b71eb76252 For / allow 64-bit addressing. 2020-01-11 14:08:07 -05:00
Wilson Snyder
1d2a7b2f41 Style cleanups. No functional change. 2020-01-11 12:36:30 -05:00
Wilson Snyder
2a50fafef2 Fix %{number}s with strings. #2093. 2020-01-09 19:39:27 -05:00
Wilson Snyder
9978cbfa5c Fix tracing -1 index arrays. Closes #2090. 2020-01-08 07:32:31 -05:00
Wilson Snyder
f23fe8fd84 Update copyright year. 2020-01-06 18:05:53 -05:00
Todd Strader
b70d1c1349 Update gtkwave files 2020-01-02 07:39:24 -05:00
Wilson Snyder
5c361efaea Internals: Minor format cleanups. No functional change. 2019-12-22 18:09:46 -05:00
Yutetsu TAKATSUKASA
8cdc0c4e00 Support string putc, getc, substr, bug1606.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-12-15 08:09:52 -05:00
Wilson Snyder
2408de16a0 Support bounded queues. 2019-12-14 21:39:47 -05:00
Wilson Snyder
7387db506d GTKWave: Merge from upstream. 2019-12-14 09:25:36 -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
521418d832 Update FST trace API for better performance. 2019-12-10 18:55:09 -05:00
Yutetsu TAKATSUKASA
c2037ddbc5 Support string compare, icompare, ato* methods, bug1606.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-12-09 19:17:52 -05:00
Wilson Snyder
ca1b083d5c Fix clang warning. 2019-12-09 18:53:56 -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
Todd Strader
4480938b25 Fix interface reference tracing, bug1595. 2019-12-07 12:28:19 -05:00
Wilson Snyder
35e9489f33 Includes: Allow VCD trace of 64 bit array. 2019-12-05 22:25:30 -05:00
Wilson Snyder
8611ff230d GTKWave: Merge from upstream. No functional change. 2019-12-04 05:31:38 -05:00
Wilson Snyder
fe684e8733 Allow redefining VL_PRINTF, bug1598. 2019-12-03 19:12:18 -05:00
Garrett Smith
96f8bbd023 Support float and shorts, bug1592, bug1619.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-12-03 18:26:22 -05:00
Wilson Snyder
95ffcad12e Fix t_queue crash on Trusty due to lifetime issue. 2019-12-03 07:18:59 -05:00
Wilson Snyder
ebed1a9000 Fix 64-bit signed power with -1. 2019-12-03 06:58:38 -05:00
Wilson Snyder
2240f42bfa Fix 64-bit signed power with -1. 2019-12-03 06:26:17 -05:00
Wilson Snyder
e28175108f Support queues (excluding {} notation and pattern assignments), bug545. 2019-12-01 12:35:49 -05:00
Wilson Snyder
b81295230a Support associative arrays. 2019-12-01 11:52:48 -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
2ff22d9050 Fix earlier +verilated+error+count to do all . 2019-11-17 08:12:39 -05:00
Wilson Snyder
0c0198cf55 Support string.toupper and string.tolower. 2019-11-17 05:05:09 -05:00
Wilson Snyder
d480c2f033 Add +verilator+error+limit to see more assertion errors. 2019-11-16 18:25:47 -05:00
Wilson Snyder
66727670f9 Override gtkwave config in upstreamable way. No functional change. 2019-11-16 03:54:05 -05:00
Wilson Snyder
b9322206d7 Update gtkwave files to latest 2019-11-16 03:44:51 -05:00
Wilson Snyder
21a380def0 Rework variable emit to prep for other data types. 2019-11-12 21:52:25 -05:00
Wilson Snyder
f87107e757 Tests etc: Cleanup some clang-format suggestions. No functional change. 2019-11-09 20:35:12 -05:00
Wilson Snyder
5811ec07e6 Update URLs to https://verilator.org 2019-11-07 22:33:59 -05:00
Wilson Snyder
f1b10e2b4c Improve error messages on DIDNOTSETTLE, bug1556. 2019-11-06 19:47:34 -05:00
Wilson Snyder
2bbb9dccb1 Less verbose ar messages 2019-10-27 11:30:25 -04:00
Wilson Snyder
352adbed74 Codacy/Cppcheck cleanups. 2019-10-24 22:40:15 -04:00
Wilson Snyder
9f977ed419 Codacy/Cppcheck cleanups and badge. 2019-10-24 21:48:45 -04:00
Wilson Snyder
89c3c5f952 Internals: Style cleanup. No functional change. 2019-10-18 20:28:59 -04:00
Wilson Snyder
7311c84937 Slightly faster FST tracing. 2019-10-18 19:48:27 -04:00
Wilson Snyder
58a42834a6 Tests: Remove some old makefile rules. 2019-10-08 19:12:33 -04:00
Wilson Snyder
8c836e1222 Fix clang thread lint error. 2019-10-08 12:07:46 -04:00
Wilson Snyder
ce179bd2e3 Fix clang mutex check. 2019-10-08 08:29:53 -04:00
Patrick Stewart
0ed58a4217 Fix multithreaded yield behavior when no work.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-10-07 19:27:31 -04:00
Patrick Stewart
8e6d68147c Support multithreading on Windows.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-10-07 19:23:06 -04:00
Wilson Snyder
307549e8a6 Internals: Fix some cppcheck warnings. 2019-10-06 08:20:02 -04:00
Maarten De Braekeleer
977a767477 Avoid tabs in C output.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-10-04 21:10:53 -04:00
Wilson Snyder
771a301f66 Commentary: Remove newlines, upsets some patches. No functional change. 2019-10-04 20:17:11 -04: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