RISC-V CPU

Write assembly, run Doom, or boot Linux.

This workbench runs a 32-bit RISC-V teaching CPU entirely in your browser. Enable JavaScript to assemble a program, step through fetch, decode, execute, memory, and writeback, and inspect the changing signals.

About this simulation

Controls

Edit assembly directly, step or run it, and inspect register, memory and device changes. Add watchpoints, pin custom waveforms, rewind any retained clock, or share your source with another visitor. Lab devices provide a console, eight LEDs and a 16×16 RGB332 framebuffer.

Architecture

The CPU workbench engines execute RV32I with 32 integer registers and 4 KiB of little-endian RAM. Multicycle executes five phases in sequence; Pipeline overlaps five stages with forwarding, interlocks and precise retirement. Browser execution is behavioral simulation. The downloadable SystemVerilog currently describes the RAM-only multicycle reference; pipeline and device models have separate verification status.

Explore next

Search

Enter opens the first match · Esc closes Ctrl / ⌘ K