Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Closed-loop pulse synchronizer

Hardware interview practice

Closed-loop pulse synchronizer

MediumClock Domain CrossingSystemVerilog

A one-cycle command pulse must cross unrelated clocks without loss, and the source may wait while one command is in flight. Implement a toggle-and-acknowledge synchronizer with source busy.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

input logic src_clk, src_rst_n, src_pulse;
output logic src_busy;
input logic dst_clk, dst_rst_n;
output logic dst_pulse;
Reviewed example

Work through one case

Input
One src_pulse while src_busy=0; destination clocks at an unrelated rate
Expected output
Exactly one dst_pulse; src_busy clears only after acknowledgement returns

The toggle persists across arbitrary phase alignment, and busy prevents a second event from overwriting it.

What to cover

Requirements

  1. When src_pulse is sampled while src_busy is 0, toggle a source request bit; ignore or flag any src_pulse sampled while busy is 1.
  2. Synchronize the request through two destination flops and emit dst_pulse for exactly one destination cycle when the synchronized toggle changes.
  3. Return the observed toggle through a two-flop acknowledgement synchronizer; src_busy is 1 while request and synchronized acknowledgement differ.
  4. Both active-low resets are asserted together for at least two cycles of both clocks and initialize request, acknowledgement, history, busy, and dst_pulse to zero.
Continue practicing

Related questions

Clock Domain CrossingChoose a safe clock-domain crossing strategy→Clock Domain CrossingGenerate and synchronize a Gray-code counter→Clock Domain CrossingBound the promise of a two-flop synchronizer→
asic.fyi · Learn silicon end to end.info@asic.fyi