VERILOG2143: A case statement with an enum type condition should cover every enumerand, unless there is a ‘default’ label
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| HIGH | - | - | Intentionality | Complete | 10min | synthesis, vscode, linter, simulation |
Description
Noncompliant code example
module fly;
enum {A, B} e;
initial begin
case (e)
A: ;
endcase
end
endmodule
Compliant solution
module fly;
enum {A, B} e;
initial begin
case (e)
A: ;
B: ;
endcase
end
endmodule
Related rules
A case statement with an enum type condition does not include items that cover every enumerand. Note that this warning
will not be issued if there is a default label.
Parameters
No parameters.