Device, method and electronic equipment for electromagnetic compatibility detection of in-vehicle ethernet

By transmitting test data packets in the virtual LAN of the switch and using an electromagnetic compatibility (EMC) testing application to control the sending and receiving of data packets, the accuracy problem of Ethernet EMC testing in vehicle controllers is solved, and the accuracy of testing is improved.

CN116436826BActive Publication Date: 2026-02-06BEIJING CO WHEELS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211725510.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-02-06
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In the existing technology, the Ethernet electromagnetic compatibility testing of vehicle controllers cannot accurately assess electromagnetic compatibility performance, especially since packet loss at the system-on-chip side is often not accurately detected.

Method used

By transmitting test data packets in the virtual LAN of the switch, the electromagnetic compatibility (EMC) testing application controls the sending and receiving process of the data packets, and obtains EMC indicators by counting the data packets, thus avoiding the influence of the on-chip system.

Benefits of technology

This improves the accuracy of electromagnetic compatibility testing, avoids the impact of packet loss in the on-chip system on the test results, and ensures accurate evaluation of electromagnetic compatibility performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116436826B_ABST
    Figure CN116436826B_ABST
Patent Text Reader

Abstract

The present disclosure provides a kind of vehicle-mounted Ethernet electromagnetic compatibility detection method, system and electronic equipment, it is related to the technical field of automotive electronics.The specific includes: first system on chip, second system on chip, third system on chip, control signaling channel, electromagnetic compatibility detection application, switch, wherein the switch includes: first port, second port, third port, first physical interface, second physical interface, first virtual local area network, second virtual local area network, third virtual local area network.The present disclosure can carry out electromagnetic compatibility test to Ethernet element in switch by transmitting test data packet between first physical interface and second physical interface in the virtual local area network of switch without external device assistance, the data packet count corresponding to first port and second port obtained is irrelevant to network in system on chip, avoid because the electromagnetic compatibility performance detection of packet loss in system on chip is influenced, improve the accuracy of electromagnetic compatibility test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the automotive electronics technology, and particularly relates to a device, a method and an electronic equipment for vehicle Ethernet electromagnetic compatibility detection. BACKGROUND

[0002] The vehicle controller is applied to a vehicle and is an important component in the vehicle body electronic system, and can control the behaviors of various hardware on the vehicle. A good vehicle controller can improve the comfort and convenience of the vehicle, and the importance of the vehicle controller in the vehicle is increasingly prominent.

[0003] The test of the vehicle controller includes EMC (Electro Magnetic Compatibility) test. The EMC test is a comprehensive evaluation of the interference size and anti-interference ability of an electronic product in an electromagnetic field, and is one of important indicators for determining the quality of the vehicle controller product. The test of the vehicle controller has important significance. In recent years, the automobile is developing towards intelligent networking and automatic driving, and the electronic and electrical architecture of the whole vehicle has changed greatly,

[0004] In the related art, the packet loss is calculated according to the transceiving packet of the SOC side to perform electromagnetic compatibility. Because the Ethernet protocol stack of the SOC side is relatively complex, the packet is often lost on the SOC side, and the electromagnetic compatibility performance on the Ethernet line cannot be accurately detected. SUMMARY

[0005] The present disclosure provides a device, a method and an electronic equipment for vehicle Ethernet electromagnetic compatibility detection. The technical solutions of the present disclosure are as follows.

[0006] According to a first aspect of the embodiments of the present disclosure, a system for vehicle Ethernet electromagnetic compatibility detection is provided, comprising: a first system on chip, a second system on chip, a third system on chip, and a switch, wherein the switch comprises: a first virtual network card, a second virtual network card, a third virtual network card, a first port, a second port, a third port, a first physical interface, and a second physical interface.

[0007] The first system on chip accesses a first virtual local area network through the first virtual network card, the first virtual network card is connected with the first port, and the first system on chip is configured to send a test data packet to the first port through the first virtual network card.

[0008] The switch transmits the test data packet from the first port to the first physical interface through the first virtual local area network.

[0009] The first physical interface and the second physical interface are connected through an external cable, and the test data packet is output from the first physical interface and transmitted to the second physical interface through the external cable;

[0010] The switch transmits the test data packet input by the second physical interface to the second port through a second virtual local area network;

[0011] The second on-chip system accesses a second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, and the second on-chip system is configured to receive the test data packet sent by the second port through the second virtual network card;

[0012] The third on-chip system accesses a third virtual local area network through a third virtual network card, the first on-chip system accesses the third virtual local area network through the third virtual network card, and the second on-chip system accesses the third virtual local area network through the third virtual network card;

[0013] The third on-chip system is configured with an electromagnetic compatibility detection application, and the electromagnetic compatibility application is configured to control the sending process of the test data packet in the first on-chip system and control the receiving process of the test data packet in the second on-chip system;

[0014] The electromagnetic compatibility detection application is further configured to obtain the data packet count corresponding to the first port and the second port, and obtain an electromagnetic compatibility index according to the data packet count.

[0015] Optionally, the switch further comprises a data packet processing module, the data packet processing module being connected with the first physical interface and the second physical interface;

[0016] The data packet processing module is configured to delete a first virtual local area network tag in the test data packet at the first physical interface and repackage, and add a second virtual local area network tag in the test data packet at the second physical interface.

[0017] Optionally, the electromagnetic compatibility detection application is configured to send first control signaling through the third virtual local area network to control the first on-chip system to start sending the test data packet and control the second on-chip system to start receiving the test data packet;

[0018] The electromagnetic compatibility detection application is further configured to send second control signaling through the third virtual local area network to control the first on-chip system to stop sending the test data packet and control the second on-chip system to stop receiving the test data packet;

[0019] The electromagnetic compatibility detection application is connected with the switch through a control signaling channel, and the electromagnetic compatibility detection application is configured to send third control signaling through the control signaling channel, acquire data packet counts corresponding to the first port and the second port through the control signaling channel, and acquire an electromagnetic compatibility index according to the data packet counts.

[0020] Optionally, the data packet counts include a start sending descriptor of the first port, an end sending descriptor of the first port, a start receiving descriptor of the second port, and an end receiving descriptor of the second port.

[0021] Optionally, the electromagnetic compatibility index is a data packet loss rate, and the electromagnetic compatibility detection application acquires the electromagnetic compatibility index according to the data packet counts, including:

[0022] acquiring a first difference value of the start sending descriptor and the end sending descriptor of the first port, and acquiring a second difference value of the start sending descriptor and the end sending descriptor of the second port;

[0023] determining the data packet loss rate according to the first difference value and the second difference value.

[0024] According to a second aspect of the embodiments of the present disclosure, a method for detecting electromagnetic compatibility of a vehicle-mounted Ethernet is provided, and the method is applied to the switch in the first aspect, and the method includes:

[0025] transmitting a test data packet from the first port to the first physical interface through a first virtual local area network, wherein a first system on chip accesses the first virtual local area network through a first virtual network card, the first virtual network card is connected with the first port, and the first system on chip is configured to send the test data packet to the first port through the first virtual network card;

[0026] outputting the test data packet from the first physical interface and transmitting the test data packet to a second physical interface through the external cable;

[0027] transmit the test data packet input by the second physical interface to the second port through a second virtual local area network, wherein the second system on chip accesses a second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, the second system on chip is configured to receive the test data packet sent by the second port through the second virtual network card, the third system on chip accesses a third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through the third virtual network card, and the second system on chip accesses the third virtual local area network through the third virtual network card; the electromagnetic compatibility detection application in the third system on chip is configured to control the sending process of the test data packet in the first system on chip and control the receiving process of the test data packet in the second system on chip; and the electromagnetic compatibility detection application is further configured to acquire the data packet counts corresponding to the first port and the second port, and acquire an electromagnetic compatibility index according to the data packet counts.

[0028] According to a second aspect of the embodiments of the present disclosure, a method for electromagnetic compatibility detection of vehicle-mounted Ethernet is provided, the method is applied to an electromagnetic compatibility detection application in the third system on chip as described in the first aspect, and the method comprises the following steps of:

[0029] The method is applied to the following steps of:

[0030] controlling the sending process of the test data packet in the first system on chip and controlling the receiving process of the test data packet in the second system on chip; wherein the first system on chip accesses a first virtual local area network through a first virtual network card, the first virtual network card is connected with the first port, and the first system on chip is configured to send the test data packet to the first port through the first virtual network card; the switch is configured to transmit the test data packet from the first port to the first physical interface through the first virtual local area network; the first physical interface and the second physical interface are connected through an external cable, the test data packet is output from the first physical interface and transmitted to the second physical interface through the external cable; the switch is configured to transmit the test data packet input by the second physical interface to the second port through a second virtual local area network; the second system on chip accesses a second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, the second system on chip is configured to receive the test data packet sent by the second port through the second virtual network card; the third system on chip accesses a third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through the third virtual network card, and the second system on chip accesses the third virtual local area network through the third virtual network card;

[0031] Obtain the data packet count corresponding to the first port and the second port, and obtain an electromagnetic compatibility index according to the data packet count.

[0032] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:

[0033] a processor;

[0034] a memory for storing signaling executable by the processor;

[0035] The processor is configured to execute the signaling to implement the method according to the second aspect.

[0036] According to a fifth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device can execute the method according to any one of the second aspect.

[0037] According to a sixth aspect of the embodiments of the present disclosure, a vehicle is provided, comprising the vehicle-mounted Ethernet electromagnetic compatibility detection device according to any one of the first aspect.

[0038] The embodiments of the present disclosure provide at least the following beneficial effects:

[0039] By transmitting the test data packet between the first physical interface and the second physical interface in the virtual local area network of the switch, the Ethernet element in the switch can be tested for electromagnetic compatibility without the assistance of external equipment.

[0040] The test data packet only passes through the virtual local area network and external cables during transmission, and the data packet count corresponding to the first port and the second port obtained by the embodiments of the present disclosure will not be affected by the system on chip, avoiding the influence of the electromagnetic compatibility performance detection due to the packet loss in the system on chip, and improving the accuracy of the electromagnetic compatibility test.

[0041] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings incorporated in the specification and forming a part of it, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure without limiting it in an inappropriate manner.

[0043] Figure 1 is a structural diagram of a vehicle-mounted Ethernet electromagnetic compatibility detection system according to an exemplary embodiment.

[0044] Figure 2is a flow chart of a method for vehicle Ethernet electromagnetic compatibility detection according to an exemplary embodiment.

[0045] Figure 3 is a flow chart of a method for vehicle Ethernet electromagnetic compatibility detection according to an exemplary embodiment. DETAILED DESCRIPTION

[0046] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings.

[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0048] First, introduce some terms in the present embodiment:

[0049] EMC test: also called electromagnetic compatibility test, refers to the comprehensive evaluation of the interference size (EMI) and anti-interference ability (EMS) of electronic products in the electromagnetic field, which is one of the most important indicators of product quality. The measurement of electromagnetic compatibility consists of test site and test instrument.

[0050] The definition of SoC is diverse, due to its rich connotation and wide application range, it is difficult to give an accurate definition. Generally speaking, SoC is called system chip, also known as system on chip, which means it is a product, a dedicated target integrated circuit, which contains a complete system and all the contents of embedded software.

[0051] Virtual local area network (VLAN): a technology for realizing data exchange of virtual workgroup by logically dividing (note that it is not physically divided) LAN devices into network segments (or smaller LANs).

[0052] Microcontroller Unit (MCU): also known as Single Chip Microcomputer or Single Chip Machine, is to reduce the frequency and specifications of Central Process Unit (CPU), and integrate memory, counter, USB, A / D conversion, UART, PLC, DMA and other peripheral interfaces, even LCD drive circuit on a single chip, forming a chip-level computer, for different application scenarios to do different combination control. Such as mobile phones, PC peripherals, remote controls, to automotive electronics, industrial stepper motors, robot arm control, etc. MCU can be seen everywhere.

[0053] Figure 1 is a structure diagram of a vehicle Ethernet electromagnetic compatibility detection system according to an example embodiment. Referring to Figure 1 , the system 100 includes a first system on chip 111, a second system on chip 112, a third system on chip 113, a control signaling channel 120, an electromagnetic compatibility detection application 130, and a switch 140, wherein the switch 140 includes a first port 141, a second port 142, a third port 143, a first physical interface 144, a second physical interface 145, a first virtual local area network 146, a second virtual local area network 147, and a third virtual local area network 148.

[0054] The first system on chip 111 accesses the first virtual local area network 146 through a first virtual network card, and the first virtual network card is connected with the first port 141 and used to send test data packets to the first port 141 through the first virtual network card.

[0055] In this embodiment, the vehicle Ethernet electromagnetic compatibility detection system can be a car machine on a car or other devices with control functions. In general, it includes four modules: the first system on chip 111, the second system on chip 112, the third system on chip 113, and the switch 140. The electromagnetic compatibility detection application 130 is a virtual application, and multiple nodes are included in the application, which are distributed in each system on chip and used to control the electromagnetic compatibility detection process and obtain the detection results of electromagnetic compatibility indicators.

[0056] In a possible embodiment, the electromagnetic compatibility application is configured in the third system on chip 113.

[0057] The network in switch 140 is divided into three virtual local area networks (VLANs). A VLAN can be a network consisting of a few home computers or an enterprise network consisting of hundreds of computers. The VLAN specifically refers to the network in switch 140, which is the broadcast domain. If any VLAN is configured on switch 140, any broadcast frame (i.e., data packet) will be forwarded to all ports except the receiving port. For example, if computer A sends a broadcast message to port 141, it will be forwarded to port 142, port 143, physical interface 144, and physical interface 145. During electromagnetic compatibility testing, we expect the test data packets to enter from port 141 and exit from physical interface 144. Configuring a first VLAN 146 in the switch will achieve this transmission method. In the attached diagram, straight lines represent network transmission routes, and the markings on the lines represent the VLANs along the transmission routes.

[0058] like Figure 1 As shown, a physical network cable can be divided into two virtual local area networks (VLANs). The network cable connecting the first system-on-a-chip (SoC) 111 and the first port 141 is divided into a first VLAN 146 and a third VLAN 148. The SoC 111 connects to the first VLAN 146 through the first virtual network card 151 where its local IP address is located, and connects to the third VLAN 148 through the third virtual network card 153.

[0059] A virtual network interface card (NIC) is a computer NIC simulated by software; all system-on-a-chip (SoCs) possess this function. Virtual NICs offer high security, as their output and received information are encrypted, making them the most reliable way to achieve network sharing within a local area network (LAN). Virtual NICs can perform all the functions of a physical NIC. It should also be noted that virtual NICs can be used to simulate hubs, allowing switches to recognize the software as a NIC, thus enabling Virtual Private Network (VPN) functionality. VPNs are a remote access technology; simply put, they utilize a public network to establish a private network. When a user from another location wants to access server resources on an internal network, this access is considered remote access.

[0060] In this embodiment, two virtual network interface cards (NICs) are configured in the first system-on-a-chip (SoC) 111: a first virtual NIC 151 and a third virtual NIC 153. The first virtual NIC 151 is used to access the first virtual local area network (VLAN) 146, and the third virtual NIC 153 is used to access the third VLAN 148. Two virtual NICs are configured in the second system-on-a-chip (SoC) 112: a second virtual NIC 152 and a third virtual NIC 153. The second virtual NIC 152 is used to access the second VLAN 147, and the third virtual NIC 153 is used to access the third VLAN 148.

[0061] The test data packet is transmitted through the first virtual local area network 146 in this embodiment.

[0062] The switch transmits the test data packet from the first port 141 to the first physical interface 144 through the first virtual local area network 146.

[0063] In this embodiment, the test data packet enters the first port 141 from the first virtual network card 151, and is then sent to the first physical interface 144 along the first virtual local area network 146 inside the switch 140.

[0064] The first physical interface 144 and the second physical interface 145 are connected through an external cable, and the test data packet is output from the first physical interface 144 and transmitted to the second physical interface 145 through the external cable.

[0065] The local area network transmits the test data packet input by the second physical interface 145 to the second port 142 through the second virtual local area network 147.

[0066] In this embodiment, after the test data packet is output from the first physical interface 144, it is transmitted to the second physical interface 145 through an external cable, and then sent to the second port 142 along the second virtual local area network 147 inside the switch 140.

[0067] In an electromagnetic interference environment, the data packet passing through the first physical interface 144 and the second physical interface 145 may be affected and changed, or directly lost. The electromagnetic compatibility detection in this application mainly detects the performance of the two interfaces under the influence of electromagnetic interference.

[0068] In a possible embodiment, the external cable is a network cable, such as a T1 standard cable or an E1 standard cable. E1: a communication standard in regions other than North America, a high-capacity digital line, 32 channels, each channel can be allocated as 56K or 64K bandwidth up to 2.048 Mbps, using all 24 channels is called Full E1, supporting communication protocols such as DDR, frame relay, X25, etc.

[0069] T1: a communication standard in North America. High-capacity digital line, 24 channels, each channel can be allocated as 56K or 64K, bandwidth up to 1.544 Mbps.

[0070] In a possible embodiment, the first physical interface 144 and the second physical interface 145 are connected to other electronic components (such as Bluetooth modules, micro control units MCU, etc.) in the vehicle through a cable in actual application, for enabling the vehicle machine to interact with other electronic components in the vehicle to control the operation of the vehicle.

[0071] The second on-chip system 112 accesses the second virtual local area network 147 through a second virtual network card 152, the second virtual network card being connected with the second port 142, and the second on-chip system 112 is configured to receive the test data packet transmitted by the second port 142 through the second virtual network card.

[0072] In this embodiment, the test data packet is transmitted from the first port 141 to the first physical interface 144, then to the second physical interface 145, and finally through the second port 142, thereby completing a complete transmission process. The first virtual local area network 146 and the second virtual local area network 147 are configured to transmit the test data packet, and electromagnetic compatibility detection can be performed according to whether the test data packet changes before and after transmission.

[0073] The third on-chip system 113 accesses the third virtual local area network 148 through a third virtual network card 153, the first on-chip system 111 accesses the third virtual local area network 148 through the third virtual network card 153, and the second on-chip system 112 accesses the third virtual local area network 148 through the third virtual network card 153.

[0074] The electromagnetic compatibility detection application is configured in the third on-chip system, and is configured to control the transmission process of the test data packet in the first on-chip system and the reception process of the test data packet in the second on-chip system. The electromagnetic compatibility detection application is further configured to obtain the data packet count corresponding to the first port and the second port, and obtain an electromagnetic compatibility index according to the data packet count.

[0075] Optionally, the electromagnetic compatibility detection application 130 transmits first control signaling through the third virtual local area network 148 to control the first on-chip system 111 to start transmitting the test data packet and control the second on-chip system 112 to start receiving the test data packet.

[0076] The electromagnetic compatibility detection application 130 transmits second control signaling through the third virtual local area network 148 to control the first on-chip system 111 to stop transmitting the test data packet and control the second on-chip system 112 to stop receiving the test data packet.

[0077] In this embodiment, different from the first virtual local area network 146 and the second virtual local area network 147, the third virtual local area network 148 is used for the process of transmitting the test data packet controlled by the first control signaling by the electromagnetic compatibility detection application 130, the electromagnetic compatibility detection application 130 includes a master node and multiple sub-nodes, and the master node is used for calculating and generating the electromagnetic compatibility detection result; the master node is used for controlling the process of the test, that is, the process of transmitting and receiving the test data packet: when to start transmitting, when to stop transmitting, when to start receiving, and when to stop receiving.

[0078] In a possible embodiment, when the first system on chip 111 starts transmitting the test data packet, the second system on chip 112 also starts receiving the test data packet; and when the first system on chip 111 stops transmitting the test data packet, the second system on chip 112 also stops receiving the test data packet.

[0079] The electromagnetic compatibility detection application 130 is connected with the switch 140 through the control signaling channel 120, is used for transmitting the third control signaling through the control signaling channel 120, acquiring the data packet count corresponding to the first port 141 and the second port 142 through the control signaling channel 120, and acquiring the electromagnetic compatibility index according to the data packet count.

[0080] In this embodiment, the third control signaling transmitted through the special control signaling channel 120 is used to acquire the data packet count corresponding to the first port 141 and the second port 142 in the switch, and the master node of the electromagnetic compatibility detection application 130 is used to calculate the electromagnetic compatibility index.

[0081] In a possible embodiment, the control signaling channel 120 is SPI, UART, MDIO or Ethernet, the Serial Peripheral Interface (SPI) is a high-speed, full-duplex and synchronous communication bus, and only occupies four lines on the pins of the chip, saving the pins of the chip and saving space on the layout of the PCB, providing convenience; the Universal Asynchronous Receiver / Transmitter (UART) is a universal serial data bus used for asynchronous communication, and the bus communicates bidirectionally and can realize full-duplex transmission and reception. The Management Data Input / Output (MDIO) interface is a real-time, half-duplex and serial data interface. The MDIO interface is composed of an MDIO line and an MDC (Management Data Clock) line. It is included in the IEEE802.3 protocol and is a serial bus interface dedicated to MAC and PHY management. It is mainly used for operations such as configuring the state of the PHY chip, reading the register, reading the PHY address, obtaining the LINK state and the like. It is irrelevant to the data communication of the network port MII, RMII (TX_CLK, RX_CLK) and the like, and the MDIO interface can mount up to 32 PHY devices.

[0082] In a possible embodiment, the control signaling channel 120 is further configured to send a forwarding rule to the switch 140 to configure the forwarding rule to the switch, and the forwarding rule includes a processing mode of transmitting the test data packet and other signaling.

[0083] Optionally, the router further includes a data packet processing module, which is connected to the first physical interface 144 and the second physical interface 145.

[0084] The data packet processing module is configured to delete a first virtual local area network tag in the test data packet at the first physical interface 144 and repackage the test data packet, and add a second virtual local area network tag to the test data packet at the second physical interface 145.

[0085] In this embodiment, the data packet processing module is configured to process the test data packet according to the forwarding rule, and in order to confirm the virtual local area network in which the data packet is located in the transmission process, the forwarding rule in this application includes adding a Tag field corresponding to the virtual local area network to the data packet before entering the virtual local area network for transmission.

[0086] The data packet with VLAN has a Tag field more than normal Ethernet data packet, VLAN Tag is 4 bytes long, which is added directly in the header of Ethernet data packet. Tag field is composed of the following parts:

[0087] 1. TPID: Tag Protocol Identifier, 2 bytes, fixed value, 0x8100, is the new type defined by IEEE, which indicates that this is a frame carrying 802.1Q label. If the device does not support 802.1Q receives such frame, it will be discarded.

[0088] 2. TCI: Tag Control Information, 2 bytes. Frame control information, detailed as follows:

[0089] Priority: 3 bits, indicating the priority of the frame, the value range is 0-7, the larger the value, the higher the priority. When the switch is blocked, the data frame with high priority is sent first.

[0090] CFI: Canonical Format Indicator, 1 bit. CFI indicates whether the MAC address is in classic format. CFI is 0, indicating classic format, and CFI is 1, indicating non-classic format. Used to distinguish Ethernet frames, FDDI (Fiber Distributed Digital Interface) frames and token ring network frames. In Ethernet, the value of CFI is 0.

[0091] VLAN Identifier: VLAN ID, 12 bits, the configurable VLAN ID value range is 0-4095, but 0 and 4095 are reserved VLAN IDs in the protocol and cannot be used by users.

[0092] In the Tag field, the main concern is VLAN Identifier, which indicates the VLAN ID carried by the data packet.

[0093] Since the data packet received by the switch 140 from the opposite end device can be an Untagged data packet, but all Ethernet data packets are processed and forwarded in the form of Tagged in the switch, the switch must add a Tag to the Untagged data packet received by the port. Therefore, in the embodiment, when the test data packet is transmitted in the first virtual local area network 146, the test data packet needs to carry a Tag field, and the VLAN ID in the Tag field is the label of the first virtual local area network; when the test data packet is transmitted on the external cable between the first physical interface 144 and the second physical interface 145, the test data packet does not need to carry a Tag field, and the first virtual local area network label in the test data packet needs to be deleted; when the test data packet is transmitted in the second virtual local area network 147, the test data packet needs to carry a Tag field, and the VLAN ID in the Tag field is the label of the second virtual local area network.

[0094] Optionally, the data packet count includes: a start sending descriptor of the first port 141, an end sending descriptor of the first port 141, a start receiving descriptor of the second port 142, and an end receiving descriptor of the second port 142.

[0095] Optionally, the electromagnetic compatibility detection application is configured to obtain a first difference value of the start sending descriptor and the end sending descriptor of the first port, and obtain a second difference value of the start sending descriptor and the end sending descriptor of the second port; and determine the data packet loss rate according to the first difference value and the second difference value.

[0096] Optionally, the electromagnetic compatibility index is a data packet loss rate, and the electromagnetic compatibility detection application 130 obtains a formulaic expression of the electromagnetic compatibility index according to the data packet count.

[0097] PLR = 1 - (rx1-rx2) / (tx1-tx2)

[0098] Wherein, PLR is the data packet loss rate, tx1 is the start sending descriptor of the first port 141, tx2 is the end sending descriptor of the first port 141, rx1 is the start receiving descriptor of the second port 142, and rx2 is the end receiving descriptor of the second port 142.

[0099] In the embodiment, the process between the start and end time is the transmission process of the test data packet, and a large number of test data packets are transmitted in the process, (tx1-tx2) is the total number of data packets transmitted by the first port 141 in the process, and (rx1-rx2) is the total number of data packets received by the second port 142 in the process.

[0100] It should be noted that there are many other methods for calculating electromagnetic compatibility indicators, for example, by comparing the test data packets sent at the first port 141 and the test data packets received at the second port 142, according to whether the content in the same test data packet changes, if there is no change or the change is small, it indicates that the electromagnetic compatibility performance of the two physical interfaces is excellent. The highlight of the beneficial effects of the present application is that by transmitting test data packets between the first physical interface and the second physical interface in the virtual local area network of the switch, electromagnetic compatibility testing of the Ethernet elements in the switch can be performed without the assistance of external equipment.

[0101] The test data packets are only transmitted between the virtual local area network, the first physical interface and the second physical interface and the external cable, and the data packet counts corresponding to the first port and the second port are obtained independently of the network in the system on chip, avoiding the influence of packet loss in the system on chip on the electromagnetic compatibility performance detection, and improving the accuracy of electromagnetic compatibility testing.

[0102] Optionally, the first system on chip 111, the second system on chip 112 and the third system on chip 113 each contain the electromagnetic compatibility detection application 130.

[0103] Figure 2 is a flow chart of a vehicle-mounted Ethernet electromagnetic compatibility detection method according to an exemplary embodiment, as shown in Figure 2 The method is used in the switch 140 as shown in Figure 1 The method comprises the following steps.

[0104] Step 201, transmitting a test data packet from the first port to the first physical interface through a first virtual local area network, wherein the first system on chip accesses the first virtual local area network through a first virtual network card, the first virtual network card is connected with the first port, and the first system on chip is used to send the test data packet to the first port through the first virtual network card;

[0105] Step 202, outputting the test data packet from the first physical interface and transmitting it to the second physical interface through the external cable;

[0106] Step 203, transmitting the test data packet input by the second physical interface to the second port through the second virtual local area network, wherein the second system on chip accesses the second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, the second system on chip is configured to receive the test data packet sent by the second port through the second virtual network card, the third system on chip accesses the third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through the third virtual network card, and the second system on chip accesses the third virtual local area network through the third virtual network card; the electromagnetic compatibility detection application in the third system on chip is configured to control the sending process of the test data packet in the first system on chip and control the receiving process of the test data packet in the second system on chip; the electromagnetic compatibility detection application is further configured to obtain the data packet count corresponding to the first port and the second port, and obtain the electromagnetic compatibility index according to the data packet count.

[0107] Figure 3 is a flow chart of a vehicle-mounted Ethernet electromagnetic compatibility detection method according to an exemplary embodiment, as shown in Figure 3 The method is used Figure 1 The electromagnetic compatibility detection application 130 in the third system on chip 113 includes the following steps.

[0108] Step 301, controlling the sending process of the test data packet in the first system on chip and controlling the receiving process of the test data packet in the second system on chip; wherein the first system on chip accesses the first virtual local area network through a first virtual network card, the first virtual network card is connected with the first port, and the first system on chip is configured to send the test data packet to the first port through the first virtual network card; the switch is configured to transmit the test data packet from the first port to the first physical interface through the first virtual local area network; the first physical interface and the second physical interface are connected through an external cable, the test data packet is output from the first physical interface and transmitted to the second physical interface through the external cable; the switch is configured to transmit the test data packet input by the second physical interface to the second port through the second virtual local area network; the second system on chip accesses the second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, and the second system on chip is configured to receive the test data packet sent by the second port through the second virtual network card; the third system on chip accesses the third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through the third virtual network card, and the second system on chip accesses the third virtual local area network through the third virtual network card;

[0109] At step 302, the data packet counts corresponding to the first port and the second port are obtained, and an electromagnetic compatibility index is obtained according to the data packet counts.

[0110] The electromagnetic compatibility index in this embodiment is a data packet loss rate, and the formulaic expression of the electromagnetic compatibility index obtained by the electromagnetic compatibility detection application 130 according to the data packet counts is as follows:

[0111] PLR = 1 - (rx1 - rx2) / (tx1 - tx2)

[0112] Wherein, PLR is the data packet loss rate, tx1 is the start sending descriptor of the first port 141, tx2 is the end sending descriptor of the first port 141, rx1 is the start receiving descriptor of the second port 142, and rx2 is the end receiving descriptor of the second port 142.

[0113] In this embodiment, the process between the start time and the end time is the transmission process of test data packets, and a large number of test data packets are transmitted in this process. (tx1 - tx2) is the total number of data packets transmitted by the first port 141 in the process, and (rx1 - rx2) is the total number of data packets received by the second port 142 in the process.

[0114] As to the method in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the device, and will not be described in detail here.

[0115] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure that are deemed to fall within the general principles of the present disclosure and include commonly known or customary technical practices in the art. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0116] It should be understood that the present disclosure is not limited to the precise structures described and shown in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. A vehicle-mounted Ethernet electromagnetic compatibility detection device, characterized in that, The application relates to a system for testing electromagnetic compatibility of a plurality of SoC (System on Chip) systems, comprising: a first SoC system, a second SoC system, a third SoC system, and a switch, wherein the switch comprises: a first port, a second port, a third port, a first physical interface, and a second physical interface; the first SoC system is connected to a first virtual LAN (Local Area Network) through a first virtual network card, the first virtual network card is connected to the first port, and the first SoC system is configured to send a test data packet to the first port through the first virtual network card; the switch is configured to transmit the test data packet from the first port to the first physical interface through the first virtual LAN; the first physical interface and the second physical interface are connected through an external cable, the test data packet is output from the first physical interface and transmitted to the second physical interface through the external cable; the switch is configured to transmit the test data packet input from the second physical interface to the second port through a second virtual LAN; the second SoC system is connected to the second virtual LAN through a second virtual network card, the second virtual network card is connected to the second port, and the second SoC system is configured to receive the test data packet sent by the second port through the second virtual network card; the third SoC system is connected to a third virtual LAN through a third virtual network card, the first SoC system is connected to the third virtual LAN through the third virtual network card, and the second SoC system is connected to the third virtual LAN through the third virtual network card; an electromagnetic compatibility detection application is configured in the third SoC system, the electromagnetic compatibility application is configured to control the sending process of the test data packet in the first SoC system and control the receiving process of the test data packet in the second SoC system; the electromagnetic compatibility detection application is further configured to acquire the data packet count corresponding to the first port and the second port and acquire an electromagnetic compatibility index according to the data packet count.

2. The apparatus of claim 1, wherein, the switch further comprises a data packet processing module connected to the first physical interface and the second physical interface; the data packet processing module is configured to delete the first virtual LAN label in the test data packet at the first physical interface and repackage the test data packet, and add a second virtual LAN label in the test data packet at the second physical interface.

3. The apparatus of claim 1, wherein, the electromagnetic compatibility detection application is specifically configured to send first control signaling through the third virtual LAN to control the first SoC system to start sending the test data packet and control the second SoC system to start receiving the test data packet; the electromagnetic compatibility detection application is further configured to send second control signaling through the third virtual LAN to control the first SoC system to stop sending the test data packet and control the second SoC system to stop receiving the test data packet; the electromagnetic compatibility detection application is connected to the switch through a control signaling channel, the electromagnetic compatibility detection application is configured to send third control signaling through the control signaling channel, acquire the data packet count corresponding to the first port and the second port through the control signaling channel, and acquire an electromagnetic compatibility index according to the data packet count.

4. The apparatus of claim 1, wherein, The data packet count includes a start sending descriptor of the first port, an end sending descriptor of the first port, a start receiving descriptor of the second port, and an end receiving descriptor of the second port.

5. The apparatus of claim 4, wherein, The electromagnetic compatibility index is a data packet loss rate, and the electromagnetic compatibility detection application is configured to obtain a first difference between the start sending descriptor and the end sending descriptor of the first port, and obtain a second difference between the start sending descriptor and the end sending descriptor of the second port; and determine the data packet loss rate according to the first difference and the second difference.

6. A method for in-vehicle Ethernet electromagnetic compatibility detection, the method comprising: The method is applied to a switch, and the method comprises: transmitting a test data packet from a first port to a first physical interface through a first virtual local area network, wherein a first system on chip accesses the first virtual local area network through a first virtual network card, the first virtual network card is connected to the first port, and the first system on chip is configured to send the test data packet to the first port through the first virtual network card; outputting the test data packet from the first physical interface and transmitting the test data packet to a second physical interface through an external cable; transmitting the test data packet input by the second physical interface to a second port through a second virtual local area network, wherein a second system on chip accesses the second virtual local area network through a second virtual network card, the second virtual network card is connected to the second port, and the second system on chip is configured to receive the test data packet sent by the second port through the second virtual network card, a third system on chip accesses a third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through the third virtual network card, and the second system on chip accesses the third virtual local area network through the third virtual network card; an electromagnetic compatibility detection application is configured in the third system on chip, the electromagnetic compatibility application is configured to control a sending process of the test data packet in the first system on chip and control a receiving process of the test data packet in the second system on chip; and the electromagnetic compatibility detection application is further configured to obtain data packet counts corresponding to the first port and the second port, and obtain an electromagnetic compatibility index according to the data packet counts.

7. A method for in-vehicle Ethernet electromagnetic compatibility detection, the method comprising: The method is applied to an electromagnetic compatibility detection application in a third system on chip, and the method comprises: The sending process of the test data packet in the first system on chip is controlled, and the receiving process of the test data packet in the second system on chip is controlled; wherein the first system on chip accesses a first virtual local area network through a first virtual network card, the first virtual network card is connected with a first port, and the first system on chip is used for sending the test data packet to the first port through the first virtual network card; the switch is used for transmitting the test data packet from the first port to a first physical interface through the first virtual local area network; the first physical interface and a second physical interface are connected through an external cable, the test data packet is output from the first physical interface and transmitted to the second physical interface through the external cable; the switch is used for transmitting the test data packet input by the second physical interface to a second port through a second virtual local area network; the second system on chip accesses a second virtual local area network through a second virtual network card, the second virtual network card is connected with the second port, and the second system on chip is used for receiving the test data packet sent by the second port through the second virtual network card; the third system on chip accesses a third virtual local area network through a third virtual network card, the first system on chip accesses the third virtual local area network through a third virtual network card, and the second system on chip accesses the third virtual local area network through a third virtual network card; The data packet count corresponding to the first port and the second port is obtained, and an electromagnetic compatibility index is obtained according to the data packet count.

8. An electronic device, comprising: Comprise: A processor; A memory for storing the signaling executable by the processor; Wherein the processor is configured to execute the signaling to implement the method of any one of claims 6 or 7.

9. A computer-readable storage medium, when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device can execute the method of any one of claims 6 or 7.

10. A vehicle characterized by comprising: The vehicle-mounted Ethernet electromagnetic compatibility detection device comprises the vehicle-mounted Ethernet electromagnetic compatibility detection device according to any one of claims 1-5.

Citation Information

Patent Citations

  • Method and control device for transmitting safety-relevant data in a motor vehicle by means of an ethernet standard

    CN107005593A

  • Vehicle-mounted Ethernet switch test method, device, equipment and storage medium

    CN115291008A