IP & SoC Verification · Debug & CoverageDid your interrupt test clear the wrong flag?
A chip sets two flags. One means transfer complete. The other means overflow. Firmware handles the completed transfer first. It clears the completion flag, and the test passes because that flag is now zero.
But is the overflow flag still set? Firmware still needs to handle it.
Both flags are write-one-to-clear. Writing 1 clears a flag. Writing 0 leaves it alone. Suppose both flags are set and no new events arrive during the check.
| What firmware writes | Completion flag | Overflow flag |
|---|
01 | Clears | Stays set ✓ |
11 | Clears | Clears too ✗ |
How could firmware write 11 by mistake? It reads both pending flags (11), sets the completion bit in that value, and writes it back. The completion bit was already 1, so the value is still 11. That clears both flags.
A simple test: Trigger both events, acknowledge completion, then check both flags. Completion should be 0 and overflow should still be 1.