Commit Graph

69 Commits

Author SHA1 Message Date
Geza Lore 27031ed688 Merge branch 'master' into develop-v5 2022-09-15 10:28:35 +01:00
Wilson Snyder 45d622e4bc Github actions: Avoid cpan cert expirations. 2022-09-08 11:06:44 -04:00
Wilson Snyder 9a27004ae5 Github actions: Avoid cpan cert expirations. 2022-09-07 22:49:09 -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
Geza Lore 694919b9d1 CI: add ubuntu-22.04 regressions 2022-05-30 18:34:41 +01:00
Wilson Snyder 36599133bf Add --prof-c to pass profiling to compiler (#3059). 2021-07-07 19:12:52 -04:00
Geza Lore d4e73e215e Tests: fail test if vcddiff aborts, fix failing tests
Tests used to silently pass when vcddiff aborted. Now fixed. Updated
large array trace reference files for FST, added same reference files
for VCD.

Developers need to update their local vcddiff.
2021-07-01 23:22:25 +01:00
Geza Lore 208f1504fb CI: Add -m32 build 2021-06-14 00:37:59 +01:00
Geza Lore 01a54d6960 CI: Build opt and dbg together, archive whole source tree
Prep for adding more CI targets. Building dbg and opt in the same job
(as standard) simplifies caching, debugging and artifact handling. With
ccache it should not take much longer either. Also removes the need to
re-configure in the test job.
2021-06-13 22:45:57 +01:00
Geza Lore d22df4e907 CI: Add extra dist-vlt shard for better load balancing 2021-06-09 23:51:03 +01:00
Wilson Snyder 2158a4573e Tests: Reenable 18.04 MT (#2963). 2021-06-06 10:27:44 -04:00
Wilson Snyder 706842d093 CI: Disable Ubuntu-18.04 clang (#2963) 2021-05-16 15:11:39 -04:00
Wilson Snyder 82b878ce42 Internal coverage: locally download codecov script for security (#2904) 2021-04-24 09:39:54 -04: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 ac171f16fd Github: Use 10+10 runners for coverage. 2021-03-07 16:41:46 -05:00
Wilson Snyder 6060acc73d CI: Fix coverage action 2021-01-10 19:15:39 -05:00
Wilson Snyder a17e2375b3 CI: Need flexlexer for internal coverage testrun 2021-01-02 21:42:41 -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
Unai Martinez-Corral e37a93bffb CI: (fix) check that CCACHE_DIR is set, before execing mkdir 2020-12-23 19:52:37 +01:00
Unai Martinez-Corral 6e3de7bfd1
CI: exploit concurrency (#2687)
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2020-12-23 18:53:05 +01:00
Yutetsu TAKATSUKASA 788de3ad24
CI: Enable address sanitizer for vlt tests. (#2715) 2020-12-19 11:12:15 -05:00
Wilson Snyder 4db673b2ff ci: Fix Ubuntu-18.04/16.04 runs 2020-12-10 20:22:00 -05:00
Wilson Snyder 2df1b72ce2
CI: Add separate contributors action (#2689) 2020-12-10 18:12:26 -05:00
Unai Martinez-Corral 2998890647
CI: remove unused 'ci-ccache-size.bash' (#2688) 2020-12-10 15:59:31 -05:00
Wilson Snyder b15dd3f898 Commentary 2020-12-10 09:06:01 -05:00
Wilson Snyder 2273fa62d9 CI: coverage action parallelism 2020-12-09 22:12:04 -05:00
Wilson Snyder cca874dc83 CI: coverage action parallelism 2020-12-09 21:35:48 -05:00
Wilson Snyder 90e0c9bdcd CI: internal coverage updates 2020-12-08 08:00:24 -05:00
Yutetsu TAKATSUKASA 7f6d4ac359
Use both gcc and clang in CI (#2667)
* Remove remaining TRAVIS_ variable

* Use both gcc and clang.
2020-12-05 12:36:04 +09:00
Yutetsu TAKATSUKASA 73a7595335
Add the initial version of CI using GitHub Actions (#2665)
* Add the initial version of CI using GitHub Actions

* Update .github/workflows/check_pr.yml

Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>

* remove setting for travis

* rename travis-*.bash to ci-*.bash

* Rename TRAVIS_ variables to CI_

* install ccache and libsystemc(-dev) in ci-install.bash

* Use CI_ variables and Ubuntu-20.04 that provides SystemC

* call ccache maintenance

Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2020-12-05 00:30:46 +09:00
Wilson Snyder 80564a8f89 Remove vgen test to avoid Bit::Vector for testing. 2020-12-02 20:06:07 -05:00
Wilson Snyder dbb69412e5 Travis: Use make -k 2020-08-21 08:31:27 -04:00
Wilson Snyder e029ba845e Travis: Trusty must use default CPAN 2020-08-06 17:50:49 -04:00
Wilson Snyder a07f2b3611 Travis: Force CPAN mirror to avoid false failures. 2020-08-02 08:47:27 -04:00
Geza Lore 7342cf278a Travis: Add 32-bit build on focal 2020-06-28 20:11:22 +01:00
Geza Lore d9be86d69a Remove Travis FreeBSD debug acces workaround (ENV_HACK) 2020-06-28 15:37:24 +01:00
Geza Lore 378d947702 Travis: Add FreeBSD build + portability fixes 2020-06-28 15:37:24 +01:00
Geza Lore 0cdc2e038c Workaround for Travis OS X dbg exe corruption 2020-06-25 14:12:24 +01:00
Geza Lore 5a4cc333fb
Travis: Add OS X build (#2440) 2020-06-22 10:13:54 +01:00
Geza Lore 6ddd92c0a1
Travis: Use workspaces and per job persistent ccache (#2399)
Change the Travis builds to use workspaces and persistent ccache

We proceed in 2 stages (as before, but using workspaces for
persistence):
1. In the 'build' stage, we clone the repo, build it and
   save the whole checkout ($TRAVIS_BUILD_DIR) as a workspace
2. In the 'test' stage, rather than cloning the repo, multiple jobs
   pull down the same workspace we built to run the tests from

This enables:
- Reuse of the build in multiple test jobs (this is what we used the Travis
  cache for before)
- Each job having a separate persistent Travis cache, which now only
  contains the ccache. This means all jobs, including 'build' and 'test'
  jobs can make maximum use of ccache across runs. This drastically cuts
  down build times when the ccache hits, which is very often the case for
  'test' jobs. Also, the separate caches only store the objects build by
  the particular job that owns the cache, so we can keep the per job
  ccache small.

If the commit message contains '[travis ccache clear]', the ccache will
be cleared at the beginning of the build. This can be used to test build
complete within the 50 minute timeout imposed by Travis, even without a
persistent ccache.
2020-06-03 21:10:13 +01: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
Wilson Snyder 613d76c578 Travis: Fix cron. 2020-05-24 08:30:59 -04:00
Wilson Snyder 72ea6bf414 Travis: Fix cron. 2020-05-22 08:39:56 -04:00
Wilson Snyder 8170f6f03f Travis: Fix cron. 2020-05-20 17:39:32 -04: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 b5460bd867 Travis-CI fixes 2020-05-18 18:34:26 -04:00
Wilson Snyder d5fc0fca41 Travis: Fix cron. 2020-05-17 08:19:42 -04:00
Wilson Snyder 7d0b3b300a Travis: Setup cron coverage 2020-05-16 14:59:30 -04:00