spike
RISC-V reference ISA simulator
TLDR
Run simulator
SYNOPSIS
spike [--isa spec] [-d] [-p n] [options] program
DESCRIPTION
spike is the official RISC-V ISA (Instruction Set Architecture) reference simulator. It provides instruction-accurate emulation of RISC-V processors, supporting both RV32 and RV64 base integer instruction sets along with standard extensions including M (multiply/divide), A (atomic), F/D (floating-point), and C (compressed).
The simulator includes an interactive debug mode for stepping through instructions, setting breakpoints, and inspecting registers and memory. It supports multi-core SMP simulation with configurable processor counts and memory layouts, making it suitable for testing both bare-metal firmware and operating system kernels.
As the reference implementation maintained by the RISC-V project, spike serves as the golden model for verifying hardware implementations and compiler output against the specification.
PARAMETERS
--isa SPEC
ISA specification.-d
Debug mode.-p N
Number of processors.-m RANGE
Memory configuration.--pc ADDR
Start address.-l
Log instructions.
CAVEATS
Instruction-level only. No cycle accuracy. Development tool.
HISTORY
spike is the official RISC-V ISA simulator, developed as the reference implementation for the RISC-V architecture.
SEE ALSO
qemu(1), riscv64-unknown-elf-gcc(1)
