RTL Design Patterns/FIFOs
FIFOs
Synchronous and asynchronous FIFOs, circular buffers, almost-full/empty flags.
- 1medium
Synchronous FIFO
A parameterized single-clock FIFO with full/empty flags, built with the classic extra-MSB-bit pointer trick and fall-through reads.
- 2hard
Asynchronous FIFO (Dual-Clock, Gray-Coded Pointers)
The canonical CDC data-transfer structure: a dual-clock FIFO with Gray-coded read/write pointers synchronized across the boundary through 2-flop synchronizers.
- 3medium
Circular Buffer (Overwrite-on-Full)
A ring buffer that overwrites the oldest entry when full instead of blocking writes — the key behavioral distinction from a FIFO.
- 4medium
FIFO with Almost-Full Flag
A FIFO variant that raises a programmable-threshold almost-full flag several entries before it is actually full, for early backpressure.
- 5medium
FIFO with Almost-Empty Flag
A FIFO variant that raises a programmable-threshold almost-empty flag when occupancy drops to a low-water mark, useful for prefetch/refill decisions.