I am trying to synthesize a verilog code that I have used a lot of for loops. However, I am getting syntax error due to using for loop. Take the following code as an example:
integer j;
always@(*)begin
for(j = 0; j<3; j++) begin
c[j]= c[j] + 1;
end
end
I tried to compile the code using iverilog
and verilator and both of them compile it without error but yosys
gives syntax error in line for(j = 0; j<3; j++) begin
. Is there something I am missing when synthesizing with yosys
?
I have uploaded a copy of this example code on edaplayground
in following link:
www.edaplayground.com/x/srL