FPGA-based vehicle-mounted Ethernet ring network automated testing system and method

By deploying automated test modules on FPGAs, automated testing of on-board Ethernet networks is realized, and problems of low testing efficiency and expensive equipment in the existing technology are solved, and an efficient and portable test system is realized.

CN119363630BActive Publication Date: 2025-04-15AUTOCORE INTELLIGENT TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411944111.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-15
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The prior art is difficult to realize automated testing of vehicle-mounted Ethernet ring networks, especially in terms of protocol consistency, ring network functions and switching/cutback performance testing, which are inefficient in testing, equipment is expensive and inconvenient for movement.

Method used

The FPGA-based automotive Ethernet ring network automation test system is adopted. By deploying configuration modules, forwarding modules, mirroring modules and packetization modules on the FPGA, the automated testing of automotive Ethernet ring nodes is realized, and R-APS protocol consistency, ERPS ring network function and ring switching/shutter performance testing is supported.

Benefits of technology

It realizes automated testing of the on-board Ethernet network, improves testing efficiency, reduces equipment costs, and the equipment is small and portable, easy to move and carry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363630B_ABST
    Figure CN119363630B_ABST
Patent Text Reader

Abstract

The invention discloses an FPGA-based vehicle-mounted Ethernet ring network automatic test system and method, comprising a vehicle-mounted Ethernet ring network node, an FPGA, and a test node; a configuration module, a forwarding module, a mirror module, and a packet sending module are deployed on the FPGA; a ring network redundancy protocol ERPS is deployed on the vehicle-mounted Ethernet ring network node, and each vehicle-mounted Ethernet ring network node is connected to the FPGA; an automatic test framework is deployed on the test node, connected to the FPGA, and the configuration module of the FPGA is called to issue a command to enable the forwarding module, the mirror module, and the packet sending module to work, and the message is mirrored to the test node; then the test node parses the protocol message and the data message mirrored by the FPGA to the test node, so as to realize the automatic test of R‑APS protocol consistency, ERPS ring network function, and ring network switching / reversing performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an Ethernet ring network automatic testing technology, and in particular to an FPGA-based vehicle-mounted Ethernet ring network automatic testing system and method. Background Art

[0002] The current ring network is mainly deployed on switches or routers, and ERPS messages are forwarded to other interfaces for testing. ERPS of vehicle-mounted Ethernet ring network equipment is generally deployed directly on the equipment instead of the switch. In addition, vehicle-mounted equipment generally has a built-in switch with fewer ports, most of which are Base-T1 ports. Different interfaces are used for different services and are isolated using VLANs. It is impossible to obtain ERPS-related messages through the switch interface forwarding method. The traditional testing method is to map the ERPS service port to other idle ports through test codes to perform function or switching performance tests. This method is not advisable for large-scale testing. In order to improve test efficiency, some manufacturers choose to purchase professional test instruments, but these devices are often expensive and are mostly based on CAN interfaces. They cannot directly meet the comprehensive testing requirements of vehicle-mounted Ethernet ring networks, limiting the flexibility and scalability of the test. In addition, the tester is generally large in size and inconvenient to move or carry. Summary of the invention

[0003] In order to solve the deficiencies in the prior art, the object of the present invention is to provide an FPGA-based vehicle-mounted Ethernet ring network automatic testing system and method.

[0004] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:

[0005] An FPGA-based vehicle-mounted Ethernet ring network automatic test system, comprising a plurality of vehicle-mounted Ethernet ring network nodes, FPGA, and test nodes;

[0006] Deploy the configuration module, forwarding module, mirror module and packet sending module on the FPGA. The configuration module is responsible for the configuration implementation of the commands issued by the test node. The forwarding module forwards various messages according to the rules. The mirror module is responsible for mirroring the messages to the test node. The packet sending module constructs various data messages and sends them.

[0007] Deploy the ring network redundancy protocol ERPS on the vehicle-mounted Ethernet ring network nodes, and connect each vehicle-mounted Ethernet ring network node to the FPGA;

[0008] An automated testing framework is deployed on the test node, connected to the FPGA, and the FPGA configuration module is called to issue commands to enable the forwarding module, mirror module, and packet sending module to work and mirror the message to the test node. The test node then parses the protocol message and data message mirrored by the FPGA to the test node to implement automated testing of the R-APS protocol consistency, ERPS ring network function, and ring network switching / reversing performance.

[0009] Furthermore, the nodes of the vehicle-mounted Ethernet ring network are connected in pairs through FPGA to form a loop, and the FPGA and the test node are connected through an Ethernet interface. The FPGA mirrors the message to the interface, and the test node captures the packet at the interface to perform real-time or offline analysis on the message.

[0010] Furthermore, the test node is deployed on a PC or other device including a central processing unit.

[0011] Furthermore, the Ethernet ring network node interface is connected to the FPGA interface to realize multicast of ERPS protocol messages and end-to-end forwarding of data messages in the same VLAN; it supports setting one-to-one mirroring and many-to-one mirroring between any interfaces.

[0012] Furthermore, mirroring supports filtering packets according to different protocols. Each port sets the packet filtering type. If not set, all packets are mirrored by default. Otherwise, only packets of the specified type are mirrored.

[0013] An automated testing method for an on-vehicle Ethernet ring network based on FPGA, wherein an automated testing framework is deployed on a test node, connected to the FPGA, and a configuration module of the FPGA is called to issue commands, thereby enabling a forwarding module, a mirroring module, and a packet sending module to work and mirroring messages to the test node; then the test node parses the protocol messages and data messages mirrored by the FPGA to the test node, and performs real-time online or offline analysis to achieve automated testing of R-APS protocol consistency, ERPS ring network functions, and ring network switching / reversing performance.

[0014] Furthermore, the R-APS protocol consistency test collects the protocol messages of the vehicle-mounted Ethernet ring network node through FPGA, mirrors them to the test node, and the test node stores the messages and performs offline analysis, and compares the parsed results with the expected results.

[0015] Furthermore, the ERPS ring network function test covers normal operation and link disconnection. The test node sends failure / recovery commands to each port of the FPGA to control the switching of network links. The FPGA collects protocol messages and service messages, mirrors them to the test node, and the test node stores the messages and performs offline analysis. The analyzed results are compared with the expected results.

[0016] Furthermore, the ring network switching / reversing performance is automatically tested. The test node calls the FPGA's packet sending module to construct a data message to be forwarded between designated ports. The test node issues a command to disable the FPGA port to achieve the Ethernet ring network switching effect. The test node captures packets at both the blocked port and the expected released port in advance, and parses out the time T1 of the last data message obtained by the blocked port and the time T2 of the first data message obtained by the expected released port. The time difference T2-T1 is the switching time; the same applies to the reversing time.

[0017] The beneficial effect of the present invention is that, compared with the prior art, the present invention realizes the automated testing of the vehicle-mounted Ethernet ring network by connecting the vehicle-mounted Ethernet ring network node based on the FPGA device, and realizes the automation of the protocol consistency test, the Ethernet ring network function test and the Ethernet ring network switching / reversing performance test. All operations of the present invention are completed on the FPGA, and after the ring network node deploys ERPS, no other operations are required.

[0018] The FPGA in the present invention has multiple BASE-TX and BASE-T1 interfaces, and can be directly connected in series in a complex vehicle-mounted Ethernet ring network without Ethernet conversion to achieve data collection and data forwarding; through real-time and offline analysis of R-APS messages, the consistency of the vehicle-mounted Ethernet ring network protocol and the automated testing of the ring network function are achieved; the switching performance is calculated by calculating the time difference between the blocked port and the released port data messages, so as to achieve performance automation and improve the test efficiency; there is no need to configure the ring network nodes, and the independence is strong; the FPGA device is small and portable, and is easy to move and carry. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the vehicle-mounted Ethernet ring network automation test system based on FPGA of the present invention;

[0020] Figure 2 It is a logical framework diagram of an embodiment of the FPGA of the present invention;

[0021] Figure 3 It is a flow chart of the R-APS protocol consistency test of the vehicle-mounted Ethernet ring network automation test method of the present invention;

[0022] Figure 4 It is a flow chart of the ring network switching automation test of the vehicle-mounted Ethernet ring network automation test method of the present invention;

[0023] Figure 5 It is a flow chart of the ring network switching automation test of the vehicle-mounted Ethernet ring network automation test method of the present invention;

[0024] Figure 6 The present invention is a flowchart of an implementation method of message parsing. DETAILED DESCRIPTION

[0025] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.

[0026] like Figure 1 As shown, the FPGA-based vehicle-mounted Ethernet ring network automation test system includes several vehicle-mounted Ethernet ring network nodes, FPGA, and test nodes; a configuration module, a forwarding module, a mirror module, and a packet sending module are deployed on the FPGA. The configuration module is responsible for the configuration implementation of the commands issued by the test node, the forwarding module forwards various messages according to the rules, the mirror module is responsible for mirroring the messages to the test node, and the packet sending module constructs various data messages and sends them.

[0027] The ring network redundancy protocol ERPS is deployed on the vehicle-mounted Ethernet ring network nodes, and each vehicle-mounted Ethernet ring network node is connected to the FPGA.

[0028] An automated testing framework is deployed on the test node, connected to the FPGA, and the FPGA configuration module is called to issue commands, so that the forwarding module, mirror module, and packet sending module work and mirror the message to the test node; then the test node parses the protocol message and data message mirrored by the FPGA to the test node, which can be analyzed online or offline in real time, and finally realizes the automated testing of R-APS protocol consistency, ERPS ring network function, and ring network switching / reversing performance.

[0029] The test node can realize the automated testing of R-APS protocol consistency, ERPS ring network function, and ring network switching / reversing performance.

[0030] The R-APS protocol conformance test refers to the ITU-T G.8032 / Y1344 specification. The protocol messages of the vehicle Ethernet ring network nodes are collected through FPGA and mirrored to the test node. The test node stores the messages and performs offline analysis. The analyzed results are compared with the expected results.

[0031] The ERPS ring network function test covers normal operation and link disconnection. The test node can send failure / recovery commands to each port to the FPGA to control the switching of network links. The FPGA collects protocol messages and service messages, mirrors them to the test node, and stores the messages for offline analysis. The analyzed results are compared with the expected results.

[0032] Ring network switching / reversal performance automated test: the test node calls the FPGA packet sending module to construct data packets to be forwarded between designated ports. The test node issues a command to disable the FPGA port to achieve the Ethernet ring network switching effect. The test node captures packets at both the blocked port and the expected released port in advance, and parses out the last data packet time T1 obtained by the blocked port and the first data packet time T2 obtained by the expected released port. Both times are captured at the same test node, so the time base is the same, and the time difference T2-T1 is the switching time. The same applies to the reversal time.

[0033] In order to avoid affecting the switching / reversing performance of the vehicle-mounted Ethernet ring network nodes, the protocol messages and data messages are forwarded in the FPGA, and the messages are mirrored to the test node. The test node uses a packet capture tool to obtain the message and then performs offline analysis.

[0034] like Figure 1 As shown, an application scenario diagram of the vehicle-mounted Ethernet ring network automatic test system of the present invention, the vehicle-mounted Ethernet ring network nodes are connected in pairs through FPGA to form a loop, including link 1, link 2 and backup link, and these three links are all physical connection lines. The dotted line indicates that the FPGA uses internal logic to enable two interfaces to achieve bidirectional transparent forwarding, which is not an actual connection line.

[0035] The port through which the FPGA is connected to the test node is P0, the port through which the vehicle-mounted Ethernet ring network node 1 is connected to the FPGA via link 1 is P1, the port through which the vehicle-mounted Ethernet ring network node 3 is connected to the FPGA via link 1 is P2, the port through which the vehicle-mounted Ethernet ring network node 1 is connected to the FPGA via link 2 is P3, the port through which the vehicle-mounted Ethernet ring network node 2 is connected to the FPGA via link 2 is P4, the port through which the vehicle-mounted Ethernet ring network node 2 is connected to the FPGA via a backup link is P5, and the port through which the vehicle-mounted Ethernet ring network node 3 is connected to the FPGA via a backup link is P6.

[0036] The FPGA and the test node are connected through an Ethernet interface. The test node can be deployed on a PC or other device containing a central processor. The FPGA mirrors the message to the interface, and the test node captures the packet on the interface and performs real-time or offline analysis on the message.

[0037] like Figure 2 As shown, a logical framework diagram of an embodiment of an FPGA for automated testing of an on-board Ethernet ring network of the present invention is shown, in which a configuration module, a forwarding module, a mirroring module and a packet sending module are deployed on the FPGA.

[0038] FPGA consists of a core board and an expansion board. The core board is equipped with a programmable SOC chip, integrated with CPU and programmable logic unit, and has both hardware programming and software programming functions. The core board includes memory management and power management. The expansion board has multiple BASE-TX and BASE-T1 interfaces. The entire FPGA is compact, with a length*width*height of less than 15*10*8 cm, and is powered by 12V DC.

[0039] The interface types provided by FPGA include 100BASE-TX, 1000BASE-TX, 100BASE-T1, and 1000BASE-T1. T1 supports automatic switching between Master and Slave modes, and supports setting static forwarding and dynamic forwarding. Static forwarding supports setting one-to-one and many-to-one forwarding between any interfaces.

[0040] The Ethernet ring node interface is connected to the FPGA interface to realize the end-to-end forwarding of ERPS protocol messages and data messages in the same VLAN. The forwarding delay performance is at the us level, and the ERPS switching performance is at the ms level, so there is no impact on performance. Supports one-to-one mirroring and many-to-one mirroring between any interfaces, and the mirroring direction is optional: port input data, output data, input and output data. Mirroring supports filtering according to different protocol messages. Each port can set the message filtering type. If it is not set, all messages are mirrored by default, otherwise only the specified type of message is mirrored.

[0041] like Figure 3 As shown, the flowchart of the protocol consistency test of the vehicle-mounted Ethernet ring network automation test method of the present invention. The test node is the execution subject, first calls the setUp method, creates test data, initializes the test environment, and connects to the FPGA through the ssh protocol; calls the configuration module of the FPGA to issue a command, mirrors the port P6 of a ring network node to the port P0 connected to the FPGA and the test node; captures the packet at the port eth0 of the test node, and captures the message mirrored by the FPGA; then parses the R-APS protocol message, compares the parsing result with the expected result, and if the comparison is consistent, a conclusion that the test has passed is given.

[0042] like Figure 4As shown, the flow chart of the ring network switching automation test of the vehicle-mounted Ethernet ring network automation test method of the present invention. The test node is the execution subject, first calls the setUp method, creates test data, initializes the test environment, and connects to the FPGA through the ssh protocol; calls the configuration module of the FPGA to issue a command, mirrors the ports P1 and P5 of the two ring network nodes to P0, captures packets at the port eth0 of the test node, and then issues a command to disconnect one port P1 of the FPGA, the link switches, and the standby link starts working; parses the data message captured at the port eth0 of the test node, the last frame of data message t1 sent from node 1 to node 3 captured by P1, and the first frame of data message t2 sent from node 1 to node 3 captured by P5, and the switching time is t2-t1.

[0043] The latency performance of forwarding between two FPGA ports is at the us level, and the ERPS switching performance is at the ms level. Therefore, the FPGA port latency has no effect on the switching performance.

[0044] like Figure 5 As shown, the flow chart of the ring network switching automation test of the vehicle-mounted Ethernet ring network automation test method of the present invention. The test node is the execution subject, first calls the setUp method, creates test data, initializes the test environment, and connects to the FPGA through the ssh protocol; calls the configuration module of the FPGA to issue a command, mirrors the ports P1 and P5 of the two ring network nodes to P0, and issues a command to disconnect one port P1 of the FPGA; captures packets at the port eth0 of the test node, issues a command to restore the port P1 of the FPGA, parses the data message captured at eth0, the last frame of data message t1 sent from node 1 to node 3 captured by P5, and the first frame of data message t2 sent from node 1 to node 3 captured by P1, and the switching time is t2-t1.

[0045] like Figure 6 As shown, a flowchart of an implementation method of message parsing is given. Use scapy's Packet class to define the R-APS message format, define an R-APS class, parse each field according to the specification, and give a fixed bit length for each fixed field. For example, the field MEL occupies 3 bits and the field Version occupies 5 bits, then define BitField("mel", 0, 3), BitField("version", 0, 5). Fixed-length fields are processed by this method, and variable-length fields such as TLV are processed by another function. According to the specification definition, TLV starts with a fixed 32B and ends with 0x00, and the total length is unlimited. In this ERPS implementation, TLV will only have a non-zero value in the SF type. The non-zero value indicates a disconnected link ID. Therefore, it is determined whether the R-APS message type is an SF message. If so, take the non-zero byte in the TLV, which is a disconnected link, and assign the byte to the variable linkid_down.

[0046] Real-time captured network communication data packets or captured offline network communication data packets, traverse each pcap packet, first check the Ether layer, obtain the source mac address, check and then check the Dot1Q layer, obtain the vlanid, and then check the RAPS layer. At this time, the R-APS class will be called to parse the message and obtain each field.

[0047] Add a new protocol layer R-APS based on scapy, define a Python file RAPSPacket.py, this file defines the class RAPS to parse the R-APS protocol message according to the specification, parse the message Version, OpCode, R-APSSpecific Information and the variable-length TLV part. Use Scapy's Ether class to parse Ethernet frames, and use the Dot1Q class to parse VLAN tags. Then use the custom RAPSPacket.py file to parse the R-APS message and obtain the required fields.

[0048] The beneficial effect of the present invention is that, compared with the prior art, the present invention realizes the automated testing of the vehicle-mounted Ethernet ring network by connecting the vehicle-mounted Ethernet ring network node based on the FPGA device, and realizes the automation of the protocol consistency test, the Ethernet ring network function test and the Ethernet ring network switching / reversing performance test. All operations of the present invention are completed on the FPGA, and after the ring network node deploys ERPS, no other operations are required.

[0049] The FPGA in the present invention has multiple BASE-TX and BASE-T1 interfaces, and can be directly connected in series in a complex vehicle-mounted Ethernet ring network without Ethernet conversion to achieve data collection and data forwarding; through real-time and offline analysis of R-APS messages, the consistency of the vehicle-mounted Ethernet ring network protocol and the automated testing of the ring network function are achieved; the switching performance is calculated by calculating the time difference between the blocked port and the released port data messages, so as to achieve performance automation and improve the test efficiency; there is no need to configure the ring network nodes, and the independence is strong; the FPGA device is small and portable, and is easy to move and carry.

[0050] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

Claims

1. An FPGA-based vehicle-mounted Ethernet ring network automated test system, characterized in that: Includes several vehicle-mounted Ethernet ring nodes, FPGAs and test nodes; Deploy the configuration module, forwarding module, mirror module and packet sending module on the FPGA. The configuration module is responsible for the configuration implementation of the commands issued by the test node. The forwarding module forwards various messages according to the rules. The mirror module is responsible for mirroring the messages to the test node. The packet sending module constructs various data messages and sends them. Deploy the ring network redundancy protocol ERPS on the vehicle-mounted Ethernet ring network nodes, and connect each vehicle-mounted Ethernet ring network node to the FPGA; deploy the automated test framework on the test node, connect it to the FPGA, call the FPGA configuration module to issue commands, enable the forwarding module, mirror module and packet sending module to work, and mirror the message to the test node; The test node then parses the protocol messages and data messages mirrored by the FPGA to the test node, and implements automated testing of R-APS protocol consistency, ERPS ring network function, or ring network switching / reversing performance.

2. The FPGA-based vehicle-mounted Ethernet ring network automated testing system according to claim 1, characterized in that: The nodes of the vehicle-mounted Ethernet ring network are connected in pairs through FPGA to form a loop. The FPGA and the test node are connected through the Ethernet interface. The FPGA mirrors the message to the interface. The test node captures the packet on the interface and performs real-time or offline analysis on the message.

3. The FPGA-based vehicle-mounted Ethernet ring network automated testing system according to claim 1, characterized in that: The test node is deployed on a PC or other device containing a central processing unit.

4. The FPGA-based vehicle-mounted Ethernet ring network automated testing system according to claim 1, characterized in that: The Ethernet ring node interface is connected to the FPGA interface to realize multicast of ERPS protocol messages and end-to-end forwarding of data messages in the same VLAN; it supports setting one-to-one mirroring and many-to-one mirroring between any interfaces.

5. The FPGA-based vehicle-mounted Ethernet ring network automated testing system according to claim 1, characterized in that: Mirroring supports filtering packets according to different protocols. Each port sets the packet filtering type. If not set, all packets are mirrored by default. Otherwise, only the specified type of packets are mirrored.

6. An FPGA-based vehicle-mounted Ethernet ring network automated testing method, based on the FPGA-based vehicle-mounted Ethernet ring network automated testing system according to any one of claims 1 to 5, characterized in that: Realize the automated testing of R-APS protocol consistency, ERPS ring network function or ring network switching / reversing performance; R-APS protocol consistency test, collects protocol messages of vehicle Ethernet ring network nodes through FPGA, mirrors them to the test node, stores the messages and performs offline analysis, and compares the analyzed results with the expected results; The ERPS ring network function test covers normal operation and disconnection of each link. The test node sends the failure / recovery command of each port to the FPGA to control the switching of the network link. The FPGA collects protocol messages and service messages, mirrors them to the test node, and the test node stores the messages and performs offline analysis. After analysis, the results are compared with the expected results. Automated test of ring network switching / reversal performance. The test node calls the FPGA's packet sending module to construct data packets to be forwarded between designated ports. The test node issues a command to disable the FPGA port to achieve the Ethernet ring network switching effect. The test node captures packets at both the blocked port and the expected released port in advance, and parses out the last data packet time T1 obtained by the blocked port and the first data packet time T2 obtained by the expected released port. The time difference T2-T1 is the switching time; the same applies to the reversal time.

Citation Information

Patent Citations

  • In-situ element protection looped network testing device

    CN110380923A

  • Intelligent substation in-situ looped network communication testing device and method

    CN110943889A