A parallel test device supporting multiple communication interfaces
By designing a parallel testing device that supports multiple communication interfaces, the problem of non-universal interfaces in the testing of embedded terminal security devices was solved, and interface conversion and parallel testing of multiple devices were realized, thereby improving testing efficiency and effectiveness.
Patent Information
- Application Number
- CN202411456210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-18
AI Technical Summary
During the testing of embedded terminal security devices, the lack of universal communication interfaces leads to reliance on third-party devices, resulting in cumbersome and inefficient processes. Furthermore, the inconsistent development cycles of host devices result in insufficient functional verification.
Design a parallel testing device that supports multiple communication interfaces. Use FPGA to implement the conversion of SRIOx4 interface and 422 serial interface to network port. Carry test data through UDP packets, process fragments and combine fragments in parallel, and support parallel testing of multiple security devices.
It achieves universal conversion of security device interfaces, improves testing efficiency, enables simultaneous testing of multiple security devices, and significantly enhances testing capabilities.
Smart Images

Figure CN119383114B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of safety equipment testing, and more particularly to a parallel testing device supporting multiple communication interfaces. BACKGROUND
[0002] In the process of testing safety equipment embedded in a communication device, it is often found that the communication interface between the safety equipment and the communication device is not a commonly used interface, so the testing of the safety equipment needs to rely on a third-party communication device, making the testing work unable to be performed at any time on demand. The safety equipment of an embedded terminal is strongly related to the host device, so that the safety equipment needs to rely on the software and hardware environment of the host device in the process of device development, testing and production inspection. However, the development cycle and progress of the safety equipment of the embedded terminal are often inconsistent with those of the host device manufacturer, which easily leads to insufficient function and performance verification in the development process of the safety equipment of the embedded terminal and incomplete production inspection environment.
[0003] In order to guarantee the development and production progress of the safety equipment of the embedded terminal and make the testing more economical and efficient, a tooling plate needs to be designed, which is suitable for the interface form and electrical characteristics of the safety equipment and has the ability of parallel testing.
[0004] In the testing work, it is difficult to test the safety equipment with an SRIO interface and a 422 serial interface, because the two interfaces are not commonly used, and a third-party communication device manufacturer needs to be coordinated every time for testing, which is complicated and inefficient. SUMMARY
[0005] In order to solve the above problems, the present application provides a parallel testing device supporting multiple communication interfaces, which realizes the conversion of an SRIOx4 interface to a network interface and the conversion of a 422 serial interface to a network interface, and improves the testing efficiency of the safety equipment.
[0006] To achieve the above purpose, according to the first aspect of the present application, a parallel testing device supporting multiple communication interfaces is provided, which is connected between a test host computer and at least one safety equipment. The parallel testing device adopts an FPGA and includes at least one gigabit Ethernet interface, an SRIOx4 interface and a 422 serial interface. The parallel testing device communicates with the test host computer through the gigabit Ethernet interface and communicates with the safety equipment through the SRIOx4 interface or the 422 serial interface. The parallel testing device is used to transmit test service data sent by the test host computer to the safety equipment and return the test result of the safety equipment to the test host computer. The test service data and the test result of the safety equipment 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 equipment.
[0007] Further, the parallel testing device is also used for fragmenting the UDP message transmitted from the security device to the test host computer and for assembling the UDP message transmitted from the test host computer to the security device.
[0008] Further, the assembling the UDP message transmitted from the test host computer to the security device comprises judging whether the UDP message from the test host computer is a fragment message according to the fragment flag information in the IP header of the UDP message; if the UDP message is a fragment message, continuing to wait for the arrival of the subsequent UDP message with the same destination port number until the last fragment arrives and the assembling is completed.
[0009] Further, the judging whether the UDP message from the test host computer is a fragment message according to the fragment flag information in the IP header of the UDP message comprises extracting the fragment flag information and the fragment offset from the IP header of the UDP message sent from the test host computer; receiving and storing the payload data; and judging whether the UDP message is a fragment message after the reception of the payload data is completed.
[0010] Further, the parallel testing device is also used for extracting the payload data of the UDP message, which comprises removing the MAC header, the IP header and the UDP header of the assembled UDP message, retaining the payload data and recording the length of the payload data after the assembling is completed.
[0011] Further, the parallel testing device is also used for ARP response processing, which comprises receiving the ARP request message sent from the test host computer while receiving the UDP message transmitted from the test host computer to the security device; generating an ARP response message when the ARP request message is received and returning the ARP response message to the test host computer, the ARP response message being used for replying to the destination MAC address queried by the ARP message; and in the case that the destination MAC address corresponds to the IP address of the ARP request message, the security device receives the UDP message from the test host computer.
[0012] Further, the parallel testing device is also used for network transmission pre-fragmenting, which comprises comparing the length of the UDP message received by the security device with the maximum length of the UDP packet to judge whether to perform fragmenting; and if fragmenting is performed, taking out the payload data with the maximum length of the UDP packet each time to encapsulate the payload data into a UDP format message, the maximum length of the UDP packet being not greater than the value of the maximum transmission unit (MTU) of the UDP message.
[0013] Further, the encapsulating the payload data into a UDP format message comprises sequentially inserting the MAC header, the IP header, the UDP header and the payload data to encapsulate the MAC header, the IP header, the UDP header and the payload data into a UDP format message.
[0014] Further, the parallel test device is also used for message filtering and analysis, 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; and determining the security device to be tested according to the destination IP address of the UDP message.
[0015] Further, the gigabit Ethernet interface is an RGMII network port.
[0016] According to a second aspect of the present application, a computer device is also provided, which comprises a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of any of the above methods.
[0017] According to a third aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, the computer program being executed by a processor to implement the steps of any of the above methods.
[0018] According to a fourth aspect of the present application, a computer program product is also provided, which comprises a computer program, the computer program being executed by a processor to implement the steps of any of the above methods.
[0019] Overall, compared with the prior art, the above technical solutions conceived by the present application can achieve the following beneficial effects:
[0020] The parallel test device supporting multiple communication interfaces provided by the present application can realize conversion of the SRIOx4 interface to the network port and conversion of the 422 serial interface to the network port, so as to convert the interface of the security device to a general interface for the security device with the SRIOx4 interface and the 422 serial interface, so that the security device can be tested by being connected to a common computer. Meanwhile, the parallel test device supports multiple security devices for parallel testing, so as to improve the test efficiency of the security device. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0022] Figure 1 An application environment diagram of the parallel test device supporting multiple communication interfaces provided by the embodiments of the present application is shown in the figure.
[0023] Figure 2 A schematic diagram of the destination port number and the destination IP address of the UDP message provided by the embodiments of the present application is shown in the figure.
[0024] Figure 3 A logic design architecture diagram of a parallel test device supporting multiple communication interfaces provided by an embodiment of the present application is provided.
[0025] Figure 4 A flowchart of a UDP packet splicing process performed by a parallel test device supporting multiple communication interfaces provided by an embodiment of the present application is provided.
[0026] Figure 5 A comparison table of a test method of a parallel test device supporting multiple communication interfaces provided by a traditional test method and an embodiment of the present application is provided. DETAILED DESCRIPTION
[0027] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application 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 the present application and the above-described drawings are used to distinguish different objects and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[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, an SRIOx4 interface and a 422 serial interface. The parallel test device and the test host computer communicate through the gigabit Ethernet interface, and the parallel test device and the safety device communicate through the SRIOx4 interface or the 422 serial interface.
[0030] As shown in Figure 1 , the test host computer and the parallel test device communicate through the RGMII network port, and a general network port is used as a test interface, so that any computer installed with a test program can be used to expand safety device testing.
[0031] The parallel testing device communicates with the A-type security device 1 through an SRIOx4 interface, communicates with the A-type security device 2 through another SRIOx4 interface, communicates with the B-type security device 1 through a 422 serial interface, and communicates with the B-type security device 2 through another 422 serial interface.
[0032] The parallel testing device is configured to transmit test service data sent by a test host computer to the security device and return test results of the security device to the test host computer, and the test service data and the test results of the security device are both carried by UDP messages; a destination port number of the UDP message is configured to uniquely identify a test service type, and a destination IP address of the UDP message is configured to uniquely identify the security device.
[0033] Taking the application scenario of the A-type security device as an example, eight communication devices communicate with corresponding security devices through SRIOx4 interfaces and use password services of the security devices, so the parallel testing device needs to simulate the interaction process of the eight communication devices communicating with the A-type security device through the SRIOx4 interfaces. Therefore, after receiving the UDP message sent by the test host computer, the parallel testing device distinguishes to which type and which one of the security devices the message is sent according to the destination IP address of the UDP message, distinguishes different test service types according to the destination port number of the UDP message, and then simulates the interaction process of the corresponding communication device communicating with the A-type security device through the SRIOx4 interface.
[0034] In this embodiment, the parallel testing device supporting multiple communication interfaces can realize conversion of the SRIOx4 interface to a network interface and conversion of the 422 serial interface to the network interface, so as to convert the interfaces of the security device to general interfaces for the security device having the SRIOx4 interface and the 422 serial interface, so that the security device can be tested by being connected to a general computer. Meanwhile, the parallel testing device supports multiple security devices for parallel testing, so as to improve the test efficiency of the security device.
[0035] Considering that the theoretical bandwidth of a single SRIOx4 interface can reach dozens of Gbps, and the bandwidth of the RGMII network interface can reach 1 Gbps, both belong to high-speed interfaces, and a very high processing performance is required when multiple security devices are tested in parallel, the parallel testing device adopts an FPGA. Considering the complexity and functional process of each network sub-protocol, the test service data is carried by UDP protocol messages.
[0036] The maximum transmission packet length of the network interface is generally 1518 bytes, while the single service message received by the SRIOx4 interface can be up to 65980 bytes, and the single service message received by the 422 interface can be up to 8198 bytes. Therefore, the message from the SRIOx4 interface to the network interface needs to implement a fragmentation mechanism, and similarly, the message from the 422 serial interface to the network interface also needs to implement a fragmentation mechanism. Conversely, the UDP message from the network interface to the SRIOx4 interface needs to implement a function of combining multiple UDP messages, and the UDP message from the network interface to the 422 serial interface also needs to implement a function of combining multiple UDP messages.
[0037] The test program of the test host computer distinguishes different tested security devices through different destination IP addresses, and distinguishes different test service types through different destination port numbers of the UDP message. Figure 2 , Figure 2 The schematic diagram of the destination port number and the destination IP address of the UDP message.
[0038] Figure 3 The logic architecture diagram of the parallel test device (also referred to as a fixture board). As shown in Figure 3 , the functions that need to be implemented by the parallel test device specifically include an Ethernet interface, an SRIOx4 interface, a 422 serial interface, test message filtering and analysis, arp response processing, UDP message combining, SRIO received message combining, UDP message fragmentation, UDP message format encapsulation, SRIO sending flow control, SRIO receiving flow control, 422 sending flow control, and 422 receiving flow control.
[0039] In one embodiment, the implementation steps of the test message filtering and analysis are as follows: filtering the network message from the test host computer, retaining the arp request message and the UDP message; determining the test service type according to the destination port number of the UDP message; and determining the security device to be tested according to the destination IP address of the UDP message.
[0040] Among them, various application software running on the test host computer will continuously send network messages to the outside, which will seriously interfere with the test, so the network interface on the side of the fixture board needs to filter out these irrelevant messages. The various service messages simulated and sent by the test host computer are distinguished based on the range of the destination port number of the UDP message, and attention needs to be paid to whether there is an overlap between the port number range of the filtered messages and the port number range of the normal service messages. The overlap will cause the normal service messages to be incorrectly filtered out. In addition, the service test message from the test host computer needs to be sent to which tested device is distinguished by the destination IP address of the UDP message.
[0041] In one embodiment, the implementation steps of the arp reply processing are as follows: receiving the arp request message sent by the test host while receiving the UDP message transmitted from the test host to the security device; generating the arp reply message when the arp request message is received, and returning the arp reply message to the test host, the arp reply message being used to reply to the destination MAC address queried by the arp message; in the case that 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.
[0042] In the transmission process of the UDP message, the network layer and the data link layer are needed to be passed through, and the role of the arp protocol is to convert the IP address into the MAC address, so as to ensure that the test data can be correctly sent to the security device. First, when sending the UDP data message, if the target IP address is not in the arp cache, the test host will broadcast an arp request to inquire the MAC address of the target IP address. The security device under test replies an arp reply containing its MAC address. This process ensures that the UDP data message can be correctly encapsulated into a frame and sent to the data link layer. Secondly, the UDP message may be fragmented in the transmission process due to the MTU problem of the router. When the UDP message exceeds the MTU size, the IP layer will fragment the message, 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 the arp request message from the test host, the parallel test device side needs to generate an arp reply message and send it back to the test host, the reply message being used to reply to the destination MAC address queried by the arp request message, so that the network protocol stack of the test host can normally complete the arp learning process; otherwise, the UDP message of the test host cannot be sent out.
[0044] In one embodiment, as shown in Figure 4 the implementation steps of the UDP message fragmentation are as follows: receiving the UDP message transmitted from the test host to the security device, judging whether the UDP message from the test host 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 the subsequent UDP message of the same destination port number until the last fragment arrives, and complete the entire fragmentation.
[0045] In one embodiment, the parallel testing device extracts the fragmentation flag information and the fragment offset from the IP header of the UDP packet sent by the testing host computer, extracts the fragment offset to facilitate extraction of the payload data, which is the data in the UDP packet other than the header and the tail of the UDP packet, receives and stores the payload data, and judges whether the UDP packet is a fragmented packet after the payload data is received. If it is a fragmented packet, the subsequent packets of the same flow (same destination port number) are continuously waited for until the last fragment arrives, and the entire reassembly is completed.
[0046] In one embodiment, the implementation steps of the extraction of the payload data of the UDP packet are as follows: after the reassembly is completed, the MAC header, the IP header, and the UDP header of the reassembled UDP packet are discarded, the payload data is retained, and the length of the payload data is recorded.
[0047] In one embodiment, the implementation steps of the SRIO fragmented transmission flow control are as follows: the maximum length of one transmission supported by the SRIO protocol is 256 bytes, and only a few specific lengths of transmission are supported, so a fragmented transmission control mechanism needs to be implemented.
[0048] In one embodiment, the implementation steps of the SRIO fragmented reception flow control are as follows: the maximum length of one transmission fragment packet of the SRIO is 256 bytes, and only a few specific lengths of transmission are supported, so a fragmented reception control mechanism needs to be implemented. The SRIO on one side of the tooling plate needs to implement a circular buffer mechanism in the reception direction, and will receive the NRead, doorbell, and NWrite instructions in the reception direction. In addition, the "source ID" and "destination ID" in the service packet need to be parsed to determine the specific service packet type and pass it to the subsequent module to determine the destination port number and the destination IP address of the subsequent UDP encapsulation.
[0049] In one embodiment, the implementation steps of the network transmission pre-fragmentation are as follows: the length of the UDP packet received by the security device is compared with the maximum length of the UDP packet to determine whether fragmentation is performed; if fragmentation is performed, the payload data of the maximum length of the UDP packet is taken out each time to encapsulate the payload data into a UDP format packet, and the maximum length of the UDP packet is not greater than the value of the maximum transmission unit (MTU) of the UDP packet. The maximum length of the UDP packet is the difference between the value of the MTU of the UDP packet and the lengths of the MAC header, the IP header, and the UDP header, i.e., the maximum length of the UDP packet = MTU value - MAC header length - IP header length - UDP header length. Assuming that the packet needs to be cut into N fragments, the lengths of the first N-1 fragments are all the maximum length of the UDP packet, and the length of the last fragment is indefinite and is between 1 and the maximum length of the UDP packet.
[0050] In one embodiment, the implementation steps of encapsulating the payload data into a UDP packet are as follows: a complete UDP packet is formed according to the UDP packet format. A complete packet is formed by sequentially inserting a MAC header, an IP header, a UDP header, and payload data, which involves the calculation / filling of the "length / checksum" field in the IP header and the calculation / filling of the "port number / length / crc" field in the UDP header.
[0051] Figure 5 A comparison table of a conventional testing method and a testing method using a parallel testing device supporting multiple communication interfaces provided by the embodiments of the present application is provided. From Figure 5 It can be seen that, using the conventional testing method combined with the host device, 9 security devices (cryptographic modules) can be tested per set of communication devices per day on average; using the parallel testing device to test the security devices, 5 installed devices (cryptographic modules) can be tested in one round, and at least 17 rounds of testing can be performed in a day, and the testing capacity can reach 85, which is significantly improved.
[0052] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to 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 focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0054] The above is only exemplary embodiments of the present disclosure, which cannot limit the scope of the present disclosure. Any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will easily think of embodiments of the present disclosure after considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
[0055] The technical features of the above embodiments can be combined arbitrarily, and in order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope recorded in the present disclosure.
[0056] It is to be understood that the above description is intended to be illustrative and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the application should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
Claims
1. A parallel testing device supporting multiple communication interfaces, connected between a test host computer and at least one secure device, characterized in that, The parallel testing device adopts FPGA, and includes at least one gigabit Ethernet interface, SRIOx4 interface and 422 serial interface, communicates with the testing host computer through the gigabit Ethernet interface, and communicates with the security device through the SRIOx4 interface or the 422 serial interface; The parallel testing device is used for transmitting test service data transmitted by the testing host computer to the security device, and returning the security test result to the testing host computer, and the test service data and the security test result are both carried by UDP messages; The destination port number of the UDP message is used for uniquely identifying the test service type, and the destination IP address of the UDP message is used for uniquely identifying the security device.
2. The apparatus of claim 1, wherein, The parallel testing device is also used for fragmenting the UDP message transmitted from the security device to the testing host computer, and assembling the UDP message transmitted from the testing host computer to the security device.
3. The apparatus of claim 2, wherein, The assembling of the UDP message transmitted from the testing host computer to the security device comprises: According to the fragmentation flag information in the IP header of the UDP message, it is judged whether the UDP message from the testing host computer is a fragmented message; If it is a fragmented message, the arrival of the subsequent UDP message with the same destination port number is continued to be waited until the last fragment arrives, and the complete assembling is completed.
4. The apparatus of claim 3, wherein, According to the fragmentation flag information in the IP header of the UDP message, it is judged whether the UDP message from the testing host computer is a fragmented message, which comprises: The fragmentation flag information and the fragment offset are extracted from the IP header of the UDP message transmitted from the testing host computer; The payload data is received and stored; After the reception of the payload data is completed, it is judged whether the UDP message is a fragmented message.
5. The apparatus of claim 3, wherein, The parallel testing device is also used for payload data extraction of the UDP message, which comprises, after the assembling is completed, eliminating the MAC header, the IP header and the UDP header in the assembled UDP message, retaining the payload data, and recording the length of the payload data.
6. The apparatus of claim 1, wherein, The parallel testing device is also used for arp response processing, which comprises: The arp request message transmitted by the testing host computer is received at the same time when the UDP message transmitted from the testing host computer to the security device is received; When the arp request message is received, the arp response message is generated, and the arp response message is returned to the testing host computer, the arp response message is used for replying the destination MAC address queried by the arp message; In the case that the destination MAC address corresponds to the IP address of the arp request message, the security device will receive the UDP message from the testing host computer.
7. The apparatus of claim 1, wherein, The parallel testing device is also used for network transmission pre-fragmentation, which comprises comparing the length of the UDP message received by the security device with the maximum length of the UDP data packet, and judging whether to perform fragmentation; If the fragmentation is performed, the payload data with the maximum length of the UDP data packet is taken out each time, so as to encapsulate the payload data into the UDP message, 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 apparatus of claim 7, wherein, The encapsulation of the load data into a UDP format message comprises sequentially inserting a MAC header, an IP header, a UDP header and the load data, and encapsulating the MAC header, the IP header, the UDP header and the load data into a UDP format message.
9. The apparatus of claim 1, wherein, The parallel testing device is also used for message filtering and analysis, comprising filtering network messages from a test host computer, and retaining arp request messages and UDP messages; determining a test service type according to a destination port number of the UDP message; Determining a security device to be tested according to a destination IP address of the UDP message.
10. The apparatus of claim 1, wherein, 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