I'm a newbie to OVM. I'm trying to break out of a while loop after a fixed timeout of 120us. Here is the loop that I have:
while(signal_val1 ==0) begin
signal_val1 == sla_vpi_get_value_by_name ("blah");
This code is part of an OVM test and I want to restrict the check happening in my 'while' loop for 120us after which I want the test to exit. I've tried doing this by adding conditions within the while loop, a for loop around it, 'set_global_timeout()', etc., but none of them work. I figured that I will have to call my 'global_stop_request()' if I want the test to quit, but how do I check for this 120us (120 microseconds) condition and exit from the loop?
Kindly help!! Thanks in advance!