Multi-core virtual ethernet data interaction system, data interaction method and multi-core chip

The multi-core virtual Ethernet data interaction system utilizes shared memory and a virtual Ethernet driver module to achieve multi-core cross-core data interaction, solving the problem of insufficient hardware resources in automotive multi-core SOC chips, improving data interaction speed and communication quality, adapting to MCU and MPU cores, and reducing hardware costs.

CN118802416BActive Publication Date: 2026-03-20UNITED AUTOMOTIVE ELECTRONICS SYST
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing automotive multi-core SOC chips cannot meet the high-bandwidth communication requirements of intelligent connected vehicles and intelligent driving fields due to insufficient hardware resources of a single Ethernet network card, and alternative interface methods have the problem of low communication speed.

Method used

A multi-core virtual Ethernet data interaction system is adopted, which realizes multi-core cross-core data interaction through a shared memory transmission module and a virtual Ethernet driver module, thereby reducing hardware resource costs and improving data interaction speed and communication quality.

Benefits of technology

The virtual Ethernet interaction system, implemented entirely in software, reduces the hardware resource cost of Ethernet drivers for multi-core chips, improves data interaction rate and communication quality, is compatible with MCU and MPU cores, reduces the cost of repetitive code development, and achieves efficient data transmission through shared memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802416B_ABST
    Figure CN118802416B_ABST
Patent Text Reader

Abstract

The application provides a multi-core virtual Ethernet data interaction system, a data interaction method and a multi-core chip, the system comprising a shared memory transmission module and at least two cores; one of the cores is configured as a core node of the virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system; the shared memory transmission module is configured to allocate a shared memory space; the core node comprises a first driving layer, a first Ethernet protocol stack and a first application layer; the remote nodes comprise a second driving layer, a second Ethernet protocol stack and a second application layer; the first driving layer comprises a first virtual Ethernet driving module and a first inter-core interaction driving module, and the second driving layer comprises a second virtual Ethernet driving module and a second inter-core interaction driving module. The application realizes multi-core cross-core inter-core data interaction through a virtual Ethernet, can reduce the Ethernet driving hardware resource cost of the multi-core chip, and effectively improves the data interaction rate and communication quality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a multi-core virtual Ethernet data interaction system, a data interaction method and a multi-core chip. BACKGROUND

[0002] Vehicle Ethernet is a new type of local area network communication technology applied to electronic control units in a vehicle. With its high bandwidth, good maturity, fast communication and other advantages, it is widely used in intelligent vehicles, intelligent networking and other technical fields. At the same time, with the development of the automobile electronic and electrical architecture towards the regional architecture and central computing domain architecture, the highly integrated core controller is more and more applied. Therefore, the multi-core SOC (System on Chip) is widely used in intelligent driving, intelligent cockpit and other intelligent vehicle computing platform systems in the vehicle due to its unique advantages of high integration and integration. The basic architecture of the commonly used vehicle Ethernet network is composed of MAC (Media Access Control), PHY (Physical Layer) chip and upper layer protocol stack transmission link. At present, it mainly supports 10M, 100M, 1G and even 10G bandwidth, which is being applied in the field of intelligent driving of vehicles. The main automobile physical layer technical standards involved are 100BASE-T1 and 1000BASE-T1. This vehicle Ethernet communication needs to be realized based on hardware 10Mbps / 100Mbps / 1000Mbps Ethernet card driver in physical layer data processing, so it is limited by the Ethernet card Ethernet driver hardware resources that can be supported by the SOC chip.

[0003] For vehicle multi-core SOC chips, a single Ethernet card Ethernet driver hardware resource cannot meet the vehicle Ethernet network communication requirements. At the same time, the mainstream data interaction technology in the field of intelligent networking and intelligent driving is based on vehicle Ethernet. If more application scenarios of Ethernet network communication are needed, Ethernet cards need to be added, thereby increasing the cost of the SOC. In addition, some SOC chips do not support Ethernet card interfaces at present, so USB or other interface configurations are used to replace the Ethernet card interface. However, this method has the problem of low communication rate and cannot meet the high real-time and low latency communication requirements of vehicle data.

[0004] It should be noted that the information disclosed in the background section of the present application is only intended to deepen the understanding of the general background of the present application, and should not be regarded as acknowledging or implying in any form that the information constitutes prior art known to those skilled in the art. SUMMARY

[0005] The application aims to provide a multi-core virtual Ethernet data interaction system, a data interaction method and a multi-core chip, which can realize multi-core cross-core data interaction through virtual Ethernet, reduce the Ethernet drive hardware resource cost of the multi-core chip and effectively improve the data interaction rate and communication quality.

[0006] To achieve the above-mentioned purpose, the application provides a multi-core virtual Ethernet data interaction system, which comprises a shared memory transmission module and at least two cores.

[0007] One of the cores is configured as a core node of the virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system.

[0008] The shared memory transmission module is configured to allocate corresponding shared memory spaces for each pair of remote nodes and core nodes that perform data interaction and manage the shared memory spaces.

[0009] The core node comprises a first drive layer, a first Ethernet protocol stack and a first application layer.

[0010] The remote node comprises a second drive layer, a second Ethernet protocol stack and a second application layer.

[0011] The first drive layer comprises a first virtual Ethernet drive module and a first inter-core interaction drive module, the second drive layer comprises a second virtual Ethernet drive module and a second inter-core interaction drive module, the first virtual Ethernet drive module and the second virtual Ethernet drive module are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card, and the first inter-core interaction drive module and the second inter-core interaction drive module are configured to read or write Ethernet data in the corresponding shared memory spaces.

[0012] Optionally, the virtual Ethernet interaction system further comprises a built-in switch and an external switch, the first drive layer further comprises a UDMA drive module, the built-in switch is connected with the external switch, the external switch is configured to receive Ethernet data from an external Ethernet node or an external diagnostic device and transmit the Ethernet data to the built-in switch, or transmit Ethernet data to a corresponding external Ethernet node or external diagnostic device, and the UDMA drive module is configured to read Ethernet data from the built-in switch or transmit Ethernet data to the built-in switch.

[0013] Optionally, the core node further comprises a first virtual Ethernet interface module arranged between the first drive layer and the first Ethernet protocol stack, and the first virtual Ethernet interface module is configured to provide a unified Ethernet network interface.

[0014] Optionally, the remote node further comprises a second virtual Ethernet interface module disposed between the second driver layer and the second Ethernet protocol stack, and the second virtual Ethernet interface module is configured to provide a unified Ethernet network interface.

[0015] To achieve the above object, the application further provides a multi-core virtual Ethernet data interaction method, which comprises the following steps:

[0016] The first inter-core interaction driver module in the core node writes the first Ethernet data into the corresponding shared memory space;

[0017] The second inter-core interaction driver module in the remote node reads the first Ethernet data from the shared memory space;

[0018] The second virtual Ethernet driver module in the remote node transmits the first Ethernet data to the second Ethernet protocol stack in the remote node for processing;

[0019] The second Ethernet protocol stack in the remote node transmits the processed first Ethernet data to the second application layer in the remote node.

[0020] Optionally, the data interaction method further comprises:

[0021] The second inter-core interaction driver module in the remote node writes the second Ethernet data, which is sequentially issued through the second application layer, the second Ethernet protocol stack and the second virtual Ethernet driver module, into the shared memory space;

[0022] The first inter-core interaction driver module in the core node reads the second Ethernet data from the shared memory space;

[0023] The UDMA driver module in the core node sends the second Ethernet data to the built-in switch and transmits the second Ethernet data to the corresponding external Ethernet node or external diagnostic device through the external switch.

[0024] Optionally, the data interaction method further comprises:

[0025] The UDMA driver module in the core node receives the third Ethernet data from the external Ethernet node or external diagnostic device, which is sequentially uploaded through the external switch and the built-in switch;

[0026] The first virtual Ethernet driver module in the core node sequentially transmits the third Ethernet data to the first virtual Ethernet interface module and the first Ethernet protocol stack in the core node for processing, so as to obtain the first Ethernet data.

[0027] To achieve the above object, the application further provides a multi-core virtual Ethernet data interaction method, which comprises the following steps:

[0028] The first inter-core interaction driving module in the core node reads fourth Ethernet data from the first shared memory space and copies the fourth Ethernet data into the second shared memory space, wherein the first shared memory space is a shared memory space for data interaction between the core node and the first remote node, the second shared memory space is a shared memory space for data interaction between the core node and the second remote node, and the fourth Ethernet data is written into the first shared memory space by the second inter-core interaction driving module in the first remote node;

[0029] The second inter-core interaction driving module in the second remote node reads the fourth Ethernet data from the second shared memory space;

[0030] The second virtual Ethernet driving module in the second remote node transmits the fourth Ethernet data to the second Ethernet protocol stack in the second remote node for processing;

[0031] The second application layer in the second remote node receives the processed fourth Ethernet data.

[0032] To achieve the above object, the application further provides a multi-core chip, which comprises a shared memory transmission module and at least two cores, wherein one core is configured as a core node of a virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system.

[0033] The shared memory transmission module is configured to allocate corresponding shared memory spaces for each pair of remote nodes and core nodes for data interaction and to manage the shared memory spaces;

[0034] The core node comprises a first driving layer, a first Ethernet protocol stack and a first application layer;

[0035] The remote node comprises a second driving layer, a second Ethernet protocol stack and a second application layer;

[0036] The first driving layer comprises a first virtual Ethernet driving module and a first inter-core interaction driving module, and the second driving layer comprises a second virtual Ethernet driving module and a second inter-core interaction driving module, wherein the first virtual Ethernet driving module and the second virtual Ethernet driving module are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card, and the first inter-core interaction driving module and the second inter-core interaction driving module are configured to read or write Ethernet data in the corresponding shared memory spaces.

[0037] Optionally, the multi-core chip further comprises a built-in switch, the first driver layer further comprises a UDMA driver module, the built-in switch is configured to be connected with an external switch, and receive Ethernet data from an external Ethernet node or an external diagnostic device transmitted by the external switch, or transmit the Ethernet data to the corresponding external Ethernet node or the external diagnostic device through the external switch; the UDMA driver module is configured to read the Ethernet data from the built-in switch, or transmit the Ethernet data to the built-in switch.

[0038] Compared with the prior art, the multi-core virtual Ethernet data interaction system, the data interaction method and the multi-core chip provided by the application have the following beneficial effects:

[0039] The multi-core virtual Ethernet data interaction system provided by the application comprises a shared memory transmission module and at least two cores; one of the cores is configured as a core node of a virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system; the shared memory transmission module is configured to allocate corresponding shared memory spaces for each pair of the remote nodes and the core node that perform data interaction, and to manage the shared memory spaces; the core node comprises a first driver layer, a first Ethernet protocol stack and a first application layer; the remote node comprises a second driver layer, a second Ethernet protocol stack and a second application layer; the first driver layer comprises a first virtual Ethernet driver module and a first inter-core interaction driver module, the second driver layer comprises a second virtual Ethernet driver module and a second inter-core interaction driver module, the first virtual Ethernet driver module and the second virtual Ethernet driver module are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card, and the first inter-core interaction driver module and the second inter-core interaction driver module are configured to read or write Ethernet data in the corresponding shared memory space. Thus, the multi-core virtual Ethernet data interaction system provided by the application can realize multi-core cross-core inter-core data interaction through a virtual Ethernet by setting a virtual Ethernet driver module and an inter-core interaction driver module in the driver layer of each core of a multi-core chip, and allocating a shared memory space that can be accessed by both a remote node and a core node that perform data interaction through a shared memory transmission module, thereby reducing the Ethernet driver hardware resource cost of the multi-core chip, effectively improving the data interaction rate and communication quality. Since the virtual Ethernet is realized through pure software, it is reusable, portable and highly compatible, and is suitable for MCU (Micro Controller Unit) cores and MPU (Micro Processor Unit) cores, thereby reducing the code repeated development cost. Meanwhile, since the realization of the virtual Ethernet does not depend on hardware Ethernet network card resources, the Ethernet driver hardware resource cost and dependence of the multi-core chip (for example, a SOC chip) can be reduced. In addition, since the shared memory is a high-efficiency inter-core communication mode, multiple cores can simultaneously access the same physical memory region (i.e., a shared memory space), and data interaction is performed by reading and writing the shared memory space, so that data can be directly transmitted in the memory, and the transmission speed is faster.

[0040] Since the Ethernet data interaction method and the multi-core chip provided by the application and the multi-core virtual Ethernet data interaction system provided by the application belong to the same inventive concept, the Ethernet data interaction method and the multi-core chip provided by the application at least have all the beneficial effects of the multi-core virtual Ethernet data interaction system provided by the application, and the beneficial effects of the multi-core virtual Ethernet data interaction method provided by the application are not repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 A block structure schematic diagram of the multi-core virtual Ethernet data interaction system provided by an embodiment of the application is shown in the figure.

[0042] Figure 2 A cross-core data interaction schematic diagram between MCU cores based on a virtual Ethernet is shown in the figure.

[0043] Figure 3 A cross-core data interaction schematic diagram between MCU cores and MPU cores based on a virtual Ethernet is shown in the figure.

[0044] Figure 4 An Ethernet data control flowchart in an MPU core is shown in the figure.

[0045] Figure 5 A flowchart schematic diagram of the multi-core virtual Ethernet data interaction method provided by an embodiment of the application is shown in the figure.

[0046] Figure 6 A control flowchart of Ethernet data in a core node is shown in the figure.

[0047] Figure 7 A control flowchart of Ethernet data in a remote node is shown in the figure.

[0048] Figure 8 A flowchart schematic diagram of the multi-core virtual Ethernet data interaction method provided by another embodiment of the application is shown in the figure.

[0049] In the figure, the reference signs are as follows:

[0050] Multi-core chip-100; first MCU core-110; first driver layer-111; first virtual Ethernet driver module-1111; first inter-core interaction driver module-1112; UDMA driver module-1113; first Ethernet protocol stack-112; first application layer-113; first virtual Ethernet interface module-114; second MCU core-120; MPU core-130; second driver layer-121, 131; second virtual Ethernet driver module-1211, 1311; second inter-core interaction driver module-1212, 1312; second Ethernet protocol stack-122, 132; second application layer-123, 133; second virtual Ethernet interface module-124; user space-134; kernel space-135; memory mapping module-1341; shared memory transmission module-140; built-in switch-150; external switch-200. DETAILED DESCRIPTION

[0051] The multi-core virtual Ethernet data interaction system, data interaction method and multi-core chip provided by the present application are further described in detail below in combination with the accompanying drawings and specific embodiments. The advantages and features of the present application will be more apparent according to the following description. It should be noted that the accompanying drawings are very simplified and all use non-precise proportions, only to facilitate, clearly assist in explaining the purpose provided by the present application. In order to make the purpose, features and advantages of the present application more apparent and easy to understand, please refer to the accompanying drawings. It should be understood that the structure, proportion, size, etc. shown in the drawings attached to the present specification are only used to cooperate with the content disclosed in the specification, for those skilled in the art to understand and read, and are not used to limit the defined conditions for implementing the present application. Any modification of structure, change of proportion relationship or adjustment of size, in the same or similar case as the effect and purpose that can be produced and achieved by the present application, should still fall within the scope of the technical content disclosed by the present application.

[0052] It is to be noted that the relative terms such as first and second and the like in this context are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. The singular forms "a", "an" and "the" include plural referents unless the context clearly dictates otherwise. The term "or" is generally employed in its sense including "and / or" unless the context clearly dictates otherwise. The term "and / or" means "and" or "or". The term "at least two" means "two or more" unless the context clearly dictates otherwise. The terms "first", "second", "third", etc. are used only to describe a certain feature, and do not imply relative importance or imply a number of the indicated technical features.

[0053] In addition, in the description of the specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. The illustrative expressions of the above terms in the specification do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any suitable manner in one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction with each other.

[0054] The core node idea of the present application is to provide a multi-core virtual Ethernet data interaction system, a data interaction method and a multi-core chip. Through virtual Ethernet, multi-core cross-core data interaction is realized, the Ethernet drive hardware resource cost of the multi-core chip can be reduced, and the data interaction rate and communication quality can be effectively improved.

[0055] It should be noted that the multi-core virtual Ethernet data interaction method provided by the application can be applied to the multi-core virtual Ethernet data interaction system provided by the application. The multi-core virtual Ethernet data interaction system provided by the application can be applied to a vehicle-mounted Ethernet communication system and can be configured on a vehicle. The vehicle can include a general motor vehicle, such as a sport utility vehicle (SUV), a bus, a truck, various commercial vehicles, and a hybrid vehicle, an electric vehicle, a plug-in hybrid electric vehicle, and the like. In addition, it should be noted that, as understood by those skilled in the art, the "virtual Ethernet" referred to in the application is independent of the hardware Ethernet network card driver and is irrelevant to the hardware network card interface, but is realized by pure software. It should also be noted that, as understood by those skilled in the art, the multi-core chip referred to in the application can be not only a multi-core SOC chip, but also other multi-core chips, such as a chip of a plurality of Ethernet controllers.

[0056] To achieve the above idea, the application provides a multi-core virtual Ethernet data interaction system, please refer to Figure 1 which is a block structure schematic diagram of the multi-core virtual Ethernet data interaction system provided by an embodiment of the application. As shown in Figure 1 , the multi-core virtual Ethernet data interaction system provided by the application includes a shared memory transmission module 140 and at least two cores (for example, a first MCU core 110, a second MCU core 120 and an MPU core 130 in Figure 1 ); wherein one of the cores (for example, the first MCU core 110 in Figure 1 ) is configured as a core node of a virtual Ethernet interaction system, and the remaining cores (for example, the second MCU core 120 and the MPU core 130 in Figure 1 ) are configured as remote nodes of the virtual Ethernet interaction system; the shared memory transmission module 140 is configured to allocate a corresponding shared memory space for each pair of remote nodes and core nodes performing data interaction, and to manage the shared memory space; the core node (for example, the first MCU core 110 in Figure 1 ) includes a first driver layer 111, a first Ethernet protocol stack 112 and a first application layer 113; the remote node (for example, the second MCU core 120 in Figure 1The second MCU core 120 and the MPU core 130 in the multi-core virtual Ethernet data interaction system) comprise a second driver layer 121 / 131 and a second application layer 123 / 133; the first driver layer 111 comprises a first virtual Ethernet driver module 1111 and a first inter-core interaction driver module 1112, the second driver layer 121 / 131 comprises a second virtual Ethernet driver module 1211 / 1311 and a second inter-core interaction driver module 1212 / 1312, the first virtual Ethernet driver module 1111 and the second virtual Ethernet driver module 1211 / 1311 are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card, and the first inter-core interaction driver module 1112 and the second inter-core interaction driver module 1212 / 1312 are configured to read or write Ethernet data in the corresponding shared memory space.

[0057] Therefore, the multi-core virtual Ethernet data interaction system provided by the application can realize multi-core cross-core inter-core data interaction through a virtual Ethernet by setting a virtual Ethernet driver module and an inter-core interaction driver module in the driver layer of each core of the multi-core chip 100 and allocating, through the shared memory transmission module 140, a shared memory space accessible by each of a pair of remote nodes and core nodes performing data interaction, thereby reducing the Ethernet driver hardware resource cost of the multi-core chip 100 and effectively improving the data interaction rate and communication quality. Since the virtual Ethernet is implemented by pure software, it is reusable, portable and highly compatible, and is suitable for MCU (Micro Controller Unit) cores and MPU (Micro Processor Unit) cores, thereby reducing the code development cost. At the same time, since the implementation of the virtual Ethernet does not depend on hardware Ethernet network card resources, the Ethernet driver hardware resource cost and dependence of the multi-core chip 100 (for example, a SOC chip) can be reduced. In addition, since the shared memory is a high-efficiency inter-core communication mode, multiple cores can simultaneously access the same physical memory region (i.e., the shared memory space), and data interaction is performed by reading and writing the shared memory space, so that data can be directly transmitted in the memory, thereby achieving faster transmission.

[0058] It should be noted that, although Figure 1 It should be noted that, although the multi-core virtual Ethernet data interaction system comprises three cores, i.e., the first MCU core 110, the second MCU core 120 and the MPU core 130, and the first MCU core 110 is taken as an example for illustration, this does not constitute a limitation on the application, and in other embodiments, the multi-core virtual Ethernet data interaction system can comprise two, four or more cores, and the application does not limit the specific types of the cores and the selection of the core as a core node.

[0059] Specifically, the MCU core is an R core (i.e. embedded real-time processor core) under the ARM (Advanced RISC Machines, i.e. Reduced Instruction Set Computer) architecture, which is suitable for processing real-time control tasks, and is based on the FreeRTOS system (FreeRTOS system is a kind of mini real-time operating system) or Autosar (Automotive Open System Architecture) OS to realize function development. The MPU core 130 is an application processing core in the ARM architecture (RISC architecture), which is called A core, and is usually used for high-performance computing and execution of general-purpose operating systems, for example, software functions and applications can be developed based on the Linux operating system. The MCU core can be configured as a remote node of a virtual Ethernet real-time operating system, and the MPU core 130 can be configured as a remote node of a virtual Ethernet Linux operating system

[0060] Further, the first Ethernet protocol stack 112 and the second Ethernet protocol stack 122 / 132 each include a network layer and a transport layer.

[0061] Further, the shared memory transmission module 140 is responsible for managing the shared memory space in addition to allocating corresponding shared memory space for each pair of the remote node and the core node for data interaction. The number of shared memory spaces managed by the shared memory transmission module 140 is the same as the number of remote nodes, for example, when the number of remote nodes is 2, the shared memory transmission module 140 manages two pieces of shared memory space, one of which is used for Ethernet data interaction between the core node and one of the remote nodes, and the other is used for Ethernet data interaction between the core node and the other remote node.

[0062] It should be noted that, as can be understood by those skilled in the art, the core node assumes the central hub role in the virtual Ethernet interactive link, each Ethernet node in the network (including the remote node and the external Ethernet node) directly communicates with the core node, and the communication between other remote nodes is also routed through the core node. It should also be noted that, as can be understood by those skilled in the art, the first virtual Ethernet drive module 1111, the second virtual Ethernet drive module 1211 / 1311, the first inter-core interactive drive module 1112 and the second inter-core interactive drive module 1212 / 1312 are all implemented by pure software, the first virtual Ethernet drive module 1111 and the second virtual Ethernet drive module 1211 / 1311 provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet card through a virtual Ethernet driver, and the first inter-core interactive drive module 1112 and the second inter-core interactive drive module 1212 / 1312 read or write Ethernet data in a shared memory space through an inter-core interactive driver. In addition, it should be noted that, as can be understood by those skilled in the art, the functions of the first virtual Ethernet drive module 1111 and the second virtual Ethernet drive module 1211 / 1311 in the application correspond to the L2 layer (data link layer) in the OSI model (Open Systems Interconnection Reference Model, a conceptual model for describing computer network architecture), and the first virtual Ethernet drive module 1111 and the second virtual Ethernet drive module 1211 / 1311 can be abstracted as a software interface independent module and can be implemented based on various drivers.

[0063] Please continue to refer to Figure 1 As Figure 1 shown, in some exemplary embodiments, the virtual Ethernet interactive system further includes a built-in switch 150 and an external switch 200, the first drive layer 111 further includes a UDMA drive module 1113, the built-in switch 150 is connected with the external switch 200 (specifically, can be connected through a T1 port SGMII module), the external switch 200 is configured to receive Ethernet data from an external Ethernet node or an external diagnostic device and transmit to the built-in switch 150, or transmit Ethernet data to a corresponding external Ethernet node or external diagnostic device; the UDMA drive module 1113 is configured to read Ethernet data from the built-in switch 150 or transmit Ethernet data to the built-in switch 150.

[0064] Specifically, the built-in switch 150 is an Ethernet driver hardware resource integrated into the multi-core chip 100 (e.g., a multi-core SOC chip). It is an external Ethernet device shared among different cores within the multi-core chip 100. The built-in switch 150 can be configured and software-driven at the core node, and it performs Ethernet data routing functions at the L2 (data link layer). The external switch 200 undertakes the L2 (data link layer) Ethernet routing responsibility for Ethernet data interaction between external Ethernet nodes and the multi-core chip 100. It can classify VLANs (Virtual Local Area Networks) based on the IP addresses of different Ethernet nodes. External Ethernet nodes can transmit and interact with remote nodes via the external switch 200, the built-in switch 150, the core node, and other means. Furthermore, external diagnostic devices can also use the Tx port of the external switch 200, through the built-in switch 150 and the core node, to forward Ethernet diagnostic request messages to remote nodes to achieve diagnostic functions.

[0065] Furthermore, one EMAC (Enet Media Access Control) port of the built-in switch 150 is connected to the MAC port of the external switch 200. Ethernet data from external Ethernet nodes or external diagnostic devices will pass through the external switch 200 to reach the host port memory space of the built-in switch 150. The UDMA driver module 1113 can provide a UDMA (Undefined Direct Memory Access) driver. The essence of the UDMA driver is still DMA (Direct Memory Access), which can directly copy data from one address space to another without CPU intervention. It provides interactive data transmission between peripherals and memory or between memory devices. Its function is to solve the problem of excessive CPU (Central Processing Unit) resource consumption for large data transmissions, saving a lot of CPU resources and making it more suitable for interactive application scenarios of Ethernet data (large packet data volume and long packet length).

[0066] Please continue to refer to this. Figure 1 ,like Figure 1 As shown, in some exemplary embodiments, the core node (e.g. Figure 1The first MCU core 110 also includes a first virtual Ethernet interface module 114 located between the first driver layer 111 and the first Ethernet protocol stack 112. The first virtual Ethernet interface module 114 is configured to provide a unified Ethernet network interface. Therefore, by setting up the first virtual Ethernet interface module 114 to connect the lower-level driver (i.e., the first driver layer 111) and the upper-level Ethernet protocol stack (the first Ethernet protocol stack 112), the development cost of adding a hardware Ethernet network card is reduced, Ethernet communication resources are expanded, and there is no need to design a separate network communication protocol, which shortens the development cycle. It also improves code reusability, is compatible with both the MCU core and the MPU core 130, increases software maintainability, and expands the Ethernet communication resources of the multi-core chip 100 (e.g., a multi-core SOC chip).

[0067] Specifically, the first virtual Ethernet interface module 114 does not rely on the sending and receiving of the underlying driver (first driver layer 111) and the upper-layer protocol stack (first Ethernet protocol stack 112). It only needs to complete the standard interface encapsulation of data and can be abstracted as an independent module for data access between different clients and servers. The first virtual Ethernet interface module 114 can be adapted to the standard Ethernet protocol stack at the upper layer and to different drivers at the lower layer, increasing its scalability and reusability.

[0068] Please continue to refer to this. Figure 1 ,like Figure 1 As shown, in some exemplary embodiments, the remote node (e.g. Figure 2 The second MCU core 120 also includes a second virtual Ethernet interface module 124 disposed between the second driver layer 121 and the second Ethernet protocol stack 122. Thus, by setting the second virtual Ethernet interface module 124 between the second driver layer 121 and the second Ethernet protocol stack 122, the second driver layer 121 and the second Ethernet protocol stack 122 can be connected, further reducing the development cost of adding a hardware Ethernet network card, expanding Ethernet communication resources, and eliminating the need for separate network communication protocol design, thus shortening the development cycle. It also improves code reusability, is compatible with both the MCU core and MPU core 130, increases software maintainability, and expands the Ethernet communication resources of the multi-core chip 100 (e.g., a multi-core SOC chip).

[0069] It should be noted that, as can be understood by those skilled in the art, the second virtual Ethernet interface module 124 does not rely on the sending and receiving of the second driver layer 121 and the second Ethernet protocol stack 122 to complete the standard interface encapsulation of data, and can be abstracted as an independent module and applied to data access between different clients and servers. The second virtual Ethernet interface module 124 can be adapted to a standard Ethernet protocol stack on the upper side and to different drivers on the lower side, thereby increasing the scalability and reusability thereof.

[0070] Please continue to refer to Figure 2 which is a schematic diagram of cross-core data interaction between MCU cores implemented based on a virtual Ethernet according to an embodiment of the present application. As shown in Figure 1 , the core node is taken as the first MCU core 110, and the remote node is taken as the second MCU core 120. The uplink data interaction process includes that the second MCU core 120 can read Ethernet data from a shared memory space (a virtual Ethernet message queue) shared by the first MCU core 110 and the second MCU core 120 through the second inter-core interaction driver module 1212 / 1312 of the second MCU core 120, and transmit the read Ethernet data to the upper-layer Ethernet second virtual Ethernet interface module 124 through the second virtual Ethernet driver module 1211. Then, after being processed by the second Ethernet protocol stack 122, the Ethernet data is transmitted to the second application layer 123, thereby completing uplink data interaction implemented based on a virtual Ethernet. The downlink data interaction process includes that the second application layer 123 converts signal encapsulation into Ethernet data, transmits the Ethernet data to the second virtual Ethernet driver module 1211 through the second Ethernet protocol stack 122 and the Ethernet second virtual Ethernet interface module 124, and then writes the Ethernet data into the shared memory space (the virtual Ethernet message queue) shared by the first MCU core 110 and the second MCU core 120 through the second inter-core interaction driver module 1212. The first MCU core 110 reads the Ethernet data stored in the shared memory space through the first inter-core interaction driver module 1112, and then converts the read Ethernet data to a host port of the built-in switch 150 through the UDMA driver module 1113, and routes the Ethernet data to a remote external Ethernet node or an external diagnostic device through the external switch 200, thereby completing data interaction.

[0071] Please continue to refer to Figure 1 , as shown in Figure 3 , in some exemplary embodiments, the remote node includes a user space 134 and a kernel space 135. The kernel space 135 includes the second driver layer 131 and the second Ethernet protocol stack 132, and the user space 134 includes the second application layer 133 and a memory mapping module 1341. The memory mapping module 1341 is configured to perform shared memory address mapping.

[0072] Please continue to refer to Figure 3 , which is a schematic diagram of cross-core data interaction between MCU core and MPU core 130 based on virtual Ethernet provided by an embodiment of the application. As shown in Figure 4 , taking the core node as the first MCU core 110 and the remote node as the MPU core 130 as an example, when an external Ethernet node needs to perform Ethernet data interaction with the MPU core 130 in the multi-core chip 100 (such as a multi-core SOC chip), the Ethernet data sent by the external Ethernet node or external diagnostic device is transferred to the host port after passing through the external switch 200 and the built-in switch 150, and then the first MCU core 110 carries the Ethernet data to the host port memory space through the UDMA drive module 1113, and transmits the Ethernet data to the first virtual Ethernet drive module 1111, and then copies the Ethernet data to the shared memory space shared by the first MCU core 110 and the MPU core 130 through the first inter-core interaction drive module 1112, and then notifies the MPU core 130. The kernel space of the MPU core 130 needs to complete the drive of the virtual Ethernet card (create and start the virtual Ethernet card through the second virtual Ethernet drive module 1311), and then create an inter-core interaction process and an address mapping adaptation process of the virtual Ethernet device in the user space 134 (perform shared memory address mapping). After reading the Ethernet data from the shared memory space (virtual Ethernet message queue) shared by the first MCU core 110 and the MPU core 130 through the second inter-core interaction drive module 1312 of the MPU core 130 (remote node), the Ethernet data is encapsulated and processed by the second Ethernet protocol stack 132 of the MPU core 130 and then forwarded to the user space 134. At this time, the receiving task thread created by the user space 134 establishes the socket API application interface based on Ethernet, and then transmits the Ethernet data to the upper Ethernet application (second application layer 133) through the socket API application interface, and completes the entire data reception interaction process.

[0073] Please continue to refer to Figure 4 , which is a schematic diagram of cross-core data interaction between MCU core and MPU core 130 based on virtual Ethernet provided by an embodiment of the application. As shown in Figure 5As shown, the control flow of the Ethernet data in the MPU core 130 is as follows: 1) the second virtual Ethernet driver module 1311 in the MPU core 130 creates a virtual Ethernet card through a file descriptor / dev / net / tun; 2) attribute information is set for the created virtual Ethernet card; 3) the virtual Ethernet card is started; 4) a shared memory data area is mapped, which is allocated from the shared memory space of the core node (for example, the first MCU core 110) and the MPU core 130; 5) a receiving / sending handle is created; 6) a data pool handle is created and associated with the allocated shared memory data area; 7) a receiving / sending task thread is created: the responsibility of the receiving task thread is to poll the descriptor of the received frame from the virtual Ethernet message queue, if the descriptor exists, read the data in the virtual Ethernet message queue through the second inter-core interaction driver module 1312, and copy it to the second Ethernet protocol stack 132 based on the Linux system through the virtual Ethernet card, and then upload it to the upper layer application (the second application layer 133); the responsibility of the sending task thread is to poll the second Ethernet protocol stack 132 based on the Linux system through the virtual Ethernet card, check whether there is a sending frame, if there is, copy the sending frame to the allocated shared memory data area through the second inter-core interaction driver module 1312, wait for the core node (for example, the first MCU core 110) to read, and complete the data interaction. In the case of failure, any process in the above control flow, the CPU releases the resource, the program abnormally exits, and then the current thread or process is closed.

[0074] It should be noted that, as can be understood by those skilled in the art, when data interaction needs to be realized between two remote cores (the first remote node and the second remote node, for example, the second MCU core 120 and the MPU core 130) of the multi-core chip 100 (for example, a multi-core SOC chip) based on a virtual Ethernet, the core node also needs to be used as a central hub to forward the data for interaction. Specifically, the core node (the first MCU core 110) reads Ethernet data from a shared memory space (a virtual Ethernet queue) shared by the core node (for example, the first MCU core 110) and the first remote node (for example, the second MCU core 120) through the first inter-core interaction driver module 1112, and copies the read Ethernet data to a virtual Ethernet queue in a shared memory space shared by the core node (for example, the first MCU core 110) and the second remote node (for example, the MPU core 130) (this queue is used for data interaction between the core node (for example, the first MCU core 110) and the second remote node (for example, the MPU core 130)) through the first inter-core interaction driver module 1112; then the second remote node (for example, the MPU core 130) is notified that the kernel space of the second remote node (for example, the MPU core 130) needs to complete the driving of the virtual Ethernet card (a virtual Ethernet card is created and started through the second virtual Ethernet driver module 1311), and then an inter-core interaction process and an address mapping adaptation process (shared memory address mapping is performed) of the virtual Ethernet device are created in the user space 134. After the second inter-core interaction driver module 1312 of the second remote node (for example, the MPU core 130) reads data from the virtual Ethernet queue in the shared memory space shared by the core node (for example, the first MCU core 110) and the second remote node (for example, the MPU core 130), the data is forwarded to the user space 134 after encapsulation processing by the second Ethernet protocol stack 132 of the second remote node (for example, the MPU core 130), at this time, the socket API application interface based on Ethernet is established by the receiving task thread created by the user space 134, and then the Ethernet data is transmitted to the upper Ethernet application (the second application layer 133) through the socket API application interface, and the entire data receiving interaction process is completed.

[0075] Based on the same inventive concept, the application also provides a multi-core virtual Ethernet data interaction method applied to the multi-core virtual Ethernet data interaction system described above. Please refer to Figure 5 , which is a flowchart of the multi-core virtual Ethernet data interaction method provided by an embodiment of the application. As Figure 6 shown, the multi-core virtual Ethernet data interaction method provided by the embodiment includes the following steps:

[0076] In step S110, the first inter-core interaction driving module 1112 in the core node writes the first Ethernet data into the corresponding shared memory space.

[0077] In step S120, the second inter-core interaction driving module 1212 / 1312 in the remote node reads the first Ethernet data from the shared memory space.

[0078] In step S130, the second virtual Ethernet driving module 1211 / 1311 in the remote node transmits the first Ethernet data to the second Ethernet protocol stack 122 / 132 in the remote node for processing.

[0079] In step S140, the second Ethernet protocol stack 122 / 132 in the remote node transmits the processed first Ethernet data to the second application layer 123 / 133 in the remote node.

[0080] Thus, the multi-core virtual Ethernet data interaction method provided by the application realizes multi-core cross-core inter-core data interaction through a virtual Ethernet, thereby reducing the Ethernet driving hardware resource cost of the multi-core chip 100 and effectively improving the data interaction rate and communication quality. Since the virtual Ethernet is realized through pure software, it is reusable, portable and highly compatible, and is suitable for MCU (Micro Controller Unit) cores and MPU (Micro Processor Unit) cores, thereby reducing the code repeated development cost. Meanwhile, since the implementation of the virtual Ethernet does not need to depend on hardware Ethernet card resources, the Ethernet driving hardware resource cost and dependence of the multi-core chip 100 (for example, a SOC chip) can be reduced. In addition, since the shared memory is a high-efficiency inter-core communication mode, multiple cores can simultaneously access the same physical memory region (i.e., the shared memory space), and data interaction is realized through reading and writing the shared memory space, so that data can be directly transmitted in the memory, and the transmission speed is faster.

[0081] In some exemplary embodiments, the multi-core virtual Ethernet data interaction method provided by the application further includes:

[0082] The UDMA driving module 1113 in the core node receives Ethernet data from an external Ethernet node or an external diagnostic device uploaded through the external switch 200 and the built-in switch 150 in sequence;

[0083] The core node processes the Ethernet data through the first virtual Ethernet driving module 1111 and the first Ethernet protocol stack 112 in sequence to obtain the first Ethernet data.

[0084] Specifically, refer to Figure 6This is a control flowchart for Ethernet data within a core node provided in an embodiment of the present invention. Figure 7 As shown, Ethernet data from outside the multi-core chip 100 (e.g., a multi-core SOC chip) arrives at the host port via the EMAC ports of the external switch 200 and the internal switch 150. The subsequent control flow is as follows: 1) The UDMA driver module 1113 in the core node reads the Ethernet data from outside the multi-core chip 100 (e.g., a multi-core SOC chip) from the host port; 2) It determines whether there is available buffer space in the receive queue of the UDMA driver module 1113 (which can be used cyclically). If there is available buffer space, the received Ethernet data is uploaded to the virtual Ethernet interface module for processing through the first virtual Ethernet driver module 1111, and the received Ethernet data is copied to the available buffer. 3) The first Ethernet protocol stack 112 receives Ethernet data from the virtual Ethernet interface module and processes it, stores the processed Ethernet data in the allocated cache space, and notifies the receiving process in the first application layer 113; 4) The first inter-core interaction driver module 1112 is called to receive Ethernet data; 5) It is determined whether there is available space in the shared memory space of the corresponding remote node. If there is, the shared memory data area of ​​the corresponding remote node is allocated in the shared memory space. If not, the shared memory space is waited for to be released; 6) The received Ethernet data is copied to the allocated shared memory data area through the first inter-core interaction driver module 1112, and the remote node is notified to receive and process it.

[0085] Please continue to refer to this. Figure 7 This is a control flowchart for Ethernet data within a remote node provided in an embodiment of the present invention. Figure 8 As shown, if the remote node is the second MCU core 120, taking data uplink as an example, the Ethernet data control flow within the remote node is as follows: 1) The second inter-core interaction driver module 1212 within the remote node reads Ethernet data from the shared memory data area copied from the core node; 2) The shared memory transmission module 140 allocates cache space in the shared memory space; 3) The second inter-core interaction driver module 1212 copies the read Ethernet data into the allocated cache space and releases the shared memory data area; 4) The second inter-core interaction driver module 1212 uploads the read Ethernet data to the second virtual Ethernet interface module 124 for processing through the second virtual Ethernet driver module 1211, and the second virtual Ethernet interface module 124 uploads the processed Ethernet data to the second Ethernet protocol stack 122; 5) After processing the received Ethernet data, the second Ethernet protocol stack 122 transmits it to the second application layer 123.

[0086] In some exemplary embodiments, the multi-core virtual Ethernet data interaction method provided by the present embodiment further comprises:

[0087] The second inter-core interaction driver module 1212 / 1312 in the remote node writes the second Ethernet data issued by the second application layer 123 / 133, the second Ethernet protocol stack 122 / 132 and the second virtual Ethernet driver module 1211 / 1311 in sequence into the shared memory space;

[0088] The first inter-core interaction driver module 1112 in the core node reads the second Ethernet data from the shared memory space;

[0089] The UDMA driver module 1113 in the core node sends the second Ethernet data to the built-in switch 150 and transmits the second Ethernet data to the corresponding external Ethernet node or external diagnostic device through the external switch 200.

[0090] Based on the same inventive concept, the present application also provides another multi-core virtual Ethernet data interaction method applied to the multi-core virtual Ethernet data interaction system described above. Please refer to Figure 8 which is a flowchart of the multi-core virtual Ethernet data interaction method provided by another embodiment of the present application, as shown in Figure 1 The multi-core virtual Ethernet data interaction method provided by the present embodiment comprises the following steps:

[0091] In step S210, the first inter-core interaction driver module 1112 in the core node reads fourth Ethernet data from a first shared memory space and copies the fourth Ethernet data into a second shared memory space, wherein the first shared memory space is a shared memory space for data interaction between the core node and a first remote node, the second shared memory space is a shared memory space for data interaction between the core node and a second remote node, and the fourth Ethernet data is written into the first shared memory space by a second inter-core interaction driver module 1212 / 1312 in the first remote node.

[0092] In step S220, the second inter-core interaction driver module 1312 / 1212 in the second remote node reads the fourth Ethernet data from the second shared memory space.

[0093] In step S230, the second virtual Ethernet driver module 1311 / 1211 in the second remote node transmits the fourth Ethernet data to the second Ethernet protocol stack 132 / 122 in the second remote node for processing.

[0094] Step S240: The second application layer 133 / 123 in the second remote node receives the processed fourth Ethernet data.

[0095] Therefore, the multi-core virtual Ethernet data interaction method provided by this invention realizes cross-core and inter-core data interaction through virtual Ethernet, thereby reducing the Ethernet driver hardware resource cost of the multi-core chip 100 and effectively improving the data interaction rate and communication quality. Since the virtual Ethernet is implemented purely in software, it is reusable, portable, and highly compatible, adaptable to MCU (Micro Controller Unit) cores and MPU (Micro Processor Unit) cores, reducing the cost of repetitive code development. Simultaneously, since the implementation of virtual Ethernet does not rely on hardware Ethernet network card resources, it can reduce the Ethernet driver hardware resource cost and dependency of the multi-core chip 100 (e.g., SOC chip). Furthermore, since shared memory is an efficient inter-core communication method, multiple cores can simultaneously access the same physical memory region (i.e., shared memory space) and perform data interaction by reading and writing to this shared memory space, allowing data to be directly transmitted in memory, resulting in faster transmission speeds.

[0096] Based on the same inventive concept, this invention also provides a multi-core chip 100, please refer to [reference needed]. Figure 1 ,like Figure 1 As shown, the multi-core chip 100 provided by the present invention includes a shared memory transmission module 140 and at least two cores, one of which is configured as a core node of a virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system; the shared memory transmission module 140 is configured to allocate corresponding shared memory space for each pair of remote nodes and the core node that perform data interaction, and to manage the shared memory space; the core node includes a first driver layer 111, a first Ethernet protocol stack 112, and a first application layer 113; the remote nodes include a second driver layer 121 / 131, a second Ethernet protocol stack 122 / 132, and a second application layer 123 / 134. 133; The first driver layer 111 includes a first virtual Ethernet driver module 1111 and a first inter-core interaction driver module 1112, and the second driver layer 121 / 131 includes a second virtual Ethernet driver module 1211 / 1311 and a second inter-core interaction driver module 1212 / 1312. The first virtual Ethernet driver module 1111 and the second virtual Ethernet driver module 1211 / 1311 are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card. The first inter-core interaction driver module 1112 and the second inter-core interaction driver module 1212 / 1312 are configured to read or write Ethernet data in the corresponding shared memory space.

[0097] Thus, the multi-core chip 100 provided by the present application can realize multi-core cross-core data interaction through a virtual Ethernet, thereby reducing the Ethernet drive hardware resource cost of the multi-core chip 100 and effectively improving the data interaction rate and communication quality. Since the virtual Ethernet is realized through pure software, it is reusable, portable and highly compatible, and is suitable for MCU (Micro Controller Unit) cores and MPU (Micro Processor Unit) cores, thereby reducing the code repeated development cost. Meanwhile, since the implementation of the virtual Ethernet does not need to depend on hardware Ethernet card resources, the Ethernet drive hardware resource cost and dependence of the multi-core chip 100 (for example, a SOC chip) can be reduced. In addition, since the shared memory is a high-efficiency inter-core communication mode, multiple cores can simultaneously access the same physical memory region (i.e., a shared memory space), and data interaction can be realized through reading and writing the shared memory space, so that data can be directly transmitted in the memory, and the transmission speed is faster.

[0098] Please continue to refer to Figure 1 As shown in ​ some exemplary embodiments, the multi-core chip 100 provided by the present application further includes a built-in switch 150, and the first drive layer 111 further includes a UDMA drive module 1113. The built-in switch 150 is configured to be connected with the external switch 200, and receive Ethernet data from an external Ethernet node or an external diagnostic device transmitted by the external switch 200, or transmit the Ethernet data to the corresponding external Ethernet node or external diagnostic device through the external switch 200. The UDMA drive module 1113 is configured to read the Ethernet data from the built-in switch 150, or transmit the Ethernet data to the built-in switch 150.

[0099] In summary, compared with the prior art, the multi-core virtual Ethernet data interaction system, data interaction method and multi-core chip 100 provided by the present application have the following beneficial effects:

[0100] The application can realize multi-core cross-core inter-core data interaction through virtual Ethernet, and further can reduce Ethernet drive hardware resource cost of the multi-core chip 100, and effectively improve data interaction rate and communication quality. Since the virtual Ethernet is realized through pure software, it is reusable, portable and compatible, and is suitable for MCU (Micro Controller Unit) core and MPU (Micro Processor Unit) core, and reduces code repeated development cost. At the same time, since the implementation of the virtual Ethernet does not need to depend on hardware Ethernet card resources, the Ethernet drive hardware resource cost and dependence of the multi-core chip 100 (for example, a SOC chip) can be reduced. In addition, since the shared memory is a high-efficiency inter-core communication mode, multiple cores can access the same physical memory region (i.e. shared memory space) at the same time, and data interaction is realized through reading and writing the shared memory space, so that data can be directly transmitted in the memory, and the transmission speed is faster.

[0101] It should be noted that the apparatus and method disclosed in the embodiments herein can also be implemented by other means. The apparatus embodiments described above are only illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments herein. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for executing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, the functional modules in each embodiment herein can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0102] It should also be noted that the foregoing description is only illustrative of the preferred embodiments of the application and not restrictive, and that any modifications or variations that can be made by those skilled in the art based on the teachings contained herein are considered to fall within the scope of the present application. It is therefore apparent that there can be many modifications and variations in the application described herein without departing from the spirit and scope of the application. Accordingly, the application is to be understood in an illustrative way and it is intended to be limited only as described by the appended claims and their equivalents.

Claims

1. A multi-core virtual Ethernet data interaction system, characterized in that, Includes a shared memory transfer module and at least two kernels; One of the kernels is configured as the core node of the virtual Ethernet interaction system, and the remaining kernels are configured as remote nodes of the virtual Ethernet interaction system. The core node assumes the role of the central hub in the virtual Ethernet interaction link. Each remote node and external Ethernet node in the network communicates directly with the core node, and communication between the remote nodes is routed through the core node. The shared memory transmission module is configured to allocate corresponding shared memory space for each pair of remote nodes and core nodes that perform data interaction, and to manage the shared memory space. The core node includes a first driver layer, a first Ethernet protocol stack, and a first application layer; The remote node includes a second driver layer, a second Ethernet protocol stack, and a second application layer; The first driver layer includes a first virtual Ethernet driver module and a first inter-core interaction driver module, and the second driver layer includes a second virtual Ethernet driver module and a second inter-core interaction driver module. The first virtual Ethernet driver module, the first inter-core interaction driver module, the second virtual Ethernet driver module, and the second inter-core interaction driver module are all implemented in pure software. The first virtual Ethernet driver module and the second virtual Ethernet driver module are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card. The first inter-core interaction driver module and the second inter-core interaction driver module are configured to read or write Ethernet data in the corresponding shared memory space through the inter-core interaction driver.

2. The multi-core virtual Ethernet data interaction system according to claim 1, characterized in that, The virtual Ethernet interaction system further includes a built-in switch and an external switch. The first driver layer further includes a UDMA driver module. The built-in switch is connected to the external switch. The external switch is configured to receive Ethernet data from an external Ethernet node or an external diagnostic device and transmit it to the built-in switch, or transmit Ethernet data to the corresponding external Ethernet node or external diagnostic device. The UDMA driver module is configured to read Ethernet data from the built-in switch or transmit Ethernet data to the built-in switch.

3. The multi-core virtual Ethernet data interaction system according to claim 1, characterized in that, The core node also includes a first virtual Ethernet interface module located between the first driver layer and the first Ethernet protocol stack, the first virtual Ethernet interface module being configured to provide a unified Ethernet network interface.

4. The multi-core virtual Ethernet data interaction system according to claim 1, characterized in that, The remote node also includes a second virtual Ethernet interface module located between the second driver layer and the second Ethernet protocol stack, the second virtual Ethernet interface module being configured to provide a unified Ethernet network interface.

5. A multi-core virtual Ethernet data interaction method, applied to the multi-core virtual Ethernet data interaction system according to any one of claims 1 to 4, characterized in that, The data interaction method includes: The first inter-core interaction driver module in the core node writes the first Ethernet data into the corresponding shared memory space; The second inter-core interaction driver module in the remote node reads the first Ethernet data from the shared memory space; The second virtual Ethernet driver module in the remote node transmits the first Ethernet data to the second Ethernet protocol stack in the remote node for processing. The second Ethernet protocol stack in the remote node transmits the processed first Ethernet data to the second application layer in the remote node.

6. The multi-core virtual Ethernet data interaction method according to claim 5, characterized in that, The data interaction method further includes: The second inter-core interaction driver module in the remote node will sequentially write the second Ethernet data sent by the second application layer, the second Ethernet protocol stack, and the second virtual Ethernet driver module into the shared memory space; The first inter-core interaction driver module in the core node reads the second Ethernet data from the shared memory space; The UDMA driver module in the core node sends the second Ethernet data to the built-in switch, and then transmits it through the external switch to the corresponding external Ethernet node or external diagnostic device.

7. The multi-core virtual Ethernet data interaction method according to claim 5, characterized in that, The data interaction method further includes: The UDMA driver module in the core node receives third Ethernet data from external Ethernet nodes or external diagnostic devices, which are uploaded sequentially through an external switch and an internal switch. The first virtual Ethernet driver module in the core node transmits the third Ethernet data sequentially to the first virtual Ethernet interface module and the first Ethernet protocol stack in the core node for processing in order to obtain the first Ethernet data.

8. A multi-core virtual Ethernet data interaction method, applied to the multi-core virtual Ethernet data interaction system according to any one of claims 1 to 4, characterized in that, The data interaction method includes: The first inter-core interaction driver module in the core node reads the fourth Ethernet data from the first shared memory space and copies the fourth Ethernet data to the second shared memory space. The first shared memory space is the shared memory space for data interaction between the core node and the first remote node, and the second shared memory space is the shared memory space for data interaction between the core node and the second remote node. The fourth Ethernet data is written into the first shared memory space by the second inter-core interaction driver module in the first remote node. The second inter-core interaction driver module in the second remote node reads the fourth Ethernet data from the second shared memory space; The second virtual Ethernet driver module in the second remote node transmits the fourth Ethernet data to the second Ethernet protocol stack in the second remote node for processing; The second application layer in the second remote node receives the processed fourth Ethernet data.

9. A multi-core chip, characterized in that, The multi-core chip includes a shared memory transmission module and at least two cores, one of which is configured as the core node of the virtual Ethernet interaction system, and the remaining cores are configured as remote nodes of the virtual Ethernet interaction system. The core node assumes the role of the central hub in the virtual Ethernet interaction link. Each remote node in the network and external Ethernet node communicate directly with the core node, and communication between the remote nodes is routed through the core node. The shared memory transmission module is configured to allocate corresponding shared memory space for each pair of remote nodes and core nodes that perform data interaction, and to manage the shared memory space. The core node includes a first driver layer, a first Ethernet protocol stack, and a first application layer; The remote node includes a second driver layer, a second Ethernet protocol stack, and a second application layer; The first driver layer includes a first virtual Ethernet driver module and a first inter-core interaction driver module, and the second driver layer includes a second virtual Ethernet driver module and a second inter-core interaction driver module. The first virtual Ethernet driver module, the first inter-core interaction driver module, the second virtual Ethernet driver module, and the second inter-core interaction driver module are all implemented in pure software. The first virtual Ethernet driver module and the second virtual Ethernet driver module are configured to provide a standard Ethernet protocol stack virtual network interface or create a virtual Ethernet network card. The first inter-core interaction driver module and the second inter-core interaction driver module are configured to read or write Ethernet data in the corresponding shared memory space through the inter-core interaction driver.

10. The multi-core chip according to claim 9, characterized in that, The multi-core chip also includes a built-in switch, and the first driver layer also includes a UDMA driver module. The built-in switch is configured to connect to an external switch and receive Ethernet data from an external Ethernet node or an external diagnostic device transmitted by the external switch, or transmit Ethernet data to the corresponding external Ethernet node or external diagnostic device through the external switch. The UDMA driver module is configured to read Ethernet data from the built-in switch or transmit Ethernet data to the built-in switch.

Citation Information

Patent Citations

  • Vehicle body electrical network architecture based on remote virtual shared memory mechanism

    CN113360293A

  • Heterogeneous multi-core chip and Ethernet message acquisition and storage method and device

    CN117201431A