how to break out of for loop

Discussion in 'VHDL' started by bharathbhushan.kn, Mar 11, 2009.

  1. bharathbhushan.kn

    bharathbhushan.kn

    Joined:
    Mar 11, 2009
    Messages:
    1
    Likes Received:
    0
    Location:
    Florida
    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

    :)
     
    bharathbhushan.kn, Mar 11, 2009
    #1
    1. Advertisements

  2. bharathbhushan.kn

    jeppe

    Joined:
    Mar 10, 2008
    Messages:
    348
    Likes Received:
    0
    Location:
    Denmark
    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
     
    jeppe, Mar 11, 2009
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. howachen@gmail.com
    Replies:
    16
    Views:
    4,571
    steve
    Jul 11, 2006
  2. Gregory Petrosyan

    how to break a for loop?

    Gregory Petrosyan, Feb 20, 2006, in forum: Python
    Replies:
    13
    Views:
    638
    bonono@gmail.com
    Feb 21, 2006
  3. BartlebyScrivener

    keyboard command to break out of infinite loop?

    BartlebyScrivener, Apr 16, 2006, in forum: Python
    Replies:
    5
    Views:
    1,046
    BartlebyScrivener
    Apr 16, 2006
  4. Alex Pavluck
    Replies:
    5
    Views:
    351
    Petr Jakes
    Jun 27, 2006
  5. Noodle

    Double break out of a loop

    Noodle, Aug 8, 2006, in forum: Java
    Replies:
    3
    Views:
    26,097
    Noodle
    Aug 8, 2006
  6. lovecreatesbea...@gmail.com

    `if (!p ? i++ : 0) break;' == `if (!p){ i++; break;}' ?

    lovecreatesbea...@gmail.com, Apr 13, 2008, in forum: C Programming
    Replies:
    12
    Views:
    1,322
    lovecreatesbea...@gmail.com
    Apr 14, 2008
  7. Ralph Smith
    Replies:
    3
    Views:
    208
    Pit Capitain
    Oct 19, 2005
  8. Isaac Won
    Replies:
    9
    Views:
    751
    Ulrich Eckhardt
    Mar 4, 2013
Loading...