An asynchronous communication method and device for heterogeneous multi-core
By using shared message pools and interrupt signal mechanisms in heterogeneous multi-core systems, the problem of inefficiency of heterogeneous multi-core communication is solved, and efficient asynchronous communication and resource utilization are achieved.
Patent Information
- Application Number
- CN202011564294.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2040-12-25
AI Technical Summary
In the prior art, the communication method between heterogeneous multi-core processors mainly relies on main CPU scheduling, and one-to-many efficient collaborative communication cannot be achieved, resulting in inefficient communication between heterogeneous multi-cores.
By setting up a shared message pool at the data transit end, storing target data and sending interrupt signals, each communication terminal is prompted to read data based on identification information, and efficient collaborative communication between heterogeneous multi-cores is achieved.
The communication efficiency and resource utilization rate between heterogeneous multi-cores are improved, and the number of communication terminals can be increased without increasing hardware costs, so as to achieve more communication between heterogeneous multi-cores.
Smart Images

Figure CN112579323B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to an asynchronous communication method and device for heterogeneous multi-cores. Background Art
[0002] With the rapid development of intelligent Internet of Things technologies, in the "cloud-pipe-terminal" ecological structure, the "pipe" will be directly enhanced, the data transmission delay becomes smaller, and the throughput becomes larger. As a result, another change is that the algorithms on the terminal side (abbreviation for the application side) are continuously enriched and optimized, complex algorithms are continuously moved forward, and the corresponding computing power at the hardware level is also moving towards the terminal side. To meet the computing power requirements of different applications on the terminal side, the SoC (System on Chip) architecture must consider the efficient cooperation between heterogeneous multi-cores.
[0003] ) However, currently, the general communication and data interaction methods between most multi-core processors are as follows: The main CPU runs the operating system and is responsible for overall scheduling, while the heterogeneous slave CPUs generally directly run engineering programs. And during the communication and interaction process, only one main CPU and one slave CPU are supported, that is, only one-to-one communication mode is supported, and efficient one-to-many cooperation communication cannot be achieved, that is, efficient cooperation communication between heterogeneous multi-cores cannot be achieved. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an asynchronous communication method and device for heterogeneous multi-cores, which can achieve efficient cooperation communication between heterogeneous multi-cores.
[0005] To solve the above technical problem, in the first aspect of an embodiment of the present invention, an asynchronous communication method for heterogeneous multi-cores is disclosed, and the method includes:
[0006] When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end, and the target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive;
[0007] After the target data is stored in the shared message pool, the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end. The communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than or equal to 1;
[0008] Wherein, the interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0009] In a second aspect of the embodiments of the present invention, an asynchronous communication device for heterogeneous multi - cores is disclosed. The device is applied to a first communication end, and the device includes:
[0010] A storage module, configured to store target data to be sent in a shared message pool of a data transfer end when it is determined that data needs to be stored. The target data includes identification information corresponding to a second communication end that needs to receive the target data and other data that the second communication end needs to receive;
[0011] A sending module, configured to send an interrupt signal to communication ends other than the first communication end through the data transfer end after the target data is stored in the shared message pool. The communication ends other than the first communication end include the second communication end, and the number of second communication ends is greater than or equal to 1;
[0012] Wherein, the interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0013] In a third aspect of the embodiments of the present invention, an asynchronous communication method for heterogeneous multi - cores is disclosed. The method includes:
[0014] A second communication end receives an interrupt signal sent by a first communication end through a data transfer end. In the shared message pool of the data transfer end, there is target data that the first communication end needs to send to the second communication end. The target data includes identification information corresponding to the second communication end and other data that the second communication end needs to receive, and the interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data;
[0015] The second communication end reads the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0016] In a fourth aspect of the embodiments of the present invention, an asynchronous communication device for heterogeneous multi - cores is disclosed. The device is applied to a second communication end, and the device includes:
[0017] A receiving module, configured to receive an interrupt signal sent by a first communication end through a data transfer end. In the shared message pool of the data transfer end, there is target data that the first communication end needs to send to the second communication end. The target data includes identification information corresponding to the second communication end and other data that the second communication end needs to receive, and the interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data;
[0018] A reading module, configured to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0019] A fifth aspect of the present invention discloses an asynchronous communication method for heterogeneous multi-cores, the method comprising:
[0020] When it is determined that data needs to be stored, a first communication end stores target data to be sent in a shared message pool of a data transfer end, where the target data includes identification information corresponding to a second communication end that needs to receive the target data and other data that the second communication end needs to receive;
[0021] After detecting that the target data is stored in the shared message pool, the data transfer end sends an interrupt signal to communication ends other than the first communication end, where the communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than or equal to 1;
[0022] For each of the second communication ends, the second communication end receives the interrupt signal sent by the data transfer end, where the interrupt signal is used to prompt the second communication end to read other data included in the target data from the shared message pool according to the identification information included in the target data, and read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0023] A sixth aspect of the present invention discloses an asynchronous communication device for heterogeneous multi-cores, the device comprising:
[0024] A first communication end, configured to store target data to be sent in a shared message pool of a data transfer end when it is determined that data needs to be stored, where the target data includes identification information corresponding to a second communication end that needs to receive the target data and other data that the second communication end needs to receive;
[0025] The data transfer end is configured to send an interrupt signal to communication ends other than the first communication end after the first communication end detects that the target data is stored in the shared message pool, where the communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than or equal to 1;
[0026] Each of the second communication terminals is configured to receive the interruption signal sent by the data relay terminal, where the interruption signal is used to prompt the second communication terminal to read the other data included in the target data from the shared message pool according to the identification information included in the target data, and read the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0027] A seventh aspect of the present invention discloses a heterogeneous multi-core asynchronous communication method, and the method includes:
[0028] When it is determined that data needs to be stored, the first communication terminal stores the target data to be sent in the shared message pool of the data relay terminal, where the target data includes the identification information corresponding to the second communication terminal that needs to receive the target data and other data that the second communication terminal needs to receive;
[0029] After the target data is stored in the shared message pool, the first communication terminal sends an interruption signal to the communication terminals other than the first communication terminal through the data relay terminal. The communication terminals other than the first communication terminal include the second communication terminal, and the number of the second communication terminals is greater than or equal to 1. The interruption signal is used to prompt each of the second communication terminals to read the other data included in the target data from the shared message pool according to the identification information included in the target data;
[0030] Each of the second communication terminals receives the interruption signal sent by the first communication terminal through the data relay terminal, and reads the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0031] An eighth aspect of the present invention discloses a heterogeneous multi-core asynchronous communication device, and the device includes:
[0032] A first communication terminal, configured to store the target data to be sent in the shared message pool of the data relay terminal when it is determined that data needs to be stored, where the target data includes the identification information corresponding to the second communication terminal that needs to receive the target data and other data that the second communication terminal needs to receive;
[0033] The first communication terminal is further configured to send an interruption signal to the communication terminals other than the first communication terminal through the data relay terminal after the target data is stored in the shared message pool. The communication terminals other than the first communication terminal include the second communication terminal, and the number of the second communication terminals is greater than or equal to 1. The interruption signal is used to prompt each of the second communication terminals to read the other data included in the target data from the shared message pool according to the identification information included in the target data;
[0034] Each of the second communication terminals is configured to receive the interruption signal sent by the first communication terminal through the data relay terminal, and read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0035] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0036] In the embodiments of the present invention, an asynchronous communication method and apparatus for heterogeneous multi-cores are disclosed. The method includes: when it is determined that data needs to be stored, a first communication terminal stores target data to be sent in a shared message pool of a data relay terminal, where the target data includes identification information corresponding to a second communication terminal that needs to receive the target data and other data that needs to be received by the second communication terminal; after the target data is stored in the shared message pool, the first communication terminal sends an interruption signal to communication terminals other than the first communication terminal through the data relay terminal, and the communication terminals other than the first communication terminal include the second communication terminal, and the number of second communication terminals is greater than or equal to 1; wherein, the interruption signal is used to prompt each second communication terminal to read other data included in the target data from the shared message pool according to the identification information included in the target data. It can be seen that in the embodiments of the present invention, the data to be sent is automatically stored in the shared information pool of the data relay terminal, and the interruption signal is sent to at least one communication terminal that needs the data through the data relay terminal, so that at least one communication terminal that needs the data automatically reads the required data in the shared information pool after receiving the interruption signal, which can realize communication between heterogeneous multi-cores, and by storing the identification information corresponding to at least one communication terminal that needs the data in the shared message pool together, so as to facilitate at least one communication terminal that needs the data to read the required data according to the identification information, which can realize efficient collaborative communication between heterogeneous multi-cores, and can improve the resource utilization rate of the shared message pool, and is beneficial to increasing the number of communication terminals according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores. Description of the Drawings
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings without creative efforts based on these drawings.
[0038] Figure 1 It is a schematic diagram of the architecture of a scenario architecture disclosed in the embodiments of the present invention;
[0039] Figure 2 It is a schematic flowchart of an asynchronous communication method for heterogeneous multi-cores disclosed in the embodiments of the present invention;
[0040] Figure 3 is a schematic flowchart of another asynchronous communication method for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0041] Figure 4 is a schematic flowchart of yet another asynchronous communication method for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0042] Figure 5 is a schematic flowchart of yet another asynchronous communication method for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0043] Figure 6 is a schematic flowchart of yet another asynchronous communication method for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0044] Figure 7 is a schematic structural diagram of an asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0045] Figure 8 is a schematic structural diagram of another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0046] Figure 9 is a schematic structural diagram of yet another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0047] Figure 10 is a schematic structural diagram of yet another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0048] Figure 11 is a schematic structural diagram of yet another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0049] Figure 12 is a schematic structural diagram of yet another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention;
[0050] Figure 13 is a schematic structural diagram of yet another asynchronous communication device for heterogeneous multi-cores disclosed in an embodiment of the present invention. Detailed implementation manners
[0051] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] In the description and claims of the present invention and the above-mentioned drawings, terms such as "first" and "second" are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or equipment.
[0053] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0054] The present invention discloses a heterogeneous multi-core asynchronous communication method and apparatus, which can automatically store the data to be sent in the shared information pool of the data transfer end, and send an interrupt signal to at least one communication end that needs the data through the data transfer end, so that at least one communication end that needs the data can automatically read the required data in the shared information pool after receiving the interrupt signal, thereby realizing communication between heterogeneous multi-cores. And by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, so that at least one communication end that needs the data can read the required data according to the identification information, it can realize efficient collaborative communication between heterogeneous multi-cores, improve the resource utilization rate of the shared message pool, and is conducive to increasing the number of communication ends according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores. The following will be described in detail respectively.
[0055] To better understand a heterogeneous multi-core asynchronous communication method and apparatus described in the present invention, first, the scenario architecture corresponding to the heterogeneous multi-core asynchronous communication method (i.e., the system architecture of the heterogeneous multi-core asynchronous communication) will be described. Specifically, the scenario architecture can be as Figure 1 shown Figure 1 is a schematic diagram of the architecture of a scenario architecture disclosed in an embodiment of the present invention. As Figure 1 shown, the scenario architecture can include a data transfer end, at least one first communication end ( Figure 1 illustrated with at least four as an example), at least one second communication end ( Figure 1For example, at least four are used for illustration. Among them, the data transfer end (for example: the end with storage function, such as: mailbox) includes a shared message pool, an interrupt controller, and a lock. Among them, the shared message pool can be a virtual shared message pool and / or a physical shared message pool. Among them, the physical shared message pool includes, but is not limited to, any one of the REGISTER register, SRAM register, and DRAM register. Among them, the interrupt controller includes a configuration register, a driver register, a status register, and an enable register. Among them, each communication end has a uniquely corresponding driver register. Among them, this scenario architecture is applicable to any scenario that requires multi-core heterogeneous asynchronous communication. Among them, according to different requirements, all the first communication ends and all the second communication ends can be either communication sending ends (also called data storage ends) or communication receiving ends (also called data reading ends), but they cannot be both communication sending ends and communication receiving ends at the same time. And all the first communication ends and all the second communication ends are communication ends with an operating system. Among them:
[0056] The shared message pool is used to store the data that the communication sending end needs to send and is used for the communication receiving end that needs data to read the required data from the shared message pool; the configuration register is used to configure one-to-one communication or one-to-many communication. For example: one first communication end communicates with one second communication end, or one first communication end communicates with multiple second communication ends. When it is one first communication end communicating with one second communication end, the uniquely corresponding identification information of the second communication end is written into the configuration register. When it is one first communication end communicating with multiple second communication ends, the determined identification information (for example: 0xFF) is written into the configuration register; the status register is used to store the location identifier of the data (that is, the location of the data in the shared message pool) after the communication sending end stores the data that needs to be sent in the shared message pool. Among them, when the data is written into the data structure, this location identifier is also called the uniquely corresponding identifier of the data structure; the driver register is used to generate an interrupt signal after the communication sending end stores the data that needs to be sent in the shared message pool; the enable register is used to tell or not tell the communication receiving end by changing its enable bit after the data that needs to be sent is stored in the shared message pool and the interrupt signal is generated; the lock is used to switch the idle state of the lock at the location where the data is stored to the occupied state after the data that needs to be sent is stored in the shared message pool. When the data is written into the data structure, the lock at the location where the data is stored is also called the uniquely corresponding lock of the data structure, and each data structure has a uniquely corresponding lock.
[0057] The above describes the scenario architecture applicable to the heterogeneous multi-core asynchronous communication method. Next, the heterogeneous multi-core asynchronous communication method and device will be described in detail.
[0058] Embodiment 1
[0059] Please refer toFigure 2 , Figure 2 is a schematic flowchart of an asynchronous communication method for heterogeneous multi - cores disclosed in an embodiment of the present invention. As Figure 2 shown, the asynchronous communication method for heterogeneous multi - cores may include the following operations:
[0060] 101. When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0061] In an embodiment of the present invention, optionally, when it is detected that communication with the second communication end is required, it indicates that it is determined that data needs to be stored; when it is detected that data needs to be temporarily stored in the shared message pool of the data transfer end, it indicates that it is determined that data needs to be stored.
[0062] In an embodiment of the present invention, other data is any data that needs to be sent, and the present invention does not make any limitations.
[0063] In an embodiment of the present invention, the identification information corresponding to the second communication end of the target data includes the uniquely corresponding identification of the second communication end (for example: the ID of the second communication end) and / or the determined broadcast identification (for example: 0xFF). It should be noted that when the number of second communication ends is 1, the identification information corresponding to the second communication end of the target data preferentially selects the uniquely corresponding identification of the second communication end; when the number of second communication ends is 1, the identification information corresponding to the second communication end of the target data preferentially selects the determined broadcast identification.
[0064] 102. After the target data is stored in the shared message pool, the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end.
[0065] In an embodiment of the present invention, the interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data. Among them, the communication ends other than the first communication end include the second communication end, and the number of second communication ends is greater than or equal to 1.
[0066] In an embodiment of the present invention, optionally, the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end. It can be understood that: the first communication end can directly send an interrupt signal to the second communication end to notify the second communication end that the first communication end has stored the target data in the shared message pool of the data transfer end, and the second communication end can obtain the target data from the shared message pool of the data transfer end; or, the first communication end generates an interrupt signal and sends the interrupt signal to the data transfer end, and then the data transfer end sends the interrupt signal to the communication ends other than the first communication end to notify the communication ends other than the first communication end that the first communication end has stored the target data in the shared message pool of the data transfer end, and the communication ends other than the first communication end can obtain the target data from the shared message pool of the data transfer end; or, after the data transfer end detects that the target data has been stored in the shared message pool, the data transfer end generates an interrupt signal by itself and sends the interrupt signal to the communication ends other than the first communication end to notify the communication ends other than the first communication end that the first communication end has stored the target data in the shared message pool of the data transfer end, and the communication ends other than the first communication end can obtain the target data from the shared message pool of the data transfer end.
[0067] In an embodiment of the present invention, further optionally, before performing step 102, the first communication end writes the identification information corresponding to the second communication end in the configuration register address of the data transfer end (for example: configuration register or virtual configuration register address). For example, when it is necessary to send the target data to a second communication end, the ID of the first communication end is written in the configuration register address of the data transfer end to achieve efficient one-to-one communication; when it is necessary to send the target data to multiple second communication ends, the IDs of all first communication ends can be written in the configuration register address of the data transfer end, or a specific character 0xFF can be written in the configuration register address of the data transfer end. In this way, when a certain communication end needs to send data to multiple other communication ends, there is no need to perform multiple one-to-one communications, but to communicate with multiple other communication ends in one step, realizing efficient one-to-many broadcast communication.
[0068] In an embodiment of the present invention, after the target data is stored in the shared message pool, further optionally, the drive register corresponding to the first communication end is switched to the open state, and is started through its corresponding enable register, and an interrupt signal is sent to the communication ends other than the first communication end through the data transfer end. In this way, by controlling the start of the drive register and the enable register, it is beneficial to ensure that the target data is successfully sent to other communication ends.
[0069] It can be seen that the implementation Figure 1The described asynchronous communication method for heterogeneous multi-cores can achieve communication between heterogeneous multi-cores by automatically storing the data to be sent in the shared information pool of the data transfer end and sending an interrupt signal to at least one communication end that needs the data through the data transfer end, so that at least one communication end that needs the data can automatically read the required data from the shared information pool after receiving the interrupt signal. And by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, it is convenient for at least one communication end that needs the data to read the required data according to the identification information, which can achieve efficient cooperative communication between heterogeneous multi-cores, improve the resource utilization rate of the shared message pool, and is beneficial to increasing the number of communication ends according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores.
[0070] In an optional embodiment, the first communication end storing the target data to be sent in the shared message pool of the data transfer end includes:
[0071] The first communication end obtains a data structure in an idle state from the shared message pool of the data transfer end and writes the target data to be sent into the data structure according to the determined data writing method to obtain a target data structure;
[0072] The first communication end stores the target data structure in the shared message pool.
[0073] In this optional embodiment, optionally, the shared message pool of the data transfer end is used to store at least one data structure. Further optionally, the shared message pool may include multiple sub-shared message pools, where each sub-shared message pool is used to store at least one data structure. Still further optionally, each sub-shared message pool has a unique corresponding identifier, for example: a number. Still further optionally, all sub-shared message pools can be arranged in any one of a row arrangement, a column arrangement, or other arrangement methods, which is not limited in the embodiments of the present invention. Still further optionally, the number of sub-shared message pools in the shared message pool can be n times the number of communication ends, where n is greater than or equal to 1, and preferably n = 2. In this way, by setting the number of sub-shared message pools to n times the number of communication ends, sufficient storage space can be provided for the communication ends.
[0074] In this alternative embodiment, optionally, each data structure has a corresponding message structure, and the message structure corresponding to each data structure can be fixed or customized according to specific needs. Among them, the content included in the message structure corresponding to each data structure at least includes the identification information corresponding to the communication receiving end and the status of the data valid bit of this data structure, where the status of the data valid bit of each data structure is used to indicate that the current state of this data structure is in an occupied state or an idle state. Further optionally, the content included in the message structure corresponding to each data structure also includes the identification information corresponding to the communication sending end. Still further optionally, the content included in the message structure corresponding to each data structure also includes the accessible times of this data structure. Especially for multiple communication receiving ends, whenever it is detected that a communication receiving end reads the data in the data structure once, it means that the accessible times of this data structure decreases by 1, so that the one-to-many communication situation can be accurately known. Still further optionally, the content included in the message structure corresponding to each data structure also includes the data type, session identifier and other data information of this data structure, where the data type of each data structure is used to determine that when the communication receiving end reads the data in this data structure, a feedback indicating that the read data is correct is given to the communication sending end. In this way, by customizing the message structure corresponding to the data structure, it is beneficial to adapt to complex application scenarios.
[0075] It can be seen that in this alternative embodiment, when determining that data needs to be stored, by writing the data to be stored into the data structure in the shared message pool of the data transfer end that is in an idle state, the data can be stored in the shared message pool of the data transfer end, and by writing the data into the data structure according to the corresponding message structure, the accuracy and efficiency of data writing can be improved, which is beneficial to improving the efficient coordination of one-to-many data communication.
[0076] In this alternative embodiment, further optionally, the types of data structures stored in the shared message pool of the data transfer end include at least one data structure type, where each data structure type includes at least one data structure. Optionally, the first communication end obtains a data structure in an idle state from the shared message pool of the data transfer end, including:
[0077] The first communication end determines the data structure type that matches the content of the target data from the shared message pool of the data transfer end according to the content included in the target data, and obtains a data structure in an idle state from all the data structures included in the data structure type that matches the content of the target data; or,
[0078] The first communication end determines any data structure in an idle state from the shared message pool of the data transfer end according to the content included in the target data.
[0079] It can be seen that this optional embodiment can also determine a data structure that matches the stored data and is in an idle state, or determine any data structure in an idle state, which can realize the determination of the required data structure, enrich the determination methods of the required data structure, and improve the possibility of determining the required data structure; and determining a data structure that matches the stored data and is in an idle state can improve the accuracy and efficiency of determining the required data structure, thereby improving the accuracy and efficiency of data storage, and further facilitating improving the accuracy and efficiency of the communication receiving end reading the required data, and further improving the coordination of communication between one-to-many heterogeneous multi-cores.
[0080] It should be noted that the specific content of the first communication end obtaining a data structure in an idle state from all data structures included in the data structure type that matches the content of the target data, or the first communication end determining any data structure in an idle state from the shared message pool of the data transfer end according to the content included in the target data can refer to the specific description of the next embodiment and will not be elaborated here.
[0081] In another optional embodiment, the first communication end obtaining a data structure in an idle state from the data transfer end includes:
[0082] The first communication end obtains a target lock in an idle state from the shared message pool of the data transfer end;
[0083] The first communication end queries the data structure corresponding to the target lock among all data structures in the shared message pool according to the determined correspondence between the lock and the data structure, and determines the data structure corresponding to the target lock as the data structure in an idle state.
[0084] In this optional embodiment, optionally, each data structure has a uniquely corresponding lock, and a corresponding relationship is established in advance between each data structure and the lock uniquely corresponding to the data structure. Among them, all locks are mutually exclusive, that is, each lock does not interfere with each other.
[0085] It can be seen that in this optional embodiment, by determining the data structure corresponding to the lock in the idle state as the data structure in the idle state according to the corresponding relationship between the lock-data structure, the determination of the required data structure can be achieved, and the accuracy and efficiency of the determination of the required data structure can be improved, thereby improving the accuracy and efficiency of data storage; and a uniquely corresponding lock is set for each data structure, so that the communication end can directly and separately access the data structure through the lock, reducing the occurrence of data being erased or stored in a mess due to the misuse of the data structure, and further improving the accuracy, reliability and flexibility of data storage; and by making full use of the resources of each data structure, that is, making full use of the resources of the shared message pool, the occurrence of the situation where some communication channels are idle and some are overloaded due to the difference in the frequency of interaction between communication ends in the existing situation can be reduced, improving the resource utilization rate of the shared message pool, and further improving the communication coordination and efficiency between multiple communication ends.
[0086] In another optional embodiment, after the first communication end queries the data structure corresponding to the target lock among all the data structures in the shared message pool according to the determined corresponding relationship between the lock-data structure, and before the first communication end determines the data structure corresponding to the target lock as the data structure in the idle state, the method may further include the following steps:
[0087] The first communication end obtains the data valid bit of the data structure corresponding to the target lock, and determines whether the data valid bit is used to indicate that the data structure corresponding to the target lock is in the idle state;
[0088] When it is determined that the data valid bit is used to indicate that the data structure corresponding to the target lock is in the idle state, the first communication end triggers and executes the above operation of determining the data structure corresponding to the target lock as the data structure in the idle state.
[0089] In this optional embodiment, optionally, when it is determined according to the data valid bit that the data structure corresponding to the target lock is not in the idle state, the above operation of obtaining the data structure in the idle state from the shared message pool of the data transfer end is re-executed. At this time, the data structure in the shared message pool of the data transfer end does not include the data structure corresponding to the target lock that was determined not to be in the idle state according to the data valid bit last time.
[0090] It can be seen that in this optional embodiment, after querying the data structure corresponding to the target lock, it is further determined whether the data valid bit is used to indicate that the data structure corresponding to the target lock is in the idle state. If so, the subsequent operations are continued, which can improve the execution accuracy and reliability of the subsequent operations.
[0091] Embodiment II
[0092] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another asynchronous communication method for heterogeneous multi-cores disclosed in an embodiment of the present invention. As Figure 3 shown, the asynchronous communication method for heterogeneous multi-cores may include the following operations:
[0093] 201. When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0094] 202. After the target data is stored in the shared message pool, the first communication end determines the target status register addresses that match each second communication end among all the status register addresses of the data transfer end.
[0095] In an embodiment of the present invention, all the status register addresses of the data transfer end include virtual status register addresses and / or physical status register addresses, for example: status register. Among them, each communication end has a corresponding status register address.
[0096] 203. The first communication end writes the identification information unique to the target data into each target status register address.
[0097] In an embodiment of the present invention, optionally, the identification information unique to the target data may include the identification unique to each second communication end and / or the determined broadcast identification. Further optionally, after the target data is stored in the data structure in the idle state to obtain the target data structure, the identification information unique to the target data may include the identification unique to the target data structure, where the identification unique to the target data structure is the identification that exists uniquely in each sub-shared message pool where the target data structure is located. Providing such multiple identification information unique to the target data is beneficial to improving the accuracy and efficiency of the second communication end in reading the target data, that is, improving the communication coordination, accuracy, and efficiency between the first communication end and each second communication end.
[0098] 204. The first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end.
[0099] In an embodiment of the present invention, for the relevant descriptions of steps 201 and 204, please refer to the detailed descriptions of steps 101 - 102 in Embodiment 1, and the present embodiment of the present invention will not be elaborated further.
[0100] It can be seen that after the data is stored in the shared message pool in the embodiment of the present invention, the unique identification information corresponding to the data is further stored in the status register address matching the communication receiving end, so that the communication receiving end can obtain the unique identification information corresponding to the data from the status register address it matches, and then read the data, which can improve the reading accuracy and efficiency of the data, that is, improve the communication coordination, accuracy and efficiency between the communication sending end and each communication receiving end.
[0101] In an optional embodiment, after the first communication end stores the target data to be sent in the shared message pool of the data transfer end, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0102] The first communication end switches the idle state of the target lock of the target data structure where the target data is located to the occupied state.
[0103] Further, after the first communication end writes the unique identification information corresponding to the target data into each target status register address, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0104] The first communication end switches the occupied state of the target lock of the target data structure to the idle state.
[0105] It can be seen that in this optional embodiment, after the data is stored in the shared message pool, the idle state of the lock of the data structure where the data is located is further switched to the occupied state, which can reduce the occurrence of data in the data structure being erased or in error, and protect the data; after the unique identification information corresponding to the data is written into the status register address, the occupied state of the lock of the data structure where the data is located is further switched to the idle state, which is convenient for the communication receiving end to obtain the data in the data structure.
[0106] In another optional embodiment, after the first communication end switches the occupied state of the target lock of the target data structure to the idle state, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0107] The first communication end writes the identification information corresponding to the second communication end in the configuration register address of the data transfer end, and triggers the operation of the first communication end sending an interrupt signal to the communication ends other than the first communication end through the data transfer end. Wherein, the configuration register address includes a physical configuration register address (for example: configuration register) and / or a virtual configuration register address.
[0108] For example, when the target data needs to be sent to a second communication end, write the ID of the first communication end into the configuration register address of the data transfer end to achieve efficient one-to-one communication; when the target data needs to be sent to multiple second communication ends, all the IDs of the first communication ends can be written into the configuration register address of the data transfer end, or a specific character 0xFF can be written into the configuration register address of the data transfer end. In this way, when a certain communication end needs to send data to multiple other communication ends, it does not need to perform multiple one-to-one communications, but can communicate with multiple other communication ends in one step, achieving efficient one-to-many broadcast communication.
[0109] It can be seen that after the occupancy state of the lock of the data structure where the data is located is switched to the idle state in this optional embodiment, the identification information corresponding to the communication receiving end is further written into the configuration register address of the data transfer end, so as to facilitate the corresponding communication receiving end to receive the data, improve the transmission accuracy and efficiency of the data, and thus provide the communication coordination, accuracy and efficiency between communication ends.
[0110] It can be seen that the implementation Figure 3 The described heterogeneous multi-core asynchronous communication method can automatically store the data to be sent in the shared information pool of the data transfer end, and send an interrupt signal to at least one communication end that needs the data through the data transfer end, so that at least one communication end that needs the data can automatically read the required data in the shared information pool after receiving the interrupt signal, enabling communication between heterogeneous multi-cores, and by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, so that at least one communication end that needs the data can read the required data according to the identification information, enabling efficient collaborative communication between heterogeneous multi-cores, and improving the resource utilization rate of the shared message pool, and facilitating increasing the number of communication ends according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores; it can also improve the reading accuracy and efficiency of the data, that is, improve the communication coordination, accuracy and efficiency between the communication sending end and each communication receiving end.
[0111] Embodiment III
[0112] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of a heterogeneous multi-core asynchronous communication method disclosed in an embodiment of the present invention. As Figure 4 shown, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0113] 301. The second communication end receives an interrupt signal sent by the first communication end through the data transfer end. The interrupt signal is used to prompt the second communication end to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0114] In an embodiment of the present invention, the target data that the first communication end needs to send to the second communication end is stored in the shared message pool of the data transfer end. The target data includes the identification information corresponding to the second communication end and other data that the second communication end needs to receive. For the relevant description of the target data, please refer to the relevant description in Embodiment 1, which will not be elaborated here.
[0115] It should be noted that the second communication end receiving the interrupt signal sent by the first communication end through the data transfer end can be understood as: the second communication end directly communicates with the first communication end and receives the interrupt signal sent by the first communication end; or, the first communication end generates an interrupt signal and sends the interrupt signal to the data transfer end, and then the data transfer end sends the interrupt signal to the communication ends other than the first communication end to notify the communication ends other than the first communication end that the first communication end has stored the target data in the shared message pool of the data transfer end, and the communication ends other than the first communication end can obtain the target data from the shared message pool of the data transfer end; or, after the data transfer end detects that the target data has been stored in the shared message pool, the data transfer end generates an interrupt signal by itself and sends the interrupt signal to the communication ends other than the first communication end to notify the communication ends other than the first communication end that the first communication end has stored the target data in the shared message pool of the data transfer end, and the communication ends other than the first communication end can obtain the target data from the shared message pool of the data transfer end; or, the second communication end actively accesses the data transfer end, and after the data transfer end receives the access of the second communication end, it sends an interrupt signal to the second communication end. Among them, the communication ends other than the first communication end include multiple second communication ends. Each second communication end executes the steps in the embodiment of the present invention.
[0116] 302. The second communication end reads other data included in the target data from the shared message pool according to the identification information included in the target data.
[0117] It can be seen that the Figure 4 described heterogeneous multi-core asynchronous communication method can, after receiving the interrupt signal, read the required data from the shared information pool of the data transfer end, realize communication between heterogeneous multi-cores, and by storing the identification information corresponding to at least one communication receiving end in the shared message pool together, can improve the resource utilization rate of the shared message pool, and is conducive to increasing the number of communication ends according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores.
[0118] In an optional embodiment, the second communication end reads other data included in the target data from the shared message pool according to the identification information included in the target data, including:
[0119] The second communication end determines whether the identification information uniquely corresponding to the target data is stored in the target status register address of the second communication end, and the target status register address is stored in the data transfer end;
[0120] When it is determined that the identification information uniquely corresponding to the target data is stored in the target status register address, the second communication end reads the identification information uniquely corresponding to the target data from the target status register address, and reads other data included in the target data in the shared message pool according to the identification information uniquely corresponding to the target data.
[0121] In this optional embodiment, for the description of the identification information uniquely corresponding to the target data, please refer to the relevant description in the second embodiment above, and will not be repeated here.
[0122] It can be seen that after receiving the interrupt signal, this optional embodiment further determines whether the identification information uniquely corresponding to the data is stored in the status register address where it is located. If so, it directly reads the data in the shared message pool according to the identification information uniquely corresponding to the data, which can improve the accuracy and efficiency of data reading, that is, improve the communication coordination, accuracy and efficiency between the communication sending end and each communication receiving end.
[0123] In another optional embodiment, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0124] When it is determined that the identification information uniquely corresponding to the target data is not stored in the target status register address, the second communication end traverses all the data in the shared message pool according to the identification information included in the target data until the other data included in the target data is traversed.
[0125] In this optional embodiment, it should be noted that after receiving the interrupt signal, data can also be directly read from the shared message pool according to the identification information included in the target data included in the interrupt signal.
[0126] It can be seen that when this optional embodiment determines that the identification information uniquely corresponding to the data is not stored in the status register address where the communication receiving end is located, it further reads the data from the shared message pool according to the identification information included in the target data included in the interrupt signal, which can realize the reading of the data and enrich the data reading method, that is, realize the efficient coordination of communication between multiple communication ends.
[0127] In yet another optional embodiment, after the second communication end reads the identification information uniquely corresponding to the target data from the target status register address, and before the second communication end reads other data included in the target data in the shared message pool according to the identification information uniquely corresponding to the target data, the asynchronous communication method of the heterogeneous multi-core may include the following operations:
[0128] The second communication end determines whether the data valid bit in the data structure where the target data is located is used to indicate that the target data is valid data according to the identification information uniquely corresponding to the target data;
[0129] When it is determined that the data valid bit is used to indicate that the target data is valid data, the second communication end triggers the execution of the above operation of reading other data included in the target data in the shared message pool according to the identification information uniquely corresponding to the target data.
[0130] In this optional embodiment, optionally, when it is determined that the data valid bit is used to indicate that the target data is invalid data, the second communication end ends this process, or feeds back a prompt of invalid data to the first communication end through the data transfer end, or re-executes the above operation of reading other data included in the target data from the shared message pool according to the identification information included in the target data.
[0131] It can be seen that in this optional embodiment, after reading the identification information uniquely corresponding to the data, it is further determined according to the identification information whether the data valid bit in the data structure where the data is located is used to indicate that the data is valid data. If so, the subsequent operation of reading the data according to the identification information uniquely corresponding to the data is triggered, which can reduce the occurrence of reading tampered data, improve the accuracy and reliability of reading valid data, and achieve efficient coordination in communication between multiple communication ends.
[0132] In yet another optional embodiment, after the second communication end reads the identification information uniquely corresponding to the target data from the target status register address, and before the second communication end determines whether the data valid bit in the data structure where the target data is located is used to indicate that the target data is valid data according to the identification information uniquely corresponding to the target data, the asynchronous communication method of the heterogeneous multi-core may include the following operations:
[0133] The second communication end obtains the target lock of the target data structure where the target data is located according to the identification information uniquely corresponding to the target data, switches the idle state of the target lock to the occupied state, and triggers the execution of the above operation of determining whether the data valid bit in the data structure where the target data is located is used to indicate that the target data is valid data according to the identification information uniquely corresponding to the target data.
[0134] In this optional embodiment, for the detailed description of the target lock, please refer to the relevant descriptions in the above Embodiment 1 and Embodiment 2, which will not be repeated here.
[0135] It can be seen that after obtaining the uniquely corresponding identification information of the data, the optional embodiment further switches the idle state of the lock of the data structure where the data is located to the occupied state, and then performs the subsequent operation of determining whether the valid bit of the data in the data structure where the data is located is used to indicate that the data is valid data, which can reduce the occurrence of interference by other data during the process of determining whether the data is valid data. Especially when receiving data sent by multiple communication sending ends, it can improve the judgment stability and accuracy of whether the data is valid data.
[0136] Embodiment 4
[0137] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of another heterogeneous multi-core asynchronous communication method disclosed in the embodiments of the present invention. As Figure 5 shown, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0138] 401. The second communication end receives an interrupt signal sent by the first communication end through the data transfer end, and the interrupt signal is used to prompt the second communication end to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0139] In the embodiments of the present invention, the target data that the first communication end needs to send to the second communication end is stored in the shared message pool of the data transfer end, and the target data includes the identification information corresponding to the second communication end and other data that the second communication end needs to receive.
[0140] 402. The second communication end determines whether the current state of the second communication end is in the idle state. When it is determined that the current state of the second communication end is not in the idle state, step 403 can be triggered; when it is determined that the current state of the second communication end is in the idle state, step 405 can be triggered.
[0141] 403. The second communication end determines whether the importance level of the interrupt signal is greater than the importance level of the current processing event. When it is determined that it is greater than the importance level of the current processing event, step 404 is triggered; when it is determined that it is not greater than the importance level of the current processing event, this process can be ended, or after waiting for the current processing event to end, step 405 can be triggered again.
[0142] 404. Interrupt the current processing event and trigger the execution of step 405.
[0143] 405. The second communication end reads other data included in the target data from the shared message pool according to the identification information included in the target data.
[0144] In an embodiment of the present invention, optionally, after receiving an interrupt signal, the driving register corresponding to the target data is switched to the off state to inform the first communication end that the second communication end has received the target data, and there is no need to keep sending the interrupt signal all the time, so as to free up the communication channel for other communication ends to use, and it is beneficial to reduce the power consumption of the system.
[0145] In the embodiment of the present invention, for the relevant descriptions of steps 401 and 405, please refer to the detailed descriptions of steps 301 and 302 in Embodiment 1, and the embodiment of the present invention will not repeat them here.
[0146] It can be seen that the embodiment of the present invention can further determine whether the current state of the communication receiving end is in the idle state after receiving the interrupt signal. If so, it directly performs the subsequent operation of reading the data from the shared message pool of the data transfer end according to the identification information included in the data; if it is not in the idle state, when it is determined that the importance degree of the interrupt signal is greater than the current processing event, it triggers the subsequent operation of reading the data from the shared message pool of the data transfer end according to the identification information included in the data. It can flexibly process events according to the current state of the communication receiving end without affecting data reading, and improve the flexibility of communication between communication ends.
[0147] In an optional embodiment, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0148] During the process of reading other data included in the target data from the shared message pool according to the identification information included in the target data, the second communication end closes the interrupts of other channels.
[0149] It can be seen that in this optional embodiment, during the process of responding to the interrupt, closing the interrupts of other channels can reduce the occurrence of nested interference during the communication process, and improve the communication stability and coordination between communication ends.
[0150] In another optional embodiment, the heterogeneous multi-core asynchronous communication method may include the following operations:
[0151] After a second communication end reads other data included in the target data based on the identification information uniquely corresponding to the target data from the shared message pool, the state of the data valid bit in the data structure is switched to an invalid state. Further optionally, before switching the state of the data valid bit in the data structure to an invalid state, the asynchronous communication method of the heterogeneous multi-core may include the following operations: determining whether the message structure of the target data structure where the target data is located includes an accessible count. When it is determined that there is an accessible count, determining whether the accessible count has been decremented to 0. If it is 0, triggering the operation of switching the state of the data valid bit in the data structure to an invalid state as described above. If it is not 0, triggering the operation of switching the state of the data valid bit in the data structure to an invalid state until it is decremented to 0. Wherein, each time the target data structure where the target data is located is accessed, its accessible count is decremented by 1.
[0152] It can be seen that in this optional embodiment, after the data is read, the state of the data valid bit in the data structure where the data is located is switched to an invalid state, so as to facilitate the use of the data structure by other communication ends, and further improve the resource utilization rate of the shared message pool; further, before switching the state of the data valid bit to an invalid state, first determining whether the accessible count included in the message structure of the data structure has been decremented to 0 can ensure that each communication end can read the required data, improve the accuracy of switching the state of the data valid bit in the data structure, and further improve the high-efficiency coordination, accuracy and reliability between heterogeneous multi-cores.
[0153] It can be seen that the implementation Figure 5 The described asynchronous communication method of heterogeneous multi-cores can, after receiving an interrupt signal, read the required data from the shared information pool at the data transfer end, realize communication between heterogeneous multi-cores, and by storing the identification information corresponding to at least one communication receiving end in the shared message pool together, can improve the resource utilization rate of the shared message pool, and is conducive to increasing the number of communication ends according to requirements without increasing hardware costs, so as to facilitate communication between more heterogeneous multi-cores; it can also flexibly process events according to the current state of the communication receiving end without affecting data reading, and improve the flexibility of communication between communication ends.
[0154] Embodiment 5
[0155] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of an asynchronous communication method of heterogeneous multi-cores disclosed in an embodiment of the present invention. As Figure 6 shown, the asynchronous communication method of the heterogeneous multi-core may include the following operations:
[0156] 501. When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0157] 502. After the target data is stored in the shared message pool, the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end. The communication ends other than the first communication end include the second communication end, and the number of second communication ends is greater than or equal to 1. The interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0158] 503. Each second communication end receives the interrupt signal sent by the first communication end through the data transfer end and reads the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0159] In the embodiments of the present invention, for the descriptions related to the first communication end, the second communication end, and the data transfer end, please refer to the detailed descriptions in the above Embodiment 1 - Embodiment 4, which will not be elaborated here.
[0160] It can be seen that Figure 6 the described heterogeneous multi - core asynchronous communication method can automatically store the data to be sent in the shared information pool of the data transfer end, and send an interrupt signal to at least one communication end that needs the data through the data transfer end, so that at least one communication end that needs the data can automatically read the required data in the shared information pool after receiving the interrupt signal, which can realize the communication between heterogeneous multi - cores. And by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, it is convenient for at least one communication end that needs the data to read the required data according to the identification information, which can realize the efficient collaborative communication between heterogeneous multi - cores, improve the resource utilization rate of the shared message pool, and is beneficial to increasing the number of communication ends according to the demand without increasing the hardware cost, so as to facilitate the communication between more heterogeneous multi - cores.
[0161] Embodiment 6
[0162] A flowchart of another heterogeneous multi - core asynchronous communication method disclosed in the embodiments of the present invention. The heterogeneous multi - core asynchronous communication method may include the following operations:
[0163] Step 1. When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0164] Step 2: After detecting that the target data is stored in the shared message pool, the data transfer end sends an interruption signal to communication ends other than the first communication end. The communication ends other than the first communication end include the second communication end, and the number of second communication ends is greater than or equal to 1.
[0165] Step 3: Each second communication end receives the interruption signal sent by the data transfer end. The interruption signal is used to prompt the second communication end to read other data included in the target data from the shared message pool according to the identification information included in the target data, and read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0166] In the embodiments of the present invention, for the descriptions related to the first communication end, the second communication end, and the data transfer end, please refer to the detailed descriptions of Embodiment 1 - Embodiment 4 above, and will not be elaborated here.
[0167] It can be seen that implementing the asynchronous communication method of heterogeneous multi - cores in the embodiments of the present invention can automatically store the data to be sent in the shared information pool of the data transfer end, and send an interruption signal to at least one communication end that needs the data through the data transfer end, so that at least one communication end that needs the data automatically reads the required data in the shared information pool after receiving the interruption signal, which can realize the communication between heterogeneous multi - cores. And by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, it is convenient for at least one communication end that needs the data to read the required data according to the identification information, which can realize the efficient collaborative communication between heterogeneous multi - cores, improve the resource utilization rate of the shared message pool, and is conducive to increasing the number of communication ends according to the demand without increasing the hardware cost, so as to facilitate the communication between more heterogeneous multi - cores.
[0168] Embodiment 7
[0169] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an asynchronous communication device for heterogeneous multi - cores disclosed in the embodiments of the present invention. As Figure 7 shown, the asynchronous communication device for heterogeneous multi - cores may include a storage module 601 and a sending module 602, where:
[0170] The storage module 601 is used to store the target data to be sent in the shared message pool of the data transfer end when it is determined that data needs to be stored. The target data includes the identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0171] A sending module 602, configured to send an interrupt signal to communication ends other than the first communication end through a data relay end after the target data is stored in the shared message pool. The communication ends other than the first communication end include a second communication end, and the number of second communication ends is greater than or equal to 1.
[0172] Wherein, the interrupt signal is used to prompt each second communication end to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0173] It can be seen that implementing Figure 6 the described heterogeneous multi-core asynchronous communication device can automatically store the data to be sent in the shared information pool of the data relay end, and send an interrupt signal to at least one communication end that needs the data through the data relay end, so that at least one communication end that needs the data automatically reads the required data in the shared information pool after receiving the interrupt signal, can realize communication between heterogeneous multi-cores, and by storing the identification information corresponding to at least one communication end that needs the data in the shared message pool together, so that at least one communication end that needs the data can read the required data according to the identification information, can realize efficient collaborative communication between heterogeneous multi-cores, and can improve the resource utilization rate of the shared message pool, and is beneficial to increasing the number of communication ends according to requirements without increasing the hardware cost, so as to facilitate communication between more heterogeneous multi-cores.
[0174] In another optional embodiment, as Figure 8 shown, the storage module 601 includes: an acquisition sub-module 6011, a writing sub-module 6012, and a storage sub-module 6013, wherein:
[0175] The acquisition sub-module 6011 is configured to acquire a data structure in an idle state from the shared message pool of the data relay end.
[0176] The writing sub-module 6012 is configured to write the target data to be sent into the data structure to obtain a target data structure.
[0177] The storage sub-module 6013 is configured to store the target data structure in the shared message pool.
[0178] It can be seen that implementing Figure 8 the described heterogeneous multi-core asynchronous communication device can, when it is determined that data needs to be stored, write the data to be stored into the data structure in an idle state in the shared message pool of the data relay end, can realize storing the data in the shared message pool of the data relay end, and by writing the data into the data structure according to the corresponding message structure, can improve the accuracy and efficiency of data writing, thereby being beneficial to improving the efficient collaboration of one-to-many data communication.
[0179] In another alternative embodiment, as Figure 8 shown, the acquisition sub-module 6011 includes: an acquisition unit 60111, a query unit 60112, and a determination unit 60113, where:
[0180] The acquisition unit 60111 is configured to acquire a target lock in an idle state from the shared message pool of the data transfer end.
[0181] The query unit 60112 is configured to query, according to the determined correspondence between the lock-data structure, the data structure corresponding to the target lock in all data structures of the shared message pool.
[0182] The determination unit 60113 is configured to determine the data structure corresponding to the target lock as the data structure in an idle state.
[0183] It can be seen that implementing Figure 8 the described heterogeneous multi-core asynchronous communication device can determine, according to the correspondence between the lock-data structure, the data structure corresponding to the lock in an idle state as the data structure in an idle state, can implement the determination of the required data structure, and improve the determination accuracy and efficiency of the required data structure, thereby improving the storage accuracy and efficiency of data; and set a uniquely corresponding lock for each data structure, so that the communication end can directly access the data structure separately through the lock, reduce the occurrence of data being erased or stored in a mess due to the misuse of the data structure, and further improve the storage accuracy, reliability and flexibility of data; and by making full use of the resources of each data structure, that is, making full use of the resources of the shared message pool, it is possible to reduce the occurrence of the situation where some communication channels are idle and some are overloaded due to the different degrees of interaction frequency between communication ends, improve the resource utilization rate of the shared message pool, and further improve the communication coordination and efficiency between multiple communication ends.
[0184] In yet another alternative embodiment, as Figure 8 shown, the acquisition sub-module 6011 further includes: a judgment unit 60114, where:
[0185] The acquisition unit 60111 is further configured to acquire the data valid bit of the data structure corresponding to the target lock after the query unit 60112 queries the data structure corresponding to the target lock in all data structures of the shared message pool according to the determined correspondence between the lock-data structure, and before the determination unit 60113 determines the data structure corresponding to the target lock as the data structure in an idle state.
[0186] The judgment unit 60114 is configured to judge whether the data valid bit is used to indicate whether the data structure corresponding to the target lock is in an idle state.
[0187] Determination unit 60113, specifically configured to:
[0188] When the determination unit 60114 determines that the data valid bit is used to indicate that the data structure corresponding to the target lock is in an idle state, determine the data structure corresponding to the target lock as the data structure in the idle state.
[0189] It can be seen that when Figure 8 the described heterogeneous multi-core asynchronous communication device queries the data structure corresponding to the target lock, it further determines whether the data valid bit is used to indicate that the data structure corresponding to the target lock is in an idle state. If so, it continues to execute subsequent operations, which can improve the execution accuracy and reliability of subsequent operations.
[0190] In another alternative embodiment, as Figure 8 shown, the device further includes: a determination module 603 and a writing module 604, where:
[0191] The determination module 603 is configured to determine, among all the status register addresses of the data transfer end, the target status register address that matches each second communication end after the storage module 601 stores the target data in the shared message pool and before the sending module 602 sends an interrupt signal to the communication ends other than the first communication end through the data transfer end.
[0192] The writing module 604 is configured to write the identification information unique to the target data into each target status register address and trigger the sending module 602 to perform the above operation of sending an interrupt signal to the communication ends other than the first communication end through the data transfer end.
[0193] It can be seen that when Figure 8 the described heterogeneous multi-core asynchronous communication device stores data in the shared message pool, it further stores the identification information unique to the data in the status register address that matches the communication receiving end first, so that the communication receiving end can obtain the identification information unique to the data from its matching status register address and then read the data, which can improve the reading accuracy and efficiency of the data, that is, improve the communication coordination, accuracy, and efficiency between the communication sending end and each communication receiving end.
[0194] Embodiment VIII
[0195] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of another heterogeneous multi-core asynchronous communication device disclosed in the embodiments of the present invention. As Figure 9 shown, the heterogeneous multi-core asynchronous communication device may include a receiving module 801 and a reading module 802, where:
[0196] A receiving module 801 is configured to receive an interrupt signal sent by a first communication end through a data relay end. In a shared message pool of the data relay end, there is target data that the first communication end needs to send to a second communication end. The target data includes identification information corresponding to the second communication end and other data that the second communication end needs to receive. The interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data.
[0197] A reading module 802 is configured to read all other data included in the target data from the shared message pool according to the identification information included in the target data.
[0198] It can be seen that Figure 9 the described heterogeneous multi-core asynchronous communication device can, after receiving the interrupt signal, read the required data from the shared information pool of the data relay end, thereby enabling communication between heterogeneous multi-cores. And by storing the identification information corresponding to at least one communication receiving end in the shared message pool, it can improve the resource utilization rate of the shared message pool, and is conducive to increasing the number of communication ends according to requirements without increasing hardware costs, so as to facilitate communication between more heterogeneous multi-cores.
[0199] In another optional embodiment, as Figure 10 shown, the reading module 802 includes: a judgment sub-module 8021 and a reading sub-module 8022, where:
[0200] The judgment sub-module 8021 is configured to judge whether the identification information uniquely corresponding to the target data is stored in the target status register address of the second communication end, and the target status register address is stored in the data relay end.
[0201] The reading sub-module 8022 is configured to, when the judgment sub-module 8021 judges that the identification information uniquely corresponding to the target data is stored in the target status register address, read the identification information uniquely corresponding to the target data from the target status register address.
[0202] The reading sub-module 8022 is further configured to read all other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data.
[0203] It can be seen that Figure 10 the described heterogeneous multi-core asynchronous communication device can, after receiving the interrupt signal, further judge whether the status register address where it is located stores the identification information uniquely corresponding to the data. If so, directly read the data from the shared message pool according to the identification information uniquely corresponding to the data, which can improve the accuracy and efficiency of data reading, that is, improve the communication coordination, accuracy and efficiency between the communication sending end and each communication receiving end.
[0204] In another alternative embodiment, as Figure 10 shown, the reading module 802 further includes: a traversing sub-module 8023, where:
[0205] The traversing sub-module 8023 is configured to, when the determination sub-module 8021 determines that the target status register address does not store the identification information uniquely corresponding to the target data, traverse all the data in the shared message pool according to the identification information included in the target data until other data included in the target data is traversed.
[0206] It can be seen that when the heterogeneous multi-core asynchronous communication device described in Figure 10 determines that the status register address where the communication receiving end is located does not store the identification information uniquely corresponding to the data, and further reads the data from the shared message pool according to the identification information included in the target data included in the interrupt signal, it can implement the reading of the data, enrich the data reading method, that is, realize the efficient coordination between multiple communication ends.
[0207] In yet another alternative embodiment, as Figure 10 shown, the determination sub-module 8021 is further configured to, after the reading sub-module 8022 reads the identification information uniquely corresponding to the target data from the target status register address, and before the reading sub-module 8022 reads other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data, determine whether the data valid bit in the data structure where the target data is located is used to indicate that the target data is valid data according to the identification information uniquely corresponding to the target data; when it is determined that the data valid bit is used to indicate that the target data is valid data, trigger the reading sub-module 8022 to perform the above operation of reading other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data.
[0208] It can be seen that when the heterogeneous multi-core asynchronous communication device described in Figure 10 reads the identification information uniquely corresponding to the data, and further determines whether the data valid bit in the data structure where the data is located is used to indicate that the data is valid data according to the identification information, if so, trigger the subsequent operation of reading the data according to the identification information uniquely corresponding to the data, which can reduce the occurrence of reading tampered data, improve the accuracy and reliability of reading valid data, and realize the efficient coordination between multiple communication ends.
[0209] In yet another alternative embodiment, as Figure 10 shown, the device further includes: a determination module 803 and an interrupt module 804, where:
[0210] A determination module 803, configured to determine whether the current state of a second communication end is in an idle state after a receiving module 801 receives an interrupt signal sent by a first communication end through a data relay end and before a reading module 802 reads other data included in target data from a shared message pool according to identification information included in the target data; when it is determined that the current state of the second communication end is in an idle state, trigger the reading module 802 to perform the above operation of reading other data included in the target data from the shared message pool according to the identification information included in the target data.
[0211] The determination module 803 is further configured to, when it is determined that the current state of the second communication end is not in an idle state, determine whether the importance level corresponding to the interrupt signal is greater than the importance level of the current processing event.
[0212] An interrupt module 804, configured to, when the determination module 803 determines that it is greater than the importance level of the current processing event, interrupt the current processing event and trigger the reading module 802 to perform the above operation of reading other data included in the target data from the shared message pool according to the identification information included in the target data.
[0213] It can be seen that after the heterogeneous multi-core asynchronous communication device described in the implementation Figure 10 receives an interrupt signal, it further determines whether the current state of the communication receiving end is in an idle state. If so, it directly performs the subsequent operation of reading data from the shared message pool of the data relay end according to the identification information included in the data; if it is not in an idle state, when it is determined that the importance level corresponding to the interrupt signal is greater than the current processing event, it triggers the execution of the subsequent operation of reading data from the shared message pool of the data relay end according to the identification information included in the data, which can flexibly process events according to the current state of the communication receiving end without affecting data reading, and improve the flexibility of communication between communication ends.
[0214] Embodiment Nine
[0215] Please refer to Figure 11 , Figure 11 which is a schematic structural diagram of another heterogeneous multi-core asynchronous communication device disclosed in an embodiment of the present invention. As Figure 11 shown, the heterogeneous multi-core asynchronous communication device may include a first communication end 1101 and a second communication end 1102, where:
[0216] The first communication end 1101, when it is determined that data needs to be stored, is configured to store target data to be sent in a shared message pool of a data relay end, where the target data includes identification information corresponding to the second communication end that needs to receive the target data and other data that the second communication end needs to receive.
[0217] The first communication terminal 1101 is configured to send an interrupt signal to communication terminals other than the first communication terminal through a data transfer terminal after the target data is stored in the shared message pool. The communication terminals other than the first communication terminal include a second communication terminal, and the number of second communication terminals is greater than or equal to 1. The interrupt signal is used to prompt each second communication terminal to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0218] Each second communication terminal 1102 is configured to receive the interrupt signal sent by the first communication terminal through the data transfer terminal, and read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0219] It can be seen that implementing Figure 11 the described heterogeneous multi-core asynchronous communication device can automatically store the data to be sent in the shared information pool of the data transfer terminal, and send an interrupt signal to at least one communication terminal that needs the data through the data transfer terminal, so that at least one communication terminal that needs the data can automatically read the required data in the shared information pool after receiving the interrupt signal, enabling communication between heterogeneous multi-cores. And by storing the identification information corresponding to at least one communication terminal that needs the data in the shared message pool together, it is convenient for at least one communication terminal that needs the data to read the required data according to the identification information, enabling efficient cooperative communication between heterogeneous multi-cores, improving the resource utilization rate of the shared message pool, and facilitating increasing the number of communication terminals according to requirements without increasing hardware costs, so as to facilitate communication between more heterogeneous multi-cores.
[0220] Embodiment Ten
[0221] Another heterogeneous multi-core asynchronous communication device disclosed in an embodiment of the present invention may include a first communication terminal, a data transfer terminal, and a second communication terminal, where:
[0222] The first communication terminal is configured to store the target data to be sent in the shared message pool of the data transfer terminal when it is determined that data needs to be stored. The target data includes the identification information corresponding to the second communication terminal that needs to receive the target data and other data that the second communication terminal needs to receive.
[0223] The data transfer terminal is configured to send an interrupt signal to communication terminals other than the first communication terminal after the first communication terminal detects that the target data is stored in the shared message pool. The communication terminals other than the first communication terminal include a second communication terminal, and the number of second communication terminals is greater than or equal to 1.
[0224] Each second communication terminal is configured to receive an interrupt signal sent by the data relay terminal. The interrupt signal is used to prompt the second communication terminal to read other data included in the target data from the shared message pool according to the identification information included in the target data, and to read other data included in the target data from the shared message pool according to the identification information included in the target data.
[0225] It can be seen that the heterogeneous multi-core asynchronous communication device can automatically store the data to be sent in the shared information pool of the data relay terminal, and send an interrupt signal to at least one communication terminal that needs the data through the data relay terminal, so that at least one communication terminal that needs the data can automatically read the required data in the shared information pool after receiving the interrupt signal, enabling communication between heterogeneous multi-cores. Also, by storing the identification information corresponding to at least one communication terminal that needs the data in the shared message pool, it is convenient for at least one communication terminal that needs the data to read the required data according to the identification information, enabling efficient collaborative communication between heterogeneous multi-cores, improving the resource utilization rate of the shared message pool, and facilitating the addition of the number of communication terminals according to requirements without increasing hardware costs, so as to enable communication between more heterogeneous multi-cores.
[0226] Embodiment XI
[0227] Please refer to Figure 12 , Figure 12 which is another heterogeneous multi-core asynchronous communication device disclosed in the embodiments of the present invention. As Figure 12 shown, the heterogeneous multi-core asynchronous communication device may include:
[0228] A memory 1201 storing executable program code;
[0229] A processor 1202 coupled to the memory 1201;
[0230] Further, it may further include an input interface 1203 and an output interface 1204 coupled to the processor 1202;
[0231] Among them, the processor 1202 calls the executable program code stored in the memory 1201 to execute the steps of the heterogeneous multi-core asynchronous communication method described in Embodiment 1 or Embodiment 2.
[0232] Embodiment XII
[0233] The embodiments of the present invention disclose a computer-readable storage medium that stores a computer program for electronic data exchange. Among them, the computer program causes the computer to execute the steps of the heterogeneous multi-core asynchronous communication method described in Embodiment 1 or Embodiment 2.
[0234] Embodiment XIII
[0235] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the asynchronous communication method for heterogeneous multi-cores described in Embodiment 1 or Embodiment 2.
[0236] Embodiment 14
[0237] Please refer to Figure 13 , Figure 13 which is another asynchronous communication device for heterogeneous multi-cores disclosed in the embodiments of the present invention. Figure 13 Figure 13 As shown in
[0238] a memory 1301 storing executable program code;
[0239] a processor 1302 coupled to the memory 1301;
[0240] Further, it may further include an input interface 1303 and an output interface 1304 coupled to the processor 1302;
[0241] wherein the processor 1302 calls the executable program code stored in the memory 1301 to execute the steps of the asynchronous communication method for heterogeneous multi-cores described in Embodiment 3 or Embodiment 4.
[0242] Embodiment 15
[0243] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps of the asynchronous communication method for heterogeneous multi-cores described in Embodiment 3 or Embodiment 4.
[0244] Embodiment 16
[0245] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the asynchronous communication method for heterogeneous multi-cores described in Embodiment 3 or Embodiment 4.
[0246] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0247] Through the specific descriptions of the above embodiments, those skilled in the art can clearly understand that each implementation manner can be realized by means of software plus a necessary general hardware platform, and of course, it can also be realized by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.
[0248] Finally, it should be noted that: The asynchronous communication method and device of a heterogeneous multi-core disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them; Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An asynchronous communication method for heterogeneous multi - cores, characterized in that, The method includes: When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes identification information corresponding to multiple second communication ends that need to receive the target data and other data that needs to be received by the multiple second communication ends. Among them, the identification information corresponding to each second communication end includes the determined broadcast identification for this second communication end. After the target data is stored in the shared message pool, the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end. The communication ends other than the first communication end include the second communication ends, and the number of the second communication ends is greater than 1. Among them, the interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data. After the target data is stored in the shared message pool and before the first communication end sends an interrupt signal to the communication ends other than the first communication end through the data transfer end, the method includes: The first communication end determines the target status register address that matches each second communication end among all the status register addresses of the data transfer end. The first communication end writes the identification information unique to the target data into each target status register address and triggers the operation of sending an interrupt signal to the communication ends other than the first communication end through the data transfer end.
2. The heterogeneous multi-core asynchronous communication method according to claim 1, wherein The first communication end storing the target data to be sent in the shared message pool of the data transfer end includes: The first communication end obtains a data structure in an idle state from the shared message pool of the data transfer end and writes the target data to be sent into the data structure to obtain a target data structure. The first communication end stores the target data structure in the shared message pool.
3. The asynchronous communication method for heterogeneous multi-core according to claim 2, wherein The first communication end obtaining a data structure in an idle state from the data transfer end includes: The first communication end obtains a target lock in an idle state from the shared message pool of the data transfer end. The first communication end queries the data structure corresponding to the target lock among all the data structures in the shared message pool according to the determined correspondence between the lock and the data structure and determines the data structure corresponding to the target lock as the data structure in an idle state.
4. The asynchronous communication method for heterogeneous multi-core according to claim 3, wherein After the first communication end queries the data structure corresponding to the target lock among all the data structures in the shared message pool according to the determined correspondence between the lock and the data structure and before the first communication end determines the data structure corresponding to the target lock as the data structure in an idle state, the method further includes: The first communication end obtains the data valid bit of the data structure corresponding to the target lock and determines whether the data valid bit is used to indicate whether the data structure corresponding to the target lock is in an idle state. When it is determined that the data valid bit is used to indicate that the data structure corresponding to the target lock is in an idle state, the first communication end triggers the operation of determining the data structure corresponding to the target lock as the data structure in the idle state.
5. An asynchronous communication method for heterogeneous multi-core, characterized in that, The method includes: The second communication end receives an interrupt signal sent by the first communication end through a data transfer end. In the shared message pool of the data transfer end, there is target data that the first communication end needs to send to multiple second communication ends simultaneously. The target data includes the identification information corresponding to the second communication end and other data that the second communication end needs to receive. The interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data. The identification information corresponding to the second communication end includes the determined broadcast identification for the second communication end. The second communication end reads the other data included in the target data from the shared message pool according to the identification information included in the target data. Among them, the second communication end reads the other data included in the target data from the shared message pool according to the identification information included in the target data, including: The second communication end determines whether the identification information uniquely corresponding to the target data is stored in the target status register address of the second communication end. The target status register address is stored in the data transfer end. When it is determined that the identification information uniquely corresponding to the target data is stored in the target status register address, the second communication end reads the identification information uniquely corresponding to the target data from the target status register address, and reads the other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data.
6. The asynchronous communication method for heterogeneous multi-core according to claim 5, wherein The method further includes: When it is determined that the identification information uniquely corresponding to the target data is not stored in the target status register address, the second communication end traverses all the data in the shared message pool according to the identification information included in the target data until the other data included in the target data is traversed.
7. The asynchronous communication method for heterogeneous multi-core according to claim 5 or 6, characterized in that After the second communication end reads the identification information uniquely corresponding to the target data from the target status register address, and before the second communication end reads the other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data, the method further includes: The second communication end determines whether the data valid bit in the data structure where the target data is located is used to indicate that the target data is valid data according to the identification information uniquely corresponding to the target data. When it is determined that the data valid bit is used to indicate that the target data is valid data, the second communication end triggers the operation of reading the other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data.
8. The heterogeneous multi-core asynchronous communication method according to claim 5 or 6, characterized in that, Before the second communication end receives the interrupt signal sent by the first communication end through the data transfer end and before the second communication end reads the other data included in the target data from the shared message pool according to the identification information included in the target data, the method further includes: The second communication end determines whether the current state of the second communication end is in an idle state. When it is determined that the current state of the second communication end is in an idle state, an operation of reading the other data included in the target data from the shared message pool according to the identification information included in the target data is triggered to be executed; When it is determined that the current state of the second communication end is not in an idle state, the second communication end determines whether the importance level corresponding to the interrupt signal is greater than the importance level of the current processing event. When it is determined that it is greater than the importance level of the current processing event, the current processing event is interrupted, and an operation of reading the other data included in the target data from the shared message pool according to the identification information included in the target data is triggered to be executed.
9. An asynchronous communication method for heterogeneous multi-cores, characterized in that, The method includes: When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes identification information corresponding to a plurality of second communication ends that need to receive the target data and other data that needs to be received by the plurality of second communication ends; wherein, the identification information corresponding to each second communication end includes a determined broadcast identification for this second communication end; After the target data is stored in the shared message pool, the first communication end sends an interrupt signal to communication ends other than the first communication end through the data transfer end. The communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than 1. The interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data; Each second communication end receives the interrupt signal sent by the first communication end through the data transfer end and reads the other data included in the target data from the shared message pool according to the identification information included in the target data; After the target data is stored in the shared message pool and before the first communication end sends an interrupt signal to communication ends other than the first communication end through the data transfer end, the method includes: The first communication end determines a target status register address matching each second communication end among all status register addresses of the data transfer end; The first communication end writes the identification information unique to the target data into each target status register address and triggers the execution of the operation of sending an interrupt signal to communication ends other than the first communication end through the data transfer end.
10. An asynchronous communication method for heterogeneous multi-core, characterized in that, The method includes: When it is determined that data needs to be stored, the first communication end stores the target data to be sent in the shared message pool of the data transfer end. The target data includes the identification information corresponding to multiple second communication ends that need to receive the target data and other data that the second communication ends need to receive. Among them, the identification information corresponding to the second communication end includes the determined broadcast identification for the second communication end. After detecting that the target data is stored in the shared message pool, the data transfer end sends an interrupt signal to the communication ends other than the first communication end. The communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than 1. For each of the second communication ends, the second communication end receives the interrupt signal sent by the data transfer end. The interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data, and to read the other data included in the target data from the shared message pool according to the identification information included in the target data. After the target data is stored in the shared message pool and before the data transfer end sends an interrupt signal to the communication ends other than the first communication end, the method includes: The first communication end determines the target status register address that matches each of the second communication ends among all the status register addresses of the data transfer end. The first communication end writes the identification information unique to the target data into each of the target status register addresses and triggers the data transfer end to perform the operation of sending an interrupt signal to the communication ends other than the first communication end.
11. An asynchronous communication device with heterogeneous multi-cores, characterized in that, The device is applied to the first communication end, and the device includes: A storage module, configured to store the target data to be sent in the shared message pool of the data transfer end when it is determined that data needs to be stored. The target data includes the identification information corresponding to multiple second communication ends that need to receive the target data and other data that the multiple second communication ends need to receive. Among them, the identification information corresponding to each second communication end includes the determined broadcast identification for the second communication end. A sending module, configured to send an interrupt signal to the communication ends other than the first communication end through the data transfer end after the target data is stored in the shared message pool. The communication ends other than the first communication end include the second communication end, and the number of the second communication ends is greater than 1. Among them, the interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data. A determination module, configured to determine the target status register address that matches each of the second communication ends among all the status register addresses of the data transfer end after the storage module stores the target data in the shared message pool and before the sending module sends an interrupt signal to the communication ends other than the first communication end through the data transfer end. A writing module, configured to write the identification information uniquely corresponding to the target data into each of the target status register addresses, and trigger the sending module to perform the operation of sending an interrupt signal to communication ends other than the first communication end through the data transfer end.
12. An asynchronous communication device for heterogeneous multi - cores, characterized in that, The device is applied to a second communication end, and the device includes: A receiving module, configured to receive an interrupt signal sent by a first communication end through a data transfer end. In a shared message pool of the data transfer end, there is target data that the first communication end needs to send to multiple second communication ends simultaneously. The target data includes the identification information corresponding to the second communication end and other data that the second communication end needs to receive. The interrupt signal is used to prompt the second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data; wherein, the identification information corresponding to the second communication end includes a determined broadcast identifier for the second communication end. A reading module, configured to read the other data included in the target data from the shared message pool according to the identification information included in the target data. The reading module includes: a judgment sub-module and a reading sub-module, wherein: The judgment sub-module is configured to judge whether the identification information uniquely corresponding to the target data is stored in the target status register address of the second communication end, and the target status register address is stored in the data transfer end. The reading sub-module is configured to, when the judgment sub-module judges that the identification information uniquely corresponding to the target data is stored in the target status register address, read the identification information uniquely corresponding to the target data from the target status register address. The reading sub-module is further configured to read the other data included in the target data from the shared message pool according to the identification information uniquely corresponding to the target data.
13. An asynchronous communication device for heterogeneous multi-cores, characterized in that, The device includes: A first communication end, configured to, when it is determined that data needs to be stored, store target data to be sent in a shared message pool of a data transfer end. The target data includes the identification information corresponding to multiple second communication ends that need to receive the target data and other data that the multiple second communication ends need to receive; wherein, the identification information corresponding to each second communication end includes a determined broadcast identifier for the second communication end. The first communication end is further configured to, after the target data is stored in the shared message pool, send an interrupt signal to communication ends other than the first communication end through the data transfer end. The communication ends other than the first communication end include the second communication end, and the number of second communication ends is greater than 1. The interrupt signal is used to prompt each second communication end to read the other data included in the target data from the shared message pool according to the identification information included in the target data. Each second communication end is configured to receive the interrupt signal sent by the first communication end through the data transfer end, and read the other data included in the target data from the shared message pool according to the identification information included in the target data. The first communication terminal is further configured to, after the target data is stored in the shared message pool and before sending an interrupt signal to communication terminals other than the first communication terminal through the data transfer terminal, determine target status register addresses matching each of the second communication terminals among all the status register addresses of the data transfer terminal; The first communication terminal is further configured to write the identification information unique to the target data into each of the target status register addresses, and trigger the operation of sending an interrupt signal to communication terminals other than the first communication terminal through the data transfer terminal.
14. An asynchronous communication device for heterogeneous multi-core, characterized in that, The device includes: A first communication terminal, configured to store target data to be sent in a shared message pool of a data transfer terminal when it is determined that data needs to be stored, where the target data includes identification information corresponding to a plurality of second communication terminals that need to receive the target data and other data that the second communication terminals need to receive; wherein, the identification information corresponding to each second communication terminal includes a determined broadcast identification for the second communication terminal; The data transfer terminal is configured to send an interrupt signal to communication terminals other than the first communication terminal after detecting that the first communication terminal stores the target data in the shared message pool, and the communication terminals other than the first communication terminal include the second communication terminals, and the number of the second communication terminals is greater than 1; Each of the second communication terminals is configured to receive the interrupt signal sent by the data transfer terminal, and the interrupt signal is used to prompt the second communication terminal to read the other data included in the target data from the shared message pool according to the identification information included in the target data, and read the other data included in the target data from the shared message pool according to the identification information included in the target data; The first communication terminal is further configured to, after the target data is stored in the shared message pool and before the data transfer terminal sends an interrupt signal to communication terminals other than the first communication terminal, determine target status register addresses matching each of the second communication terminals among all the status register addresses of the data transfer terminal; The first communication terminal is further configured to write the identification information unique to the target data into each of the target status register addresses, and trigger the data transfer terminal to perform the operation of sending an interrupt signal to communication terminals other than the first communication terminal.
15. An asynchronous communication device for heterogeneous multi-cores, characterized in that, The device is applied to a first communication terminal, and the device includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes the heterogeneous multi-core asynchronous communication method according to any one of claims 1-4.
16. An asynchronous communication device for heterogeneous multi-cores, characterized in that, The device is applied to a second communication terminal, and the device includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes the heterogeneous multi-core asynchronous communication method according to any one of claims 5-8.
Citation Information
Patent Citations
Communication scheduling system and method among cores of isomerization multi-core processor
CN101354693A