The loop statement provides looping capability.
loopscl statementsexit when booleanExpression // optionalend loop;
The boolean expression is what you would expect it to be. Here are a few examples
//infinite loop (no exit when)loopRD1 <= '0';wait on RD1;end loop;
//clock until pc == foo labelloopRD0 <= '0';wait 4 ic;RD0 <= '1';wait 4 ic;exit when PC == foo;end loop;
//unadorned exit (yeah this is contrived!)loopAN1 <= 3500 mv;exit; // unconditional exitend loop;
Note that a loop can have more than one exit when condition
//multiple exit conditionsloopwait on RD1;RD0 <= '0';exit when STATUS.Z == 0;exit when RD2 == '0';end loop;