VERILOG2145: Duplicated items in case statement should be removed

Summary

Count: 1

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

Description

A case statement contains more than one item with the same value. Case items are evaluated and selected in order and so the second one will never be matched.

Noncompliant code example

module fly;
  int i;
  initial begin
    case (i)
      1, 2:;
      3, 1:;
      default;
    endcase
  end
endmodule

Compliant solution

module fly;
  int i;
  initial begin
    case (i)
      1, 2:;
      3:;
      default;
    endcase
  end
endmodule

Parameters

No parameters.