Testing Method, Device, Equipment, Medium and Product for Bridging Card Signal Quality

By establishing a PCIe link between hardware cards, using error registers to determine the data reception results, and directly conducting bridge card signal quality testing, solving the problem of testing instrument dependence in the prior art, achieving high ease of use and widely applicable signal quality verification.

CN119377028BActive Publication Date: 2025-07-25SHANGHAI BIREN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411932624.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-07-25
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In the prior art, the signal quality test of bridge cards depends on signal quality testing instruments, with low versatility and unfit test interfaces, so it is impossible to effectively verify signal quality in the mass production stage.

Method used

By establishing a PCIe link between the first hardware card and the second hardware card, the data reception result is determined using the error register of the hardware card, and the signal quality test is directly carried out, including sending and receiving test data, and determining the signal quality based on the error result.

Benefits of technology

It has got rid of the dependence on signal quality testing instruments and has achieved signal quality testing with high ease of use and wide popularity, so as to effectively detect link quality problems before mass production of the bridge card.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377028B_ABST
    Figure CN119377028B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of hardware testing, and provides a method, device, equipment, medium and product for testing the signal quality of a bridge card. The method includes: establishing a PCIe link between a first hardware card and a second hardware card; controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receiving the first test data and determining a first data reception result based on an error register; controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receiving the second test data and determining a second data reception result based on the error register; and determining the signal quality of the bridge card according to the first data reception result and the second data reception result. The present invention gets rid of the dependence on signal quality testing instruments, directly uses hardware cards for signal quality testing, discovers link quality problems through the data reception conditions of two hardware cards, has high usability and wide popularity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hardware testing, and particularly to a method, device, equipment, medium and product for testing the signal quality of a bridge card. Background Art

[0002] A bridge card is a hardware device used to connect two or more different hardware cards. Its main function is to transfer data packets and establish a communication bridge between different hardware cards. As a bridge between different hardware cards, the link stability of the bridge card directly affects the reliability of data transmission.

[0003] Currently, the commonly used bridge board determines whether there are functional problems in the communication between hardware cards through service operation and link status check. However, for signal quality, the main methods are SI (Signal Integrity) testing and simulation testing using test instrument equipment.

[0004] However, SI testing has certain limitations, mainly manifested in the need to rely on expensive instrument equipment, such as a BERT (Bit Error Rate Test) error code meter and a network analyzer. Most bridge circuit board suppliers do not have these instruments. Even if they have these devices, the BERT error code meter test can only test the prototype verification version of the bridge board through a specific fixture. In the mass production stage, due to interface problems, these instruments cannot be connected to the bridge board for testing. In addition, as an evaluation method in the early stage of product design and development, the data of simulation testing can only be used as a reference in the post-chip and post-silicon mass production stages, and cannot be used as a verification result to guide production. Summary of the Invention

[0005] The present invention provides a method, device, equipment, medium and product for testing the signal quality of a bridge card, so as to solve the problems in the prior art that the signal quality testing of the bridge card depends on signal quality testing instruments, has low versatility, and the test interfaces are not adaptable.

[0006] The present invention provides a method for testing the signal quality of a bridge card. The bridge card is respectively connected to a first hardware card and a second hardware card. The method for testing the signal quality of the bridge card includes: establishing a PCIe link between the first hardware card and the second hardware card; controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data and determines the first data reception result based on the error register in the second hardware card; controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data and determines the second data reception result based on the error register in the first hardware card; determining the signal quality of the bridge card according to the first data reception result and the second data reception result.

[0007] A method for testing the signal quality of a bridge card provided by the present invention controls a first hardware card to send first test data to a second hardware card through a PCIe link. The second hardware card receives the first test data and determines a first data reception result based on an error register in the second hardware card, including: clearing the error register in the second hardware card; controlling the first hardware card to send the first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data; calculating first bandwidth data of the PCIe link during the process of the second hardware card receiving the first test data; determining error events in the error register of the second hardware card during the process of the second hardware card receiving the first test data to obtain a first error result; and determining the first data reception result based on the first bandwidth data and the first error result.

[0008] A method for testing the signal quality of a bridge card provided by the present invention controls a second hardware card to send second test data to a first hardware card through a PCIe link. The first hardware card receives the second test data and determines a second data reception result based on an error register in the first hardware card, including: clearing the error register in the first hardware card; controlling the second hardware card to send the second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data; calculating second bandwidth data of the PCIe link during the process of the first hardware card receiving the second test data; determining error events in the error register of the first hardware card during the process of the first hardware card receiving the second test data to obtain a second error result; and determining the second data reception result based on the second bandwidth data and the second error result.

[0009] A method for testing the signal quality of a bridge card provided by the present invention determines the signal quality of the bridge card according to the first data reception result and the second data reception result, including: when an uncorrectable error event appears in the first data reception result and / or the second data reception result, determining that the link fails and marking the signal quality of the bridge card as poor; when no error event appears in the first data reception result and the second data reception result, determining that the link passes and marking the signal quality of the bridge card as excellent.

[0010] A method for testing the signal quality of a bridge card provided by the present invention determines the signal quality of the bridge card according to the first data reception result and the second data reception result, including: when a correctable error event appears in the first data reception result and / or the second data reception result, comparing the first bandwidth data and / or the second bandwidth data with a preset bandwidth threshold; if both the first bandwidth data and the second bandwidth data are greater than the preset bandwidth threshold, determining that the link is unstable and marking the signal quality of the bridge card as poor; if at least one of the first bandwidth data and the second bandwidth data is less than or equal to the preset bandwidth threshold, determining that the link fails and marking the signal quality of the bridge card as bad.

[0011] A method for testing the signal quality of a bridge card provided by the present invention determines the signal quality of the bridge card according to the first data reception result and the second data reception result, including: when an error event other than an uncorrectable error event and a correctable error event appears in the first data reception result and the second data reception result, recording the error type, determining that the link is normal, and marking the signal quality of the bridge card as a warning.

[0012] A method for testing the signal quality of a bridge card provided by the present invention, after determining the signal quality of the bridge card according to the first data reception result and the second data reception result, further includes: resetting the PCIe link between the first hardware card and the second hardware card; and / or, performing a thermal reset on the first hardware card; and / or, performing a thermal reset on the second hardware card.

[0013] The present invention also provides a testing device for the signal quality of a bridge card. The bridge card is respectively connected to a first hardware card and a second hardware card. The testing device for the signal quality of the bridge card includes: a link establishment module for establishing a PCIe link between the first hardware card and the second hardware card; a first transmission module for controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receiving the first test data and determining the first data reception result based on an error register in the second hardware card; a second transmission module for controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receiving the second test data and determining the second data reception result based on an error register in the first hardware card; a signal quality analysis module for determining the signal quality of the bridge card according to the first data reception result and the second data reception result.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method for testing the signal quality of a bridge card as described in any one of the above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for testing the signal quality of a bridge card as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method for testing the signal quality of a bridge card as described in any one of the above is implemented.

[0017] For the method, device, equipment, medium and product for testing the signal quality of a bridge card provided by the present invention, the bridge card is respectively connected to a first hardware card and a second hardware card. The method for testing the signal quality of the bridge card includes: establishing a PCIe link between the first hardware card and the second hardware card; controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data and determines the first data reception result based on an error register in the second hardware card; controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data and determines the second data reception result based on an error register in the first hardware card; determining the signal quality of the bridge card according to the first data reception result and the second data reception result. By the above method, the present invention gets rid of the dependence on a signal quality testing instrument, directly uses a hardware card to test the signal quality, discovers link quality problems through the data reception conditions of the two hardware cards, has high usability and wide popularity. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0019] Figure 1 is one of the flow diagrams of the method for testing the signal quality of a bridge card provided by an embodiment of the present invention.

[0020] Figure 2 is a connection diagram of a flexible bridge card and a hardware card provided by an embodiment of the present invention.

[0021] Figure 3 is another flow diagram of the method for testing the signal quality of a bridge card provided by an embodiment of the present invention.

[0022] Figure 4 is yet another flow diagram of the method for testing the signal quality of a bridge card provided by an embodiment of the present invention.

[0023] Figure 5It is a schematic structural diagram of a test device for the signal quality of a bridge card provided by an embodiment of the present invention.

[0024] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0026] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0027] In the description of the embodiments of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "connected" and "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific situations.

[0028] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without conflict, those skilled in the art can combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0029] The present invention provides a method for testing the signal quality of a bridge card. Please refer to Figure 1 , Figure 1 It is one of the flow schematic diagrams of the method for testing the signal quality of a bridge card provided by an embodiment of the present invention. In this embodiment, the method for testing the signal quality of a bridge card may include steps S110 to S140. The specific steps are as follows:

[0030] S110: Establish a PCIe link between the first hardware card and the second hardware card.

[0031] S120: Control the first hardware card to send first test data to the second hardware card through the PCIe link. The second hardware card receives the first test data and determines the first data reception result based on the error register in the second hardware card.

[0032] S130: Control the second hardware card to send second test data to the first hardware card through the PCIe link. The first hardware card receives the second test data and determines the second data reception result based on the error register in the first hardware card.

[0033] S140: Determine the signal quality of the bridge card according to the first data reception result and the second data reception result.

[0034] Before performing the signal quality test, the bridge card is respectively connected to the first hardware card and the second hardware card.

[0035] Optionally, the bridge card can be a rigid bridge card or a flexible bridge card.

[0036] Optionally, the hardware card can be a board card equipped with a GPU (Graphics Processing Unit), TPU (Tensor Processing Unit), NPU (Neural network Processing Unit), DPU (Deep learning Processing Unit), APU (Accelerated Processing Unit), and / or GPGPU (General-Purpose computing on Graphics Processing Unit). The following embodiments will specifically illustrate with a hardware card including a GPU (hereinafter referred to as a GPU card).

[0037] In the current environment where model inference training is increasingly becoming a technical means to measure the core capabilities of AI products, server manufacturers and even mobile workstations have shown increasingly stringent requirements for the communication capabilities and link stability between multiple GPU cards.

[0038] The interconnection bridge between multiple GPU cards is sometimes connected between GPU cards with equally spaced slots through a rigid high-speed circuit board. For non-equally spaced GPU card slots on the platform, or even two slots on daughter boards in different planes, a flexible bridge board can better connect them.

[0039] Please refer to Figure 2 ,Figure 2 It is a schematic diagram of the connection between the flexible bridge card and the hardware card provided by the embodiment of the present invention.

[0040] A first hardware card 211 is provided on the vertical daughter board 210, a second hardware card 221 is provided on the horizontal daughter board 220, and the first hardware card 211 and the second hardware card 221 are connected by a flexible bridge card 230.

[0041] The test method for the signal quality of the bridge card proposed in this embodiment can verify and debug the circuit signal quality of the bridge card that directly communicates with the connected hardware card.

[0042] Specifically, based on the BERT bit error rate test principle, after establishing a PCIe link between the first hardware card and the second hardware card, data of a specified bit is sent between the two hardware cards based on the PCIe link. After the sending is completed, the status of the error bit flag register at the PCIe receiving end (RX) of the hardware card is read (the default is 0, whether it is set to 1). When 1 appears, it indicates that there is a link quality problem.

[0043] Through the above method, the test method for the signal quality of the bridge card in the embodiment of the present invention gets rid of the dependence on the signal quality test instrument, can directly use the hardware card to test the signal quality, discovers the link quality problem through the data reception situation of the two hardware cards, has high usability and wide popularity, and is of great help for the debugging before mass production of the bridge card.

[0044] In some embodiments, after the step of determining the signal quality of the bridge card according to the first data reception result and the second data reception result, the steps may specifically further include:

[0045] Reset the PCIe link between the first hardware card and the second hardware card; and / or, perform a warm reset on the first hardware card; and / or, perform a hot reset on the second hardware card.

[0046] In this embodiment, when a test is completed, the register status bit can be recorded, the link can be reset through hot reset, and multiple loop tests can be performed by repeating the above steps to obtain the probability of all loops appearing set to 1. This data can make a functional judgment on the quality of the PCIe signal of the bridge card.

[0047] In some embodiments, the step of controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receiving the first test data and determining the first data reception result based on the error register in the second hardware card may specifically include:

[0048] Clear the error register in the second hardware card; control the first hardware card to send first test data to the second hardware card via the PCIe link, and the second hardware card receives the first test data; during the process of the second hardware card receiving the first test data, calculate the first bandwidth data of the PCIe link; during the process of the second hardware card receiving the first test data, determine the error events in the error register of the second hardware card to obtain a first error result; determine a first data reception result based on the first bandwidth data and the first error result.

[0049] In this embodiment, the specific steps for generating the first data reception result by the second hardware card are specifically introduced. If the data transmission bandwidth is insufficient, it may lead to a data transmission bottleneck. Therefore, during the process of the second hardware card receiving the first test data, it is necessary to calculate the first bandwidth data of the PCIe link to determine whether the data transmission bandwidth meets the preset requirements.

[0050] In addition, errors may also occur during data transmission, resulting in data corruption or loss. In the embodiment, the errors existing in the second hardware card when receiving the first test data can be recorded through the error register in the second hardware card. Specifically, when an error occurs, the error code or status will be retained in the error register. Therefore, the error register needs to be cleared before and after the test. Clearing the error register can reset the state of the second hardware card, enabling the second hardware card to recover from the error state.

[0051] Therefore, by reading the error events in the error register of the second hardware card, the transmission errors occurring during the test transmission process can be known to obtain a first error result. Finally, the first bandwidth data and the first error result are aggregated to obtain the first data reception result generated by the second hardware card, providing data support for subsequent signal quality analysis.

[0052] In some embodiments, the steps of controlling the second hardware card to send second test data to the first hardware card via the PCIe link, and the first hardware card receiving the second test data and determining a second data reception result based on the error register in the first hardware card may specifically include:

[0053] Clear the error register in the first hardware card; control the second hardware card to send second test data to the first hardware card via the PCIe link, and the first hardware card receives the second test data; during the process of the first hardware card receiving the second test data, calculate the second bandwidth data of the PCIe link; during the process of the first hardware card receiving the second test data, determine the error events in the error register of the first hardware card to obtain a second error result; determine a second data reception result based on the second bandwidth data and the second error result.

[0054] In this embodiment, the specific steps of the second data reception result generated by the first hardware card are specifically introduced, and the method is similar to the first data reception result generated by the second hardware card in the above embodiment.

[0055] During the process of the first hardware card receiving the second test data, it is necessary to calculate the second bandwidth data of the PCIe link to determine whether the bandwidth of data transmission meets the preset requirements.

[0056] In the embodiment, the error register in the first hardware card can be used to record the errors existing when the first hardware card receives the second test data. Specifically, when an error occurs, the error code or status will be retained in the error register. Therefore, the error register needs to be cleared before and after the test. Clearing the error register can reset the state of the first hardware card, enabling the first hardware card to recover from the error state.

[0057] Therefore, by reading the error events in the error register of the first hardware card, the transmission errors occurring during the test transmission can be known, and the second error result can be obtained. Finally, the second bandwidth data and the second error result are aggregated to obtain the second data reception result generated by the first hardware card, providing data support for subsequent signal quality analysis.

[0058] In some embodiments, the steps of determining the signal quality of the bridge card according to the first data reception result and the second data reception result may specifically include at least one of the following situations:

[0059] ① If an uncorrectable error event appears in the first data reception result and / or the second data reception result, it is determined that the link fails, and the signal quality of the bridge card is marked as poor.

[0060] ② If no error event appears in the first data reception result and the second data reception result, it is determined that the link passes, and the signal quality of the bridge card is marked as excellent.

[0061] ③ If a correctable error event appears in the first data reception result and / or the second data reception result, and both the first bandwidth data and the second bandwidth data are greater than the preset bandwidth threshold, it is determined that the link is unstable, and the signal quality of the bridge card is marked as relatively poor.

[0062] ④ If a correctable error event appears in the first data reception result and / or the second data reception result, and at least one of the first bandwidth data and the second bandwidth data is less than or equal to the preset bandwidth threshold, it is determined that the link fails, and the signal quality of the bridge card is marked as poor.

[0063] ⑤ If other error events other than uncorrectable error events and correctable error events appear in the first data reception result and the second data reception result, it is determined that the link is average, and the signal quality of the bridge card is marked as warning.

[0064] In this embodiment, the types of error results can be divided into uncorrectable errors (UE), correctable errors (CE), and other error events.

[0065] When an unrecoverable data error is detected, it is marked as UE. Such errors usually lead to data loss or system crashes, so emergency measures need to be taken, such as recording the error, notifying the operating system, or stopping data transmission. Therefore, in this embodiment, when an uncorrectable error event is detected, the link can be directly determined to have failed, and the signal quality of the bridge card is marked as poor.

[0066] When the system detects a correctable data error, it is marked as CE. These errors can usually be repaired by error correction codes (such as ECC), and the errors will be automatically repaired without interrupting the operation, but these errors will still be recorded for subsequent analysis and performance optimization. Therefore, in this embodiment, when a correctable error event appears in the first data reception result and / or the second data reception result, the first bandwidth data and / or the second bandwidth data can be compared with a preset bandwidth threshold, and the signal quality of the bridge card can be determined according to the comparison result: if the bandwidth data is less than or equal to the preset bandwidth threshold, it is determined that the link has failed, and the signal quality of the bridge card is marked as poor; if the bandwidth data is greater than the preset bandwidth threshold, it is determined that the link is unstable, and the signal quality of the bridge card is marked as relatively poor.

[0067] When other error events occur in addition to uncorrectable error events and correctable error events, the error type is recorded, the link is determined to be normal, and the signal quality of the bridge card is marked as a warning. By recording, the health status of the bridge card can be monitored, potential problems can be detected, and optimization can be carried out.

[0068] Please refer to Figure 3 , Figure 3 which is the second flow schematic diagram of the method for testing the signal quality of the bridge card provided by the embodiment of the present invention.

[0069] In this embodiment, the bridge card between GPU cards is taken as an example for illustration, which specifically includes the following steps:

[0070] 1. Establish a PCIe link between two GPU cards.

[0071] In the first step, a PCIe link between two interconnected GPU cards is established first. The specific operation is to write registers to enable the link training state machine (LTSSM) of both ends of the GPU cards, so that the link establishment is completed.

[0072] 2. Clear the RX error bit register status bits at both ends.

[0073] Manually write the RX error bit status register of the two GPU cards at both ends to restore it to the default value of 0. This step is to clear the old values remaining before the test and ensure the accuracy of the status recorded later.

[0074] 3. The two GPU cards at both ends send bit data of a fixed quantity and size to each other.

[0075] Send a fixed number of bits of data on the link to impose a communication load (loading) on the link, which conforms to the actual application scenario of the product.

[0076] 4. Check whether the status bit value of the RX error bit register at both ends is set to 1.

[0077] After waiting for the data transmission to complete, check whether the value of the RX error bit status register is set to 1. If it is set to 1, record that there is an error in this link in the log, and mark the quality of this link as Fail in the log; if it is not set to 1, record that this link is normal, and mark the quality of this link as Pass in the log.

[0078] It should be noted that setting the RX error flag to 1 means that there is an error in the bits received on this link, indicating that the signal quality of this time is not very good.

[0079] 5. Perform a hot reset on the two GPU cards at both ends to reset the link.

[0080] Finally, perform a hot reset operation on the two GPU cards at both ends to reset this link, that is, disconnect the connection between the two parties.

[0081] When testing the stability of the link quality, the above steps 1 - 5 can be repeated a certain number of times. For example, after repeating 100 times, the probability of the link quality being Fail or Pass can be statistically obtained. Through this data, a reliable judgment on the signal quality level of this bridge card can be made very intuitively.

[0082] Above, the method of this embodiment gets rid of the dependence on signal quality testing instruments, uses the process design of functional use cases to achieve the purpose of signal quality verification, greatly reduces the cost. At the code level, it does not involve instruments, has high usability, wide popularity, is convenient for automation, has strong reliability, and can effectively discover existing signal quality problems during the test process.

[0083] Please refer to Figure 4 , Figure 4 which is the third schematic diagram of the process of the method for testing the signal quality of the bridge card provided by the embodiment of the present invention.

[0084] In this embodiment, a bridge card between GPU cards is taken as an example for illustration, which specifically includes the following steps:

[0085] 1. Establish a PCIe link between two GPU cards.

[0086] In the first step, establish a PCIe link between two interconnected GPU cards. The specific operation is to write registers to enable the link training state machine (LTSSM) of both ends of the GPU cards, so that the link establishment is completed.

[0087] 2. Clear the RX error bit register status bits at both ends.

[0088] Manually write the RX error bit status bit registers of both ends of the GPU cards to restore them to the default value of 0. This step is to clear the residual old values before testing to ensure the accuracy of the status recorded later.

[0089] 3. The two ends of the GPU cards respectively send bit data of a fixed quantity and size to each other.

[0090] Send data of a fixed number of bits (10^12 bits) on the link to impose a communication load on the link, which conforms to the actual application scenario of the product.

[0091] After waiting for the data transmission to complete, there are mainly two actions: calculating the link bandwidth data and checking the error status (UE / CE / event counter) of the bit data received by the GPU cards at both ends of the link.

[0092] 4. Calculate the link bandwidth data.

[0093] Compare the calculated bandwidth with 80% of the maximum theoretical value (i.e., the preset bandwidth threshold). The threshold is called target_bw. If it is less than this threshold, it is determined that the bandwidth has decreased, affecting the performance; if it is greater than or equal to target_bw, it is determined that the bandwidth is normal. Among them, the detection of link quality also needs to combine the Rx CE error status.

[0094] 5. Read the Rx error status (UE / CE / event counter) of the GPU cards at both ends.

[0095] In this embodiment, the error types to be judged include UE, CE, and 4-bit / 8-bit error events calculated by the event counter (i.e., 4-bit or 8-bit event counter errors). If no error (UE / CE / event counter error) occurs on the link, it means that the link quality is very good, and it is marked as Link Pass.

[0096] 6. Check whether the RX UE bit of the GPU cards at both ends is 1.

[0097] Check whether the Rx UE bit of the GPU cards at both ends of the link is 1. If it is 1, it means that there is an uncorrectable error on the link. The UE cannot automatically correct it by hardware. It must be completely reset and the link must be rebuilt to eliminate it. It has a great impact on communication. When this error occurs, the bandwidth will drop significantly, and other secondary errors such as CE and event counter will be reported. The link quality of the UE is the worst, marked as Link Fail.

[0098] 7. Check whether the RX CE bit of the GPU cards at both ends is 1.

[0099] If the GPU card Rx UE bit is 0, there is no UE on the link, and the CE bit value is checked. If the CE bit value is 1, there is CE. The hardware can automatically recover from CE errors, but correcting CE will consume extra time and may affect performance, so it is necessary to combine the bandwidth data to make a judgment.

[0100] If CE occurs and the bandwidth decreases, the link quality is poor and is marked as Link Fail. If CE occurs but there is no accompanying bandwidth decrease, the link quality is acceptable but not very stable and is marked as Link Worse. Debugging and improvement are required to prevent the subsequent CE probability from increasing and affecting the bandwidth.

[0101] 8. Check whether there is 4-bit / 8-bit error in the RX event counter of the GPU cards at both ends.

[0102] While checking the UE / CE bit, this embodiment also reads the values of the event counters of the GPU cards at both ends. There are mainly two types of error event counters: 4-bit and 8-bit.

[0103] If there is a 4-bit error, the lane number, error type, and number of errors must be counted and recorded. This information can reveal which channels have poor link quality, so that the parameters of each channel can be adjusted in a targeted manner to optimize the stability of the overall system.

[0104] If there is an 8-bit error, it is necessary to count the common types of errors and their quantities (such as Receiver Error, RxRecovery Request, BAD TLP, BAD DLLP, Replay Timeout, Rx Nak DLLP, Tx Nak DLLP, Retry TLP, Completion Timeout, etc.). Whether each type appears and its counter quantity can assist in analyzing the reasons for the quality of the link being good or bad.

[0105] For example, if Completion Timeout is found, it indicates the reason for the occurrence of UE.

[0106] Another example is that if either Receiver Error or Rx Recovery Request occurs, CE will definitely occur. Moreover, the larger the counter values of these two 8-bit error quantities, the more times the error occurs, indirectly reflecting the poor quality of the link.

[0107] For the other several 8-bit errors, their existence indicates insufficient link stability, resulting in frequent retransmission of data packets so that the receiving end can successfully receive. The larger the values of these error counters, the higher the possibility of bandwidth degradation because frequent retransmissions will occupy more bandwidth resources. Therefore, the values of these error counters are important indicators for evaluating link performance and bandwidth utilization.

[0108] In link quality monitoring, if there is a 4-bit or 8-bit event counter error, but CE does not occur, the link quality in this case is average and will not affect the normal operation of the service. However, more tests need to be done, paying attention to the overall status, and it is marked as Link Warning.

[0109] It should be noted that in error event monitoring, if CE does not occur, UE will definitely not occur; on the contrary, if UE occurs, CE will definitely occur simultaneously.

[0110] 9. The link quality detection for this time is completed.

[0111] 10. Perform a hot reset on the two ends of the GPU cards to reset the link.

[0112] After the above steps are completed, the link detection for this time is ended. Finally, perform a hot reset operation on the two ends of the GPU cards to reset this link, that is, disconnect the connection between the two parties.

[0113] When evaluating the stability of link quality, one should not rely solely on the results after a single link establishment. Therefore, steps 1 to 10 can also be repeatedly executed multiple times, for example, 100 times, to statistically analyze the probability distribution of the Link status (Fail, Worse, Warning, Pass) in the link quality report.

[0114] In addition, the overall change in bandwidth during these 100 link tests needs to be observed. These data can intuitively reflect the level of the flexible board signal quality and provide a reliable basis for evaluation. A high-quality link should not exhibit Link Fail or a decrease in bandwidth. The higher the probability of Link Worse, the greater the likelihood of affecting business operations.

[0115] In summary, after the PCIe link is established between the two GPU cards connected by the bridge card in this embodiment, data of a specified bit (10^12 bit) is sent between the two cards. After the sending is completed, the link bandwidth is checked, and at the same time, the status of the error bit flag register at the receiving end (RX) of the GPU card is read, mainly to check whether UE / CE / event counter (the default is 0, whether it is set to 1). The link signal quality is judged based on the bandwidth and the type of error, and at the same time, data reference is provided for subsequent debugging. Then, the link is reset through hot reset, and the previous operations are repeated. This embodiment gets rid of the dependence on signal quality testing instruments, directly uses the hardware card for signal quality testing, discovers link quality problems through the data reception conditions of the two hardware cards, has high usability, and wide popularity.

[0116] The embodiment of the present invention also provides a test device for the signal quality of a bridge card. The test device for the signal quality of the bridge card provided by the present invention will be described below. The test device for the signal quality of the bridge card described below can be correspondingly referred to the test method for the signal quality of the bridge card described above.

[0117] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of the test device for the signal quality of the bridge card provided by the embodiment of the present invention. When starting the bridge card signal test, the bridge card is respectively connected to the first hardware card and the second hardware card.

[0118] In this embodiment, the test device for the signal quality of the bridge card may include a link establishment module 510, a first transmission module 520, a second transmission module 530, and a signal quality analysis module 540.

[0119] The link establishment module 510 is used to establish a PCIe link between the first hardware card and the second hardware card.

[0120] The first transmission module 520 is configured to control the first hardware card to send first test data to the second hardware card through a PCIe link, and the second hardware card receives the first test data and determines a first data reception result based on an error register in the second hardware card.

[0121] The second transmission module 530 is configured to control the second hardware card to send second test data to the first hardware card through a PCIe link, and the first hardware card receives the second test data and determines a second data reception result based on an error register in the first hardware card.

[0122] The signal quality analysis module 540 is configured to determine the signal quality of the bridge card according to the first data reception result and the second data reception result.

[0123] In some embodiments, the first transmission module 520 may specifically be configured to:

[0124] Clear the error register in the second hardware card; control the first hardware card to send first test data to the second hardware card through a PCIe link, and the second hardware card receives the first test data; during the process of the second hardware card receiving the first test data, calculate the first bandwidth data of the PCIe link; during the process of the second hardware card receiving the first test data, determine error events in the error register of the second hardware card to obtain a first error result; determine the first data reception result according to the first bandwidth data and the first error result.

[0125] In some embodiments, the second transmission module 530 may specifically be configured to:

[0126] Clear the error register in the first hardware card; control the second hardware card to send second test data to the first hardware card through a PCIe link, and the first hardware card receives the second test data; during the process of the first hardware card receiving the second test data, calculate the second bandwidth data of the PCIe link; during the process of the first hardware card receiving the second test data, determine error events in the error register of the first hardware card to obtain a second error result; determine the second data reception result according to the second bandwidth data and the second error result.

[0127] In some embodiments, the signal quality analysis module 540 may specifically be configured to:

[0128] When an uncorrectable error event appears in the first data reception result and / or the second data reception result, it is determined that the link fails, and the signal quality of the bridge card is marked as poor; when no error event appears in the first data reception result and the second data reception result, it is determined that the link passes, and the signal quality of the bridge card is marked as excellent.

[0129] In some embodiments, the signal quality analysis module 540 may specifically be configured to:

[0130] When a correctable error event occurs in the first data reception result and / or the second data reception result, the first bandwidth data and / or the second bandwidth data are compared with a preset bandwidth threshold; if both the first bandwidth data and the second bandwidth data are greater than the preset bandwidth threshold, it is determined that the link is unstable, and the signal quality of the bridge card is marked as poor; if at least one of the first bandwidth data and the second bandwidth data is less than or equal to the preset bandwidth threshold, it is determined that the link fails, and the signal quality of the bridge card is marked as bad.

[0131] In some embodiments, the signal quality analysis module 540 can specifically be used for:

[0132] When other error events other than uncorrectable error events and correctable error events occur in the first data reception result and the second data reception result, record the error type, determine that the link is normal, and mark the signal quality of the bridge card as a warning.

[0133] In some embodiments, the test device for the signal quality of the bridge card may further include a reset module, and the reset module can specifically be used for:

[0134] Reset the PCIe link between the first hardware card and the second hardware card; and / or, perform a thermal reset on the first hardware card; and / or, perform a thermal reset on the second hardware card.

[0135] On the other hand, an embodiment of the present invention further provides an electronic device. Please refer to Figure 6 , Figure 6 is a schematic physical structure diagram of the electronic device provided by the embodiment of the present invention. As Figure 6 shown, the electronic device may include a memory 620, a processor 610, and a computer program stored in the memory 620 and executable on the processor 610. When the processor 610 executes the program, it implements the test method for the signal quality of the bridge card provided by the above various methods.

[0136] Optionally, the electronic device may further include a communication bus 630 and a communication interface 640. Among them, the processor 610, the communication interface 640, and the memory 620 complete mutual communication through the communication bus 630. The processor 610 can call the computer program in the memory 620 to execute the test method for the signal quality of the bridge card, and the method may include:

[0137] Establish a PCIe link between the first hardware card and the second hardware card; control the first hardware card to send first test data to the second hardware card through the PCIe link, the second hardware card receives the first test data and determines the first data reception result based on the error register in the second hardware card; control the second hardware card to send second test data to the first hardware card through the PCIe link, the first hardware card receives the second test data and determines the second data reception result based on the error register in the first hardware card; determine the signal quality of the bridge card according to the first data reception result and the second data reception result.

[0138] In addition, when the logical instructions in the above-mentioned memory 620 can be implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, etc., which can store program codes.

[0139] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the test method for the signal quality of the bridge card provided by the above-mentioned various methods. The steps and principles have been introduced in detail in the above methods and will not be repeated here.

[0140] On yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the test method for the signal quality of the bridge card provided by the above-mentioned various methods. The steps and principles have been introduced in detail in the above methods and will not be repeated here.

[0141] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memories (NANDFLASH), solid-state drives (SSD)), etc.

[0142] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.

Claims

1. A test method for the signal quality of a bridge card, characterized in that, The bridging card is respectively connected to the first hardware card and the second hardware card. The method for testing the signal quality of the bridging card includes: Establish a PCIe link between the first hardware card and the second hardware card; Control the first hardware card to send first test data to the second hardware card through the PCIe link. The second hardware card receives the first test data and determines a first data reception result based on an error register in the second hardware card; Control the second hardware card to send second test data to the first hardware card through the PCIe link. The first hardware card receives the second test data and determines a second data reception result based on an error register in the first hardware card; Determine the signal quality of the bridging card according to the first data reception result and the second data reception result; The step of controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receiving the first test data and determining a first data reception result based on an error register in the second hardware card includes: Clear the error register in the second hardware card; Control the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data; During the process of the second hardware card receiving the first test data, calculate first bandwidth data of the PCIe link; During the process of the second hardware card receiving the first test data, determine error events in the error register of the second hardware card to obtain a first error result; Determine the first data reception result according to the first bandwidth data and the first error result; The step of controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receiving the second test data and determining a second data reception result based on an error register in the first hardware card includes: Clear the error register in the first hardware card; Control the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data; During the process of the first hardware card receiving the second test data, calculate second bandwidth data of the PCIe link; During the process of the first hardware card receiving the second test data, determine error events in the error register of the first hardware card to obtain a second error result; Determine the second data reception result according to the second bandwidth data and the second error result.

2. The test method for the signal quality of the bridging card according to claim 1, wherein The step of determining the signal quality of the bridging card according to the first data reception result and the second data reception result includes: When an uncorrectable error event appears in the first data reception result and / or the second data reception result, determine that the link fails and mark the signal quality of the bridging card as poor; When no error event appears in the first data reception result and the second data reception result, determine that the link passes and mark the signal quality of the bridging card as excellent.

3. The test method for the signal quality of the bridging card according to claim 1, wherein Determining the signal quality of the bridge card according to the first data reception result and the second data reception result includes: When a correctable error event occurs in the first data reception result and / or the second data reception result, compare the first bandwidth data and / or the second bandwidth data with a preset bandwidth threshold; If both the first bandwidth data and the second bandwidth data are greater than the preset bandwidth threshold, determine that the link is unstable and mark the signal quality of the bridge card as poor; if at least one of the first bandwidth data and the second bandwidth data is less than or equal to the preset bandwidth threshold, determine that the link fails and mark the signal quality of the bridge card as bad.

4. The test method for the signal quality of the bridge card according to claim 1, characterized in that Determining the signal quality of the bridge card according to the first data reception result and the second data reception result includes: When other error events other than uncorrectable error events and correctable error events occur in the first data reception result and the second data reception result, record the error type, determine that the link is normal, and mark the signal quality of the bridge card as a warning.

5. The method for testing the signal quality of a bridging card according to any one of claims 1 to 4, characterized in that After determining the signal quality of the bridge card according to the first data reception result and the second data reception result, it further includes: Reset the PCIe link between the first hardware card and the second hardware card; and / or, perform a warm reset on the first hardware card; and / or, perform a warm reset on the second hardware card.

6. A test device for the signal quality of a bridge card, characterized in that, The bridge card is respectively connected to the first hardware card and the second hardware card, and the test device for the signal quality of the bridge card includes: A link establishment module for establishing a PCIe link between the first hardware card and the second hardware card; A first transmission module for controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data and determines a first data reception result based on an error register in the second hardware card; A second transmission module for controlling the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data and determines a second data reception result based on an error register in the first hardware card; A signal quality analysis module for determining the signal quality of the bridge card according to the first data reception result and the second data reception result; The first transmission module is specifically used for: clearing the error register in the second hardware card; controlling the first hardware card to send first test data to the second hardware card through the PCIe link, and the second hardware card receives the first test data; calculating the first bandwidth data of the PCIe link during the process of the second hardware card receiving the first test data; determining error events in the error register of the second hardware card during the process of the second hardware card receiving the first test data to obtain a first error result; determining the first data reception result according to the first bandwidth data and the first error result; The second transmission module is specifically configured to: clear the error register in the first hardware card; control the second hardware card to send second test data to the first hardware card through the PCIe link, and the first hardware card receives the second test data; calculate second bandwidth data of the PCIe link during the process that the first hardware card receives the second test data; determine error events in the error register of the first hardware card during the process that the first hardware card receives the second test data, so as to obtain a second error result; and determine the second data reception result according to the second bandwidth data and the second error result.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the test method for the signal quality of the bridge card according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the test method for the signal quality of the bridge card according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the test method for the signal quality of the bridge card according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vehicle-mounted board card testing method and board card testing system

    CN118897177A

  • Link control card detecting system and method

    CN1900916A