manik045
Newbie level 6
I have written the following code in system verilog in Modelsim.
I have declared the multiple array here but there show two error while compiling.
I have attached the image here. May be it will be very easy to understand.
What is wrong here. I have done my works into .sv file. I do not understand what's wrong i have done here. Does the problem occur due to the absence of the system verilog library file? can anybody help me in this regard.
Thanks in advance.
Code:
module mul_array ();
byte md[2:1][3:1]='{'{0,1,2},'{3,4,5}};
initial begin
$display ("Initial value:");
foreach (md [i,j])
$display ("md[%0d] [%0d]=%0d", i,j, md[i][j]);
end
endmodule
I have declared the multiple array here but there show two error while compiling.
** Error: E:\New simulation folder\mul_array(3): near "=": Syntax error.
** Error: E:\New simulation folder\mul_array(8): near "$display": syntax error, unexpected SYSTEM_IDENTIFIER, expecting ';'
I have attached the image here. May be it will be very easy to understand.
What is wrong here. I have done my works into .sv file. I do not understand what's wrong i have done here. Does the problem occur due to the absence of the system verilog library file? can anybody help me in this regard.
Thanks in advance.