Altera_Forum
Honored Contributor
15 years agoHelp on Cyclone III DK Start kit 3c25n
Hi,
I am new to this FPGA world. I have done projects on 8051, so i am familiar with c language I am trying to blink four LEDs my code is as below.When i analysis and synthesis its showing error as below. --- Quote Start --- Error (10119): Verilog HDL Loop Statement error at led_prj.v(19): loop with non-constant loop condition must terminate within 250 iterations --- Quote End ---
module led_prj(clk,rst,led);
input clk,rst;
//input ps;
output led;
reg led;
reg count;
reg flag;
always@(posedge clk or negedge rst)
begin
if(~rst)begin
led <= 4'b1111;
flag<= 1'b0;
count <= 25'd0;
end
else begin
while(count <= 25'd0 || flag == 1'b1)begin
count <= count + 25'd1;
led<= 4'b0000;
flag<= 1'b0;
end
count<= count+25'd1;
while(count <= 25'd0)begin
count <= count + 25'd1;
led<= 4'b1111;
flag<= 1'b1;
end
end
endmodule