The random constraints
are built on top of an object oriented class system data abstraction that models the data
to be randomized as objects that contain random variables and user-defined
constraints. The constraints determine the legal values that can be assigned to
the random variables. Objects are ideal for representing complex aggregate data
types and protocols such as Ethernet packets.
Changes are made in A.1.8 that correctly defines rand and randc syntax. Please use here.
Editor’s Note: I could not find this syntax in the BNF.
initial
begin
Foo foo = new();
Bar bar = new();
integer
z;
void = void’foo.randomize();
// z = $random;
void = void’bar.randomize();
end
Editor’s Note: Is “void = “ legal? See
Section 10.3.2