RTL Design #49 · 2026-11-11 · Handshake CDC · Medium · about 20 min
A handshake that starts again too early
hs_xfer sends a byte from clock domain A to clock domain B with a four-phase handshake. A holds the byte and raises req; B sees it through a 2-flop synchronizer, takes the byte and sends back ack (the synchronized req); A sees ack through its own synchronizer and drops req; B drops ack once it sees req low.
sendwithbusylow starts a transfer:dinis captured and exactly onedvalidpulse (withdout) comes out on B.sendwhilebusyis ignored.- A transfer must complete before the next one starts, whatever the ratio of the two clocks.
Run sends four bytes back-to-back as soon as busy is low, with B slower than A. Some of them never arrive. Fix hs_xfer.sv.
Write and run your answer in the browser. The hidden tests check it, and it’s free.