A method, system and apparatus for scheduling inter-core communication

CN116719771BActive Publication Date: 2026-10-27FORYOU GENERAL ELECTRONICS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310562026.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2026-10-27
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

[0005]本发明提供一种核间通信调度方法、系统及装置,解决了现有的核间通信通过核间中断来进行数据收发,将占用SoC大量资源且无法灵活选择RPMSG和ShareMemory的技术问题

Benefits of technology

C6、所述第二内核将所述第二指定位置的第二指定地址写入Mailbox的第二指定通道;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116719771B_ABST
    Figure CN116719771B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer communication, and provides a kind of inter-core communication scheduling method, system and device, based on inter-core communication demand, IPC resource is isolated mutual exclusion in advance according to configuration file IPC_Config.dtsi, and then guarantee RPMSG mode and Share Memory mode to carry out IPC transceiving without conflict, realize the simultaneous performance of inter-core communication of two modes, to meet the communication demand of user, in addition, read and write API functions are called according to configuration file IPC_Config.dtsi, user-defined communication mode allocation proportion, communication query mode, realize that inter-core communication occupies less CPU resource, communication rate is higher, communication delay is lower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer communication technology, and in particular to an inter-core communication scheduling method, system and apparatus. Background Technology

[0002] With the continuous progress of human society and the rapid development of computer hardware, the emergence of multi-core processors is an inevitable trend. In the development of the information industry, single-core processors have revealed many limitations, while multi-core processors have brought tremendous changes, resulting in greater productivity advantages and superior performance. In multiple processors, each core cannot work independently; they need to work collaboratively to fully utilize the processor's performance, which requires efficient inter-core communication.

[0003] From a software perspective, Inter-Process Communication (IPC) provides a software interface running on the processor, which can be called by clients to enable communication between cores in a multi-core processor. Currently, IPC communication is mainly based on Mailbox. Depending on the implementation of Mailbox, common inter-core communication methods include RPMSG-based inter-core communication and Shared Memory-based inter-core communication.

[0004] Both of the above inter-core communication methods rely on inter-core interrupts for data transmission and reception. However, frequent inter-core communication leads to frequent triggering of inter-core interrupts. The generation of numerous interrupts consumes a significant amount of SoC resources, resulting in a series of performance degradations, including SoC interrupt response and real-time performance. Furthermore, it prevents flexible selection between the RPMSG and SharedMemory IPC methods. Summary of the Invention

[0005] This invention provides an inter-core communication scheduling method, system, and apparatus, which solves the technical problem that existing inter-core communication uses inter-core interrupts for data transmission and reception, which consumes a large amount of SoC resources and cannot flexibly select RPMSG and ShareMemory.

[0006] To address the above technical problems, this invention provides an inter-core communication scheduling method, comprising the following steps: S1. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; S2. Initialize the communication receiving interface; S3. Use the communication receiving interface to call the first transceiver module and the second transceiver module, and encapsulate the corresponding read and write API functions respectively; S4. Call the read / write API function according to the configuration file IPC_Config.dtsi to perform IPC communication.

[0007] This basic solution, based on inter-core communication requirements, pre-isolates and mutually excludes IPC resources according to the configuration file IPC_Config.dtsi, thereby ensuring that IPC sending and receiving in RPMSG mode and Shared Memory mode do not conflict, enabling simultaneous inter-core communication in both modes to meet user communication needs. In addition, by calling read and write API functions according to the configuration file IPC_Config.dtsi, users can customize the communication mode allocation ratio and communication query method, achieving inter-core communication with less CPU resource consumption, higher communication speed, and lower communication latency.

[0008] In a further embodiment, step S1 includes the following steps: S11, SoC power on and boot, Bootloader boots the kernel; S12. Obtain user intent and generate configuration file IPC_Config.dtsi; S13. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; The configuration file IPC_Config.dtsi includes a scheduling percentage (ipc_ratio) and a polling enable (loop_enable). The scheduling percentage (ipc_ratio) is the bandwidth ratio between the RPMSG method and the Shared Memory method. The first transceiver module uses the RPMSG method, and the second transceiver module uses the Shared Memory method.

[0009] This basic solution obtains the user's intent and generates a configuration file IPC_Config.dtsi after the SoC powers on and starts up. Then, it isolates and mutually excludes IPC resources according to the configuration file IPC_Config.dtsi. On the one hand, it realizes the synchronous execution of the two communication mechanisms without interference. On the other hand, it allows for customization of the ratio of RPMSG communication mechanism and Shared Memory communication mechanism during the SoC inter-core communication process.

[0010] In a further implementation, step S2 specifically involves: importing the configuration file IPC_Config.dtsi as a device tree parameter into the SoC main device tree; initializing the IPC driver according to the device tree parameter, and providing a RAW interface as a communication receiving interface.

[0011] In a further implementation, step S3 specifically involves: using the communication receiving interface to call the first transceiver module to encapsulate the transceiver function, thereby encapsulating the corresponding first read / write API function IPC_Send; and using the communication receiving interface to call the second transceiver module to encapsulate the transceiver function, thereby encapsulating the corresponding second read / write API function IPC_Recv.

[0012] This solution initializes the IPC driver based on the device tree parameters, and provides corresponding RAW interfaces as communication receiving interfaces for the first transceiver module and the second transceiver module respectively. The communication receiving interfaces independently separate the data distribution of the two communication mechanisms.

[0013] In a further embodiment, step S4 includes the following steps: S41. Obtain the scheduling percentage ipc_ratio and the round-robin enable loop_enable from the configuration file IPC_Config.dtsi; S42. Allocate bandwidth to the first transceiver module and the second transceiver module according to the scheduling percentage ipc_ratio; S43. Determine the communication query method based on the polling enable loop_enable; the communication query method includes interrupt query and polling query. S44. Based on the bandwidth allocation and communication query method, drive the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication, and drive the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication.

[0014] After obtaining the user's intent, this solution generates a scheduling percentage `ipc_ratio` in the configuration file. Based on the user's intent, it allocates bandwidth between RPMSG and Shared Memory modes. During IPC communication, it directly retrieves the scheduling percentage `ipc_ratio` from the configuration file `IPC_Config.dtsi` for bandwidth allocation, thereby enabling customized adjustment of the ratio between RPMSG and Shared Memory communication mechanisms during SoC inter-core communication. Simultaneously, during operating system startup, it configures the current communication query method based on the `loop_enable` setting in the configuration file `IPC_Config.dtsi`, thereby enabling customized settings for interrupt or polling modes.

[0015] In a further implementation, in step S44, driving the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication includes the following steps: A1. The first kernel calls the communication receiving interface to copy the information data to VRING, and publishes the VRING ID of the VRING to the first channel of the hardware-specified Mailbox; A2. According to the communication query method, a first query thread is created on the second kernel, and the first query thread is run to poll Mailbox; or, Mailbox triggers an interrupt. A3. Obtain the VRING ID, and then query the information data in the VRING based on the VRING ID; A4. The second kernel calls the communication receiving interface to send information data to VRING, and publishes the VRING ID of VRING to the second channel of the hardware-specified Mailbox; A5. According to the communication query method, create a second query thread on the first kernel and run the second query thread to poll Mailbox; or, Mailbox triggers an interrupt. A6. Obtain the VRING ID, and then query the information data in the VRING based on the VRING ID; VRING refers to a circular buffer in shared memory.

[0016] In a further implementation, in step S44, driving the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication includes the following steps: C1. The first kernel copies the information data to the first specified location in Shared Memory; C2. The first kernel writes the first specified address at the first specified location into the first specified channel of Mailbox; C3. According to the communication query method, the second kernel creates and runs a third thread to poll the first specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding first specified address. C4. The second kernel reads the information data according to the specified address, processes the information, and prepares a reply message. C5. The second kernel copies the reply information to the second designated location in Shared Memory; C6. The second kernel writes the second specified address at the second specified location into the second specified channel of Mailbox; C7. According to the communication query method, the first kernel creates and runs a fourth thread to poll the second specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding second specified address. C8. The first kernel reads the information data according to the second specified address and processes the information.

[0017] In the first transceiver module, this solution adds a mechanism for creating a first query thread for the first kernel and a second query thread for the second kernel, replacing the interrupt notification in the RPMSG communication mechanism with a polling method to periodically query the information data in VRING. In the second transceiver module, a mechanism for creating a fourth query thread for the first kernel and a fourth query thread for the second kernel is added, periodically receiving the specified address in the Mailbox message in a polling method, and then realizing large-scale communication interaction through data reading from shared memory. In addition, according to the pre-configuration of the configuration file, the communication query method can be customized as either interrupt mode or polling mode, which achieves less CPU resource consumption, higher communication speed, and lower communication latency for inter-core communication.

[0018] The present invention also provides an inter-core communication scheduling system, comprising a user operation API module, an RPMSG transceiver module, an IPC driver initialization module, an IPC resource isolation and mutual exclusion module connected in sequence, and a Share Memory transceiver module connected to the user operation API module and the IPC driver initialization module; The user operation API module is used to acquire user operations and identify user intent; The IPC resource isolation and mutual exclusion module is used to isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; The IPC driver initialization module is used to initialize the IPC driver and provides a RAW interface as a communication receiving interface. The RPMSG transceiver module is used to encapsulate the transceiver function to obtain the corresponding first read / write API function IPC_Send. The Share Memory transceiver module is used to encapsulate the transceiver functions to obtain the corresponding second read / write API function IPC_Recv; The user operation API module calls the first read / write API function IPC_Send and the second read / write API function IPC_Recv according to the configuration file IPC_Config.dtsi to perform IPC communication.

[0019] This scheduling system uses various modules to implement each step of the scheduling method, providing a hardware foundation for the scheduling method and facilitating its implementation.

[0020] The present invention also provides an apparatus comprising at least a first kernel, a second kernel, and an IPC transceiver scheduler connected to the first kernel and the second kernel. The IPC transceiver scheduler includes at least one of the following modules in the above-mentioned inter-core communication scheduling system: user operation API module, RPMSG transceiver module, Share Memory transceiver module, IPC driver initialization module, and IPC resource isolation and mutual exclusion module. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the workflow of an inter-core communication scheduling method provided in an embodiment of the present invention. Figure 2 This is a system framework diagram of an inter-core communication scheduling system provided in an embodiment of the present invention; Figure 3 This is provided by the embodiments of the present invention. Figure 1 Communication architecture; Figure 4 This is a communication diagram of the RPMSG method provided in an embodiment of the present invention; Figure 5 This is a communication diagram of the Shared Memory method provided in an embodiment of the present invention. Detailed Implementation

[0022] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are given for illustrative purposes only and should not be construed as limiting the present invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.

[0023] Example 1 An inter-core communication scheduling method provided in this embodiment of the invention, such as... Figure 1 , Figure 3 As shown, in this embodiment, steps S1 to S4 are included: S1. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi, including steps S11 to S13: S11, SoC power on and boot, Bootloader boots the kernel; S12. Obtain user intent and generate configuration file IPC_Config.dtsi; S13. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; The configuration file IPC_Config.dtsi includes, but is not limited to, the scheduling percentage ipc_ratio and the polling enable loop_enable. The scheduling percentage ipc_ratio is the bandwidth ratio between the RPMSG method and the Shared Memory method. The first transceiver module uses the RPMSG method and the second transceiver module uses the Shared Memory method.

[0024] This solution obtains the user's intent and generates a configuration file IPC_Config.dtsi after the SoC powers on and starts up. Then, it isolates and mutually excludes IPC resources according to the configuration file IPC_Config.dtsi. On the one hand, it realizes the synchronous execution of the two communication mechanisms without interference. On the other hand, it allows for customization of the ratio of RPMSG communication mechanism and Shared Memory communication mechanism during the SoC inter-core communication process.

[0025] S2. Initialize the communication receiving interface, specifically: import the configuration file IPC_Config.dtsi as a device tree parameter into the SoC main device tree; initialize the IPC driver according to the device tree parameter, and provide the RAW interface as the communication receiving interface.

[0026] Specifically, the RAW interface Rpmsg_Send / Rpmsg_Recv is provided to encapsulate send and receive functions, so as to realize IPC send and receive functions in RPMSG mode; Provides RAW interfaces SHM_Send / SHM_Recv to encapsulate send and receive functions, enabling IPC send and receive functionality using Shared Memory.

[0027] S3. Using the communication receiving interface, call the first transceiver module (i.e., RPMSG transceiver module 2 in embodiment 2) and the second transceiver module (i.e., Share Memory transceiver module 3 in embodiment 2) to encapsulate the corresponding read and write API functions. Specifically, use the communication receiving interface to call the first transceiver module to encapsulate the transceiver functions and encapsulate the corresponding first read and write API function IPC_Send; use the communication receiving interface to call the second transceiver module to encapsulate the transceiver functions and encapsulate the corresponding second read and write API function IPC_Recv.

[0028] This solution initializes the IPC driver based on the device tree parameters, and provides corresponding RAW interfaces as communication receiving interfaces for the first transceiver module and the second transceiver module respectively. The communication receiving interfaces independently separate the data distribution of the two communication mechanisms.

[0029] S4. Call the read / write API functions according to the configuration file IPC_Config.dtsi to perform IPC communication, including steps S41 to S44: S41. Obtain the scheduling percentage ipc_ratio and the round-robin enable loop_enable from the configuration file IPC_Config.dtsi; S42. Allocate bandwidth to the first transceiver module and the second transceiver module according to the scheduling percentage ipc_ratio; S43. Determine the communication query method based on the loop_enable polling enable; the communication query method includes interrupt query and polling query. S44. Based on bandwidth allocation and communication query method, drive the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication, and drive the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication.

[0030] The process of driving the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication includes steps A1 to A6, see below. Figure 4 : A1. The first core Core1 calls the communication receiving interface Rpmsg_Send to copy the information data to VRING, and publishes the VRING ID of VRING to the first channel of the hardware-specified Mailbox Channel1; A2. Based on the communication query method, create a new first query thread ThreadR_Recv on the second kernel Core2, and run the first query thread ThreadR_Recv to poll Mailbox; or, Mailbox triggers an interrupt. A3. Obtain the VRING ID, and then call the communication receiving interface Rpmsg_Recv to query the information data in VRING based on the VRING ID; A4. The second core Core2 calls the communication receiving interface Rpmsg_Send to send information data to VRING, and publishes the VRING ID of VRING to the second channel of the hardware-specified Mailbox Channel2; A5. Based on the communication query method, create a second query thread ThreadS_Recv on the first kernel Core1, and run the second query thread ThreadS_Recv to poll Mailbox; or, Mailbox triggers an interrupt. A6. Obtain the VRING ID, and then call the communication receiving interface Rpmsg_Recv to query the information data in VRING based on the VRING ID; VRING stands for ring buffer in shared memory.

[0031] After obtaining the user's intent, this solution generates a scheduling percentage `ipc_ratio` in the configuration file. Based on the user's intent, it allocates bandwidth between RPMSG and Shared Memory modes. During IPC communication, it directly retrieves the scheduling percentage `ipc_ratio` from the configuration file `IPC_Config.dtsi` for bandwidth allocation, thereby enabling customized adjustment of the ratio between RPMSG and Shared Memory communication mechanisms during SoC inter-core communication. Simultaneously, during operating system startup, it configures the current communication query method based on the `loop_enable` setting in the configuration file `IPC_Config.dtsi`, thereby enabling customized settings for interrupt or polling modes.

[0032] The process of driving the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication includes steps C1 to C8, see below. Figure 5 : C1, the first kernel Core1 calls the communication receiving interface SHM_Send to copy the information data to the first specified location in Shared Memory; C2, the first core Core1 writes the first specified address at the first specified location to the first specified channel Mailbox Channel1; C3. Based on the communication query method, the second core Core2 creates and runs a third thread ThreadR_Recv, which calls the communication receiving interface SHM_Recv to poll the first specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding first specified address. C4, the second kernel Core2 reads information data from the specified address, processes the information, and prepares a reply message; C5, the second kernel Core2 calls the communication receiving interface SHM_Send to copy the reply information to the second specified location in Shared Memory; C6, the second kernel Core2 writes the second specified address at the second specified location to the second specified channel of Mailbox Channel2; C7. According to the communication query method, the first core Core1 creates a fourth thread ThreadS_Recv and runs it, calling the communication receiving interface SHM_Recv to poll the second specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding second specified address. C8, the first kernel Core1, reads information data from the second specified address and processes the information.

[0033] In the first transceiver module, this solution adds a mechanism for creating a first query thread for the first core (Core1) and a second query thread for the second core (Core2), replacing the interrupt notification in the RPMSG communication mechanism with a polling method to periodically query information data in VRING. In the second transceiver module, a mechanism for creating a fourth query thread for the first core (Core1) and a fourth query thread for the second core (Core2) is added, periodically receiving the specified address in Mailbox messages in a polling manner, and then realizing large-scale communication interaction through data reading from shared memory. In addition, according to the pre-configuration of the configuration file, the communication query method can be customized as either interrupt mode or polling mode, achieving inter-core communication with less CPU resource consumption, higher communication speed, and lower communication latency.

[0034] Based on the inter-core communication requirements, this invention pre-isolates and mutually excludes IPC resources according to the configuration file IPC_Config.dtsi, thereby ensuring that IPC sending and receiving in RPMSG mode and Shared Memory mode do not conflict, enabling simultaneous inter-core communication in both modes to meet user communication needs. In addition, by calling read and write API functions according to the configuration file IPC_Config.dtsi, users can customize the communication mode allocation ratio and communication query method, resulting in less CPU resource consumption, higher communication speed, and lower communication latency in inter-core communication.

[0035] Example 2 The reference numerals in the accompanying drawings of the embodiments of the present invention include: 1. User operation API module; 2. RPMSG mode transceiver module; 3. Shared Memory mode transceiver module; 4. IPC driver initialization module; 5. IPC resource isolation and mutual exclusion module.

[0036] This invention also provides an inter-core communication scheduling system, see [link to relevant documentation]. Figure 2 It includes a user operation API module 1, an RPMSG transceiver module 2, an IPC driver initialization module 4, an IPC resource isolation and mutual exclusion module 5 connected in sequence, and a Share Memory transceiver module 3 connected to the user operation API module 1 and the IPC driver initialization module 4. User Operation API Module 1 is used to obtain user operations and identify user intent; IPC resource isolation and mutual exclusion module 5 is used to isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; IPC driver initialization module 4 is used to initialize the IPC driver and provides a RAW interface as a communication receiving interface. RPMSG transceiver module 2 is used to encapsulate the transceiver functions to obtain the corresponding first read / write API function IPC_Send; Shared Memory mode transceiver module 3 is used to encapsulate transceiver functions to obtain the corresponding second read / write API function IPC_Recv; User operation API module 1 calls the first read / write API function IPC_Send and the second read / write API function IPC_Recv according to the configuration file IPC_Config.dtsi to perform IPC communication.

[0037] This scheduling system uses various modules to implement each step of the scheduling method, providing a hardware foundation for the scheduling method and facilitating its implementation.

[0038] Example 3 This invention also provides an apparatus, see [link to apparatus]. Figure 3 It includes at least a first core Core1, a second core Core2, and an IPC transceiver scheduler connected to the first core Core1 and the second core Core2. The IPC transceiver scheduler includes at least one of the following modules provided in Embodiment 2: user operation API module, RPMSG transceiver module, Share Memory transceiver module, IPC driver initialization module, and IPC resource isolation and mutual exclusion module.

[0039] The difference between this embodiment and Embodiment 2 is that this embodiment focuses on protecting a device and on the integrity of the structure.

[0040] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for scheduling inter-core communication, characterized in that, Including the following steps: S1. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; S2. Initialize the communication receiving interface; S3. Use the communication receiving interface to call the first transceiver module and the second transceiver module, and encapsulate the corresponding read and write API functions respectively; S4. Call the read / write API function according to the configuration file IPC_Config.dtsi to perform IPC communication; Step S1 includes the following steps: S11, SoC power on and boot, Bootloader boots the kernel; S12. Obtain user intent and generate configuration file IPC_Config.dtsi; S13. Isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi obtained in step S12; The configuration file IPC_Config.dtsi includes a scheduling percentage (ipc_ratio) and a polling enable (loop_enable). The scheduling percentage (ipc_ratio) is the bandwidth ratio between the RPMSG method and the Shared Memory method. The first transceiver module uses the RPMSG method, and the second transceiver module uses the Shared Memory method.

2. The inter-core communication scheduling method as described in claim 1, characterized in that, Step S2 specifically involves: importing the configuration file IPC_Config.dtsi as a device tree parameter into the SoC main device tree; initializing the IPC driver according to the device tree parameter, and providing a RAW interface as a communication receiving interface.

3. The inter-core communication scheduling method as described in claim 1, characterized in that, Step S3 specifically involves: using the communication receiving interface to call the first transceiver module to encapsulate the transceiver function, thereby encapsulating the corresponding first read / write API function IPC_Send; and using the communication receiving interface to call the second transceiver module to encapsulate the transceiver function, thereby encapsulating the corresponding second read / write API function IPC_Recv.

4. The inter-core communication scheduling method as described in claim 3, characterized in that, Step S4 includes the following steps: S41. Obtain the scheduling percentage (ipc_ratio) and the polling enable (loop_enable) from the configuration file IPC_Config.dtsi; S42. Allocate bandwidth to the first transceiver module and the second transceiver module according to the scheduling percentage ipc_ratio; S43. Determine the communication query method based on the polling enable loop_enable; the communication query method includes interrupt query and polling query. S44. Based on the bandwidth allocation and the communication query method, drive the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication, and drive the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication.

5. The inter-core communication scheduling method as described in claim 4, characterized in that, In step S44, the step of driving the first transceiver module to call the first read / write API function IPC_Send to perform IPC communication includes the following steps: A1. The first kernel calls the communication receiving interface to copy the information data to VRING, and publishes the VRINGID of the VRING to the first channel of the hardware-specified Mailbox; A2. According to the communication query method, a first query thread is created on the second kernel, and the first query thread is run to poll Mailbox; or, Mailbox triggers an interrupt. A3. Obtain the VRING ID, and then query the information data in the VRING based on the VRING ID; A4. The second kernel calls the communication receiving interface to send information data to VRING, and publishes the VRING ID of VRING to the second channel of the hardware-specified Mailbox; A5. According to the communication query method, create a second query thread on the first kernel and run the second query thread to poll Mailbox; or, Mailbox triggers an interrupt. A6. Obtain the VRING ID, and then query the information data in the VRING based on the VRING ID; VRING refers to a circular buffer in shared memory.

6. The inter-core communication scheduling method as described in claim 4, characterized in that, In step S44, driving the second transceiver module to call the second read / write API function IPC_Recv to perform IPC communication includes the following steps: C1. The first kernel copies the information data to the first specified location in Shared Memory; C2. The first kernel writes the first specified address at the first specified location into the first specified channel of Mailbox; C3. According to the communication query method, the second kernel creates and runs a third thread to poll the first specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding first specified address. C4. The second kernel reads the information data according to the specified address, processes the information, and prepares a reply message. C5. The second kernel copies the reply information to the second designated location in Shared Memory; C6. The second kernel writes the second specified address at the second specified location into the second specified channel of Mailbox; C7. According to the communication query method, the first kernel creates and runs a fourth thread to poll the second specified address for receiving Mailbox messages; or, it receives Mailbox interrupts and the corresponding second specified address. C8. The first kernel reads the information data according to the second specified address and processes the information.

7. An inter-core communication scheduling system for implementing the inter-core communication scheduling method as described in any one of claims 1 to 6, characterized in that: It includes a user operation API module, an RPMSG transceiver module, an IPC driver initialization module, an IPC resource isolation and mutual exclusion module connected in sequence, and a Share Memory transceiver module connected to the user operation API module and the IPC driver initialization module. The user operation API module is used to acquire user operations and identify user intent; The IPC resource isolation and mutual exclusion module is used to isolate and mutually exclude IPC resources according to the configuration file IPC_Config.dtsi; The IPC driver initialization module is used to initialize the IPC driver and provides a RAW interface as a communication receiving interface. The RPMSG transceiver module is used to encapsulate the transceiver function to obtain the corresponding first read / write API function IPC_Send. The Shared Memory transceiver module is used to encapsulate the transceiver functions to obtain the corresponding second read / write API function IPC_Recv; The user operation API module calls the first read / write API function IPC_Send and the second read / write API function IPC_Recv according to the configuration file IPC_Config.dtsi to perform IPC communication.

8. An inter-core communication scheduling device, characterized in that: It includes at least a first kernel, a second kernel, and an IPC transceiver scheduler connected to the first kernel and the second kernel. The IPC transceiver scheduler includes at least one of the following modules as described in claim 7: user operation API module, RPMSG transceiver module, Share Memory transceiver module, IPC driver initialization module, and IPC resource isolation and mutual exclusion module.

Citation Information

Patent Citations

  • Communication scheduling system and method among cores of isomerization multi-core processor

    CN101354693A

  • Method for synchronization and communication between cores of isomorphic system

    CN109032818A

  • Inter-core communication method and device based on virtual data bus

    CN112463715A