I have the following function:
function void foo_arr_bit (int seed, ref bit [*] mem, string mem_name);
for (int i=0; i< mem.size(); i++)
mem[i] = my_randomize_int(seed, mem[i], mem_name);
endfunction: foo_arr_bit
I call the function by:
foo_arr_bit(seed, data_bit, "data_bit");
Where data_bit can be: bit [1:0]/ bit [2:0]/ bit [3:0]/ bit [4:0]/ bit [5:0] etc...
When I try to compile I got the following error: near "[": syntax error, unexpected [ , expecting IDENTIFIER or TYPE_IDENTIFIER or NETTYPE_IDENTIFIER.