[sv-ec] FW: [sv-bc] Query regarding the assosiative array of user defined index type.

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Jul 19 2007 - 03:44:02 PDT
 

-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Dhiraj Kumar Prasad
Sent: Thursday, July 19, 2007 1:29 PM
To: sv-bc@server.eda.org
Cc: Dhiraj Kumar Prasad
Subject: [sv-bc] Query regarding the assosiative array of user defined
index type.

Hi,

According to LRM P1800.2005,section 5.9.7 In general, associative arrays
that specify an index of any type have the following properties:
 -Declared indices must have the equality operator defined for its
  type to be legal. This includes all of the dynamically sized types
  as legal index types.
 
 -An index expression that is or contains X or Z in any of its elements
is invalid.

So according to above section is the following testcase is valid?

module tmp;

typedef enum reg[3:0]{A = 4'b001x,D = 4'b0010,B,C[6:0]} my_enum; reg
[3:0] l1[my_enum];

initial
begin
l1[A] = 4'b1100;
end
endmodule

As all the simulator passing this one.

Thanks,
Dhiraj



--
This message has been scanned for viruses and dangerous content by
MailScanner, 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 Jul 19 03:44:50 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 19 2007 - 03:45:14 PDT