CVA6 is a 6-stage, single-issue, in-order CPU which implements the 64-bit RISC-V instruction set. It fully implements I, M, A and C extensions as specified in Volume I: User-Level ISA V 2.3 as well as the draft privilege extension 1.10. It implements three privilege levels M, S, U to fully support a Unix-like operating system. Furthermore, it is compliant to the draft external debug spec 0.13.
It has a configurable size, separate TLBs, a hardware PTW and branch-prediction (branch target buffer and branch history table). The primary design goal was on reducing critical path length.
CVA6 is not one CPU but a family: from a 32-bit microcontroller to a
superscalar 64-bit core running Linux, every point built from the same RTL
by its configuration package. The CI builds and verifies 35 of them, each in
config/target/<target_name>/; see config/README.md.
Each of these configurations is maintained by an OpenHW member. CoreMark/MHz measured in simulation, with an ideal memory:
| Target | Maintainer | CoreMark/MHz |
|---|---|---|
cv32a60x |
Thales | 3.25 |
cv32a65x |
Thales | 4.69 |
fpga_linux_cv32a6 |
PlanV | 3.03 |
fpga_linux_cv64a6 |
PlanV | 2.73 |
cv64a6_openpiton |
OpenPiton | - |
32-bit embedded core maintained by Thales: RV32IMC + B + Zcb, scalar, OBI
bus, no PMP. Its configuration of the cv32a60x-v6.0.0 tag reached TRL5,
verified within the TRISTAN project.
32-bit embedded core maintained by Thales: the ISA of cv32a60x on a
superscalar pipeline, OBI bus, 8 PMP entries. Its configuration of the
cv32a60x-v6.0.0 tag reached TRL5, verified within the TRISTAN project.
Reference 32-bit configuration maintained by PlanV to boot Linux on the Genesys 2 FPGA board: RV32IMAC, Sv32 MMU, S and U modes, PMP.
Reference 64-bit configuration maintained by PlanV to boot Linux on the Genesys 2 FPGA board: RV64GC + B, Sv39 MMU, S and U modes, PMP.
64-bit core maintained by OpenPiton for its tile: RV64GC, Sv39 MMU, S and U modes, PMP, write-through HPDcache on the OpenPiton L1.5 cache. Only the OpenPiton flow simulates it, so it has no CoreMark figure here and the CI does not run it.
CoreMark/MHz measured in simulation, with an ideal memory:
| Target | Core | CoreMark/MHz | Limitations |
|---|---|---|---|
profile_rvi20u32 |
RV32IM, smallest core | 2.79 | |
profile_tinyc32 |
RV32IMC + Zcb/Zcmp/Zcmt, smallest with code compression | 2.79 | |
profile_rvm23u32 |
RVM23 microcontroller profile | 3.24 | profile still a draft |
profile_perf32_axi |
RV32IMAFC, superscalar, AXI HPDcache | 5.08 | |
profile_perf32_obi |
Same core on OBI, no cache | 5.25 | figure set by a zero-wait memory |
profile_rvi20u64 |
RV64IM, smallest RV64 core | 2.22 | |
profile_rva20s64 |
RVA20 application profile, Sv39, Linux | 2.41 | |
profile_rva22s64 |
RVA22 application profile | 2.91 | lacks Zicboz, Zfhmin, Svpbmt, Svinval |
profile_rva23s64 |
RVA23 application profile, hypervisor | 2.96 | lacks V and 12 other extensions |
profile_perf64_axi |
RV64GC + B, superscalar, Sv39, Linux | 4.26 |
21 summit_ targets cross the structural options (XLEN, superscalar, MMU,
hypervisor, caches, FPU, endianness, triggers...) so each one keeps working
whatever the others.
cook.py is a Python-based command runner that provides a unified interface for CVA6 workflows including software compilation, RTL simulation with multiple simulators (VCS, Questa, Verilator, Xcelium), synthesis, FPGA and analysis.
Quick Start Example:
# Clone the repository
git clone https://github.com/openhwgroup/cva6.git
cd cva6
# Python 3.12 or later, in a virtual environment. uv downloads the
# interpreter, whatever the Python of the system (pip3 install --user uv):
uv venv -p 3.12 .venv && . .venv/bin/activate
uv pip install -r flows/requirements.txt
# Initialize submodules
git submodule update --init --recursive
# Patch the submodules and clone the external test suites (riscv-tests, ...).
# Required: cook.py stops while a submodule patch of
# flows/config/dependencies.yml is not applied. Run it again after a pull.
./cook.py git-dependencies
# Install Spike ISA simulator (requires: gcc, g++, device-tree-compiler, libboost-dev)
# See verif/regress/install-spike.sh for details
source verif/regress/install-spike.sh
# Install Verilator for the TestHarness recipes (requires: autoconf, flex, bison, help2man)
source verif/regress/install-verilator.sh
# Configure your environment (adapt to your setup)
# Edit flows/config/setenv.sh - Set paths to your CAD tools (VCS, Xcelium, Questa, etc.)
# Edit flows/config/compiler.yml - Set your RISC-V toolchain paths (GCC or LLVM)
# Edit flows/config/techno.yml - Set your ASIC library paths (optional, for synthesis)
source flows/config/setenv.sh
# Optional: Verify your setup
./cook.py self-check
# Optional: Enable shell autocompletion for cook.py commands
./cook.py --install-completion
# Optional: Get help on available commands
./cook.py --help
# Compile a test program
./cook.py hello-world --target cv32a60x --toolchain llvm-22
# Compile RTL and run simulation with VCS
./cook.py vcs-uvm-comp --target cv32a60x
./cook.py vcs-uvm-run --target cv32a60x --testname hello-world
# Or with Questa
./cook.py questa-uvm-comp --target cv32a60x
./cook.py questa-uvm-run --target cv32a60x --testname hello-worldStep by step, with the configuration of $CONFIG_DIR: tutorials/getting_started.md.
For complete documentation, see flows/README.md
Task-oriented guides, sorted by use (index, with a "which tutorial for me" chart):
- Getting started: install the repository, the tools and
cook.py(everybody, first) - Integrating CVA6 in a SoC: RTL, file lists, configuration, AXI or OBI
- Simulation (choose a testbench): UVM testbench (VCS, Questa, Xcelium), TestHarness (Verilator, VCS, Questa, Xcelium), random tests with riscv-dv, gate-level simulation
- Software: bare metal, proxy kernel, Zephyr, Linux
- Synthesis: Yosys, Design Compiler
- FPGA and running an OS
- Checking a change like the CI
- Instruction Tracing
The directory structure separates the CVA6 RISC-V CPU core from the CORE-V APU FPGA Emulation Platform.
Files, directories and submodules under cva6 are for the core only and should not have any dependencies on the APU.
Files, directories and submodules under corev_apu are for the FPGA Emulation platform.
The CVA6 core can be compiled stand-alone, and obviously the APU is dependent on the core.
The top-level directories of this repo:
- common: Source code used by both the CVA6 Core and the COREV APU, under
local. - config: Configurations of the core: one directory per target in
config/target, see config/README.md. - core: Source code for the CVA6 Core only. There should be no sources in this directory used to build anything other than the CVA6 core.
- corev_apu: Source code for the CVA6 APU, exclusive of the CVA6 core. There should be no sources in this directory used to build the CVA6 core.
- docs: Documentation.
- flows:
cook.pyrecipes, CI pipeline and dashboard, see flows/README.md. - pd: Example and CI scripts to synthesis CVA6.
- perf-model: Performance model of the core.
- tutorials: Task-oriented tutorials by use, see tutorials/README.md.
- util: General utility scriptware.
- vendor: Third-party IP maintained outside the repository.
- verif: Verification environment for the CVA6. The verification files shared with other cores are in the core-v-verif repository on GitHub. core-v-verif is defined as a cva6 submodule.
Not versioned, created by cook.py: build (outputs of the recipes, one
directory per target), artifacts (pipeline report and dashboard) and
tools (Spike, riscv-pk, Zephyr). The external test suites are cloned in
verif/tests by cook.py git-dependencies.
- bsp: board support package for test-programs compiled/assembled/linked for the CVA6.
This BSP is used by both
coretestbench anduvmt_cva6UVM verification environment. - core-v-verif: submodule of the verification components shared with other cores.
- docs: verification plans and specifications.
- env: UVM environment (
uvme) and riscv-dv extensions (corev-dv). - patches: patches applied to the submodules by
cook.py git-dependencies. - regress: Spike and Verilator installation scripts, patches of the external test suites.
- sim: riscv-dv submodule, verification plan, coverage exclusion list and trace conversion scripts.
The generated tests of a target are listed in
config/target/<target>/verif/generated_test.yaml. - tb: testbench module instancing the core
- tests: test lists (
*.yaml, read bycook.py) and the sources of the custom and UVM tests
Go to the CVA6 Kanban Board which also loosely tracks planned improvements.
We highly appreciate community contributions.
To ease the work of reviewing contributions, please review CONTRIBUTING.
If you find any problems or issues with CVA6 or the documentation, please check out the issue tracker and create a new issue if your problem is not yet tracked.
If you use CVA6 in your academic work you can cite us:
CVA6 Publication
``` @article{zaruba2019cost, author={F. {Zaruba} and L. {Benini}}, journal={IEEE Transactions on Very Large Scale Integration (VLSI) Systems}, title={The Cost of Application-Class Processing: Energy and Performance Analysis of a Linux-Ready 1.7-GHz 64-Bit RISC-V Core in 22-nm FDSOI Technology}, year={2019}, volume={27}, number={11}, pages={2629-2640}, doi={10.1109/TVLSI.2019.2926114}, ISSN={1557-9999}, month={Nov}, } ```
The CVA6 core is part of a vivid ecosystem. In this document, we gather pointers to this ecosystem (building blocks, designs, partners...)
Check out the acknowledgements.
