-
-
Notifications
You must be signed in to change notification settings - Fork 1
Roadmap
The project follows a staged development plan. Each stage builds on the previous without breaking existing functionality.
- Instruction decoder (R/I/J formats, opcode + funct → mnemonic)
- ALU control block and execute (arithmetic, logic, shifts, overflow flags)
- Live MIPS decode in converter UI
-
RegisterFile(32 ×uint32_t,$zerohardwired) -
Memory(byte-addressable, word/half/byte access, alignment checking)
-
SingleCycleCpu: fetch → decode → control → execute → memory → writeback in one cycle - Full control unit signals (
RegWrite,MemRead,MemWrite,Branch,Jump,ALUSrc,ALUOp,MemToReg,RegDst) - ISA subset: arithmetic, logic, shifts, loads, stores, branches, jumps
- Program loader for flat instruction arrays
- 38 unit tests on known programs
- Abstract
IProcessorinterface (Ripes/DrMIPS pattern) -
PipelineStateobservable struct (IF/ID/EX/MEM/WB snapshots, forwarding flags, hazard indicators) -
SingleCycleCpurefactored to implementIProcessor -
PipelinedCpu: full 5-stage concurrent pipeline - Forwarding unit (EX/MEM → EX, MEM/WB → EX)
- Hazard detection (load-use stall, branch/jump flush)
- Polymorphic test harness (95 checks across both implementations)
- Backward-compat shim:
using Cpu = SingleCycleCpu
- CPU mode switcher (single-cycle ↔ pipelined at runtime)
- Register file panel with last-written highlight and signed-decimal annotation
- Datapath panel (PC, instruction, cycle count, per-stage control signal snapshot)
- Pipeline strip with inline stall/forward/flush badges
- Memory panel (hex dump, PC-highlighted row, PgUp/PgDn/Home-to-PC navigation)
- Instruction decode panel (per-field color coding, reconstructed assembly, raw binary)
- Execution speed control (single-step, auto-run, run-to-halt, speed slider 10–1000 ms/cycle)
- Hazard visualization panel (Arches-style: stall/forward/flush inline + dedicated status panel)
- 8-entry execution trace (last committed instructions, WB-stage sourced)
- Telemetry panel (live stalls / forwards / flushes / CPI gauges)
- Oscilloscope startup splash and ambient pipeline flow animation
- Fixed
Container::Tabfocus-routing bug (tabs 4–5 aliasing onto 0–1's interactive components) - Fixed emoji double-width misalignment in tab bar and headers
The next unstarted milestone. No assembler.h or assembler.cpp exists yet.
Recommended first increment — narrow scope to what the decoder already understands:
- Single-pass assembler: R/I-format instructions only, no labels or pseudo-instructions
- Output:
std::vector<uint32_t>loadable byIProcessor::load() -
assembler_test.cppintests/mips/before expanding scope
Full Stage 3 scope:
- Two-pass assembler with symbol table (EduMIPS64 pattern)
- Label resolution for forward and backward branches (BEQ/BNE) and jumps (J/JAL)
- Pseudo-instructions:
li,move,la,nopwith expansion rules - Directive support:
.word,.ascii,.data,.text - Inline editor in TUI (earmarked for the current "Utility Tools" placeholder tab)
- Syntax validation with line-by-line error reporting and invalid-token highlighting
- Symbol export for inspection in Stage 2 visualizer
Reference: EduMIPS64 — GNU assembler directives, case-insensitive mnemonics, forward-reference support.
Partially started: live CPI and stall/forward/flush counters are already displayed in the Stage 2 dashboard. Remaining work:
- Instruction × Cycle Grid (WebRISC-V pattern) — visual table of instruction vs. pipeline stage per cycle
- Performance Summary Panel — post-run snapshot of counters captured on
StepResult::Halt - Per-instruction-type hazard breakout (not just per-cycle totals)
- Cycle-by-cycle breakdown panel — annotate each cycle with reason (normal / stall type / flush type)
- "Squashed Loops" mode (WebRISC-V) — compact view for repetitive loop execution
Smallest next step toward Stage 4: capture a snapshot of the telemetry counters when the CPU halts and render a static end-of-run summary, before tackling the heavier Instruction × Cycle Grid.
- 1-bit predictor (always predict not-taken, flip on misprediction)
- 2-bit saturating counter predictor (Patterson & Hennessy §4.7)
- Branch Target Buffer (BTB) — associative cache of recent branch targets
- Return Address Stack — for
JAL/JRcall/return prediction - Misprediction visualization — flushed instructions labeled "prediction wrong" in pipeline
- Prediction accuracy metrics (correct/incorrect counts, per-branch breakdown)
- Pattern analyzer — identify branch correlations and loop-invariant conditions
Reference: SimpleScalar — implement at increasing sophistication levels, each selectable for teaching.
- RISC-V backend (implements
IProcessor; reuses all existing visualizers) - Configurable datapath — load processor config from JSON/YAML to swap components
- Cache simulator — configurable L1/L2, replacement policies, coherence (EduMIPS64 + Dinero pattern)
- Memory-mapped I/O — console output via syscalls, breakpoint support
- Linux ABI (O32) — syscall emulation (
read,write,exit) for running real MIPS programs - WebAssembly build — port to WASM for browser deployment (Ripes / QtMips pattern)
- Breakpoints and watchpoints — pause on address or register-value change
- Reverse execution — undo previous cycles for post-mortem analysis (DrMIPS feature)
- Snapshot/restore — save and reload execution states for comparison
- UI smoke test guarding
Container::Tabchild count againsttab_labels.size()(prevents reintroduction of the tab/focus aliasing bug) - Regression test for per-instruction-type telemetry breakout
| Venue | Target milestone |
|---|---|
| ACM WCAE (Workshop on Computer Architecture Education) | Stage 2 completion |
| IEEE Transactions on Education | Full pipeline + telemetry (Stage 4) |
Cross-cite with Ripes, WebRISC-V, and Arches in any submission.