I'm working with Quartus Prime Lite Edition and having a case statement with:
S2: begin
dat[WID_DAT-1 :1] <= dat[WID_DAT-2 :0];
dat[0] <= 0;
crc[0] <= crc_temp[0];
integer i;
for (i = 1; i < WID_CRC; i = i+1) begin
crc[i] <= crc_temp[i] ^ crc[i-1];
end
if(count != 0) begin
r_ns <= S2;
count <= count -1;
end
else begin
r_ns <= S_DONE;
done <= 1;
end
end
and get the error message when I Start Anlysis & Elaboration:
Error (10170): Verilog HDL syntax error at CRC_configurable.v(62) near text: "integer"; expecting "end".
Why is this so, and how should I avoid it?