Ieeeee protocols

Labels are not inserted in all packets. The frequency of tagging is determined by the DBC (data block counter) field in the AVBTP header. Usually every eighth media sample is converted to a 32-bit value (within a few ns) and summed with a normalized delay value. We will discuss this process later.

The new IEEE 802.1 standards: a single network for all data types

This article describes protocols for transmitting audio and video streams over Ethernet lines.

The IEEE 802.1 standard for implementing audio/video bridging (ABV) is nearing completion. IEEE 802.1 protocols are based on Ethernet technology, but feature a number of enhancements that allow time-synchronized, low-latency streaming data. Ethernet networks are used everywhere, so it is convenient to use them for transmission of audio and video signals in real time.

The IEEE 1722 AVB Transport Protocol (AVBTP) for Ethernet AVB is based on the IEEE 1394 standard and supports the full set of media formats and encryption and synchronization mechanisms defined in IEEE 1394.

Devices that support AVB and AVBTP interfaces are now actively entering the market.

IEEE 802.1 standards

Let's take a closer look at the major IEEE 802.1 AVB standards.

IEEE 802.1AS Precision Time Protocol (PTP) is a protocol for setting precise time. It is based on the IEEE 1588:2002.2 synchronization standard. PTP devices exchange standard Ethernet messages to synchronize all nodes on the network and tie them to a common timeline. The protocol defines algorithms for selecting the master clock, the order of message exchange, mechanisms for measuring and compensating for line delays, and methods of speed correction.

PTP protocol was originally created as a simplified version of IEEE 1588. The fundamental difference between them is that PTP protocol refers to Layer 2 of the OSI model, it is not an IP protocol. Like IEEE 1588, PTP defines an automatic method for negotiating the main clock of the network and the best master clock algorithm (BMCA – best master clock algorithm). PTP nodes can be assigned one of eight priority levels based on their clocking quality. The BMCA algorithm defines the basic negotiation mechanisms, which are used to identify the network's master clock, the AVB LAN Grandmaster. Once it is selected, the synchronization process starts automatically.

In brief, the procedure is as follows. While the PTP message is being processed by an 802.1AS node, the PTP Ethertype protocol starts the process of sampling a local real-time counter (RTC) value. Subordinate nodes (slaves) compare their time readings with the reference time. Given the line delay, they adjust the readings. After all devices have adjusted their counters, the baud rate is adjusted. To do this, SYNC and FOLLOW_UP messages are sent periodically.

Thus, all PTP nodes are synchronized with a reference clock (Wall Clock) with an accuracy of 1 µs on a segment containing no more than seven network segments.

IEEE 802.1Qat Stream Reservation Protocol (SRP) – A resource reservation protocol. Ethernet standards do not provide for deterministic and priority transmission of time-critical streams. To ensure guaranteed quality of service, SRP protocol provides end-to-end bandwidth availability for audio or video data transmission. For other data, the channel remains blocked until explicitly or implicitly freed from streaming data. The SRP standard uses the IEEE 802.1ak Multiple Registration Protocol exchange protocol to transmit flow description requests, channel reservation requests, and response messages.

IEEE 1588 Precision Time Protocol (PTP)

Many articles are written about the well-known Network Time Protocol (NTP), some of them mention the Precision Time Protocol, which supposedly allows you to achieve accuracy in the order of nanoseconds (for example, here and here). Let's find out what this protocol is and how to achieve such accuracy. Let's also look at the results of my work with this protocol.

Introduction

"Precision Time Protocol" is described by the IEEE 1588 standard. There are two versions of the standard. The first version came out in 2002, then the standard was revised in 2008 and PTPv2 came out. There was no backward compatibility.
I work with the second version of the protocol, it has many improvements over the first one (accuracy, stability according to the wiki). I won't cite comparisons with NTP, the mere mention of the synchronization accuracy, and the accuracy of PTP is indeed tens of nanoseconds with "iron" support, speaks of the advantage over NTP.
"Iron" protocol support can be implemented differently in different devices. In fact, the minimum required to implement PTP is the ability of the "iron" to time-stamp the moment the message is received on the port. The time stamp will be used to calculate the error.

Why does the clock get upset?

Errors can come from anywhere. To begin with, the frequency generators in the devices are different and it is very unlikely that two different devices will work perfectly on beat to beat. You can also attribute this to the constantly changing environmental conditions affecting the generated frequency.

What are we trying to accomplish?

Suppose we have a device working under ideal conditions, some atomic clock that will not go off at all until the end of the world (of course, until the real one, not the one ordained by the Mayan calendar) and are given the task of getting at least approximately (with an accuracy of 10 -9 sec) the same clock. We need to synchronize these clocks. For this we can implement the PTP protocol.

Read More:
WifiParts, Inc