My recent threads have made me realize that I need to brush-up concepts of timeunit and timeprecision .
LRM Section 22.7 :: " The time_precision argument specifies how delay values are rounded before being used in simulation "
[ 1 ] I have doubt related to " Delays are rounded to real numbers with n decimal places "
(a) For `timescale 1 ns / 1 ps , Delays are rounded to real numbers with three decimal places—or precise to within one thousandth of a nanosecond—because the time_precision argument is “1 ps,” or one thousandth of a nanosecond.
As 1ps is 0.001ns delays are rounded to 3 decimal places .
(b) For `timescale 10 us / 100 ns , as 100ns is 0.1 us would the real numbers be rounded to 1 decimal place ?
Does the value specified in the timeunit and timeprecision i.e 10 and 100 in (b) contribute to how many decimal place the real number gets rounded to ?
[ 2 ] I then tried a similar code from LRM Section 22.7 with the timescale and timeunit changed :: EDA_LINK
In the O/P why is $realtime scaled to precision value of 100ns i.e 0.1us ?
I expected that the real numbers be rounded to 1 decimal place so parameter d should have been scaled to 15.5us ,
Delay of #1.1499 be scaled to 11.5us , delay of #1.1551 be scaled to 11.6us