Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Quarantine traffic after peer reset

Hardware interview practice

Quarantine traffic after peer reset

MediumCDC and ResetSystemVerilog

A local interface sees an already synchronized peer_reset_ok signal. It must wait for two consecutive high samples before accepting traffic after any peer reset. Implement the local reset-quarantine logic in SystemVerilog.

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 clk, rst_n, peer_reset_ok;
input logic in_valid;
output logic in_ready, quarantined;
Reviewed example

Work through one case

Input
After local reset, sample peer_reset_ok high on two consecutive rising edges.
Expected output
in_ready remains 0 after the first high sample and becomes 1 after the second.

The quarantine releases only when the two-sample recovery counter observes uninterrupted peer readiness.

What to cover

Requirements

  1. When rst_n=0 at an edge, set quarantined=1, clear the high-sample count, and drive in_ready=0.
  2. While peer_reset_ok=0, remain quarantined and clear the high-sample count.
  3. Leave quarantine only after peer_reset_ok has been high on two consecutive rising edges.
  4. Set in_ready=!quarantined. During a stall (in_valid && !in_ready), accept nothing; in_valid cannot change quarantine state.
Continue practicing

Related questions

CDC and ResetCheck reset-bounded delivery of asynchronous events→CDC and ResetFlag unknown outputs after reset→CDC and ResetOne-outstanding-event CDC handshake→
asic.fyi · Learn silicon end to end.info@asic.fyi