manik045
Newbie level 6
![Newbie level 6](/styles/images/ranks/blevel3.gif)
Hello
I can not declare a multidimensional array in modelsim for systemverilog. Here's the code
When i am going to compile it gives me the following error message.
I can not figure it out. Where is the problem of declaring the array here.
Please help me to figure it out.
I can not declare a multidimensional array in modelsim for systemverilog. Here's the code
Code:
module TwoD_Array ();
bit [7:0] array[1:2][1:4];
initial begin
/* array [0][0]=8'd50;
array [0][1]=8'd60;
array [1][0]=8'd70;
array [1][1]=8'd90; */
//$display ("array [0][0]=%d", array[2]);
end
endmodule
When i am going to compile it gives me the following error message.
** Error: C:/altera/12.1/modelsim_ase/multiple array.bak(3): near "[": syntax error, unexpected '[', expecting IDENTIFIER or TYPE_IDENTIFIER
I can not figure it out. Where is the problem of declaring the array here.
Please help me to figure it out.