>Consider the example > >typedef bit [0:2] a [1:0]; >a [3:0] b [2:0]; > >Is it a legal syntax. 3.1a LRM is not having any suitable explanation >for this kind of example. In this a is a representation of a array, and >b is a array of type a. > > Will this mean that b will be treated as bit [3:0][0:2]b[1:0][2:0] >as an extention to 'a '. Or it will be an error as a packed array >cannot be created from an unpacked element, but will it be valid to >consider a as array. This is an error because you cannot create a packed arrays from unpacked elements, and 'a' is an unpacked type. The typedef 'a' stands for a specific data type, not the collection of syntax used to define it. If it is used to build another type, the other type will be built by containing subpieces that are of type 'a'. It will not be built by substituting the syntax for the declaration of type 'a' into the new declaration and seeing what type you end up with. Steven Sharp sharp@cadence.comReceived on Fri Apr 1 12:39:19 2005
This archive was generated by hypermail 2.1.8 : Fri Apr 01 2005 - 12:39:29 PST