I just want to make sure I have got this correct as I am going to implement something based on this.
When I overwrite an entry in an associative array, I see that the new value is rejected, which is what I am looking for.
The following is the code I have tried:
module one;
int Q[int] ;
int x, y;
initial begin
Q[1] = 1;
Q[2] = 2;
Q[3] = 3;
Q[3] = 4;
$display ("%d %d %d", Q[0], Q[1], Q[2]);
end
endmodule
The following is the output:
0 1 2
At least I am not able to find anything in LRM that describes this behaviour