VERILOG2146: Overlapping items in case statement should be avoided

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Intentionality | Logical10minsynthesis, vscode, linter, simulation

Description

A wildcard case statement contains overlapping items, which can be confusing since the overlapping value(s) will only ever match the first item in the list.

Noncompliant code example

module fly;
  logic [3:0] a;
  initial begin
    casez (a)
      4'b1011:;
      4'b101?:;
      default;
    endcase
  end
endmodule

Compliant solution

module fly;
  logic [3:0] a;
  initial begin
    casez (a)
      4'b1011:;
      4'b111?:;
      default;
    endcase
  end
endmodule

Parameters

No parameters.