Hello I am trying a small section of a project code where the equation is multiplying input with all values of array and then adding them up in one final output.
module arraywithinput(input in,
output reg [11:0] out0
);
reg [7:0] xin[3:0];
initial
begin
xin[0]=7;
xin[1]=6;
xin[2]=5;
xin[3]=2;
end
integer i;
always@(*)
begin
for (i=0; i<4; i=i+1)
out0<=out0+(in*xin[i]);
end
endmodule
I am getting synthesis error of Unexpected xin event in always block sensitivity list. What could I be possibly doing wrong to implement this scenario.