Codiode

Handshake Deadlock Due to Early Reset

HardLogic CircuitDebug

A valid-acknowledge handshake protocol transfers data reliably across asynchronous clock boundaries. The source controller asserts req_out when req_in is high and waits for ack_in to go high before returning to idle. If the destination domain resets during a transaction, the source controller must abort the transaction to prevent a deadlock.

Expected behavior:

Current State req_in ack_in rst_dst Next State req_out
IDLE 0 X X IDLE 0
IDLE 1 X X WAIT_ACK 1
WAIT_ACK X 0 0 WAIT_ACK 1
WAIT_ACK X 1 0 IDLE 0
WAIT_ACK X X 1 IDLE 0

Simulation shows req_out = 1 indefinitely when rst_dst = 1 is applied during an active request with ack_in = 0. The source domain is stuck in the WAIT_ACK state.

Inspect the circuit and correct the fault.

Constraints

  • Do not alter the normal handshake transition logic.
  • The FSM must return to the IDLE state immediately on the next clock edge when rst_dst is asserted.
  • Assume all inputs are properly synchronized to the source clock domain.

Topics

FSMCDCProtocolHandshake

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.

Part of Clocking and Synchronization

Problem 80 of 85 in the Clocking and Synchronization track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.