The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Find a file
2018-09-06 19:48:55 +02:00
bootrom Update device tree and fix possible LSU deadlock 2018-08-02 02:02:47 +02:00
ci Update IIS CI paths 2018-09-06 19:48:54 +02:00
docs Update block diagram 2018-05-06 16:43:53 +02:00
failedtests Update riscv-torture test framework 2018-01-23 17:12:27 +01:00
include Rename caches, add define switch to swap cache systems 2018-09-06 18:07:20 +02:00
riscv-torture@4e1c13adc5 Clean-up add github remotes to submodules 2018-01-26 10:15:53 +01:00
src Rename caches, add define switch to swap cache systems 2018-09-06 18:07:20 +02:00
tb Add serpent cache tests to CI script 2018-09-06 18:07:28 +02:00
.editorconfig 📝 Update doc add .travis.yml 2018-02-05 13:22:52 +01:00
.gitignore Change build dir, adapt README 2018-07-24 18:24:45 -07:00
.gitlab-ci.yml Add serpent cache tests to CI script 2018-09-06 18:07:28 +02:00
.gitmodules Update axi_node submodule, add axi submodule. 2018-09-06 13:32:14 +02:00
.travis.yml Add serpent cache tests to CI script 2018-09-06 18:07:28 +02:00
ariane-run-torture 🐛 Resolve bug emerging from merge 2017-12-17 16:57:37 +01:00
ariane.core Add FuseSoC support for building verilator model 2018-02-27 22:34:35 +01:00
Bender.yml Update submodules common_cells and axi_node 2018-09-06 18:07:17 +02:00
CHANGELOG.md 🔥 Remove timer, CSR will trap on access 2018-08-01 01:25:05 +02:00
CONTRIBUTING.md ♻️ Move dcsr_t definition to riscv pkg 2018-08-01 03:29:45 +02:00
LICENSE Add SolderPad Hardware License 2018-01-16 10:07:39 +01:00
LICENSE.SiFive Add SiFive debug rom 2018-07-10 16:01:53 -07:00
Makefile Add missing tests (rv64um) to verilator runs 2018-09-06 19:48:55 +02:00
README.md 📝 Update README.md 2018-08-02 02:02:30 +02:00
src_files.yml switch to common_cells repo, remove redundant files, cleanup + benderize 2018-08-24 16:22:49 +02:00

Build Status

Ariane RISC-V CPU

Ariane is a 6-stage, single issue, in-order CPU which implements the 64-bit RISC-V instruction set. It fully implements I, M and C extensions as specified in Volume I: User-Level ISA V 2.1 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 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.

Getting Started

Go and get the RISC-V tools. Make sure that your RISCV environment variable points to your RISC-V installation.

Checkout the repository and initialize all submodules

$ git clone https://github.com/pulp-platform/ariane.git
$ git submodule update --init --recursive

The testbench relies on riscv-fesvr which can be found here. Follow the README there and make sure that your compiler and linker is aware of the library (e.g.: add it to your path if it is in a non-default directory).

Build the Verilator model of Ariane by using the Makefile:

$ make verilate

This will create a C++ model of the core including a SystemVerilog wrapper and link it against a C++ testbench (in the tb subfolder). The binary can be found in the build and accepts a RISC-V ELF binary as an argument, e.g.:

$ build/Variane_testharness rv64um-v-divuw

The Verilator testbench makes use of the riscv-fesvr. This means that you can use the riscv-tests repository as well as riscv-pk out-of-the-box. As a general rule of thumb the Verilator model will behave like Spike (exception for being orders of magnitudes slower).

Both, the Verilator model as well as the Questa simulation will produce trace logs. The Verilator trace is more basic but you can feed the log to spike-dasm to resolve instructions to mnemonics. Unfortunately value inspection is currently not possible for the Verilator trace file.

$ spike-dasm < trace_core_00_0.dasm > logfile.txt

Running Applications

It is possible to run user-space binaries on Ariane with riscv-pk (link). As Ariane currently does not support atomics and floating point extensions make sure that you configure riscv-pk with: --with-arch=rv64imc. In particular inside the riscv-pk directory do:

$ mkdir build
$ cd build
$ ../configure --prefix=$RISCV --host=riscv64-unknown-elf --with-arch=rv64imc
$ make
$ make install

Then to run a RISC-V ELF using the Verilator model do:

$ make verilate
$ build/Variane_testharness /path/to/pk path/to/riscv.elf

If you want to use QuestaSim to run it you can use the following command:

$ make simc riscv-test=/path/to/pk target-options=path/to/riscv.elf

Be patient! RTL simulation is way slower than Spike. If you think that you ran into problems you can inspect the trace files.

FPGA Emulation

Coming.

Planned Improvements

While developing Ariane it has become evident that, in order to support Linux, the atomic extension is going to be mandatory. While the core is currently booting Linux by emulating Atomics in BBL (in a single core environment this is trivially met by disabling interrupts) this is not the behavior which is intended. For that reason we are going to fully support all atomic extensions in the very near future.

Going Beyond

The core has been developed with a full licensed version of QuestaSim. If you happen to have this simulator available yourself here is how you could run the core with it.

To specify the test to run use (e.g.: you want to run rv64ui-p-sraw inside the tmp/risc-tests/build/isa folder:

$ make sim riscv-test=tmp/risc-tests/build/isa/rv64ui-p-sraw

If you call simc instead of sim it will run without the GUI. QuestaSim uses riscv-fesvr for communication as well.

Randomized Constrained Testing with Torture

Currently not up-to-date.

Contributing

Check out the contribution guide