Skip to content

Running RISCOF

marwannismail edited this page Oct 11, 2025 · 2 revisions

RISCOF is a testing framework for RISC-V projects that allows us to make sure we stay compliant with the ISA specification. At high level, RISCOF creates a bespoke test suite for our DUT (Design Under Test) based on what parts of the specification we are expected to pass. It builds a bunch of embedded programs that get loaded into the memory of our DUT and executed. As part of these programs, a certain memory region ends up changing since the test programs write the expected results to this specific chunk of memory. Concurrently, RISCOF will also run these programs against a "golden model", which also ends up with a chunk of memory written to by the test programs. These two chunks of memories are extracted from both models and compared. The goal is to have zero differences.

You can read more about RISCOF here

To run RISCOF against your branch, do this:

  1. Add RISCOF to your PATH variables. This is important in order to run the next riscof commands
    export PATH="$HOME/.local/bin:$PATH"
    source ~/.bashrc
  2. Build our Design Under Test module
    make riscof_build_dut
  3. Make sure that our YAML configuration RISCOF is correct
    make riscof_validateyaml
  4. Get the latest test database
    make riscof_clone_archtest
  5. Make RISCOF figure out which tests need to be ran against our implementation
    make riscof_generate_testlist
  6. Actually run RISCOF
    make riscof_run

At the time of wirting you will see a lot of errors, and that's OK. RISCOF will also generate a report in riscof/riscof_work/report.html which you can open in your browser locally to see the errors in detail.

Clone this wiki locally