# charan-yakasiri/fpga-multicamera-aggregator architecture

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

- Interactive diagram: https://gitdiagram.com/charan-yakasiri/fpga-multicamera-aggregator
- Repository: https://github.com/charan-yakasiri/fpga-multicamera-aggregator

## Overview

This FPGA IP aggregates a live HDMI camera and a DMA-fed video stream into a synchronized, aligned, arbitrated, glitch-free output. The documented workflow runs through camera input normalization, cross-clock synchronization, frame alignment, arbitration and multiplexing, then VDMA and HDMI output; the ARM processor supplies the second stream and accesses diagnostics over AXI-Lite. The graph also preserves the listed FIFO and statistics/register-bank modules. Source excerpts were unavailable, so relationships follow the README; internal connections not explicitly documented are omitted or marked unverified.

Main entry points: [`rtl/sync_unit.v`](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/sync_unit.v) (Cross-clock sync), [`rtl/frame_align_buffer.v`](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/frame_align_buffer.v) (Frame alignment), [`rtl/camera_input_interface.v`](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/camera_input_interface.v) (Camera interfaces), [`rtl/video_mux_2in.v`](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/video_mux_2in.v) (Video multiplexer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Video inputs"]
  node_hdmi_rx["HDMI receiver"]
  node_camera_if["Camera interfaces"]
end

subgraph group_pipeline["Video pipeline"]
  node_sync["Cross-clock sync<br/>[sync_unit.v]"]
  node_async_fifo["Async FIFO<br/>[async_fifo.v]"]
  node_frame_align["Frame alignment"]
  node_sync_fifo["Sync FIFO<br/>[sync_fifo.v]"]
  node_arbitration["Arbitration<br/>[arbitration_fsm.v]"]
  node_video_mux["Video multiplexer<br/>[video_mux_2in.v]"]
end

subgraph group_control["Control and diagnostics"]
  node_stats["Frame statistics"]
  node_reg_bank["AXI-Lite registers<br/>[axilite_reg_bank.v]"]
end

subgraph group_output["Video output"]
  node_vdma["VDMA"]
  node_hdmi_tx["HDMI transmitter"]
end

node_live_camera(("Live camera"))
node_dma_video(("DMA video stream"))
node_arm_ps(("ARM processor"))
node_display(("Display"))

node_live_camera -->|"feeds"| node_hdmi_rx
node_hdmi_rx -->|"provides video"| node_camera_if
node_dma_video -->|"feeds camera 2"| node_camera_if
node_arm_ps -->|"supplies frames"| node_dma_video
node_camera_if -->|"sends streams"| node_sync
node_sync -->|"sends synchronized video"| node_frame_align
node_frame_align -->|"provides aligned video"| node_video_mux
node_reg_bank -->|"controls"| node_arbitration
node_arbitration -->|"selects input"| node_video_mux
node_video_mux -->|"sends output"| node_vdma
node_vdma -->|"feeds"| node_hdmi_tx
node_hdmi_tx -->|"drives"| node_display
node_arm_ps -->|"reads diagnostics"| node_reg_bank
node_stats -.->|"reports statistics"| node_reg_bank
node_sync -.->|"may use"| node_async_fifo
node_frame_align -.->|"may use"| node_sync_fifo

click node_camera_if "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/camera_input_interface.v"
click node_sync "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/sync_unit.v"
click node_async_fifo "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/async_fifo.v"
click node_frame_align "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/frame_align_buffer.v"
click node_sync_fifo "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/sync_fifo.v"
click node_arbitration "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/arbitration_fsm.v"
click node_video_mux "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/video_mux_2in.v"
click node_stats "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/frame_stats_monitor.v"
click node_reg_bank "https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/axilite_reg_bank.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_hdmi_rx,node_camera_if toneBlue
class node_sync,node_async_fifo,node_frame_align,node_sync_fifo,node_arbitration,node_video_mux toneAmber
class node_stats,node_reg_bank toneMint
class node_vdma,node_hdmi_tx toneRose
class node_live_camera,node_dma_video,node_arm_ps,node_display toneIndigo
```

## Components

### Video inputs

- **HDMI receiver**
- [Camera interfaces](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/camera_input_interface.v): `rtl/camera_input_interface.v`

### Video pipeline

- [Cross-clock sync](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/sync_unit.v): `rtl/sync_unit.v`
- [Async FIFO](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/async_fifo.v): `rtl/async_fifo.v`
- [Frame alignment](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/frame_align_buffer.v): `rtl/frame_align_buffer.v`
- [Sync FIFO](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/sync_fifo.v): `rtl/sync_fifo.v`
- [Arbitration](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/arbitration_fsm.v): `rtl/arbitration_fsm.v`
- [Video multiplexer](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/video_mux_2in.v): `rtl/video_mux_2in.v`

### Control and diagnostics

- [Frame statistics](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/frame_stats_monitor.v): `rtl/frame_stats_monitor.v`
- [AXI-Lite registers](https://github.com/charan-yakasiri/fpga-multicamera-aggregator/blob/main/rtl/axilite_reg_bank.v): `rtl/axilite_reg_bank.v`

### Video output

- **VDMA**
- **HDMI transmitter**

### Other components

- **Live camera**
- **DMA video stream**
- **ARM processor**
- **Display**

## Connections

- Live camera → HDMI receiver: feeds (evidence: `README.md`)
- HDMI receiver → Camera interfaces: provides video (evidence: `README.md`)
- DMA video stream → Camera interfaces: feeds camera 2 (evidence: `README.md`)
- ARM processor → DMA video stream: supplies frames (evidence: `README.md`)
- Camera interfaces → Cross-clock sync: sends streams (evidence: `README.md`)
- Cross-clock sync → Frame alignment: sends synchronized video (evidence: `README.md`)
- Frame alignment → Video multiplexer: provides aligned video (evidence: `README.md`)
- AXI-Lite registers → Arbitration: controls (evidence: `README.md`)
- Arbitration → Video multiplexer: selects input (evidence: `README.md`)
- Video multiplexer → VDMA: sends output (evidence: `README.md`)
- VDMA → HDMI transmitter: feeds (evidence: `README.md`)
- HDMI transmitter → Display: drives (evidence: `README.md`)
- ARM processor → AXI-Lite registers: reads diagnostics (evidence: `README.md`)
- Frame statistics → AXI-Lite registers: reports statistics
- Cross-clock sync → Async FIFO: may use
- Frame alignment → Sync FIFO: may use
