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 6/8/2026
Evidence 23 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

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

50 connections
CHERI evaluates → 100% 13e
TestRIG is used to verify CHERI security extensions on RISC-V processors.
QCVEngine ← part of 100% 12e
QCVEngine is TestRIG's QuickCheck-based Verification Engine component.
PyH2P ← compares with 100% 12e
TestRIG matures the approach of PyH2P, addressing its shortcomings.
spike uses → 100% 12e
TestRIG added Direct Instruction Injection to Spike emulator to use it as a reference implementation.
RVFI-DII uses → 100% 12e
TestRIG uses the RVFI-DII interface as its standard interface for cross-verifying implementations.
riscv-dv ← compares with 90% 12e
TestRIG is compared against RISCV-DV as an alternative test generation framework.
Toooba evaluates → 95% 11e
TestRIG has been used to test Toooba, a superscalar out-of-order RISC-V processor.
RVFI uses → 100% 11e
TestRIG uses RVFI to observe execution traces from RISC-V implementations.
RISC-V evaluates → 100% 10e
TestRIG is a framework designed to test RISC-V implementations.
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.
Piccolo evaluates → 95% 8e
TestRIG has been used to test the Piccolo RISC-V processor.
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.
QEMU uses → 100% 7e
TestRIG added Direct Instruction Injection to QEMU to use it as a reference implementation.
Architectural Coverage evaluates → 95% 6e
TestRIG evaluates architectural coverage using sailcov to measure branch coverage of the Sail RISC-V model.
Direct Instruction Injection uses → 100% 6e
TestRIG uses Direct Instruction Injection (DII) as a protocol for injecting instructions into RISC-V processors.
Sail RISC-V Formal Model uses → 100% 6e
TestRIG uses the Sail RISC-V formal model as the golden reference for tandem execution.
instruction-set unit testing ← compares with 100% 6e
TestRIG is explicitly compared to instruction-level unit tests and shown to replace them.
The paper introduces TestRIG as a testing framework for RISC-V implementations.
Direct Instruction Injection uses → 100% 6e
TestRIG uses Direct Instruction Injection to inject instruction sequences into RISC-V implementations.
Sail uses → 100% 5e
The RISC-V golden Sail model implements RVFI-DII and is used within TestRIG for comparison.
Counterexample-Driven Development implements → 100% 5e
TestRIG's model-based testing leads to counterexample-driven development.
Toooba evaluates → 100% 5e
TestRIG is used to test the Toooba processor, including CHERI extensions and lockup bugs.
Instruction-Set Level Unit Testing ← compares with 100% 4e
TestRIG has completely replaced instruction-set level unit testing in the authors' development workflow.
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.
Direct Instruction Injection implements → 100% 4e
TestRIG uses Direct Instruction Injection as its core mechanism for injecting instructions into CPU implementations.
sailcov uses → 95% 4e
TestRIG uses sailcov to measure architectural coverage of the Sail RISC-V model.
Tandem Execution uses → 100% 4e
TestRIG uses tandem execution to compare execution traces between a model and an implementation.
Flute evaluates → 100% 4e
TestRIG is used to validate correctness of the Flute CHERI implementation.
Execution Trace Comparison uses → 100% 4e
TestRIG compares execution traces to detect divergence between model and implementation.
Piccolo evaluates → 100% 4e
TestRIG is used to validate correctness of the Piccolo CHERI implementation.
Direct Instruction Injection implements → 100% 4e
TestRIG uses RVFI-DII interfaces for direct instruction injection testing.
RVBS evaluates → 90% 4e
TestRIG has been used to test RVBS, a reference RISC-V implementation.
RVFI-DII implements → 100% 4e
TestRIG uses RVFI-DII as its standardized communication interface.
Randomized Instruction Generation uses → 100% 4e
TestRIG uses randomized instruction generation to produce test sequences.
QuickCheckVEngine uses → 100% 3e
QuickCheckVEngine is the verification engine used within the TestRIG infrastructure.
Non-shrinkable Sequences uses → 100% 3e
TestRIG supports annotating sequences as non-shrinkable to force initialization state coverage.
Tandem Execution implements → 100% 3e
TestRIG checks equivalence between a model and implementation by executing the same sequences on both and comparing traces.
Sail RISC-V Model uses → 100% 3e
TestRIG uses the Sail RISC-V model as a reference model for tandem verification.
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.
Tandem Verification implements → 100% 3e
TestRIG implements tandem verification by comparing execution traces of model and implementation.
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.
Instruction Sequence Generation uses → 100% 2e
TestRIG generates instruction sequences for testing RISC-V implementations.
Pipeline Verification mentions → 90% 2e
TestRIG mentions pipeline verification as an application area, finding bugs in pipeline implementations.
Test Case Shrinking uses → 100% 2e
TestRIG uses test case shrinking to reduce counterexamples to minimal failing cases.
Test Case Shrinking implements → 100% 2e
TestRIG implements test case shrinking to reduce failing counterexamples to minimal sequences.
riscv-tests ← compares with 90% 2e
TestRIG is compared with riscv-tests in terms of coverage and counterexample complexity.

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