Clock-domain crossing / FPGA / ASIC

Asynchronous FIFO and CDC Guide

An asynchronous FIFO moves ordered data between unrelated clocks by keeping the memory local while synchronizing pointer information across domains. The difficult part is not the RAM—it is representing multi-bit pointer state safely, comparing synchronized pointers correctly and making reset behavior deterministic in both domains.

Implementation-first: use this guide to review the design rules, then solve the linked HDLForge problems without looking at a solution first.

Core design rules

Implementation path

Verification checklist

Useful RTL / verification pattern

// Binary to Gray
gray = binary ^ (binary >> 1);
// Cross Gray pointers through synchronizer flops, not raw binary counters.

Practice with executable problems

RTL Design · MediumBinary to Gray Counter

Build a parameterized binary counter and expose its Gray-code representation.

RTL Design · MediumAsynchronous-Assert Reset Synchronizer

Create a two-flop reset synchronizer with asynchronous assertion and synchronous deassertion.

FPGA · HardToggle-Based Pulse Synchronizer

Transfer a one-cycle pulse between unrelated clock domains using a toggle synchronizer.

RTL Design · HardSynchronous FIFO

Implement a synchronous parameterized FIFO with ready/valid-style enqueue and dequeue controls.

RTL Design · MediumSimple Dual-Port RAM

Infer a small synchronous-write, asynchronous-read dual-port memory.

Turn it into a project

ProjectCDC-Safe Asynchronous FIFOProjectFPGA Packet Parser and Statistics Engine