VERILOG2101: A static variable’s initializer expression should not refer to uninitialized variables, nets, ports, or modport members

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
MEDIUM--Intentionality | Logical10minsynthesis, vscode, simulation, linter

Description

Noncompliant code example

module fly(input i);
  logic j = i; // Noncompliant: Initializer for static variable 'j' refers to 'i' which will not have a value at initialization time
endmodule

A static variable's initializer expression refers to an uninitialized variable, a net, a port, or a modport member, which won't have a value assigned by the time the initializer runs. The variable therefore will always be initialized to the default value.

Parameters

No parameters.