Loops Statements going infinite?....

Joined
Oct 15, 2007
Messages
3
Reaction score
0
I'm using Xilinx ISE.8,VHDL coding for my projects..I try to use certain loop statements such as 'For Loop', 'While loop', and also some 'Wait statements'...It seems like these stuffs work well in simulation, but I can't get the same result in hardware output of the FPGA.For example consider this,
--------------------------
IF rising_edge(clk_500ms)THEN
FOR i IN 1 TO 1000 LOOP
led <= NOT(a); --a ='1';
END LOOP;
END IF;
-------------------------
This when executed, appeared correct in simulation...But when I looked up in the output,the led seemed to glow continously...clk_500ms is a 500ms clock.So the output shouldbe visible...Why won't xilinx support these statements?...can anybody?..
 

phw

Joined
Oct 11, 2007
Messages
2
Reaction score
0
For details of the VHDL constructs supported by XST go to the Xilinx website and download the XST userguide (xst.pdf).

The FOR loop in your code is redundant. Why not just:

IF rising_edge(clk_500ms)THEN
led <= NOT(a); --a ='1';
END IF;

if all you want to do is toggle a LED?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top