SimRV: Dual-Width Explainable RISC-V System Simulator
A practical RISC-V simulator for running programs, inspecting architecture, and teaching computer systems.
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:
- Install a release: use the installation guide, including the hello samples.
- Build from source: follow the build steps below.
- Run a program: start with the CLI and TUI guide.
- Study the machine: read the architecture overview.
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.
2. Run Your First Workload
Documentation
-
Quickstart, CLI flags, interactive TUI controls, hotkeys, and execution modes.
-
Core execution units, pipeline modeling, cache hierarchy, MMU, and ISA compliance scope.
-
Bare-metal development, memory map, peripheral MMIO, and booting full-system Linux.
-
Contributing standards and CTest gate suites for simulator development.
Citation
If you use SimRV in your academic research, please cite: