hello, I am using a associative array with queues(
bit [31:0]array[int][$] ={1:{1,2,3,4},2:{5,6,7,8}};
how to write foreach loop for the queue present in 2nd location.
In reply to sh88:
Although not currently in the 1800-2017 standard, all tools support this proposed syntax:
module top;
bit [31:0]array[int][$] ='{1:{1,2,3,4},2:{5,6,7,8}};
initial begin
foreach(array[2][i]) $display(array[2][i]);
end
endmodule
In reply to dave_59:
Thanks Dave
Can I know why it is not present in 1800-2017 standard.