Constants

Constant string and integer variables can be defined by adding the keyword 'CONST' to the declaration. A constant can be used like a variable, but cannot have its value changed after it has been declared. For example:

CONST INT BUS_WIDTH := 32;
CONST STRING FILE_NAME := "Eprom.img"

Constants can be used wherever an integer or string literal can be used. The scoping rules are the same for constants as they are for other variables (see Scope of Variables).

Predefined Constants

These are the built-in constants which are defined globally (see Read-only Built-ins for further built-in definitions):

CIRCUIT_NAME
The circuit name - this constant is valid in the whole system (including the project file)
XJTAG_VERSION
The version of XJTAG that is currently running.
TRUE
The logical TRUE value (equivalent to 1).
FALSE
The logical FALSE value (equivalent to 0).