Xilinx UG492 Switch User Manual


 
Ethernet AVB Endpoint User Guide www.xilinx.com 167
UG492 July 23, 2010
Appendix A
RTC Time Stamp Accuracy
Time Stamp Accuracy
The accuracy of the time stamps, taken by sampling the “Real Time Clock” (RTC)
whenever PTP frames are transmitted or received, is essential to the Precise Timing
Protocol across the network link. For this reason, the time stamps are performed in
hardware. Despite this, time stamp inaccuracies can be introduced from two sources:
“RTC Real Time Instantaneous Error”
“RTC Sampling Error”
Following this discussion, we then consider the “Accuracy Resulting from the Combined
Errors.”
RTC Real Time Instantaneous Error
Figure A-1 illustrates a RTC implementation which uses a 40 ns clock period as its clock
source (this is worst case). Therefore, the controlled frequency RTC will only be updated
every 40ns. Because the concept of a RTC is a continuous measurement of time, the
implementation of the RTC illustrated in Figure A-1 is only accurate immediately after an
update. During the 40 ns update cycle, the error accrues linearly to a maximum of 40 ns.
This behavior is periodic as illustrated.
In Figure A-1, two time stamps of the RTC are sampled. The figure shows that the accuracy
is variable. For example:
The 1st time stamp is requested at 119 ns. However, the RTC has yet to update and so
the sample taken will be of 80 ns. This has an inaccuracy of 39 ns.
The 2nd time stamp is requested at 201 ns. The RTC has recently updated and so the
sample taken will be of 200. This has an inaccuracy of 1 ns.