RE: [sv-ec] A question about randomize and non-rand class handle members

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed Feb 22 2006 - 07:20:48 PST
No, only if the declaration of c1 was rand.

rand class1 c1;

See 13.3

> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
> William Paulsen
> Sent: Wednesday, February 22, 2006 5:23 AM
> To: sv-ec@eda.org
> Subject: [sv-ec] A question about randomize and non-rand class handle
> members
> 
> 
> Here's a question about randomization:
> 
> In this example, should c2.c1.i1 be randomized?  Ie, must randomize
> dereference all handle members in a class and solve all rand members
of
> those classes? (and also recurse)
> 
> Thanks,
> Bill Paulsen
> 
> 
> 
> module top;
> 
> class class1;
>   rand integer i1;
> endclass
> 
> class class2;
>   class1 c1;  // Note there's no rand qualifier
> endclass
> 
> integer r;
> class2 c2 = new;
> 
> initial begin
>   r = c2.randomize();
> end
> endmodule
Received on Wed Feb 22 07:20:57 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 22 2006 - 07:21:26 PST