[sv-ec] std::randomize and handles as arguments (mantis 211)

From: Daniel Mlynek <daniel.mlynek@aldec.com.pl>
Date: Fri Feb 19 2010 - 00:26:13 PST

Uder this mantis (211) there is a discussion about controversial randomize
issues but there is no final decision.
 
My question is especially about below case
 
    class tst_class1;
        rand bit [15:0] data;
        rand bit [ 7:0] addr;
             bit [15:0] base;
        constraint r1 { addr[1:0] == 0; }
    endclass
 
    tst_class1 hnd;
    initial std::randomize(hnd);
 
 
1. Should constraints from class definition be valid in std::randomize call
or not?
- My opinion is those contraints should no be valid, only contraints defined
inline after "with" should be valid. (in this case none)
2. All fields of class should be randomize or only the one marked with
rand?
- My opinion is that olny rand members should be randomized
 
Am I right?

 
 
DANiel

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Feb 19 00:26:41 2010

This archive was generated by hypermail 2.1.8 : Fri Feb 19 2010 - 00:26:51 PST