Debugging FIFO Pointer Corruption
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
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.
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.