Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Monitor an independently stalled binary adder

Hardware interview practice

Monitor an independently stalled binary adder

HardReference ModelsSystemVerilog

Verify a serial adder whose A and B operand frames handshake independently and whose least-significant-bit-first (LSB-first) sum frame can stall. Reconstruct accepted operands and check every accepted output bit and last marker.

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
A=3 arrives LSB-first as [1,1]; B=1 arrives independently as [1]; output ready stalls after its first beat
Expected output
expected sum bits=[0,0,1] with last only on the third accepted bit

3+1=4 requires the final carry bit; independent operand handshakes and the output stall do not advance any unsampled index.

What to cover

Requirements

  1. Advance each operand's bit index only on that channel's valid-ready handshake and close a frame only when its last bit is accepted.
  2. Pair completed A and B frames in order and predict max(length A, length B) bits plus a final bit only when carry remains.
  3. Compare sum bits only on accepted output transfers and require sum_last exactly on the final expected bit.
  4. Reject overlength, nested, or next-frame traffic while the base DUT still owns a pair.
  5. Flush partial operands and expectations on reset and require stalled output data and framing to remain stable.
Continue practicing

Related questions

Reference ModelsScoreboard variable-length bitmap ranges→Reference ModelsVerify unique zero-sum triplets→Reference ModelsMatch transactions in strict order→
asic.fyi · Learn silicon end to end.info@asic.fyi