Re: [sv-bc] confusion in determining the type of an self determined binary expression during evalution of type operator

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Mon Oct 15 2007 - 06:57:12 PDT
Sumay,

Are you worried about the *precise* type in all situations?  That
is known to be underspecified right now.  For example given packed
unsigned bit vectors "a" and "b", the LRM does not say anything
about the precise type of "a[4:5] + b[3:2]".   That impacts type
operator equality comparisons and the actual bounds of declarations
using "type" on such expressions.

There was a rather long thread titled "part selects on arbitrary expressions"
starting with (I think) http://www.eda.org/sv-bc/hm/5506.html that gets
at the same basic issues.

I can't see any resolution of this making it into the 2008 LRM.

Gord.

Sumay Guin wrote:
> Hi Brad,
>               I cannot understanding your reply. I want to know what 
> will be the  type of a  self determined binary  or  concatination 
> expression when they are used in type operator. Please let me know  
> whether  you understand my query or not .
> 
> Thanks,
> Sumay
> Brad Pierce wrote:
> 
>> Sumay,
>>
>> The LRM says that "The type operator applied to an expression shall
>> represent the self-determined result type of that expression."  So you
>> are asking about how to calculate the self-determined type of an
>> expression.  The type operator is just one of many contexts where a
>> self-determined context must be calculated.  Two common such contexts in
>> Verilog are concatenations and parameter declarations.
>>
>> -- Brad
>>
>> -----Original Message-----
>> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
>> Sumay Guin
>> Sent: Monday, October 15, 2007 2:53 AM
>> To: sv-bc@eda-stds.org
>> Subject: [sv-bc] confusion in determining the type of an self determined
>> binary expression during evalution of type operator
>>
>> Hi,
>>      Consider the usage of type operator,
>>      int a,b;
>>      byte  c ;
>>      b = type(a + 6 )'(c);
>>
>>      so , what will  be  the type of self determined binary expression
>> ( here a+6 ) when we try to find out it's type using type operator.
>>      Also in case if user specified concatination/multiple
>> concatination expression in type operator then what will be the type of
>> the
>>      concatination/multiple concatination expression ? As LRM does not
>> state it clearly, Can someone tell me what would be the type of
>>      above expressions.
>>
>> Thanks ,
>> Sumay
>>                
>>
>>
>>
>> -- 
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, and is believed to be clean.
>>
>>
>>  
>>
> 
> 
> 
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Oct 15 06:57:43 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 15 2007 - 06:57:59 PDT