Localparam

A localparam is a constant similar to a parameter.

Syntax:

localparam name = value;

Description:

A localparam is a constant that is similar to a parameter, but which cannot be modified with a defparam, or by the ordered or named parameter value assignment in a module instance statement.

Local parameters can be assigned to a constant expression containing a parameter that can be modified with the defparam, or by the ordered or named parameter value assignment.

Example:

parameter Width = 8;
localparam Depth = Width*12;
localparam Size = 16; 

See also:

Instantiation, Parameter