Toggle-Based Pulse Synchronizer
Transfer a one-cycle pulse between unrelated clock domains using a toggle synchronizer.
Task
Toggle a source-domain bit on each src_pulse, synchronize it through two destination flops, and generate one dst_pulse when the synchronized toggle changes.
Examples
- one src pulse -> one dst pulse
- dst pulse width is exactly one dst clock
Constraints
- Use two destination synchronizer stages.
- Active-high resets in both domains.
- Assume source pulses are spaced far enough apart to be observed.
What this problem is testing
FPGA problems test whether logically correct RTL will behave predictably in hardware, including clock-domain boundaries, reset release, noisy inputs, inferred resources, and timing.
Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.
Verification plan
- Separate functional checks from implementation concerns such as CDC and timing.
- Test asynchronous or noisy inputs with realistic transitions when relevant.
- Confirm reset assertion and release do not create unintended pulses or state.
- Review whether the RTL infers the intended FPGA resource.
Edge cases worth testing
- A transition close to the destination clock edge.
- A pulse shorter than a destination clock period.
Common mistakes
- Treating an asynchronous input as synchronous.
- Using a simple synchronizer for a pulse or multi-bit bus when a different CDC structure is needed.
- Generating clocks in ordinary RTL when a clock enable would be safer.
- Ignoring implementation timing because behavioral simulation passes.
Interview follow-up questions
- What hardware-specific issue could make a simulation-only solution unreliable?
- What timing or CDC check would you review before sign-off?
Concepts to review
cdc, pulse, synchronizer, fpga
Open Toggle-Based Pulse Synchronizer in the HDLForge interactive editor.
Related problems
- Button Debouncer — Easy
- Traffic Light FSM — Easy
- Asynchronous-Assert Reset Synchronizer — Medium
- Binary to Gray Counter — Medium
- Parameterized PWM Generator — Easy
Explore the FPGA Design Practice & Interview Preparation hub.