This module is supposed to convert the index value iState into the corresponding value in the array sequence and return it as oV. However, I get this error at oV = sequence[iState]; when I run it:
Error (10170): Verilog HDL syntax error at assign32498071.v(70) near text "="; expecting ".", or "("
module StateToCountSequence(iState, oV);
//declare the input and output
input iState;
output [3:0]oV;
//declare any internal wire and reg types here.
reg [3:0]sequence[14:0];
initial begin
sequence[0] = 4'd3;
sequence[1] = 4'd2;
sequence[2] = 4'd4;
sequence[3] = 4'd9;
sequence[4] = 4'd9;
sequence[5] = 4'd0;
sequence[6] = 4'd7;
sequence[7] = 4'd1;
sequence[8] = 4'd1;
sequence[9] = 4'd5;
sequence[10] = 4'd1;
sequence[11] = 4'd7;
sequence[12] = 4'd0;
sequence[13] = 4'd8;
sequence[14] = 4'd9;
end
oV = sequence[iState];
endmodule
Does anyone know what I should do about this?