Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Find the unpaired fault ID

Hardware interview practice

Find the unpaired fault ID

EasyStreaming RTLSystemVerilog

Consume a framed stream in which every fault ID appears exactly twice except one ID that appears once, then return the unpaired ID.

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 →
Reviewed example

Work through one case

Input
accepted fault IDs=[5,2,5,2,7], last asserted with 7
Expected output
result_id=7

Pairwise IDs cancel under XOR and the final accepted unpaired zero-capable accumulator result is held until consumed.

What to cover

Requirements

  1. Change the accumulator only when fault_valid and fault_ready are both asserted.
  2. Include the accepted final item in the result when fault_last is asserted.
  3. Support an unpaired ID of zero.
  4. Hold result_id and result_valid stable during result backpressure.
asic.fyi · Learn silicon end to end.info@asic.fyi