# VERILOG2077: "dist" constraint items should not be surrounded by parentheses ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
MEDIUM--Intentionality | Logical5minportability, synthesis, vscode, linter, simulation
``` ## Description ```{raw} html

Noncompliant code example

class Fly;
  rand bit a;
  rand bit [3:0] b;
  constraint cmd_c {
    a -> (b dist { 0 := 1, [1:15] := 1});
  }
endclass

Compliant solution

class Fly;
  rand bit a;
  rand bit [3:0] b;
  constraint cmd_c {
    a -> b dist { 0 := 1, [1:15] := 1};
  }
endclass

dist constraint items are not allowed to be surrounded by parentheses according to the SystemVerilog standard.

Even if some tools allow it, refrain from using this syntax to keep your code portable.

``` ## Parameters No parameters. ```{raw} html ```