Toggle Pulse Synchronizer
Passing a single-cycle control pulse from a high-speed interface to a slower core domain risks data loss if the pulse falls between slow clock edges. The toggle pulse synchronizer guarantees pulse capture across disparate clock boundaries without the latency penalty of a full request-acknowledge handshake.
Construct a circuit that captures a single-cycle pulse_in synchronized to clk_fast and reproduces it as a single-cycle pulse_out synchronized to clk_slow. The system must operate in three distinct stages:
- A toggle stage in the fast domain that flips its logical state every time
pulse_inis high during aclk_fastrising edge. - A dual flip-flop synchronizer that safely passes this toggled level into the slow domain on
clk_slowrising edges. - An edge detector in the slow domain that asserts
pulse_outfor exactly oneclk_slowcycle whenever the synchronized level changes state.
Constraints
- Use exactly two clock domains:
clk_fastfor the source stage andclk_slowfor the destination stages. - Implement a standard 2-stage flip-flop synchronizer in the destination domain.
- Use an XOR gate and a delay flip-flop for edge detection in the destination domain.
- Apply the asynchronous active-low reset
rst_nto all sequential elements.
Topics
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.