Integer Variable Type
XJEase integer variables have the following properties:
- They may be of any width, from one bit upward.
- The width of the variable will always grow so that it can hold a value that is assigned to it.
- They are always unsigned.
The width of an integer can be defined when it is declared, using the WIDTH keyword. This will limit the range of values that may be initially assigned to the variable, but it has no effect beyond that point: the variable can grow wider if larger values are assigned.
Declaring an integer
To declare an integer, use the following syntax:
// This will define a 128-bit integer. INT integerVariable1 WIDTH 128; // This will define two integers, each with the default width of 1 bit. INT integerVariable1, integerVariable2; // Integers can also be assigned values at definition: // This defines a 4-bit integer with the value 10 assigned. INT assignedIntVal := 10; // This defines a 128-bit integer with the hex value 0x2332 assigned. INT wideIntegerVariable WIDTH 128 := 0x2332;
XJTAG v4.2.5
