VERILOG027: “defparam” should not be used

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
--MEDIUMConsistency | Conventional5minsynthesis, vscode, lowrisc, simulation, linter, deprecated

Description

Articles & blog posts

Noncompliant code example

module fly;
  defparam my_dream.size = 64;
  dream my_dream;
endmodule : fly

Compliant solution

module fly;
  dream #(.size(64)) my_dream;
endmodule : fly

defparam statement is on the list of deprecation candidates in IEEE 1800-2017 standard (section C.4.1).

The practice of using defparam statements is highly discouraged. Engineers are encouraged to take advantage of the explicit inline parameter redefinition capability.

Parameter redefinition during instantiation of a module (using the # character) should be used instead. Moreover, named parameters are recommended.

Parameters

No parameters.