Processor system, inter-core communication method, processor and storage unit

By using local storage units and storage unit groups in the processor system, and combining write operation address information and read operation address information to manage storage space, the problem of late emergency message processing and low response efficiency in inter-core communication is solved, and high efficiency is achieved. Improved data transmission and response efficiency.

CN112799587BActive Publication Date: 2024-10-25伟光有限公司(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011340441.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2024-10-25
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

In the design of high-performance on-chip systems, since messages are sent and processed in a queue mode in inter-core communication, emergency message processing is not timely and response efficiency is low. It is necessary to improve the response efficiency of receiving verification messages on the basis of ensuring transmission efficiency. .

Method used

By introducing local storage units and storage unit groups into the processor system, the write operation address information and read operation address information are used to manage the storage space, ensuring data transmission delay and response efficiency, and achieving continuous and timely message writing and reading.

Benefits of technology

Effectively control data transmission delay, improve data transmission efficiency and response efficiency, and ensure that the processor system can handle emergency messages in a timely manner in high-performance SOC design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112799587B_ABST
    Figure CN112799587B_ABST
Patent Text Reader

Abstract

Provided are a processor system, an inter-core communication method, a processor, and a storage unit. The processor system comprises: a first processor; a second processor, wherein the second processor comprises a local storage unit and a storage unit group; the first processor performs a write operation on the local storage unit according to address information stored in the storage unit group, and the second processor performs a read operation on data written by the first processor to the local storage unit according to the address information stored in the storage unit group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of inter-core communication, and more specifically, to a processor system, an inter-core communication method, a processor, and a storage unit. Background Art

[0002] With the continuous development of integrated circuit technology and the continuous refinement of application scenarios, the market has higher and higher requirements for the performance and integration of System on Chip (SOC). In the design process of high-performance SOC, inter-core communication technology plays a key role and directly affects the overall performance of SOC. With the integration of different types of central processing units (CPUs) in SOC, inter-core communication has become more and more complex and diverse, and the requirements for transmission performance have become higher and higher.

[0003] Normally, the sending core and the receiving core each maintain a message queue in the local storage space. The sending core sends messages in sequence by sending the message queue, and the receiving core reads messages in sequence by receiving the message queue. Inter-core communication through local storage can reduce data access latency and improve data transmission efficiency.

[0004] However, with the development of technology, there is a need to further improve data transmission efficiency.

[0005] In addition, since the sending and processing of messages are performed in sequence in a queue manner, the sending and verification of urgent messages may not be processed in a timely manner and the response efficiency of receiving and verification of urgent messages may be too low.

[0006] Therefore, how to improve the response efficiency of receiving and verifying messages while ensuring transmission efficiency is a technical problem that urgently needs to be solved in this field. Summary of the invention

[0007] Provided are a processor system, an inter-core communication method, a processor, and a storage unit, which can improve the response efficiency to messages while ensuring the transmission efficiency.

[0008] In a first aspect, a processor system is provided, comprising:

[0009] a first processor;

[0010] The second processor includes a local storage unit and a storage unit group; the first processor writes to the local storage unit according to the address information stored in the storage unit group, and the second processor reads the data written to the local storage unit by the first processor according to the address information stored in the storage unit group.

[0011] In a second aspect, a method for inter-core communication is provided, comprising:

[0012] The first processor acquires write operation address information and read operation address information, wherein the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit of the second processor, and the read operation address information is used to indicate the latest read position of the second processor in the storage space;

[0013] The first processor determines whether there is available space in the storage space based on the latest read position and the latest write position;

[0014] If the storage space has the available space, the first processor writes the message to be written into the available space.

[0015] In a third aspect, an inter-core communication method is provided, which is applied to a second processor, wherein the second processor includes a local storage unit and a write operation address information storage unit, including:

[0016] The second processor reads the write operation address information from the write operation address information storage unit, where the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit;

[0017] The second processor reads the message stored in the storage space based on the write operation address information.

[0018] In a fourth aspect, a method for inter-core communication is provided, comprising:

[0019] The write operation address information storage unit stores write operation address information, where the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit of the second processor.

[0020] In a fifth aspect, a method for inter-core communication is provided, comprising:

[0021] The read operation address information storage unit stores read operation address information, where the read operation address information is used to indicate a latest read position of the second processor in a storage space of the local storage unit of the second processor.

[0022] In a sixth aspect, a processor is provided, configured to execute the method in the second aspect or its respective implementations. Specifically, the first processor includes a functional module configured to execute the method in the second aspect or its respective implementations.

[0023] In a seventh aspect, a processor is provided, configured to execute the method in the third aspect or its respective implementations. Specifically, the second processor includes a functional module configured to execute the method in the third aspect or its respective implementations.

[0024] In an eighth aspect, a write operation address information storage unit is provided, which is used to execute the method in the fourth aspect or its implementations. Specifically, the write operation address information storage unit includes a functional module for executing the method in the fourth aspect or its implementations.

[0025] In a ninth aspect, a read operation address information storage unit is provided, which is used to execute the method in the fifth aspect or its implementations. Specifically, the read operation address information storage unit includes a functional module for executing the method in the fifth aspect or its implementations.

[0026] In a tenth aspect, a chip is provided for implementing the method in any one of the second to fifth aspects or in each of its implementations. Specifically, the chip includes: a processor for calling and running a computer program from a local storage unit, so that a device equipped with the chip executes the method in any one of the second to fifth aspects or in each of its implementations.

[0027] In the eleventh aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method in any one of the second to fifth aspects or any of its implementations.

[0028] Based on the above technical solution, on the one hand, by storing the messages to be written in the storage space of the local storage unit of the second processor, the data transmission delay can be controlled, thereby ensuring the data transmission efficiency. On the other hand, through the address information stored in the storage unit group, the first processor and the second processor can continuously and timely write messages in the storage space. Accordingly, the data transmission efficiency can be further improved, and the data response efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic block diagram of an inter-core communication system based on a local storage unit provided in an embodiment of the present application.

[0030] Figure 2 It is a schematic block diagram of an inter-core communication system based on shared memory and storage units provided in an embodiment of the present application.

[0031] Figure 3 is based on Figure 2 A schematic flow chart of the inter-core communication method of the system shown.

[0032] Figure 4 It is a schematic block diagram of a system for inter-core communication provided in an embodiment of the present application.

[0033] Figure 5 yes Figure 4 A schematic block diagram of a local storage unit and a storage unit is shown.

[0034] Figures 6 to 11 It is a schematic flowchart of the inter-core communication method provided in an embodiment of the present application.

[0035] Fig.12 It is a schematic block diagram of the first processor provided in an embodiment of the present application.

[0036] Fig.13 It is a schematic block diagram of the second processor provided in an embodiment of the present application.

[0037] Fig.14 It is a schematic block diagram of a write operation address information storage unit provided in an embodiment of the present application.

[0038] Fig.15 It is a schematic block diagram of a read operation address information storage unit provided in an embodiment of the present application.

[0039] Fig.16 It is a schematic block diagram of the chip provided in the embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0041] It should be understood that the embodiments of the present application relate to the field of inter-core communication technology, that is, communication between a first processor and a second processor. The first processor and the second processor may be any type of processor or a device or component with digital processing capabilities.

[0042] For example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0043] For another example, the first processor and the second processor may serve as a sending core and a receiving core in a processor respectively.

[0044] Of course, the first processor or the second processor may also be a device or equipment integrated with a processor.

[0045] Figure 1 It is a schematic block diagram of an inter-core communication system 100 based on a local storage unit provided in an embodiment of the present application.

[0046] like Figure 1 As shown, the communication system 100 may include a first processor 110 and a second processor 120, wherein the first processor 110 includes a local storage unit 111, and the second processor 120 includes a local storage unit 121. The first processor 110 and the second processor 120 may be connected via a bus 130, and the first processor and the second processor 130 may transmit messages via the bus 130.

[0047] For example, the bus 130 includes, but is not limited to, a data bus, a power bus, a control bus, and a status signal bus.

[0048] For example, the first processor 110 maintains a sending message queue in the local storage unit 111, and the second processor 120 maintains a receiving message queue in the local storage unit 121. The first processor 110 sends messages in sequence in the manner of the sending message queue, and the second processor 120 reads messages in sequence in the manner of the receiving message queue. For example, the sending message queue or the receiving message queue includes messages 0 to n in sequence, and each message includes a sender identifier (ID), a receiver ID, control information, other information, and message data. Optionally, the processing task can be determined by the sender ID and the receiver ID, the corresponding processing of the message data can be completed by the control information, and other functions can be extended by other messages.

[0049] For example, after the first processor 110 and the second processor 120 establish a message passing connection, the application of the first processor 110 writes data into the send message queue; the driver of the first processor 110 writes the message into the receive message queue of the second processor 120 in the order of the send message queue; the driver of the second processor 120 parses and reads the message in the order of the receive message queue to complete the inter-core communication.

[0050] The inter-core communication through the local storage unit 111 and the local storage unit 121 can reduce data access delay and improve data transmission efficiency.

[0051] However, with the development of technology, there is a need to further improve data transmission efficiency.

[0052] In addition, since the sending and processing of messages are performed in sequence in a queue manner, urgent messages may not be processed in a timely manner and the response efficiency may be too low.

[0053] The present application provides an inter-core communication system based on a shared memory and an interrupt storage unit, which enables the first processor 110 to process emergency messages in a timely manner.

[0054] Figure 2 It is a schematic block diagram of an inter-core communication system 200 based on a shared memory and an interrupt storage unit provided in an embodiment of the present application.

[0055] like Figure 2 As shown, the inter-core communication system 200 may include a first processor 210, a second processor 220 and a shared memory 240, and the second processor 220 includes an interrupt storage unit 221. The first processor 110 and the second processor 120 are connected via a bus 230, and the first processor and the second processor 130 may transmit messages via the bus 130 and the shared memory 240. For example, the shared memory 240 may be used to store exchanged data; the interrupt storage unit 240 may be used to generate interrupt information, and the interrupt information is used to notify the second processor to read the message.

[0056] For example, the bus 230 includes, but is not limited to, a data bus, a power bus, a control bus, and a status signal bus.

[0057] Figure 3 is based on Figure 2 A schematic flowchart of an inter-core communication method 300 of the system is shown.

[0058] like Figure 3 As shown, the method 300 may include:

[0059] S310, after the first processor and the second processor establish a shared memory connection, the first processor reads an interrupt flag of an interrupt storage unit, where the interrupt flag is used to indicate whether the second processor has finished reading a message.

[0060] S320: The first processor determines whether the shared memory is available through the interrupt flag.

[0061] S330, if the shared memory is not available, reacquire the interrupt flag from the interrupt storage unit until it is determined that the shared memory is available based on the acquired interrupt flag; if the shared memory is available, write the data.

[0062] S340, after the first processor finishes writing data in the shared memory, the first processor writes an interrupt flag in the interrupt storage unit, wherein the interrupt flag is used to indicate that the first processor has finished writing data, and the interrupt flag is used to trigger the interrupt storage unit to request the second processor to send interrupt information, and the interrupt information is used to instruct the second processor to read the data in the shared memory.

[0063] S350: The second processor reads data from the shared memory based on the interrupt information sent by the interrupt storage unit.

[0064] S360: After the second processor finishes reading the data, it clears the interrupt flag in the interrupt storage unit.

[0065] S370: The second processor processes the read data.

[0066] Although inter-core communication is performed through a mechanism of shared memory combined with an interrupt storage unit, the use of a queue to write or read messages is avoided, and the first processor can give priority to writing urgent messages to the shared memory in a timely manner. However, since the data is all in the shared memory, the application program has a large delay when accessing the data, and there is still a problem of low response efficiency; in addition, before the first processor writes data, it needs to confirm that the second processor has read the data through the interrupt flag in the interrupt storage unit to avoid overwriting the data that the second processor has not read. Based on this, the problem of low data transmission efficiency will be caused.

[0067] The present application also provides an inter-core communication method, which can improve the response efficiency of the second processor to the message while ensuring the transmission efficiency.

[0068] Figure 4 It is a schematic block diagram of a system 400 for inter-core communication provided in an embodiment of the present application.

[0069] like Figure 4 As shown, the inter-core communication system 400 may include a first processor 410 and a second processor 420, and the second processor 420 includes a local storage unit 421 and a storage unit group 422. The first processor 410 and the second processor 420 both access the local storage unit 421 according to the address information stored in the storage unit group 422.

[0070] For example, the first processor 410 performs a write operation on the local storage unit 421 according to the address information stored in the storage unit group 422, and the second processor 420 performs a read operation on the data written by the first processor 410 to the local storage unit 421 according to the address information stored in the storage unit group 422.

[0071] For example, the first processor 410 and the second processor 420 may be connected via a bus 430 , and the first processor 410 and the second processor 430 may transmit messages via the bus 430 .

[0072] For example, the bus 430 includes, but is not limited to, a data bus, a power bus, a control bus, and a status signal bus.

[0073] For example, the local storage unit 421 may be a circular buffer designed by software for storing messages sent by the first processor 410; for example, the storage unit group 422 may be a group of storage units and interrupt storage units for controlling read and write operations of the local storage unit 421.

[0074] Figure 5 yes Figure 4 A schematic block diagram of a local storage unit and a storage unit is shown.

[0075] like Figure 5 As shown, the local storage unit 421 may be a ring-shaped local storage unit, and the storage unit group 422 may include an interrupt storage unit 423 , a write operation address information storage unit 424 , and a read operation address information storage unit 425 .

[0076] For example, the storage unit group 422 may include a write operation address information storage unit 424; the second processor 420 performs a read operation on the local storage unit 421 according to the write operation address information stored in the write operation address information storage unit 424; the write operation address information is used to indicate the latest write position of the first processor 410 in the storage space.

[0077] In other words, the write operation address information storage unit 424 may be used to store the write operation address information. The write operation address information may be updated by the first processor 410 .

[0078] For another example, the storage unit group 422 may include a read operation address information storage unit 425; the first processor 410 performs a write operation on the local storage unit 421 according to the read operation address information stored in the read operation address information storage unit 425; the read operation address information is used to indicate the latest read position of the second processor 420 in the storage space of the local storage unit.

[0079] In other words, the read operation address information storage unit 425 may be used to store the read operation address information, and the second processor 420 may update the read operation address information.

[0080] For another example, the storage unit group 422 may include an interrupt storage unit 423, and the second processor 420 performs a read operation on the local storage unit 421 according to the interrupt information sent by the interrupt storage unit 423; the interrupt information is used to trigger the second processor 420 to read a message from the storage space.

[0081] In other words, the interrupt controller 423 may be used to record an interrupt flag, the first processor 410 may write the interrupt flag, the interrupt flag may be used to trigger the second processor 420 to read data, and the second processor 420 may clear the interrupt flag.

[0082] For example, the local storage unit 421 may indicate the location of the storage space of the local storage unit 421 through multiple identifiers. Figure 5 0 to 4 are shown. The write operation address information and the read operation address information may be one or more than one identifier of the multiple identifiers.

[0083] By adding hardware storage units, namely, the interrupt storage unit 423, the write operation address information storage unit 424, and the read operation address information storage unit 425, the flexibility of the solution can be improved and the application scenarios of the solution can be enriched.

[0084] Figure 6 is a schematic block diagram of an inter-core communication method 500 provided in an embodiment of the present application. The method 500 may be executed by a first processor. For example, Figure 4 The first processor 410.

[0085] like Figure 6 As shown, the method 500 may include:

[0086] S510, the first processor obtains write operation address information and read operation address information, the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit of the second processor, and the read operation address information is used to indicate the latest read position of the second processor in the storage space;

[0087] S520: The first processor determines whether there is available space in the storage space based on the latest read position and the latest write position;

[0088] S530: When the storage space has the available space, the first processor writes the message to be written into the available space.

[0089] Based on the above technical solution, on the one hand, by storing the messages to be written in the storage space of the local storage unit of the second processor, the data transmission delay can be controlled, thereby ensuring the data transmission efficiency. On the other hand, through the write operation address information and the read operation address information, the first processor can determine whether there is enough available space in the storage space of the local storage unit of the second processor. When there is available space, the first processor can continuously and timely write messages in the storage space. Accordingly, the data transmission efficiency can be further improved, and the data response efficiency can be improved.

[0090] In short, storing messages transmitted by the second processor in the storage space of the local storage unit of the second processor can reduce the delay in data access; using read operation address information and write operation address information to manage the storage space allows the first processor to write messages continuously and promptly, thereby improving transmission efficiency.

[0091] In some embodiments of the present application, the write operation address information is information maintained by the first processor, and the method 500 may further include:

[0092] The first processor writes the write operation address information into a write operation address information storage unit.

[0093] For example, after the first processor finishes writing the message, it writes the latest write operation address information into the write operation address information storage unit.

[0094] It should be noted that, in an embodiment of the present application, the first processor can be used to maintain the write operation address information, which can be understood as the first processor storing the write operation address information in a local storage unit of the first processor, or it can be understood as the first processor storing the write operation address information in a storage unit connected to the first processor, such as a shared storage unit or even an external storage unit.

[0095] In some embodiments of the present application, the read operation address information is information read by the first processor from a read operation address information storage unit.

[0096] In some embodiments of the present application, the method 500 may further include:

[0097] The first processor writes an interrupt flag to the relay storage unit, and the interrupt flag is used to indicate that the first processor has written the message to be written into the storage space, so as to trigger the interrupt storage unit to send interrupt information to the second processor, and the interrupt information is used to trigger the second processor to read the message from the storage space.

[0098] The interrupt flag in the interrupt storage unit can be used to trigger the second processor to read the message in time, thereby improving the response efficiency of the second processor to the message.

[0099] It should be noted that the interrupt storage unit sending the interrupt information to the second processor can also be understood as the interrupt storage unit generating an interrupt.

[0100] In some embodiments of the present application, the storage space is a ring buffer space, which may also be referred to as a ring buffer.

[0101] In other words, the storage space may be constructed as a ring cache space, and the storage space may be managed using the read operation address information and the write operation address information.

[0102] Figure 7 600 is a schematic block diagram of an inter-core communication method 600 provided in an embodiment of the present application. The method 600 may be executed by a second processor. For example, the second processor includes a local storage unit and a write operation address information storage unit. For example, Figure 4 The second processor 420.

[0103] like Figure 7 As shown, the method 600 may include:

[0104] S610, the second processor reads write operation address information from the write operation address information storage unit, where the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit;

[0105] S620: The second processor reads the message stored in the storage space based on the write operation address information.

[0106] In some embodiments of the present application, the write operation address information is information maintained by the first processor.

[0107] In some embodiments of the present application, the second processor further includes a read operation address information storage unit, and the method 600 may further include:

[0108] The second processor writes read operation address information into the read operation address information storage unit, where the read operation address information is used to indicate the latest read position of the second processor in the storage space.

[0109] For example, after the second processor finishes reading the data, it writes the read operation address information into the read operation address information storage unit.

[0110] It should be noted that, in an embodiment of the present application, the second processor can be used to maintain the read operation address information, which can be understood as the second processor storing the read operation address information in a local storage unit of the second processor, or it can be understood as the second processor storing the read operation address information in a storage unit connected to the second processor, such as a shared storage unit or even an external storage unit.

[0111] In some embodiments of the present application, the second processor further includes an interrupt storage unit, and the S620 may include:

[0112] The second processor receives interrupt information sent by the interrupt storage unit, where the interrupt information is used to trigger the second processor to read a message from the storage space; the second processor reads the message stored in the storage space based on the write operation address information.

[0113] In some embodiments of the present application, the method 600 may further include:

[0114] After the second processor reads the write operation address information, the interrupt flag in the interrupt storage unit is cleared.

[0115] In some embodiments of the present application, the storage space is a circular cache space.

[0116] Figure 8 is a schematic block diagram of an inter-core communication method 700 provided in an embodiment of the present application. The method 700 may be executed by a write operation address information storage unit. For example, Figure 4 The write operation address information storage unit 424 in the storage unit group 422.

[0117] like Figure 8 As shown, the method 700 may include:

[0118] S710: A write operation address information storage unit stores write operation address information, where the write operation address information is used to indicate a latest write position of a first processor in a storage space of a local storage unit of a second processor.

[0119] In some embodiments of the present application, the write operation address information is information written by the first processor.

[0120] Fig. 9 800 is a schematic block diagram of an inter-core communication method 800 provided in an embodiment of the present application. The method 800 may be executed by a read operation address information storage unit. For example, Figure 4 The read operation address information storage unit 425 in the storage unit group 422.

[0121] like Fig. 9As shown, the method 800 may include:

[0122] S810, a read operation address information storage unit stores read operation address information, where the read operation address information is used to indicate a latest read position of a second processor in a storage space of a local storage unit of the second processor.

[0123] In some embodiments of the present application, the read operation address information is information written by the second processor.

[0124] Fig.10 is a schematic block diagram of an inter-core communication method 900 provided in an embodiment of the present application. The method 900 may be interactively executed by a first processor, a local storage unit of a second processor, a read operation address information storage unit, a write operation address information storage unit, an interrupt storage unit, and the second processor. For example, Figure 4 and Figure 5 The system 400.

[0125] like Fig.10 As shown, the method 900 may include some or all of the following:

[0126] S901: After a first processor and a second processor establish a shared memory connection, the first processor reads read operation address information from a read operation address information storage unit.

[0127] S902: The first processor checks whether there is available space in the storage space of the local storage unit of the second processor according to the read operation address information and the write operation address information maintained by the first processor.

[0128] S903, if there is available space in the storage space, the first processor writes the message into the available space; if there is no available space in the storage space, the first processor re-reads the read operation address information in the read operation address information storage unit until there is available space in the storage space.

[0129] S904: After writing the data, the first processor writes the latest write operation address information into the write operation address information storage unit.

[0130] S905: The first processor writes an interrupt flag to an interrupt storage unit.

[0131] S906: The interrupt storage unit sends interrupt information to the second processor based on the interrupt flag item, where the interrupt information is used to trigger the second processor to read a message.

[0132] S907: After receiving the interruption information, the second processor reads the write operation address information from the write operation address information storage unit.

[0133] S908: The second processor clears the interrupt flag in the interrupt storage unit.

[0134] S909: The second processor determines the address and length of the read message according to the write operation address information and the read pointer maintained by the second processor, and then reads the message.

[0135] S910: The second processor writes the latest read operation address information into a read operation address information storage unit.

[0136] S910: The second processor processes the read message.

[0137] S910: The second processor maintains read operation address information.

[0138] S910: The first processor maintains write operation address information.

[0139] Since the local storage is managed by a software ring buffer, streaming transmission is possible before the local storage unit of the second processor is full of data. As long as the second processor clears the interrupt flag, the first processor can continue to write messages.

[0140] Fig.11 is a schematic flow chart of an inter-core communication method 1000 provided in an embodiment of the present application. The method 1000 may be interactively executed by a first processor, a local storage unit of a second processor, a read operation address information storage unit, a write operation address information storage unit, an interrupt storage unit, and the second processor. For example, Figure 4 and Figure 5 The system 400.

[0141] like Fig.10 As shown, the method 900 may include some or all of the following:

[0142] S1011~S1018;

[0143] S10n1~S10n8;

[0144] S1111, the second processor reads the first message from the storage space;

[0145] S1112, the second processor writes the latest read operation address information to the read operation address information storage unit;

[0146] S1113, the second processor processes the first message read;

[0147] S11n1, the second processor reads the nth message from the storage space;

[0148] S11n2, the second processor writes the latest read operation address information to the read operation address information storage unit;

[0149] S11n3: The second processor processes the nth message read.

[0150] It should be understood that Fig.11 Steps S1011 to S1018 and steps S10n1 to S10n8 can be found in Fig.10 Steps S901 to S908 in the embodiment are not described again here to avoid repetition.

[0151] It should also be understood that for each message between the second message and the nth message, the reading and writing process can also be performed in the same manner as for the first message or the nth message. This embodiment of the present application does not specifically limit this.

[0152] It should be understood that the steps of the inter-core communication method described from the perspective of a single execution subject in the embodiment of the present application and the corresponding steps of the inter-core communication method described from the perspective of interaction between multiple execution subjects can refer to each other, and for the sake of brevity, they will not be repeated here.

[0153] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0154] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0155] Combination of the above Figures 6 to 11 , describes in detail the method embodiment of the present application, and the following is combined with Figures 12 to 16 , describe in detail the device embodiments of the present application.

[0156] Fig.12 It is a schematic block diagram of the first processor 2000 according to an embodiment of the present application.

[0157] like Fig.12As shown, the first processor 2000 may include:

[0158] an acquiring unit 2100, configured to acquire write operation address information and read operation address information, wherein the write operation address information is used to indicate a latest write position of the first processor in a storage space of a local storage unit of the second processor, and the read operation address information is used to indicate a latest read position of the second processor in the storage space;

[0159] A determination unit 2200, configured to determine whether there is available space in the storage space based on the latest read position and the latest write position;

[0160] The writing unit 2300 is configured to write the message to be written into the available space if the available space exists in the storage space.

[0161] In some embodiments of the present application, the write operation address information is information maintained by the first processor, and the writing unit 2300 is further used to:

[0162] The write operation address information is written into a write operation address information storage unit.

[0163] In some embodiments of the present application, the read operation address information is information read by the first processor from a read operation address information storage unit.

[0164] In some embodiments of the present application, the writing unit 2300 is further used for:

[0165] An interrupt flag is written to the relay storage unit, wherein the interrupt flag is used to indicate that the first processor has written the message to be written into the storage space, so as to trigger the interrupt storage unit to send interrupt information to the second processor, and the interrupt information is used to trigger the second processor to read the message from the storage space.

[0166] In some embodiments of the present application, the storage space is a circular cache space.

[0167] Fig.13 is a schematic block diagram of a second processor 3000 of an embodiment of the present application. It should be understood that the second processor 3000 includes a local storage unit and a write operation address information storage unit.

[0168] like Fig.13 As shown, the second processor 3000 may include:

[0169] A first reading unit 3100, configured to read write operation address information from the write operation address information storage unit, wherein the write operation address information is used to indicate a latest write position of the first processor in the storage space of the local storage unit;

[0170] The second reading unit 3200 is used to read the message stored in the storage space based on the write operation address information.

[0171] In some embodiments of the present application, the write operation address information is information maintained by the first processor.

[0172] In some embodiments of the present application, the second processor further includes a read operation address information storage unit, and the second processor 3000 further includes:

[0173] A writing unit is used to write read operation address information into the read operation address information storage unit, wherein the read operation address information is used to indicate the latest read position of the second processor in the storage space.

[0174] In some embodiments of the present application, the second processor further includes an interrupt storage unit, and the second reading unit 3200 is specifically configured to:

[0175] receiving interrupt information sent by the interrupt storage unit, wherein the interrupt information is used to trigger the second processor to read a message from the storage space;

[0176] The message stored in the storage space is read based on the write operation address information.

[0177] In some embodiments of the present application, the second reading unit 3200 is further used for:

[0178] After the second processor reads the write operation address information, the interrupt flag in the interrupt storage unit is cleared.

[0179] In some embodiments of the present application, the storage space is a circular cache space.

[0180] Fig.14 It is a schematic block diagram of a write operation address information storage unit 4000 according to an embodiment of the present application.

[0181] like Fig.14 As shown, the write operation address information storage unit 4000 may include:

[0182] The storage unit 4100 is used to store write operation address information, where the write operation address information is used to indicate the latest write position of the first processor in the storage space of the local storage unit of the second processor.

[0183] In some embodiments of the present application, the write operation address information is information written by the first processor.

[0184] Fig.15It is a schematic block diagram of a read operation address information storage unit 5000 according to an embodiment of the present application.

[0185] like Fig.15 As shown, the read operation address information storage unit 5000 may include:

[0186] The storage unit 5100 is used to store read operation address information, where the read operation address information is used to indicate the latest read position of the second processor in the storage space of the local storage unit of the second processor.

[0187] In some embodiments of the present application, the read operation address information is information written by the second processor.

[0188] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. Specifically, Fig.12 The first processor 2000 shown, Fig.13 The second processor 3000 shown, Fig.14 The write operation address information storage unit 4000 shown in FIG. Fig.15 The read operation address information storage unit 5000 shown can correspond to the corresponding subject in the method embodiment of the present application, and the aforementioned and other operations and / or functions of each unit are respectively for realizing the corresponding processes in each method embodiment. For the sake of brevity, they will not be repeated here.

[0189] The communication device of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional modules can be implemented in hardware form, can also be implemented by software instructions, and can also be implemented by a combination of hardware and software modules.

[0190] Specifically, each step of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software instructions in the processor. The steps of the method disclosed in the embodiment of the present application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor.

[0191] Optionally, the software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.

[0192] In addition, a chip is also provided in an embodiment of the present application.

[0193] For example, the chip may be an integrated circuit chip with signal processing capabilities, and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present application. The chip may also be called a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc. Optionally, the chip can be applied to various communication devices, so that the communication device equipped with the chip can execute the methods, steps, and logic diagrams disclosed in the embodiments of the present application.

[0194] Fig.16 is a schematic structural diagram of a chip 6000 according to an embodiment of the present application.

[0195] like Fig.16 As shown, the chip 6000 includes a processor 6010 .

[0196] The processor 6010 may call and run a computer program from the memory to implement the method in the embodiment of the present application.

[0197] Please continue to see Fig.16 , the chip 6000 may further include a memory 6020 .

[0198] The processor 6010 may call and run a computer program from the memory 6020 to implement the method in the embodiment of the present application. The memory 6020 may be used to store information, and may also be used to store codes, instructions, etc. executed by the processor 6010. The memory 6020 may be a separate device independent of the processor 6010, or may be integrated in the processor 6010.

[0199] Please continue to see Fig.16 , the chip 6000 may further include an input interface 6030 .

[0200] The processor 6010 may control the input interface 6030 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0201] Please continue to see Fig.16 , the chip 6000 may further include an output interface 6040 .

[0202] The processor 6010 may control the output interface 6040 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0203] It should be understood that the chip 6000 can be applied to the second processor, the first processor, the write operation address information storage unit or the read operation address information storage unit in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the corresponding execution entities in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0204] For example, the memory 6020 may be at least one of a write operation address information storage unit, a read operation address information storage unit, and an interrupt storage unit.

[0205] For another example, the processor 6010 may be the first processor or the second processor mentioned above.

[0206] It should also be understood that the various components in the chip 6000 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0207] The processors mentioned above may include but are not limited to:

[0208] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0209] The processor can be used to implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor, or a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0210] The memory mentioned above includes but is not limited to:

[0211] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0212] It should be noted that the memory described herein is intended to include these and any other suitable types of memory.

[0213] In an embodiment of the present application, a computer-readable storage medium is further provided for storing a computer program. The computer-readable storage medium stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to perform the method of the method embodiment.

[0214] For example, the computer-readable storage medium can be applied to the second processor, the first processor, the write operation address information storage unit or the read operation address information storage unit in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the corresponding execution subjects in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0215] A computer program product is also provided in an embodiment of the present application, including a computer program.

[0216] For example, the computer program product can be applied to the second processor, the first processor, the write operation address information storage unit or the read operation address information storage unit in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the corresponding execution subjects in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0217] The present application also provides a computer program in an embodiment. When the computer program is executed by a computer, the computer can execute the method of the method embodiment.

[0218] For example, the computer program can be applied to the second processor, the first processor, the write operation address information storage unit or the read operation address information storage unit in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the corresponding execution entities in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0219] In addition, the embodiment of the present application further provides a chip system, which may include the second processor and / or the first processor involved above, which will not be described in detail for the sake of brevity. It should be noted that the term "system" in this article may also be referred to as a "chip system" or a "chip-on-chip system".

[0220] It should also be understood that the terms used in the embodiments of the present application and the appended claims are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present application.

[0221] For example, as used in the embodiments of the present application and the appended claims, the singular forms "a," "said," "above," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0222] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0223] If implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0224] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0225] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways.

[0226] For example, the division of units or modules or components in the device embodiment described above is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or modules or components can be combined or integrated into another system, or some units or modules or components can be ignored or not executed.

[0227] For another example, the units / modules / components described above as separation / display components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple units. Some or all of the units / modules / components may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0228] Finally, it should be noted that the mutual coupling or direct coupling or communication connection shown or discussed above may be an indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.

[0229] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A processor system, characterized in that: include: a first processor; a second processor, the second processor comprising a local storage unit and a storage unit group; the storage unit group comprising a write operation address information storage unit and a read operation address information storage unit, the write operation address information stored in the write operation address information storage unit is used to indicate the latest write position of the first processor in the storage space of the local storage unit, and the read operation address information stored in the read operation address information storage unit is used to indicate the latest read position of the second processor in the storage space; The first processor is used for: Based on the latest read position and the latest write position, determining whether there is available space in the storage space; If the storage space has the available space, write the message to be written into the available space, and after writing the data, write the latest write operation address information into the write operation address information storage unit; The second processor is used for: The message stored in the storage space is read based on the latest write position, and after reading the data, the latest read operation address information is written into the read operation address information storage unit.

2. The system according to claim 1, characterized in that The address information stored in the write operation address information storage unit is information maintained by the first processor.

3. The system according to claim 1, characterized in that The address information stored in the read operation address information storage unit is information maintained by the second processor.

4. The system according to claim 1, characterized in that The storage unit group includes an interrupt storage unit; After the first processor writes the message to be written into the available space, the first processor is further configured to: Writing an interrupt flag into the relay storage unit, the interrupt flag being used to indicate that the first processor has written the message to be written into the storage space, so as to trigger the interrupt storage unit to send interrupt information to the second processor; Before the second processor reads the message stored in the storage space based on the latest write position, the second processor is further configured to: receiving the interrupt information, where the interrupt information is used to trigger the second processor to read a message from the storage space; The latest write position is obtained, and the interrupt flag is cleared.

5. The system according to any one of claims 1 to 4, characterized in that The storage space of the local storage unit is a ring storage space.

6. The system according to any one of claims 1 to 4, characterized in that The first processor is connected to the second processor via a bus.

7. An inter-core communication method, characterized in that: The method is applied to a processor system, the processor system comprising a first processor and a second processor, the second processor comprising a local storage unit and a storage unit group; the storage unit group comprising a write operation address information storage unit and a read operation address information storage unit, the write operation address information stored in the write operation address information storage unit is used to indicate the latest write position of the first processor in the storage space of the local storage unit, and the read operation address information stored in the read operation address information storage unit is used to indicate the latest read position of the second processor in the storage space; The inter-core communication method comprises: The first processor determines whether there is available space in the storage space based on the latest read position and the latest write position; if there is available space in the storage space, writes the message to be written into the available space, and writes the latest write operation address information into the write operation address information storage unit after writing the data; The second processor reads the message stored in the storage space based on the latest write position, and writes the latest read operation address information to the read operation address information storage unit after reading the data.

8. The method according to claim 7, characterized in that The address information stored in the write operation address information storage unit is information maintained by the first processor.

9. The method according to claim 7, characterized in that: The address information stored in the read operation address information storage unit is information maintained by the second processor.

10. The method according to claim 7, characterized in that The storage unit group includes an interrupt storage unit; The method further comprises: After the first processor writes the message to be written into the available space, an interrupt flag is written into the relay storage unit, where the interrupt flag is used to indicate that the first processor has written the message to be written into the storage space, so as to trigger the interrupt storage unit to send interrupt information to the second processor; Before the second processor reads the message stored in the storage space based on the latest write position, it receives the interrupt information, wherein the interrupt information is used to trigger the second processor to read the message from the storage space; obtain the latest write position, and clear the interrupt flag.

11. The method according to any one of claims 7 to 10, characterized in that The storage space is a ring buffer space.

12. The method according to any one of claims 7 to 10, characterized in that The first processor is connected to the second processor via a bus.

13. A chip, characterized in that: include: A processor, configured to call and run a computer program from a local storage unit, so that a device equipped with the chip executes a method as claimed in any one of claims 7 to 12.

14. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 7 to 12.