Skip to content
Hackerland LogoHackerland
Microarchitecture Sim

RISC-V Instruction Set Simulator (ISS) Studio

RISC-V Instruction Set Simulator (ISS) Studio

Cycle-accurate microarchitecture execution workbench modeled after Spike, QEMU, gem5, and CPU Sim. Inspect 32 general-purpose registers, 5-stage pipeline hazards, RAM load/stores, and disassembly.

RISC-V RV32Igem5 / QEMU ModelSpike ISS Spec
Assembly Benchmark Programs
Clock Speed:
Instruction Set Architecture (ISA) Physics & Theory

An Instruction Set Simulator models a Von Neumann CPU with sequential instruction fetch, register file modification, and conditional branch evaluations. Fibonacci iteratively updates F_{n} = F_{n-1} + F_{n-2} using ADDI, ADD, and BNE loop control.

F_n = F_{n-1} + F_{n-2} \quad \text{with } F_0=0, F_1=1
Expected Result: Memory at 0x1000 contains F_7 = 13 (0x0000000D), a0 contains 13, a1 contains 21

Classic 5-Stage RISC Microarchitecture Pipeline

CYCLES:0
RETIRED:0
CPI:1.00
IF

Instruction Fetch

Fetch PC instruction from code memory bus

Stage State

IDLE

ID

Instruction Decode

Decode opcode, read source registers (rs1, rs2)

Stage State

IDLE

EX

Execute (ALU)

32-bit Integer ALU & branch condition evaluation

Stage State

IDLE

MEM

Memory Access

Load Word (LW) / Store Word (SW) data transfer

Stage State

IDLE

WB

Writeback

Commit result to architectural register (rd)

Stage State

IDLE

RV32I Architectural Register File (32 × 32-Bit)

General Purpose Integer Registers with Standard RISC-V ABI Mappings

PC:0x00000000
FLAGS:ZNV
x0zero
0x000000000
Hardwired Constant Zero (0x0)
x1ra
0x000000000
Return Address for subroutine calls
x2sp
0x7FFFFFF02147483632
Top of Stack Pointer (0x7FFFFFF0)
x3gp
0x000000000
Global Pointer for static memory
x4tp
0x000000000
Thread Pointer (TLS base)
x5t0
0x000000000
Temporary register / scratchpad
x6t1
0x000000000
Temporary register / scratchpad
x7t2
0x000000000
Temporary register / scratchpad
x8s0
0x000000000
Saved register / Frame pointer
x9s1
0x000000000
Saved register across calls
x10a0
0x000000000
Function Argument 0 / Return value
x11a1
0x000000000
Function Argument 1 / Return value
x12a2
0x000000000
Function Argument 2
x13a3
0x000000000
Function Argument 3
x14a4
0x000000000
Function Argument 4
x15a5
0x000000000
Function Argument 5
x16a6
0x000000000
Function Argument 6
x17a7
0x000000000
Function Argument 7 / Syscall ID
x18s2
0x000000000
Saved register 2
x19s3
0x000000000
Saved register 3
x20s4
0x000000000
Saved register 4
x21s5
0x000000000
Saved register 5
x22s6
0x000000000
Saved register 6
x23s7
0x000000000
Saved register 7
x24s8
0x000000000
Saved register 8
x25s9
0x000000000
Saved register 9
x26s10
0x000000000
Saved register 10
x27s11
0x000000000
Saved register 11
x28t3
0x000000000
Temporary register 3
x29t4
0x000000000
Temporary register 4
x30t5
0x000000000
Temporary register 5
x31t6
0x000000000
Temporary register 6

Data RAM Segment & Hex Memory Inspector (32-Bit Words)

Memory AddressHex ValueDecimal ValueASCII RepresentationStatus
0x000010000x000000000....Zero
0x000010040x000000000....Zero
0x000010080x000000000....Zero
0x0000100C0x000000000....Zero
0x000010100x000000000....Zero
0x000010140x000000000....Zero
0x000010180x000000000....Zero
0x0000101C0x000000000....Zero
0x000010200x000000000....Zero
0x000010240x000000000....Zero
0x000010280x000000000....Zero
0x0000102C0x000000000....Zero
0x000010300x000000000....Zero
0x000010340x000000000....Zero
0x000010380x000000000....Zero
0x0000103C0x000000000....Zero
ExecAddressMachine CodeInstructionComment / Micro-op
0x00000x00000293ADDI addi t0, zero, 0x1000# t0 = Base RAM Address 0x1000
0x00040x00000513ADDI addi a0, zero, 0# a0 = F(0) = 0
0x00080x00100593ADDI addi a1, zero, 1# a1 = F(1) = 1
0x000C0x00700313ADDI addi t1, zero, 7# t1 = Loop Counter = 7 iterations
0x00100x00A28023SW sw a0, 0(t0)# Store F(0) at 0x1000
0x00140x00B503B3ADD add t2, a0, a1# t2 = F(n) = F(n-2) + F(n-1)
0x00180x00428293ADDI addi t0, t0, 4# Increment memory pointer by 4 bytes
0x001C0x00728023SW sw t2, 0(t0)# Store F(n) in RAM
0x00200x00B00533ADD add a0, zero, a1# a0 = a1
0x00240x007005B3ADD add a1, zero, t2# a1 = t2
0x00280xFFF30313ADDI addi t1, t1, -1# Decrement counter
0x002C0x01430063BNE bne t1, zero, loop# If counter != 0, continue loop
0x00300x00000073ECALL ecall# Terminate program execution