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

Two Phase Handshake Synchronizer

HardLogic CircuitBuild

High-throughput clock domain crossing (CDC) interfaces rely on two-phase handshakes to maximize bandwidth. Unlike four-phase protocols that waste clock cycles returning to zero, two-phase protocols signal new events on every signal transition to double the throughput.

The circuit must synchronize incoming asynchronous toggle signals req_in and ack_in into the local clock domain. Route each input through a standard 2-flip-flop synchronizer to mitigate metastability. Detect both rising and falling edges on the synchronized signals. Assert req_valid for exactly one clock cycle when a transition is detected on the synchronized request line, and assert ack_valid for exactly one clock cycle when a transition is detected on the synchronized acknowledge line.

Constraints

  • Use only D flip-flops and basic combinational logic gates.
  • Implement a standard 2-flip-flop synchronizer for both input lines before edge detection.
  • All flip-flops must be clocked by the implicit system clock and cleared by the active-high rst signal.

Topics

CDCSynchronizationClocking

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