Need some clarification on the time value passed to uvm_top.set_timeout() call.
I want to use this feature to terminate the sim when it fails to finish before 1ms, and when I add the line,
initial uvm_top.set_timeout(1ms); in the top module and run the sim, it terminates at 1000ns instead of 1ms with the fatal error,
UVM_FATAL @1000.000ns: reporter.*Explicit timeout of 1000.000ns hit, indicating a probable testbench issue.
If I set the time value in ps unit as in set_timeout(1.0e9), it works. Any idea?
set_timeout() should be sensitive to the time unit provided because it takes the argument as data type “time”.
*function void set_timeout(time timeout, bit overridable = 1)
*
My expectation is if input is provided with a unit(4ms), it should run for that much time irrespective of timescale set in testbench. Am I missing something?
In my test, set_timeout(4ms) is present. Test bench has timescale of 1fs/1fs. Because of this, 4ms is working as 4us. If I change this to set_timeout(4ms/1ps) as you have suggested, it might work. But, if any other test bench has other timescales, then it needs to be changed again. In this way, it will be test bench timescale dependent. How to make this independent of timescale?