VHDL1065: Choices should not overlap

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Intentionality | Logical5minsynthesis, bug-finder, do254, do254-ss2, linty-ultra

Description

Choices overlaps hid functional issues because some branches cannot be reached. Choices overlaps should be checked at and fixed.

Noncompliant code example

X : in integer range 7 downto 0;
...
case X is
  when 0 =>
     Z <= A;
  when 0 to 6 => -- Noncompliant: '0' overlaps preceding when clause
     Z <= B;
  when 1 | 7 => -- Noncompliant: '1' overlaps preceding when clause
     Z <= C;
end case;

Compliant solution

X : in integer range 7 downto 0;
...
case X is
  when 0 =>
     Z <= A;
  when 1 to 6 =>
     Z <= B;
  when  7 =>
     Z <= C;
end case;

Parameters

No parameters.