In response to the first question, I believe that the LRM is referring to the "assoc2" array in the example below: module top; typedef struct { int i; int j; } s_t; int assoc1[s_t]; s_t s; int assoc2[ struct { int i; int j; } ]; // Anonymous struct index type initial begin s = '{4,5}; assoc1[s] = 45; assoc2['{3,8}] = 38; $display("assoc1 is %1d", assoc1); $display("assoc2 is %1d", assoc2); end endmodule Personally I don't really see the reason for this restriction. It's not a very useful construct, but it doesn't cause any harm that I can see. Regards, Doug > -----Original Message----- > From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On > Behalf Of Bresticker, Shalom > Sent: Tuesday, November 15, 2005 7:07 AM > To: sv-ec@eda.org > Subject: [sv-ec] Associative Array questions > > <<Bresticker, Shalom.vcf>> Hi, > Some points in 5.9-5.10: > > - In 5.9: "It shall be illegal for index_type to declare a > type." - What does this mean? > > - Presumably the statement that "A 4-state index containing X > or Z is invalid." should appear in 5.9.5 ("Signed packed > array") as well. > > - The word "Index" should be uncapitalized in 5.9.1 and 5.9.6. > > - In Table 5-1, real type is missing. > > - In 5.10: "If the argument passed to any of the four > associative array traversal methods first, last, next, and > prev is smaller than the size of the corresponding index, > then the function returns -1 and shall copy only as much data > as can fit into the argument." - Does "smaller than the size" > mean that it is not large enough to contain the value? For > example, what if the index type is integer (32 bits), but the > value is 0 (only 1 bit needed)? > > Thanks, > Shalom Bresticker > Intel Jerusalem LAD DA > +972 2 589-6852 > I don't represent Intel > >Received on Tue Nov 15 10:29:16 2005
This archive was generated by hypermail 2.1.8 : Tue Nov 15 2005 - 10:30:05 PST