VERILOG2094: An open range with constant bounds should not be reversed

Summary

Count: 1

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

Description

Noncompliant code example

class Fly;
  rand bit [4:0] a;
  constraint a_c {
    a dist { 16 :/ 1, [15:1] :/ 1}; // Noncompliant
  }
endclass

An open range with constant bounds is reversed (i.e. has a larger left-hand side compared to its right). Such a range will behave as if it is empty and therefore never be selected.

Parameters

No parameters.