Sign in on the Premium hub to save lesson progress. This lesson is open to read so the page is a complete article, not an empty login wall.
Open course In progress

Async FIFO from Scratch

Dual-clock FIFO design from first principles — why a FIFO exists, a complete sync FIFO, why binary pointers cannot cross clocks, Gray code, full/empty math, overflow/underflow, synthesizable RTL, waveforms, and a live visual lab. Lessons are complete articles you can read without a login wall. Sign in if you want progress saved.

1

What you will be able to do

By the last lesson you should be able to size a FIFO from a burst, write a gated sync FIFO in Verilog, explain why a binary pointer cannot cross clocks, convert bin2gray / gray2bin on a whiteboard, draw a dual-clock block diagram, write the empty and two-MSB full equations, reset both domains safely, and defend overflow vs stall in an interview.

This is a long-form engineering article series, not a two-paragraph chip glossary. Each lesson includes definitions, worked numbers, waveforms with unrelated clocks, RTL you can paste into the EcrioniX Verilog simulator, failure modes, and an FAQ.

2

Who this course is for

RTL students who have seen a FIFO symbol on a slide but never implemented pointers. Verification engineers who need a golden queue and SVA. FPGA designers instantiating a vendor FIFO who must still answer CDC questions. The sequence starts at rate matching — you do not need to already know Gray code.

3

How the course is structured

Module 1 is the problem (bursts, clocks). Module 2 solves it on one clock so full/empty are unambiguous. Module 3 shows the CDC bug with binary 7→8, then Gray and register order. Module 4 is the production async FIFO (architecture, flags, RTL, reset). Module 5 is a live 8-deep lab plus interview scripts.

Clocks in WaveDrom use independent period and phase: wr_clk is not a divided rd_clk.

Course progress
0 of 14 lessons complete
1
Why a FIFO exists
2 lessons · rate matching, sync vs async
▾
2
Sync FIFO from scratch
3 lessons · pointers, RTL, overflow/underflow
▾
3
Why binary pointers fail across clocks
3 lessons · multi-bit CDC, Gray, register order
▾
4
Async FIFO architecture & RTL
4 lessons · Cummings flags, dual-clock RTL, reset
▾
Q

Frequently asked questions

Is this async FIFO course free to read?

The lessons are published as complete technical articles. Sign in on the Premium hub if you want progress tracking. The Verilog simulator linked from each lesson is also free to use.

Is this the Cummings SNUG FIFO?

Yes in spirit: extra-MSB Gray pointers, 2FF synchronizers, empty by Gray equality in the read domain, full by inverting two Gray MSBs in the write domain, power-of-two depth, data in dual-port RAM.

Will this help with VLSI internships?

Yes. FIFO/CDC questions are standard. You will practice overflow vs stall, why not 2FF a bus, and the exact full/empty formulas.

Do I need two hardware boards?

No. The visual lab and the browser Verilog simulator use two software clocks with different periods.

🚧 In progress — more labs and review still coming. Simulator: /tools/verilog-simulator/