RE: [sv-ec] FW: [sv-bc] Query related to randomize() method

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed Apr 18 2007 - 22:40:04 PDT
This *should* be illegal be cause the function call to randomize
modifies state information, the RNG state. 

I can only say *should* because the LRM says in 13.4.11 "Functions that
appear in constraint expressions should be automatic (or preserve no
state information) and have no side effects."

It does not say what happens if they do preserve state information.

Dave


> -----Original Message-----
> From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
On
> Behalf Of Brad Pierce
> Sent: Wednesday, April 18, 2007 10:11 PM
> To: sv-ec@server.eda-stds.org
> Cc: Shabnam Banu; Matthew.R.Maidment
> Subject: [sv-ec] FW: [sv-bc] Query related to randomize() method
> 
> 
> 
> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Shabnam Banu
> Sent: Wednesday, April 18, 2007 10:00 PM
> To: sv-bc@eda-stds.org
> Subject: [sv-bc] Query related to randomize() method
> 
> Hello,
> 
> I have a query related to inline constraint randomize() method.
> 
> LRM says that ,
> 
> The randomize()...with{...} construct can be used anywhere an
expression
> can appear.
> 
> Again From BNF ::
> 
> constraint_block ::= { { constraint_block_item } }
> constraint_block_item ::= solve identifier_list before identifier_list
;
>                                             | constraint_expression
> 
> constraint_expression ::= expression_or_dist ;
>                                           | expression  >
constraint_set
>                                           | if ( expression )
> constraint_set [ else constraint_set ]
>                                           | foreach ( array_identifier
[
> loop_variables ] ) constraint_set
> 
> expression_or_dist ::=   expression [ dist { dist_list } ]
> 
> Hence ,constraintblock can contain any expression.
> 
> So, It should be legal
> if randomize()with {... }contains within itself randomize()with {....}
> again.
> 
> 
> Please clarify that whether randomize()with {... } can contain another
> randomize()with {... }
> 
> within its contraint block or not.
> 
> i.e , whether the syntax,
> 
> p.randomize() with {x > q.randomize() with {x>0;};};
> 
> Assumption:: x is present in the class corresponding to the
classobject
> q .
> 
> is correct or not.
> 
> Thanks and regards,
> 
> Shabnam banu
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Apr 18 22:40:32 2007

This archive was generated by hypermail 2.1.8 : Wed Apr 18 2007 - 22:41:00 PDT