Information interaction method and system of doorbell mechanism in SOC system
By adding to the doorbell mechanism of the SOC system and using multiple interrupt waiting mechanisms, the problem of information interfering with each other when the doorbell mechanism is combined with RAM is solved, and the efficient interaction of information between Core is achieved.
Patent Information
- Application Number
- CN202411499499.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-07
AI Technical Summary
In SOC systems, when the doorbell mechanism is used in combination with RAM, there is a problem of information interfering with each other, affecting the efficiency of message interaction between Core.
A separate register to be read is added to the doorbell mechanism to store the address and parameter information of the transmitted information, and information is transmitted through multiple interrupt waiting mechanisms.
It realizes efficient interaction of information between different cores in the SOC system, and supports multiple interrupts to work simultaneously without interfering with each other.
Smart Images

Figure CN119576849A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of SOC technology, and in particular to an information interaction method and system of a doorbell mechanism in a SOC system. Background Art
[0002] In the SOC (System on Chip) system, there is message transmission and communication between the various MCUs in the SOC and between the Host and the various MCUs. Since each Core is unaware that other Cores have sent messages to it, there needs to be a mechanism to inform the current Core to read the messages sent to it by other Cores. In order to support this kind of message communication operation between Cores, the system provides a doorbell mechanism in the SOC system for message transmission.
[0003] In actual applications, the doorbell mechanism is used together with RAM to complete the message exchange between cores (a storage area is opened up in RAM, which is the Mail-box, specifically for storing the content of the interactive messages). When two cores need to communicate messages, one party first writes the message to the shared storage space, and then notifies the other party of the starting address and message length of the message through the interrupt mechanism of the doorbell mechanism. After receiving the interrupt, the other party obtains the address and length information of the message through the read register of the doorbell mechanism, and then obtains the message from the shared storage space, resulting in mutual interference of information. Summary of the invention
[0004] In view of this, the present invention provides an information interaction method and system of a doorbell mechanism in a SOC system, which can efficiently realize information interaction between different Cores in the SOC system.
[0005] The present invention adopts the following technical scheme: The invention discloses an information interaction method of a doorbell mechanism in a SOC system. A separate waiting-to-read register is added to the doorbell mechanism to store the address and parameter information of the transmission information, and the information is transmitted through multiple interrupt waiting mechanisms.
[0006] Furthermore, through multiple interrupt waiting mechanisms, the transmission of information specifically includes: determining whether to execute the writing of the doorbell register through the interrupt status register; triggering an interrupt response after completing the writing of the doorbell register, and after the receiving information core detects the interrupt response, reading the doorbell register according to the positioning information of the register to be read.
[0007] Furthermore, the information interaction method specifically includes the following steps: Step S1, write the configuration register to specify the doorbell register that can be used by each sending and receiving information core in the SOC system; Step S2, the information sending core configures the interrupt enable register corresponding to each doorbell of the current task and reads the interrupt status register to confirm whether the previous interrupt is completed. If the previous interrupt is not completed, the information sending core waits for the previous interrupt to be completed before entering step S3; Step S3, the sending information core configures the to-be-read register, marking the object of the expected notification of this interrupt as the address corresponding to the receiving information core and the doorbell content; Step S4, the information sending core writes the information to be transmitted into the doorbell register corresponding to the register to be read, and a corresponding interrupt will be generated when the high bit of each doorbell register is written; Step S5, the receiving information core reads the to-be-read register and the interrupt status register according to the detected doorbell register interrupt to determine the position of the current message in the doorbell register; Step S6, the receiving information core reads the doorbell register that has been written, and confirms whether the corresponding doorbell register has been fully read through the register to be read; if not fully read, the receiving information core continues to perform the operation of reading the doorbell register until all reading is completed, and then enters step S7; Step S7: The receiving information core configures an interrupt clear register and clears the states corresponding to all the doorbell registers that have been read, thereby completing the information exchange.
[0008] Furthermore, the position in step S5 refers to the position of the current message in the 64 doorbell registers.
[0009] An information interaction system of a doorbell mechanism in a SOC system, comprising: A register to be read, used to store the address and parameter information of the transmission information; The interrupt enable register and interrupt status register determine whether to write to the doorbell register; Register configuration unit, which specifies the doorbell registers that can be used by each core that sends and receives information in the SOC system; The sending information core configures the interrupt enable register corresponding to each doorbell of the current task and reads the interrupt status register to confirm whether the previous interrupt is completed. If the previous interrupt is not completed, the sending information core will wait for the previous interrupt to be completed. After the interrupt is completed, the to-be-read register is configured to mark the object of the expected notification of this interrupt as the address corresponding to the receiving information core and the doorbell content. The information to be transmitted is written into the doorbell register corresponding to the to-be-read register, and the corresponding interrupt will be generated when the high bit of each doorbell register is written. The receiving information core reads the to-be-read register and the interrupt status register according to the detected doorbell register interrupt to determine the location of the current message in the doorbell register; the receiving information core reads the doorbell register that has been written, and confirms through the to-be-read register whether the corresponding doorbell register has been fully read; if not fully read, the receiving information core continues to execute the operation of reading the doorbell register until all readings are completed; after the reading is completed, the receiving information core configures the interrupt clear register and clears the status corresponding to all the doorbell registers that have been read to complete the information interaction.
[0010] Compared with the prior art, the beneficial effects of the present invention are: the present invention combines the doorbell mechanism with RAM in the SOC system, stores interactive information through the shared storage space of RAM, and realizes efficient transmission of information between the cores in the SOC system through the doorbell plus interrupt mechanism, and the invention supports multiple interrupts working at the same time without interfering with each other.
[0011] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The present invention provides a flow chart of an information interaction method of a doorbell mechanism in a SOC system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the following embodiments are specifically cited and described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0014] Figure 1 A flow chart of an information interaction method of a doorbell mechanism in a SOC system provided by an embodiment of the present invention is shown. For ease of explanation, only the part related to the embodiment of the present invention is shown.
[0015] This embodiment provides an information interaction method of a doorbell mechanism in a SOC system, including: writing a configuration register through driver software to specify a doorbell register of each Core in the SOC system; then the sending information core configures the interrupt enable register and the to-be-read register of the receiving message core, and determines whether to execute the writing of the doorbell register through the interrupt status register; then triggering an interrupt response after completing the writing of the doorbell register, and after the receiving information core detects the interrupt response, reading the doorbell register according to the positioning information of the to-be-read register, and executing the interrupt status clearing operation after completing the reading of all doorbell registers; Figure 1 As shown, the specific steps include: Step S1, write the configuration register through the SOC system driver software to allocate the module doorbell register resources. This register is maintained by the SOC system driver software, and the SOC system hardware will not update or use the value of this register. The basis for the hardware to generate an interrupt is the register to be read (A2B_VAL). Configuring the register to be read (A2B_VAL) will not affect the operation of the hardware; A_Core indicates the core that sends information, B_Core indicates the core that receives information, and A2B_VAL is a register to be read, which is used to share information between cores to ensure that the allocation of doorbell registers is mutually exclusive; Step S2, the sending information core (A_Core) configures the interrupt enable register (A2B_EN[63:0]) corresponding to each doorbell of the current task to be valid, and reads the interrupt status register (INT_STAT) to confirm whether the previous interrupt is completed; Before the sending core (A_Core) writes the doorbell information to the receiving core (B_Core), it first needs to read the interrupt status register (INT_STAT) to determine whether the interrupt from the sending core (A_Core) to the receiving core (B_Core) has been completed. If not, it will keep waiting. Step S3, if the previous interrupt of the receiving information core (B_Core) has been completed, the sending information core (A_Core) updates the to-be-read register (A2B_VAL) corresponding to the receiving information core (B_Core), and writes the doorbell register address corresponding to this message into the to-be-read register (A2B_VAL); Step S4, the information sending core (A_Core) writes the information to be transmitted into the doorbell register corresponding to the register to be read (A2B_VAL). The module generates a corresponding interrupt to the receiving information core (B_Core) when the high bit of each doorbell register is written according to the information of the existing register to be read (A2B_VAL). If the doorbell information is written into the area where the register to be read (A2B_VAL) has no value assigned, it is regarded as an invalid operation and the write status register will not be updated; Step S5: After the receiving information core (B_Core) detects the interrupt, it locates the position of the message in the 64 doorbell registers by reading the register to be read (A2B_VAL). Then it determines which doorbell data has been written and can be read through the queue status register (A2B_WRITEN[63:0]); Step S6, the receiving information core (B_Core) reads the doorbell register that has been written, and confirms whether the corresponding doorbell register has been read through the register to be read (A2B_VAL); if the doorbell register corresponding to the register to be read is not completely read, the receiving information core (B_Core) will continue to perform the operation of reading the doorbell register until all the doorbell registers corresponding to the register to be read (A2B_VAL) are read, and then enter step S7; Step S7, the receiving information core (B_Core) can directly read the ready doorbell register and clear the corresponding queue status, or it can clear the queue status of all queue status registers (A2B_WRITEN[63:0]) at once after all data are read. Only when all enables are valid and the corresponding queue status registers are cleared, the interrupt (A2B_INT) from the sending information core (A_Core) to the receiving information core (B_Core) will be cleared, that is, the interrupt status register (INT_STAT) is rewritten, so as to continue the next interrupt task.
[0016] An information interaction system of a doorbell mechanism in a SOC system, comprising: A register to be read, used to store the address and parameter information of the transmission information; The interrupt enable register and interrupt status register determine whether to write to the doorbell register; Register configuration unit, which specifies the doorbell registers that can be used by each core that sends and receives information in the SOC system; The sending information core configures the interrupt enable register corresponding to each doorbell of the current task and reads the interrupt status register to confirm whether the previous interrupt is completed. If the previous interrupt is not completed, the sending information core will wait for the previous interrupt to be completed. After the interrupt is completed, the to-be-read register is configured to mark the object of the expected notification of this interrupt as the address corresponding to the receiving information core and the doorbell content. The information to be transmitted is written into the doorbell register corresponding to the to-be-read register, and the corresponding interrupt will be generated when the high bit of each doorbell register is written. The receiving information core reads the to-be-read register and the interrupt status register according to the detected doorbell register interrupt to determine the location of the current message in the doorbell register; the receiving information core reads the doorbell register that has been written, and confirms through the to-be-read register whether the corresponding doorbell register has been fully read; if not fully read, the receiving information core continues to execute the operation of reading the doorbell register until all readings are completed; after the reading is completed, the receiving information core configures the interrupt clear register and clears the status corresponding to all the doorbell registers that have been read to complete the information interaction.
[0017] A computer storage medium stores an executable program, and the executable program is executed by a processor to implement the steps of the information interaction method.
[0018] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0019] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An information interaction method of a doorbell mechanism in a SOC system, characterized in that: A separate waiting-to-read register is added to the doorbell mechanism to store the address and parameter information of the transmission information, and the information is transmitted through multiple interrupt waiting mechanisms.
2. The information interaction method of the doorbell mechanism in the SOC system according to claim 1, characterized in that: The information transmission through multiple interrupt waiting mechanisms specifically includes: determining whether to execute the writing of the doorbell register through the interrupt status register; triggering the interrupt response after completing the writing of the doorbell register, and after the receiving information core detects the interrupt response, reading the doorbell register according to the positioning information of the register to be read.
3. The information interaction method of the doorbell mechanism in the SOC system according to claim 2, characterized in that: The information interaction method specifically comprises the following steps: Step S1, write the configuration register to specify the doorbell register that each sending and receiving information core in the SOC system can use; Step S2, the information sending core configures the interrupt enable register corresponding to each doorbell of the current task and reads the interrupt status register to confirm whether the previous interrupt is completed. If the previous interrupt is not completed, the information sending core waits for the previous interrupt to be completed before entering step S3; Step S3, the sending information core configures the to-be-read register, marking the object of the expected notification of this interrupt as the address corresponding to the receiving information core and the doorbell content; Step S4, the information sending core writes the information to be transmitted into the doorbell register corresponding to the register to be read, and a corresponding interrupt will be generated when the high bit of each doorbell register is written; Step S5, the receiving information core reads the to-be-read register and the interrupt status register according to the detected doorbell register interrupt to determine the position of the current message in the doorbell register; Step S6, the receiving information core reads the doorbell register that has been written, and confirms whether the corresponding doorbell register has been fully read through the register to be read; if not fully read, the receiving information core continues to perform the operation of reading the doorbell register until all reading is completed, and then enters step S7; Step S7: The receiving information core configures an interrupt clear register and clears the states corresponding to all the doorbell registers that have been read, thereby completing the information exchange.
4. The information interaction method of the doorbell mechanism in the SOC system according to claim 3 is characterized in that: The position in step S5 refers to the position of the current message in the 64 doorbell registers.
5. An information interaction system for implementing the doorbell mechanism in the SOC system of any one of claim 3, characterized in that: include: A register to be read, used to store the address and parameter information of the transmission information; The interrupt enable register and interrupt status register determine whether to write to the doorbell register; Register configuration unit, which specifies the doorbell registers that can be used by each core that sends and receives information in the SOC system; The sending information core configures the interrupt enable register corresponding to each doorbell of the current task and reads the interrupt status register to confirm whether the previous interrupt is completed. If the previous interrupt is not completed, the sending information core will wait for the previous interrupt to be completed. After the interrupt is completed, the to-be-read register is configured to mark the object of the expected notification of this interrupt as the address corresponding to the receiving information core and the doorbell content. The information to be transmitted is written into the doorbell register corresponding to the to-be-read register, and the corresponding interrupt will be generated when the high bit of each doorbell register is written. The receiving information core reads the to-be-read register and the interrupt status register according to the detected doorbell register interrupt to determine the location of the current message in the doorbell register; the receiving information core reads the doorbell register that has been written, and confirms whether the corresponding doorbell register has been fully read through the to-be-read register; If not all are read, the receiving information core continues to execute the operation of reading the doorbell register until all are read; after reading is completed, the receiving information core configures the interrupt clear register and clears the states corresponding to all the doorbell registers that have been read to complete the information exchange.
6. A computer storage medium, characterized in that: The computer storage medium stores an executable program, and the executable program is executed by a processor to implement the steps of the information interaction method according to any one of claims 1 to 4.