# aabrahamy/rv32i_cpu architecture

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

- Interactive diagram: https://gitdiagram.com/aabrahamy/rv32i_cpu
- Repository: https://github.com/aabrahamy/rv32i_cpu

## Overview

The README identifies this as a single-cycle RISC-V processor. The RTL tree contains arithmetic, decode, register, memory, and mux modules, but no source excerpts or documented wiring are available. The graph therefore shows these implementation components without guessing their call or data-flow relationships. Testbench and build files are excluded.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_compute["Compute datapath"]
  node_alu["ALU<br/>[alu.sv]"]
  node_adder["Adder<br/>[adder.sv]"]
  node_mux2["Two-way mux<br/>[mux2.sv]"]
  node_mux3["Three-way mux<br/>[mux3.sv]"]
end

subgraph group_control["Instruction control"]
  node_aludecoder["ALU decoder<br/>[aludecoder.sv]"]
end

subgraph group_state["Processor state"]
  node_imem[("Instruction memory<br/>[imem.sv]")]
  node_dmem[("Data memory<br/>[dmem.sv]")]
  node_regfile[("Register file<br/>[regfile.sv]")]
  node_flopr["Register<br/>[flopr.sv]"]
end

click node_alu "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/alu.sv"
click node_adder "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/adder.sv"
click node_mux2 "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/mux2.sv"
click node_mux3 "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/mux3.sv"
click node_aludecoder "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/aludecoder.sv"
click node_imem "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/imem.sv"
click node_dmem "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/dmem.sv"
click node_regfile "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/regfile.sv"
click node_flopr "https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/flopr.sv"

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_alu,node_adder,node_mux2,node_mux3 toneBlue
class node_aludecoder toneAmber
class node_imem,node_dmem,node_regfile,node_flopr toneMint
```

## Components

### Compute datapath

- [ALU](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/alu.sv): `rtl/alu.sv`
- [Adder](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/adder.sv): `rtl/adder.sv`
- [Two-way mux](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/mux2.sv): `rtl/mux2.sv`
- [Three-way mux](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/mux3.sv): `rtl/mux3.sv`

### Instruction control

- [ALU decoder](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/aludecoder.sv): `rtl/aludecoder.sv`

### Processor state

- [Instruction memory](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/imem.sv): `rtl/imem.sv`
- [Data memory](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/dmem.sv): `rtl/dmem.sv`
- [Register file](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/regfile.sv): `rtl/regfile.sv`
- [Register](https://github.com/aabrahamy/rv32i_cpu/blob/main/rtl/flopr.sv): `rtl/flopr.sv`
