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

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Mon Oct 15 2007 - 15:58:56 PDT
Steven Sharp wrote:
>> From: Gordon Vreugdenhil <gordonv@model.com>
> 
>> Greg Jaxon wrote:
>>> Gordon Vreugdenhil wrote:
>>>>  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]".
>>> Are there any dissenters from the idea that this is a packed
>>> bit or logic vector unsigned [1:0]?
>> I don't know.  Is this still true for just "a[4:5]"?

Yes.

>>  In effect, do you *always* normalize?

For everything except identifier reference we normalize the type.
The LRM is mostly mute on the subject, but that's what we're doing internally.

>  Only for selects and non-simple expressions?

I guess.

> And what about "a[4]"?  That is presumably a scalar, not a 1-bit vector.

Right.  It is an error to subscript it again.

> But what about "a[4:4]"?  Scalar or vector?

Vector. Also an error to subscript it again, just for a different reason.

> Is type((a)) the same as type(a), or do the parentheses make it
> an expression and cause normalization?

I personally don't think parentheses have any semantic impact after
they've done their precedence-busting token grouping job.

There are lots of hard cases hereabouts:  e.g.,  c ? a : a[4:5]
Also (min:typ:max) there's a synthesized type (ouch)!

Greg


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

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