- index_type of Associative array :- It shall be illegal for index_type to declare a type.
- An entry for a nonexistent associative array element shall be allocated when it is used as the target of an assignment or actual to an argument passed by reference.
I wanted to get the meaning of this lines.
In reply to sankethjitta:
- This prevents so-called anonymous types like
int AA[enum {ON, OFF}]. Same for
structs. You need to use a
typedef first. - Associative array elements get created on the first write to that element. But if you pass an associated array element as an argument to a function/task passed by reference, SystemVerilog has to create the element regardless of whether the routine writes to it.