Skip to content
STIMSMITH

TestRIG

Tool

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 seen 5/27/2026
Last seen 7/19/2026
Evidence 42 chunks
Wiki v1

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.

Verification approach

READ FULL ARTICLE →

NEIGHBORHOOD

31 nodes · 73 edges
graph · TestRIG · depth=1

RELATIONSHIPS

50 connections
RVFI-DII uses → 100% 15e
TestRIG uses the RVFI-DII interface for cross-verification.
CHERI evaluates → 100% 13e
TestRIG is used to verify CHERI security extensions on RISC-V processors.
RISC-V evaluates → 100% 13e
TestRIG is designed to evaluate and verify RISC-V implementations.
riscv-dv ← compares with 90% 12e
TestRIG is compared against RISCV-DV as an alternative test generation framework.
PyH2P ← compares with 100% 12e
TestRIG matures the approach of PyH2P, addressing its shortcomings.
QCVEngine ← part of 100% 12e
QCVEngine is TestRIG's QuickCheck-based Verification Engine component.
spike uses → 100% 12e
TestRIG added Direct Instruction Injection to Spike emulator to use it as a reference implementation.
RVFI uses → 100% 11e
TestRIG uses RVFI to observe execution traces from RISC-V implementations.
Toooba evaluates → 95% 11e
TestRIG has been used to test Toooba, a superscalar out-of-order RISC-V processor.
Direct Instruction Injection uses → 100% 9e
TestRIG uses the Direct Instruction Injection interface to execute generated instructions on the DUV.
Piccolo evaluates → 95% 8e
TestRIG has been used to test the Piccolo RISC-V processor.
Flute evaluates → 95% 8e
TestRIG has been used to test the Flute RISC-V processor.
model-based verification implements → 100% 8e
TestRIG implements model-based verification by comparing implementations against a formal Sail model.
Ibex evaluates → 95% 8e
TestRIG has been used to test the Ibex RISC-V processor.
Verification Engine (VEngine) uses → 100% 7e
TestRIG uses a modular Verification Engine (VEngine) to stimulate implementations and compare traces.
Sail RISC-V Formal Model uses → 100% 7e
TestRIG compares architectural state against the Sail formal model of the RISC-V ISA.
Toooba evaluates → 100% 7e
TestRIG is used to evaluate the Toooba processor.
QEMU uses → 100% 7e
TestRIG added Direct Instruction Injection to QEMU to use it as a reference implementation.
Direct Instruction Injection uses → 100% 7e
TestRIG uses Direct Instruction Injection, bypassing the PC fetch mechanism.
The paper introduces TestRIG as a testing framework for RISC-V implementations.
Sail uses → 100% 6e
TestRIG uses the Sail model as its golden reference for verification.
instruction-set unit testing ← compares with 100% 6e
TestRIG is explicitly compared to instruction-level unit tests and shown to replace them.
Architectural Coverage evaluates → 95% 6e
TestRIG evaluates architectural coverage using sailcov to measure branch coverage of the Sail RISC-V model.
Counterexample-Driven Development implements → 100% 5e
TestRIG's model-based testing leads to counterexample-driven development.
RISC-V Formal Interface uses → 100% 5e
TestRIG uses the RISC-V Formal Interface to obtain architectural state visibility after each instruction.
Tandem Execution uses → 100% 4e
TestRIG uses tandem execution to compare execution traces between a model and an implementation.
Tandem Verification implements → 100% 4e
TestRIG implements tandem verification for RISC-V implementations.
RVFI-DII implements → 100% 4e
TestRIG uses RVFI-DII as its standardized communication interface.
Verification Engine depends on → 100% 4e
TestRIG depends on a Verification Engine component to generate and compare instruction sequences.
Randomized Instruction Generation uses → 100% 4e
TestRIG uses randomized instruction generation to produce test sequences.
Instruction-Set Level Unit Testing ← compares with 100% 4e
TestRIG has completely replaced instruction-set level unit testing in the authors' development workflow.
sailcov uses → 95% 4e
TestRIG uses sailcov to measure architectural coverage of the Sail RISC-V model.
Direct Instruction Injection implements → 100% 4e
TestRIG uses RVFI-DII interfaces for direct instruction injection testing.
Randomized Instruction Generation uses → 100% 4e
TestRIG uses randomized instruction generation to produce test sequences.
Flute evaluates → 100% 4e
TestRIG is used to validate correctness of the Flute CHERI implementation.
Piccolo evaluates → 100% 4e
TestRIG is used to validate correctness of the Piccolo CHERI implementation.
Direct Instruction Injection implements → 100% 4e
TestRIG uses Direct Instruction Injection as its core mechanism for injecting instructions into CPU implementations.
RVBS evaluates → 90% 4e
TestRIG has been used to test RVBS, a reference RISC-V implementation.
Execution Trace Comparison uses → 100% 4e
TestRIG compares execution traces to detect divergence between model and implementation.
Tandem Execution implements → 100% 3e
TestRIG checks equivalence between a model and implementation by executing the same sequences on both and comparing traces.
Tandem Execution implements → 100% 3e
TestRIG implements tandem execution by running the same instruction sequences on both a model and an implementation and comparing traces.
Non-shrinkable Sequences uses → 100% 3e
TestRIG supports annotating sequences as non-shrinkable to force initialization state coverage.
Ibex evaluates → 95% 3e
TestRIG evaluates Ibex as a RISC-V implementation.
Sail RISC-V Model uses → 100% 3e
TestRIG uses the Sail RISC-V model as a reference model for tandem verification.
The paper leverages TestRIG as the basis for security-aware benchmark generation.
QuickCheckVEngine uses → 100% 3e
QuickCheckVEngine is the verification engine used within the TestRIG infrastructure.
Pipeline Verification evaluates → 90% 2e
TestRIG is effective at detecting pipeline bugs in RISC-V processors.
counterexample shrinking uses → 100% 2e
TestRIG uses counterexample shrinking to reduce failing test sequences to minimal examples.
Model-based Random Testing uses → 100% 2e
TestRIG is a model-based random testing tool that checks equivalence between a formal model and an implementation.
Pipeline Verification mentions → 90% 2e
TestRIG mentions pipeline verification as an application area, finding bugs in pipeline implementations.

LINKED ENTITIES

32 links
Randomized Testing of RISC-V CPUs using Direct Instruction Injection INTRODUCES Extracted graph relationship
Direct Instruction Injection IMPLEMENTS Extracted graph relationship
Tandem Execution IMPLEMENTS Extracted graph relationship
Randomized Instruction Generation IMPLEMENTS Extracted graph relationship
RVFI-DII USES Extracted graph relationship
RVFI USES Extracted graph relationship
Execution Trace Comparison USES Extracted graph relationship
CHERI Security Extension EVALUATES Extracted graph relationship
RISC-V EVALUATES Extracted graph relationship
Test Case Shrinking USES Extracted graph relationship
Verification Engine (VEngine) USES Extracted graph relationship
Model-based Random Testing USES Extracted graph relationship
Tandem Verification USES Extracted graph relationship
Regression Testing USES Extracted graph relationship
Architectural Coverage USES Extracted graph relationship
RVBS EVALUATES Extracted graph relationship
Ibex EVALUATES Extracted graph relationship
Piccolo EVALUATES Extracted graph relationship
Flute EVALUATES Extracted graph relationship
Toooba EVALUATES Extracted graph relationship
Sail RISC-V Model USES Extracted graph relationship
spike USES Extracted graph relationship
QEMU USES Extracted graph relationship
Instruction Sequence Generation USES Extracted graph relationship
Counterexample-Driven Development IMPLEMENTS Extracted graph relationship
QCVEngine PART_OF Extracted graph relationship
PyH2P COMPARES_WITH Extracted graph relationship
Memory Concurrency Testing USES Extracted graph relationship
Pipeline Performance Testing USES Extracted graph relationship
Assertions in Instruction Sequences USES Extracted graph relationship
Non-shrinkable Sequences USES Extracted graph relationship
Sequence Import/Export IMPLEMENTS Extracted graph relationship

CITATIONS

11 sources
11 citations — click to expand
[1] TestRIG-compatible implementations and verification engines were collated into an open-source TestRIG repository with documentation. Randomized Testing of RISC-V CPUs using Direct
[2] The authors expect TestRIG to contribute toward a standardized RISC-V testing framework using instrumentation of open implementations. Randomized Testing of RISC-V CPUs using Direct
[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
[4] The evidence identifies future improvements to QCVEngine generators for virtual memory, cache testing, and floating-point operations. 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
[6] A more advanced verification engine would test RVFI traces for equivalence and against higher-level memory-model semantics. 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
[9] TestRIG's model-based testing is described as leading to counterexample-driven development. 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