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

From: William Paulsen <paulsen_at_.....>
Date: Wed Feb 22 2006 - 05:22:50 PST
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 05:22:55 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 22 2006 - 05:23:33 PST