Re: [sv-bc] part selects on arbitrary expressions

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sun Nov 04 2007 - 12:50:05 PST
Following up to http://www.eda-stds.org/sv-bc/hm/5506.html , I, too,
would like to see this enhancement (selects of arbitrary primaries) in
SV-2008. 
 
In SV-2005, for any expression 'expr',  one can already declare
 
   var type(expr) temp;
 
and then write
 
   temp = expr;
   ... temp[5] ...
 
But one ought to be able to simply write
 
   ... (expr)[5] ...
 
More generally, for any primary 'p', one ought to be able to write
 
   ... p[5] ...
 
Consider the defintion of static cast --
 
   "If the expression is assignment compatible with the casting type,
then the cast shall return the value that a variable of the casting type
would hold after being assigned the expression."
 
We could come up with a similar rule that generalizes selects.
 
I don't think it's a strong argument against this enhancement to say
that the type() operator is not well enough defined, as noted in

         http://www.eda-stds.org/sv-bc/hm/7082.html

To me that is just an argument for clarifying the definition of the
type() operator.
 
-- Brad

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Nov 4 12:50:29 2007

This archive was generated by hypermail 2.1.8 : Sun Nov 04 2007 - 12:51:01 PST