Ray,
in the case of the scope randomize function, do variables declared within a
class and which do not have the rand or randc qualifier get randomized?
class class1
rand int data;
int base;
rand int address;
end class;
class1 obj1 = new;
initial
begin
std::randomize(obj1);
end
Does base also get assigned random values?
An additional question is regarding the constraint which exist in the class
and the
constraint which may be provided in the std::randomize call.
Do the random values need to satisfy ALL the constraints?
Francoise
'
At 02:18 PM 9/16/2004 -0400, Ryan, Ray wrote:
>In general,
>
>The rand or randc qualifier can only be specified for
>variables declared in a class. When the built-in
>'randomize' method of the class is called, the
>variables with a rand or randc qualifier are assigned
>random values (also meeting any constraints).
>
>Any variable can be randomized by using the scope
>randomize function (std::randomize). The variables to
>be randomized are listed as parameters in the
>call to the scope randomize (eg std::randomize(a, b, c);).
>
>- Ray
>
> > -----Original Message-----
> > From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On
> > Behalf Of Francoise Martinolle
> > Sent: Thursday, September 16, 2004 10:07 AM
> > To: sv-ec@eda.org
> > Subject: [sv-ec] question about randomization
> >
> > I thought that variables declared with the rand or randc
> > qualifier could be randomized.
> > It seems that variables qualified with rand or randc and
> > declared as member of a class can be randomized.
> > Regular variables without qualifier declared inside a module
> > can also be randomized.
> > Is that correct?
> >
> >
> > Thanks
> > Francoise
> > '
> >
Received on Mon Sep 20 09:27:41 2004
This archive was generated by hypermail 2.1.8 : Mon Sep 20 2004 - 09:29:16 PDT