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
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