# omarmongy/vga architecture

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

- Interactive diagram: https://gitdiagram.com/omarmongy/vga
- Repository: https://github.com/omarmongy/vga

## Overview

This repository implements a modular FPGA VGA display design: clock generation and pixel timing support a controller that produces synchronization and color signals for a display. It also includes a single-port ROM and two Python image/text utilities, but the README does not describe how those utilities connect to the Verilog design. Verilog sources were not excerpted, so relationships below rely on README statements; unshown integration links are omitted.

Main entry points: [`src/VGA_controller.v`](https://github.com/omarmongy/vga/blob/main/src/VGA_controller.v) (VGA Controller), [`src/horizontal_counter.v`](https://github.com/omarmongy/vga/blob/main/src/horizontal_counter.v) (Horizontal Counter), [`src/vertical_counter.v`](https://github.com/omarmongy/vga/blob/main/src/vertical_counter.v) (Vertical Counter), [`src/PLL_clk10MHz.v`](https://github.com/omarmongy/vga/blob/main/src/PLL_clk10MHz.v) (10 MHz PLL)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_timing["Clock and Timing"]
  node_pll["10 MHz PLL<br/>[PLL_clk10MHz.v]"]
  node_horizontal_counter["Horizontal Counter"]
  node_vertical_counter["Vertical Counter<br/>[vertical_counter.v]"]
end

subgraph group_display["VGA Display"]
  node_vga_top["VGA Top<br/>[VGA_top.v]"]
  node_vga_controller["VGA Controller<br/>[VGA_controller.v]"]
end

subgraph group_memory["Image Memory"]
  node_memory_rom[("Single-Port ROM<br/>[memory_rom.v]")]
end

node_fpga_clock(("FPGA Clock"))
node_monitor(("VGA Monitor"))

node_fpga_clock -->|"clocks"| node_pll
node_horizontal_counter -->|"enables at line end"| node_vertical_counter
node_horizontal_counter -->|"timing for"| node_vga_controller
node_vertical_counter -->|"timing for"| node_vga_controller
node_vga_controller -->|"outputs video signals"| node_monitor

click node_pll "https://github.com/omarmongy/vga/blob/main/src/PLL_clk10MHz.v"
click node_horizontal_counter "https://github.com/omarmongy/vga/blob/main/src/horizontal_counter.v"
click node_vertical_counter "https://github.com/omarmongy/vga/blob/main/src/vertical_counter.v"
click node_vga_top "https://github.com/omarmongy/vga/blob/main/src/VGA_top.v"
click node_vga_controller "https://github.com/omarmongy/vga/blob/main/src/VGA_controller.v"
click node_memory_rom "https://github.com/omarmongy/vga/blob/main/src/memory_rom.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_pll,node_horizontal_counter,node_vertical_counter toneBlue
class node_vga_top,node_vga_controller toneAmber
class node_memory_rom toneMint
class node_fpga_clock,node_monitor toneIndigo
```

## Components

### Clock and Timing

- [10 MHz PLL](https://github.com/omarmongy/vga/blob/main/src/PLL_clk10MHz.v): `src/PLL_clk10MHz.v`
- [Horizontal Counter](https://github.com/omarmongy/vga/blob/main/src/horizontal_counter.v): `src/horizontal_counter.v`
- [Vertical Counter](https://github.com/omarmongy/vga/blob/main/src/vertical_counter.v): `src/vertical_counter.v`

### VGA Display

- [VGA Top](https://github.com/omarmongy/vga/blob/main/src/VGA_top.v): `src/VGA_top.v`
- [VGA Controller](https://github.com/omarmongy/vga/blob/main/src/VGA_controller.v): `src/VGA_controller.v`

### Image Memory

- [Single-Port ROM](https://github.com/omarmongy/vga/blob/main/src/memory_rom.v): `src/memory_rom.v`

### Other components

- **FPGA Clock**
- **VGA Monitor**

## Connections

- FPGA Clock → 10 MHz PLL: clocks (evidence: `README.md`)
- Horizontal Counter → Vertical Counter: enables at line end (evidence: `README.md`)
- Horizontal Counter → VGA Controller: timing for (evidence: `README.md`)
- Vertical Counter → VGA Controller: timing for (evidence: `README.md`)
- VGA Controller → VGA Monitor: outputs video signals (evidence: `README.md`)
