Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - WAIT UNTIL exit statement

 
Thread Tools Search this Thread
Old 03-03-2008, 02:12 PM   #1
Default WAIT UNTIL exit statement


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


Niv
  Reply With Quote
Old 03-03-2008, 02:43 PM   #2
Stef
 
Posts: n/a
Default Re: WAIT UNTIL exit statement
In comp.lang.vhdl,
Niv <> wrote:

[...]
> 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';


--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

"Computers in the future may weigh no more than 1.5 tons."
(Popular Mechanics, 1949)


Stef
  Reply With Quote
Old 03-04-2008, 12:27 AM   #3
Mark McDougall
 
Posts: n/a
Default Re: WAIT UNTIL exit statement
Stef wrote:

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

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266


Mark McDougall
  Reply With Quote
Old 03-04-2008, 01:08 PM   #4
Niv
 
Posts: n/a
Default Re: WAIT UNTIL exit statement
On 4 Mar, 00:27, Mark McDougall <ma...@vl.com.au> wrote:
> Stef wrote:
> > 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,
>
> --
> Mark McDougall, Engineer
> Virtual Logic Pty Ltd, <http://www.vl.com.au>
> 21-25 King St, Rockdale, 2216
> Ph: +612-9599-3255 Fax: +612-9599-3266


That is so simple & obvious I feel suitably stupid!
Niv.


Niv
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CR -- US vs International version ste7ens DVD Video 49 07-11-2007 06:14 AM
bush,jr spoke, bush,jr lied Sid9 DVD Video 3 06-03-2006 07:37 AM
Beyond the Office [Burning Questions: HD-DVD Claims the Advantage - 08/23/2005] Ablang DVD Video 0 08-24-2005 06:23 AM
MGM Class Action lawsuit in the USA Reader DVD Video 20 02-18-2005 05:56 PM
Am I missing the point BRS DVD Video 179 01-11-2004 07:31 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46