Most e expressions have an explicit data type. These data types are described in the following sections:
----------------------------------------------------------------
Name Description Example
----------------------------------------------------------------
bool Boolean value: TRUE or FALSE valid : bool;
int Integer, default 32 bits length: int;
uint Unsigned integer,default 32 bits addr : uint(bits:8);
bit 1-bit unsigned integer valid : bit;
byte 8-bit unsigned integer data : byte;
time 64-bit unsigned integer delay : time;
string String of ASCII characters prompt: string;
list Resizable payload:list of byte;
----------------------------------------------------------------
Enumerated Types
You can define the valid values for a variable or field as a list of symbolic constants. These are referred to as enumerated types.
Syntax: type enum-type: [name1[=exp],â~@¦][(bits|bytes: width-exp)];
EXAMPLE
type priority_t:[high, medium, low]; type packet_kind_t:[good, bad];
By default, the new enumerated type is 32 bits, but it can be sized according to the number of bits required.
EXAMPLE: type direction_t:[READ, WRITE](bits:1);
Default first enum value is 0. Subsequent enum values are increment by 1. This internal value is used for comparisons(with strong type matching maintained).
Values can be explicitly assigned with the syntax: