AXI4‑Stream FIFO
A parameterizable FIFO buffer for AXI4‑Stream interfaces, supporting backpressure, flow control, and optional packet‑level handling.
Useful in pipelines where rate adaptation, decoupling, or burst absorption is required.
1. Overview
Purpose
Provide temporary storage between AXI4‑Stream producer and consumer, enabling decoupling of timing and throughput.
Use Cases
- DSP pipelines
- decoupling between modules with different latencies
- burst absorption
- clock‑synchronous buffering
- flow‑control smoothing
2. Interface Description
2.1 Port List
| Signal | Direction | Width | Description. |
|---|---|---|---|
| s_axix_tdata | In | DATA_WIDTH | Input data dtream |
| s_axis_tvalid | In | 1 | Input data valid |
| s_axis_tready | Out | 1 | FIFO ready to accept data |
| s_axis_tlast | In | 1 | Packet boundary indicator (optional) |
| m_axis_tdata | Out | DATA_WIDTH | Output data stream |
| m_axis_tvalid | Out | 1 | Output data valid |
| m_axis_tready | In | 1 | Downsteram ready |
| m_axis_tlast | Out | 1 | Packet boundary indicator (optional) |
| clk | In | 1 | Clock |
| rst | In | 1 | Synchronous reset |
Timing & Handshake Behavior
- standard AXI4‑Stream valid/ready handshake
- backpressure applied when FIFO is full
- zero‑latency pass‑through when empty
- optional TLAST propagation
- throughput = 1 sample per cycle (when not stalled)
3. Parameters & Configurability
- DATA_WIDTH — width of the data bus
- DEPTH — number of FIFO entries
- USE_TLAST — enable/disable TLAST handling
- ALMOST_FULL_LEVEL — threshold for early backpressure
4. Internal Architecture
- circular buffer implemented with RAM or registers
- write pointer / read pointer
- occupancy counter
- optional TLAST side‑buffer
- combinational pass‑through when empty
5. Implementation Notes
- synchronous reset recommended
- DEPTH should be power‑of‑two for pointer wrapping
- TLAST requires parallel storage if enabled
- synthesis tools infer BRAM for large DEPTH
- avoid DEPTH=1 (degenerate case)
6. Verification Strategy
- constrained‑random stimulus
- backpressure scenarios
- burst tests
- TLAST propagation tests
- full/empty boundary conditions
- assertions on handshake protocol
7. Integration Guidelines
- ensure downstream module handles backpressure correctly
- set DEPTH based on worst‑case burst size
- align DATA_WIDTH with upstream/downstream modules
- TLAST must be enabled only if used in the pipeline
8. Revision History
| Version | Date | Author | Notes |
|---|---|---|---|
| 1.0 | 20260206 | Vincenzo | Initial Version |