# ziadbady85-sketch/simt-gpgpu architecture

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

- Interactive diagram: https://gitdiagram.com/ziadbady85-sketch/simt-gpgpu
- Repository: https://github.com/ziadbady85-sketch/simt-gpgpu

## Overview

This repository implements a 4-core, 64-thread SIMT GPU in Verilog. Its documented workflow is shared instruction control—from the program counter through fetch, instruction memory, decode, and scheduling—followed by lockstep execution across cores and active threads. Each thread has register state and parallel ALU/LSU execution; memory requests pass through private write-back L1 caches to shared memory. The README documents these architectural relationships, but no RTL excerpts were provided, so edges below are based on that documentation rather than inspected call sites.

Main entry points: [`gpu_top.v`](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/gpu_top.v) (GPU Top), [`GPU_Thread.v`](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Thread.v) (SIMT Thread), [`GPU_PC.v`](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_PC.v) (Program Counter), [`Scheduler.v`](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/Scheduler.v) (Scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Shared Control"]
  node_thread_controller["Thread Controller"]
  node_pc["Program Counter<br/>[GPU_PC.v]"]
  node_fetcher["Instruction Fetcher<br/>[GPU_Fetcher.v]"]
  node_imem[("Instruction Memory<br/>[GPU_INST_MEM.v]")]
  node_decoder["Instruction Decoder<br/>[GPU_Decoder.v]"]
  node_scheduler["Scheduler<br/>[Scheduler.v]"]
end

subgraph group_execution["Parallel Execution"]
  node_core["Execution Core<br/>[GPU_Core.v]"]
  node_block["Thread Block<br/>[GPU_Block.v]"]
  node_thread["SIMT Thread<br/>[GPU_Thread.v]"]
  node_alu["Thread ALU<br/>[GPU_ALU.v]"]
  node_register_file[("Thread Registers<br/>[GPU_Reg_File.v]")]
  node_lsu["Load Store Unit<br/>[GPU_LSU.v]"]
end

subgraph group_memory["Memory System"]
  node_cache[("Private L1 Cache<br/>[l1_cache.v]")]
  node_cache_arbiter["Cache Arbitration<br/>[l1_cache.v]"]
  node_memory_controller["Memory Controller"]
  node_data_memory[("Backing Data Memory<br/>[data_memory.v]")]
end

node_gpu["GPU Top<br/>[gpu_top.v]"]

node_gpu -->|"configures threads"| node_thread_controller
node_gpu -->|"uses shared control"| node_pc
node_gpu -->|"dispatches to cores"| node_scheduler
node_gpu -->|"organizes four cores"| node_core
node_thread_controller -->|"provides activation"| node_pc
node_pc -->|"provides address"| node_fetcher
node_fetcher -->|"requests instruction"| node_imem
node_imem -->|"supplies instruction"| node_decoder
node_decoder -->|"provides decoded instruction"| node_scheduler
node_scheduler -->|"dispatches instruction"| node_core
node_core -->|"organizes blocks"| node_block
node_block -->|"contains threads"| node_thread
node_thread -->|"executes instruction"| node_alu
node_thread -->|"maintains state"| node_register_file
node_thread -->|"issues memory operations"| node_lsu
node_lsu -->|"requests data"| node_cache
node_cache -->|"arbitrates requests"| node_cache_arbiter
node_cache_arbiter -->|"forwards misses"| node_memory_controller
node_memory_controller -->|"accesses backing store"| node_data_memory

click node_gpu "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/gpu_top.v"
click node_thread_controller "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/Thread_Controller.v"
click node_pc "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_PC.v"
click node_fetcher "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Fetcher.v"
click node_imem "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_INST_MEM.v"
click node_decoder "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Decoder.v"
click node_scheduler "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/Scheduler.v"
click node_core "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Core.v"
click node_block "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Block.v"
click node_thread "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Thread.v"
click node_alu "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_ALU.v"
click node_register_file "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Reg_File.v"
click node_lsu "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_LSU.v"
click node_cache "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/l1_cache.v"
click node_cache_arbiter "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/l1_cache.v"
click node_memory_controller "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/memory_controller.v"
click node_data_memory "https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/data_memory.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_thread_controller,node_pc,node_fetcher,node_imem,node_decoder,node_scheduler toneBlue
class node_core,node_block,node_thread,node_alu,node_register_file,node_lsu toneAmber
class node_cache,node_cache_arbiter,node_memory_controller,node_data_memory toneMint
class node_gpu toneTeal
```

## Components

### Shared Control

- [Thread Controller](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/Thread_Controller.v): `Thread_Controller.v`
- [Program Counter](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_PC.v): `GPU_PC.v`
- [Instruction Fetcher](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Fetcher.v): `GPU_Fetcher.v`
- [Instruction Memory](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_INST_MEM.v): `GPU_INST_MEM.v`
- [Instruction Decoder](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Decoder.v): `GPU_Decoder.v`
- [Scheduler](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/Scheduler.v): `Scheduler.v`

### Parallel Execution

- [Execution Core](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Core.v): `GPU_Core.v`
- [Thread Block](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Block.v): `GPU_Block.v`
- [SIMT Thread](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Thread.v): `GPU_Thread.v`
- [Thread ALU](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_ALU.v): `GPU_ALU.v`
- [Thread Registers](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_Reg_File.v): `GPU_Reg_File.v`
- [Load Store Unit](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/GPU_LSU.v): `GPU_LSU.v`

### Memory System

- [Private L1 Cache](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/l1_cache.v): `l1_cache.v`
- [Cache Arbitration](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/l1_cache.v): `l1_cache.v`
- [Memory Controller](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/memory_controller.v): `memory_controller.v`
- [Backing Data Memory](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/data_memory.v): `data_memory.v`

### Other components

- [GPU Top](https://github.com/ziadbady85-sketch/simt-gpgpu/blob/main/gpu_top.v): `gpu_top.v`

## Connections

- GPU Top → Thread Controller: configures threads (evidence: `README.md`)
- GPU Top → Program Counter: uses shared control (evidence: `README.md`)
- GPU Top → Scheduler: dispatches to cores (evidence: `README.md`)
- GPU Top → Execution Core: organizes four cores (evidence: `README.md`)
- Thread Controller → Program Counter: provides activation (evidence: `README.md`)
- Program Counter → Instruction Fetcher: provides address (evidence: `README.md`)
- Instruction Fetcher → Instruction Memory: requests instruction (evidence: `README.md`)
- Instruction Memory → Instruction Decoder: supplies instruction (evidence: `README.md`)
- Instruction Decoder → Scheduler: provides decoded instruction (evidence: `README.md`)
- Scheduler → Execution Core: dispatches instruction (evidence: `README.md`)
- Execution Core → Thread Block: organizes blocks (evidence: `README.md`)
- Thread Block → SIMT Thread: contains threads (evidence: `README.md`)
- SIMT Thread → Thread ALU: executes instruction (evidence: `README.md`)
- SIMT Thread → Thread Registers: maintains state (evidence: `README.md`)
- SIMT Thread → Load Store Unit: issues memory operations (evidence: `README.md`)
- Load Store Unit → Private L1 Cache: requests data (evidence: `README.md`)
- Private L1 Cache → Cache Arbitration: arbitrates requests (evidence: `README.md`)
- Cache Arbitration → Memory Controller: forwards misses (evidence: `README.md`)
- Memory Controller → Backing Data Memory: accesses backing store (evidence: `README.md`)
