title: How to exit a 'while' loop in OVM / verilog after checking for a specific timeout condition
body: <p>I have a 'while' loop as part of an OVM test that looks like this:</p>
  
  <pre><code>while (signal_val == 0) begin
      signal_val  = sla_vpi_get_value_by_name ("blah");
  end
  </code></pre>
  
  <p>I want to restrict this loop for 120 microseconds only and exit after that. I want to quit the test if (signal_val == 0) is still not being satisfied at the end of 120µs. How do I achieve this? </p>
  
  <p>I figured I'll have to call the 'global_stop_request()' to quit from the test, but trying to check the existing condition in the while loop for a fixed timeout value (120µs) seems to be tricky. Also, 'break' does not seem to be working. Any ideas?</p>
  
  <p>Tried using 'break' this way, but 'break' gives a syntax error:</p>
  
  <pre><code>while (signal_val == 0) begin
      signal_val  = sla_vpi_get_value_by_name ("blah");
      #120us;
      break;
  end
  </code></pre>