RE: [sv-bc] error in example in section 2.7


Subject: RE: [sv-bc] error in example in section 2.7
From: Mark Hartoog (Mark.Hartoog@synopsys.com)
Date: Fri Jan 09 2004 - 15:40:43 PST


I thought we had fixed this example, but it is still in draft 3.

Packed arrays of 'int' are not allowed. This example is illegal. See section
4.2:

"Integer types with predefined widths cannot have packed array dimensions
declared. These types are: byte, shortint, int, longint, and integer."

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Paul
> Graham
> Sent: Friday, January 09, 2004 1:47 PM
> To: sv-bc@eda.org
> Subject: [sv-bc] error in example in section 2.7
>
>
> Section 2.7 has an example of a type cast of an array:
>
> If the type is not given by the context, it must be specified with a
> cast.
>
> typedef int [1:3] triple; // 3 integers packed together
> b = triple'{0, 1, 2};
>
> Type triple is a packed array type. This means it is a singular type. A
> concat seen in the context of a singular type is an ordinary concat, not an
> array literal, and therefore may not contain an unsigned integer.
>
> To fix this example you can either 1) define triple as an unpacked array
> type, or 2) use something other than unsized integers in the concat.
>
> Paul



This archive was generated by hypermail 2b28 : Fri Jan 09 2004 - 15:41:40 PST