Parallel test device supporting multiple communication interfaces
By designing a parallel test device that supports multi -communication interface, using FPGA technology to achieve interface conversion and UDP message processing, solve the problems of testing Sriox4 and 422 serial interface safety equipment in existing technology, improve test efficiency and process simplification sex.
Patent Information
- Application Number
- CN202411456210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The prior art is difficult to efficiently test security devices with SRIOx4 interface and 422 serial interface, and it requires relying on third-party communication equipment, resulting in cumbersome and inefficient testing.
Design a parallel test device that supports multi -communication interfaces, adopts FPGA technology, to realize the conversion of the SRIOX4 interface and 422 serial interface to the network port. Ship treatment.
The efficient testing of safety equipment with SRIOX4 interfaces and 422 serial interfaces is implemented, which improves test efficiency, supports multiple security equipment parallel testing, and simplifies the test process.
Smart Images

Figure CN119383114A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of safety equipment testing, and more specifically, to a parallel testing device supporting multiple communication interfaces. Background Art
[0002] When testing security devices embedded in communication devices, it is often found that the communication interface between security devices and communication devices is not a commonly used interface, so the testing of security devices needs to rely on third-party communication devices, which makes the testing work unable to be carried out on demand at any time. Due to the strong correlation between the security devices of embedded terminals and the host devices, they need to rely on the hardware and software environment of the host devices during the equipment development, testing, and production inspection process. However, the development cycle and progress of embedded terminal security devices are often inconsistent with those of the host device manufacturers. Due to the shortage of host environment, the function and performance verification of embedded terminal security devices during development is insufficient, and the production inspection environment is incomplete.
[0003] In order to ensure the development and production progress of security equipment for embedded terminals and make testing more economical and efficient, it is necessary to design a tooling board that adapts to its interface form and electrical characteristics and has the ability to conduct parallel testing.
[0004] During the testing work, it is more difficult to test security devices with SRIO interface and 422 serial interface. Since they are not universal interfaces, each test must be coordinated with third-party communication equipment manufacturers. The process is cumbersome and the testing efficiency is low. Summary of the invention
[0005] In order to solve the above problems, the present invention provides a parallel testing device supporting multiple communication interfaces, which can realize the conversion of SRIOx4 interface to network port and the conversion of 422 serial interface to network port, thereby improving the testing efficiency of safety equipment.
[0006] To achieve the above-mentioned purpose, according to the first aspect of the present invention, a parallel test device supporting multiple communication interfaces is provided, which is connected between a test host computer and at least one safety device. The parallel test device adopts FPGA, includes at least one Gigabit Ethernet interface, SRIOx4 interface and 422 serial interface, communicates with the test host computer through the Gigabit Ethernet interface, and communicates with the safety device through the SRIOx4 interface or the 422 serial interface; the parallel test device is used to transmit the test service data sent by the test host computer to the safety device, and return the safety device test results to the test host computer, and the test service data and the safety test results are both carried by UDP messages; the destination port number of the UDP message is used to uniquely identify the test service type, and the destination IP address of the UDP message is used to uniquely identify the safety device.
[0007] Furthermore, the parallel test device is also used to perform fragmentation processing on UDP messages transmitted from the safety device to the test host computer, and to perform fragmentation processing on UDP messages transmitted from the test host computer to the safety device.
[0008] Furthermore, the UDP message transmitted from the test host computer to the security device is fragmented, including judging whether the UDP message from the test host computer is a fragmented message based on the fragmentation flag information in the IP header of the UDP message; if it is a fragmented message, continue to wait for the arrival of subsequent UDP messages with the same destination port number until the last fragment arrives, completing all the fragmentation.
[0009] Furthermore, based on the fragmentation flag information in the IP header of the UDP message, determine whether the UDP message from the test host computer is a fragmented message, including extracting the fragmentation flag information and fragment offset from the IP header of the UDP message sent by the test host computer; receiving and storing the payload data; after the payload data is received, determine whether the UDP message is a fragmented message.
[0010] Furthermore, the parallel testing device is also used to extract UDP message payload data, including removing the MAC header, IP header, and UDP header from the combined UDP message after the combination is completed, retaining the payload data, and recording the length of the payload data.
[0011] Furthermore, the parallel testing device is also used for arp response processing, including receiving arp request messages sent by the test host computer while receiving UDP messages transmitted from the test host computer to the security device; generating arp response messages when receiving arp request messages, and returning arp response messages to the test host computer, the arp response messages are used to reply to the destination MAC address to be queried by the arp message; when the destination MAC address corresponds to the IP address of the arp request message, the security device will receive the UDP message from the test host computer.
[0012] Furthermore, the parallel testing device is also used for network transmission pre-fragmentation, including comparing the length of the UDP message received by the security device with the maximum length of the UDP data packet to determine whether to perform fragmentation; if fragmentation is performed, the payload data of the maximum length of the UDP data packet is taken out each time to encapsulate the payload data into a message in UDP format, and the maximum length of the UDP data packet is not greater than the value of the maximum transmission unit (MTU) of the UDP message.
[0013] Further, the payload data is encapsulated into a message in UDP format, including inserting a MAC header, an IP header, a UDP header, and the payload data in sequence, and encapsulating the MAC header, the IP header, the UDP header, and the payload data into a message in UDP format.
[0014] Furthermore, the parallel test device is also used for message filtering and parsing, including filtering network messages from the test host computer, retaining ARP request messages and UDP messages; determining the test service type based on the destination port number of the UDP message; and determining the security device to be tested based on the destination IP address of the UDP message.
[0015] Furthermore, the Gigabit Ethernet interface is a RGMII network port.
[0016] According to a second aspect of the present invention, there is also provided a computer device, which includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of any one of the above methods.
[0017] According to a third aspect of the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0018] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.
[0019] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0020] The invention provides a parallel testing device supporting multiple communication interfaces, which can realize the conversion of SRIOx4 interface to network port and the conversion of 422 serial interface to network port, so as to convert the interface of the safety device with SRIOx4 interface and 422 serial interface into a universal interface, so that the safety device can be tested by connecting to an ordinary computer. At the same time, it also supports parallel testing of multiple safety devices, so as to improve the testing efficiency of the safety devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 An application environment diagram of a parallel testing device supporting multiple communication interfaces provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of the destination port number and destination IP address of a UDP message provided in an embodiment of the present application;
[0024] Figure 3 A logical design architecture diagram of a parallel test device supporting multiple communication interfaces provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of a flow chart of a parallel test device supporting multiple communication interfaces performing UDP message segmentation processing provided in an embodiment of the present application;
[0026] Figure 5 A comparison table of a traditional testing method and a testing method using a parallel testing device supporting multiple communication interfaces provided by an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0028] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0029] In one embodiment, a parallel test device supporting multiple communication interfaces is provided, which is connected between a test host computer and at least one safety device, and includes at least one Gigabit Ethernet interface, SRIOx4 interface and 422 serial interface. The parallel test device communicates with the test host computer via the Gigabit Ethernet interface, and the parallel test device communicates with the safety device via the SRIOx4 interface or the 422 serial interface.
[0030] like Figure 1 As shown, the test host computer and the parallel test device communicate through the RGMII network port, and use the universal network port as the test interface, so that any computer can carry out safety equipment testing after installing the test program.
[0031] The parallel test device communicates with type A safety device 1 through an SRIOx4 interface, communicates with type A safety device 2 through another SRIOx4 interface, communicates with type B safety device 1 through a 422 serial interface, and communicates with type B safety device 2 through another 422 serial interface.
[0032] The parallel test device is used to transmit the test service data sent by the test host computer to the security device, and return the security device test results to the test host computer. The test service data and security test results are both carried by UDP messages; the destination port number of the UDP message is used to uniquely identify the test service type, and the destination IP address of the UDP message is used to uniquely identify the security device.
[0033] Taking the application scenario of type A safety equipment as an example, there are 8 communication devices that communicate with the corresponding safety equipment through the SRIOx4 interface and use its password service, so the parallel test device needs to simulate the interaction process of the 8 communication devices communicating with the type A safety equipment through the SRIOx4 interface. Therefore, after the parallel test device receives the UDP message sent by the test host computer, it distinguishes which type and which safety equipment the message is sent to according to the destination IP address of the UDP message, and distinguishes different test service types according to the destination port number of the UDP message, thereby simulating the interaction process of the corresponding communication device communicating with the type A safety equipment through the SRIOx4 interface.
[0034] In this embodiment, the parallel test device supporting multiple communication interfaces can realize the conversion of SRIOx4 interface to network port and the conversion of 422 serial interface to network port, so as to convert the interface of the security device with SRIOx4 interface and 422 serial interface into a universal interface, so that the security device can be tested by connecting to an ordinary computer. At the same time, it also supports parallel testing of multiple security devices, so as to improve the testing efficiency of the security device.
[0035] Considering that the theoretical bandwidth of a single SRIOx4 interface can reach tens of Gbps, and the bandwidth of the RGMII network port can reach 1Gbps, both of which are high-speed interfaces, and that parallel testing of multiple security devices requires extremely high processing performance, FPGA is used in the parallel test device. Taking into account the complexity and functional flow of each network sub-protocol, UDP protocol packets are selected to carry test service data.
[0036] The maximum transmission packet length of the network port is generally 1518 bytes, while the single service message that the SRIOx4 interface needs to receive can be up to 65980 bytes, and the single service message that the 422 interface needs to receive can be up to 8198 bytes. Therefore, the message from the SRIOx4 interface to the network port needs to implement a fragmentation mechanism, and similarly, the message from the 422 serial interface to the network port also needs to implement a fragmentation mechanism. Conversely, the UDP message from the network port to the SRIOx4 interface needs to implement the function of combining multiple UDP messages, and the UDP message from the network port to the 422 serial interface also needs to implement the function of combining multiple UDP messages.
[0037] The test program of the test host computer distinguishes different security devices under test through different destination IP addresses, and distinguishes different test service types through different destination port numbers of UDP packets. Figure 2 , Figure 2 The figure is a diagram of the destination port number and destination IP address of a UDP message.
[0038] Figure 3 The following is a logical architecture diagram of a parallel test device (also called a tooling board). Figure 3 As shown, the functions that the parallel test device needs to implement specifically include Ethernet interface, SRIOx4 interface, 422 serial interface, test message filtering and parsing, ARP response processing, UDP message segmentation, SRIO receive message segmentation, UDP message fragmentation, UDP message format encapsulation, SRIO send process control, SRIO receive process control, 422 send process control, 422 receive process control, etc.
[0039] In one embodiment, the implementation steps of test message filtering and parsing are as follows: filter the network messages from the test host computer, retain the ARP request messages and UDP messages; determine the test service type based on the destination port number of the UDP message; determine the security device to be tested based on the destination IP address of the UDP message.
[0040] Among them, various application software running on the test host computer will continuously send out network messages, which will seriously interfere with the test, so the network port on one side of the tooling board needs to filter out these irrelevant messages. The various business messages simulated and sent on the test host computer are distinguished based on the "destination port number of the UDP message" range. It is necessary to pay attention to whether there is overlap between the port number range of the filtered message and the port number range of the normal business message. Overlapping will cause normal business messages to be incorrectly filtered out. In addition, the specific device under test to which the business test message from the test host computer needs to be sent is distinguished by the "destination IP address" of the UDP message.
[0041] In one embodiment, the implementation steps of arp response processing are as follows: while receiving the UDP message transmitted from the test host computer to the security device, the arp request message sent by the test host computer is received; when the arp request message is received, an arp reply message is generated, and the arp reply message is returned to the test host computer, and the arp reply message is used to reply to the destination MAC address to be queried by the arp message; when the destination MAC address corresponds to the IP address of the arp request message, the security device will receive the UDP message from the test host computer.
[0042] Among them, UDP packets need to pass through the network layer and the data link layer during transmission, and the role of the arp protocol is to convert the IP address into a MAC address to ensure that the test data can be correctly sent to the security device. First, when sending a UDP datagram, if the target IP address is not in the arp cache, the test host will broadcast an arp request to inquire about the MAC address of the target IP address. The security device under test responds with an arp reply containing its MAC address. This process ensures that the UDP datagram can be correctly encapsulated into a frame and sent to the data link layer. Secondly, UDP packets may be fragmented during transmission due to the MTU problem of the router. When the UDP packet exceeds the MTU size, the IP layer will fragment the packet, each fragment will be sent separately, and each fragment will trigger a new arp request to ensure that each fragment can be correctly sent to the security device.
[0043] Exemplarily, when the parallel test device receives an arp request message from the test host computer, the parallel test device needs to generate an arp response message and send it back to the test host computer. The response message is used to reply to the destination MAC address to be queried by the arp request message, so that the network protocol stack of the test host computer can complete the arp learning process normally; otherwise, the UDP message of the test host computer cannot be sent out.
[0044] In one embodiment, Figure 4 As shown in the figure, the implementation steps of UDP message fragmentation are as follows: receive the UDP message transmitted from the test host computer to the security device, and judge whether the UDP message from the test host computer is a fragmented message according to the fragmentation flag information in the IP header of the UDP message; if it is a fragmented message, continue to wait for the arrival of subsequent UDP messages with the same destination port number until the last fragment arrives, and complete all fragmentation.
[0045] In one embodiment, the parallel test device extracts the fragmentation flag information and the fragment offset from the IP header of the UDP message sent by the test host computer, extracts the fragment offset to facilitate the extraction of the payload data, and the payload data is the data in the UDP message except the header and the tail of the UDP message; receives and stores the payload data, and after the payload data is received, determines whether the UDP message is a fragmented message. If it is a fragmented message, it continues to wait for the arrival of subsequent messages of the same stream (same destination port number) until the last fragment arrives, and completes all the fragments.
[0046] In one embodiment, the steps for extracting the payload data of the UDP message are as follows: after the merging is completed, the MAC header, IP header, and UDP header in the UDP message of the merging are removed, the payload data is retained, and the length of the payload data is recorded.
[0047] In one embodiment, the implementation steps of SRIO slice sending process control are as follows: the maximum length of a transmission supported by the SRIO protocol is 256 bytes, and only supports transmissions of specific lengths, so a slice sending control mechanism is required.
[0048] In one embodiment, the implementation steps of SRIO slice receiving process control are as follows: The maximum length of a SRIO transmission slice packet is 256 bytes, and it only supports transmissions of specific lengths, so a slice receiving control mechanism is required. The SRIO on the tooling board side needs to implement a circular buffer mechanism in the receiving direction, and the receiving direction will receive NRead, doorbell, and NWrite instructions. In addition, it is necessary to parse the "source ID" and "destination ID" inside the business message, determine the specific business message type, and pass it to the subsequent module to determine the destination port number and destination IP address of the subsequent UDP encapsulation.
[0049] In one embodiment, the implementation steps of network transmission pre-fragmentation are as follows: compare the length of the UDP message received by the security device with the maximum length of the UDP data packet to determine whether to perform fragmentation; if fragmentation is performed, take out the payload data of the maximum length of the UDP data packet each time to encapsulate the payload data into a message in UDP format, and the maximum length of the UDP data packet is not greater than the value of the maximum transmission unit (MTU) of the UDP message. The maximum length of the UDP data packet is the difference between the value of the MTU of the UDP message and the MAC header length, IP header length, and UDP header length in the UDP message, that is, the maximum length of the UDP data packet = MTU value - MAC header length - IP header length - UDP header length. Assuming that it needs to be cut into N fragments, the lengths of the first N-1 fragments are all the maximum length of the UDP data packet, and the length of the last fragment is uncertain, ranging from 1 to the maximum length of the UDP data packet.
[0050] In one embodiment, the steps for implementing payload data encapsulation into a UDP message are as follows: a complete UDP message is formed according to the UDP message format. A MAC header, an IP header, a UDP header, and payload data are sequentially inserted to form a complete message, which involves the calculation / filling of the "length / checksum" field in the IP header, and also involves the calculation / filling of the "port number / length / crc" and other fields in the UDP header.
[0051] Figure 5 A comparison table of a conventional test method and a test method using a parallel test device supporting multiple communication interfaces provided by an embodiment of the present application. Figure 5 It can be seen that using the traditional test method combined with the host device, an average of 9 security devices (cryptographic modules) can be tested per set of communication equipment per day; using this parallel test device to test security equipment, 5 installed devices (cryptographic modules) can be tested in one round. In fact, at least 17 rounds of tests can be performed per day, and the test volume can reach 85 devices, and the testing capacity has been significantly improved.
[0052] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0053] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0054] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
[0055] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0056] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A parallel test device supporting multiple communication interfaces, connected between a test host computer and at least one safety device, characterized in that: The parallel test device adopts FPGA, includes at least one Gigabit Ethernet interface, SRIOx4 interface and 422 serial interface, communicates with the test host computer through the Gigabit Ethernet interface, and communicates with the safety device through the SRIOx4 interface or the 422 serial interface; The parallel testing device is used to transmit the test service data sent by the test host computer to the safety device, and return the safety device test result to the test host computer, and the test service data and the safety test result are both carried by UDP messages; The destination port number of the UDP message is used to uniquely identify the test service type, and the destination IP address of the UDP message is used to uniquely identify the security device.
2. The device according to claim 1, characterized in that The parallel testing device is also used for performing fragmentation processing on UDP messages transmitted from the safety device to the test host computer, and for performing fragmentation processing on UDP messages transmitted from the test host computer to the safety device.
3. The device according to claim 2, characterized in that The UDP message transmitted from the test host computer to the security device is processed in pieces, including: According to the fragmentation flag information in the IP header of the UDP message, determine whether the UDP message from the test host computer is a fragmented message; If it is a fragmented message, continue to wait for the arrival of subsequent UDP messages with the same destination port number until the last fragment arrives and all fragments are assembled.
4. The device according to claim 3, characterized in that The step of judging whether the UDP message from the test host computer is a fragmented message according to the fragmentation flag information in the IP header of the UDP message includes: Extract the fragmentation flag information and fragment offset from the IP header of the UDP message sent by the test host computer; receiving and storing payload data; After receiving the payload data, determine whether the UDP message is a fragmented message.
5. The device according to claim 3, characterized in that The parallel testing device is also used for extracting UDP message payload data, including removing the MAC header, IP header, and UDP header from the combined UDP message after the combination is completed, retaining the payload data, and recording the length of the payload data.
6. The device according to claim 1, characterized in that The parallel testing device is also used for ARP response processing, including: While receiving the UDP message transmitted from the test host computer to the security device, the arp request message sent by the test host computer is received; When an arp request message is received, an arp reply message is generated and returned to the test host computer. The arp reply message is used to reply to the destination MAC address to be queried by the arp message; In the case where the destination MAC address corresponds to the IP address of the arp request message, the security device will receive the UDP message from the test host computer.
7. The device according to claim 1, characterized in that The parallel testing device is also used for network transmission pre-segmentation, including comparing the length of the UDP message received by the security device with the maximum length of the UDP data packet to determine whether to perform segmentation; If fragmentation is performed, the payload data of the maximum length of the UDP data packet is taken out each time to encapsulate the payload data into a message in UDP format, and the maximum length of the UDP data packet is not greater than the value of the maximum transmission unit (MTU) of the UDP message.
8. The device according to claim 7, characterized in that The encapsulating the payload data into a message in UDP format includes inserting a MAC header, an IP header, a UDP header, and payload data in sequence, and encapsulating the MAC header, the IP header, the UDP header, and the payload data into a message in UDP format.
9. The device according to claim 1, characterized in that The parallel test device is also used for message filtering and parsing, including filtering network messages from the test host computer, retaining arp request messages and UDP messages; determining the test service type according to the destination port number of the UDP message; The security device to be tested is determined according to the destination IP address of the UDP message.
10. The device according to claim 1, characterized in that The Gigabit Ethernet interface is an RGMII network port.
Citation Information
Patent Citations
1553B node circuit based on SoC (system on a chip) chip
CN104484303A
VPX parallel DSP signal processing board card based on SoC online reconstruction
CN105279133A
SDN-based network quality optimization method, system and electronic device
CN108092856A
Link testing method, apparatus and system
WO2017211169A1