An asynchronous FIFO between a write clock and a read clock occasionally reports empty while the writer is still active, stalling the reader for no reason. No traffic rule is violated and the data path checks out. This generic, illustrative scenario rehearses pointer-crossing diagnosis: the flags, the Gray assumptions, and the reset alignment the data path never shows.
Lesson | After it you can... |
|---|---|
State the underflow symptom and isolate it to the pointer crossing. | |
Walk the pointer path: Gray encoding, synchroniser depth, comparison placement, reset. | |
Name the fix and the regression guards that keep it fixed. |
The traps to avoid: debugging the data path only, waiving a Gray-code warning without transition proof, and fixing full and empty logic without reviewing reset alignment.
The data path moves payloads; only the pointer comparison produces the empty flag. A flag wrong while traffic is legal means the comparison saw a wrong pointer value.