The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Find a file
2018-08-01 00:34:23 -07:00
bootrom Include basic device tree for standalone simulation 2018-08-01 00:34:23 -07:00
ci Delete elf2hex conversion - no longer needed 2018-07-25 11:42:48 -07: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 ♻️ Move dcsr_t definition to riscv pkg 2018-08-01 03:29:45 +02:00
riscv-torture@4e1c13adc5 Clean-up add github remotes to submodules 2018-01-26 10:15:53 +01:00
src Merge branch 'riscv-compliant-debug' of github.com:pulp-platform/ariane into riscv-compliant-debug 2018-08-01 03:30:46 +02:00
tb Remove time reference from testbench 2018-08-01 01:41:19 +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 📝 Update doc add .travis.yml 2018-02-05 13:22:52 +01:00
.gitmodules 🎨 Flatten tb submodule 2018-08-01 01:39:01 +02:00
.travis.yml 💚 Fix CI build 2018-07-24 22:42:09 -07: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 🔥 Remove legacy if stage 2018-08-01 02:59:08 +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 Make tracing optional 2018-08-01 02:17:17 +02:00
README.md 🎨 Remove section about unit tests 2018-08-01 01:20:02 +02:00
src_files.yml 🔥 Remove legacy if stage 2018-08-01 02:59:08 +02:00
travis.sh Add travis pre-check script and remove spurious spaces from Makefile 2018-03-21 16:58:53 +00: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 Verilator testbench relies on our forked version of 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. That means that bare riscv-tests can be run on the simulator.

Running custom C-code

It is possible to cross compile and run your own C-code or benchmarks on Ariane. The following steps need to be followed to compile and run:

Compile the file using the following command (you need to have the riscv-tests repo checked-out):

riscv64-unknown-elf-gcc -I./riscv-tests/benchmarks/../env -I./riscv-tests/benchmarks/common \
-DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common \
-fno-builtin-printf ./riscv-tests/benchmarks/common/syscalls.c -static -nostdlib \
./riscv-tests/benchmarks/common/crt.S  -nostartfiles -lm -lgcc \
-T ./riscv-tests/benchmarks/common/test.ld -o hello.riscv hello.c

Use the generated ELF file as an input to the Verilator model:

build/Variane_testharness hello.riscv

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