RE: [sv-bc] Built-in types are not packed arrays

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Fri Sep 24 2004 - 14:22:54 PDT

>>
>> A byte is a very special case, and not at all like 'shortint' and 'int'.
>
>Would you agree that $dimensions(byte) == 1?

I see your point, but section 4.2 is clearly distinguishing packed arrays
and built-in types. For example, you can't declare a packed array of bytes.

    byte legal [15:0];
    byte [15:0] illegal;

>> As Steven points out, V2K made it legal to index into an 'integer'.
>> But I think that was an unwise change. For example, in V2K, you
>> don't even know how many bits there are in an 'integer', only that
>> there are at least 32. Can you safely use an index greater than 32?
>
>A good reason to allow the user to query $left(integer)!

Or maybe the apparent need for $left(integer) is an argument for
disallowing bit selects of integers. But that's no longer possible,
of course, because of backward compatibility.

-- Brad
Received on Fri Sep 24 14:23:01 2004

This archive was generated by hypermail 2.1.8 : Fri Sep 24 2004 - 14:23:05 PDT