This repository hosts unit tests generator for the RISC-V vector extension.
make help
Overall, there are no coverage statistics or guarantees.
The Spike simulator is known as the RISC-V gold standard simulator, and although we don't know how Spike is tested, it does fully support the V extension. So we added a custom special instruction to Spike, and for any test, let it automatically generate a reference result for that test. This way, we generate tests for all instructions almost automatically. Under this framework, all we have to do is write a simple config file for each instruction.
riscv64-unknown-elf-gcc
with RVV 1.0 supportriscv-pk
if you need to generate user-mode binariesFor starters, you can directly download the pre-generated tests from Github Action Artifacts.
make all -j$(nproc)
If you have problems compiling, please refer to the build steps in build-and-test.yml.
After make all
, you will find all the generated tests in out/v[vlen]x[xlen][mode]/bin/stage2/
.
For more advanced options, run make help
.
Note: single/single.go generates tests directly from stage 1, suitable for targets with co-simulators (or simply use
TEST_MODE=cosim
if you're lazy).
This repository also provides a nix derivation with the following output provided:
${riscv-vector-test}/bin/*
: Generator binaries${riscv-vector-test}/include/*
: Necessary headers for runtime usage${riscv-vector-test}/configs/*
: Necessary runtime configsThis project uses third-party projects, and the licenses of these projects are attached to the corresponding directories.
The code for this project is distributed under the Apache License Version 2.0.
The “RISC-V” trade name is a registered trademark of RISC-V International.