module test(led1,led2,led3,led4);
output led1,led2,led3,led4;
integer i;
for(i=1;i<20;i=i+1)
begin
assign led1 = 1;
assign led2 = 1;
assign led3 = 1;
assign led4 = 1;
end
endmodule
然后报错:
Error (10170): Verilog HDL syntax error at test.v(8) near text "for"; expecting an identifier ("for" is a reserved keyword ), or "endmodule", or a parallel statement
Error (10170): Verilog HDL syntax error at test.v(14) near text "end"; expecting an identifier ("end" is a reserved keyword ), or "endmodule", or a parallel statement
Error (10112): Ignored design unit "test" at test.v(1) due to previous errors
Error: Quartus II Analysis & Synthesis was unsuccessful. 3 errors, 0 warnings
Error: Peak virtual memory: 199 megabytes
Error: Processing ended: Thu Jan 17 17:36:19 2013
Error: Elapsed time: 00:00:01
Error: Total CPU time (on all processors): 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 5 errors, 0 warnings |