How to implement IEEE 1588 time stamping in an Ethernet transceiver

This post is co-authored by Rob Rodrigues.

The Institute of Electrical and Electronics Engineers (IEEE) 1588 Precision Time Protocol (PTP) offers a way to synchronize the time between different nodes on an Ethernet network. Typically, IEEE 1588 PTP clock-synchronization accuracy is significantly less than 10µs, making it suitable for applications ranging from factory automation to telecommunications. For instance, in factory automation this protocol can synchronize sensors to control time-based assembly processes that require improved link times or low latency. There are several different ways to implement IEEE 1588 PTP, however, and in this post, we will discuss some different options.

Software time stamp

The most common way to implement an IEEE 1588 PTP system is to perform time stamping in the PTP stack when receiving packets from the Ethernet buffer queue, as shown in Figure 1. But employing this method of time stamping is susceptible to large variations in time because software handles the Ethernet queue.

 Figure 1: IEEE 1588 software time-stamp block diagram

Start-of-frame detect – software time stamp

An improved method performs time stamping within the media access control (MAC) layer of the processor when the PTP packets are buffered. This method, shown in Figure 2, is called start-of-frame detect (SFD) and must be supported by an Ethernet transceiver. SFD is a general purpose input/output (GPIO) pulse sent to the MAC upon reception or transmission of an Ethernet packet. The GPIO pulse has a repeatable and precise relationship to the traffic on the wire. The precision with respect to network traffic enables the PTP algorithm to accurately estimate the delay across the media.

 Hardware time stamp

The most accurate approach to IEEE 1588 is to implement time-stamp functionality directly into the hardware of the Ethernet physical layer (PHY) (Figure 3). This requires additional circuitry within the Ethernet transceiver, but provides a more accurate time stamp than SFD. The Ethernet transceiver inserts the time stamp into the packet as close to the wire as possible, which the PTP stack then extracts. The MAC has no need to insert time stamps, freeing up system resources.

 Figure 3: Hardware time-stamp block diagram

When SFD is a critical component of your system, choose the DP83822, TI’s newest 10/100Mbps PHY with IEEE 1588 SFD. If every picosecond of accuracy counts, the DP83640 supports integrated 1588v2 hardware time stamping.

Given the various implementations of IEEE 1588 PTP within the Ethernet transceiver, which implementation will you choose? Log in to leave a comment or visit the TI E2E™ Community Ethernet forum.

Additional resources