Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

having problem using while loop in vhdl

Status
Not open for further replies.

Burns111

Newbie level 1
Joined
May 27, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
Code:
clkloop: process
begin
while not complete loop
clock<=0;wait for 10ns;
clock<=1; wait for 10ns;
end loop; 
wait;
end process clkloop;
Can someone please explain this above code to me line by line?
 

all sites dedicated to VHDL can explain this while loop


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
clkloop: process
begin
   while not complete loop -- start the loop if complete is not true
      clock <= '0';      -- assign '0' to clock
      wait for 10ns;    -- wait 10 ns
      clock <= '1';      -- now assign '1' to clock
      wait for 10ns;   -- again wait for 10 ns
   end loop;             -- if complete is still not true, jump to beginning of the loop and restart, clock will toggle between '0' and '1' with period is 20 ns (50 MHz)
   wait; -- forever     -- if end of loop (complete = true) stop the process
end process clkloop;

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top