= Constant Declarations
id
Use
A constant declaration defines constants used in a module.
The ending semicolon is required after each declaration.
Constants are useful when a value is repeated many times in a module,
especially when the value may be changed during the design process. Rather than
changing the value throughout the module, the value can be changed once in the
declaration of the constant.
Constant declarations may not be self-referencing; for example:
D pin 6; " see next line
Using Intermediate Expressions
Note: The equal sign (=) used for constant declarations in the Declarations
section is also used for equations in the Equations section. See Operators.
The identifiers on the left side of the equals sign are assigned the values
listed on the right side. There is a one-to-one correspondence between the
identifiers and the listed expressions. There must be one expression for each
identifier.
b = a;
Y = 'Bc' ; " Y = + H4263 ;
X =.X.; " X means 'don't care'
ADDR = [1,0,15]; " ADDR is a set with 3 elements
A,B,C = 5,[1,0],6; " 3 constants declared here
E = [5 * 7,D]; " signal names can be included
G = [1,2]+[3,4]; " set operations are legal
A = B & C; " operations on identifiers are valid
A = [!B,C]; " set and identifiers on right
See Also