Hardware interview practice
Monitor an independently stalled binary adder
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.
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 beatExpected output
expected sum bits=[0,0,1] with last only on the third accepted bit3+1=4 requires the final carry bit; independent operand handshakes and the output stall do not advance any unsampled index.
What to cover
Requirements
- 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.
- Pair completed A and B frames in order and predict max(length A, length B) bits plus a final bit only when carry remains.
- Compare sum bits only on accepted output transfers and require sum_last exactly on the final expected bit.
- Reject overlength, nested, or next-frame traffic while the base DUT still owns a pair.
- Flush partial operands and expectations on reset and require stalled output data and framing to remain stable.
