Commit Graph

356 Commits

Author SHA1 Message Date
Kamil Rakoczy
4d453c6822
Fix to use same std flag in Verilator and Verilated design (#3881) 2023-01-17 07:11:12 -05:00
Wilson Snyder
7e4760a7e4 Commentary (#3847) 2023-01-10 07:13:08 -05:00
Larry Doolittle
2d6d1235d6
Commentary: Spelling (and grammar) fixes (#3846) 2023-01-08 18:17:24 -05:00
Sören Tempel
78fe77db0f Fix compatibility with musl libc / Alpine Linux (#3845) 2023-01-05 15:50:25 -05:00
Wilson Snyder
b24d7c83d3 Copyright year update 2023-01-01 10:18:39 -05:00
Wilson Snyder
bae60ab8ea devel release 2022-12-14 22:08:39 -05:00
Wilson Snyder
4cefccf5d2 Version bump 2022-12-14 21:59:58 -05:00
Wilson Snyder
0b0b642241 devel release 2022-10-29 17:54:12 -04:00
Wilson Snyder
52d29d238c Version bump 2022-10-29 17:45:54 -04:00
Krzysztof Bieganski
39af5d020e
Timing support (#3363)
Adds timing support to Verilator. It makes it possible to use delays,
event controls within processes (not just at the start), wait
statements, and forks.

Building a design with those constructs requires a compiler that
supports C++20 coroutines (GCC 10, Clang 5).

The basic idea is to have processes and tasks with delays/event controls
implemented as C++20 coroutines. This allows us to suspend and resume
them at any time.

There are five main runtime classes responsible for managing suspended
coroutines:
* `VlCoroutineHandle`, a wrapper over C++20's `std::coroutine_handle`
  with move semantics and automatic cleanup.
* `VlDelayScheduler`, for coroutines suspended by delays. It resumes
  them at a proper simulation time.
* `VlTriggerScheduler`, for coroutines suspended by event controls. It
  resumes them if its corresponding trigger was set.
* `VlForkSync`, used for syncing `fork..join` and `fork..join_any`
  blocks.
* `VlCoroutine`, the return type of all verilated coroutines. It allows
  for suspending a stack of coroutines (normally, C++ coroutines are
  stackless).

There is a new visitor in `V3Timing.cpp` which:
  * scales delays according to the timescale,
  * simplifies intra-assignment timing controls and net delays into
    regular timing controls and assignments,
  * simplifies wait statements into loops with event controls,
  * marks processes and tasks with timing controls in them as
    suspendable,
  * creates delay, trigger scheduler, and fork sync variables,
  * transforms timing controls and fork joins into C++ awaits

There are new functions in `V3SchedTiming.cpp` (used by `V3Sched.cpp`)
that integrate static scheduling with timing. This involves providing
external domains for variables, so that the necessary combinational
logic gets triggered after coroutine resumption, as well as statements
that need to be injected into the design eval function to perform this
resumption at the correct time.

There is also a function that transforms forked processes into separate
functions.

See the comments in `verilated_timing.h`, `verilated_timing.cpp`,
`V3Timing.cpp`, and `V3SchedTiming.cpp`, as well as the internals
documentation for more details.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-08-22 13:26:32 +01:00
Wilson Snyder
b25b798dbe Merge branch 'master' into develop-v5 2022-07-04 13:20:03 -04:00
Felix Yan
31a83cb0d8
Fix use of C++17 on Arch Linux (#3479) 2022-06-29 11:24:30 -04:00
Wilson Snyder
e7ca4a69e3 Merge branch 'master' into develop-v5 2022-06-19 15:22:09 -04:00
Wilson Snyder
f2fba51fe2 devel release 2022-06-19 15:13:29 -04:00
Wilson Snyder
41b9b30b9b Version bump 2022-06-19 15:01:17 -04:00
Wilson Snyder
0f324c8309 Merge branch 'master' into develop-v5 2022-06-04 11:59:49 -04:00
Geza Lore
694919b9d1 CI: add ubuntu-22.04 regressions 2022-05-30 18:34:41 +01:00
Geza Lore
606b35853b Configure and compile with C++17 on Ubuntu 22.04
The packaged libsystemc on Ubuntu 22.04 uses C++17, so default to that
on that platform. Keep C++14 elsewhere.
2022-05-30 18:34:41 +01:00
Wilson Snyder
30783e6a79 devel release 2022-05-02 22:23:05 -04:00
Wilson Snyder
aa86c777f4 Version bump 2022-05-02 22:17:20 -04:00
Geza Lore
2ad0bcbba9 Merge branch 'master' into develop-v5 2022-05-01 16:49:42 +01:00
Wilson Snyder
99d39cb6ff Fix autoconf warning 2022-05-01 10:43:04 -04:00
Wilson Snyder
f4baa86b71 Devel version 5 2022-04-13 07:15:11 -04:00
Wilson Snyder
e744c21f56 devel release 2022-03-12 13:17:48 -05:00
Wilson Snyder
89a0632ecc Version bump 2022-03-12 13:09:08 -05:00
Wilson Snyder
b5ce7d5982 Add VERILATOR_VERSION_INTEGER for determining API (#3343). 2022-03-12 11:17:39 -05:00
Wilson Snyder
0e154b35ef devel release 2022-01-17 15:54:31 -05:00
Wilson Snyder
e6554e061c Version bump 2022-01-17 15:52:26 -05:00
Wilson Snyder
ffc31e2efa devel release (overdue) 2022-01-01 08:25:44 -05:00
Wilson Snyder
c1652979d5 Avoid += in configure (#3132) 2021-12-11 18:58:26 -05:00
Wilson Snyder
935032366f Version bump 2021-12-05 11:10:19 -05:00
Wilson Snyder
00059987a1 devel release 2021-10-17 14:47:19 -04:00
Wilson Snyder
8f090176a6 Version bump 2021-10-17 14:36:23 -04:00
Wilson Snyder
9184c4f501 Fix cygwin compile error due to missing -std=gnu++14 (#3149) 2021-09-26 16:19:46 -04:00
Wilson Snyder
44809f1843 Remove unused CFG_CXXFLAGS_STD_OLDEST 2021-09-26 16:01:25 -04:00
Wilson Snyder
da833d55fe devel release 2021-09-01 21:08:17 -04:00
Wilson Snyder
960813cb0f Version bump 2021-09-01 20:58:03 -04:00
Geza Lore
bc3e24c8cd Use c++XX instead of gnu++XX language standards.
The GNU extensions to C/C++ are not required to build Verilator. Note
this change does not affect __attribute__, __builtin_* and intrinsics,
which are still available when using GCC or Clang with the standard
language options.
2021-08-04 11:48:32 +01:00
Wilson Snyder
3ed2af638b devel release 2021-07-07 20:50:11 -04:00
Wilson Snyder
8e2ba6a003 Version bump 2021-07-07 20:43:07 -04:00
Wilson Snyder
36599133bf Add --prof-c to pass profiling to compiler (#3059). 2021-07-07 19:12:52 -04:00
Felix Yan
2cdf0aae72
Commentary: Correct a typo in configure.ac (#3045) 2021-06-28 23:18:14 -04:00
Wilson Snyder
8d737271ca Allow configure override of AR program (#2999). 2021-06-19 10:00:31 -04:00
Geza Lore
65bfb4e5ff Build Verilator without -Og in the coverage build
The coverage numbers decreased when adding -Og to the debug build. This
patch restores them by adding --enable-coverage to configure and
building without -Og if requested.
2021-06-14 19:55:03 +01:00
Geza Lore
24b5215cf9 Add --enable-m32 to configure 2021-06-14 00:37:59 +01:00
Geza Lore
e6e7bd8d83 Compile the debug build with -Og -ggdb -gz if supported.
Check the C++ compiler for -Og via configure and use it if available.

Per the GCC manual:
-Og should be the optimization level of choice for the standard
edit-compile-debug cycle, offering a reasonable level of optimization
while maintaining fast compilation and a good debugging experience. It
is a better choice than -O0 for producing debuggable code because some
compiler passes that collect debug information are disabled at -O0.

The debug exe is painfully slow on large designs, hopefully this is an
improvement.

Similarly, check for and use -gz to compress the debug info as it is
huge otherwise. This should help with distribution and caching on CI.

Also checks for -ggdb via configure for compatibility.
2021-06-12 23:25:58 +01:00
Wilson Snyder
f0f68f42d1 devel release 2021-06-12 13:05:33 -04:00
Wilson Snyder
e3341e9a7c Verison bump 2021-06-12 12:36:03 -04:00
Wilson Snyder
3718fe1ca1 Commentary (trigger rebuild) 2021-05-13 18:34:20 -04:00
Ameya Vikram Singh
a4ab3e12f6
Update latest C++ Standard Compilation flag (#2951)
For SystemC Project sets the CXX_STANDARD flag from SystemC CMake build config.
2021-05-13 14:26:53 -04:00
Wilson Snyder
490f9f757d devel release 2021-05-03 19:37:04 -04:00
Wilson Snyder
15f7741eaf Version bump 2021-04-24 10:34:05 -04:00
Wilson Snyder
2e9e4ae110 Add an URL on warnings to point to the manual's description. 2021-04-18 10:17:05 -04:00
Wilson Snyder
961a2fef61 Some minor preliminary docs reorg 2021-04-04 22:05:44 -04:00
Wilson Snyder
1b985da2a1 devel release 2021-03-12 15:52:35 -05:00
Wilson Snyder
1b18a85e76 Version bump 2021-03-12 15:48:31 -05:00
Wilson Snyder
a9d61a8bff Increase devel version as next release will be 4.200 2021-03-07 11:40:10 -05:00
Wilson Snyder
dfd54a6abf devel release 2021-02-25 21:52:04 -05:00
Wilson Snyder
17b75c6428 Version bump 2021-02-25 21:43:33 -05:00
Wilson Snyder
945496d6d9 devel release 2021-01-10 13:36:46 -05:00
Wilson Snyder
484b76e5b3 Version bump 2021-01-10 13:34:59 -05:00
Wilson Snyder
bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder
922eab5f93 Internals: Convert config_rev, cppcheck_filtered, flexfix to python3 2020-12-23 15:41:14 -05:00
Wilson Snyder
38c6085f54 devel release 2020-12-02 20:19:04 -05:00
Wilson Snyder
b350b6a0ff Version bump 2020-12-02 20:09:23 -05:00
Wilson Snyder
297b297bc7 devel release 2020-11-14 10:00:01 -05:00
Wilson Snyder
02cb3d17a2 Version bump 2020-11-14 09:50:30 -05:00
Wilson Snyder
470859f929 devel release 2020-10-15 08:26:36 -04:00
Wilson Snyder
77553d23fc Version bump 2020-10-15 08:21:57 -04:00
Wilson Snyder
c1d35c8622 devel release 2020-09-07 09:42:13 -04:00
Wilson Snyder
16fba59480 Version bump 2020-09-07 09:26:03 -04:00
Wilson Snyder
0397e19726 Tests: CMAKE flags fix, #2514. 2020-08-27 18:48:10 -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
f3b28c5c74 Remove configure --enable-prec11-final 2020-08-15 09:39:59 -04:00
Wilson Snyder
7a33fe2bf2 devel release 2020-08-15 09:20:50 -04:00
Wilson Snyder
bdecf6c4e1 Version bump 2020-08-15 09:14:36 -04:00
Wilson Snyder
1194dbf19c devel release 2020-07-11 09:18:40 -04:00
Wilson Snyder
0cd4a57ad9 Version bump 2020-07-11 09:05:24 -04:00
Wilson Snyder
1bd1e21a69 Change --enable-prec11 to --enable-prec11-final and give stronger warning 2020-07-11 08:56:40 -04:00
Wilson Snyder
f8a67b2fe8 Configure: Show bison/flex version. 2020-07-10 18:37:31 -04:00
Geza Lore
7342cf278a Travis: Add 32-bit build on focal 2020-06-28 20:11:22 +01:00
Geza Lore
0cdc2e038c Workaround for Travis OS X dbg exe corruption 2020-06-25 14:12:24 +01:00
Geza Lore
d4a411db6c Don't use configure default compiler flags 2020-06-24 11:44:25 +01:00
Geza Lore
5a4cc333fb
Travis: Add OS X build (#2440) 2020-06-22 10:13:54 +01:00
Wilson Snyder
aae2bf872c devel release 2020-06-06 07:51:54 -04:00
Wilson Snyder
04c0fc8aa7 Version bump 2020-06-06 07:48:47 -04:00
Wilson Snyder
279f21bb5b Configure now enables SystemC if it is installed as a system headers. 2020-05-28 18:51:46 -04:00
Wilson Snyder
c5da38206e Fix configure over-disabling warnings. 2020-05-27 08:45:11 -04:00
Wilson Snyder
0fcc7f2987 Fix default pkgconfig version to have no spaces (#2308) 2020-05-05 08:46:24 -04:00
Wilson Snyder
d6fbbddac9 devel release 2020-05-03 11:18:53 -04:00
Wilson Snyder
9dc65df982 Version bump 2020-05-03 11:14:37 -04:00
Geza Lore
1381d3dbde
Add -Wno-tautological-bitwise-compare to model build flags (#2285)
This appeases Clang 10.
2020-04-25 16:29:42 +01: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
b2228afd1a devel release 2020-04-04 08:50:56 -04:00
Wilson Snyder
d3797ade95 Version bump 2020-04-04 08:40:47 -04:00
Wilson Snyder
38a31ae168 Cleanup misc clang-tidy warnings. No functional change intended 2020-04-03 22:31:54 -04:00
Sean Cross
1fe5d5db79
Fix mingw build (#2215)
* v3Os: include <windows.h> instead of <winnt.h>

The windows.h header file should be included prior to any other headers,
in order to ensure all definitions are available.  By only including
some headers, such as winnt.h, many "undefined symbol" messages are
generated.

Include "windows.h" to fix the build on msys2 under mingw64.

Signed-off-by: Sean Cross <sean@xobs.io>

* configure: check for bcrypt and psapi on windows

These two libraries must be linked in order to have access to
BCryptGenRandom and GetProcessMemoryInfo respectively.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-29 12:29:40 -04:00
Wilson Snyder
1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Wilson Snyder
9392eac6a7 devel release 2020-03-08 08:40:33 -04:00
Wilson Snyder
95c4b6aaba Version bump 2020-03-08 08:38:53 -04:00