Who doesn't need Ethernet timestamps? - Embedded.com

Who doesn’t need Ethernet timestamps?

IEEE 1588 has matured from its humble beginning in 2002 as a mechanism to synchronize Ethernet-connected test equipment into a protocol that is widely used on many of the circuit boards it was originally designed to test.

In fact, IEEE 1588 is the root of new timestamping for Industrial Ethernet protocols such as PROFINET, CIP SYNC, IEEE 802.1AS audio video bridging, the LXI consortium for the Test & Measurement industry, ITU G.8261 for telecommunications, IEC 81650 and numerous proprietary solutions which synchronize disparate Ethernet-networked clocks.

As defined by the IEEE 1588 committee, its precision time protocol (PTP) supports:

• High clock synchronization accuracy typically better than a microsecond

• Fast synchronization of networked clocks in typically fewer than 20 clock cycles

• Minimal compute and network footprint

• Synchronization of heterogeneous clocks with varying accuracy, resolution, drift and stability characteristics

• Easy configuration and operation by non-expert users for low cost and administrative setup

In July 2008, the committee released a second version (V2), which extends IEEE 1588 into larger high-performance networks. It is expected that most network systems designers will select or migrate to V2 now that it is available.

But many embedded applications already benefit from Ethernet timestamp protocols and can only be expected to proliferate further in the future with the availability of Version 2.0.

Factory and process automation applications use them it to synchronize sensors and actuators over single-wire distributed network to control automated assembly processes and time-based motion control.

Aerospace applications use them to synchronize vehicle controls. Power line management applications synchronize across large-scale distributed power grid for smooth power transfer.

Networking and telecommunications use them to lower the cost of high-precision time synchronization between communicating nodes. Professional and consumer multimedia applications are starting to use them to ensure customers don't hear or see effects of packet delay or loss from Ethernet-connected speakers and monitors.

Implementation options
Potential users can choose from several implementation options. Depending on their requirements, timestamps may be applied:

• As the packet reaches the application layer on any central processing unit (CPU). This “software timestamp” is always the least accurate option.

• As the packet enters the media access (MAC) or physical (PHY) layer of an integrated processor. This “hardware timestamp” removes inaccuracy caused by interrupts and other applications running in the processor.

• As the packet enters the MAC or PHY layer of a second device adjacent to the processor. This hardware timestamp also removes inaccuracy caused by interrupts and other applications running in the processor.

The cost to develop and deploy these systems can vary greatly depending on system architecture and the level of synchronization accuracy that is required. We will now discuss which types of applications can best use each option.

Software timestamp . The software-only implementation timestamps packets in the application layer which is furthest away from the physical layer. This implementation yields the least accuracy due to the largest amount of delay and jitter that occurs in passing the timestamp through the various layers (Figure 1 ).

Figure 1: CPU-based software timestamp gives less accurate clock synchronization

View the full-size image (image provided by authors).

View an enlargement of image provided by authors (note: image will be slightly blurry).

Software timestamps typically give errors on the order of microseconds to milliseconds depending on the operating system and platform. For example, laboratory tests of a generic personal computer running a Windows operating system and IXXAT IEEE 1588 application software gave a timestamp resolution of 1 millisecond (ms) with standard deviation +/- 1.5 ms and maximum deviation +/- 50 ms.

An evaluation board for the Freescale MPC8349 PowerQUICC processor running a Linux operating system and the same IXXAT application software gave a significantly better timestamp resolution of 1 microsecond (µs) with the same standard and maximum deviations.

Software timestamps with accuracies between 1 ms and 1 µs may be considered for applications such as:

• Financial services auditing which must accurately timestamp financial data to comply with Sarbanes Oxley and recent standards developed by credit card service organizations

• Healthcare applications which require accurate time authentication to improve patient safety and meet requirements of regulations such as HIPAA and FDA

• Universities and colleges which must comply with FERPA and HIPAA regulations to authenticate records, digital signatures and secure accurate data

• Transportation services such as air, rail and bus which use time synchronization to improve operational efficiency

• Manufacturing facilities which must synchronize display clocks, monitor worker attendance and calibrate instruments

• Legal entities which use time synchronization for accurate billing, auditing, litigation and authenticating client messages.

Integrated MAC- or PHY-layer hardware timestamp
Timestamp accuracy directly influences the resulting clock synchronization accuracy. Software-only timestamps based on a UDP/IP socket interface are considerably less accurate than hardware timestamps directly mapped into the interrupt service of an Ethernet controller.

Figure 2: MAC or PHY-based hardware timestamp significantly improves clock synchronization accuracy

View the full-size image (image provided by authors).

View an enlargement of image provided by authors (note: image will be slightly blurry).

Generating timestamps closer to the wire reduces delay and software stack jitter to increase clock synchronization accuracy (Figure 2 ). Hardware timestamps are typically generated in a timestamp unit (TSU) included in the Media Independent Interface (MII) which operates together with the real-time clock hardware (Figure 3 ).

For example, laboratory tests of an evaluation board for the Freescale MPC8360 PowerQUICC processor running a Linux operating system and version 2 of the IXXAT IEEE 1588 application software gave a timestamp resolution of 8 nanoseconds (ns) with standard deviation +/- 7 ns and maximum deviation +/- 30 ns.

Figure 3: IEEE 1588 implementation with IEEE 1588 hardware timestamp in Ethernet MAC

View the full-size image (image provided by authors).

View an enlargement of image provided by authors (note: image will be slightly blurry).

Hardware timestamps with accuracies better than 1 µs may be considered for applications such as:

• Telecommunication remote switches, digital loop carriers, mobile telephone switching stations, base stations and enterprise PBXs/routers, which need an accurate and stable timing source to support clear communication over long distances

• Digital video broadcasting, which requires all transmitters in a Single Frequency Network to be time synchronized to give identical emitted signals

• Data network switches which must be time synchronized to reduce jitter and delay

• Geospatial intelligence for imagery and analysis of geospatial information requires accurate time synchronization of video feeds

• Aerospace and defense applications which require accurate time synchronization for network timing, radar systems, traffic control, test ranges, satellites, monitoring and ground based instrumentation

• Building automation for synchronizing video, alarms, access, records and reporting

External MAC- or PHY-layer hardware timestamp
Since many legacy products use microcontrollers together with FPGAs, adding the TSU to the FPGA and the remaining modules to a microcontroller can reduce development costs. The FPGA serves as an external hardware timestamp assist to run the higher layer modules in a microcontroller. While this implementation will not match the performance of an integrated hardware timestamp, it is close and sometimes less costly.

For example, laboratory tests of an evaluation board for a Freescale PowerQUICC processor with an FPGA doing the timestamp function gave a timestamp resolution of 40 ns with standard deviation +/- 25 ns and maximum deviation +/- 200 ns.

Similarly, hardware timestamps can be performed in an external PHY to give excellent low-nanosecond resolution. In this case, the PHY is the closest device to the wire, so it can provide accuracies similar to those seen with integrated hardware timestamps solutions.

For example, laboratory tests of an evaluation board for the Freescale MCF5234 ColdFire processor with a National Semiconductor Precision PHYTER® doing the timestamp function gave a timestamp resolution of 8 ns with standard deviation +/- 12 ns and maximum deviation +/- 80 ns.

Hardware timestamps with accuracies better than 500 ns may be considered for applications such as:

• Test and measurement

• Industrial automation for synchronous applications such as machine and motion control, industrial networking, vision and scanning systems

• Electric power monitoring and switching for transmission substation integrated protection, system control and data acquisition. Accurate time synchronization of control systems helps maximize network efficiency and aid in disaster recovery because the network is able to operate closer to capacity and coordination and reporting can be centralized. Outage durations are minimized when faults are diagnosed remotely.

• Equipment monitoring for preventative maintenance of large turbo machinery, nuclear plants and electrical power plants

• Public Safety Answering Points (PSAPs)

• Ethernet-based audio/video bridging (AVB) is a developing standard that specifies the protocol, data encapsulations and procedures used to ensure that audio and video-based end stations can communicate and interoperate using standard lower layer networking services that meet the requirements for time-sensitive applications.

• Laser measurement systems

• Radio frequency identification (RFID)

• Communication satellites require accurate time synchronization to perform direct-to-home digital television and wireless communication

• Planetary spacecraft for low earth orbit (LEO) and geostationary orbit (GEO) satellites

• Printing machinery for time synchronization of machine functions to improve throughput

• Synchronization of sub-sea acoustic sensor networks

Forward momentum
We now recognize how many applications can use Ethernet timestamps to do tasks more effectively. This is creating tremendous momentum to implement clock synchronization and packet timestamps throughout standard Ethernet networks.

As we resolve each technical challenge, it becomes easier to imagine new applications for Ethernet timestamps.

Alexandra Dopplinger , P.Eng., is Freescale Semiconductor's Global Industrial Segment Lead for Factory Automation and Drives. Her special interests include industrial network protocols, motor control and robotics. She graduated with B.Eng. (Electrical) from Memorial University of Newfoundland and holds a patent for a redundant LAN implementation.

Originally educated as an engineer, Bill Seitz has worked in the field of embedded systems for over 30 years specializing in field bus and data communication. Bill is currently the Managing Director of IXXAT for North America.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.