PCIe (Peripheral Component Interconnect Express) equipment, communication system and method based on Flit transmission mechanism

By introducing the Flit transmission mechanism reconstruction module into the PCIe link, active identification and rapid recovery of link faults are achieved, solving the problems of insensitive link fault identification and delayed response in the existing technology, and improving system stability and self-healing capabilities.

CN120785745AActive Publication Date: 2025-10-14SHANGHAI XINLIJI SEMICON CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511188159.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-14
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing PCIe links are unable to achieve rapid self-healing and protocol-level intervention in complex dynamic system environments. Link fault identification is insensitive, response is delayed, and there is a lack of active triggering mechanism. The Flit structure is not extended to carry and exchange link health information, and the LTSSM state machine cannot be actively controlled by the upper-layer protocol.

Method used

A reconstruction module based on the Flit transmission mechanism is introduced, including a Flit encapsulation processing unit, a fault monitoring unit, and a Fault Flit generation unit. By monitoring link faults and generating Fault Flit information, the remote device analyzes the fault type and actively triggers LTSSM state machine renegotiation to eliminate the fault.

Benefits of technology

It achieves accurate identification and rapid recovery of link failures, improves link self-healing capabilities, enhances link stability and robustness, and supports rapid adaptation and software and hardware decoupling under different link topologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120785745A_ABST
    Figure CN120785745A_ABST
Patent Text Reader

Abstract

The invention discloses PCIe equipment based on a Flit transmission mechanism and a communication system and method. The equipment comprises a data link layer, a physical coding layer and a reconstruction module, and the reconstruction module comprises a Flit packaging processing unit, a fault monitoring unit and a Fault Flit generation unit; the Flit packaging processing unit carries out Flit packaging on the data sent by the data link layer; the fault monitoring unit monitors a PCIe link transmitted from the physical coding layer to the remote equipment; in response to the fact that the fault monitoring unit monitors that the PCIe link has the preset fault feature, the Fault Flit generation unit generates Fault Flit information reflecting the current fault type and sends the Fault Flit information to the remote equipment; and waiting for the far-end device to analyze the Fault Flit information to determine a corresponding recovery strategy, and then re-negotiating the PCIe device and the far-end device based on the LTSSM state machines of the respective physical coding layers to eliminate the fault.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, and in particular to a PCIe device based on a Flit transmission mechanism, a communication system and a method. BACKGROUND

[0002] With the increasing demand for interconnection bandwidth and reliability in applications such as high-performance computing, artificial intelligence and data centers, the stability and fault recovery capability of the link of PCI Express (PCIe) as the mainstream high-speed interconnection bus standard are facing new challenges. In particular, in PCIe 6.0, Flit (Flow Control Unit) and FEC (Forward Error Correction) mechanisms are introduced to improve link efficiency and data integrity. However, in the face of complex and dynamic system operating environments, how to achieve more intelligent and refined link state management is still the key to improving system stability.

[0003] Current PCIe link fault monitoring and recovery mainly relies on the automatic detection mechanism of the physical layer, and the Link Training and Status State Machine (LTSSM) state machine completes the training, recovery and renegotiation process. Such mechanisms are suitable for most static physical fault recovery scenarios and can improve link stability to some extent, but their response mode is mainly passive and cannot meet the needs of rapid self-healing and protocol-level intervention, mainly in the following aspects: First, it is not sensitive to link faults and is difficult to accurately capture soft failures or transient disturbances in a timely manner; Second, there is a lack of a link self-healing mechanism triggered by the protocol layer quickly and actively, and the recovery process must wait for the bottom layer physical layer to detect errors and respond passively, with high response lag; Third, the Flit structure itself is not extended for carrying and interacting link health information, and the upper layer cannot embed instructions or flags in the Flit stream to coordinate link management; Fourth, although the LTSSM state machine integrates training and renegotiation functions, its triggering mechanism is limited to physical layer events and cannot be actively controlled by the link data link layer or upper protocol.

[0004] The disclosure of the above background art content is only used to assist in understanding the concept and technical solutions of the present application, and it does not necessarily provide technical teaching. SUMMARY

[0005] The purpose of the present application is to provide a PCIe communication scheme based on a Flit transmission mechanism, to construct a new PCIe architecture with a reconstruction module, and to use the reconstruction module to bypass the physical layer automatic judgment logic and actively trigger the link self-healing process.

[0006] To achieve the above object, the technical scheme adopted by the present application is as follows: A PCIe device based on a Flit transmission mechanism, comprising a data link layer and a physical coding layer, the PCIe device further comprising a reconstruction module based on the Flit transmission mechanism, the reconstruction module comprising a Flit packaging processing unit, a fault monitoring unit and a Fault Flit generating unit; The Flit packaging processing unit is configured to package data transmitted by the data link layer into Flit and transmit the packaged data to the physical coding layer; The fault monitoring unit is configured to monitor the PCIe link transmitted by the physical coding layer to a remote device; In response to the fault monitoring unit monitoring that the PCIe link has a preset fault feature, the Fault Flit generating unit generates Fault Flit information and transmits it to the remote device, the Fault Flit information reflecting the current fault type; Waiting for the remote device to analyze the Fault Flit information to determine the corresponding recovery strategy; According to the determined recovery strategy, the PCIe device and the remote device re-negotiate based on the LTSSM state machine of the respective physical coding layer to eliminate the fault.

[0007] Further, any of the technical solutions or combinations of multiple technical solutions described above, the remote device and the PCIe device have the same configuration, the reconstruction module further comprises an analysis unit, the analysis unit adopts an input decoding rule matched with the output encoding rule of the Fault Flit generating unit; The remote device analyzes the Fault Flit information to determine the corresponding recovery strategy in the following way: after receiving the Fault Flit information, the analysis unit of the reconstruction module of the remote device analyzes the Fault Flit information to obtain the parameter values of each field in it, and determines whether the current fault type is a local fault or a global fault according to the parameter values of the fields; According to the determined fault type, determine whether to use a first recovery strategy matched with the local fault or a second recovery strategy matched with the global fault.

[0008] Further, any of the technical solutions or combinations of multiple technical solutions described above, the reconstruction module further comprises an LTSSM soft control interface, the LTSSM soft control interface is configured to connect the LTSSM state machine; In response to the remote device determining that the current fault type is a global fault, the PCIe device and the remote device re-negotiate based on respective LTSSM state machines to eliminate the fault, including either of the following two manners: Based on a preset protocol, the reconstruction module in the remote device sends a state rewriting request to the corresponding LTSSM state machine through the LTSSM soft control interface, and the reconstruction module in the PCIe device sends a state rewriting request to the corresponding LTSSM state machine through the LTSSM soft control interface, and the respective LTSSM state machines enter a retraining state in response to the rewriting request; Alternatively, based on a preset protocol, the reconstruction module in the remote device sends a state rewriting request to the corresponding LTSSM state machine through the LTSSM soft control interface, and the LTSSM state machine of the remote device re-negotiates with the LTSSM state machine of the PCIe device, and then the two LTSSM state machines enter a retraining state in synchronization.

[0009] Further, in any of the technical solutions or the combination of the multiple technical solutions described above, the feature that the remote device determines that the current fault type is a global fault includes that: The Flit encapsulated data includes a preset alignment marker bit, and the Fault Flit information includes an error code field; The remote device receives transmission data of the PCIe link, and uses the physical coding layer to parse the alignment marker bit in the data, and if the alignment marker bit does not appear in a preset position, the fault monitoring unit determines that data alignment fails; The Fault Flit generation unit writes an alignment failure type error code into the error code field of the Fault Flit information; If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information to obtain an alignment failure type error code parameter, it is determined that the current fault type is a global fault.

[0010] Further, in any of the technical solutions or the combination of the multiple technical solutions described above, the feature that the remote device determines that the current fault type is a global fault includes that: The Fault Flit information includes an error code field; If the fault monitoring unit determines that there is no data in a lane in the PCIe link, it is determined that a lane is lost; The Fault Flit generation unit writes a lane loss type error code into the error code field of the Fault Flit information; If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information and obtains a lane loss type error code parameter, it is determined that the current fault type is a global fault.

[0011] Further, in any of the above technical solutions or the combination of the above technical solutions, the feature that the remote device determines that the current fault type is a local fault comprises that: The Flit encapsulated data is previously set to include a CRC field, and the Fault Flit information includes a fault lane identification field. The fault monitoring unit monitors the transmission data of each lane in the PCIe link, comprising: if the CRC check fails after the remote device receives lane data, the fault monitoring unit records and counts the CRC check failure in the lane; If the number or frequency of CRC check failures in the lane reaches a preset trigger standard, the identification parameter of the fault lane is written into the fault lane identification field of the Fault Flit information. If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information and obtains the identification parameter of the fault lane, it is determined that the current fault type is a local fault.

[0012] Further, in any of the above technical solutions or the combination of the above technical solutions, the feature that the remote device determines that the current fault type is a local fault further comprises that: The Flit encapsulated data further includes a bit error rate field. If the fault monitoring unit detects that the CRC check failure occurs in the lane data transmission, the number of transmission error bits is counted, and the bit error rate of the lane is calculated. If the bit error rate of the lane reaches a preset trigger standard, the identification parameter of the fault lane is written into the fault lane identification field of the Fault Flit information. If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information and obtains the identification parameter of the fault lane, it is determined that the current fault type is a local fault.

[0013] Further, in any of the above technical solutions or the combination of the above technical solutions, the feature that the remote device determines that the current fault type is a local fault comprises that: The Fault Flit information is previously set to include a fault lane identification field. The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if no response data indicating successful receipt of the PCIe data packet returned by the remote device is received within a preset period, the fault monitoring unit determines that a data reception timeout has occurred in the channel, and then the fault flit generation unit writes the identification parameter of the fault channel into the fault channel identification field of the fault flit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain an identification parameter of the fault channel, it is determined that the current fault type is a local fault.

[0014] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, in response to determining that the current fault type is a local fault, eliminating the fault based on the first recovery strategy includes: According to the identification parameters of the fault channel obtained by parsing the Fault Flit information, the reconstruction modules of the PCIe device and the remote device respectively change the channel configuration of the corresponding LTSSM state machine through their LTSSM soft control interfaces to disable the fault channel corresponding to the identification parameters, and the PCIe device stops allocating data to be transmitted to the disabled channel.

[0015] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, if the number of channels configured to be disabled reaches a preset number, the PCIe device negotiates with the LTSSM state machine of the remote device to reduce the transmission speed, and uses the fault monitoring unit of the reconstruction module to monitor the data transmission of the link in real time; If it is monitored that the data transmission of the link reaches a preset recovery standard, the PCIe device negotiates with the LTSSM state machine of the remote device to configure some or all disabled channels to be transformed into an enabled state.

[0016] According to another aspect of the present invention, the present invention provides a PCIe communication system, comprising at least two PCIe devices as described above, wherein either one serves as a transmitting end PCIe device and the other serves as a receiving end remote device.

[0017] According to another aspect of the present invention, a PCIe communication method is provided. The method is used in the PCIe communication system described above to manage a PCIe link established between a transmitting PCIe device and a receiving remote device, comprising the following steps: The sending PCIe device encapsulates the data at the data link layer into Flit and monitors whether the preset fault characteristics appear on the PCIe link transmitted to the remote device; If yes, generate Fault Flit information that can reflect the current fault type and send it to the remote device; waiting for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy; According to the determined recovery strategy, the sending end PCIe device and the receiving end remote device re-negotiate based on the LTSSM state machine of the respective physical coding layer to eliminate the fault.

[0018] Further, any of the technical solutions or combinations of the technical solutions, at least two different recovery strategies are pre-configured, including a first recovery strategy matched with a local fault type and a second recovery strategy matched with a global fault type, wherein the second recovery strategy is actively negotiated by the LTSSM state machine of the sending end PCIe device and the LTSSM state machine of the receiving end remote device, and then synchronously enters a retraining state; The first recovery strategy is to change only the channel configuration of the LTSSM state machine of the sending end PCIe device and the receiving end remote device to overcome the local fault.

[0019] Further, any of the technical solutions or combinations of the technical solutions, if any of the fault features of CRC check failure, error code rate exceeding, and data receiving timeout is monitored, the fault channel is determined, and the identification parameter of the fault channel is written into the Fault Flit information, and then the channel configuration of the LTSSM state machine is changed to disable the fault channel, and the sending end PCIe device stops allocating data to be transmitted to the disabled channel; If any of the fault features of data alignment failure and channel loss is monitored, it is determined as a global fault type, and then the LTSSM state machine is controlled to enter a retraining state.

[0020] The technical solutions provided by the application have the following beneficial effects: a. Based on the Flit transmission mechanism, the Flit data is packaged according to a specific field format, and in the case of monitoring a fault, the error prompt data is packaged according to a specific field and issued to the lower layer, so that the remote device can parse the error prompt data and execute different recovery strategies for different fault types; b. A new PCIe architecture with a reconstruction module is constructed, the reconstruction module uses the Flit transmission mechanism, can bypass the physical layer automatic judgment logic, and actively triggers the mechanism of the link self-healing process; the capture ability of short-time interference or burst error in the link is enhanced, and the recovery efficiency of slight faults is improved; c. The reconstruction module has an independent sub-layer architecture, the reconstruction module decouples the packaging, error correction, conversion and other processing of Flit from the traditional data link layer and completes independently. The introduction of the sub-layer improves the modular processing capability and facilitates fast adaptation under different link topologies and software and hardware decoupling. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative effort based on these drawings should belong to the protection scope of the present application.

[0022] Figure 1 The architecture diagram of the PCIe device based on the Flit transmission mechanism is provided for an exemplary embodiment of the present application. Figure 2 The schematic diagram of the communication system based on the Flit transmission mechanism is provided for an exemplary embodiment of the present application. Figure 3 The flowchart of determining the first global fault is provided for an exemplary embodiment of the present application. Figure 4 The flowchart of determining the second global fault is provided for an exemplary embodiment of the present application. Figure 5 The flowchart of determining the first local fault is provided for an exemplary embodiment of the present application. Figure 6 The flowchart of determining the second local fault is provided for an exemplary embodiment of the present application. Figure 7 The flowchart of determining the third local fault is provided for an exemplary embodiment of the present application. Figure 8 The flowchart of the communication method based on the Flit transmission mechanism is provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the technical personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments only represent some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should belong to the protection scope of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, device, product or apparatus including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or apparatuses.

[0025] The present application aims to define a mechanism for the upper layer to actively trigger the link self-healing process in a complex and high dynamic link environment. When the system detects a decline in link performance (such as a continuous increase in bit error rate, FEC correction capability close to the threshold, etc.), the upper layer can bypass the automatic determination logic of the physical layer and actively initiate recovery, retraining or jump to a specific LTSSM state. In other words, the present application aims to build a more intelligent, controllable and rapid response link self-healing mechanism to provide more robust operation guarantee for PCIe interconnection. The present application breaks the limitation in the traditional PCIe architecture that the LTSSM is only triggered passively by the physical layer. Through real-time monitoring of the link health status by the fault monitoring unit in the reconfiguration module, the present application can actively initiate link retraining and recovery, achieving rapid link self-healing and system robustness enhancement.

[0026] In an embodiment of the present application, a PCIe device based on a Flit transmission mechanism is provided, as shown in Figure 1 including a data link layer and a physical encoding layer, the PCIe device further comprising a reconfiguration module based on a Flit transmission mechanism, the reconfiguration module comprising a Flit packaging processing unit, a fault monitoring unit and a Fault Flit generation unit; The reconfiguration module is a Re-shaping sublayer newly added between the traditional data link layer and the physical encoding layer. As an intermediate protocol processing layer, it is responsible for receiving the TLP / DLLP format data packets output by the data link layer and completing tasks such as format regularization, error monitoring and fault marking, so as to improve the link state management capability.

[0027] The Flit packaging processing unit is configured to package the data sent by the data link layer into Flit and send the packaged data to the physical encoding layer; The fault monitoring unit is configured to monitor the PCIe link transmitted by the physical encoding layer to the remote device; In response to the fault monitoring unit monitoring that the PCIe link has a preset fault feature, the Fault Flit generating unit generates Fault Flit information and sends it to the remote device, the Fault Flit information reflecting the current fault type; Waiting for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy; According to the determined recovery strategy, the PCIe device and the remote device re-negotiate based on the LTSSM state machine of the respective physical coding layer to eliminate the fault.

[0028] Flit is the minimum transmission unit of the PCIe link layer, which contains protocol header, payload and check information, and is transmitted in a fixed size byte capacity block. Compared with the traditional TLP flow control, the Flit granularity is finer, and the congestion is reduced. The embodiment introduces a custom Flit structure, expands the header / tail information area, supports multi-TLP aggregation and reconstruction, realizes fine transmission management at the Flit granularity level, effectively improves the bandwidth utilization and reduces data redundancy. At the same time, through structure-level packaging, the data scheduling and flow control in the link are more flexible and controllable.

[0029] As shown in Figure 2 The remote device and the PCIe device have the same configuration, and the reconstruction module further includes an analysis unit, which adopts an input decoding rule matched with the output encoding rule of the Fault Flit generating unit. Therefore, the Fault Flit information generated by the Fault Flit generating unit of the PCIe device at the sending end can be parsed by the analysis unit of the remote device to reflect the current fault type, and then determine the recovery strategy matched therewith.

[0030] Specifically, after the remote device receives the Fault Flit information, the analysis unit of the reconstruction module thereof parses the Fault Flit information to obtain the parameter values of each field therein, and determines whether the current fault type is a local fault or a global fault according to the parameter values of the fields; and determines whether to adopt a first recovery strategy matched with the local fault or a second recovery strategy matched with the global fault according to the determined fault type.

[0031] Continuing to refer to Figure 2, the reconstruction module further comprises an LTSSM soft control interface configured to connect the LTSSM state machine; in response to the remote device determining that the current fault type is a global fault, the PCIe device and the remote device re-negotiate based on the respective LTSSM state machines to eliminate the fault, in one embodiment, the implementation is as follows: based on a preset protocol, the reconstruction module in the remote device sends a state override request to the corresponding LTSSM state machine through its LTSSM soft control interface, and the reconstruction module in the PCIe device sends a state override request to the corresponding LTSSM state machine through its LTSSM soft control interface, and the respective LTSSM state machines synchronously enter the retraining state in response to the override request; Alternatively, in another embodiment, the same operation is based on a preset protocol, the reconstruction module in the remote device sends a state override request to the corresponding LTSSM state machine through its LTSSM soft control interface, the difference is that in this embodiment, the LTSSM state machine of the remote device re-negotiates with the LTSSM state machine of the sending end, and then the two LTSSM state machines synchronously enter the retraining state, instead of sending an override request to the LTSSM state machine through the LTSSM soft control interface of the reconstruction module in the sending end PCIe device.

[0032] As shown in Figure 1 and Figure 2 The reconstruction module in this embodiment has an independent sub-layer architecture, which decouples the encapsulation, error correction, conversion and other processing of Flit from the traditional data link layer and completes them independently. The introduction of this sub-layer improves the modular processing capability and facilitates fast adaptation under different link topologies and software and hardware decoupling.

[0033] Another recovery strategy is described below: in response to determining that the current fault type is a local fault, specifically, a local fault is defined as a preset specific fault feature occurring in an individual channel, and the first recovery strategy corresponding to this does not cause the LTSSM state machine to completely drop offline and then retrain, but adopts a more lightweight and fast way to eliminate the fault, including: according to the identification parameter of the fault channel obtained by analyzing the Fault Flit information, the respective reconstruction modules of the PCIe device and the remote device change the channel configuration of the corresponding LTSSM state machine through its LTSSM soft control interface, so that the fault channel corresponding to the identification parameter is disabled, and the PCIe device stops allocating data to be transmitted to the disabled channel, without affecting other channels to continue normal data transmission.

[0034] From the above, the present application aims to provide a recovery scheme different from the conventional recovery scheme of retraining the LTSSM state machine when a link fault is detected, but according to the fault severity, it is determined whether the fault is of a local nature or a global nature, and further, it is determined whether the first recovery strategy of fast recovery or the second recovery strategy of thorough recovery is adopted.

[0035] The characteristics of the global fault and the local fault are described below: The method for identifying the characteristics of the first global fault is as shown in Figure 3 The method for identifying the characteristics of the first global fault is as shown in The pre-set Flit encapsulated data includes a pre-set alignment marker bit, and the Fault Flit information includes an error code field; The remote device receives the transmission data of the PCIe link, and uses the physical coding layer to parse the alignment marker bit in the data, and if the alignment marker bit does not appear at the pre-set position, the fault monitoring unit determines that the data alignment fails; The Fault Flit generation unit writes the alignment failure type error code into the error code field of the Fault Flit information; If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information and obtains the alignment failure type error code parameter, it is determined that the current fault type is a global fault.

[0036] The method for identifying the characteristics of the second global fault is as shown in Figure 4 The method for identifying the characteristics of the second global fault is as shown in The pre-set Fault Flit information includes an error code field; If the fault monitoring unit determines that there is no data in the channel in the PCIe link, it is determined that the channel is lost; The Fault Flit generation unit writes the channel loss type error code into the error code field of the Fault Flit information; If the analysis unit of the reconstruction module in the remote device analyzes the Fault Flit information and obtains the channel loss type error code parameter, it is determined that the current fault type is a global fault.

[0037] The method for identifying the characteristics of the first local fault is as shown in Figure 5 The method for identifying the characteristics of the first local fault is as shown in The pre-set Flit encapsulated data includes a CRC field, and the Fault Flit information includes a fault channel identification field; The fault monitoring unit monitors the transmission data of each lane in the PCIe link, including: the remote device receives the transmission data of the PCIe link, and parses the data of each lane by using a physical coding layer; a CRC check process can be automatically executed by the physical coding layer and the data link layer hardware of the remote device, and after recalculating the CRC by using an independent hardware circuit, the CRC field parameters in the received Flit encapsulated data are compared, if they are inconsistent, the lane where the data is located has a CRC check failure, the remote device returns a check failure message to the sending end PCIe device, and the fault monitoring unit records and counts the CRC check failure in the lane; If the number or frequency of CRC check failures of one lane reaches a preset trigger standard, such as 3 consecutive transmission data CRC check failures in the same lane, or more than 2 CRC check failures in a preset period, the lane is determined as a fault lane, and the identification parameter of the fault lane is written into the fault lane identification field of the Fault Flit information. If the identification parameter of the fault lane is obtained by the analysis unit of the reconstruction module in the remote device by analyzing the Fault Flit information, it is determined that the current fault type is a local fault, and it can be determined which lane needs to be disabled.

[0038] The method for identifying the characteristics of the second local fault is as shown in Figure 6 The Flit encapsulated data further includes a bit error rate field. If the fault monitoring unit detects that the data transmission in the lane has a CRC check failure, the number of transmission error bits is counted, and the bit error rate of the lane is calculated, and the calculation formula of the bit error rate is BER = number of error bits / total number of transmission bits. If the bit error rate of the lane reaches a preset trigger standard (such as ≥10 -12 or ≥10 -15 ), the identification parameter of the fault lane is written into the fault lane identification field of the Fault Flit information. If the identification parameter of the fault lane is obtained by the analysis unit of the reconstruction module in the remote device by analyzing the Fault Flit information, it is determined that the current fault type is a local fault, and it can be determined which lane needs to be disabled.

[0039] The method for identifying the characteristics of the third local fault is as shown in Figure 7 The Fault Flit information is preset to include a fault lane identification field. ​​In the PCIe communication architecture, after the sending end sends data, the receiving end returns an ACK response signal to the sending end after successfully receiving the data, and returns a NACK response signal if the receiving end does not receive a data packet corresponding to a continuous next sequence number within a preset time. The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if the response data (ACK response signal) returned by the remote device indicating successful reception of the PCIe data packet is not received within a preset period, the fault monitoring unit determines that the channel has a data reception timeout, and then the Fault Flit generation unit writes the identification parameter of the fault channel into the fault channel identification field of the Fault Flit information; If the identification parameter of the fault channel is obtained by the analysis unit of the reconstruction module in the remote device, it is determined that the current fault type is a local fault, and it can be determined which channel needs to be disabled.

[0040] In a further embodiment of the application, if the number of channels configured to be disabled reaches a preset number, the PCIe device and the LTSSM state machine of the remote device negotiate to reduce the transmission speed, and the fault monitoring unit of the reconstruction module monitors the data transmission of the link in real time; if it is monitored that the data transmission of the link reaches a preset recovery standard, the PCIe device and the LTSSM state machine of the remote device negotiate to change the disabled channels to enabled state. The conventional LTSSM state machine cannot actively communicate with the remote device during operation, and the active reporting mechanism in this embodiment breaks through the limitation of this traditional method: the reconstruction module and its LTSSM soft control interface are used to achieve active communication with the remote device to achieve the effect of speedup, for example, when a local channel fault occurs between the sending end PCIe device and the remote device, the LTSSM state machines at both ends can actively negotiate to reduce the transmission speed; when the link state is good (such as error rate, CRC correct rate, data reception in time), the speed can be negotiated, that is, 16 links are reduced to 10 links, and the link is recovered to 16 links after recovery.

[0041] As Figure 2 shown, the application provides a PCIe communication system, which includes at least two PCIe devices as described above, wherein any one is a sending end PCIe device and the other is a receiving end remote device.

[0042] Specific examples: The sub-layer of the reconstruction module can aggregate multiple TLP or DLLP data sent by the data link layer, encapsulate the data into a standard Flit structure according to a set length (such as 518B), and attach a Flit Header (including Flit type, serial number, CRC, etc.) and a Flit Footer (including a state flag, an alignment marker bit), to realize an extensible flow control unit design. The Flit data structure after adding the Flit Head is shown in Table 1 as follows: Table 1 Flit data structure after adding Flit Head

[0043] The fault monitoring unit monitors the transmission link in real time, and the monitoring content and triggering standard are shown in Table 2 as follows: Table 2 Monitoring content and triggering standard

[0044] If a certain monitoring item triggers a set threshold, the Fault Flit generation unit generates Fault Flit information, and the fields of the Fault Flit information are shown in Table 3 as follows: Table 3 Field name and description of Fault Flit information

[0045] If the remote device determines that the error code is one of CRC failure, BER out-of-limit, and reception timeout, and determines that the fault channel identifier is 0b00001000, the LTSSM soft control interface changes the channel configuration of the corresponding LTSSM state machine, so that the channel identified as 0b00001000 is disabled, and the other channels continue to work. If the remote device determines that the error code is one of alignment failure and channel loss, the LTSSM soft control interface issues a Retrain instruction to the LTSSM state machine, so that the LTSSM state machine completely drops offline and then re-trains.

[0046] That is, after receiving the Fault Flit, the remote device can trigger Lane disable for local faults, and can start link retraining for serious Flit errors. The LTSSM state switching can be controlled by a soft triggering method to realize an active link recovery process and improve the link fault tolerance and self-healing ability.

[0047] The Flit transmission mechanism realizes the Flit-level granular link health autonomous mechanism by continuously monitoring the state of the reconstruction module, linking the LTSSM recovery state, and constructing a closed-loop management process of link fault identification, fault type reporting, state analysis, and recovery triggering. The present application mainly realizes the following beneficial effects: 1. Achieving fine-grained perception and active reporting of link health status: Through Flit-level CRC checking, Lane alignment monitoring and BER error rate detection, the reconstruction module can timely identify channel-level micro-faults and construct Fault Flit containing fault details, improving the granularity and response efficiency of link anomaly identification.

[0048] 2. Building a soft-triggered link recovery mechanism to improve link self-healing capability: Breaking the limitation of traditional LTSSM relying only on physical layer exception triggering, the reconstruction module supports active control of LTSSM state migration based on fault situation, realizing fast retraining and recovery of the link, and greatly improving system robustness and stability.

[0049] 3. Enhancing Flit packaging flexibility to improve transmission efficiency and scalability: Supporting multi-TLP aggregation, fixed-length packaging and state field insertion, it meets the needs of throughput, packet granularity and protocol compatibility in different transmission scenarios, improves bandwidth utilization and reduces retransmission overhead.

[0050] 4. Improving the intelligence and protocol controllability of link fault handling: The entire fault monitoring, reporting, negotiation, and recovery process is completed in a closed loop at the protocol layer, supporting the reconstruction module of the remote device to jointly determine and develop differentiated recovery strategies, breaking the limitations of passive detection mechanisms at the physical layer, and suitable for complex interconnection scenarios.

[0051] 5. Good feasibility and compatibility: The reconstruction module is an insertable protocol extension module that can enhance functionality without modifying the core architecture of the DL and PCS layers, making it suitable for integration as an IP core or RTL module in existing PCIe controller designs.

[0052] As shown in Figure 8 , the embodiment of the application provides a PCIe communication method, which is used for the PCIe communication system as described above, and manages the PCIe link established between the sending-end PCIe device and the receiving-end remote device, and includes the following steps: The sending-end PCIe device encapsulates the data of the data link layer into Flit, and monitors whether preset fault features appear on the PCIe link transmitting to the remote device; If yes, the Fault Flit information reflecting the current fault type is generated and sent to the remote device; The remote device analyzes the Fault Flit information to determine the corresponding recovery strategy; According to the determined recovery strategy, the sending-end PCIe device and the receiving-end remote device re-negotiate based on the LTSSM state machine of their respective physical coding layers to eliminate the fault.

[0053] Further referenceFigure 8 preconfigure at least two different recovery strategies, including a first recovery strategy matched with a local fault type and a second recovery strategy matched with a global fault type, wherein the second recovery strategy is to actively negotiate the LTSSM state machine of the sending PCIe device and the LTSSM state machine of the receiving remote device, and then synchronously enter a retraining state; The first recovery strategy is to change only the channel configuration of the LTSSM state machine of the sending PCIe device and the receiving remote device to overcome the local fault.

[0054] Specifically, if any of the fault features of CRC check failure, error code rate exceeding the standard, and data receiving timeout is monitored, the fault channel is determined, and the identification parameter of the fault channel is written into the Fault Flit information, and then the channel configuration of the LTSSM state machine is changed to disable the fault channel, and the sending PCIe device stops allocating data to be transmitted to the disabled channel. If any of the fault features of data alignment failure and channel loss is monitored, it is determined as a global fault type, and then the LTSSM state machine is controlled to enter a retraining state.

[0055] It should be noted that the PCIe communication method provided in the embodiment belongs to the same inventive concept as the PCIe device based on the Flit transmission mechanism provided in the above embodiment, and the entire content of the PCIe device based on the Flit transmission mechanism is incorporated herein by reference, and will not be repeated.

[0056] The Flit-level error detection and Fault Flit reporting mechanism are designed, which can realize the identification and response of channel-level fine-grained faults, enhance the capture ability of short-time interference or burst errors in the link, effectively solve the problem of large retransmission granularity of FEC and TLP, and improve the accuracy of error handling and system recovery efficiency.

[0057] With the increasing requirements of bandwidth and reliability of high-speed interconnection transmission in the fields of artificial intelligence, big data analysis, high-performance computing (HPC), data center and automatic driving, PCIe as the mainstream general high-speed interconnection protocol, its stability and link self-recovery capability are facing unprecedented challenges. The current PCIe standard still mainly relies on passive triggering of the physical layer for link error handling, which cannot meet the needs of fine management, intelligent perception and fast recovery of the link health state.

[0058] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0059] The above is only a specific implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A PCIe device based on the Flit transmission mechanism, comprising a data link layer and a physical coding layer, characterized in that: The PCIe device further includes a reconstruction module based on a Flit transmission mechanism, wherein the reconstruction module includes a Flit encapsulation processing unit, a fault monitoring unit, and a Fault Flit generation unit; The Flit encapsulation processing unit is configured to perform Flit encapsulation on the data sent by the data link layer and send the encapsulated data to the physical coding layer; The fault monitoring unit is configured to monitor a PCIe link transmitted from the physical coding layer to a remote device; In response to the fault monitoring unit detecting that a preset fault feature occurs in the PCIe link, the fault flit generating unit generates fault flit information and sends it to the remote device, where the fault flit information reflects the current fault type; Waiting for the remote device to parse the Fault Flit information to determine a corresponding recovery strategy; According to the determined recovery strategy, the PCIe device and the remote device renegotiate based on the LTSSM state machines of their respective physical coding layers to eliminate the fault.

2. The PCIe device based on the Flit transmission mechanism according to claim 1, wherein: The remote device has the same configuration as the PCIe device, and the reconstruction module further includes a parsing unit, which uses an input decoding rule that matches the output encoding rule of the Fault Flit generation unit; The remote device parses the Fault Flit information to determine a corresponding recovery strategy in the following manner: after the remote device receives the Fault Flit information, a parsing unit of a reconstruction module of the remote device parses the Fault Flit information to obtain parameter values ​​of various fields therein, and determines whether the current fault type is a local fault or a global fault based on the parameter values ​​of the fields; It is determined according to the determined fault type whether to adopt a first recovery strategy matching the local fault or a second recovery strategy matching the global fault.

3. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that: The reconfiguration module further includes an LTSSM soft control interface, wherein the LTSSM soft control interface is configured to connect to the LTSSM state machine; In response to the remote device determining that the current fault type is a global fault, the PCIe device and the remote device renegotiate based on their respective LTSSM state machines to eliminate the fault in either of the following two ways: Based on a preset protocol, the reconstruction module in the remote device sends a state rewrite request to the corresponding LTSSM state machine through its LTSSM soft control interface, and the reconstruction module in the PCIe device sends a state rewrite request to the corresponding LTSSM state machine through its LTSSM soft control interface, and the respective LTSSM state machines synchronously enter the retraining state in response to the rewrite request; Alternatively, based on a preset protocol, the reconstruction module in the remote device sends a state rewrite request to the corresponding LTSSM state machine through its LTSSM soft control interface, and the LTSSM state machine of the remote device renegotiates with the LTSSM state machine of the PCIe device, and then the two LTSSM state machines synchronously enter the retraining state.

4. The PCIe device based on the Flit transmission mechanism according to claim 3, characterized in that: The characteristics of the remote device determining that the current fault type is a global fault include: The data after the Flit package is pre-set includes a preset alignment mark bit, and the Fault Flit information includes an error code field; The remote device receives the transmission data of the PCIe link and uses the physical coding layer to parse the alignment mark in the data. If the alignment mark does not appear at a preset position, the fault monitoring unit determines that the data alignment fails; The Fault Flit generating unit writes the alignment failure type error code into the error code field of the Fault Flit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain an alignment failure type error code parameter, it is determined that the current fault type is a global fault.

5. The PCIe device based on the Flit transmission mechanism according to claim 3, characterized in that: The characteristics of the remote device determining that the current fault type is a global fault include: The Fault Flit information is preset to include an error code field; If the fault monitoring unit determines that there is no data in a channel in the PCIe link, it is determined that the channel is lost; The Fault Flit generating unit writes a channel loss type error code into the error code field of the Fault Flit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain a channel loss type error code parameter, it is determined that the current fault type is a global fault.

6. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that: The characteristics of the remote device determining that the current fault type is a local fault include: It is pre-set that the data after Flit encapsulation includes a CRC field, and the Fault Flit information includes a fault channel identification field; The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if the CRC check fails after the remote device receives the channel data, the fault monitoring unit records and counts the CRC check failure in the channel; If the number or frequency of CRC check failures of the channel reaches a preset triggering standard, the identification parameter of the faulty channel is written into the faulty channel identification field of the Fault Flit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain an identification parameter of the fault channel, it is determined that the current fault type is a local fault.

7. The PCIe device based on the Flit transmission mechanism according to claim 6, characterized in that: The feature of the remote device determining that the current fault type is a local fault also includes: The Flit-encapsulated data also includes a bit error rate field; If the fault monitoring unit detects that the data transmission in the channel fails the CRC check, it counts the number of transmission error bits and calculates the bit error rate of the channel; If the bit error rate of the channel reaches the preset trigger standard, the identification parameter of the fault channel is written into the fault channel identification field of the FaultFlit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain an identification parameter of the fault channel, it is determined that the current fault type is a local fault.

8. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that: The characteristics of the remote device determining that the current fault type is a local fault include: The preset Fault Flit information includes a fault channel identification field; The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if no response data indicating successful receipt of the PCIe data packet returned by the remote device is received within a preset period, the fault monitoring unit determines that a data reception timeout has occurred in the channel, and then the fault flit generation unit writes the identification parameter of the fault channel into the fault channel identification field of the fault flit information; If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain an identification parameter of the fault channel, it is determined that the current fault type is a local fault.

9. The PCIe device based on the Flit transmission mechanism according to any one of claims 6 to 8, characterized in that: In response to determining that the current fault type is a local fault, eliminating the fault based on the first recovery strategy includes: According to the identification parameters of the fault channel obtained by parsing the Fault Flit information, the reconstruction modules of the PCIe device and the remote device respectively change the channel configuration of the corresponding LTSSM state machine through their LTSSM soft control interfaces to disable the fault channel corresponding to the identification parameters, and the PCIe device stops allocating data to be transmitted to the disabled channel.

10. The PCIe device based on the Flit transmission mechanism according to claim 9, characterized in that: If the number of channels configured as disabled reaches a preset number, the PCIe device negotiates with the LTSSM state machine of the remote device to reduce the transmission speed and uses the fault monitoring unit of the reconstruction module to monitor the data transmission of the link in real time; If it is monitored that the data transmission of the link reaches a preset recovery standard, the PCIe device negotiates with the LTSSM state machine of the remote device to configure some or all disabled channels to be transformed into an enabled state.

11. A PCIe communication system, characterized in that: At least two PCIe devices according to any one of claims 1 to 10 are included, wherein any one of them serves as a transmitting end PCIe device and the other serves as a receiving end remote device.

12. A PCIe communication method, characterized in that: The method is used in the PCIe communication system according to claim 11, and manages a PCIe link established between a transmitting PCIe device and a receiving remote device, comprising the following steps: The sending PCIe device encapsulates the data at the data link layer into Flit and monitors whether the preset fault characteristics appear on the PCIe link transmitted to the remote device; If yes, generate Fault Flit information that can reflect the current fault type and send it to the remote device; Waiting for the remote device to parse the Fault Flit information to determine a corresponding recovery strategy; According to the determined recovery strategy, the transmitting end PCIe device and the receiving end remote device renegotiate based on the LTSSM state machines of their respective physical coding layers to eliminate the fault.

13. The PCIe communication method according to claim 12, wherein: Pre-configuring at least two different recovery strategies, including a first recovery strategy matching a local fault type and a second recovery strategy matching a global fault type, wherein the second recovery strategy is that the LTSSM state machine of the transmitting PCIe device actively negotiates with the LTSSM state machine of the receiving remote device, thereby synchronously entering a retraining state; The first recovery strategy is to only change the channel configuration of the LTSSM state machine of the transmitting end PCIe device and the receiving end remote device to overcome the local failure.

14. The PCIe communication method according to claim 13, wherein: If any one of the following fault characteristics is detected: CRC check failure, bit error rate exceeding the standard, or data reception timeout, the faulty channel is determined, and identification parameters of the faulty channel are written into the Fault Flit information. The channel configuration of the LTSSM state machine is then changed to disable the faulty channel, and the transmitting PCIe device stops allocating data to be transmitted to the disabled channel. If any fault characteristic of data alignment failure or channel loss is detected, it is determined to be a global fault type, and the LTSSM state machine is controlled to enter a retraining state.

Citation Information

Patent Citations

  • System and method for automatically repairing PCIe (Peripheral Component Interconnect Express) link fault and server

    CN116643904A

  • Fault analysis method and device for switch chip

    CN120474904A

  • METHOD AND SYSTEM FOR PERFORMING PARALLEL COMPRESSION OF A WIDEWORD DATA STREAM

    DE102023212379A1