Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20693 Discussions

testbench wait for event or some time

Altera_Forum
Honored Contributor II
1,184 Views

Dear All, 

could someone advice: 

 

I want to wait in my testbench for a signal rise time, like this: 

 

wait until rising_edge(MySignal) 

 

however the rising edge must come within certain time, e.g. up to 100us. 

I've testested flavors of constructs like: 

 

wait until rising_edge(MySignal) or now > 100 us; 

 

however whatever I do, it does not react on the time condition. Only on the rising edge. What do I do wrong? 

 

thanks 

d.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
502 Views

try:wait until rising_edge(MySignal) for 100 us;

0 Kudos
Altera_Forum
Honored Contributor II
502 Views

ahmm, thanks, this combination did not come into my mind

0 Kudos
Altera_Forum
Honored Contributor II
502 Views

you can never use NOW in a wait statement because it is not a signal so it will never produce an event so it waits forever.

0 Kudos
Reply