VERILOG2046: Enum members that are specified as ranges should only define ranges with integer literals

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Consistency | Conventional10minportability, synthesis, vscode, linter, simulation

Description

Noncompliant code example

localparam int i = 1;
typedef enum { A[i:3] } e_t;

Compliant solution

typedef enum { A[1:3] } e_t;

An enum member that is specified as a range should only define this range with integer literals (constant expressions are not allowed by the standard).

Parameters

No parameters.