WAIT UNTIL exit statement

N

Niv

I'm testing the mark/space of a clock burst (10 cycles, every now &
again).
I wait for the first rising edge (another evnt occurs just beforehand,
so I know when to start looking), I record the time, then go into a
loop wait for the falling edge, record the time calc the high time,
wait for the rising record the time, calc the low time and then
comapre hi & lo times to are to within the required percent mark space
After ten loops, the the loop exits and the process then starts afresh
waiting for the initial trigger event.

All well & good so far.

However, a reset can occur at any time, say during loop 8, which
aborts the clock burst in the chip, so the testbench loop now suspends
for a while and picks up where it left off, so the m/s is initally way
out, causing a test bench error.

How do I exit the FOR LOOP when reset occurs, as the loop has a couple
of wait untils in it, so the reset may occur, and go away, while the
testbench is waiting for a clock edge.

I need something like:

WAIT UNTIL rising_edge(clk_burst), UNLESS reset, THEN EXIT;

TIA, Niv
 
S

Stef

In comp.lang.vhdl,

[...]
I need something like:

WAIT UNTIL rising_edge(clk_burst), UNLESS reset, THEN EXIT;

Something like this (untested and I'm a relative newbie here ;-)

wait until rising_edge(clk_burst) or reset = '1';
exit when reset = '1';
 
M

Mark McDougall

Stef said:
Something like this (untested and I'm a relative newbie here ;-)
wait until rising_edge(clk_burst) or reset = '1';
exit when reset = '1';

Yup, done this before! ;)

Regards,
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top