# haroonhaider4414-create/mips-single-cycle-cpu architecture

> Architecture diagram of the GitHub repository haroonhaider4414-create/mips-single-cycle-cpu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/haroonhaider4414-create/mips-single-cycle-cpu
- Repository: https://github.com/haroonhaider4414-create/mips-single-cycle-cpu

## Overview

This repository is named as a MIPS single-cycle CPU, with Verilog files for control, datapath operations, registers, and instruction/data memory. The README provides no workflow details, and no source excerpts are available, so the graph groups components by their apparent roles but does not assert connections or execution order.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control"]
  node_main_control["Main control<br/>[MainCon.v]"]
  node_alu_control["ALU control<br/>[ALUcon.v]"]
end

subgraph group_datapath["Datapath"]
  node_alu["ALU<br/>[ALu.v]"]
  node_and["AND unit<br/>[And.v]"]
  node_mux1["Mux 1<br/>[Mux1.v]"]
  node_mux2["Mux 2<br/>[Mux2.v]"]
  node_mux3["Mux 3<br/>[Mux3.v]"]
  node_mux4["Mux 4<br/>[Mux4.v]"]
  node_pc["Program counter<br/>[PC.v]"]
  node_sign_extend["Sign extend<br/>[SignExtend.v]"]
  node_shift_left["Shift left 2<br/>[ShitLeft2.v]"]
end

subgraph group_storage["Storage"]
  node_reg_file[("Register file<br/>[RegFile.v]")]
  node_instruction_memory[("Instruction memory<br/>[instMem.v]")]
  node_data_memory[("Data memory<br/>[Datamem.v]")]
end

node_cpu["CPU top"]

click node_cpu "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/MipsCPU"
click node_main_control "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/MainCon.v"
click node_alu_control "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ALUcon.v"
click node_alu "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ALu.v"
click node_and "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/And.v"
click node_mux1 "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux1.v"
click node_mux2 "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux2.v"
click node_mux3 "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux3.v"
click node_mux4 "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux4.v"
click node_pc "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/PC.v"
click node_sign_extend "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/SignExtend.v"
click node_shift_left "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ShitLeft2.v"
click node_reg_file "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/RegFile.v"
click node_instruction_memory "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/instMem.v"
click node_data_memory "https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Datamem.v"

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_main_control,node_alu_control toneBlue
class node_alu,node_and,node_mux1,node_mux2,node_mux3,node_mux4,node_pc,node_sign_extend,node_shift_left toneAmber
class node_reg_file,node_instruction_memory,node_data_memory toneMint
class node_cpu toneTeal
```

## Components

### Control

- [Main control](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/MainCon.v): `MainCon.v`
- [ALU control](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ALUcon.v): `ALUcon.v`

### Datapath

- [ALU](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ALu.v): `ALu.v`
- [AND unit](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/And.v): `And.v`
- [Mux 1](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux1.v): `Mux1.v`
- [Mux 2](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux2.v): `Mux2.v`
- [Mux 3](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux3.v): `Mux3.v`
- [Mux 4](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Mux4.v): `Mux4.v`
- [Program counter](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/PC.v): `PC.v`
- [Sign extend](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/SignExtend.v): `SignExtend.v`
- [Shift left 2](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/ShitLeft2.v): `ShitLeft2.v`

### Storage

- [Register file](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/RegFile.v): `RegFile.v`
- [Instruction memory](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/instMem.v): `instMem.v`
- [Data memory](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/Datamem.v): `Datamem.v`

### Other components

- [CPU top](https://github.com/haroonhaider4414-create/mips-single-cycle-cpu/blob/main/MipsCPU): `MipsCPU`
