What is the purpose of the “case” statement in Verilog?
What is the purpose of the “case” statement in Verilog?
- To define a new module
- To specify simulation time
- To declare variables
- To implement conditional logic
Correct answer
D. To implement conditional logic
Explanation
case compares an expression against alternatives and executes the first matching branch, commonly for selection logic.