VHDL164: Range direction in array definitions should always be the same

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
--LOWConsistency | Conventional2minsynthesis, vscode, cnes-std-06000, simulation, linter, cnes

Description

Noncompliant code example

With default useTo parameter value: true

architecture a of e is
  type my_type is array (3 downto 0) of std_logic;
begin
end;

Compliant solution

With default useTo parameter value: true

architecture a of e is
  type my_type is array (0 to 3) of std_logic;
begin
end;

Use different range direction in array definitions makes the code harder to read and understand. By default, using increasing index with to keyword is recommended.

Parameters

Count: 1

ParameterValueDescription
useTotrueSet to true to check range directions in array definitions are 'TO'. When set to false, range directions 'DOWNTO' are checked.