PCIE transmission rate and packet loss rate automatic test method

Through custom packets and test instructions, automatic testing of PCIE communication rate and packet loss rate is realized, solving the expensive and complex problems of existing systems, and improving the flexibility and practicality of testing.

CN120358174APending Publication Date: 2025-07-22CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510338780.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

In the prior art, PCIE communication rate and packet loss rate testing systems are expensive and complex to operate, and the actual impact under different packet sizes and cycle conditions cannot be considered.

Method used

Design custom packets and test instructions, set the packet size and cycle through the test equipment, automatically calculate the data transmission rate and packet loss rate of PCIE to achieve feedback on the test results.

Benefits of technology

Improves the flexibility and practicality of PCIE data transmission rate and packet loss rate testing, and allows quick understanding of the impact under different conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358174A_ABST
    Figure CN120358174A_ABST
Patent Text Reader

Abstract

The invention discloses a PCIE (Peripheral Component Interface Express) transmission rate and packet loss rate automatic test method, which comprises the following steps of: customizing a data packet for communication between two tested PCIE modules and a test instruction between test equipment and the tested PCIE modules; a data transmission rate and packet loss rate test program between tested modules and a data instruction interaction program between the test equipment and the tested modules are designed based on a self-defined data packet and a test instruction, and communication instruction transceiving between the test equipment and the tested modules is realized by using an external communication port of the tested modules. Therefore, the test equipment can set the size and the period of the test data and feed back the data transmission rate and the packet loss rate result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of PCIE communication testing, and relates to an automatic testing method for PCIE transmission rate and packet loss rate. Background Art

[0002] With the development of electronic technology, the avionics products of modern aircraft have entered an era of high digitization, integration, and modularization. To meet the high-speed data communication and modular design requirements among various modules within avionics products, PCIE is widely used in the design of avionics products. In view of this, when testing the entire avionics product, the communication rate test and packet loss rate test of PCIE are indispensable. However, usually, the communication rate and packet loss rate tests of PCIE require a complete set of test systems, which are expensive and complex to operate. In addition, the conventional rate test mainly focuses on testing the communication performance of PCIE, without considering the actual usage situation after adding application protocols and the influence of different data packet sizes and cycle conditions on the PCIE transmission rate and packet loss rate. Summary of the Invention

[0003] In view of the above situation, the object of the present invention is to provide an automatic testing method for PCIE communication transmission rate and packet loss rate, which can automatically calculate the data transmission rate and packet loss rate of PCIE under different conditions by setting the data packet size and cycle during the test process through a test device, and feedback the test results to the test device, thereby improving the flexibility and practicality of the data transmission rate and packet loss rate tests.

[0004] The object of the present invention is achieved through the following technical solutions:

[0005] An automatic testing method for PCIE transmission rate and packet loss rate, comprising the following steps:

[0006] Define the data packets for communication between two PCIE modules to be tested. The data packet contains the AOXE_MsgHead_Type structure. The AOXE_MsgHead_Type structure contains a count field and a bytes field. The count field is used to record the data packet count sent by the PCIE sending module. For the PCIE sending module, each time a packet of PCIE data is sent, this count value will be incremented by 1. When receiving a test instruction, this value will be cleared and the counting will start again; the bytes field is used to record the number of bytes sent by this data packet;

[0007] Define the test instructions between the test device and the PCIE module under test. The test instructions contain the comMsgStr structure. The comMsgStr structure contains the option field, the time field, the bytes field, and the interval field. The option field is used to define whether the module under test is a PCIE sending module or a PCIE receiving module; the time field is used to define the test duration; the bytes are used to define the size of each packet of data; the interval field is used to define the packet interval time;

[0008] The test process is as follows:

[0009] Step 1: Two PCIE modules under test receive the test instructions from the test device through the external communication channel;

[0010] Step 2: When the option field in the comMsgStr structure of the received test instruction is for the sending PCIE module as the PCIE sending module, the PCIE sending module gives feedback to the test device after receiving the test instruction. At the same time, after obtaining the data content in this structure, it will send PCIE data packets according to the content in the bytes and interval fields. The bytes field in the AOXE_MsgHead_Type structure of its data header will be the same as the bytes field in the comMsgStr structure, denoted as N; the count field will start counting from 0, and the count value will be incremented by 1 for each packet sent;

[0011] Step 3: When the option field in the comMsgStr structure of the received test instruction is for the receiving PCIE module as the PCIE receiving module, the PCIE receiving module immediately records the current value of the count field in the AOXE_MsgHead_Type structure received from the PCIE sending module, where the bytes field N is the same as the bytes field in the comMsgStr structure, as the first packet count value Cstart and starts timing; each time the PCIE receiving module receives a data packet, it needs to record its count value Cold. When the next data packet arrives, subtract the previously recorded count value Cold from the latest count value Cnew as the number of lost packets and accumulate it; the test waiting duration is determined by the time field in the comMsgStr structure sent by the test device; after the waiting duration reaches the time required by the test device, record the value of the count field in the PCIE data AOXE_MsgHead_Type structure at this time as the last packet count value Cend;

[0012] Calculate the cumulative value of the number of lost packets as Cnew - Cold. The formula for the packet loss rate is ((Cnew1 - Cold1)+(Cnew2 - Cold2)+……) / (Cend - Cstart)*100%; the data transmission rate is (N*((Cend - Cstart)-((Cnew1 - Cold1)+(Cnew2 - Cold2)+……))) / (time*1024

[0013] *1024) MB / s;

[0014] The PCIE receiving module feeds back the test results to the test device through its external communication channel.

[0015] Preferably, the data packet also contains the Head_PCIE_Inform structure, and the Head_PCIE_Inform structure includes the PCIE message source Id number, the PCIE message source handle, the PCIE message destination Id number, the PCIE message destination handle, and the reserved field.

[0016] Preferably, the AOXE_MsgHead_Type structure also includes a message header, a reserved field, and a data checksum.

[0017] Preferably, the comMsgStr structure also includes a data header, the total length of the data packet, and a data packet checksum.

[0018] The beneficial effects of the present invention are as follows:

[0019] The present invention can realize the automatic test of the PCIE data transmission rate and the packet loss rate of avionics products under different data packet sizes and packet sending periods. By setting the data packet size and the packet sending period through the test device, the test developers can quickly understand the direct impacts of the above two factors on the data transmission rate and the packet loss rate, effectively improving the flexibility and practicality of the test of the PCIE data transmission rate and the packet loss rate of avionics products. Description of the Drawings

[0020] Figure 1 It is a test flow chart of an automatic test method for the PCIE communication transmission rate and the packet loss rate.

[0021] Figure 2 It is a structural block diagram of an automatic test method for the PCIE communication transmission rate and the packet loss rate. Detailed Embodiments

[0022] The present invention will be further described in detail below with reference to the drawings and embodiments.

[0023] In this embodiment, a method for automatically testing the PCIE data transmission rate and packet loss rate is provided for the factors affecting the PCIE data transmission rate and packet loss rate of avionics products. For the PCIE communication mode of avionics products, a test program for the data transmission rate and packet loss rate between the modules under test is designed based on a custom communication protocol; a data instruction interaction program between the test device and the modules under test is developed based on the custom communication protocol, and the communication instructions between the test device and the modules under test are sent and received by using the external communication port of the modules under test, so as to realize the setting of the test data size and period by the test device and the feedback of the data transmission rate and packet loss rate results.

[0024] For the convenience of description, this embodiment takes the one-way transmission and reception between two PCIE modules of avionics products as an example for illustration. The two PCIE modules under test are respectively defined as a PCIE sending module and a PCIE receiving module. For the two-way test, the principle is the same as that of the one-way transmission and reception, and only the sending and receiving modules need to be swapped and the corresponding functions need to be implemented at the same time.

[0025] For the convenience of recording data information and calculating the transmission rate and packet loss rate, this solution defines a data packet for communication between two PCIE modules under test. The data packet contains the Head_PCIE_Inform structure and the AOXE_MsgHead_Type structure. The specific definitions are as follows:

[0026]

[0027]

[0028] In the structure Head_PCIE_Inform, srcId represents the PCIE message source Id number; srcHandle represents the PCIE message source handle; desId represents the PCIE message destination Id number; desHandle represents the PCIE message destination handle; spare is a reserved field.

[0029] In the structure AOXE_MsgHead_Type, pcieHead is the message header; the count field is used to record the packet count sent by the PCIE sending module. For the PCIE sending module, each time a packet of PCIE data is sent, this count value will be incremented by 1. When a test instruction is received, this value is cleared and counting starts again. The bytes field is used to record the number of bytes sent in this packet of PCIE data. The PCIE receiving module can use this field to judge the integrity of the PCIE data packet. Spare is a reserved field; checksum is the data checksum of PCIE, which is calculated by accumulating the sum of all data and taking the lowest 4 bytes, which can ensure the accuracy of the data packet.

[0030] For the convenience of description and coding, the present invention defines test instructions between the test device and the PCIE module under test. The test instructions include a comMsgStr communication body, and its definition is as follows:

[0031]

[0032]

[0033] In the comMsgStr structure, head is the data header; length is the total length of the data packet; option is used to define whether the module under test is a PCIE sending module or a PCIE receiving module (01 for sending, 02 for receiving); time is the test duration field (s); bytes is the size of each packet of data (byte); interval is the packet interval time (us); checksum is the packet checksum, and its calculation method is still to take the lowest 4 bytes after summing the entire packet of data.

[0034] To implement the test of the transmission rate and packet loss rate of the PCIE module of the avionics product, this embodiment designs a mode for the PCIE module under test to communicate with the test device and report the test results through a communication channel. The test process is shown in Figure 2 .

[0035] Step 1: The PCIE sending module and the PCIE receiving module receive test instructions from the test device through the external communication channel.

[0036] Step 2: After receiving the test instructions, the PCIE sending module gives feedback to the test device to let the test device confirm that the test instructions are sent successfully. If the sending module does not give normal feedback, it means that the test result is also meaningless. In addition, the feedback test instructions are also for unifying the test process and the message flow between the sending module and the receiving module.

[0037] Step 3: It means that the PCIE sending module sends PCIE test data packets to the PCIE receiving module according to the test instructions; that is, after the PCIE module with the option field in the comMsgStr structure of the received test instructions being 0x01 obtains the data content in the structure through the communication channel, it will send PCIE data packets according to the content in the bytes and interval fields. The bytes field in the AOXE_MsgHead_Type structure of its data header will be the same as the bytes field in the comMsgStr structure, denoted as N; the count field will start counting from 0, and the count value will be incremented by 1 for each packet of data sent;

[0038] Step 4: The PCIE receiving module always has a thread to receive data packets from the PCIE sending module. However, when the option field in the comMsgStr structure in the test instruction is 0x02, the PCIE module immediately records the current value of the count field in the AOXE_MsgHead_Type structure whose bytes field N is the same as the bytes field in the comMsgStr structure received from the PCIE sending module as the first packet count value Cstart after receiving the test instruction and starts timing. Each time the PCIE receiving module receives a data packet, it needs to record its count value Cold. When the next data packet arrives, the difference between the latest count value Cnew and the previously recorded count value Cold is used as the number of lost packets and accumulated. The test waiting duration is determined by the time field in the comMsgStr structure sent by the test device. After the waiting duration reaches the required time sent by the test device, the value of the count field in the AOXE_MsgHead_Type structure of the PCIE data at this time, Cend, is recorded as the last packet count value.

[0039] As can be seen from the above, the number of lost packets is the accumulated value of Cnew - Cold. The calculation formula for the packet loss rate is ((Cnew1 - Cold1) + (Cnew2 - Cold2) + ……) / (Cend - Cstart)*100%; the data transfer rate is (N*((Cend - Cstart) - ((Cnew1 - Cold1) + (Cnew2 - Cold2) + ……))) / (time * 1024

[0040] *1024) MB / s.

[0041] After the PCIE receiving module test is completed, the test results are fed back to the test device through its external communication channel.

[0042] It can be understood that for those of ordinary skill in the art, equivalent substitutions or changes can be made according to the technical solutions and inventive concepts of the present invention, and all such changes or substitutions should fall within the protection scope of the appended claims of the present invention.

Claims

1. An automatic test method for PCIE transmission rate and packet loss rate, characterized in that The steps include: Define the data packets for communication between two PCIE modules under test. The data packets contain the AOXE_MsgHead_Type structure. The AOXE_MsgHead_Type structure includes a count field and a bytes field. The count field is used to record the data packet count sent by the PCIE sending module. For the PCIE sending module, each time a packet of PCIE data is sent, this count value will be incremented by 1. When a test instruction is received, this value is cleared and the counting starts again; The bytes field is used to record the number of bytes sent in this data packet; Define the test instructions between the test device and the PCIE module under test. The test instructions contain the comMsgStr structure. The comMsgStr structure includes an option field, a time field, a bytes field, and an interval field. The option field is used to define whether the module under test is a PCIE sending module or a PCIE receiving module; the time field is used to define the test duration; the bytes field is used to define the size of each packet of data; the interval field is used to define the data packet interval time; The test process is as follows: Step 1: The two PCIE modules under test receive test instructions from the test device through the external communication channel; Step 2: When the option field in the comMsgStr structure of the received test instruction is for the sending PCIE module as the PCIE sending module, the PCIE sending module gives feedback to the test device after receiving the test instruction. At the same time, after obtaining the data content in this structure, it will send PCIE data packets according to the content in the bytes and interval fields. The bytes field in the AOXE_MsgHead_Type structure of its data header will be the same as the bytes field in the comMsgStr structure, denoted as N; the count field will start counting from 0, and the count value will be incremented by 1 for each data packet sent; Step 3: When the option field in the comMsgStr structure of the received test instruction is for the receiving PCIE module as the PCIE receiving module, the PCIE receiving module immediately records the current value of the count field in the AOXE_MsgHead_Type structure where the bytes field N received from the PCIE sending module is the same as the bytes field in the comMsgStr structure as the first packet count value Cstart and starts timing; Each time the PCIE receiving module receives a data packet, it needs to record its count value Cold. When the next data packet arrives, the difference between the latest count value Cnew and the previously recorded count value Cold is used as the number of lost packets and accumulated; the test waiting duration is determined by the time field in the comMsgStr structure sent by the test device; After waiting until the waiting duration reaches the time required by the test device, record the value Cend of the count field in the AOXE_MsgHead_Type structure of the PCIE data at this time as the tail packet count value; Calculate the cumulative value of the packet loss count as Cnew - Cold. The packet loss rate calculation formula is ((Cnew1 - Cold1)+(Cnew2 - Cold2)+……) / (Cend - Cstart)*100%; The data transfer rate is (N*((Cend - Cstart)-((Cnew1 - Cold1)+(Cnew2 - Cold2)+……))) / (time*1024*1024) MB / s; The PCIE receiving module feeds back the test result to the test device through its external communication channel.

2. The automatic test method for PCIE transmission rate and packet loss rate according to claim 1, characterized in that The data packet also contains the Head_PCIE_Inform structure, and the Head_PCIE_Inform structure includes the PCIE message source Id number, the PCIE message source handle, the PCIE message destination Id number, the PCIE message destination handle, and the reserved field.

3. The automatic test method for PCIE transmission rate and packet loss rate according to claim 1, wherein The AOXE_MsgHead_Type structure also includes a message header, a reserved field, and a data checksum.

4. The automatic test method for PCIE transmission rate and packet loss rate according to claim 1, wherein The comMsgStr structure also includes a data header, the total length of the data packet, and the data packet checksum.