# subhan-razzaq/pong-fpga architecture

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

- Interactive diagram: https://gitdiagram.com/subhan-razzaq/pong-fpga
- Repository: https://github.com/subhan-razzaq/pong-fpga

## Overview

This repository implements a Pong design in Verilog, apparently intended for an FPGA board. The RTL filenames indicate gameplay, player controls, VGA video, and seven-segment display logic. The README provides no workflow or module relationships, and no source excerpts were supplied, so the diagram groups the apparent responsibilities without asserting connections or call/data-flow relationships.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Game Logic"]
  node_pong_top["Pong Top<br/>[pong_top.v]"]
  node_pong_game["Game State<br/>[pong_game.v]"]
  node_ball_ctrl["Ball Control<br/>[ball_ctrl.v]"]
  node_clk_en["Clock Enable<br/>[clk_en.v]"]
end

subgraph group_controls["Player Controls"]
  node_paddle_ctrl["Paddle Control<br/>[paddle_ctrl.v]"]
  node_debounce["Input Debounce<br/>[debounce.v]"]
end

subgraph group_video["VGA Video"]
  node_vga_params["VGA Parameters<br/>[vga_params.vh]"]
  node_vga_sync_porch["VGA Porch Sync<br/>[vga_sync_porch.v]"]
  node_vga_sync_pulses["VGA Sync Pulses<br/>[vga_sync_pulses.v]"]
  node_vga_sync_to_count["VGA Counters"]
  node_test_pattern["Test Pattern<br/>[test_pattern.v]"]
end

subgraph group_display["Seven-Segment Display"]
  node_seven_seg_decoder["Digit Decoder"]
  node_seven_seg_mux["Display Multiplexer<br/>[seven_seg_mux.v]"]
end

click node_pong_top "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/pong_top.v"
click node_pong_game "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/pong_game.v"
click node_ball_ctrl "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/ball_ctrl.v"
click node_clk_en "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/clk_en.v"
click node_paddle_ctrl "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/paddle_ctrl.v"
click node_debounce "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/debounce.v"
click node_vga_params "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_params.vh"
click node_vga_sync_porch "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_porch.v"
click node_vga_sync_pulses "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_pulses.v"
click node_vga_sync_to_count "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_to_count.v"
click node_test_pattern "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/test_pattern.v"
click node_seven_seg_decoder "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/seven_seg_decoder.v"
click node_seven_seg_mux "https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/seven_seg_mux.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_pong_top,node_pong_game,node_ball_ctrl,node_clk_en toneBlue
class node_paddle_ctrl,node_debounce toneAmber
class node_vga_params,node_vga_sync_porch,node_vga_sync_pulses,node_vga_sync_to_count,node_test_pattern toneMint
class node_seven_seg_decoder,node_seven_seg_mux toneRose
```

## Components

### Game Logic

- [Pong Top](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/pong_top.v): `rtl/pong_top.v`
- [Game State](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/pong_game.v): `rtl/pong_game.v`
- [Ball Control](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/ball_ctrl.v): `rtl/ball_ctrl.v`
- [Clock Enable](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/clk_en.v): `rtl/clk_en.v`

### Player Controls

- [Paddle Control](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/paddle_ctrl.v): `rtl/paddle_ctrl.v`
- [Input Debounce](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/debounce.v): `rtl/debounce.v`

### VGA Video

- [VGA Parameters](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_params.vh): `rtl/vga_params.vh`
- [VGA Porch Sync](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_porch.v): `rtl/vga_sync_porch.v`
- [VGA Sync Pulses](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_pulses.v): `rtl/vga_sync_pulses.v`
- [VGA Counters](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/vga_sync_to_count.v): `rtl/vga_sync_to_count.v`
- [Test Pattern](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/test_pattern.v): `rtl/test_pattern.v`

### Seven-Segment Display

- [Digit Decoder](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/seven_seg_decoder.v): `rtl/seven_seg_decoder.v`
- [Display Multiplexer](https://github.com/subhan-razzaq/pong-fpga/blob/main/rtl/seven_seg_mux.v): `rtl/seven_seg_mux.v`
