Tips for vcs compile
The rand variable ‘half_period’ must be an integral type, an enum type, a
packed struct, or of type ‘bit’.
Change the type of the random variable ‘half_period’ to an integral, bit,
packed struct, or enum type or remove the ‘rand’ qualifier.
The variable half_period is of type ‘real’. Variables with type ‘real’ are
not yet supported in constraint blocks.
Change the type of the variable or remove it from the constraint expression.
Integral type
The term integral is used throughout this standard to refer to the data types that can represent a single basic integer data type, packed array, packed structure, packed union, enum variable, or time variable.