Nano Banana 2.1 is LIVE — Google's Latest | Try Now →
WAVESPEED AI RISC-V SIMULATOR Your code stays on your device
100% FREE

Free RISC-V SimulatorWrite assembly, run it, watch every register.

Type RV32IM assembly with labels and pseudo-instructions, then run it at full speed or one instruction at a time.
Set breakpoints, step back, and watch registers, memory, the machine code and the console as the program runs.

RV32I + MStep back & breakpointsMachine code in hex
No sign-up Runs in your browser Nothing to install

Loading the RISC-V simulator…

Your program is saved in this browser. Download it to keep a copy.
THREE SIMPLE STEPS

How to run RISC-V assembly online

01

Write or open a program

Start from an example, type your own assembly or open a .s file. Put data under .data and code under .text.

02

Run or step

Press Run to go at full speed, or Step to run one instruction and see which registers and memory changed. Click beside a line number to set a breakpoint.

03

Read the results

Output and input happen in the console. Check registers and memory, step back to find where things went wrong, and copy the machine code as hex.

Tips for debugging assembly

Step back instead of restarting

Went one step too far? Step back undoes the last instructions, registers, memory and output included, so you can look again without running from the start.

Save ra before you call

call overwrites ra. A function that calls another must save ra on the stack first and restore it before ret, as in the factorial example.

Watch the Runs column

The machine code tab counts how often each instruction ran. A loop body that ran once too often or never ran points straight at a wrong branch.

WaveSpeed AI

From code to visuals

Need an illustration of your processor design or a clip for your course? Create it with WaveSpeed AI.

  • 1,000+ AI models
  • Image, video and 3D
  • Pay as you go

$1 in free credits for eligible new accounts. No card needed. Generators have separate account and credit requirements. The RISC-V simulator is free.

RISC-V simulator FAQ

Is this RISC-V simulator free?

Yes. This online RISC-V simulator is free, with no account, no limits on runs and nothing to install.

Which instructions does it support?

The 32-bit base integer set (RV32I), the M extension for multiply, divide and remainder, and reads of the cycle, time and instret counters — the core instruction set taught in computer architecture and assembly courses.

Will programs from my course run here?

Most will. Code starts at 0x00400000 and data at 0x10010000, and the system calls use the same numbers (a7 = 1 print integer, 4 print string, 5 read integer, 10 exit and so on) as the common teaching simulators. The Reference tab lists them all.

How do I print and read input?

Put the call number in a7 and the argument in a0, then run ecall. When the program reads, the console asks for input: type it and press Enter. You can also type ahead before the program asks.

How are cycles counted?

The instruction count is exact. The cycle count is an estimate for a simple in-order core: 1 cycle per instruction, 2 per load, 3 per jump or taken branch, 3 per multiply and 33 per divide.

Can I get the machine code?

Yes. The Machine code tab shows every instruction's address, hex word and decoded form. Copy it as hex, one word per line, or download a .hex or raw .bin file.

Why does my program stop with a misaligned access?

Words must be read and written at addresses that are a multiple of 4, and halfwords at a multiple of 2. Put .align 2 before word data, or check the address you computed. The error names the address and the line.

Can I step backwards?

Yes. Step back undoes up to the last 4,096 instructions, registers, memory and output included, so you can find a bug without running from the start.

Is my code uploaded?

No. Assembling and running happen in your browser, and your program is saved in this browser's storage so it is still here next time.

All Free Tools

Run your next RISC-V program.

Free, private and ready when you are.

Open the simulator