VHDL029: ‘integer’, ‘natural’ and ‘positive’ declarations should have range constraint

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
LOW--Intentionality | Efficient10minsynthesis, vscode, linter, cnes, cnes-std-05900

Description

Noncompliant code example

signal s : integer; -- Noncompliant
subtype st is natural; -- Noncompliant
variable v : positive; -- Noncompliant
generic (
  a : integer; -- Noncompliant
);

Compliant solution

signal s : integer range 0 to 3;
subtype st is natural range 0 to 3;
variable v : positive range 1 to 3;
generic (
  a : integer range 0 to 3;
);

integer, natural and positive declarations should always be constrained by a range to optimize synthesis.

Parameters

Count: 1

ParameterValueDescription
excludeGenericsfalseSet to 'true' to not apply this rule on generics, set to 'false' otherwise.