![]() |
|
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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 |
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
|
|
#4 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |