RE: [sv-bc] Unclear text in associative array

From: Arturo Salz <Arturo.Salz@synopsys.com>
Date: Thu Jan 06 2011 - 12:20:21 PST

It means that index_type may only be * or a type name (either a built-in type or a previously typedef'd name), and cannot be an anonymous type. For example, the following declarations would be illegal:

integer array1[ bit [2:0] ];
int array2[ struct packed { bit a; bit; b } ];

The way to declare such a type is:

                typedef bit [2:0] IndexT1;
                typedef [ struct packed { bit a; bit; b } IndexT2;

integer array1[ IndexT1 ];
int array2[ Index2 ];

    Arturo

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Surya Pratik Saha
Sent: Thursday, January 06, 2011 9:22 AM
To: sv-bc@eda.org
Subject: [sv-bc] Unclear text in associative array

Hi,
In section 7.8 of SV 2009 LRM, it is mentioned:

It shall be illegal for index_type to declare a type.

What is the meaning of this sentence? It will be better if an example is provided.

--
Regards
Surya
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jan 6 12:20:53 2011

This archive was generated by hypermail 2.1.8 : Thu Jan 06 2011 - 12:21:05 PST