Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > how to break out of for loop

Reply
Thread Tools

how to break out of for loop

 
 
bharathbhushan.kn bharathbhushan.kn is offline
Junior Member
Join Date: Mar 2009
Location: Florida
Posts: 1
 
      03-11-2009
hey guys, i am new to vhdl and was working on my projects, i wanted to use a for loop instead of a while loop and try to break out of the loop in case of a particular condition, can anyone let me know how to do it please?

and my friend told me that using a while loop may cause problems while synthesizing, can anyone explain why such a thing happens?

thanks

 
Reply With Quote
 
 
 
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      03-11-2009
Im not sure but if my memory serves me well would could it be done with

FOR i IN 0 to 10 LOOP
....
IF i=5 THEN
EXIT
END IF;
....
END LOOP;

Check this as well: http://www.vdlande.com/VHDL/exits.html

Your welcome
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Triple nested loop python (While loop insde of for loop inside ofwhile loop) Isaac Won Python 9 03-04-2013 10:08 AM
Re: How to break out of an emacs lisp loop ? thermate@india.com Python 0 10-23-2007 08:10 PM
Double break out of a loop Noodle Java 3 08-08-2006 06:22 AM
keyboard command to break out of infinite loop? BartlebyScrivener Python 5 04-16-2006 09:03 PM



Advertisments