In reply to dave_59:
Hi Dave ,
Using the same explanation as per the other link :
d stores the real value 1.54345.
Without an explicit $timeformat , the default $timeformat would have :
(1) 1st argument i.e units_number as 1ps ( since it’s the smallest time precision argument )
(2) 2nd argument i.e precision_number as 0
(3) 3rd argument i.e suffix_string as null string i.e “”
(4) 4th argument i.e minimum_field_width as 20
%t would assume its value argument is in time units of 10ns ,
but the default $timeformat says to scale it back to 1ps, with 0 decimal places of precision.
1.54345 ( assuming in time unit of 10ns ) when converted to 1ps would be 15434.5
Using 0 decimal place of precision , shouldn’t it be scaled to 15435 ?
EDIT : There is No rounding-off in this code as there are No delay statements !!
In both display statements , d retains it’s value 1.54345