I have a CPLD with a 50Mhz clock.
This is my code:
module FirstProject(clk, LED);
output LED;
input clk;
reg [32:0] count1;
reg LEDstatus;
assign LED = LEDstatus;
always @ (posedge clk) begin
if (count1 < 10000000) begin
LEDstatus <= 0;
end
else begin
LEDstatus <= 1;
end
count1 <= count1 +1;
end
endmodule
I have no idea why this does not work. It deploys on CPLD, but light is always on
This code works on my cpld with the exact same pin assignments and timing constraints