A high-fidelity ARM64 (AArch64) CPU simulator with comprehensive instruction decoding and a deterministic execution engine for cycle-accurate state transitions.
- High-fidelity ARM64 CPU simulator – Supports comprehensive instruction decoding and a custom deterministic execution engine for cycle-accurate state transitions
- Sophisticated memory model – Stack, Heap, BSS, and Rodata segments for precise emulation of deep recursion and dynamic memory allocation
- Full register and flag emulation – NZCV condition flags with 100% state transparency for assembly-level logic
- Developer interface – Real-time register visualization, memory inspection grids, and single-step execution control for granular debugging
- Arithmetic: ADD, ADDS, SUB, SUBS, ADDI, SUBI (immediate)
- Logical: AND, ORR, EOR, MOV
- Comparison: CMP (register and immediate)
- Branches: B, BL, B.cond, CBZ, CBNZ, RET, BR, BLR
- Memory: LDR, STR (64-bit)
- System: SVC, NOP
npm install
npm run devOpen http://localhost:5173 in your browser.
- Write assembly – Enter ARM64 assembly in the editor (labels supported)
- Assemble & Load – Compile and load the program into the simulator
- Step – Execute one instruction at a time for debugging
- Run – Execute until halt
- Reset – Clear state and reload
// Counter: counts from 0 to 5
mov x0, #0 // counter = 0
mov x1, #5 // limit = 5
loop:
add x0, x0, #1 // counter++
cmp x0, x1 // counter < limit?
b.lt loop // if so, repeat
svc #0 // haltsrc/
├── simulator/ # Core simulator
│ ├── types.ts # Type definitions
│ ├── memory.ts # Memory model (Stack, Heap, BSS, Rodata)
│ ├── cpu.ts # CPU state & NZCV
│ ├── decoder.ts # Instruction decoder
│ ├── executor.ts # Execution engine
│ └── assembler.ts # Assembly parser
├── components/ # React UI
│ ├── RegisterView.tsx
│ ├── MemoryGrid.tsx
│ ├── ExecutionControls.tsx
│ └── CodeEditor.tsx
└── App.tsx