I am using v10 of Icarus Verilog, Windows 8.1 and am having troubles compiling 1D arrays like:
localparam [15:0] A[0:5] = {
0,
10920,
21840,
32760,
43680,
54600
};
or 2D array like:
localparam [1:0] B[0:5][0:2] = {
{2'b00, 2'b10, 2'b01},
{2'b10, 2'b00, 2'b01},
{2'b10, 2'b01, 2'b00},
{2'b00, 2'b01, 2'b10},
{2'b01, 2'b00, 2'b10},
{2'b01, 2'b10, 2'b00}
};
When I try to compile this using iverilog inside command prompt like: iverilog -o tb.vvp ".v files here"
I get the following errors:
tb.v:39: syntax error
tb.v:39: error: syntax error localparam list.
tb.v:54: syntax error
tb.v:54: error: syntax error localparam list.
Lines 39 and 54 are lines where upper two arrays are located.
What is wrong and how can I fix this ridicilous error?