PCIe device, communication system and method based on flit transfer mechanism

By introducing a reconstructed module based on the Flit transmission mechanism, the problem of passive response in PCIe link fault monitoring and recovery is solved, enabling refined identification and proactive recovery of link faults, and improving the robustness and stability of the system.

CN120785745BActive Publication Date: 2025-11-18SHANGHAI XINLIJI SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing PCIe link fault monitoring and recovery mechanisms rely on passive physical layer responses, which cannot identify soft failures or transient interference in a timely manner. They also lack a link self-healing mechanism that is actively triggered by the protocol layer, and therefore cannot achieve fine-grained link state management and rapid self-healing.

Method used

A reconstruction module based on the Flit transmission mechanism is introduced, including a Flit encapsulation and processing unit, a fault monitoring unit, and a Fault Flit generation unit. It encapsulates data through Flit and monitors link faults, generates Fault Flit information to actively trigger the link self-healing process, and uses the LTSSM soft control interface to realize link renegotiation.

Benefits of technology

It enables refined identification and proactive recovery of link faults, improves link self-healing capabilities, enhances system robustness and stability, and strengthens the intelligence and controllability of link management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120785745B_ABST
    Figure CN120785745B_ABST
Patent Text Reader

Abstract

The application discloses a PCIe device based on a Flit transmission mechanism, a communication system and a method, the device comprising a data link layer, a physical coding layer and a reconstruction module, the reconstruction module comprising a Flit packaging processing unit, a fault monitoring unit and a Fault Flit generating unit; the Flit packaging processing unit performs Flit packaging on data transmitted by the data link layer; the fault monitoring unit monitors a 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 reflecting a current fault type and transmits the Fault Flit information to the remote device; the remote device analyzes the Fault Flit information to determine a corresponding recovery strategy, and then the PCIe device and the remote device re-negotiate based on LTSSM state machines of respective physical coding layers to eliminate the fault.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and more particularly to a PCIe device, communication system, and method based on the Flit transmission mechanism. Background Technology

[0002] As applications such as high-performance computing, artificial intelligence, and data centers place increasingly higher demands on interconnect bandwidth and reliability, PCI Express (PCIe), as the mainstream high-speed interconnect bus standard, is facing new challenges in link stability and fault recovery capabilities. In particular, PCIe 6.0 introduced Flit (Flow Control Unit) and FEC (Forward Error Correction) mechanisms to improve link efficiency and data integrity. However, in the face of complex and dynamic system operating environments, achieving more intelligent and refined link state management remains crucial for improving system stability.

[0003] Currently, PCIe link fault monitoring and recovery primarily rely on automatic detection mechanisms at the physical layer, with the LTSSM (Link Training and Status State Machine) handling the training, recovery, and renegotiation processes. This mechanism is suitable for most static physical fault recovery scenarios and can improve link stability to some extent. However, its response is mainly passive and cannot meet the needs for rapid self-healing and protocol-level intervention, primarily in the following aspects:

[0004] First, it is not sensitive to fault identification in the link, making it difficult to capture soft failures or transient interference in a timely and accurate manner;

[0005] Second, there is a lack of a link self-healing mechanism that can be quickly and proactively triggered by the protocol layer. The recovery process must wait for the underlying physical layer to detect the error and then respond passively, resulting in a high response lag.

[0006] Third, the Flit structure itself is not extended for carrying and exchanging link health information, and the upper layer cannot coordinate link management by embedding instructions or flags in the Flit stream;

[0007] Fourth, although the LTSSM state machine integrates training and renegotiation functions, its triggering mechanism is limited by physical layer events and cannot be actively controlled by the link data link layer or upper layer protocols.

[0008] The above background information is disclosed only to aid in understanding the concept and technical solution of this application, and does not necessarily provide technical instruction. Summary of the Invention

[0009] The purpose of this invention is to provide a PCIe communication scheme based on the Flit transmission mechanism, constructing a new PCIe architecture with a reconfiguration module. The reconfiguration module can bypass the physical layer's automatic judgment logic and actively trigger the link self-healing process.

[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0011] A PCIe device based on the Flit transmission mechanism includes a data link layer and a physical coding layer. The PCIe device also includes a reconstruction module based on the Flit transmission mechanism. The reconstruction module includes a Flit encapsulation processing unit, a fault monitoring unit, and a fault Flit generation unit.

[0012] The Flit encapsulation processing unit is configured to encapsulate the data sent by the data link layer using Flit encapsulation, and then send the encapsulated data to the physical coding layer.

[0013] The fault monitoring unit is configured to monitor the PCIe link transmitted from the physical coding layer to the remote device;

[0014] In response to the fault monitoring unit detecting a preset fault characteristic in the PCIe link, the Fault Flit generation unit generates Fault Flit information and sends it to the remote device. The Fault Flit information reflects the current fault type.

[0015] Wait for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy;

[0016] According to the determined recovery strategy, the PCIe device and the remote device renegotiate based on their respective physical coding layer's LTSSM state machine to eliminate the fault.

[0017] Furthermore, following any or a combination of the aforementioned technical solutions, the remote device and the PCIe device have the same configuration, and the reconstruction module further includes a parsing unit, which adopts an input decoding rule that matches the output encoding rule of the Fault Flit generation unit;

[0018] The remote device parses the Fault Flit information to determine the corresponding recovery strategy in the following way: After receiving the Fault Flit information, the parsing unit of its reconstruction module parses the Fault Flit information to obtain the parameter values ​​of each field, and determines whether the current fault type is a local fault or a global fault based on the parameter values ​​of the fields.

[0019] Based on the identified fault type, determine whether to adopt a first recovery strategy that matches the local fault or a second recovery strategy that matches the global fault.

[0020] Furthermore, in accordance with any or a combination of the aforementioned technical solutions, the reconfiguration module further includes an LTSSM soft control interface, which is configured to connect to the LTSSM state machine.

[0021] 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, including either of the following two methods:

[0022] 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. The respective LTSSM state machines respond to the rewrite request and synchronously enter the retraining state.

[0023] Alternatively, based on a preset protocol, the reconfiguration 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 renegotiation with the LTSSM state machine of the PCIe device, thereby the two LTSSM state machines synchronously enter the retraining state.

[0024] Furthermore, based on any one or a combination of the aforementioned technical solutions, the features by which the remote device determines the current fault type as a global fault include:

[0025] The pre-defined Flit encapsulated data includes preset alignment marker bits, and the Fault Flit information includes an error code field;

[0026] The remote device receives the transmitted data from the PCIe link and uses the physical coding layer to parse the alignment flag bit in the data. If the alignment flag bit does not appear in the preset position, the fault monitoring unit determines that the data alignment has failed.

[0027] The Fault Flit generation unit writes the alignment failure type error code into the error code field of the Fault Flit information;

[0028] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the alignment failure type error code parameter, then the current fault type is determined to be a global fault.

[0029] Furthermore, based on any one or a combination of the aforementioned technical solutions, the features by which the remote device determines the current fault type as a global fault include:

[0030] Pre-configure Fault Flit information, including an error code field;

[0031] If the fault monitoring unit determines that there is no data in a channel in the PCIe link, it determines that the channel is lost;

[0032] The Fault Flit generation unit writes the channel loss type error code into the error code field of the Fault Flit information;

[0033] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the channel loss type error code parameter, then the current fault type is determined to be a global fault.

[0034] Furthermore, based on any one or a combination of the aforementioned technical solutions, the features by which the remote device determines the current fault type as a partial fault include:

[0035] The pre-defined Flit encapsulated data includes a CRC field, and the Fault Flit information includes a fault channel identifier field.

[0036] The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if the remote device fails the CRC check after receiving the channel data, the fault monitoring unit records and counts the CRC check failures in that channel.

[0037] If the number or frequency of CRC check failures in this channel reaches the preset triggering standard, the identification parameter of the faulty channel will be written into the faulty channel identification field of the Fault Flit information.

[0038] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, then the current fault type is determined to be a local fault.

[0039] Furthermore, based on any one or a combination of the aforementioned technical solutions, the feature of the remote device determining the current fault type as a partial fault also includes:

[0040] The data encapsulated by Flit also includes a bit error rate field;

[0041] If the fault monitoring unit detects a CRC check failure in data transmission within the channel, it counts the number of transmission error bits and calculates the bit error rate of the channel.

[0042] If the bit error rate of the channel reaches the preset triggering standard, the identification parameter of the faulty channel will be written into the faulty channel identification field of the Fault Flit information.

[0043] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, then the current fault type is determined to be a local fault.

[0044] Furthermore, based on any one or a combination of the aforementioned technical solutions, the features by which the remote device determines the current fault type as a partial fault include:

[0045] Pre-defined Fault Flit information includes a fault channel identifier field;

[0046] The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if no response data indicating successful reception of PCIe data packets is received from the remote device within a preset period, the fault monitoring unit determines that the channel has experienced 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.

[0047] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, then the current fault type is determined to be a local fault.

[0048] Furthermore, following any one or a combination of the aforementioned technical solutions, in response to determining that the current fault type is a partial fault, eliminating the fault based on the first recovery strategy includes:

[0049] Based on the identification parameters of the fault channel obtained from parsing the Fault Flit information, the reconfiguration modules of the PCIe device and the remote device change the channel configuration of the corresponding LTSSM state machine through their LTSSM soft control interfaces, so as to disable the fault channel corresponding to the identification parameters, and the PCIe device stops allocating data to be transmitted to the disabled channel.

[0050] Furthermore, following any of the aforementioned technical solutions or combinations thereof, if the number of channels configured to be disabled reaches a preset number, the PCIe device and the remote device's LTSSM state machine negotiate to reduce the transmission speed, and utilize the fault monitoring unit of the reconfiguration module to monitor the data transmission of the link in real time.

[0051] If the data transmission of the link is detected to reach the preset recovery standard, the PCIe device and the remote device's LTSSM state machine negotiate to configure the partially or completely disabled channel to be transformed into an enabled state.

[0052] 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 one is a transmitting PCIe device and the other is a receiving remote device.

[0053] According to another aspect of the present invention, a PCIe communication method is provided for use in the PCIe communication system described above, for managing the PCIe link established between the sending PCIe device and the receiving remote device, comprising the following steps:

[0054] The sending PCIe device performs Flit encapsulation on the data link layer and monitors whether preset fault characteristics appear on the PCIe link transmitted to the remote device.

[0055] If so, then generate Fault Flit information that reflects the current fault type and send it to the remote device;

[0056] Wait for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy;

[0057] According to the determined recovery strategy, the transmitting PCIe device and the receiving remote device renegotiate based on their respective physical coding layer LTSSM state machines to eliminate the fault.

[0058] Furthermore, based on any one or a combination of the aforementioned technical solutions, at least two different recovery strategies are pre-configured, including a first recovery strategy matching the local fault type and a second recovery strategy matching the global fault type. The second recovery strategy involves the LTSSM state machine of the transmitting PCIe device and the LTSSM state machine of the receiving remote device actively negotiating and then synchronously entering the retraining state.

[0059] The first recovery strategy is to only change the channel configuration of the LTSSM state machine of the transmitting PCIe device and the receiving remote device to overcome the local fault.

[0060] Furthermore, following any of the aforementioned technical solutions or combinations thereof, if any one of the fault characteristics—CRC check failure, bit error rate exceeding the standard, or data reception timeout—is detected, the faulty channel is identified, and the identification parameters of the faulty channel are written into the Fault Flit information. Subsequently, the channel configuration of the LTSSM state machine is changed to disable the faulty channel, and the transmitting PCIe device stops allocating data to be transmitted to the disabled channel.

[0061] If any of the fault characteristics, such as data alignment failure or channel loss, are detected, it is determined to be a global fault type, and the LTSSM state machine is then controlled to enter the retraining state.

[0062] The beneficial effects of the technical solution provided by this invention are as follows:

[0063] a. Based on the Flit transmission mechanism, Flit data is encapsulated according to a specific field format, and error message data is encapsulated according to a specific field and sent to the lower layer when a fault is detected, so that the remote device can parse the error message data and execute different recovery strategies for different fault types;

[0064] b. Construct a new PCIe architecture with a reconfiguration module. The reconfiguration module utilizes the Flit transmission mechanism to bypass the physical layer's automatic judgment logic and actively trigger the link self-healing process; enhances the ability to capture short-term interference or sudden errors in the link and improves the recovery efficiency of minor faults.

[0065] c. The refactoring module has an independent sub-layer architecture. It decouples Flit's encapsulation, error correction, and transformation processes from the traditional data link layer, performing these tasks independently. This sub-layer improves modular processing capabilities, facilitating rapid adaptation to different link topologies and decoupling between hardware and software. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 An architecture diagram of a PCIe device based on the Flit transmission mechanism is provided as an exemplary embodiment of the present invention;

[0068] Figure 2 A schematic diagram of a communication system based on the Flit transmission mechanism provided as an exemplary embodiment of the present invention;

[0069] Figure 3 A flowchart illustrating the determination of a first type of global fault is provided as an exemplary embodiment of the present invention.

[0070] Figure 4 A flowchart illustrating the determination of a second type of global fault is provided as an exemplary embodiment of the present invention.

[0071] Figure 5A flowchart illustrating the determination of a first type of local fault is provided as an exemplary embodiment of the present invention;

[0072] Figure 6 A flowchart illustrating the determination of a second type of local fault is provided as an exemplary embodiment of the present invention.

[0073] Figure 7 A flowchart illustrating the determination of a third type of local fault is provided as an exemplary embodiment of the present invention.

[0074] Figure 8 A flowchart illustrating a communication method based on the Flit transmission mechanism, provided as an exemplary embodiment of the present invention. Detailed Implementation

[0075] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0076] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0077] This invention aims to define a mechanism for upper-layer proactively triggering link self-healing processes in complex, highly dynamic link environments. When the system detects a decline in link performance (such as a continuously increasing bit error rate or FEC error correction capability approaching a threshold), the upper layer can bypass the physical layer's automatic judgment logic and proactively initiate recovery, retraining, or a jump to a specific LTSSM state. In other words, this invention aims to build a more intelligent, controllable, and responsive link self-healing mechanism, providing more robust operational guarantees for PCIe interconnects. This invention breaks the limitation of traditional PCIe architectures where LTSSM is only passively triggered by the physical layer. Through real-time monitoring of link health status by the fault monitoring unit in the reconfiguration module, this invention can proactively initiate link retraining and recovery, achieving rapid link self-healing and enhanced system robustness.

[0078] In one embodiment of the present invention, a PCIe device based on the Flit transmission mechanism is provided, such as... Figure 1 As shown, the PCIe device includes a data link layer and a physical coding layer. The PCIe device also includes a reconstruction module based on the Flit transmission mechanism. The reconstruction module includes a Flit encapsulation processing unit, a fault monitoring unit, and a fault Flit generation unit.

[0079] The re-shaping module is a new sub-layer added between the traditional data link layer and the physical coding layer. As an intermediate protocol processing layer, it is responsible for receiving TLP / DLLP format data packets output by the data link layer and performing tasks such as format straightening, error detection, and fault marking to improve link state management capabilities.

[0080] The Flit encapsulation processing unit is configured to encapsulate the data sent by the data link layer using Flit encapsulation, and then send the encapsulated data to the physical coding layer.

[0081] The fault monitoring unit is configured to monitor the PCIe link transmitted from the physical coding layer to the remote device;

[0082] In response to the fault monitoring unit detecting a preset fault characteristic in the PCIe link, the Fault Flit generation unit generates Fault Flit information and sends it to the remote device. The Fault Flit information reflects the current fault type.

[0083] Wait for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy;

[0084] According to the determined recovery strategy, the PCIe device and the remote device renegotiate based on their respective physical coding layer's LTSSM state machine to eliminate the fault.

[0085] A Flit is the smallest transmission unit at the PCIe link layer. It contains a protocol header, payload, and checksum information, and is transmitted in fixed-size byte blocks. Compared to traditional TLP flow control, Flit offers finer granularity and reduces congestion. This embodiment introduces a custom Flit structure, expanding the header / tail information areas to support multi-TLP aggregation and reconstruction, achieving fine-grained transmission management at the Flit level, effectively improving bandwidth utilization and reducing data redundancy. Simultaneously, structure-level encapsulation makes data scheduling and flow control in the link more flexible and controllable.

[0086] like Figure 2 As shown, the remote device and the PCIe device have the same configuration. The reconstruction module also includes a parsing unit. The parsing unit adopts an input decoding rule that matches the output encoding rule of the Fault Flit generation unit. Therefore, the Fault Flit information generated by the Fault Flit generation unit of the sending PCIe device can be parsed by the parsing unit of the remote device to determine the current fault type reflected by the Fault Flit information, and then determine the matching recovery strategy.

[0087] Specifically, after the remote device receives the Fault Flit information, its reconstruction module's parsing unit parses the Fault Flit information to obtain the parameter values ​​of each field, and determines whether the current fault type is a local fault or a global fault based on the parameter values ​​of the fields; and determines whether to adopt a first recovery strategy matching the local fault or a second recovery strategy matching the global fault based on the determined fault type.

[0088] See also Figure 2 The reconstruction module also includes an LTSSM soft control interface, which 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 one embodiment, the implementation is as follows: 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 also sends a state rewrite request to the corresponding LTSSM state machine through its LTSSM soft control interface. The respective LTSSM state machines synchronously enter the retraining state in response to the rewrite request.

[0089] Alternatively, in another embodiment, the same operation is based on a preset protocol. The reconfiguration module in the remote device sends a state rewrite request to the corresponding LTSSM state machine through its LTSSM soft control interface. The difference is that in this embodiment, the rewrite request is not sent to the LTSSM state machine through the LTSSM soft control interface of the reconfiguration module in the sending PCIe device. Instead, the LTSSM state machine of the remote device and the LTSSM state machine of the sending end renegotiate, and then the two LTSSM state machines synchronously enter the retraining state.

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

[0091] The following describes another recovery strategy: In response to determining that the current fault type is a partial fault, specifically, a partial fault is defined as an individual channel exhibiting a preset specific fault characteristic, the corresponding first recovery strategy will not cause the LTSSM state machine to completely go offline and then be retrained. Instead, a lighter and faster method is used to eliminate the fault, including: based on the identification parameters of the faulty channel obtained from parsing the Fault Flit information, the reconstruction modules of the PCIe device and the remote device change the channel configuration of the corresponding LTSSM state machine through their LTSSM soft control interfaces, so that the faulty channel corresponding to the identification parameters is disabled. The PCIe device stops allocating data to be transmitted to the disabled channel without affecting the normal data transmission of other channels.

[0092] As can be seen from the above, the present invention aims to provide a recovery scheme that differs from the conventional approach of retraining the LTSSM state machine upon detecting a link failure. Instead, it distinguishes between local and global faults based on their severity, and further determines whether to adopt a first recovery strategy of rapid recovery or a second recovery strategy of thorough recovery.

[0093] The characteristics of global and local failures are explained below:

[0094] Methods for identifying the characteristics of the first type of global fault, such as Figure 3 As shown:

[0095] The pre-defined Flit encapsulated data includes preset alignment marker bits, and the Fault Flit information includes an error code field;

[0096] The remote device receives the transmitted data from the PCIe link and uses the physical coding layer to parse the alignment flag bit in the data. If the alignment flag bit does not appear in the preset position, the fault monitoring unit determines that the data alignment has failed.

[0097] The Fault Flit generation unit writes the alignment failure type error code into the error code field of the Fault Flit information;

[0098] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the alignment failure type error code parameter, then the current fault type is determined to be a global fault.

[0099] Methods for identifying the characteristics of the second type of global fault, such as Figure 4 As shown:

[0100] Pre-configure Fault Flit information, including an error code field;

[0101] If the fault monitoring unit determines that there is no data in a channel in the PCIe link, it determines that the channel is lost;

[0102] The Fault Flit generation unit writes the channel loss type error code into the error code field of the Fault Flit information;

[0103] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the channel loss type error code parameter, then the current fault type is determined to be a global fault.

[0104] Methods for identifying the characteristics of the first type of local fault, such as Figure 5 As shown:

[0105] The pre-defined Flit encapsulated data includes a CRC field, and the Fault Flit information includes a fault channel identifier field.

[0106] The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: the remote device receives the transmission data of the PCIe link and uses the physical coding layer to parse the data of each channel; the CRC verification process can be automatically executed by the physical coding layer and data link layer hardware of the remote device. After recalculating the CRC through independent hardware circuits, it is compared with the parameters of the CRC field in the received Flit encapsulated data. If they are inconsistent, the channel where the data is located has a CRC verification failure fault. The remote device returns a verification failure message to the sending PCIe device. The fault monitoring unit records and counts the CRC verification failures in the channel.

[0107] If the number or frequency of CRC check failures of a channel reaches a preset triggering standard, such as three consecutive data transmissions failing CRC check within the same channel, or more than two CRC check failures within a preset period, then the channel is determined to be a faulty channel, and the faulty channel identification parameter is written into the faulty channel identification field of the Fault Flit information.

[0108] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, it determines that the current fault type is a partial fault and can identify which channel needs to be disabled.

[0109] Methods for identifying the characteristics of the second type of local fault, such as Figure 6 As shown:

[0110] The data encapsulated by Flit also includes a bit error rate field;

[0111] If the fault monitoring unit detects a CRC check failure in data transmission within the channel, it counts the number of erroneous bits and calculates the bit error rate (BER) of the channel. The BER calculation formula is as follows: BER = Number of error bits / Total number of bits transmitted;

[0112] If the bit error rate of the channel reaches the preset trigger standard (e.g., ≥10), -12 or ≥10 -15 If the fault is detected, the identification parameter of the fault channel will be written into the fault channel identification field of the Fault Flit information;

[0113] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain the identification parameters of the fault channel, it determines that the current fault type is a partial fault and can identify which channel needs to be disabled.

[0114] Methods for identifying the characteristics of the third type of local fault, such as Figure 7 As shown:

[0115] Pre-defined Fault Flit information includes a fault channel identifier field;

[0116] In the PCIe communication architecture, after the sending end transmits data, the receiving end returns an ACK response signal to the sending end upon successful data reception. If the receiving end does not receive the next consecutive data packet corresponding to the next sequence number within a preset time, it returns a NACK response signal. The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if it does not receive a response data (ACK response signal) indicating successful reception of PCIe data packets from the remote device within a preset period, the fault monitoring unit determines that a data reception timeout has occurred on that 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;

[0117] If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information to obtain the identification parameters of the fault channel, it determines that the current fault type is a partial fault and can identify which channel needs to be disabled.

[0118] In a further embodiment of the present invention, if the number of channels configured as disabled reaches a preset number, the LTSSM state machine of the PCIe device and the remote device negotiates 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 the data transmission of the link is detected to reach a preset recovery standard, the LTSSM state machine of the PCIe device and the remote device negotiates to change the configured partially or all disabled channels to an enabled state. Traditional LTSSM state machines cannot actively communicate with remote devices during operation. This embodiment breaks the limitation of this traditional method by using an active reporting mechanism: the reconstruction module and its LTSSM soft control interface are used to achieve active communication with remote devices to achieve the effect of speed increase. For example, when a partial channel failure is detected between the sending PCIe device and the remote device, the LTSSM state machines at both ends can actively negotiate to reduce the transmission speed; when the link status is subsequently detected to be good (such as bit error rate, CRC check accuracy, and timely data reception), the speed can be negotiated to increase, that is, when a failure occurs, the number of links is reduced from 16 to 10, and then restored to 16 links after the links are restored.

[0119] like Figure 2 As shown, the present invention provides a PCIe communication system, comprising at least two PCIe devices as described above, wherein one serves as a transmitting PCIe device and the other serves as a receiving remote device.

[0120] Specific example: The sublayer of the reconfiguration module can aggregate multiple TLP or DLLP data sent by the data link layer, encapsulate them into a standard Flit structure according to a set length (e.g., 518B), and add a Flit Header (including Flit type, sequence number, CRC, etc.) and a Flit Footer (including status flags and alignment flags) to achieve a scalable flow control unit design. The Flit data structure after adding the Flit Header is shown in Table 1 below:

[0121] Table 1. Flit data structure after adding Flit Head

[0122]

[0123] The fault monitoring unit performs real-time monitoring of the transmission link. The monitoring content and triggering criteria are shown in Table 2 below:

[0124] Table 2 Monitoring Content and Triggering Criteria

[0125]

[0126] If a certain monitoring item triggers a set threshold, the Fault Flit generation unit generates Fault Flit information. The fields of the Fault Flit information are shown in Table 3.

[0127] Table 3 Field Names and Descriptions for Fault Flit Information

[0128]

[0129] If the remote device parses the Fault Flit information and determines that the error code is one of CRC failure, BER overrun, or receive timeout, and determines that the fault channel identifier is 0b00001000, then the LTSSM soft control interface changes the channel configuration of the corresponding LTSSM state machine to disable the channel with the identifier 0b00001000, while other channels continue to work.

[0130] If the remote device parses the Fault Flit information and determines that the error code is alignment failure or channel loss, then the LTSSM soft control interface sends a Retrain command to the LTSSM state machine, causing the LTSSM state machine to completely go offline and then be retrained.

[0131] When a remote device receives a Fault Flit, it can trigger Lane disabling for local faults and initiate link retraining for severe Flit errors. It can control the LTSSM state switching through soft triggering to achieve an active link recovery process and improve link fault tolerance and self-healing capabilities.

[0132] The Flit transmission mechanism, through continuous status monitoring of the reconfiguration module and linkage with the LTSSM recovery status, constructs a closed-loop management process for link fault identification, fault type reporting, status resolution, and recovery triggering, thereby achieving a link health autonomy mechanism at the Flit level. The main beneficial effects achieved by this invention are as follows:

[0133] 1. Achieve fine-grained perception and proactive reporting of link health status: Through CRC verification at the Flit granularity, Lane alignment monitoring, and BER bit error rate detection, the reconstruction module can promptly identify channel-level micro-faults and construct a Fault Flit containing fault details, thereby improving the granularity and response efficiency of link anomaly identification.

[0134] 2. Construct a soft-trigger link recovery mechanism to enhance link self-healing capability: Break the limitation of traditional LTSSM relying solely on physical layer anomaly triggers, support the reconfiguration module to actively control LTSSM state transitions based on fault conditions, realize rapid link retraining and recovery, and significantly improve system robustness and stability.

[0135] 3. Enhance Flit encapsulation flexibility, improve transmission efficiency and scalability: Supports multi-TLP aggregation, fixed-length encapsulation and status field insertion to meet the needs of different transmission scenarios for throughput, packet granularity and protocol compatibility, improve bandwidth utilization and reduce retransmission overhead.

[0136] 4. Enhance 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. It supports remote device reconstruction modules to collaboratively determine and formulate differentiated recovery strategies, breaking through the limitations of the physical layer passive detection mechanism and making it suitable for complex interconnection scenarios.

[0137] 5. Excellent feasibility and compatibility: As a pluggable protocol extension module, the reconfiguration module can enhance functionality without modifying the core architecture of the DL layer and PCS layer, making it suitable for integration into existing PCIe controller designs as an IP core or RTL module.

[0138] like Figure 8 As shown, this embodiment of the invention provides a PCIe communication method. This method is used in the PCIe communication system described above to manage the PCIe link established between the sending PCIe device and the receiving remote device, and includes the following steps:

[0139] The sending PCIe device performs Flit encapsulation on the data link layer and monitors whether preset fault characteristics appear on the PCIe link transmitted to the remote device.

[0140] If so, then generate Fault Flit information that reflects the current fault type and send it to the remote device;

[0141] Wait for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy;

[0142] According to the determined recovery strategy, the transmitting PCIe device and the receiving remote device renegotiate based on their respective physical coding layer LTSSM state machines to eliminate the fault.

[0143] Further reference Figure 8 At least two different recovery strategies are pre-configured, including a first recovery strategy that matches the local fault type and a second recovery strategy that matches the global fault type. The second recovery strategy is that the LTSSM state machine of the sending PCIe device and the LTSSM state machine of the receiving remote device actively negotiate and then synchronously enter the retraining state.

[0144] The first recovery strategy is to only change the channel configuration of the LTSSM state machine of the transmitting PCIe device and the receiving remote device to overcome the local fault.

[0145] Specifically, if any of the following fault characteristics are detected: CRC check failure, excessive bit error rate, or data reception timeout, the faulty channel is identified, and the identification parameters of the faulty channel are written into the Fault Flit information. Then, the channel configuration of the LTSSM state machine is changed to disable the faulty channel, and the transmitting PCIe device stops allocating data to be transmitted to the disabled channel.

[0146] If any of the fault characteristics, such as data alignment failure or channel loss, are detected, it is determined to be a global fault type, and the LTSSM state machine is then controlled to enter the retraining state.

[0147] It should be noted that the PCIe communication method provided in this embodiment and the PCIe device based on the Flit transmission mechanism provided in the above embodiments belong to the same inventive concept. Here, the entire contents of the PCIe device embodiment based on the Flit transmission mechanism are incorporated into this communication method embodiment by reference, and will not be repeated.

[0148] This invention designs a Flit-level error detection and Fault Flit reporting mechanism, which can identify and respond to channel-level fine-grained faults, enhance the ability to capture short-term interference or sudden errors in the link, effectively solve the problem of excessively large retransmission granularity of FEC and TLP, and improve the accuracy of error handling and system recovery efficiency.

[0149] With the increasing demands for bandwidth and reliability in fields such as artificial intelligence, big data analytics, high-performance computing (HPC), data centers, and autonomous driving, PCIe, as a mainstream general-purpose high-speed interconnect protocol, is facing unprecedented challenges in terms of stability and link self-recovery capabilities. Current PCIe standards still primarily rely on passive physical layer triggering for link error handling, which cannot meet the needs for refined management, intelligent sensing, and rapid recovery of link health status.

[0150] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0151] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this 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 also includes a reconstruction module based on the Flit transmission mechanism, which includes a Flit encapsulation processing unit, a fault monitoring unit, and a Fault Flit generation unit. The Flit encapsulation processing unit is configured to encapsulate the data sent by the data link layer using Flit encapsulation, and then send the encapsulated data to the physical coding layer. The fault monitoring unit is configured to monitor the PCIe link transmitted from the physical coding layer to the remote device; In response to the fault monitoring unit detecting a preset fault characteristic in the PCIe link, the Fault Flit generation unit generates Fault Flit information and sends it to the remote device. The Fault Flit information reflects the current fault type. Wait 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 renegotiate based on their respective physical coding layer's LTSSM state machine to eliminate the fault.

2. The PCIe device based on the Flit transmission mechanism according to claim 1, characterized in that, The remote device has the same configuration as the PCIe device, and the reconstruction module further includes a parsing unit, which adopts 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 the corresponding recovery strategy in the following way: After receiving the Fault Flit information, the parsing unit of its reconstruction module parses the Fault Flit information to obtain the parameter values ​​of each field, and determines whether the current fault type is a local fault or a global fault based on the parameter values ​​of the fields. Based on the identified fault type, determine whether to adopt a first recovery strategy that matches the local fault or a second recovery strategy that matches the global fault.

3. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that, The reconfiguration module also includes an LTSSM soft control interface, which 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, including either of the following two methods: 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. The respective LTSSM state machines respond to the rewrite request and synchronously enter the retraining state. Alternatively, based on a preset protocol, the reconfiguration 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 renegotiation with the LTSSM state machine of the PCIe device, thereby 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 features that determine the current fault type as a global fault by the remote device include: The pre-defined Flit encapsulated data includes preset alignment marker bits, and the Fault Flit information includes an error code field; The remote device receives the transmitted data from the PCIe link and uses the physical coding layer to parse the alignment flag bit in the data. If the alignment flag bit does not appear in the preset position, the fault monitoring unit determines that the data alignment has failed. The Fault Flit generation 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 and obtains the alignment failure type error code parameter, then the current fault type is determined to be a global fault.

5. The PCIe device based on the Flit transmission mechanism according to claim 3, characterized in that, The features that determine the current fault type as a global fault by the remote device include: Pre-configure Fault Flit information, including an error code field; If the fault monitoring unit determines that there is no data in a channel in the PCIe link, it determines 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 parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the channel loss type error code parameter, then the current fault type is determined to be a global fault.

6. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that, The features by which the remote device determines the current fault type as a partial fault include: The pre-defined Flit encapsulated data includes a CRC field, and the Fault Flit information includes a fault channel identifier field. The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if the remote device fails the CRC check after receiving the channel data, the fault monitoring unit records and counts the CRC check failures in that channel. If the number or frequency of CRC check failures in this channel reaches the preset triggering standard, the identification parameter of the faulty channel will be 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 and obtains the identification parameters of the fault channel, then the current fault type is determined to be a local fault.

7. The PCIe device based on the Flit transmission mechanism according to claim 6, characterized in that, The features by which the remote device determines the current fault type as a partial fault also include: The data encapsulated by Flit also includes a bit error rate field; If the fault monitoring unit detects a CRC check failure in data transmission within the channel, 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 triggering standard, the identification parameter of the faulty channel will be written into the faulty channel identification field of the FaultFlit information. If the parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, then the current fault type is determined to be a local fault.

8. The PCIe device based on the Flit transmission mechanism according to claim 2, characterized in that, The features by which the remote device determines the current fault type as a partial fault include: Pre-defined Fault Flit information includes a fault channel identifier field; The fault monitoring unit monitors the transmission data of each channel in the PCIe link, including: if no response data indicating successful reception of PCIe data packets is received from the remote device within a preset period, the fault monitoring unit determines that the channel has experienced 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 parsing unit of the reconstruction module in the remote device parses the Fault Flit information and obtains the identification parameters of the fault channel, then the current fault type is determined to be 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 partial fault, eliminating the fault based on the first recovery strategy includes: Based on the identification parameters of the fault channel obtained from parsing the Fault Flit information, the reconfiguration modules of the PCIe device and the remote device change the channel configuration of the corresponding LTSSM state machine through their LTSSM soft control interfaces, so as 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 reconfiguration module to monitor the data transmission of the link in real time. If the data transmission of the link is detected to reach the preset recovery standard, the PCIe device and the remote device's LTSSM state machine negotiate to configure the partially or completely disabled channel to be transformed into an enabled state.

11. A PCIe communication system, characterized in that, It includes at least two PCIe devices as described in any one of claims 1 to 10, wherein one is a transmitting PCIe device and the other is a receiving remote device.

12. A PCIe communication method, characterized in that, This method, used in the PCIe communication system as described in claim 11, manages the PCIe link established between the sending PCIe device and the receiving remote device, and includes the following steps: The sending PCIe device performs Flit encapsulation on the data link layer and monitors whether preset fault characteristics appear on the PCIe link transmitted to the remote device. If so, then generate Fault Flit information that reflects the current fault type and send it to the remote device; Wait for the remote device to parse the Fault Flit information to determine the corresponding recovery strategy; According to the determined recovery strategy, the transmitting PCIe device and the receiving remote device renegotiate based on their respective physical coding layer LTSSM state machines to eliminate the fault.

13. The PCIe communication method according to claim 12, characterized in that, At least two different recovery strategies are pre-configured, including a first recovery strategy that matches the local fault type and a second recovery strategy that matches the global fault type. The second recovery strategy is that the LTSSM state machine of the transmitting PCIe device and the LTSSM state machine of the receiving remote device actively negotiate and then synchronously enter the retraining state. The first recovery strategy is to change only the channel configuration of the LTSSM state machine of the transmitting PCIe device and the receiving remote device to overcome the local fault.

14. The PCIe communication method according to claim 13, characterized in that, If any of the following fault characteristics are detected: CRC check failure, excessive bit error rate, or data reception timeout, the faulty channel is identified, and the identification parameters of the faulty channel are written into the Fault Flit information. Then, the channel configuration of the LTSSM state machine is changed to disable the faulty channel, and the transmitting PCIe device stops allocating data to be transmitted to the disabled channel. If any of the fault characteristics, such as data alignment failure or channel loss, are detected, it is determined to be a global fault type, and the LTSSM state machine is then controlled to enter the 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