VERILOG2147: Unreachable items in case statement should be removed
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| HIGH | - | - | Intentionality | Logical | 10min | synthesis, vscode, linter, simulation |
Description
A case item is unreachable because earlier wilcard items completely cover all of its possible values.
Noncompliant code example
module fly;
logic [2:0] a;
initial begin
casez (a)
3'b10?:;
3'b101:;
default;
endcase
end
endmodule
Compliant solution
module fly;
logic [2:0] a;
initial begin
casez (a)
3'b10?:;
3'b001:;
default;
endcase
end
endmodule
Parameters
No parameters.