**Odd One Out: Unintentional Latch Causes** Which of the following coding…
**Odd One Out: Unintentional Latch Causes** Which of the following coding practices does **NOT** cause an unwanted latch to be inferred in a combinational block?
- Missing default branch in a case statement where not all input states are enumerated.
- An if statement missing an else branch while assigning a signal.
- Assigning a signal conditionally inside a clocked always @(posedge clk) block without an else statement.
- Reading a variable in a combinational block that is assigned in only some execution paths.
Correct answer
C. Assigning a signal conditionally inside a clocked always @(posedge clk) block without an else statement.
Explanation
Omitting an else branch inside a clocked sequential block ( always @(posedge clk) ) infers a flip-flop with an enable condition ( clock-enable ), which is standard sequential behavior. In combinational blocks ( always @* ), incomplete conditionals infer transparent latches.