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

From: Dhiraj Kumar Prasad <dhiraj_at_.....>
Date: Thu Jul 19 2007 - 03:28:36 PDT
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.
Received on Thu Jul 19 03:33:03 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 19 2007 - 03:33:11 PDT