Re: [sv-bc] Type of a concat expression

From: Brad Pierce <brad_pierce@acm.org>
Date: Fri Jun 18 2010 - 22:01:03 PDT

According to the existing standard the following is legal

     localparam type T = type({a,b});
     var T c = {a,b} ;

And the type determines $dimensions(c), $increment(T), etc.

Or if just

       var T c ;

then the type determines also the default initial value of c (all
zeros or all unknowns).

So it adds something. Something useful? Sometimes more is less.

-- Brad

On Fri, Jun 18, 2010 at 6:26 PM, John Michael Williams
<jwill@basicisp.net> wrote:
> Hi Brad.
>
> I think one might rephrase the question to something like,
>
>   Does the vector of bit-levels expressed by a concatenation
>   depend on its type?
>
> If the components of a concatenation determine unambiguously
> the vector value of the expression, then assigning a type to the
> concatenation adds no useful information -- in my opinion.
>
> I think one just would have a vector of '1', '0', 'x', and 'z',
> or a compiler error message.   Isn't this so?   Even for a
> mixed concatenation of logic, reg, and net bits?
>
> On 06/18/2010 04:33 PM, Brad Pierce wrote:
>>
>> Surya,
>>
>> The "automatic compatibility" issue is irrelevant to your original topic
>> of this thread, which was the "type of a concat expression", because a
>> concatenation is a primary, and the type and evaluation of a primary, unless
>> it is of the form ( mintypmax_expression ), are immune to the statement
>> context in which it is embedded.
>>
>> Do you feel certain now about the type of a concatenation? If not, which
>> questions about it do you still consider unresolved?
>>
>> -- Brad
>>
>>
>>
>
> --
>        John Michael Williams
>        jwill@BasicISP.net
>
>
> --
> 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 Fri Jun 18 22:01:23 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 18 2010 - 22:04:04 PDT