Communication system of VETH virtual network card based on AMP multi-core heterogeneous

By adopting AMP-based VETH virtual network card communication system in multi-core heterogeneous SoC processors, using shared memory and virtual network card technology, the problem of low communication efficiency between cores is solved, and efficient network data parallel computing and real-time packet exchange are realized. , give full play to the performance of multi-core heterogeneous platforms.

CN119094479APending Publication Date: 2024-12-06SUZHOU XINSHINUO SEMICON EQUIP CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411193064.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In multi-core heterogeneous SoC processor systems, the inter-core communication efficiency is low, making it difficult to fully utilize the performance advantages of multi-core heterogeneous platforms.

Method used

The VETH virtual network cartoon communication system based on AMP multi-core heterogeneous is adopted to realize IPC communication through shared memory and mailboxes, and use rpmsg and virtio buses for data transmission and notification, realizing efficient data sharing and network data packet exchange between cores.

Benefits of technology

It realizes communication and collaborative work between different software components, fully utilizes the performance advantages of multi-core heterogeneous platforms, improves the efficiency of parallel network data computing and real-time network data packet switching, and solves the problem of inter-core communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094479A_ABST
    Figure CN119094479A_ABST
Patent Text Reader

Abstract

The invention provides a communication system based on an AMP multi-core heterogeneous VETH virtual network card, the communication system comprises a first core, a second core, a shared memory and a mailbox, the first core is internally provided with a physical network card and a first virtual network card which communicate with each other, the second core is internally provided with a second virtual network card, and the first virtual network card and the second virtual network card communicate with each other. The first core directly accesses an external network through the physical network card, and the second core communicates with the first virtual network card through the second virtual network card, the shared memory and the mailbox and further communicates with the physical network card to indirectly access the external network. According to the communication system of the VETH virtual network card based on the AMP multi-core heterogeneous, different software components can communicate with one another and work cooperatively based on IPC communication of a shared memory, so that the purposes of data sharing, event notification, state synchronization and system expansion are achieved. Based on a virtual network card, efficient network data parallel computing and real-time network data packet exchange are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of SoC processors, and in particular to a communication system of a VETH virtual network card based on AMP multi-core heterogeneity. Background Art

[0002] SoC stands for System-on-a-chip. SoC processors are also called system-on-chips or system-on-chips, which include at least one core (processor). With the development of technology and the needs of applications, SoC processors have begun to adopt multi-core heterogeneous architectures. However, in multi-core heterogeneous processor systems, it is necessary to solve the problem of inter-core communication in order to give full play to the performance advantages of multi-core heterogeneous platforms and realize the functions of the entire SoC processor. Summary of the invention

[0003] The purpose of the present invention is to provide a communication system of VETH virtual network card based on AMP multi-core heterogeneity, which can well solve the problem of inter-core communication.

[0004] To achieve the above object, the present invention provides the following technical solutions: The present invention provides a communication system of a VETH virtual network card based on AMP multi-core heterogeneity, the communication system comprising a first core, a second core, a shared memory and a mailbox, the first core having a physical network card and a first virtual network card communicating with each other, the second core having a second virtual network card, the first core directly accessing an external network through the physical network card, the second core communicating with the first virtual network card through the second virtual network card, the shared memory and the mailbox, and then communicating with the physical network card to indirectly access the external network.

[0005] In one embodiment, the communication system also includes an rpmsg bus and a virtio bus. The first virtual network card sends and receives data with the second virtual network card via the rpmsg bus, the virtio bus, the shared memory, the virtio bus, and the rpmsg bus in sequence. The first virtual network card transmits notifications of sending and receiving data with the second virtual network card via the mailbox.

[0006] In one implementation, the first core is an A core, the second core is an M core, and the first virtual network card and the second virtual network card are both VETH virtual network cards.

[0007] In one implementation, the first core is a master core, the second core is a slave core, and the first core controls the second core to start and stop running.

[0008] In one embodiment, the first core includes a network device application layer, a network protocol stack interface layer, a network device interface layer, a device driver function layer, and a network device media layer which are connected in series.

[0009] In one embodiment, the network device application layer includes the first virtual network card, which provides an original virtual network card device for user-mode socket access operations to meet the network data transmission requirements of conventional Ethernet devices, and the network data transmission includes network data packet sending and network data packet receiving.

[0010] In one embodiment, the network protocol stack interface layer is below the kernel network protocol stack, and has a universal interface for receiving and sending network data packets, thereby achieving seamless connection between the network device interface layer and the kernel network protocol stack.

[0011] In one implementation, the network device interface layer is mounted on the rpmsg bus on a structure to implement data packet sending and data packet receiving.

[0012] In one embodiment, the device driver function layer is composed of an rpmsg message layer and a virtio virtual IO layer. The rpmsg message layer is responsible for defining the data message format and building spmsg_send and rx_callback transceiver interfaces. The virtio virtual IO layer is composed of three parts: virtio, virtqueue, and vring.

[0013] In one embodiment, the network device media layer is composed of the shared memory and the mailbox, the shared memory serves as a payload entity for data stream transmission, and the mailbox implements a notification mechanism when sending and receiving data between the first core and the second core in the form of hardware interrupts.

[0014] Compared with the prior art, the technical solution of the present invention has the following beneficial effects: The communication system of the VETH virtual network card based on AMP multi-core heterogeneous described in the present invention enables different software components to communicate with each other and work together based on shared memory IPC communication to achieve the purpose of data sharing, event notification, state synchronization, and system expansion. Based on the virtual network card, efficient network data parallel computing and real-time network data packet exchange are realized to give full play to the performance advantages of the multi-core heterogeneous platform, thereby realizing the functions of the entire SOC processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A schematic diagram of the structure of a communication system based on AMP multi-core heterogeneous VETH virtual network card provided by the first embodiment of the present invention; Figure 2 for Figure 1 Schematic diagram of the structure inside the first core. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present invention will be described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present invention. It should be noted that the description order of the following embodiments is not used as a limitation on the preferred order of the embodiments of the present invention. In the following embodiments, the description of each embodiment has its own emphasis. For the parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0018] See also Figure 1 As shown, the first embodiment of the present invention provides a communication system of a VETH virtual network card based on AMP multi-core heterogeneous, the communication system includes a first core Process1, a second core Process2, a shared memory sharedmemory and a mailbox mailbox, the first core Process1 has a physical network card phy-eth and a first virtual network card veth1 that communicate with each other, the second core Process2 has a second virtual network card veth2, the first core Process1 directly accesses the external network Internet through the physical network card phy-eth, the second core Process2 communicates with the first virtual network card veth1 through the second virtual network card veth2, the shared memory sharedmemory, and the mailbox mailbox, and then communicates with the physical network card phy-eth to indirectly access the external network Internet.

[0019] In one embodiment, the communication system also includes an rpmsg bus and a virtio bus. The first virtual network card veth1 sends and receives data to and from the second virtual network card veth2 via the rpmsg bus, the virtio bus, the shared memory, the virtio bus, and the rpmsg bus in sequence. The first virtual network card veth1 transmits notifications of sending and receiving data to and from the second virtual network card veth2 via the mailbox mailbox.

[0020] In one implementation, the first core Process1 is an A core, whose full name is Cortex-A core, which is referred to as A core in the present invention. In one implementation example, its model is A53 and runs a LINUX system. The second core Process2 is an M core, whose full name is Cortex-M core, which is referred to as M core in the present invention. In one implementation example, its model is M7 and runs an RTOS system. The first virtual network card veth1 and the second virtual network card veth2 are both VETH virtual network cards.

[0021] In one embodiment, the first core Process1 is a master core (Master), the second core Process2 is a slave core (Slave), the first core Process1 controls the second core Process2 to start and stop running (Remoteproc S / T), and the program file of the second core is stored in TCM or DDR.

[0022] In one embodiment, the first core Process1 includes a network device application layer, a network protocol stack interface layer, a network device interface layer, a device driver function layer, and a network device media layer which are connected in series.

[0023] In one embodiment, the network device application layer includes the first virtual network card veth1, which provides an original virtual network card device for user-mode socket access operations to meet conventional Ethernet device network data transmission requirements. The network data transmission includes network data packet sending sendto and network data packet receiving recvfrom.

[0024] In one implementation, the network protocol stack interface layer is below the kernel network protocol stack, and a general interface for receiving and sending network data packets is built to achieve seamless connection between the network device interface layer and the kernel network protocol stack. In a specific embodiment, the network protocol stack interface layer is below the LINUX kernel network protocol stack, and uses the kernel's rx_queue and tx_queue as the transceiver queues to build a general interface (dev_queue_xmit function, netif_rx function) for receiving and sending network data packets to achieve seamless connection between the network device interface layer and the kernel network protocol stack.

[0025] In one embodiment, the network device interface layer is mounted on the rpmsg bus on the structure to implement data packet sending and data packet receiving. In a specific embodiment, the network device interface layer is on the structure net_device, associated with net_device_ops, and mounted on the rpmsg bus in the form of a probe driver to implement various operations such as opening and closing of the network device, data packet sending virt_start_xmit and data packet receiving virt_start_rx, sending timeout processing tx_timeout, data packet statistics information acquisition get_stats, mac address setting, etc. In particular, the data packet sending processing part, by combining the real-time nature of soft interrupt triggering sending and the independence of the work queue processing sending tasks, greatly balances the requirements of network throughput and low latency, thereby raising the maximum value of network bandwidth to the highest, and the measured rate can reach 230Mbps.

[0026] In one embodiment, the device driver function layer is composed of an rpmsg message layer and a virtio virtual IO layer. The rpmsg message layer is responsible for defining the data message format and building the spmsg_send and rx_callback transceiver interfaces. The virtio virtual IO layer is composed of three parts: virtio, virtqueue, and vring. The virtio virtual IO layer is used for virtio-svq (a queue for registering a buffer for sending) and virtio-rvq (a queue for registering a buffer for receiving), which perfectly solves the problem of how to achieve synchronization and mutually exclusive access to resources when two CPU cores access a shared memory at the same time.

[0027] In one embodiment, the network device media layer is composed of the shared memory and the mailbox. The shared memory serves as a payload entity for data stream transmission, and the mailbox implements a notification mechanism when sending and receiving data between the first core Process1 and the second core Process2 in the form of hardware interrupts.

[0028] The present invention perfectly realizes network data interaction with the M core from the network device application layer, network protocol stack interface layer, network device interface layer, device driver function layer to the network device media layer on the A core. In this way, not only can the M core access the resources of the A core in the form of an Ethernet device, but it can even connect to the external network with the help of the physical network card of the A core, and the A core can use the virtual network card to realize resource control and IO control of the M core.

[0029] Compared with the prior art, the technical solution of the present invention has the following beneficial effects: The communication system of the VETH virtual network card based on AMP multi-core heterogeneous described in the present invention enables different software components to communicate with each other and work together based on shared memory IPC communication to achieve the purpose of data sharing, event notification, state synchronization, and system expansion. Based on the virtual network card, efficient network data parallel computing and real-time network data packet exchange are realized to give full play to the performance advantages of the multi-core heterogeneous platform, thereby realizing the functions of the entire SOC processor.

[0030] The virtual network card technology based on shared memory and virtio of the present invention is used in industrial control in the field of OHT, which not only solves the inter-core network communication problem faced by the multi-core, multi-system, and multi-task scenarios of multi-core heterogeneous AMP processors, but also satisfies the physical network card sharing between multi-cores in the form of master and slave. Based on the virtio bus mechanism, by building a virtual network card of the VETH solution between the A core and the M core, the M core-A core can realize basic network communication with the help of the virtual network card, and can not only send and receive Ethernet data packets in the form of traditional network devices, but also the M core can access the A core file system through the NFS mechanism, and of course it can also be connected to the physical network card of the A core through bridging or NAT to realize access to the external network, which greatly improves the communication efficiency and system performance.

[0031] The present invention solves the network communication problem between the M core and the A core in a multi-core heterogeneous scenario, so that the M core can not only access the file resources of the A core (main core) through the NFS mechanism, but also access the external network with the help of the A core. On the Linux system of the A core, the user state can configure the mac address and view the RX / TX data packet statistics through the ifconfig command, and in the kernel state, when the M core-A core performs network data communication, the network data packet is directly sent and received in the form of a traditional network device. In this way, a network device platform is built for the scenario of frequent transmission of large amounts of data, and the needs of the M core to access the external network and the inter-core network are met.

[0032] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims. In addition, the specification uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. The content of this specification should not be understood as a limitation on the present invention.

Claims

1. A communication system based on AMP multi-core heterogeneous VETH virtual network card, characterized in that: The communication system includes a first core, a second core, a shared memory and a mailbox. The first core has a physical network card and a first virtual network card that communicate with each other. The second core has a second virtual network card. The first core directly accesses the external network through the physical network card. The second core communicates with the first virtual network card through the second virtual network card, the shared memory and the mailbox, and then communicates with the physical network card to indirectly access the external network.

2. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 1 is characterized in that: The communication system also includes an rpmsg bus and a virtio bus. The first virtual network card sends and receives data to and from the second virtual network card via the rpmsg bus, the virtio bus, the shared memory, the virtio bus, and the rpmsg bus in sequence. The first virtual network card transmits notifications of sending and receiving data to and from the second virtual network card via the mailbox.

3. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 1 is characterized in that: The first core is an A core, the second core is an M core, and the first virtual network card and the second virtual network card are both VETH virtual network cards.

4. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 1 is characterized in that: The first core is a master core, the second core is a slave core, and the first core controls the second core to start and stop running.

5. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 2 is characterized in that: The first core includes a network device application layer, a network protocol stack interface layer, a network device interface layer, a device driver function layer, and a network device media layer which are connected in series.

6. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 5 is characterized in that: The network device application layer includes the first virtual network card, which provides an original virtual network card device for user-mode socket access operations to meet the network data transmission requirements of conventional Ethernet devices. The network data transmission includes network data packet sending and network data packet receiving.

7. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 5 is characterized in that: The network protocol stack interface layer is below the kernel network protocol stack, and is equipped with a universal interface for receiving and sending network data packets, thereby achieving seamless connection between the network device interface layer and the kernel network protocol stack.

8. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 5 is characterized in that: The network device interface layer is mounted on the rpmsg bus on the structure to realize data packet sending and data packet receiving.

9. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 5 is characterized in that: The device driver function layer is composed of an rpmsg message layer and a virtio virtual IO layer. The rpmsg message layer is responsible for defining the data message format and building spmsg_send and rx_callback transceiver interfaces. The virtio virtual IO layer is composed of three parts: virtio, virtqueue, and vring.

10. The communication system of VETH virtual network card based on AMP multi-core heterogeneity according to claim 5, characterized in that: The network device media layer is composed of the shared memory and the mailbox. The shared memory serves as a load entity for data stream transmission, and the mailbox implements a notification mechanism when sending and receiving data between the first core and the second core in the form of hardware interrupts.

Citation Information

Cited By

  • Wearable device, device control method and computer readable storage medium

    CN120416304A

  • Wearable devices, device control methods, and computer-readable storage media

    CN120416304B

  • Air carrier controller

    CN120686684A

  • Aerial vehicle controller

    CN120686684B