When I want a delay in uvm case, I use “#5ms” in the case, but the actual delay is 5us.
Then I add compile option “-diag timescale” in compilation, and the timescale in “tb” is “1ns/1ps”.
And I do a few test about the time unit:
//////code begin
$display(“time 0 %0t”, $time);
#10;
$display(“time 1 %0t”, $time);
#10us;
$display(“time 2 %0t”, $time);
#1ms;
$display(“time 3 %0t”, $time);
//////code end
the output is:
time 0 0.220 ns
time 1 0.230 ns
time 2 10.230 ns
time 3 1010.230 ns
It is obviously that the time unit has become 1000 times shorter than the actual one.
Why?