Hardware interview practice
Distinguish a latch from a flip-flop
Block A uses `always_latch if (en) q_a <= d;`. Block B uses `always_ff @(posedge clk) q_b <= d;`. Which statement correctly describes the storage behavior?
Choose one
Answer choices
- A. A samples only when en falls, while B remains transparent for the entire high phase of clk.
- B. A is level-sensitive and can follow d while en is active; B samples d only at the rising clock edge.
- C. Both blocks are edge-triggered because nonblocking assignment is used in each block.
- D. A is combinational because it has no explicit clock, while B is the only block that stores state.
