Re: [sv-bc] packed integer arrays

From: Steven Sharp <sharp_at_.....>
Date: Mon Apr 25 2005 - 10:58:25 PDT
>I'm not interested in bounding the predefined integer types.
>I'm interested in creating a packed array of predefined
>integer types:
>
>    typedef byte [3:0] word;
>
>which is currently not allowed.

Exactly.  Other packed types can be used as an element type in a
packed array declaration.  Why is there this obscure difference
for the predefined integer types?  I can define my own byte type
that is equivalent to the predefined byte type in all other ways
within SystemVerilog code.  Why should it behave differently in
this one way?

Note that the DPI could define that any 8-bit 2-state type will
map into a char, not just the predefined byte type.  It could
define that any 2-state vector type will map into the next larger
C type, and only vectors wider than long long would have to use
the clumsier access mechanism.

Steven Sharp
sharp@cadence.com
Received on Mon Apr 25 10:58:34 2005

This archive was generated by hypermail 2.1.8 : Mon Apr 25 2005 - 10:58:53 PDT