18.8 says,
"If the random variable is an object handle, only the mode of the variable is changed, not the mode of random variables within that object (see global constraints in 18.5.8)."
Shalom
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Daniel Mlynek
Sent: Friday, December 17, 2010 10:29 AM
To: sv-ec@eda.org
Cc: grzegorz.kunc@aldec.com.pl
Subject: [sv-ec] rand_mode called on a handle
IMO there is ambiguity in LRM about rand mode called on a handle nested inside class.
See below code:
class C;
rand int x;
endclass
class D;
rand C c;
task t;
c.rand_mode(0); //this turn off rand for c.x but do not change rand mode of c itself???
endtask
endclass
module top;
D d;
initial begin
d = new;
d.c = new;
d.c.rand_mode(0); //this should turn off rand for d.c.x???? and do not chanfe rand mode of d.c???
$display(d.c.x.rand_mode());
end
endmodule
The question is if we will call rand_mode on handle should we change rand_mode of of this handle or should we go recursively inside the handle and change rand_mode of its objects.
DANiel
-- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Dec 17 00:35:25 2010
This archive was generated by hypermail 2.1.8 : Fri Dec 17 2010 - 00:35:30 PST