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

Circular Wait in Handshake Protocol

HardLogic CircuitDebug

A DMA controller uses a valid-ready handshake protocol to transfer data to memory. The controller must assert valid when it has data, and the memory asserts ready when it can accept it.

Expected behavior:

When start is asserted, the DMA controller transitions to the transfer state and asserts valid. The memory responds by asserting ready. A successful transfer occurs when both valid and ready are high, after which the DMA asserts done.

Simulation shows a system deadlock on the first transfer attempt. When start is set to 1, both valid and ready remain 0 indefinitely, and done is never asserted. The DMA controller is incorrectly waiting for ready to be high before asserting valid, while the memory waits for valid to be high before asserting ready.

Inspect the circuit and correct the fault.

Constraints

  • Do not change the memory controller logic.
  • Modify only the DMA state machine logic to break the circular dependency.

Topics

state-machinehandshakedeadlockdma

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