# arjunpshetty/asynchronous-fifo architecture

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

- Interactive diagram: https://gitdiagram.com/arjunpshetty/asynchronous-fifo
- Repository: https://github.com/arjunpshetty/asynchronous-fifo

## Overview

This is a Verilog asynchronous FIFO for transferring data between independent write and read clock domains. The documented workflow is that a producer writes into the FIFO and a consumer reads from it; Gray-coded pointers and two-stage synchronization support safe clock-domain crossing, while full and empty flags describe FIFO state. The README documents these architectural responsibilities, but no RTL excerpts were supplied, so internal connections are limited to those it explicitly describes.

Main entry points: [`async_fifo.v`](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v) (Gray conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fifo_rtl["FIFO RTL"]
  node_write_domain["Write domain<br/>[async_fifo.v]"]
  node_binary_pointers["Binary pointers<br/>[async_fifo.v]"]
  node_gray_conversion["Gray conversion<br/>[async_fifo.v]"]
  node_pointer_sync["Two-FF sync<br/>[async_fifo.v]"]
  node_fifo_state["Full/empty flags<br/>[async_fifo.v]"]
  node_read_domain["Read domain<br/>[async_fifo.v]"]
end

node_producer(("Data producer"))
node_consumer(("Data consumer"))

node_producer -->|"writes data"| node_write_domain
node_write_domain -->|"transfers data"| node_read_domain
node_read_domain -->|"reads data"| node_consumer
node_binary_pointers -->|"converts to Gray"| node_gray_conversion
node_gray_conversion -->|"synchronizes pointers"| node_pointer_sync
node_gray_conversion -->|"converts to binary"| node_binary_pointers

click node_write_domain "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v"
click node_binary_pointers "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v"
click node_gray_conversion "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v"
click node_pointer_sync "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v"
click node_fifo_state "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v"
click node_read_domain "https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.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_write_domain,node_binary_pointers,node_gray_conversion,node_pointer_sync,node_fifo_state,node_read_domain toneBlue
class node_producer,node_consumer toneIndigo
```

## Components

### FIFO RTL

- [Write domain](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`
- [Binary pointers](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`
- [Gray conversion](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`
- [Two-FF sync](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`
- [Full/empty flags](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`
- [Read domain](https://github.com/arjunpshetty/asynchronous-fifo/blob/main/async_fifo.v): `async_fifo.v`

### Other components

- **Data producer**
- **Data consumer**

## Connections

- Data producer → Write domain: writes data (evidence: `README.md`)
- Write domain → Read domain: transfers data (evidence: `README.md`)
- Read domain → Data consumer: reads data (evidence: `README.md`)
- Binary pointers → Gray conversion: converts to Gray (evidence: `README.md`)
- Gray conversion → Two-FF sync: synchronizes pointers (evidence: `README.md`)
- Gray conversion → Binary pointers: converts to binary (evidence: `README.md`)
