4.2.5 Precision of the scheduler clock used in ns

Precision of the scheduler clock can be defined as the smallest time-scale of the simulator that can be correctly represented. The clock variable for ns is represented by a double. As per the IEEE std for floating numbers, a double, consisting of 64 bits must allocate the following bits between its sign, exponent and mantissa fields.

sign exponent mantissa 1 bit 11 bits 52 bits

Any floating number can be represented in the form () where X is the mantissa and n is the exponent. Thus the precision of timeclock in ns can be defined as (). As simulation runs for longer times the number of remaining bits to represent the time educes thus reducing the accuracy. Given 52 bits we can safely say time upto around () can be represented with considerable accuracy. Anything greater than that might not be very accurate as you have remaining 12 bits to represent the time change. However () is a very large number and we donot anticipate any problem regarding precision of time in ns.

Tom Henderson 2011-11-05