1. 程式人生 > >Tips: Illegal rand variable type

Tips: Illegal rand variable type

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.

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.