Communication method and device among multiple processors, chip, medium and product

By using an interrupt accumulator in the interrupt register to accumulate the count value of the interrupt signal, it is ensured that each interrupt signal is completely processed, and the problem of incomplete interrupt signal processing in the prior art is solved.

CN118550866APending Publication Date: 2024-08-27NANJING ESWIN IC TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410705710.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In the prior art, when the mailbox receives multiple identical interrupt signals sent by the same CPU, it only processes them once, causing the CPU receiving the interrupt signal to process less or more interrupt signals, causing the problem of incomplete processing.

Method used

By storing the interrupt status bit of the interrupt signal in the interrupt register and using the interrupt accumulator to accumulate the count value of the interrupt signal, add 1 when the interrupt signal is received and subtract 1 when the processing is completed until the count value is 0, ensuring that each interrupt signal Processed to completion.

Benefits of technology

It avoids the situation where the same interrupt signal is processed once multiple times, ensures that the interrupt signal is completely processed, and prevents the processor from causing exceptions due to the accumulation of unprocessed interrupt signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550866A
    Figure CN118550866A
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication method and device among multiple processors, a chip, a medium and a product, the method is applied to mailbox, and the method comprises the following steps: receiving an interrupt signal from a first processor; sending the interrupt signal to a second processor; and in response to the interrupt signal, setting the interrupt state position of the interrupt signal as an interrupt processing state, and adding 1 to the count value of the interrupt signal, wherein the second processor is used for reading and processing interrupt information in a target sub-storage space based on the interrupt signal, and a count value of the interrupt signal is used for accumulating the number of times that the interrupt signal is not processed completely; receiving a first signal from the second processor, wherein the first signal is used for indicating that processing of the interrupt information is completed; and in response to the first signal, subtracting 1 from the count value of the interrupt signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of communications, and in particular to a method, device, chip, medium, and product for communication between multiple processors. Background Art

[0002] The mailbox is a bridge for exchanging interrupt signals and information between central processing units (CPUs). It is mainly used in situations where there are three or two CPUs in a system-on-chip (SoC) and there is no direct connection between the CPUs. Each CPU sends the interrupt information that needs to be sent to other CPUs to the mailbox; the mailbox stores the received information in an internal first-in-first-out (FIFO) memory, and then the CPU that sent the interrupt information sends an interrupt signal to the mailbox; the mailbox passes the interrupt signal to the CPU that receives the interrupt information, and the CPU that receives the interrupt signal reads the corresponding interrupt information from the FIFO memory of the mailbox after receiving the interrupt signal. In the prior art, when the mailbox receives the same interrupt signal sent multiple times by the same CPU, it only processes the interrupt signal once, which will cause the CPU that receives the interrupt signal to process one or more interrupt signals that should have been processed less. Summary of the invention

[0003] In view of this, embodiments of the present application at least provide a method, device, chip, medium and product for communication between multiple processors.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a communication method between multiple processors, which is applied to a mailbox, and the method includes: receiving an interrupt signal from a first processor; sending the interrupt signal to a second processor; and, in response to the interrupt signal, setting the interrupt status position of the interrupt signal to an interrupt processing status, and adding 1 to the count value of the interrupt signal; wherein the second processor is used to read and process interrupt information in a target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; receiving a first signal from the second processor, the first signal being used to indicate that the interrupt information processing is complete; and in response to the first signal, subtracting 1 from the count value of the interrupt signal.

[0006] In a second aspect, an embodiment of the present application provides a communication device between multiple processors, the device comprising: a first receiving module for receiving an interrupt signal from a first processor; a first sending module for sending the interrupt signal to a second processor; and, in response to the interrupt signal, setting the interrupt status position of the interrupt signal to an interrupt processing status, and adding 1 to the count value of the interrupt signal; wherein the second processor is used to read and process interrupt information in a target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; a second receiving module for receiving a first signal from the second processor, the first signal being used to indicate that the interrupt information processing has been completed; and a first responding module for subtracting 1 from the count value of the interrupt signal in response to the first signal.

[0007] In the third aspect, an embodiment of the present application provides a communication system between multiple processors, comprising: multiple processors, including at least a first processor and a second processor; a mailbox, used to receive an interrupt signal from the first processor; send the interrupt signal to the second processor; and, in response to the interrupt signal, set the interrupt status position of the interrupt signal to an interrupt processing status, and add 1 to the count value of the interrupt signal; wherein the second processor is used to read and process interrupt information in a target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; receive a first signal from the second processor, the first signal being used to indicate that the interrupt information processing is completed; and in response to the first signal, subtract 1 from the count value of the interrupt signal.

[0008] In a fourth aspect, an embodiment of the present application provides a system-on-chip, which includes at least the above-mentioned communication system between multiple processors.

[0009] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements part or all of the steps in the above method when executed by a system-level chip.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a system-level chip, implements some or all of the steps in the above method.

[0011] In the embodiment of the present application, the interrupt signal sent by the first processor is sent to the second processor, and the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal; the interrupt status position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is added by 1; in response to the first signal sent by the second processor to indicate that the processing of the interrupt information is completed, the count value of the interrupt signal is subtracted by 1. In this way, each interrupt status bit is counted, that is, the count value of the corresponding interrupt signal is added by 1 when the interrupt signal is received, and the count value of the corresponding interrupt signal is subtracted by 1 when the interrupt signal is processed, thereby avoiding the situation where the first processor sends multiple identical interrupt signals to the second processor, and the second processor only processes the interrupt signal once and sets the interrupt status position of the interrupt signal to 0.

[0012] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0014] Figure 1A A schematic diagram of a mailbox-based communication system between multiple processors provided in an embodiment of the present application;

[0015] Figure 1B A schematic diagram of an implementation flow of a communication method between multiple processors provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of an implementation flow of a communication method between multiple processors provided in an embodiment of the present application;

[0017] Figure 3 A schematic diagram of an implementation flow of a communication method between multiple processors provided in an embodiment of the present application;

[0018] Figure 4 A schematic diagram of the structure of a mailbox provided in an embodiment of the present application;

[0019] Figure 5 A schematic diagram of a communication method for interrupting each other among core 0, core 1, and core 2 provided in an embodiment of the present application;

[0020] Figure 6A schematic diagram of the structure of a communication device between multiple processors provided in an embodiment of the present application;

[0021] Figure 7 A hardware entity diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0023] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0024] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0025] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those skilled in the art in the field to which the embodiments of the present application belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0026] FIFO memory: refers to first-in-first-out. Due to the rapid development of microelectronics technology, the capacity of FIFO chips is getting larger, the size is getting smaller, and the price is getting cheaper. As a new type of large-scale integrated circuit, FIFO chips are gradually being used more and more widely in high-speed data acquisition, high-speed data processing, high-speed data transmission and multi-machine processing systems due to their flexible, convenient and efficient characteristics.

[0027] SoC: Also known as System on Chip, it is a purpose-built integrated circuit that contains all the contents of a complete system and has embedded software.

[0028] Advanced High Performance Bus (AHB): AHB is mainly used for the connection between high-performance modules. As the on-chip system bus of SoC, it includes the following features: single clock edge operation; non-three-state implementation; support for burst transmission; support for segmented transmission; support for multiple master controllers; configurable 32-bit to 128-bit bus width; support for byte, half-word and word transmission. The AHB system consists of a master module, a slave module and an infrastructure. The transmission on the entire AHB bus is initiated by the master module and responded by the slave module.

[0029] Interrupt: refers to the CPU's response to an interrupt signal sent by an input / output (I / O) device. The CPU pauses the program being executed, retains the CPU environment, and automatically executes the interrupt handler of the I / O device. After the execution is completed, it returns to the breakpoint and continues to execute the original program.

[0030] In the prior art, the mailbox defaults to processing the interrupt signal immediately after the CPU receives it, and will not accumulate the interrupt signal. That is to say, when the CPU that receives the interrupt signal has not yet processed the interrupt signal, it receives the same interrupt signal sent by the same CPU again. The CPU that receives the interrupt signal only processes it once and then sets the interrupt status position of the interrupt signal to 0. In the embodiment of the present application, the interrupt status bit of the interrupt signal can be stored in the interrupt register, and the interrupt status bit of each interrupt signal corresponds to an interrupt accumulator respectively; when the interrupt signal is received, the interrupt accumulator adds 1 to the count value of the interrupt signal, and after the CPU that receives the interrupt signal completes processing once, the interrupt accumulator subtracts 1 from the count value of the interrupt signal, until the cumulative sum of the count values ​​of the interrupt signal is 0, and then sets the interrupt status position corresponding to the interrupt signal to 0; the count value of each interrupt signal can be accumulated up to 3 times. In this way, the mailbox will not set the interrupt status position of the interrupt signal to 0 after processing an interrupt signal that should be processed multiple times only once.

[0031] In order to better understand the communication method between multiple processors proposed in the embodiment of the present application, Figure 1A The mailbox-based communication system among multiple processors shown is explained in detail.

[0032] See also Figure 1A , the first processor and the second processor communicate through a mailbox; it is assumed that the first processor is the sender of an interrupt signal and the second processor is the receiver of an interrupt signal; the first processor can be any one of core 0, core 1, and core 2, the second processor can be any one of core 0, core 1, and core 2, and the first processor and the second processor are not the same core.

[0033] Continue to see Figure 1A , the 32KB storage space 101 in the mailbox is divided into storage space 11, storage space 12, and storage space 13; storage space 11 is the storage space for the interrupt information received by core 0, storage space 12 is the storage space for the interrupt information received by core 1, and storage space 13 is the storage space for the interrupt information received by core 2. The first processor sends the interrupt information to the mailbox through the AHB bus; the mailbox receives the interrupt information sent by the first processor and stores the interrupt information in the corresponding FIFO storage space.

[0034] Continue to see Figure 1A , the mailbox also includes an interrupt register 102, and the interrupt register 102 includes bit 17, bit 18, and bit 19; specifically, bit 17 is the bit of the interrupt status bit of the interrupt signal received by core 0, bit 18 is the bit of the interrupt status bit of the interrupt signal received by core 1, and bit 19 is the bit of the interrupt status bit of the interrupt signal received by core 2. The interrupt status bit of each interrupt signal corresponds to an interrupt accumulator, and the count value of the interrupt signal received by core 0 accumulated by the interrupt accumulator is stored in storage space 14, the count value of the interrupt signal received by core 1 accumulated by the interrupt accumulator is stored in storage space 15, and the count value of the interrupt signal received by core 2 accumulated by the interrupt accumulator is stored in storage space 16.

[0035] Continue to see Figure 1A , mailbox receives the interrupt signal sent by the first processor, and sends the interrupt signal to core 0 through the mailbox_interrupt 0 interface; sends the interrupt signal to core 1 through the mailbox_interrupt 1 interface; and sends the interrupt signal to core 2 through the mailbox_interrupt 2 interface.

[0036] The present application embodiment proposes a communication method between multiple processors, such as Figure 1B As shown, applied to a mailbox, the method may include steps S110 to S140:

[0037] Step S110: receiving an interrupt signal from the first processor;

[0038] Here, the first processor is a processor that sends an interrupt signal; and the second processor is a processor that receives an interrupt signal.

[0039] In some implementations, the interrupt signal includes an identifier of a processor that is a sender of the interrupt signal, an identifier of a processor that is a receiver of the interrupt signal, an interrupt type, and an identifier corresponding to the interrupt signal.

[0040] The multi-processor in the embodiment of the present application includes at least 2 or 3 processors.

[0041] Step S120: sending the interrupt signal to the second processor; and, in response to the interrupt signal, setting the interrupt status of the interrupt signal to an interrupt processing status, and adding 1 to the count value of the interrupt signal; wherein the second processor is used to read and process interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed;

[0042] In some embodiments, the interrupt signal and the interrupt information correspond one to one; the interrupt information includes an identifier of a processor that sends the interrupt signal, an identifier of a processor that receives the interrupt signal, interrupt information that the first processor needs to share with the second processor, and an identifier corresponding to the interrupt signal. The interrupt information that the first processor needs to share with the second processor may be the result of a logical operation performed by the first processor.

[0043] In some implementations, when the first processor needs to share information with the second processor, the first processor sends an interrupt signal to the second processor.

[0044] In some embodiments, the second processor receives an interrupt signal, reads the interrupt information from the target sub-storage space of the corresponding interrupt information in the mailbox according to the identifier of the processor of the sender of the interrupt signal and the identifier of the processor of the receiver of the interrupt signal, and after processing the interrupt information, the second processor sends a first signal indicating that the processing of the interrupt information is completed to the mailbox.

[0045] In some embodiments, the interrupt status bit is used to indicate whether the interrupt signal has been processed; when the interrupt status bit is in the interrupt processing state, the interrupt status bit is 1, indicating that the interrupt signal has not been processed or is in the processing process; when the interrupt status bit is in the interrupt processing completion state, the interrupt status bit is 0, indicating that the interrupt signal has been processed.

[0046] In some embodiments, when the mailbox receives multiple identical interrupt signals sent by the first processor to the second processor, in order to prevent the unprocessed interrupt signals of the second processor from being overwritten by the interrupt signals received again, each interrupt status bit corresponds to an interrupt accumulator, and the interrupt accumulator is used to accumulate the number of unprocessed interrupt signals received; when the mailbox receives the interrupt signal sent by the first processor, the interrupt accumulator adds 1 to the count value of the interrupt signal, and after receiving the first signal sent by the second processor to indicate that the interrupt information processing is completed, the interrupt accumulator subtracts 1 from the count value of the interrupt signal, until the cumulative sum of the count values ​​of the interrupt signals is 0, the interrupt status bit of the interrupt signal is set to 0. The number of unprocessed times of each interrupt signal can be accumulated up to 3 times at most, and if it exceeds 3 times, it is necessary to consider whether the processor is abnormal; the processing of each interrupt signal is very fast. If the number of unprocessed interrupt signals (i.e., the count value of the interrupt signal) accumulates to more than 3 times, the processor may not work normally, resulting in multiple interrupt signals being unable to be processed.

[0047] See also Figure 1A The interrupt register 102 includes a storage space 14 for the count value of the interrupt signal received by core 0, a storage space 15 for the count value of the interrupt signal received by core 1, and a storage space 16 for the count value of the interrupt signal received by core 2; wherein each interrupt signal received by core 0 corresponds to a count value of the interrupt signal, each interrupt signal received by core 1 corresponds to a count value of the interrupt signal, and each interrupt signal received by core 2 corresponds to a count value of the interrupt signal.

[0048] Step S130: receiving a first signal from the second processor, wherein the first signal is used to indicate that the interrupt information processing is completed;

[0049] Here, after the second processor completes processing of the read interrupt information, it sends the first signal to the mailbox;

[0050] Step S140: In response to the first signal, subtract 1 from the count value of the interrupt signal.

[0051] In some implementations, after the mailbox receives the first signal, the interrupt accumulator subtracts 1 from the count value of the interrupt signal.

[0052] In the embodiment of the present application, the interrupt signal sent by the first processor is sent to the second processor, and the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal; the interrupt status position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is added by 1; in response to the first signal sent by the second processor to indicate that the processing of the interrupt information is completed, the count value of the interrupt signal is subtracted by 1. In this way, each interrupt status bit is counted, that is, the count value of the corresponding interrupt signal is added by 1 when the interrupt signal is received, and the count value of the corresponding interrupt signal is subtracted by 1 when the interrupt signal is processed, thereby avoiding the situation where the first processor sends multiple identical interrupt signals to the second processor, and the second processor only processes the interrupt signal once and sets the interrupt status position of the interrupt signal to 0.

[0053] The present application embodiment proposes a communication method between multiple processors, such as Figure 2 As shown, applied to a mailbox, the method may include steps S211 to S220:

[0054] Step S211: based on the storage space in the mailbox, the mailbox determines a plurality of storage spaces corresponding to the multiprocessors;

[0055] In some implementations, the storage space in the mailbox is divided into multiple storage spaces corresponding to multiple processors, that is, each processor corresponds to a storage space. Figure 1A The 32KB storage space 101 includes a storage space 11 for interrupt information received by core 0, a storage space 12 for interrupt information received by core 1, and a storage space 13 for interrupt information received by core 2.

[0056] Step S212: the mailbox divides the storage space corresponding to each of the processors into M sub-storage spaces corresponding to each of the other processors, and the M sub-storage spaces are used to store the interrupt information sent by any other processor, where M is an integer greater than 1;

[0057] In some implementations, the storage space corresponding to each processor may include multiple sub-storage spaces corresponding to each other processor. Figure 1A The storage space 11 for the interrupt information received by core 0 may include the storage space for the interrupt information sent by core 1 and the storage space for the interrupt information sent by core 2; the storage space 12 for the interrupt information received by core 1 may include the storage space for the interrupt information sent by core 0 and the storage space for the interrupt information sent by core 2; the storage space 13 for the interrupt information received by core 2 may include the storage space for the interrupt information sent by core 0 and the storage space for the interrupt information sent by core 1.

[0058] In some embodiments, the storage space in the mailbox includes multiple storage spaces corresponding to multiple processors; the storage space corresponding to each processor includes M sub-storage spaces corresponding to each other processor, and the M sub-storage spaces are used to store interrupt information sent by any other processor, and M is an integer greater than 1.

[0059] Step S213: the mailbox receives the interrupt information sent by the first processor;

[0060] In some embodiments, before sending the interruption information to the mailbox, the first processor needs to read the empty or full status of the storage space storing the interruption information in the mailbox to determine whether the remaining space in the storage space is sufficient to store the interruption information. If the remaining space in the storage space is greater than or equal to the size of the interruption information, the interruption information is stored in the storage space; if the remaining space in the storage space is less than the size of the interruption information, a suitable storage space is searched again to store the interruption information; in some embodiments, if the size of all the remaining space in the storage space is less than the size of the interruption information, the information sharing between the first processor and the second processor cannot be completed; in this way, it can prevent the mailbox from having a memory overflow when storing the interruption information in the storage space.

[0061] Step S214: the mailbox determines the target sub-storage space corresponding to the interruption information, and stores the interruption information in the target sub-storage space;

[0062] In some implementations, the interrupt information is stored in the target sub-storage space according to an identifier of a processor that sends an interrupt signal, an identifier of a processor that receives the interrupt signal, and a memory size of the interrupt information.

[0063] Continue to see Figure 1A When the second processor is core 0, the interrupt information is stored in the storage space 11 of the interrupt information received by core 0; when the second processor is core 1, the interrupt information is stored in the storage space 12 of the interrupt information received by core 1; when the second processor is core 2, the interrupt information is stored in the storage space 13 of the interrupt information received by core 2.

[0064] In some implementations, the sub-storage space is a plurality of sub-storage spaces corresponding to each of the other processors; and the target sub-storage space is a sub-storage space corresponding to the interrupt information.

[0065] Step S215: the mailbox receives an interrupt signal from the first processor;

[0066] Step S216: the mailbox sends the interrupt signal to the second processor; and, in response to the interrupt signal, sets the interrupt state of the interrupt signal to the interrupt processing state, and adds 1 to the count value of the interrupt signal; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed;

[0067] After receiving the interrupt signal sent by the first processor, the mailbox sends the interrupt signal to the second processor.

[0068] Continue to see Figure 1A When the second processor is core 0, mailbox sends the interrupt signal to core 0 through mailbox_interrupt 0 interface; when the second processor is core 1, mailbox sends the interrupt signal to core 1 through mailbox_interrupt 1 interface; when the second processor is core 2, mailbox sends the interrupt signal to core 2 through mailbox_interrupt 2 interface.

[0069] In some embodiments, the second processor reads the interrupt information from the target sub-storage space of the interrupt information corresponding to the mailbox based on the identifier of the processor as the sender of the interrupt signal, the identifier of the processor as the receiver of the interrupt signal, and the identifier corresponding to the interrupt signal.

[0070] In some embodiments, see Figure 1A When the first processor is core 0, in bit position 17 of the interrupt status bit of the interrupt signal received by core 0, the interrupt status position corresponding to the interrupt signal is set to the interrupt processing state, and in the storage space 14 of the count value of the interrupt signal received by core 0, the count value of the interrupt signal is increased by 1; when the first processor is core 1, in bit position 18 of the interrupt status bit of the interrupt signal received by core 1, the interrupt status position corresponding to the interrupt signal is set to the interrupt processing state, and in the storage space 15 of the count value of the interrupt signal received by core 1, the count value of the interrupt signal is increased by 1; when the first processor is core 2, in bit position 19 of the interrupt status bit of the interrupt signal received by core 2, the interrupt status position corresponding to the interrupt signal is set to the interrupt processing state, and in the storage space 16 of the count value of the interrupt signal received by core 2, the count value of the interrupt signal is increased by 1.

[0071] Step S217: the mailbox receives a first signal from the second processor, where the first signal is used to indicate that the interrupt information processing is completed;

[0072] Here, after the second processor completes processing the interrupt information, it sends a first signal to the mailbox.

[0073] Step S218: In response to the first signal, the interrupt accumulator in the mailbox decrements the count value of the interrupt signal by 1;

[0074] In some embodiments, see Figure 1A When the first processor is core 0, the interrupt accumulator reduces the count corresponding to the interrupt signal by 1 in the storage space 14 of the count value of the interrupt signal received by core 0; when the first processor is core 1, the interrupt accumulator reduces the count corresponding to the interrupt signal by 1 in the storage space 15 of the count value of the interrupt signal received by core 1; when the first processor is core 2, the interrupt accumulator reduces the count corresponding to the interrupt signal by 1 in the storage space 16 of the count value of the interrupt signal received by core 2.

[0075] Step S219: after the count value of the interrupt signal is decremented by 1, if the count value of the interrupt signal is greater than 0, the mailbox sends the interrupt signal to the second processor; in response to the first signal sent by the second processor, the interrupt accumulator in the mailbox decrements the count value of the interrupt signal by 1;

[0076] In some embodiments, after the mailbox receives the first signal and the interrupt accumulator decrements the count corresponding to the interrupt signal by 1, if the count corresponding to the interrupt signal is greater than 0, the interrupt signal is sent to the second processor again for processing; after the second processor receives the interrupt signal, it reads the interrupt information from the target sub-storage space of the interrupt information corresponding to the interrupt signal in the 32KB storage space; the mailbox receives the first signal sent by the second processor to indicate that the processing of the interrupt information is complete, and decrements the count corresponding to the interrupt signal in the interrupt accumulator by 1 until the count is 0, indicating that the interrupt signal has been processed, and the interrupt status position corresponding to the interrupt signal can be set to 0.

[0077] Step S220: When the count value of the interrupt signal is equal to 0, the interrupt register in the mailbox sets the interrupt status of the interrupt signal to the interrupt processing completion status.

[0078] In some implementations, when the count value of the interrupt signal is 0, it indicates that the interrupt signal has been processed, and the interrupt status position corresponding to the interrupt signal can be set to 0.

[0079] In the embodiment of the present application, before the mailbox receives the interrupt information sent by the first processor, the storage space in the mailbox is divided into multiple storage spaces corresponding to the multiple processors; the storage space corresponding to each processor is divided into M sub-storage spaces corresponding to each other processor, and the M sub-storage spaces are used to store the interrupt information sent by another processor; and each interrupt signal corresponds to an interrupt status bit, and each interrupt status bit corresponds to an interrupt accumulator, and the interrupt accumulator is used to accumulate the count value of each interrupt signal. In this way, the storage space can be flexibly divided into multiple sub-storage spaces according to needs, and the interrupt information can be stored in the divided corresponding sub-storage spaces for easy management; and when the count value of the interrupt signal is not 0, the interrupt signal continues to be sent to the second processor for processing, avoiding the situation where the second processor only processes the interrupt signal once and sets the interrupt status position of the interrupt signal to 0 when sending the same interrupt signal to the second processor multiple times.

[0080] The present application embodiment proposes a communication method between multiple processors, such as Figure 3 As shown, applied to a mailbox, the method may include steps S310 to S390:

[0081] Step S310: Based on the interrupt register, the mailbox determines a plurality of interrupt status storage areas corresponding to the multiprocessor;

[0082] In some implementations, the interrupt register is divided into a plurality of interrupt status storage areas corresponding one-to-one to a plurality of processors.

[0083] Continue to see Figure 1A The interrupt register 102 includes bits for storing multiple interrupt status bits, namely bit 17 of the interrupt status bit of the interrupt signal received by core 0, bit 18 of the interrupt status bit of the interrupt signal received by core 1, and bit 19 of the interrupt status bit of the interrupt signal received by core 1.

[0084] Step S320: the mailbox divides the interrupt status storage area corresponding to each of the processors into sub-interrupt status storage areas corresponding to each of the other processors;

[0085] In some implementations, the interrupt status storage area corresponding to each processor includes a plurality of sub-interrupt status storage areas corresponding to each of the other processors.

[0086] In some embodiments, the method may further include the following step S111:

[0087] Step S111: store the interrupt status bit of the interrupt signal into the first interrupt status storage area in the interrupt register; the interrupt register includes multiple interrupt status storage areas corresponding to the multiple processors; the first interrupt status storage area is the interrupt status storage area corresponding to the second processor among the multiple interrupt status storage areas; the interrupt status storage area corresponding to each of the processors includes a sub-interrupt status storage area corresponding to each of the other processors; each of the sub-interrupt status storage areas is used to store multiple interrupt status bits corresponding to the interrupt signal.

[0088] Among them, multiple interrupt status storage areas correspond to Figure 1A Bit 17, bit 18, and bit 19 in .

[0089] Continue to see Figure 1A , bit position 17 of the interrupt status bit of the interrupt signal received by core 0 includes sub-interrupt status storage area 1 for storing the interrupt signal sent by core 1 and sub-interrupt status storage area 2 for storing the interrupt signal sent by core 2; bit position 18 of the interrupt status bit of the interrupt signal received by core 1 includes sub-interrupt status storage area 3 for storing the interrupt signal sent by core 0 and sub-interrupt status storage area 4 for storing the interrupt signal sent by core 2; bit position 19 of the interrupt status bit of the interrupt signal received by core 2 includes sub-interrupt status storage area 5 for storing the interrupt signal sent by core 0 and sub-interrupt status storage area 6 for storing the interrupt signal sent by core 1.

[0090] Step S330: storing a plurality of interrupt status bits corresponding to the interrupt signal in each of the sub-interrupt status storage areas;

[0091] In some implementations, each sub-interrupt status storage area has a plurality of interrupt status bits corresponding to the interrupt signal, and the interrupt status bits are used to indicate whether the interrupt signal is processed.

[0092] Step S340: the mailbox receives an interrupt signal from the first processor;

[0093] Step S350: the mailbox sends the interrupt signal to the second processor; and, in response to the interrupt signal, sets the interrupt status of the interrupt signal to the interrupt processing status, and adds 1 to the count value of the interrupt signal; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed;

[0094] Here, an interrupt signal sent by the first processor is received, the interrupt status position of the interrupt signal is set to 1, and the count corresponding to the interrupt signal is increased by 1 through the interrupt accumulator.

[0095] Step S360: the mailbox calculates the interrupt status bit of the interrupt signal to be shielded and the mask;

[0096] In some implementations, the interrupt status bit of the interrupt signal to be masked is ANDed with mask 0, so that the processor receiving the interrupt signal does not process the interrupt signal to be masked.

[0097] Step S370: Based on the interrupt status bit after AND calculation, the mailbox determines the interrupt signal that the second processor needs to process;

[0098] Here, after the interrupt status bit of the interrupt signal is ANDed with 0, the interrupt status bit of the interrupt signal is always 0. Therefore, the second processor receiving the interrupt signal does not process the interrupt signal, that is, the interrupt signal can be shielded.

[0099] Step S380: the mailbox receives a first signal from the second processor, where the first signal is used to indicate that the interrupt information processing is completed;

[0100] Here, after the second processor completes processing the interrupt information, it sends the first signal to the mailbox.

[0101] Step S390: In response to the first signal, the interrupt accumulator in the mailbox decrements the count value of the interrupt signal by 1.

[0102] Here, the mailbox receives the first signal sent by the mailbox, the interrupt accumulator reduces the count corresponding to the interrupt signal by 1, and when the count corresponding to the interrupt signal is 0, the interrupt register sets the interrupt status position corresponding to the interrupt signal to 0.

[0103] In the embodiment of the present application, after receiving the interrupt signal sent by the first processor, the mailbox sends the interrupt signal to the second processor; the interrupt status bit corresponding to the interrupt signal to be shielded is ANDed with 0; the second processor reads the corresponding interrupt information from the mailbox according to the interrupt signal and sends a first signal to the mailbox indicating that the interrupt information processing is completed after the processing is completed; the interrupt accumulator decrements the count corresponding to the interrupt signal by 1; when the count corresponding to the interrupt signal is 0, the interrupt status bit corresponding to the interrupt signal is set to 0. In this way, by performing the AND calculation of the interrupt status bit corresponding to the interrupt signal to be shielded with mask 0, that is, the interrupt status bit is always 0, so that the second processor does not process the interrupt signal, and the purpose of shielding the interrupt signal by masking is achieved.

[0104] The present application embodiment provides a communication system between multiple processors, including:

[0105] A multiprocessor comprising at least a first processor and a second processor;

[0106] In some implementations, the first processor is a processor that sends an interrupt signal; and the second processor is a processor that receives an interrupt signal.

[0107] mailbox, used for receiving an interrupt signal from a first processor; sending the interrupt signal to a second processor; and, in response to the interrupt signal, setting the interrupt status position of the interrupt signal to an interrupt processing status, and adding 1 to the count value of the interrupt signal; wherein the second processor is used for reading and processing interrupt information in a target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used for accumulating the number of times the interrupt signal has not been processed; receiving a first signal from the second processor, the first signal being used to indicate that the interrupt information processing has been completed; and in response to the first signal, subtracting 1 from the count value of the interrupt signal.

[0108] In some embodiments, the mailbox further includes:

[0109] A plurality of storage spaces corresponding to the multiple processors; the storage space corresponding to each of the processors includes M sub-storage spaces corresponding to each of the other processors, the M sub-storage spaces being used to store interrupt information sent by any of the other processors, where M is an integer greater than 1;

[0110] The interrupt register includes multiple interrupt status storage areas corresponding to the multiple processors; the interrupt status storage area corresponding to each processor includes a sub-interrupt status storage area corresponding to each other processor; each sub-interrupt status storage area is used to store multiple interrupt status bits corresponding to the interrupt signal.

[0111] In some implementations, the storage space is a FIFO storage space in a mailbox.

[0112] In some implementations, the storage space in the mailbox is divided into a plurality of storage spaces corresponding to a plurality of processors; and the storage space corresponding to each processor includes a plurality of sub-storage spaces corresponding to each of the other processors.

[0113] Continue to see Figure 1A The storage space 101 in the mailbox includes the storage space 11 for the interrupt information received by core 0; the storage space 12 for the interrupt information received by core 1; and the storage space 13 for the interrupt information received by core 2.

[0114] In some embodiments, the interrupt register is used to store the interrupt status bit of the interrupt signal; the interrupt status bit is used to indicate whether the interrupt signal is processed; when the interrupt status bit is 1, it indicates that the interrupt signal has not been processed or is in the process of being processed; when the interrupt status bit is 0, it indicates that the interrupt signal has been processed.

[0115] Continue to see Figure 1A The interrupt register 102 includes bit 17 of the interrupt status bit of the interrupt signal received by core 0; bit 18 of the interrupt status bit of the interrupt signal received by core 1; and bit 19 of the interrupt status bit of the interrupt signal received by core 2.

[0116] In some embodiments, the interrupt register is divided into multiple interrupt status storage areas corresponding to multiple processors; in some embodiments, the interrupt status storage area corresponding to each processor includes sub-interrupt status storage areas corresponding to other processors; each sub-interrupt status storage area has multiple interrupt status bits corresponding to the interrupt signal, and the interrupt status bit is used to indicate whether the interrupt signal is processed.

[0117] The communication method between the above-mentioned multiple processors is specifically described below in conjunction with a specific embodiment. However, it should be noted that this specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.

[0118] The embodiment of the present application provides an overall technical solution of a mailbox-based inter-core communication method, which may include steps S401 to S409:

[0119] Step S401: the mailbox receives the interrupt information sent by each core;

[0120] Here, the interrupt information includes the identifier of the core as the sender of the interrupt information, the identifier of the core as the receiver of the interrupt information, the interrupt information that the sender of the interrupt information needs to share with the receiver of the interrupt information, and the identifier corresponding to the interrupt signal. Before sending the interrupt information, the sender of the interrupt information needs to read the empty and full status of the FIFO storage space, and store the interrupt information in the storage space when it is determined that the remaining space in the FIFO storage space is greater than or equal to the size of the interrupt information, so as to prevent memory overflow when writing the interrupt information.

[0121] Step S402: the mailbox stores the interruption information into the corresponding FIFO storage space according to the identifier of the core as the sender of the interruption information and the identifier of the core as the receiver of the interruption information in the interruption information;

[0122] Figure 4 This is a schematic diagram of the mailbox structure, such as Figure 4As shown, in the mailbox, the 32KB storage space 401 for storing interrupt information is first divided into three large storage spaces, namely, storage space 402 for core 0 interrupt information, storage space 403 for core 1 interrupt information, and storage space 404 for core 2 interrupt information; then each large storage area is divided into two storage areas to distinguish which core writes the interrupt information. The specific division is as follows: the storage space 402 for core 0 interrupt information is used to store interrupt information sent from core 1 and core 2 to core 0, among which, 0_core 1_write / read to 7_core 1_write / read these 8 small FIFO storage spaces store interrupt information sent by core 1, and 0_core 2_write / read to 7_core 2_write / read these 8 small FIFO storage spaces store interrupt information sent by core 2; the storage space 403 for core 1 interrupt information is used to store interrupt information sent from core 0 and core 2 to core 1, among which, 0_core 0_write / read to 7_core 0_write / read these 8 small FIFO storage spaces store interrupt information sent by core 2; 8 small FIFO storage spaces store interrupt information sent by core 0, and 0_core2_write / read to 7_core2_write / read store interrupt information sent by core 2; the storage space 404 for core 2 interrupt information is used to store interrupt information sent by core 0 and core 1 to core 2, wherein 0_core0_write / read to 7_core0_write / read store interrupt information sent by core 0, and 0_core1_write / read to 7_core1_write / read store interrupt information sent by core 1. It can be seen that the 32KB storage space 401 is divided into 48 (i.e., 3*(8+8)) small storage spaces, and the start and end addresses of these 48 FIFO storage spaces are allocated by the AHB write FIFO address register, and the configuration range of each FIFO storage space is 0 to 8191.

[0123] The mailbox writes the interrupt information into the corresponding FIFO storage space according to the identifier of the core as the sender of the interrupt information and the identifier of the core as the receiver of the interrupt information in the interrupt information.

[0124] Step S403: the mailbox receives the interrupt signal sent by each core;

[0125] The mailbox receives an interrupt signal sent by core 0, core 1 or core 2, where the interrupt signal includes the identifier of the core that sends the interrupt signal, the identifier of the core that receives the interrupt signal, the interrupt type, and the identifier corresponding to the interrupt signal. Figure 5 The following is a schematic diagram of the communication between core 0, core 1, and core 2 for interrupting each other. Figure 5 As shown, core 0 can receive 24-bit soft interrupts sent by cores 1 and 2; core 1 can receive 24-bit soft interrupts sent by cores 0 and 2; core 2 can receive 24-bit soft interrupts sent by cores 0 and 1. 24-bit soft interrupts can represent 24 different interrupt types.

[0126] Step S404: writing an interrupt register and counting according to the interrupt signal;

[0127] Continue to see Figure 4 , the bits of the core 0 soft interrupt in the interrupt register are used to write the interrupt status bits corresponding to the interrupt signals sent by core 1 and core 2 to core 0, wherein core 1_write / read (interrupt 0_23:0) indicates that the 23:0 bits correspond to the interrupt status bits of the 24 interrupt signals sent by core 1 to core 0, and core 2_write / read (interrupt 0_47:24) indicates that the 47:24 bits correspond to the interrupt status bits of the 24 interrupt signals sent by core 2 to core 0; the bits of the core 1 soft interrupt in the interrupt register are used to write the interrupt signals sent by core 0 and core 2 to core 1, wherein core 0_write / read (interrupt 0_23:0) indicates that the 23:0 bits correspond to the interrupt status bits of the 24 interrupt signals sent by core 2 to core 0. The interrupt status bits of the 24 interrupt signals sent by core 0 to core 1, core 2_write / read (interrupt 0_47:24) indicates that bits 47:24 correspond to the interrupt status bits of the 24 interrupt signals sent by core 2 to core 1; the bits of the core 2 soft interrupt in the interrupt register are used to write the interrupt signals sent by core 0 and core 1 to core 2, wherein core 0_write / read (interrupt 0_23:0) indicates that bits 23:0 correspond to the interrupt status bits of the 24 interrupt signals sent by core 0 to core 2, core 1_write / read (interrupt 0_47:24) indicates that bits 47:24 correspond to the interrupt status bits of the 24 interrupt signals sent by core 1 to core 2.

[0128] The mailbox sets the interrupt status position corresponding to the interrupt signal in the interrupt register to 1 according to the identifier of the core as the sender of the interrupt signal, the identifier of the core as the receiver of the interrupt signal, and the interrupt type.

[0129] When receiving multiple identical interrupt signals from the same core, in order to prevent the previously received interrupt signal from being overwritten by the next received interrupt signal before it is processed, each interrupt status bit corresponds to an interrupt accumulator, which is used to accumulate the number of interrupt signals that have not been processed for each interrupt status bit. When an interrupt signal is received, the interrupt accumulator adds 1 to the interrupt signal count value, and after the interrupt signal is processed once, the interrupt accumulator subtracts 1 from the interrupt signal count value, until the cumulative sum of the interrupt signal count values ​​is 0, and the interrupt status position corresponding to the interrupt signal is set to 0. The unprocessed count of each interrupt signal can be accumulated up to 3 times, so that the interrupt signal that should be processed multiple times will not be processed only once and the corresponding interrupt status position will not be set to 0.

[0130] Continue to see Figure 4, soft interrupt 0_count x24 core 1 is written as the count value of the 24 interrupt signals sent by core 1 received by core 0, and soft interrupt 0_count x24 core 2 is written as the count value of the 24 interrupt signals sent by core 2 received by core 0; soft interrupt 1_count x24 core 0 is written as the count value of the 24 interrupt signals sent by core 0 received by core 1, and soft interrupt 1_count x24 core 2 is written as the count value of the 24 interrupt signals sent by core 2 received by core 1; soft interrupt 2_count x24 core 0 is written as the count value of the 24 interrupt signals sent by core 0 received by core 2, and soft interrupt 2_count x24 core 1 is written as the count value of the 24 interrupt signals sent by core 1 received by core 2.

[0131] Step S405: performing AND calculation on the interrupt status bit corresponding to the interrupt signal to be masked and mask 0, so that the core receiving the interrupt signal does not process the interrupt signal;

[0132] After the interrupt status bit and mask 0 are ANDed, the interrupt status bit is always 0, thereby achieving the purpose that the core receiving the interrupt signal does not process the interrupt.

[0133] Step S406: the mailbox sends the interrupt signal to the core that receives the interrupt signal;

[0134] Step S407: the core receiving the interrupt signal reads the interrupt information from the corresponding FIFO storage space according to the interrupt signal;

[0135] The core receiving the interrupt signal reads the corresponding interrupt information from the FIFO storage space of the mailbox according to the identifier of the core as the sender of the interrupt signal, the identifier of the core as the receiver of the interrupt signal, the interrupt type, and the identifier corresponding to the interrupt information.

[0136] Step S408: the core receiving the interrupt signal processes the interrupt according to the interrupt information, and sends a message of processing completion to the mailbox after the processing is completed;

[0137] After the core that receives the interrupt signal completes processing the interrupt information, it sends a message to the mailbox indicating that the interrupt information processing is completed.

[0138] Step S409: the mailbox receives a message indicating that the interrupt information processing is completed, the interrupt register sets the interrupt status position corresponding to the interrupt signal to 0, and the interrupt accumulator reduces the count value of the corresponding interrupt signal by 1.

[0139] In the present application, see Figure 4, by flexibly dividing the 32KB FIFO storage space inside the mailbox into multiple storage spaces corresponding to the cores, each storage space is used to store the interrupt information sent by other cores, so that these interrupt information can be managed in different regions; by calculating the interrupt status bit of the interrupt signal that needs to be shielded with mask 0, the interrupt status bit is always 0, so that the core receiving the interrupt signal does not process the interrupt signal; by giving each interrupt status bit a corresponding interrupt accumulator to accumulate the count values ​​of multiple identical interrupt signals sent by the same core, when the mailbox receives an interrupt signal, the interrupt accumulator adds 1 to the count value of the interrupt signal, and after the interrupt signal is processed once, the interrupt accumulator subtracts 1 from the count value of the interrupt signal. In this way, the core receiving the interrupt signal will not process the interrupt signal that should be processed multiple times only once and set the interrupt status position of the interrupt signal to 0.

[0140] Based on the foregoing embodiments, an embodiment of the present application provides a communication device between multiple processors, which includes the modules included, and the units included in the modules, etc., which can be implemented by a system-level chip in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the system-level chip can be a central processing unit (CPU), a digital signal processor (DSP), etc.

[0141] The present application embodiment provides a communication device between multiple processors, such as Figure 6 As shown, the device 600 includes:

[0142] A first receiving module 601, configured to receive an interrupt signal from a first processor;

[0143] The first sending module 602 is used to send the interrupt signal to the second processor; and in response to the interrupt signal, the interrupt state position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is increased by 1; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed;

[0144] A second receiving module 603, used for receiving a first signal from the second processor, where the first signal is used for indicating that the interrupt information processing is completed;

[0145] The first response module 604 is used to respond to the first signal and reduce the count value of the interrupt signal by 1.

[0146] In some embodiments, the apparatus further comprises:

[0147] A second sending module is used for sending the interrupt signal to the second processor when the count value of the interrupt signal is greater than 0 after the count value of the interrupt signal is decremented by 1;

[0148] The second response module is used to respond to the first signal sent by the second processor and reduce the count value of the interrupt signal by 1.

[0149] In some embodiments, the apparatus further comprises:

[0150] The status update module is used to set the interrupt status of the interrupt signal to the interrupt processing completion status when the count value of the interrupt signal is equal to 0.

[0151] In some embodiments, the apparatus further comprises:

[0152] A third receiving module, used for receiving the interrupt information sent by the first processor;

[0153] The first determining module is used to determine a target sub-storage space corresponding to the interruption information, and store the interruption information in the target sub-storage space.

[0154] In some embodiments, the apparatus further comprises:

[0155] An AND calculation module, used for performing AND calculation on the interrupt status bit of the interrupt signal to be shielded and the mask;

[0156] The second determining module is used to determine the interrupt signal that the second processor needs to process based on the interrupt status bit after calculation.

[0157] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0158] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0159] An embodiment of the present application provides a computer device, including a memory and a system-level chip, wherein the memory stores a computer program that can be run on the system-level chip, and the system-level chip implements some or all of the steps in the above method when executing the program.

[0160] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a system-level chip, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0161] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a system-level chip in the computer device executes some or all of the steps in the above method.

[0162] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0163] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0164] The present application embodiment provides a computer device, such as Figure 7 As shown, the hardware entity of the computer device 700 includes: a system-level chip 701, a communication interface 702 and a memory 703, wherein: the system-level chip 701 generally controls the overall operation of the computer device 700. The communication interface 702 enables the computer device to communicate with other terminals or servers through a network. The memory 703 is configured to store instructions and applications executable by the system-level chip 701, and can also cache the system-level chip 701 and the data to be processed or processed by each module in the computer device 700 (for example, image data, audio data, voice communication data and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be carried out between the system-level chip 701, the communication interface 702 and the memory 703 through the bus 704.

[0165] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0166] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0167] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0168] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, the functional units in the embodiments of the present application may be all integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0169] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0170] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0171] The above is only an implementation method 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.

Claims

1. A communication method between multiple processors, It is characterized in that Applied to mailbox, the method comprises: receiving an interrupt signal from the first processor; The interrupt signal is sent to the second processor; and in response to the interrupt signal, the interrupt state position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is incremented by 1; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; receiving a first signal from the second processor, wherein the first signal is used to indicate that the interrupt information processing is completed; In response to the first signal, a count value of the interrupt signal is decremented by 1.

2. Based on the method described in claim 1, It is characterized in that The method further comprises: After the count value of the interrupt signal is decremented by 1, if the count value of the interrupt signal is greater than 0, sending the interrupt signal to the second processor; In response to the first signal sent by the second processor, a count value of the interrupt signal is subtracted by 1.

3. Based on the method described in claim 1, It is characterized in that The method further comprises: When the count value of the interrupt signal is equal to 0, the interrupt status of the interrupt signal is set to an interrupt processing completion status.

4. Based on the method described in claim 1, It is characterized in that Before receiving the interrupt signal sent by the first processor, the method further includes: receiving interrupt information sent by the first processor; A target sub-storage space corresponding to the interruption information is determined, and the interruption information is stored in the target sub-storage space.

5. The method according to any one of claims 1 to 4, It is characterized in that The storage space in the mailbox includes a plurality of storage spaces corresponding to the multiprocessors; The storage space corresponding to each of the processors includes M sub-storage spaces corresponding to each of the other processors. The M sub-storage spaces are used to store interrupt information sent by any other processor, and M is an integer greater than 1.

6. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: Storing the interrupt status bit of the interrupt signal in a first interrupt status storage area in an interrupt register; The interrupt register includes a plurality of interrupt status storage areas corresponding to the multiple processors; the first interrupt status storage area is an interrupt status storage area corresponding to the second processor among the plurality of interrupt status storage areas; The interrupt status storage area corresponding to each of the processors includes a sub-interrupt status storage area corresponding to each of the other processors; Each of the sub-interrupt status storage areas is used to store a plurality of interrupt status bits corresponding to the interrupt signal.

7. The method according to any one of claims 1 to 5, It is characterized in that After setting the interrupt status of the interrupt signal to an interrupt processing state, the method further includes: Calculate the interrupt status bit of the interrupt signal to be masked and the mask; Based on the interrupt status bit after the AND calculation, an interrupt signal that needs to be processed by the second processor is determined.

8. A communication system between multiple processors, It is characterized in that include: A multiprocessor comprising at least a first processor and a second processor; mailbox, for receiving an interrupt signal from the first processor; Sending the interrupt signal to the second processor; And, in response to the interrupt signal, the interrupt status position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is incremented by 1; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; A first signal is received from the second processor, wherein the first signal is used to indicate that the interrupt information processing is completed; and in response to the first signal, a count value of the interrupt signal is decremented by 1.

9. A communication system according to claim 8, It is characterized in that The mailbox also includes: A plurality of storage spaces corresponding to the multiple processors; the storage space corresponding to each of the processors includes M sub-storage spaces corresponding to each of the other processors, the M sub-storage spaces being used to store interrupt information sent by any of the other processors, where M is an integer greater than 1; The interrupt register includes multiple interrupt status storage areas corresponding to the multiple processors; the interrupt status storage area corresponding to each processor includes a sub-interrupt status storage area corresponding to each other processor; each sub-interrupt status storage area is used to store multiple interrupt status bits corresponding to the interrupt signal.

10. A communication device between multiple processors, It is characterized in that include: A first receiving module, used for receiving an interrupt signal from a first processor; A first sending module, used for sending the interrupt signal to the second processor; And, in response to the interrupt signal, the interrupt status position of the interrupt signal is set to the interrupt processing state, and the count value of the interrupt signal is incremented by 1; wherein the second processor is used to read and process the interrupt information in the target sub-storage space based on the interrupt signal, and the count value of the interrupt signal is used to accumulate the number of times the interrupt signal has not been processed; A second receiving module, used for receiving a first signal from the second processor, wherein the first signal is used for indicating that the interrupt information processing is completed; The first response module is used to respond to the first signal and reduce the count value of the interrupt signal by 1.

11. A system-on-chip, It is characterized in that The system-on-chip comprises a communication system between multiple processors as claimed in claim 8 or 9.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a system-level chip, the steps in the method according to any one of claims 1 to 7 are implemented.

13. A computer program product comprising a computer program or instructions, It is characterized in that When the computer program or instruction is executed by a system-level chip, the steps in the method according to any one of claims 1 to 7 are implemented.