Skip to content

SimRV: Dual-Width Explainable RISC-V System Simulator

A practical RISC-V simulator for running programs, inspecting architecture, and teaching computer systems.

C/C++ CI Docs CI License


Key Highlights

SimRV provides compile-time fixed 32-bit and 64-bit simulator targets (RV32GCBV and RV64GCBV). It supports Base Integer (I/E), Multiply/Divide (M), Atomics (A), Single/Double Floating Point (F/D), Compressed (C), Bit Manipulation (B), and Vector 1.0 (V) extensions with Sv32/Sv39 virtual memory translation.

Features a cycle-accurate in-order pipeline execution kernel modeling instruction latency, data hazard stalls, forwarding paths, branch prediction (Bimodal, 2-level adaptive, RAS, and BTB), and multi-way L1 instruction and data cache hierarchies.

A rich terminal user interface (TUI) providing live split-screen inspection of integer, floating-point, and vector register banks, pipeline slots, cache set tags, hazard indicators, instruction decoding explainers, memory viewers, and guest terminal PTY interaction.

Boots un-modified RISC-V Linux kernels with OpenSBI/BBL, featuring a 16550A UART serial console, VirtIO block storage, CLINT timer interrupts, and PLIC interrupt controller routing.


Quickstart

Choose the shortest path for your goal:

1. Build from Source

SimRV supports x86-64 Linux hosts. On Windows, use WSL2 with a supported Linux distribution; native Windows builds are not currently supported.

SimRV requires a modern C++23 compiler (Clang 20+ or GCC 14+), CMake 3.25+, and Ninja.

git clone https://github.com/archlab-sciencetokyo/SimRV.git
cd SimRV

# Configure and build RV64 release target
cmake --preset rv64-release
cmake --build --preset rv64-release -j$(nproc)
git clone https://github.com/archlab-sciencetokyo/SimRV.git
cd SimRV

# Configure and build RV32 release target
cmake --preset rv32-release
cmake --build --preset rv32-release -j$(nproc)

2. Run Your First Workload

# Launch interactive terminal workbench with a baremetal binary
make -C examples/hello XLEN=64
./build/rv64-release/SimRV -b -m examples/hello/build-rv64/hello.bin
# Fast functional execution without TUI
./build/rv64-release/SimRV -b -m examples/hello/build-rv64/hello.bin --cli
# Run in cycle-accurate mode with step limit
./build/rv64-release/SimRV -b -m examples/hello/build-rv64/hello.bin --ca --cli -s 1000000
# Boot Linux kernel with root filesystem and devicetree
./scripts/build-linux-image.sh --arch rv64
source linux-images/rv64/setup.sh
./build/rv64-release/SimRV --os \
  -m linux-images/rv64/fw_payload.bin \
  -D linux-images/rv64/root.bin \
  -f linux-images/rv64/devicetree.dtb

Documentation


Citation

If you use SimRV in your academic research, please cite:

@software{simrv,
  title = {{SimRV: A Dual-Width Explainable RISC-V System Simulator}},
  author = {{SimRV Contributors}},
  url = {https://github.com/archlab-sciencetokyo/SimRV},
  version = {2.0.4},
  year = {2026}
}