[sv-bc] Can randomize() be called in a constraint

From: Chris Spear <Chris.Spear_at_.....>
Date: Thu Nov 26 2009 - 09:43:43 PST
File this under "customers do the most amazing things". Is it legal to call the randomize function in a constraint? 

class A;
  rand int i;
  RandStuff stuff;
  constraint c { i == stuff.randomize(); }
endclass

This seems to violate the "no side effects" rule.  Not to mention that declaring "stuff" as rand would have done this automatically.

Thanks! 
Chris Spear 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Nov 26 09:44:52 2009

This archive was generated by hypermail 2.1.8 : Thu Nov 26 2009 - 09:45:42 PST