[sv-ec] Constraint ordering with function calls

From: Chris Spear <Chris.Spear_at_.....>
Date: Mon Oct 13 2008 - 11:50:16 PDT
The 2005 and 2009 LRMs both state:

- Functions shall be called before constraints are solved, and their return values shall be treated as
state variables.	
- Random variables used as function arguments shall establish an implicit variable ordering or
priority. Constraints that include only variables with higher priority are solved before other, lower
priority constraints. ...
	class B;
		rand int x, y;
		constraint C { x <= F(y); }
		constraint D { y inside { 2, 4, 8 } ; }
	endclass

These two statements seem to contradict each other. The example clearly shows that constraint D for y is solved before constraint C which calls the function.

A better wording for the first point is:
- Functions shall be called before solving constraints which contain a call to the function. The functions' return values shall be treated as state variables.	

/*********************************************************  
Chris Spear              Verification Specialist            
Synopsys, Inc.           Phone 508-263-8114      ..  __@    
377 Simarano Drive       Fax   508-263-8123        _`\<,_   
Marlboro, MA 01752 USA   Cell  508-254-7223    .. (*)/ (*)  
Spear_ f rom _Synopsys.com       http://Chris.Spear.net/systemverilog
Just released: new edition of "SystemVerilog for Verification"
*********************************************************/  



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Oct 13 11:52:05 2008

This archive was generated by hypermail 2.1.8 : Mon Oct 13 2008 - 11:52:50 PDT