Commit Graph

20 Commits

Author SHA1 Message Date
Wilson Snyder
30d6edd2e5 Cleanup missing copyrights and those on simply copied files. No functional change. 2023-01-20 20:42:30 -05:00
Wilson Snyder
3fe81a3832 Add manpages for missing user commands (using help2man) 2023-01-17 19:26:12 -05:00
Wilson Snyder
b6cdae30f6 docs: Fix grammar. 2022-12-10 20:09:47 -05: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
adce7ecf4b Documentation has been rewritten into a book format. 2021-04-11 18:55:06 -04:00
Wilson Snyder
c99f01b7fe Converted Asciidoc documentation into reStructuredText (RST) format. 2021-03-12 13:52:47 -05:00
Wilson Snyder
d6c5d31dcd docker: Use sed to avoid perl 2020-12-23 19:23:23 -05:00
Wilson Snyder
b8b9170f9d Remove Unix::Processors dependency 2020-12-23 16:07:14 -05:00
Wilson Snyder
80564a8f89 Remove vgen test to avoid Bit::Vector for testing. 2020-12-02 20:06:07 -05:00
Stefan Wallentowitz
723d407a87
[docker] Unify docker files (#2371)
Unify the actions in the Dockerfiles between the runtime environment
and the run containers.

Fixes #2345

Signed-off-by: Stefan Wallentowitz <stefan.wallentowitz@hm.edu>
2020-05-26 20:38:43 +02:00
Stefan Wallentowitz
0abf88823f
Docker upgrade to Ubuntu 20.04 (#2318)
* [docker] Remove versions from Docker files

There is no dependency on an actual version, it was only there to
silence the linter. Instead the linter is now set to not warn about
it.

Signed-off-by: Stefan Wallentowitz <stefan.wallentowitz@hm.edu>

* [docker] Update to Ubuntu 20.04

Update to new Ubuntu release:

 - Only GCC 9.3 available. Also add clang (10.0) now.
 - SystemC is now a package 🎉

Signed-off-by: Stefan Wallentowitz <stefan.wallentowitz@hm.edu>
2020-05-20 06:58:43 -04:00
Wilson Snyder
6ab51de96d Fix dockerfile 2020-04-21 18:37:53 -04:00
Wilson Snyder
7b789fe02a Docker: Add ccache and libgoogle-perftools-dev 2020-04-19 12:59:38 -04:00
Wilson Snyder
4ae3d3af71 Fix docker build error 2020-04-19 12:43:20 -04:00
Wilson Snyder
07d00f26aa Fix docker exit status when Verilator fails, #2153. 2020-03-28 19:15:06 -04:00
Wilson Snyder
8d3d185e3b Fix docker exit status when Verilator fails, #2153. 2020-03-28 17:25:20 -04:00
Wilson Snyder
81a63b0c7d Commentary 2020-03-28 17:18:12 -04:00
Wilson Snyder
1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Stefan Wallentowitz
f28d837930
Docker: Tag stable as latest (#2098) 2020-01-20 15:53:26 +01:00
Stefan Wallentowitz
525c79bd0a
Add Docker infrastructure (#2087)
This adds files to build and run two Docker images:

 - run: Build a Docker container that can be used as an executable
        drop-in for verilator. This can be useful to test behavior of
        older versions or a development version. The functionality is
        pretty simplistic at the moment for a start.

 - buildenv: Everything needed to build and test Verilator. Useful to
        run quick tests in the cloud or try other compilers. It can
        also serve as basis for further CI integration.
2020-01-09 23:22:15 +01:00