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

Debugging FIFO Pointer Corruption

HardLogic CircuitDebug

A FIFO write pointer controller calculates the next pointer address to manage data ingestion. The next pointer must increment only on a valid write request when the buffer is not full.

Expected behavior:

| wr_en | full | p1 | p0 | n1 | n0 | |---------|--------|------|------|------|------| | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 0 | 1 | | 0 | 0 | 1 | 0 | 1 | 0 | | 0 | 0 | 1 | 1 | 1 | 1 | | 0 | 1 | 0 | 0 | 0 | 0 | | 0 | 1 | 0 | 1 | 0 | 1 | | 0 | 1 | 1 | 0 | 1 | 0 | | 0 | 1 | 1 | 1 | 1 | 1 | | 1 | 0 | 0 | 0 | 0 | 1 | | 1 | 0 | 0 | 1 | 1 | 0 | | 1 | 0 | 1 | 0 | 1 | 1 | | 1 | 0 | 1 | 1 | 0 | 0 | | 1 | 1 | 0 | 0 | 0 | 0 | | 1 | 1 | 0 | 1 | 0 | 1 | | 1 | 1 | 1 | 0 | 1 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 |

System level testing reveals memory corruption during burst writes. Simulation shows n1 = 0 and n0 = 1 for inputs wr_en = 1, full = 1, p1 = 0, and p0 = 0. The pointer increments despite the full flag being asserted. Inspect the circuit and correct the fault.

Constraints

  • Do not alter the base incrementer logic structure.
  • Add or replace gates only in the control path to fix the overflow condition.

Topics

fifocombinational-logicdebugpointer-logic

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

  • Debug Register File Structural HazardMedium
  • Debugging Memory Inference FailuresMedium
  • Debugging Read During Write CollisionMedium
  • Debugging ROM Latch InferenceEasy
  • Full versus Empty AmbiguityMedium
  • Debugging Stack Pointer Off By OneMedium

Browse all problems · Learning tracks