Hardware interview practice
Spot an unintended latch
An `always_comb` block assigns `y = a` only when `enable` is 1 and has no assignment to `y` when `enable` is 0. What behavior does this incomplete assignment request?
Choose one
Answer choices
- A. SystemVerilog automatically drives `y` to 0 when `enable` is 0, so no storage is needed.
- B. `y` becomes high impedance whenever `enable` is 0 because procedural assignments release the signal.
- C. `y` must retain its previous value when `enable` is 0, which requires storage and violates the intended combinational behavior.
- D. The block infers a flip-flop that updates only on the next positive clock edge.
