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

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.

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
  • Reconvergence of Individually Synchronized BitsHard
  • FIFO Empty Logic Evaluated in Wrong DomainMedium
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks