Re: [sv-bc] unpacked multi-D array type compatibility

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sat Mar 04 2006 - 23:13:46 PST
They match, because, according to 6.9.1.f, "Two array types match if they have the same number of unpacked dimensions and their slowest varying dimensions have matching types and the same left and right range bounds. The type of the slowest varying dimension of a multidimensional array type is itself an array type."

Both arrays have 2 unpacked dimensions.  The slowest-varying dimensions have the same left and right bounds (1 and 3).  Likewise, the types of the slowest-varying dimensions are both one-dimensional unpacked arrays of logic from 1 up to 5, so they match.

Type matching of multidimensional arrays is not impacted by whether the multiple dimensions are built up in stages with typedef.

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Saturday, March 04, 2006 10:22 PM
To: sv-bc@eda.org
Subject: [sv-bc] unpacked multi-D array type compatibility

Hi,

If I have 2 unpacked arrays:

Array 1
=======
typedef logic typ_a [1:5] ;
typ_a array_1 [1:3] ;

Array 2
=======
logic array_2 [1:3][1:5] ;

I hope I got these syntaxes correct.

What degree of type compatibility (section 6.9) do these two arrays have? Where is it stated unambiguously in the LRM?

Thanks,
Shalom


Shalom Bresticker
Intel Jerusalem LAD DA
+972 2 589-6852
+972 54 721-1033
I don't represent Intel 
Received on Sat Mar 4 23:13:57 2006

This archive was generated by hypermail 2.1.8 : Sat Mar 04 2006 - 23:14:29 PST