TestRIG is an open-source framework/repository for randomized testing of RISC-V CPU implementations using RVFI-DII-style direct instruction injection and verification-engine trace checking. The provided evidence describes its use with QCVEngine, reduced counterexamples, CHERI-on-Ibex development, a Flute debugging case, and future directions such as richer generators and memory-concurrency testing.
First seen5/27/2026
Last seen6/8/2026
Evidence23 chunks
Wikiv1
01
WIKI
Overview
TestRIG is presented in the paper Randomized Testing of RISC-V CPUs using Direct Instruction Injection as a RISC-V testing framework centered on open implementations, RVFI-DII-compatible components, and verification engines. The authors state that current TestRIG-compatible implementations and verification engines have been collated into an open-source TestRIG repository with documentation, and they expect TestRIG to contribute toward a standardized RISC-V testing framework that uses instrumentation of open implementations.
[3]QCVEngine is described as the initial TestRIG verification engine, with Haskell generator infrastructure that supports rich and complex generators.Randomized Testing of RISC-V CPUs using Direct
[5]Future memory-concurrency testing is described as injecting RVFI-DII instruction streams with specified timestamps into multiple shared-memory cores.Randomized Testing of RISC-V CPUs using Direct
[7]A Flute bug was found after 42 tests and 20 rounds of shrinking; the reduced case involved overlapping memory operations, was found in under 10 seconds, and was fixed within an hour.Randomized Testing of RISC-V CPUs using Direct
[8]The Flute bug had escaped the development process, was not found by the RISC-V unit-test suite, and was difficult to debug from a full software trace.Randomized Testing of RISC-V CPUs using Direct
[10]After Ibex was extended with RVFI-DII support, a summer intern added full CHERI functionality to Ibex in a month due to the reduced-counterexample loop provided by QCVEngine.Randomized Testing of RISC-V CPUs using Direct
[11]The evidence discusses a Sail-OCaml VEngine with direct access to Sail RISC-V model data structures to avoid independent encodings and support future template generation.Randomized Testing of RISC-V CPUs using Direct