# abdoahmed704/riscv-microkernel-architecture architecture

> Architecture diagram of the GitHub repository abdoahmed704/riscv-microkernel-architecture, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdoahmed704/riscv-microkernel-architecture
- Repository: https://github.com/abdoahmed704/riscv-microkernel-architecture

## Overview

1. **Repository purpose**
   - This repo is a hardware/software co-design around a **bare-metal RV32I 5-stage pipelined RISC-V core**.
   - The main deliverable is the CPU subsystem in `rtl/RV32I`, with software in `sw/` that boots on it and runs a small nano-OS/Snake application.
   - `Standard/` contains the ISA and privileged spec PDFs used as design references.

2. **Primary hardware boundary: the RV32I pipeline**
   - `rtl/RV32I/riscv_top_pipeline.sv` is the top-level CPU datapath wrapper.
   - The datapath is split into the usual **IF, ID, EX, MEM, WB** stages, each implemented in its own module:
     - Fetch: `riscv_fetch_stage.sv`
     - Decode: `riscv_decode_stage.sv`
     - Execute: `riscv_execute_stage.sv`
     - Memory: `riscv_memory_stage.sv`
   - The pipeline connects instruction memory, register file, ALU, data memory, PC/branch logic, control, hazard handling, and CSR/trap handling.

3. **Instruction flow through the core**
   - Instructions come from `riscv_instruction_mem.sv`, which is the fetch-side ROM/firmware source.
   - Decode uses `riscv_control_unit.sv` and `riscv_extend.sv` to turn opcode fields into control signals and immediates.
   - Execute uses `riscv_alu.sv`, `riscv_pc_target.sv`, and muxes to choose operand sources and branch/jump targets.
   - Memory uses `riscv_data_mem.sv` for loads/stores, and writeback uses `riscv_mux_3_1.sv` to select ALU result, memory data, or `PC+4`.

4. **Hazard and pipeline control**
   - `riscv_hazard_unit.sv` is the main control boundary for pipeline correctness.
   - It handles:
     - **Forwarding** from MEM/WB back to EX
     - **Load-use stalls** when a value is not yet available
     - **Flushes** on control transfers such as branches and jumps
   - `riscv_pc_src_controller.sv` and the fetch-stage control signals determine whether the PC advances normally or is redirected.

5. **Register file and architectural state**
   - `riscv_register_file.sv` implements the 32 general-purpose registers, with `x0` hardwired to zero.
   - The README indicates the register file writes on the falling edge to support same-cycle bypassing behavior.
   - This architectural state is the main shared state between decode, execute, and writeback.

6. **Privilege, CSRs, and traps**
   - `riscv_csr_unit.sv` adds privileged-machine functionality on top of the base integer core.
   - The documentation files `explain_Privilege.md` and `explain_CSR_signals.md` show this is a deliberate subsystem, not just a few extra registers.
   - Key CSRs include `mstatus`, `mtvec`, `mepc`, `mcause`, `stvec`, `sepc`, and `scause`.
   - The trap model supports `ecall`, `ebreak`, `mret`, and `sret`, so software can use syscall-style transitions and exception return.

7. **Memory and I/O boundary**
   - `riscv_data_mem.sv` is the main memory interface for the CPU.
   - The README describes a **memory-mapped virtual UART/console** used by software at address `0x00003FF0`, which is how the Snake demo prints and receives input.
   - That makes the memory block both program data storage and the boundary to interactive I/O during simulation or emulation.

8. **Software stack on top of the core**
   - `sw/src/start.s` is the bare-metal bootstrap: it initializes execution state, sets up trap vectors/stacks, and transfers control into the kernel.
   - `sw/src/main.c` is the C kernel/application layer; in this repo it drives the Snake game and syscall-based console interaction.
   - `sw/src/riscv_test.s` appears to be an early validation program.
   - `sw/linker.ld` defines the firmware memory layout that must match the RTL memory map.

9. **Build and image generation flow**
   - The software build flow is centralized in `sw/Makefile`, with Windows entry points in `build.bat` and `build.ps1`.
   - `elf2hex.py` converts the compiled ELF into `firmware.hex`, which is the image consumed by the instruction memory in simulation and by the web emulator flow described in the README.
   - `sw/input.txt` and `play_game.py` are part of the interactive simulation input path.

10. **Verification and simulation**
   - `rtl/RV32I/riscv_top_tb.sv` is the main CPU testbench.
   - `sim/` contains focused Questa/ModelSim `.do` scripts for the top pipeline, control unit, hazard unit, and instruction memory.
   - `rtl/RV32I/run.do`, `run_xsim.bat`, and the `sim/run_*.do` files show that simulation is a first-class part of the repo, not an afterthought.

11. **Adjacent RTL subsystems**
   - Several folders are separate design lines rather than part of the main RV32I top:
     - `rtl/compressed_decoder` for RVC decoding
     - `rtl/d_cache` for a data cache/controller/memory subsystem
     - `rtl/dynamic_branch_prediction` for BHT/BTB-based branch prediction
     - `rtl/m_extension` for multiply/divide support
     - `rtl/tiny_inference_chip` for a distinct accelerator-style neural/inference block
   - These should be treated as parallel subsystems or experiments, not automatically assumed to be integrated into the main pipeline.

12. **What an architecture diagram should emphasize**
   - The central diagram should show a **single RV32I pipelined core** with clear stage boundaries, plus side blocks for **hazard control**, **CSR/trap handling**, and **instruction/data memories**.
   - A second layer should show the **software firmware stack**: boot code → kernel → Snake application → memory-mapped console/input.
   - Separate callouts should indicate the **optional/adjacent RTL projects** (branch prediction, cache, M extension, inference chip) and the **simulation/verification toolchain** around them.

Main entry points: [`rtl/RV32I/riscv_top_pipeline.sv`](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_top_pipeline.sv) (RV32I Top), [`rtl/RV32I/riscv_execute_stage.sv`](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_execute_stage.sv) (Execute), [`rtl/RV32I/riscv_hazard_unit.sv`](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_hazard_unit.sv) (Hazard Unit), [`rtl/RV32I/riscv_decode_stage.sv`](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_decode_stage.sv) (Decode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hw_core["RV32I Core"]
  node_n1["RV32I Top<br/>cpu pipeline top"]
  node_n2["Fetch<br/>IF stage"]
  node_n3["Decode<br/>ID stage"]
  node_n4["Execute<br/>EX stage"]
  node_n5["Memory<br/>MEM stage"]
  node_n6[("Register File<br/>architectural regs")]
  node_n7["Control Unit<br/>decode control"]
  node_n8["Immediate Ext<br/>imm decode<br/>[riscv_extend.sv]"]
  node_n9["ALU<br/>integer execute<br/>[riscv_alu.sv]"]
  node_n10["PC Target<br/>branch target<br/>[riscv_pc_target.sv]"]
  node_n11["PC Src Ctrl<br/>pc select"]
  node_n12{{"Hazard Unit<br/>pipeline control"}}
  node_n13[("Instr Mem<br/>firmware rom")]
  node_n14[("Data Mem<br/>load/store interface<br/>[riscv_data_mem.sv]")]
  node_n15["CSR Unit<br/>privileged state<br/>[riscv_csr_unit.sv]"]
  node_n16["Writeback Mux<br/>wb select<br/>[riscv_mux_3_1.sv]"]
end

subgraph group_sw_stack["Software Stack"]
  node_n17["Bootstrap<br/>startup assembly<br/>[start.s]"]
  node_n18["Kernel/App<br/>C firmware<br/>[main.c]"]
  node_n19["Linker Map<br/>memory layout<br/>[linker.ld]"]
  node_n20["ELF to Hex<br/>image tool<br/>[elf2hex.py]"]
  node_n21["Console I/O<br/>mmio uart"]
end

subgraph group_adj_rtl["Adjacent RTL"]
  node_n22["Compressed Decoder<br/>rvc block"]
  node_n23[("D Cache<br/>cache subsystem")]
  node_n24["Branch Prediction<br/>predictor subsystem<br/>[risc_top_branch.sv]"]
  node_n25["M Extension<br/>mul/div unit<br/>[m_extension_top.sv]"]
  node_n26["Inference Chip<br/>accelerator<br/>[top.sv]"]
end

subgraph group_verification["Verification"]
  node_n27["Top TB<br/>cpu testbench<br/>[riscv_top_tb.sv]"]
  node_n28["Sim Scripts<br/>simulation flow<br/>[run.do]"]
end

node_n1 -->|"inst fetch"| node_n2
node_n1 -->|"decode"| node_n3
node_n1 -->|"execute"| node_n4
node_n1 -->|"memory"| node_n5
node_n1 -->|"regs"| node_n6
node_n3 -->|"control"| node_n7
node_n3 -->|"immediates"| node_n8
node_n4 -->|"alu op"| node_n9
node_n4 -->|"branch target"| node_n10
node_n4 -->|"pc select"| node_n11
node_n5 -->|"loads/stores"| node_n14
node_n2 -->|"instrs"| node_n13
node_n12 -->|"stall/flush"| node_n2
node_n12 -->|"stall/flush"| node_n3
node_n12 -->|"forward"| node_n4
node_n12 -->|"forward"| node_n5
node_n15 -->|"traps"| node_n1
node_n16 -->|"wb"| node_n1
node_n11 -->|"redirect"| node_n2
node_n10 -->|"target"| node_n11
node_n17 -->|"boot to kernel"| node_n18
node_n18 -->|"syscalls/mmio"| node_n21
node_n17 -->|"layout"| node_n19
node_n19 -->|"image build"| node_n20
node_n20 -->|"firmware load"| node_n13
node_n27 -->|"verify"| node_n1
node_n28 -->|"run"| node_n27
node_n28 -->|"simulate"| node_n1
node_n22 -.->|"parallel rtl"| node_n24
node_n23 -.->|"adjacent"| node_n1
node_n24 -.->|"adjacent"| node_n1
node_n25 -.->|"adjacent"| node_n1
node_n26 -.->|"adjacent"| node_n1

click node_n1 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_top_pipeline.sv"
click node_n2 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_fetch_stage.sv"
click node_n3 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_decode_stage.sv"
click node_n4 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_execute_stage.sv"
click node_n5 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_memory_stage.sv"
click node_n6 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_register_file.sv"
click node_n7 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_control_unit.sv"
click node_n8 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_extend.sv"
click node_n9 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_alu.sv"
click node_n10 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_pc_target.sv"
click node_n11 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_pc_src_controller.sv"
click node_n12 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_hazard_unit.sv"
click node_n13 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_instruction_mem.sv"
click node_n14 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_data_mem.sv"
click node_n15 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_csr_unit.sv"
click node_n16 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_mux_3_1.sv"
click node_n17 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/src/start.s"
click node_n18 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/src/main.c"
click node_n19 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/linker.ld"
click node_n20 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/elf2hex.py"
click node_n22 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/compressed_decoder/riscv_core_compressed_decoder.sv"
click node_n23 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/d_cache/riscv_core_dcache_top.sv"
click node_n24 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/dynamic_branch_prediction/risc_top_branch.sv"
click node_n25 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/m_extension/design/m_extension_top.sv"
click node_n26 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/tiny_inference_chip/top.sv"
click node_n27 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_top_tb.sv"
click node_n28 "https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sim/run.do"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n1,node_n2,node_n3,node_n4,node_n5,node_n6,node_n7,node_n8,node_n9,node_n10,node_n11,node_n12,node_n13,node_n14,node_n15,node_n16 toneBlue
class node_n17,node_n18,node_n19,node_n20,node_n21 toneAmber
class node_n22,node_n23,node_n24,node_n25,node_n26 toneMint
class node_n27,node_n28 toneRose
```

## Components

### RV32I Core

Main bare-metal pipelined CPU subsystem.

- [RV32I Top](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_top_pipeline.sv): cpu pipeline top · Top-level wrapper for the five-stage RV32I core. · `rtl/RV32I/riscv_top_pipeline.sv`
- [Fetch](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_fetch_stage.sv): IF stage · Program counter, instruction fetch, and redirect handling. · `rtl/RV32I/riscv_fetch_stage.sv`
- [Decode](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_decode_stage.sv): ID stage · Instruction decode, control generation, and immediate extension. · `rtl/RV32I/riscv_decode_stage.sv`
- [Execute](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_execute_stage.sv): EX stage · ALU operations, operand selection, and branch target computation. · `rtl/RV32I/riscv_execute_stage.sv`
- [Memory](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_memory_stage.sv): MEM stage · Data memory access and memory-stage result handling. · `rtl/RV32I/riscv_memory_stage.sv`
- [Register File](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_register_file.sv): architectural regs · 32 general-purpose registers with x0 hardwired to zero. · `rtl/RV32I/riscv_register_file.sv`
- [Control Unit](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_control_unit.sv): decode control · Opcode and funct decoding into control signals. · `rtl/RV32I/riscv_control_unit.sv`
- [Immediate Ext](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_extend.sv): imm decode · Builds sign-extended immediates from instruction fields. · `rtl/RV32I/riscv_extend.sv`
- [ALU](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_alu.sv): integer execute · Core arithmetic and logical operations. · `rtl/RV32I/riscv_alu.sv`
- [PC Target](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_pc_target.sv): branch target · Computes jump and branch destination addresses. · `rtl/RV32I/riscv_pc_target.sv`
- [PC Src Ctrl](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_pc_src_controller.sv): pc select · Chooses normal advance versus redirected fetch path. · `rtl/RV32I/riscv_pc_src_controller.sv`
- [Hazard Unit](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_hazard_unit.sv): pipeline control · Forwarding, load-use stalls, and flush control. · `rtl/RV32I/riscv_hazard_unit.sv`
- [Instr Mem](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_instruction_mem.sv): firmware rom · Fetch-side instruction source for simulation and boot image. · `rtl/RV32I/riscv_instruction_mem.sv`
- [Data Mem](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_data_mem.sv): load/store interface · Main memory-mapped data and I/O boundary. · `rtl/RV32I/riscv_data_mem.sv`
- [CSR Unit](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_csr_unit.sv): privileged state · Machine/supervisor CSRs, traps, and return-from-trap support. · `rtl/RV32I/riscv_csr_unit.sv`
- [Writeback Mux](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_mux_3_1.sv): wb select · Selects ALU, memory, or PC+4 result for writeback. · `rtl/RV32I/riscv_mux_3_1.sv`

### Software Stack

Boot, kernel, and demo application built for the core.

- [Bootstrap](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/src/start.s): startup assembly · Bare-metal initialization and trap-vector setup. · `sw/src/start.s`
- [Kernel/App](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/src/main.c): C firmware · Main C layer driving Snake and console/syscall interaction. · `sw/src/main.c`
- [Linker Map](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/linker.ld): memory layout · Firmware layout matched to the RTL memory map. · `sw/linker.ld`
- [ELF to Hex](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sw/elf2hex.py): image tool · Converts built firmware into instruction-memory hex. · `sw/elf2hex.py`
- **Console I/O**: mmio uart · Memory-mapped virtual UART/console used by the demo.

### Adjacent RTL

Parallel design lines and experiments outside the main CPU pipeline.

- [Compressed Decoder](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/compressed_decoder/riscv_core_compressed_decoder.sv): rvc block · Standalone compressed-instruction decoder subsystem. · `rtl/compressed_decoder/riscv_core_compressed_decoder.sv`
- [D Cache](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/d_cache/riscv_core_dcache_top.sv): cache subsystem · Standalone data cache/controller/memory design line. · `rtl/d_cache/riscv_core_dcache_top.sv`
- [Branch Prediction](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/dynamic_branch_prediction/risc_top_branch.sv): predictor subsystem · Standalone BHT/BTB-based branch prediction design. · `rtl/dynamic_branch_prediction/risc_top_branch.sv`
- [M Extension](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/m_extension/design/m_extension_top.sv): mul/div unit · Standalone multiply/divide implementation and verification. · `rtl/m_extension/design/m_extension_top.sv`
- [Inference Chip](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/tiny_inference_chip/top.sv): accelerator · Separate tiny inference accelerator subsystem. · `rtl/tiny_inference_chip/top.sv`

### Verification

Testbenches and simulation entry points.

- [Top TB](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/rtl/RV32I/riscv_top_tb.sv): cpu testbench · Main CPU testbench for the RV32I core. · `rtl/RV32I/riscv_top_tb.sv`
- [Sim Scripts](https://github.com/abdoahmed704/riscv-microkernel-architecture/blob/main/sim/run.do): simulation flow · Questa/ModelSim scripts for core subsystems and snake run. · `sim/run.do`

## Connections

- RV32I Top → Fetch: inst fetch · Top-level core instantiates the fetch stage.
- RV32I Top → Decode: decode · Top-level core instantiates the decode stage.
- RV32I Top → Execute: execute · Top-level core instantiates the execute stage.
- RV32I Top → Memory: memory · Top-level core instantiates the memory stage.
- RV32I Top → Register File: regs · Architectural register file shared across pipeline stages.
- Decode → Control Unit: control · Decode stage derives control signals from instruction fields.
- Decode → Immediate Ext: immediates · Decode stage expands instruction immediates.
- Execute → ALU: alu op · Execute stage performs arithmetic and logical operations.
- Execute → PC Target: branch target · Execute stage computes redirect targets.
- Execute → PC Src Ctrl: pc select · Execute results participate in PC redirect selection.
- Memory → Data Mem: loads/stores · Memory stage accesses data memory and MMIO.
- Fetch → Instr Mem: instrs · Fetch stage reads the instruction source.
- Hazard Unit → Fetch: stall/flush · Hazard logic controls fetch behavior.
- Hazard Unit → Decode: stall/flush · Hazard logic controls decode behavior.
- Hazard Unit → Execute: forward · Hazard logic forwards operands into execute.
- Hazard Unit → Memory: forward · Hazard logic coordinates later-stage result availability.
- CSR Unit → RV32I Top: traps · CSR/trap subsystem is integrated into the core wrapper.
- Writeback Mux → RV32I Top: wb · Writeback selection feeds the core datapath.
- PC Src Ctrl → Fetch: redirect · PC source controller steers the fetch stage.
- PC Target → PC Src Ctrl: target · Branch/jump target feeds PC source selection.
- Bootstrap → Kernel/App: boot to kernel · Bootstrap transfers control into the main firmware.
- Kernel/App → Console I/O: syscalls/mmio · Application interacts with the console via memory-mapped I/O.
- Bootstrap → Linker Map: layout · Startup code and kernel rely on the linker memory map.
- Linker Map → ELF to Hex: image build · Linked ELF is converted into hex firmware for the core.
- ELF to Hex → Instr Mem: firmware load · Hex image becomes the instruction memory contents.
- Top TB → RV32I Top: verify · CPU testbench exercises the top-level pipeline.
- Sim Scripts → Top TB: run · Simulation scripts drive the main testbench.
- Sim Scripts → RV32I Top: simulate · Scripts also target the top pipeline directly.
- Compressed Decoder → Branch Prediction: parallel rtl · Compressed decoder is a separate RTL line adjacent to the core.
- D Cache → RV32I Top: adjacent · Cache subsystem is separate from the main RV32I top.
- Branch Prediction → RV32I Top: adjacent · Branch prediction block is a separate design line.
- M Extension → RV32I Top: adjacent · Multiply/divide extension is maintained as a parallel subsystem.
- Inference Chip → RV32I Top: adjacent · Tiny inference chip is an independent accelerator project.
