Forum Discussion
I have simple code question
Hi,
- Check your Pin assignments.
- Check you code in modelsim (@* includes all the inputs used in block) or debug using signal tap.
- You have used smaller counter value, the led is toggling at 125 Hz because of which we can't see it.
- Try to toggle the led at less than 40 Hz.
Or just use switch and led to start with.
module LED
(
input SW,
output LED
);
assign LED= SW;
endmoduleLet me know if this has helped resolve the issue you are facing or if you need any further assistance.
Regards
Anand
Hi:
I can turn ON LED by: LED1 <= 1;
Also, the CLK_50 is set to pin_V11.
So, probably it is not pin assignment issue.
The problem seems to be when creating time delay before turning ON the LED... I am unable to create any time delay.
For example the following delays did not work:
1- if(counter == 200000)
2- for (i = 0; i < 500; i = i +1) : Here i found out I can't have more than 500 iteration in FOR loop ? Not sure if this is verilog restriction or Quartus issue.
3- repeat(500) : Here too, I can't have more than 500 iteration ? Same, not sure if this is verilog restriction or Quartus issue.
In all these three cases the LED turns ON immediately. The delays were nothing, even though I looped many "repeat(500)" within the For loop.
Remember, I am very beginner, so I might have made a rookie mistake somewhere...
Thanks.