CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

Asynchronous FIFO Empty Flag Timing

HardLogic CircuitTiming Diagram

An asynchronous FIFO empty flag EMPTY is generated in the read clock domain to prevent underflow. The flag evaluates to HIGH when the read pointer R_PTR equals the synchronized write pointer. The write pointer W_PTR crosses into the read domain through a two-stage flip-flop synchronizer clocked on the positive edge of R_CLK.

Four signals are shown: R_CLK (clock, period 2), W_PTR (input from write domain), R_PTR (input from read domain), and EMPTY (output). Assume both synchronizer flip-flops are initialized to the value of W_PTR at step 0.

Trace EMPTY across all 16 time steps.

Constraints

  • The synchronizer flip-flops update only on the LOW-to-HIGH transition of R_CLK.
  • EMPTY is a combinational output that updates immediately when R_PTR or the second synchronizer stage changes.

Topics

FIFOClock Domain CrossingSynchronization

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks