logic [M-1:0] x [N-1:0]; // x is N number of rows and M number of bits
genvar i;
genvar j;
for (i=0; i<N; i++) begin
for (j=0; j<M; j++) begin
x[i][j] = $random;
end
end
In the real code, it is not random, but this is an input bit. But the same error is introduced which is
token is '['
x[i][j]
making a pointer on the second [
What is the mistake?