CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Memory Design

Full versus Empty Ambiguity

MediumLogic CircuitAnalyze

Hardware FIFOs decouple clock domains and buffer data streams between producers and consumers. A synchronous FIFO with a depth of 16 uses 4-bit pointers wr_ptr and rd_ptr. The design asserts empty when wr_ptr == rd_ptr.

The provided trace shows a sequence of 16 consecutive writes without any reads, causing wr_ptr to wrap around from 4'b1111 to 4'b0000. At this exact cycle, rd_ptr remains at 4'b0000. Analyze the pointer behavior and determine the root cause of the state ambiguity.

Constraints

  • FIFO depth is exactly 16 words.
  • The memory array uses 4-bit address lines.
  • Both pointers are initialized to 0 on reset.

Topics

fifopointersrtlstate-ambiguity

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

  • Debugging FIFO Pointer CorruptionHard
  • Debug Register File Structural HazardMedium
  • Debugging Memory Inference FailuresMedium
  • Debugging Read During Write CollisionMedium
  • Debugging ROM Latch InferenceEasy
  • Debugging Stack Pointer Off By OneMedium

Browse all problems · Learning tracks