Timing analysis and CDC

In a 16-word-deep asynchronous FIFO with 5-bit Gray code pointers, what is the correct condition for detecting full on the write side?

  1. AThe top 2 bits of the write pointer and the synchronized read pointer are each opposite, and the lower 3 bits match
  2. BAll 5 bits of the write pointer and the synchronized read pointer match
  3. COnly the MSB of the write pointer and the synchronized read pointer is opposite, and all lower 4 bits match
Show answer and explanation

Answer: A. The top 2 bits of the write pointer and the synchronized read pointer are each opposite, and the lower 3 bits match

In binary, full is the state where the write pointer is exactly 16 ahead of the read pointer, differing only in the MSB. Converted to Gray code, the MSB is still inverted, the second bit, formed by XOR with the MSB, is inverted along with it, and the lower 3 bits are the same. For example, if the read pointer is 00000, the write pointer when full is 11000. Only the MSB being opposite is the condition for binary pointers, and all 5 bits matching is the condition for empty.

Practice this topic Back to topic

Books on Timing analysis and CDC Ad

As an Amazon Associate I earn from qualifying purchases.

More Timing analysis and CDC questions

  1. In an asynchronous FIFO, the other side's pointer is used after synchronization, so the pointer value seen is 2–3 cycles stale. What effect does this delay have on full/empty detection?
  2. In an asynchronous FIFO with a 100 MHz write side and an 80 MHz read side, the write side writes a 100-word burst at one word per cycle and the read side reads one word per cycle. There is ample idle time between bursts. What is the minimum depth needed to avoid overflow (ignore synchronization delay)?
  3. The write side writes a 120-word burst at one word per cycle at 200 MHz. The read side, on a 150 MHz clock, reads one word in only 2 out of every 3 cycles. What is the minimum depth needed to avoid overflow (ignore synchronization delay)?
  4. The write side runs at 250 MHz and the read side at 200 MHz, both transferring one word per cycle. What is the minimum calculated depth for a FIFO receiving a 64-word burst (ignore synchronization delay and round up fractions)?
  5. Which is the correct structure of a reset synchronizer that generates, from an active-low external reset, an internal reset that is "asserted asynchronously and deasserted synchronously"?