Getting started with the Aurora 8B/10B IP core in one day (1)----How to understand the Aurora 8B/10B protocol?

        This article mainly refers to Xilinx "SP002--Aurora 8B/10B Protocol Specification".

        Series Summary: Getting Started with Aurora 8B/10B IP Core in One Day----Summary (Direct Link)


1 Overview

        The Aurora 8B/10B protocol is a scalable lightweight link layer protocol (developed by Xilinx) for moving data between point-to-point serial links. The protocol allows independent operation, but can run protocols such as Ethernet and TCP/IP, or other self-defined protocols on the basis of its physical layer, which undoubtedly provides great flexibility and scalability for applications.

        The Aurora 8B/10B protocol defines the following:

  • Physical layer interface: electrical characteristics, clock coding, symbol coding
  • Initialization and error handling: Defines the initialization operation before communication between the two communication parties, and also defines the operation of both communication parties when an error occurs
  • Data striping: defines how the communication data is mapped to multiple channels
  • Link layer: The link layer defines how user data is encapsulated
  • Flow control: The flow control mechanism solves the problem of insufficient cache caused by inconsistent rates between the two communication parties

        What the Aurora 8B/10B protocol does not define:

  • Error Indication and Recovery: The Aurora 8B/10B protocol does not define a mechanism for detecting user pdu errors, nor does it define a mechanism for recovering from errors outside of 8B/10B encoding
  • Data exchange: The Aurora 8B/10B protocol does not define an addressing scheme and therefore cannot support link layer multiplexing or switching

        The figure below is a typical flow chart of full-duplex serial communication based on the Aurora 8B/10B protocol. The two devices involved in the communication are called channel partners (translated by themselves, which may not be appropriate), and the user communicates with the Aurora interface through the user interface, and the transmitted content can be user data (user PDUs) or user PDUs. flow control. There may be one lane or multiple paths between Aurora interfaces for serial data transmission.

2. Data transmission and reception

        Compared with other high-speed serial protocols, the Aurora 8B/10B protocol is a concise protocol, which defines the content of the link layer and the physical layer, making the encapsulation relatively low-level.

        The transmission of user data can be divided into the following four stages:

  1. Padding (padding): The transmission of data is based on 2 symbols, so the number is an even number. If the transmitted data is an odd number, one byte needs to be padded, usually 0x9C
  2. Link Layer Encapsulation (link layer encapsulation): add frame header (SCP, 2 bytes), frame trailer (ECP, 2 bytes)
  3. 8B/10B Encoding (8B/10B encoding): try to achieve a balance of 0 and 1 (DC balance), and make the data have enough transition edges to recover the clock
  4. Serialization and Clock Encoding: Serialization and Clock Encoding

        The receiving of user data is actually the reverse process of sending, which can also be divided into the following four stages:

  1. Deserialization: Converts received serial data into parallel data
  2. 8B/10B decoding of channel PDU payload (8B/10B decoding): Convert the data that has been encoded into 8B/10B format into ordinary format (ie, byte format)
  3. Link layer stripping: Strip the frame data encapsulated at the head and tail of the frame, leaving only the user data (or 0x9C with padding)
  4. Pad stripping: strips if 0x9C is padded, leaving only user data

3. Flow Control

        Although both sides of the communication (TX side and TX side) have FIFO for data buffering, there is still a possibility that the FIFO is full and data is lost due to the difference in rates between the two sides of the communication. In order to prevent this, Aurora 8B/10B The protocol introduces a flow control mechanism.

        Why do we need flow control? When the two parties are communicating, the sender's rate is not necessarily the same as the receiver's rate. If the sender's sending rate is too fast, the receiver will not be able to handle it. At this time, the receiver can only process However, the incoming data is stored in the buffer area (out-of-order packets will also be stored in the buffer area). If the buffer area is full and the sender is still sending data frantically, the receiver can only discard the received data packets. A large number of packet loss will greatly waste network resources. Therefore, we need to control the sending rate of the sender so that the It is good that the receiver and the sender are in a dynamic balance. The control over the sending rate of the sender is called flow control.

        There are two flow control mechanisms currently supported: Native Flow Control (local flow control); User Flow Control (user flow control).

        From the figure below we can see how the flow control works.

        Local flow control operation:

        The RX state machine monitors the amount of data used for the RX FIFO and generates flow control data in place of user data once it is at risk of overflowing. After the TX side receives these flow control data, it will suspend the transmission for a period of time according to the data content, so that the RX side has enough time to process the data.

        The format of the local flow control data is as follows: the first byte is the SNF symbol (start of native flow control); the first 4 bits of the second byte indicate the interval that needs to be paused (in units of transmitting a single symbol), and the last 4 bits are reserved.

        User flow control operation:

        The user flow control operation is actually similar to the user transmitting data, the difference is that it transmits flow control information, and the initiative of this flow control method is in the hands of the sender. Essentially, when the user needs to perform flow control, the user does not suspend the transmission, but directly sends the flow control information (the flow control information is actually invalid information).

        The format of user flow control data is as follows: the first byte is the SUF symbol (start of user flow control); the first 3 bits of the second byte represent the byte length of the following flow control information, and the last 5 bits are reserved; The flow control bytes of the previously defined length.

4. Initialization and data processing

        Before using the Aurora channel for data transmission and reception, preparation-initialization is required. The initialization process is divided into 3 stages:

  1. Lane Initialization: Activate each lane and align the received data
  2. Channel Bonding: This process binds each channel to a data channel. If the implemented function only uses a single link, channel binding is not required and will be ignored
  3. Channel Verification: This process performs the alignment required to map the received data to the user interface and verifies the ability of the channel to transmit valid data 

        Upon reset or channel failure, the single channel initialization process synchronizes each channel transceiver with its channel partner. A channel failure is defined as any of the following:

  • Too many channel data errors
  • Excessive Agreement Violation

        Channel bonding will align the data received by each lane. Channel binding requires all lanes to be initialized before starting, as follows:

        The channel verification process is used to align data on the user interface and verify channel integrity. It essentially consists of sending a channel verification sequence on all channels in each direction. Using this known data pattern, the receiving channel partner can properly align the data on the user interface and verify the integrity of the channel. The process is as follows:

        The protocol defines two kinds of errors in data transmission and reception, namely hard errors (errors at the physical level) and soft errors (errors in parsing or frame format)

        Hard error:

  • There is an overflow signal in the received or received buffer area
  • There are too many soft errors
  • The corresponding device is being reset
  • Physical connection lost

        Soft error:

  • Disparity errors
  • Symbol errors

5, PCS given PMA layers

    The Aurora 8B/10B protocol is a high-speed serial physical communication protocol built on the GT transceiver, so its basic architecture is actually the architecture of the GT transceiver, which can be divided into two parts:  

  • PMA: (Physical Media Attachment, physical media adaptation layer): mainly responsible for physical layer content such as serial-to-parallel conversion.
  • PCS: (Physical Coding Sublayer, physical coding sublayer): mainly responsible for encoding and decoding, frame data encapsulation, idle sequence generation, etc.

        8B/10B, also called 8-bit/10-bit or 8b10b. The 8b/10b method was originally invented by IBM Corporation in 1983 and applied to ESCON (200M Interconnect System), described by Al Widmer and Peter Franaszek in IBM's publication "Research and Development".

        One of the characteristics of 8b/10b encoding is to ensure DC balance. The 8b/10b encoding method can make the number basically the same, and the consecutive "1" or "0" does not exceed 5 bits. , that is, a "0" or "1" must be inserted after every 5 consecutive "1s" or "0s" to ensure that the signal is DC balanced, that is, no DC offset occurs when the link times out. Through 8b/10b encoding, it can ensure that the transmitted data string can be restored correctly at the receiving end. In addition, using some special codes (K code in the PCI-Express bus) can help the receiving end to restore the work , and can detect transmission errors of data bits at an early stage , suppressing the continued occurrence of errors.

        8b/10b encoding is to decompose a group of continuous 8-bit data into two groups of data, a group of 3 bits and a group of 5 bits, after encoding, they become a group of 4-bit codes and a group of 6-bit codes, thus forming A group of 10 bits of data is sent out. In contrast, decoding is to transform a group of 10-bit input data to obtain 8-bit data bits . The data value can be uniformly represented as DX.Y or KX.Y, where D represents the data code, K represents the special command code, X represents the low 5 EDCBA of the input raw data, and Y represents the high value of the input raw data. 3-bit HGF.

        8b/10b encoding is the encoding mechanism used by many high-speed serial buses, such as USB3.0, 1394b, Serial ATA, PCI Express, Infini-band, Fibre Channel, RapidIO and other buses or networks.

        

Guess you like

Origin blog.csdn.net/wuzhikaidetb/article/details/123723408