I have:
integer test[7:0];
but I cannot do:
test[0] = 0;
or
assign test[0] = 0;
or
intial
begin
test[0]=0;
end
or
integer test[7:0] = {0,0,0,0,0,0,0,0,0};
Any ideas? Just using 0 as an example, I need it to be 26, 40, 32, 18, 50, 0, 20, 12
Are you sure
initialdoesn’t work (you might have a typo in there…)?In systemverilog, something like the following will work. These are known as “Assignment Patterns”:
I doubt either of the above are synthesisable, except maybe when targeting an FPGA.