Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Cross commands across independent resets

Hardware interview practice

Cross commands across independent resets

HardCDC and ResetSystemVerilog

A source sends one-bit command events to an unrelated destination clock. Either domain may request reset independently; either request restarts both endpoints of this one logical channel. Traffic in flight may be discarded during reset, but after both domains advertise ready there must be no lost, duplicated, or ghost command. Implement a reset-safe request/acknowledge toggle protocol and enable sequence.

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

src_clk, src_rst_n, src_cmd_valid, src_cmd_ready
dst_clk, dst_rst_n, dst_cmd_pulse
src_ready_local, dst_ready_local
synchronized ready, request, and acknowledge toggles
Reviewed example

Work through one case

Input
Both domains are active, then dst_rst_n falls while request and acknowledge differ; no new command is presented until recovery completes
Expected output
No pulse is emitted during recovery; after both ready signals return, one newly accepted command produces exactly one destination pulse

The destination reset request asynchronously restarts both channel endpoints, so their toggles cannot straddle different epochs. Each side then releases on its own clock and completes the low/high ready rendezvous before a mismatch may represent a command.

What to cover

Requirements

  1. Form protocol_rst_n=src_rst_n&&dst_rst_n. Assert this channel reset asynchronously into both endpoints, release it synchronously in each clock domain, and drive both local-ready outputs low; either raw reset therefore starts one shared disabled epoch and discards any in-flight command.
  2. Allow a source command only when both ready indications are high and request equals synchronized acknowledge; toggle request exactly once on acceptance.
  3. The destination emits one pulse when synchronized request differs from acknowledge, then copies request into acknowledge.
  4. During a disabled epoch accept no command, suppress pulses, re-baseline acknowledge to request, and resume only after the destination-then-source low-observation and ready handshake completes.
Continue practicing

Related questions

CDC and ResetOne-outstanding-event CDC handshake→CDC and ResetBridge a sticky memory-error alarm across clocks→CDC and ResetSynchronize and filter an asynchronous alarm→
asic.fyi · Learn silicon end to end.info@asic.fyi