Microprocessor, information processing method in microprocessor and electronic equipment
By employing a multi-processor core architecture and register management mechanism, the performance bottlenecks and software stability issues of traditional microprocessors in processing large amounts of data have been resolved, achieving efficient and reliable information processing.
Patent Information
- Application Number
- CN202411073633.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
AI Technical Summary
In traditional microprocessor architectures, high resource consumption can easily occur when a single processor core processes large amounts of data, affecting overall performance, and inaccurate processing of software function requests can lead to unstable operation.
It adopts a multi-processor core architecture, manages interrupt requests of each processor core through interrupt status registers and interrupt mask registers, realizes fast data transmission through hardware direct transfer registers, and ensures orderly interaction between processor cores through pointer registers.
It improves the reliability and performance of the microprocessor, ensures the normal operation of software functions, and reduces processor core utilization and interaction latency.
Smart Images

Figure CN119003445A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of processor technology, and in particular to a microprocessor, an information processing method in a microprocessor, and an electronic device. Background Art
[0002] In the traditional microprocessor architecture, all data processing is directly performed by one processor core. However, this architecture has very high performance requirements for the processor core. Once a large amount of data needs to be processed, the processor core is prone to high occupancy, which in turn affects the performance of the entire microprocessor. To this end, one solution is to add a processor core to the microprocessor to assist the original processor core in processing data. However, in actual application, when the software is running in the microprocessor, some functions of the software will generate requests requiring each processor core to process. At this time, it is necessary to accurately notify the corresponding processor core through a certain mechanism to process in order to ensure the normal operation of the software function, thereby ensuring the reliability of the software operation of the microprocessor. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a microprocessor, an information processing method in a microprocessor, and an electronic device, so as to realize the notification of a function generation request of software in the microprocessor to a corresponding processor core.
[0004] An embodiment of the present application provides a microprocessor, comprising: a first processor core; an input-output processor connected to the first processor core; the input-output processor comprising a register array and at least one second processor core; the register array comprising an interrupt status register; the interrupt status register comprising n interrupt status indication bits, each of which is used to indicate whether an interrupt corresponding to a software function needs to be triggered; n is a positive integer greater than or equal to 1; wherein, when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the second processor core needs to be interrupted; when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the first processor core needs to be interrupted.
[0005] In the above-mentioned microprocessor, by setting an interrupt status register, and using each interrupt status indication bit in the interrupt status register to indicate whether an interrupt corresponding to a software function is triggered, when the software is running in the microprocessor and certain functions of the software generate requests requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be achieved by updating the value of the corresponding interrupt status indication bit in the interrupt status register, thereby enabling the software function to run normally and improving the reliability of the microprocessor.
[0006] Furthermore, the register array also includes an interrupt mask register; the interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled.
[0007] It can be understood that in actual applications, there may be some scenarios where it is not desired for some software functions to actually generate interrupt information (for example, there may be some scenarios where it is not desired for some software functions to actually be used), or there may be some scenarios where it is not desired for some software functions to immediately generate interrupt signals after the interrupt status register is configured (for example, in some scenarios, the first processor core or the second processor core is processing a more important task, and at this time, it is desired that the interrupt of the software function come after the task is processed). In the above implementation, by setting the interrupt mask register and setting the value recorded in each first interrupt mask status indicator bit of the interrupt mask register to represent whether the interrupt enable indicated by the corresponding interrupt status indicator bit is allowed, the interrupt mask register can be configured to control whether the interrupt signal corresponding to the software function is actually allowed to be generated, so that the software function and the interrupt signal generation operation are decoupled, so that the microprocessor can be applied to more actual scenarios.
[0008] Further, the interrupt status register includes a first interrupt status register and a second interrupt status register; the value recorded in each interrupt status indication bit in the first interrupt status register represents whether it is necessary to trigger an interrupt of the corresponding software function to the first processor core; the value recorded in each interrupt status indication bit in the second interrupt status register represents whether it is necessary to trigger an interrupt of the corresponding software function to the second processor core; wherein, when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, representing that the first processor core needs to be interrupted; when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value, representing that the second processor core needs to be interrupted.
[0009] In the above implementation, by setting the first interrupt status register and the second interrupt status register respectively, when certain functions of the software generate a request requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be achieved by updating the value of the corresponding interrupt status indication bit in the first interrupt status register or the second interrupt status register, and the distinction between the interrupt signal sending objects is achieved by directly using different registers, making the circuit design in the microprocessor simpler.
[0010] Furthermore, the register array also includes a first interrupt mask register and a second interrupt mask register; the first interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the first interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed; the second interrupt mask register includes n second interrupt mask status indication bits; each of the second interrupt mask status indication bits corresponds to an interrupt status indication bit in the second interrupt status register; the value recorded in each of the second interrupt mask status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed.
[0011] In the above implementation, the first interrupt mask register and the second interrupt mask register are set to manage the first interrupt status register and the second interrupt status register respectively, so that different interrupt information sending objects can be distinguished based on different interrupt mask registers, making the circuit design in the microprocessor simpler.
[0012] Furthermore, the register array also includes a hardware direct transfer register; the hardware direct transfer register is configured with a target transfer address, and the hardware direct transfer register is used to transfer the data to the target transfer address after receiving the data from the first processor core or the second processor core.
[0013] In the above implementation, by setting the hardware direct transfer register, the first processor core or the second processor core can access the target transfer address immediately and return immediately, thereby improving the real-time access to the target transfer address. In this way, in actual applications, for requests with low delay tolerance, access can be achieved by configuring the hardware direct transfer register, thereby reducing interaction delay and improving interaction efficiency.
[0014] Furthermore, the hardware direct transfer register includes a point-to-point direct transfer register and a regional direct transfer register; the target transfer address configured by the point-to-point direct transfer register is the address of a single peripheral controller; the target transfer address configured by the regional direct transfer register includes the addresses of multiple peripheral controllers.
[0015] In the above implementation, fast access to a single peripheral controller can be achieved through point-to-point direct transfer registers, while fast access to multiple peripheral controllers at the same time can be achieved through regional direct transfer registers. In this way, the required hardware direct transfer registers can be set according to actual needs, thereby meeting a richer range of application scenarios.
[0016] Furthermore, the register array also includes a hardware direct transfer mapping configuration register; the hardware direct transfer mapping configuration register is set with a mapping relationship between a target transfer address of each of the hardware direct transfer registers and each of the hardware direct transfer registers.
[0017] In the above implementation, the target transfer address of each hardware direct transfer register and the mapping relationship of each hardware direct transfer register are set by setting the hardware direct transfer mapping configuration register. This makes it easy for the first processor core or the second processor core to find the required hardware direct transfer register from the hardware direct transfer mapping configuration register according to business needs, thereby accurately achieving fast access.
[0018] Furthermore, the microprocessor also includes a peripheral controller, which is connected to the input and output processor; the second processor core serves as an intermediate medium when the first processor core interacts with the peripheral controller.
[0019] In the above implementation, the second processor core acts as an intermediate medium when the first processor core interacts with the peripheral controller, that is, all intermediate processes of the interaction between the first processor core and the peripheral controller are completed by the second processor core, which can reduce the workload and occupancy rate of the first processor core and improve the processing performance of the first processor core.
[0020] Furthermore, the input-output processor also includes a first storage module, and the peripheral controller has a corresponding exclusive shared space in the first storage module, and the peripheral controller, the first processor core and the second processor core interact by accessing the exclusive shared space.
[0021] In the above implementation, by allocating a corresponding exclusive shared space to each peripheral controller in the first storage module in the input / output processor, the peripheral controller, the first processor core, and the second processor core can interact through the corresponding exclusive shared space allocated by the peripheral controller, so that they can cooperate with each other to realize on-demand processing of peripheral data, so that the second processor core can serve as an intermediate medium for the first processor core to interact with the peripheral controller, and reduce the access pressure on the first processor core, thereby improving the performance of the microprocessor.
[0022] Furthermore, the register arrays are divided into multiple groups, and each exclusive shared space corresponds to a group of the register arrays; the interrupt triggered by each group of the register arrays is used to trigger the first processor core or the second processor core to access the exclusive shared space corresponding to the group of the register arrays.
[0023] In the above implementation, a group of register arrays is configured for each exclusive shared space, so that the interrupt triggered by each group of register arrays is used to trigger the first processor core or the second processor core to access the exclusive shared space corresponding to the group of register arrays. In this way, independent instruction interaction management and interrupt control for different peripheral controllers can be achieved, avoiding confusion in access to different peripheral controllers and data processing.
[0024] Furthermore, each group of the register arrays also includes a size information register; the size information register includes a first size recording bit, and the first size recording bit is used to record the size of the exclusive shared space corresponding to the register array.
[0025] In the above implementation, by setting the size information register and configuring the first size recording bit in the size information register to record the size of the exclusive shared space corresponding to the register array, the size management of different exclusive shared spaces can be achieved.
[0026] Furthermore, the input-output processor also includes a network control center NCC; the register array and the second processor core are connected to the peripheral controller through the NCC.
[0027] In the above implementation, the connection between the second processor core, the register array, and the peripheral controller is realized through NCC. The implementation is simple and there is no need to set up complex connection circuits between the second processor core, the register array, and the peripheral controller. This can effectively save the area overhead of the microprocessor and facilitate data transmission management.
[0028] Furthermore, the input-output processor also includes an address splitting circuit; each target register array in each group of the register arrays is connected to the address splitting circuit via a downstream interface bus, and the address splitting circuit is connected to the NCC via a target downstream interface bus for transmitting data of each target register array; the target register array is a register array corresponding to the same type of peripheral controller in each group of the register arrays.
[0029] In the above implementation, each target register array in each group of register arrays is connected to the address splitting circuit through a downstream interface bus, and the address splitting circuit is connected to the NCC through a target downstream interface bus for transmitting data of each target register array. In this way, on the NCC side, access requests for the register arrays of each peripheral controller of the same type can go through the same interface, thereby reducing the number of interfaces on the NCC side.
[0030] The embodiment of the present application also provides an information processing method in a microprocessor, wherein the microprocessor includes a first processor core and an input-output processor; the first processor core is connected to the input-output processor, and the input-output processor includes a register array and at least one second processor core; the register array includes an interrupt status register; the interrupt status register includes n interrupt status indication bits, each of which is used to indicate whether an interrupt corresponding to a software function needs to be triggered; n is a positive integer greater than or equal to 1; the method includes:
[0031] In the case where the software function executed by the second processor core needs to trigger the interruption of the first processor core, the value of the interrupt status indication bit corresponding to the software function in the interrupt status register is modified to a first value by the second processor core to trigger the interruption of the first processor core; the first value indicates that the software function needs to trigger an interruption; in the case where the software function executed by the first processor core needs to trigger the interruption of the second processor core, the value of the interrupt status indication bit corresponding to the software function in the interrupt status register is modified to a first value by the first processor core to trigger the interruption of the second processor core.
[0032] Based on the above implementation, by setting the interrupt status register, and when the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, it is characterized that the second processor core needs to be interrupted, so as to trigger the second processor core to interrupt; when the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, it is characterized that the first processor core needs to be interrupted, so as to trigger the first processor core to interrupt. In this way, when the software is running in the microprocessor and some functions of the software generate requests requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be realized by updating the value of the corresponding interrupt status indication bit in the interrupt status register, so that the software function can be operated normally and the reliability of the microprocessor is improved.
[0033] Further, the register array also includes an interrupt mask register; the interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed; the method also includes: when the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt mask status indication bit represents that the interrupt enable indicated by the corresponding interrupt status indication bit is allowed, sending an interrupt signal to the first processor core to enable the first processor core to process the interrupt; when the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt mask status indication bit represents that the interrupt enable indicated by the corresponding interrupt status indication bit is allowed, sending an interrupt signal to the second processor core to enable the second processor core to process the interrupt.
[0034] In the above implementation, by setting the interrupt mask register and setting the value recorded in each first interrupt mask status indication bit of the interrupt mask register to represent whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, the interrupt mask register can be configured to control whether the interrupt generating circuit is actually allowed to generate the interrupt signal corresponding to the software function, so that the software function and the interrupt signal generation operation are decoupled, so that the microprocessor can be applied to more practical scenarios.
[0035] Further, the interrupt status register includes a first interrupt status register and a second interrupt status register; when the software function executed by the second processor core needs to trigger the first processor core interrupt, the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value to trigger the first processor core to execute the interrupt, including: when the software function executed by the second processor core needs to trigger the first processor core interrupt, the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value to trigger the first processor core to execute the interrupt; when the software function executed by the first processor core needs to trigger the second processor core interrupt, the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value to trigger the second processor core to execute the interrupt, including: when the software function executed by the first processor core needs to trigger the second processor core interrupt, the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value to trigger the second processor core to execute the interrupt.
[0036] In the above implementation, by setting the first interrupt status register and the second interrupt status, it is possible to distinguish between different interrupt information sending objects, so that the circuit design in the microprocessor can be simpler.
[0037] Furthermore, the register array also includes a first interrupt mask register and a second interrupt mask register; the first interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the first interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed; the second interrupt mask register includes n second interrupt mask status indication bits; each of the second interrupt mask status indication bits corresponds to an interrupt status indication bit in the second interrupt status register; the value recorded in each of the second interrupt mask status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed ; The method also includes: when the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, sending an interrupt signal to the first processor core to enable the first processor core to process the interrupt; when the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value, and the value recorded in the second interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, sending an interrupt signal to the second processor core to enable the second processor core to process the interrupt.
[0038] In the above implementation, the first interrupt mask register and the second interrupt mask register are set to manage the first interrupt status register and the second interrupt status register respectively, so that different interrupt information sending objects can be distinguished based on different interrupt mask registers, making the circuit design in the microprocessor simpler.
[0039] Furthermore, the register array also includes a hardware direct transfer register; the hardware direct transfer register is configured with a target transfer address; the method includes: when there is a demand for data direct transfer in the target processor core, sending the data to be directly transferred to the hardware direct transfer register through the target processor core, so as to transfer the data to the target transfer address through the hardware direct transfer register; the target processor core is the first processor core or the second processor core.
[0040] Furthermore, the register array also includes a hardware direct transfer mapping configuration register; the hardware direct transfer mapping configuration register is set with a target transfer address of each of the hardware direct transfer registers and a mapping relationship between each of the hardware direct transfer registers; before sending the data that needs to be directly transferred to the hardware direct transfer register through the target processor core, the method also includes: accessing the hardware direct transfer mapping configuration register through the target processor core to find the target hardware direct transfer register corresponding to the target transfer address of the data according to the target transfer address of the data and the mapping relationship set in the hardware direct transfer mapping configuration register; correspondingly, sending the data that needs to be directly transferred to the hardware direct transfer register through the target processor core includes: sending the data that needs to be directly transferred to the target hardware direct transfer register through the target processor core.
[0041] Furthermore, the target processor core is the first processor core; and the hardware direct transfer register is configured to allow only the first processor core to access it.
[0042] Furthermore, the target processor core is the second processor core; and the hardware direct mapping configuration register is configured to allow only the second processor core to access.
[0043] Furthermore, the microprocessor also includes a peripheral controller, which is connected to the input and output processor; the second processor core serves as an intermediate medium when the first processor core interacts with the peripheral controller.
[0044] Furthermore, the input-output processor also includes a first storage module, and the peripheral controller has a corresponding exclusive shared space in the first storage module, and the peripheral controller, the first processor core and the second processor core interact by accessing the exclusive shared space.
[0045] Furthermore, the register arrays are divided into multiple groups, and each exclusive shared space corresponds to a group of the register arrays; the interrupt triggered by each group of the register arrays is used to trigger the first processor core or the second processor core to access the exclusive shared space corresponding to the group of the register arrays.
[0046] Furthermore, each group of the register arrays also includes a size information register; the size information register includes a first size recording bit, and the first size recording bit is used to record the size of the exclusive shared space corresponding to the register array.
[0047] An embodiment of the present application also provides an electronic device, comprising any one of the above-mentioned microprocessors. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A schematic diagram of a microprocessor structure of a multi-processor core provided in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of a microprocessor structure for implementing instruction interaction using a pointer register provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of the structure of a microprocessor with two pointer registers provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of a microprocessor structure with four specific pointer registers provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of the structure of a microprocessor with a spare pointer register provided in an embodiment of the present application;
[0054] Figure 6 A flowchart of an information processing method in a microprocessor implemented based on a pointer register provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of a microprocessor structure for setting an interrupt status register provided in an embodiment of the present application;
[0056] Figure 8 A schematic diagram of a microprocessor structure with two interrupt status registers provided in an embodiment of the present application;
[0057] Fig. 9 A schematic diagram of the structure of a microprocessor provided with an interrupt mask register provided in an embodiment of the present application;
[0058] Fig.10 A more specific schematic diagram of a microprocessor structure provided with an interrupt mask register provided in an embodiment of the present application;
[0059] Fig.11 A flowchart of an information processing method in a microprocessor implemented based on an interrupt status register provided in an embodiment of the present application;
[0060] Fig.12A schematic diagram of the structure of a microprocessor provided with a hardware direct transfer register provided in an embodiment of the present application;
[0061] Fig.13 A schematic diagram of a microprocessor structure provided in an embodiment of the present application and also having a hardware direct mapping configuration register;
[0062] Fig.14 A flowchart of an information processing method in a microprocessor implemented based on a hardware direct transfer register provided in an embodiment of the present application;
[0063] Fig.15 A schematic diagram of the structure of a microprocessor connected to a peripheral controller provided in an embodiment of the present application;
[0064] Fig.16 A schematic diagram of the structure of a microprocessor with an exclusive shared space provided in an embodiment of the present application;
[0065] Fig.17 A schematic diagram of the structure of a specific microprocessor provided in an embodiment of the present application;
[0066] Fig.18 A schematic diagram of a register array connection structure for setting an address splitting circuit provided in an embodiment of the present application;
[0067] Fig.19 A schematic diagram of a register array connection structure provided in an embodiment of the present application and further provided with a dynamic clock shutdown module. DETAILED DESCRIPTION
[0068] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0069] Embodiment 1:
[0070] In the traditional microprocessor architecture, all services and data are processed by AP (Application Processor), which leads to a high occupancy rate of AP, thus affecting the data processing performance of AP. Among them, AP refers to the processor that can process the data generated when the user uses the application.
[0071] In order to improve the performance of the microprocessor, a microprocessor is provided in an embodiment of the present application. Figure 1 As shown, the microprocessor includes: a first processor core and an IOP (Input Output Processor), wherein the IOP includes at least one second processor core, and the IOP is connected to the first processor core.
[0072] In the embodiment of the present application, the first processor core can be the main core of the microprocessor, as the main operation control core in the microprocessor, and can be configured to execute high-speed instructions. Of course, the first processor core can also be configured to have the ability to execute low-speed instructions. For example, the first processor core can be used as a processor core in the AP, which can be used to process application data, such as data generated when a user uses an application program, etc., to realize the function of the AP. It can be understood that the so-called high-speed instructions refer to instructions with higher real-time requirements for instruction processing, such as high-speed instructions can refer to instructions with higher real-time requirements than UART (Universal Asynchronous Receiver / Transmitter, Universal Asynchronous Receiver / Transmitter) interface, I2C (Inter-Integrated Circuit, Integrated Circuit Bus) interface, SPI (Serial Peripheral Interface, Serial Peripheral Device) interface and I2S (inter-IC Sound, Integrated Circuit Built-in Audio Bus) interface requirements. The so-called low-speed instructions refer to instructions with lower real-time requirements, such as UART interface instructions, I2C interface instructions, SPI interface instructions, I2S interface instructions, etc. Optionally, instructions other than high-speed instructions can be considered as low-speed instructions.
[0073] In the embodiment of the present application, the second processor core can be implemented using a RISC-V core, but this is not a limitation. The RISC-V core refers to a processor core that uses the RISC-V (an open source instruction set architecture based on the principle of a reduced instruction set) instruction architecture. In the embodiment of the present application, the second processor core can be configured as a slave core in a microprocessor, and the second processor core can be configured to mainly complete instruction access to modules with low real-time requirements such as low-speed peripherals.
[0074] In this way, the second processor core can assist the first processor core in data processing, thereby reducing the occupancy of the first processor and improving the performance of the microprocessor. However, when using the second processor core to assist the first processor core in data processing, the second processor core needs to be able to interact with the first processor core in an orderly manner. If the second processor core cannot interact with the first processor core in an orderly manner, it may cause confusion in the instruction processing logic between the second processor core and the first processor core, and then cause confusion in the processing of requests between the processor cores, thereby affecting the performance of the microprocessor and causing the microprocessor to fail to improve its performance well. To solve this problem and realize orderly interaction between the processor cores in the microprocessor, please refer to Figure 2As shown, the input and output processor of the microprocessor may also include a register array, the register array includes a pointer register, and the first processor core and the second processor core implement instruction interaction through the pointer register. In this way, the first processor core and the second processor core can implement orderly interaction of instructions with each other through the instruction recording function of the pointer register, so that the first processor core and the second processor core can cooperate with each other to complete the processing of tasks, presenting the effect of one processor to the outside, thereby improving the performance of the microprocessor.
[0075] For example, Figure 3 As shown, the pointer register includes a first pointer register and a second pointer register. Wherein:
[0076] The first pointer register is used to record the number of instructions of the first processor core, and to record whether the second interrupt needs to be triggered according to the instructions of the first processor core, and to record whether the first interrupt needs to be triggered according to the completion status of the instructions of the first processor core;
[0077] The second pointer register is used to record the number of instructions of the second processor core, and to record whether the first interrupt needs to be triggered according to the instructions of the second processor core, and to record whether the second interrupt needs to be triggered according to the completion status of the instructions of the second processor core;
[0078] The second interrupt is an interrupt that needs to be processed by the second processor core, and the first interrupt is an interrupt that needs to be processed by the first processor core.
[0079] In an embodiment of the present application, an interrupt generation circuit may be provided in or outside the input / output processor, so that the interrupt generation circuit is respectively connected to the first pointer register and the second pointer register to generate a corresponding interrupt signal and output it to the first processor core or the second processor core. Optionally, the interrupt generation circuit may include a first interrupt generation circuit and a second interrupt generation circuit, wherein the enable end of the first interrupt generation circuit may be respectively connected to the first pointer register and the second pointer register, and the output end is directly or indirectly connected to the first processor core, so that when the first pointer register or the second pointer register records that the first interrupt needs to be triggered, an interrupt signal is sent to the first processor core. Similarly, the enable end of the second interrupt generation circuit may be respectively connected to the first pointer register and the second pointer register, and the output end is directly or indirectly connected to the second processor core, so that when the first pointer register or the second pointer register records that the second interrupt needs to be triggered, an interrupt signal is sent to the second processor core.
[0080] In the embodiments of the present application, the interrupt generation circuit can be implemented by using various existing circuit structures that can generate interrupt signals in a controlled manner, and this is not limited in the embodiments of the present application.
[0081] In this way, by setting the first pointer register and the second pointer register, the first pointer register is used to record the number of instructions of the first processor core and the interrupts required to be triggered based on the instructions of the first processor core; the second pointer register is used to record the number of instructions of the second processor core and the interrupts required to be triggered based on the instructions of the second processor core; in this way, when the first processor core sends instructions to the second processor core, or when the instructions sent by the first processor core need to be notified after the first processor core is completed, the first pointer register can generate a corresponding interrupt signal and send it to the second processor core or the first processor core; correspondingly, when the second processor core sends instructions to the first processor core, or when the instructions sent by the second processor core need to be notified after the second processor core is completed, the second pointer register can generate a corresponding interrupt signal and send it to the first processor core or the second processor core; in this way, the interrupt-based instruction sending and instruction completion notification between the first processor core and the second processor core is realized, so that the first processor core and the second processor core can interact in an orderly manner, and the situation that multiple processor cores are running at the same time and cause instruction processing confusion is prevented.
[0082] Another example is Figure 4 As shown, the first pointer register may include a first tail pointer register and a first head pointer register. Among them: the first tail pointer register is used to record the number of instructions issued by the first processor core, and record the first interrupt trigger value according to the instructions issued by the first processor core; the first interrupt trigger value indicates whether the second interrupt needs to be triggered; the first head pointer register is used to record the number of completed instructions issued by the first processor core, and record the second interrupt trigger value according to the currently completed instructions in the instructions issued by the first processor core; the second interrupt trigger value indicates whether the first interrupt needs to be triggered.
[0083] The second pointer register may include a second tail pointer register and a second head pointer register. The second tail pointer register is used to record the number of instructions issued by the second processor core, and to record a third interrupt trigger value according to the instructions issued by the second processor core; the third interrupt trigger value indicates whether the first interrupt needs to be triggered; the second head pointer register is used to record the number of completed instructions issued by the second processor core, and to record a fourth interrupt trigger value according to the currently completed instructions in the instructions issued by the second processor core; the fourth interrupt trigger value indicates whether the second interrupt needs to be triggered.
[0084] In this way, the first pointer register is set to include a first tail pointer register and a first head pointer register, and the first tail pointer register is used to record the number of instructions issued by the first processor core, and the first interrupt trigger value is recorded according to the instructions issued by the first processor core; the first head pointer register is used to record the number of completed instructions issued by the first processor core, and the second interrupt trigger value is recorded according to the currently completed instructions in the instructions issued by the first processor core. In this way, based on the first tail pointer register and the first head pointer register, the remaining instructions in the instructions issued by the first processor core can be known, and based on the first interrupt trigger value recorded by the first tail pointer register, it can be determined whether it is necessary to send interrupt information to the second processor core, and based on the second interrupt trigger value recorded by the first head pointer register, it can be determined whether it is necessary to send interrupt information to the first processor core. In this way, it is easy to realize the recording of the number of instructions of the first processor core, and the recording and distinction of the interrupts required to be triggered based on the instructions of the first processor core, thereby improving the accuracy of interrupt information transmission, and thus improving the reliability of the microprocessor. Similarly, by setting the second pointer register to include a second tail pointer register and a second head pointer register, and using the second tail pointer register to record the number of instructions issued by the second processor core, and recording the third interrupt trigger value according to the instructions sent by the second processor core; using the second head pointer register to record the number of completed instructions issued by the second processor core, and recording the fourth interrupt trigger value according to the currently completed instructions in the instructions sent by the second processor core. In this way, based on the second tail pointer register and the second head pointer register, the remaining instructions in the instructions sent by the second processor core can be known, and based on the third interrupt trigger value recorded by the second tail pointer register, it can be determined whether it is necessary to send interrupt information to the first processor core, and based on the fourth interrupt trigger value recorded by the second head pointer register, it can be determined whether it is necessary to send interrupt information to the second processor core. In this way, it is easy to record the number of instructions of the second processor core, and record and distinguish the interrupts that need to be triggered based on the instructions of the second processor core, thereby improving the accuracy of interrupt information transmission and thus improving the reliability of the microprocessor.
[0085] In the above exemplary embodiment, the first tail pointer register may include a first designated bit and a first counting bit. The first designated bit is used to record the first interrupt trigger value, and the first counting bit is used to record the number of instructions issued by the first processor core. The first head pointer register may include a second designated bit and a second counting bit, the second designated bit is used to record the second interrupt trigger value, and the second counting bit is used to record the currently completed instructions in the instructions issued by the first processor core. The second tail pointer register may include a third designated bit and a third counting bit, the third designated bit is used to record the third interrupt trigger value, and the third counting bit is used to record the number of instructions issued by the second processor core. The second head pointer register may include a fourth designated bit and a fourth counting bit, the fourth designated bit is used to record the fourth interrupt trigger value, and the fourth counting bit is used to record the currently completed instructions in the instructions issued by the second processor core.
[0086] In this way, the designated bit is set in the first tail pointer register, the first head pointer register, the second tail pointer register and the second head pointer register to record the interrupt trigger value, and the other bits are used for instruction counting. Based on such a design, since in the actual circuit, each bit of the register actually has a real lead, the designated bit in the first tail pointer register or the first head pointer register or the second tail pointer register or the second head pointer register can be directly connected to the enable end of the interrupt generation circuit, thereby realizing the automatic triggering of the interrupt signal based on hardware and simplifying the design difficulty of the microprocessor.
[0087] It can be understood that in the embodiment of the present application, the second interrupt trigger value and the third interrupt trigger value can be set by an engineer to specifically indicate which value is used to indicate the need to trigger the first interrupt, for example, when the second interrupt trigger value is 1, it indicates that the first interrupt needs to be triggered, and when the second interrupt trigger value is 0, it indicates that the first interrupt does not need to be triggered; when the third interrupt trigger value is 1, it indicates that the first interrupt needs to be triggered, and when the third interrupt trigger value is 0, it indicates that the first interrupt does not need to be triggered. Similarly, the first interrupt trigger value and the fourth interrupt trigger value can be set by an engineer to specifically indicate which value is used to indicate the need to trigger the second interrupt, for example, when the first interrupt trigger value is 1, it indicates that the second interrupt needs to be triggered, and when the first interrupt trigger value is 0, it indicates that the second interrupt does not need to be triggered; when the fourth interrupt trigger value is 1, it indicates that the second interrupt needs to be triggered, and when the fourth interrupt trigger value is 0, it indicates that the second interrupt does not need to be triggered.
[0088] It can also be understood that in the embodiment of the present application, the first designated bit can be a bit in the first tail pointer register, for example, it can be the highest bit in the first tail pointer register, and the first count bit can be other bits in the first tail pointer register except the first designated bit. For example, assuming that the first tail pointer register has 17 bits in total, bits 0 to 15 are the first count bits, and bit 16 is the first designated bit.
[0089] Similarly, the second designated bit may be a bit in the first pointer register, for example, the highest bit in the first pointer register, and the second count bit may be other bits in the first pointer register except the second designated bit.
[0090] Similarly, the third designated bit may be a bit in the second tail pointer register, for example, may be the highest bit in the second tail pointer register, and the third counting bit may be other bits in the second tail pointer register except the third designated bit.
[0091] Similarly, the fourth designation bit may be a bit in the second first pointer register, for example, the highest bit in the second first pointer register, and the fourth counting bit may be other bits in the second first pointer register except the fourth designation bit.
[0092] In some other exemplary embodiments of the embodiments of the present application, the functions of the first tail pointer register and the first head pointer register can also be implemented in one first pointer register. For example, the bits of the first pointer register can be divided into two parts, the first part is used to implement the function of the first tail pointer register in the above exemplary embodiment, and the second part is used to implement the function of the first head pointer register in the above exemplary embodiment. For example, assuming that the first pointer register includes 34 bits, bits 0 to 15 can be used as the first counting bit, the 16th bit can be used as the first designated bit, bits 17 to 32 can be used as the second counting bit, and the 33rd bit can be used as the second designated bit; for another example, assuming that the first pointer register includes 34 bits, bits 0 to 15 can be used as the first counting bit, bits 16 to 31 can be used as the second counting bit, the 32nd bit can be used as the first designated bit, and the 33rd bit can be used as the second designated bit.
[0093] Similarly, the functions of the second tail pointer register and the second head pointer register can be implemented in a second pointer register. For example, the bits of the second pointer register can be divided into two parts, the first part is used to implement the function of the second tail pointer register in the above exemplary embodiment, and the second part is used to implement the function of the second head pointer register in the above exemplary embodiment. For example, assuming that the second pointer register includes 34 bits, bits 0 to 15 can be used as the third counting bit, the 16th bit can be used as the third designated bit, bits 17 to 32 can be used as the fourth counting bit, and the 33rd bit can be used as the fourth designated bit; for another example, assuming that the fourth pointer register includes 34 bits, bits 0 to 15 can be used as the third counting bit, bits 16 to 31 can be used as the fourth counting bit, the 32nd bit can be used as the third designated bit, and the 33rd bit can be used as the fourth designated bit.
[0094] In the embodiment of the present application, the first processor core or the second processor core can know the number of instructions of the first processor core and the number of instructions of the second processor core that are currently remaining to be processed by accessing the count bits of the first pointer register and the second pointer register.
[0095] In the embodiments of the present application, Figure 5 As shown, the register array may further include a spare pointer register. After being enabled, the spare pointer register may implement the function of the first pointer register or the second pointer register. In this way, when the first pointer register or the second pointer register fails, or the count bits of the first pointer register or the second pointer register are insufficient, the spare pointer register may be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor.
[0096] It can be understood that since the backup pointer register can realize the function of the first pointer register or the second pointer register after being enabled, in the embodiment of the present application, the backup pointer register is completely consistent with the connection method of the pointer register in the implementation structure and the connection relationship between the backup pointer register and each module in the microprocessor.
[0097] It can be understood that in the embodiment of the present application, the standby pointer register may include a first standby pointer register and a second standby pointer register, the first standby pointer register and the first pointer register have the same implementation structure and the connection relationship between each module in the microprocessor, and the second standby pointer register and the second pointer register have the same implementation structure and the connection relationship between each module in the microprocessor. Thus, when the first pointer register fails or the count bit of the first pointer register is insufficient, the first standby pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor. When the second pointer register fails or the count bit of the second pointer register is insufficient, the second standby pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor.
[0098] Exemplarily, in the case where the first pointer register includes the first tail pointer register and the first head pointer register, the first standby pointer register also includes the first standby tail pointer register and the first standby head pointer register. Thus, when the first tail pointer register fails, or when the count bit of the first tail pointer register is insufficient, the first standby tail pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor. When the first head pointer register fails, or when the count bit of the first head pointer register is insufficient, the first standby head pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor.
[0099] Similarly, in the case where the second pointer register includes the second tail pointer register and the second head pointer register, the second standby pointer register also includes the second standby tail pointer register and the second standby head pointer register. Thus, when the second tail pointer register fails or the second tail pointer register counts insufficient bits, the second standby tail pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor. When the second head pointer register fails or the second head pointer register counts insufficient bits, the second standby head pointer register can be enabled to ensure that the microprocessor can work normally, thereby improving the reliability of the microprocessor.
[0100] Based on the same inventive concept, this embodiment also provides an information processing method in a microprocessor, wherein the microprocessor includes a first processor core and an input / output processor; the first processor core is connected to the input / output processor, and the input / output processor includes a register array and at least one second processor core; the register array includes a pointer register. This method can be found in Figure 6 As shown, including:
[0101] S601: When the first processor core and / or the second processor core issues an instruction or completes an instruction, update the value in the pointer register.
[0102] S602: The first processor core and / or the second processor core obtains and executes instructions according to the value in the pointer register.
[0103] In an embodiment of the present application, when the first processor core and / or the second processor core issues an instruction or completes an instruction, the value in the pointer register is updated; and, the first processor core and / or the second processor core obtains and executes the instruction according to the value in the pointer register, so that the first processor core and the second processor core can interact with each other's instructions through the pointer register, thereby enabling orderly interaction between the first processor core and the second processor core, and then the first processor core and the second processor core can cooperate with each other to complete the processing of the task, presenting the effect of one processor to the outside, thereby improving the performance of the microprocessor.
[0104] In an exemplary embodiment of the present application, when the pointer register includes a first pointer register and a second pointer register, step S601 may include:
[0105] When the first processor core issues an instruction, the value in the first pointer register is updated to record whether the second interrupt needs to be triggered;
[0106] When the first processor core completes the instruction, updating the value in the second pointer register to record whether the second interrupt needs to be triggered;
[0107] When the second processor core issues an instruction, updating the value in the second pointer register to record whether the first interrupt needs to be triggered;
[0108] When the second processor core completes the instruction, updating the value in the first pointer register to record whether the first interrupt needs to be triggered;
[0109] Accordingly, step S602 may include: the first processor core obtains and executes the instruction sent by the second processor core in response to the first interrupt; and the second processor core obtains and executes the instruction sent by the first processor core in response to the second interrupt.
[0110] Based on the above process, the first processor core obtains and executes the instructions issued by the second processor core by responding to the first interrupt, and the second processor core obtains and executes the instructions issued by the first processor core by responding to the second interrupt. In this way, interrupt-based instruction sending and instruction completion notification are implemented between the first processor core and the second processor core, so that the first processor core and the second processor core can interact in an orderly manner, preventing the simultaneous operation of multiple processor cores from causing confusion in instruction processing.
[0111] It can be understood that in the embodiment of the present application, the first interrupt and the second interrupt can be generated by the interrupt generation circuit after being triggered.
[0112] In the above exemplary embodiment, in the case where the pointer register includes a first pointer register and a second pointer register, and the second pointer register includes a second tail pointer register and a second head pointer register:
[0113] When the first processor core issues an instruction, the process of updating the value in the first pointer register to record whether the second interrupt needs to be triggered may include: when the first processor core issues an instruction, updating the number of instructions recorded in the first tail pointer register, and updating the first interrupt trigger value in the first tail pointer register according to the completed instruction; the first interrupt trigger value indicates whether the second interrupt needs to be triggered;
[0114] When the first processor core completes the instruction, the process of updating the value in the second pointer register to record whether the second interrupt needs to be triggered may include: when the first processor core completes the instruction, updating the number of instructions recorded in the second first pointer register, and updating the fourth interrupt trigger value in the second first pointer register according to the completed instruction; the fourth interrupt trigger value indicates whether the second interrupt needs to be triggered;
[0115] When the second processor core issues an instruction, the process of updating the value in the second pointer register to record whether the first interrupt needs to be triggered may include: when the second processor core issues an instruction, updating the number of instructions recorded in the second tail pointer register, and updating the third interrupt trigger value in the second tail pointer register according to the issued instruction; the third interrupt trigger value indicates whether the first interrupt needs to be triggered;
[0116] When the second processor core completes the instruction, the process of updating the value in the first pointer register to record whether the first interrupt needs to be triggered may include: when the second processor core completes the instruction, updating the number of instructions recorded in the first pointer register, and updating the second interrupt trigger value in the first pointer register according to the completed instruction; the second interrupt trigger value represents whether the first interrupt needs to be triggered.
[0117] In the embodiment of the present application, when the register array further includes a spare pointer register, the method provided in the embodiment of the present application may further include: when the target pointer register is abnormal, enabling the spare pointer register to implement the function of the target pointer register, wherein the target pointer register is the first pointer register and / or the second pointer register.
[0118] Among them, the target pointer register exception described in the embodiment of the present application may include a target pointer register failure, or insufficient counting bits of the target pointer register. The so-called insufficient counting bits means that the number of instructions exceeds the maximum counting range of the counting bits. When the target pointer register exception is insufficient counting bits, after the spare pointer register is enabled, each bit of the spare pointer register is used as a supplement to the counting bits of the target pointer register, thereby expanding the counting range of the target pointer register.
[0119] It can be understood that, in the case where there are multiple second processor cores, a set of the above-mentioned pointer registers can be set separately for the interaction between each second processor core and the first processor core, so that each second processor core can realize the instruction interaction with the first processor core through its corresponding set of pointer registers. In addition, in the case where there are multiple second processor cores, only one set of the above-mentioned pointer registers can be set. In this case, different bit segments can be defined in the pointer register to correspond to different second processor cores. For example, assuming that there are two second processor cores, the 0 to 16 bits of the first tail pointer register can be set to correspond to the first second processor core, and the 17 to 33 bits can correspond to the second second processor core; the 0 to 16 bits of the first head pointer register can be set to correspond to the first second processor core, and the 17 to 33 bits can correspond to the second second processor core; the 0 to 16 bits of the second tail pointer register can be set to correspond to the first second processor core, and the 17 to 33 bits can correspond to the second second processor core; the 0 to 16 bits of the second tail pointer register can be set to correspond to the first second processor core, and the 17 to 33 bits can correspond to the second second processor core; the 0 to 16 bits of the second head pointer register can be set to correspond to the first second processor core, and the 17 to 33 bits can correspond to the second second processor core.
[0120] It should be understood that, for the sake of brevity, some of the content described in the microprocessor embodiment will not be repeated in the method embodiment part, but the relevant content is still applicable.
[0121] Embodiment 2:
[0122] exist Figure 1 On the basis of the provided microprocessor, the second processor core can assist the first processor core in data processing, thereby reducing the occupancy of the first processor and improving the performance of the microprocessor. However, in actual application, when the software is running in the microprocessor, some functions of the software will generate requests requiring the first processor core or the second processor core to process. At this time, it is necessary to accurately notify the first processor core or the second processor core through a certain mechanism to ensure the normal operation of the software function, thereby ensuring the software operation reliability of the microprocessor.
[0123] To this end, the present application embodiment provides a microprocessor structure, see Figure 7 As shown, the input and output processor of the microprocessor also includes a register array, and the register array includes an interrupt status register. The interrupt status register includes n interrupt status indication bits, each interrupt status indication bit is used to indicate whether an interrupt corresponding to a software function is triggered; n is an integer greater than or equal to 1.
[0124] Among them, when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the second processor core needs to be interrupted; when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the first processor core needs to be interrupted.
[0125] For example, assuming that when the first processor core runs the software, there is an interrupt triggering requirement for function A of the software, then the ath interrupt status indication bit of the interrupt status register can be configured to correspond to the function A. When function A does not need to trigger an interrupt, the first processor core configures the ath interrupt status indication bit as an interrupt clear value, for example, configured as 0. When function A needs to trigger an interrupt, the first processor core configures the ath interrupt status indication bit as an interrupt enable value (i.e., the first value), for example, configured as 1, thereby indicating that the second processor core needs to trigger the interrupt corresponding to function A. For another example, assuming that when the second processor core runs the software, there is an interrupt triggering requirement for function A of the software, then the ath interrupt status indication bit of the interrupt status register can be configured to correspond to the function A. When function A does not need to trigger an interrupt, the second processor core configures the ath interrupt status indication bit as an interrupt clear value, for example, configured as 0. When function A needs to trigger an interrupt, the second processor core configures the ath interrupt status indication bit as an interrupt enable value (i.e., the first value), for example, configured as 1, thereby indicating that the first processor core needs to trigger the interrupt corresponding to function A.
[0126] In this way, by setting the interrupt status register and using each interrupt status indication bit in the interrupt status register to characterize whether an interrupt corresponding to a software function is triggered, when the software is running in the microprocessor and certain functions of the software generate requests requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be achieved by updating the value of the corresponding interrupt status indication bit in the interrupt status register, thereby enabling the software function to run normally and improving the reliability of the microprocessor.
[0127] In a feasible implementation of the embodiment of the present application, as Figure 8 As shown, the interrupt status register may include a first interrupt status register and a second interrupt status register. The value recorded in each interrupt status indication bit in the first interrupt status register indicates whether it is necessary to trigger an interrupt of the corresponding software function to the first processor core; the value recorded in each interrupt status indication bit in the second interrupt status register indicates whether it is necessary to trigger an interrupt of the corresponding software function to the second processor core.
[0128] Among them, when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, indicating that the first processor core needs to be interrupted; when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value, indicating that the second processor core needs to be interrupted.
[0129] In this way, by setting the first interrupt status register and the second interrupt status register respectively, when certain functions of the software generate requests requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be achieved by updating the value of the corresponding interrupt status indication bit in the first interrupt status register or the second interrupt status register, and the distinction between the interrupt signal sending objects is achieved by directly using different registers, making the circuit design in the microprocessor simpler.
[0130] In a feasible implementation of the embodiment of the present application, as Fig. 9 As shown, the register array may also include an interrupt mask register. The interrupt mask register may include n first interrupt mask status indication bits; each first interrupt mask status indication bit corresponds to an interrupt status indication bit in the interrupt status register; and the value recorded in each first interrupt mask status indication bit indicates whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled.
[0131] For example, the 4th to 31st bits of the interrupt status register correspond to 28 software functions respectively, and the 4th to 31st bits of the interrupt mask register correspond to the 4th to 31st bits of the interrupt status register respectively, indicating whether the software function represented by the corresponding bit position of the interrupt status register (i.e., the interrupt status indication bit) is allowed to enable the generation of an interrupt. For example, the 4th bit of the interrupt status register corresponds to software function A. When the 4th bit of the interrupt mask register records the interrupt mask value (e.g., 1), no matter whether the value recorded in the 4th bit of the interrupt status register is an interrupt enable value or an interrupt clear value, an interrupt is not allowed to be generated; when the 4th bit of the interrupt mask register records the interrupt enable value (e.g., 0), if the value recorded in the 4th bit of the interrupt status register is an interrupt enable value, an interrupt will be generated; if the value recorded in the 4th bit of the interrupt status register is an interrupt clear value, no interrupt will be generated.
[0132] It can be understood that in actual applications, there may be some scenarios where it is not desired for some software functions to actually generate interrupt information (for example, there may be some scenarios where it is not desired for some software functions to actually be used), or there may be some scenarios where it is not desired for some software functions to immediately generate interrupt signals after the interrupt status register is configured (for example, in some scenarios, the first processor core or the second processor core is processing a more important task, and at this time, it is desired that the interrupt of the software function come after the task is processed). In the above implementation, by setting the interrupt mask register and setting the value recorded in each first interrupt mask status indicator bit of the interrupt mask register to represent whether the interrupt enable indicated by the corresponding interrupt status indicator bit is allowed, the interrupt mask register can be configured to control whether the interrupt signal corresponding to the software function is actually allowed to be generated, so that the software function and the interrupt signal generation operation are decoupled, so that the microprocessor can be applied to more actual scenarios.
[0133] In this feasible implementation manner, the interrupt mask register may also include a second interrupt mask status indication bit, a third interrupt mask status indication bit, a fourth interrupt mask status indication bit and a fifth interrupt mask status indication bit; the second interrupt mask status indication bit corresponds to the first head pointer register, and is used to indicate whether the first interrupt enable indicated by the first head pointer register is allowed; the third interrupt mask status indication bit corresponds to the second tail pointer register, and is used to indicate whether the first interrupt enable indicated by the second tail pointer register is allowed; the fourth interrupt mask status indication bit corresponds to the first tail pointer register, and is used to indicate whether the second interrupt enable indicated by the first tail pointer register is allowed; the fifth interrupt mask status indication bit corresponds to the second head pointer register, and is used to indicate whether the second interrupt enable indicated by the second head pointer register is allowed.
[0134] Similar to the above, when the value recorded by the second interrupt mask state indicator bit is an interrupt mask value (for example, 1), no matter whether the value recorded in the first pointer register requires triggering an interrupt, an interrupt signal is not allowed to be actually generated. When the value recorded by the second interrupt mask state indicator bit is an interrupt enable value (for example, 0), if the value recorded in the first pointer register requires triggering an interrupt, an interrupt signal is only allowed to be actually generated at this time. Similarly, when the value recorded by the third interrupt mask state indicator bit is an interrupt mask value (for example, 1), no matter whether the value recorded in the second tail pointer register requires triggering an interrupt, an interrupt signal is not allowed to be actually generated. When the value recorded by the third interrupt mask state indicator bit is an interrupt enable value (for example, 0), if the value recorded in the second tail pointer register requires triggering an interrupt, an interrupt signal is only allowed to be actually generated at this time. Similarly, when the value recorded by the fourth interrupt mask state indicator bit is an interrupt mask value (for example, 1), no matter whether the value recorded in the first tail pointer register requires triggering an interrupt, an interrupt signal is not allowed to be actually generated. When the value recorded by the fourth interrupt mask status indicator bit is an interrupt enable value (for example, 0), if the value recorded in the first tail pointer register requires triggering an interrupt, then the interrupt signal is actually allowed to be generated. Similarly, when the value recorded by the fifth interrupt mask status indicator bit is an interrupt mask value (for example, 1), then regardless of whether the value recorded in the first head pointer register requires triggering an interrupt, the interrupt signal is not actually allowed to be generated. When the value recorded by the fifth interrupt mask status indicator bit is an interrupt enable value (for example, 0), if the value recorded in the first head pointer register requires triggering an interrupt, then the interrupt signal is actually allowed to be generated.
[0135] It is understandable that in actual applications, there may be some scenarios where it is not desirable to generate an interrupt signal immediately after the pointer register is configured (for example, in some scenarios, the first processor core or the second processor core is processing a relatively important task, and it is desirable that the next interrupt come after the task is processed). By setting the second interrupt mask state indication bit, the third interrupt mask state indication bit, the fourth interrupt mask state indication bit, and the fifth interrupt mask state indication bit in the interrupt mask register, the interrupt mask register can be used to control whether the interrupt signal that enables the processor core to process instructions is actually allowed to be generated, thereby making the microprocessor applicable to more actual scenarios.
[0136] In another feasible implementation of the embodiment of the present application, as Fig.10As shown, the register array may include a first interrupt mask register and a second interrupt mask register. The first interrupt mask register includes n first interrupt mask status indication bits; each first interrupt mask status indication bit corresponds to an interrupt status indication bit in the first interrupt status register; the value recorded in each first interrupt mask status indication bit represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed. The second interrupt mask register includes n second interrupt mask status indication bits. Each second interrupt mask status indication bit corresponds to an interrupt status indication bit in the second interrupt status register. The value recorded in each second interrupt mask status indication bit represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed. In this way, the first interrupt status register and the second interrupt status register are managed respectively by setting the first interrupt mask register and the second interrupt mask register, so that the circuit design in the microprocessor can be simplified.
[0137] In the above feasible implementation manner, the first interrupt mask register may further include a sixth interrupt mask state indication bit and a seventh interrupt mask state indication bit; the second interrupt mask register may further include an eighth interrupt mask state indication bit and a ninth interrupt mask state indication bit. Among them, the sixth interrupt mask state indication bit corresponds to the first head pointer register, and is used to indicate whether the first interrupt enable indicated by the first head pointer register is allowed; the seventh interrupt mask state indication bit corresponds to the second tail pointer register, and is used to indicate whether the first interrupt enable indicated by the second tail pointer register is allowed; the eighth interrupt mask state indication bit corresponds to the first tail pointer register, and is used to indicate whether the second interrupt enable indicated by the first tail pointer register is allowed; the ninth interrupt mask state indication bit corresponds to the second head pointer register, and is used to indicate whether the second interrupt enable indicated by the second head pointer register is allowed.
[0138] Optionally, the first interrupt mask register may also include two, one first interrupt mask register corresponds to the first head pointer register, and the value recorded in the sixth interrupt mask status indicator bit is used to indicate whether the interrupt enable indicated by the first head pointer register is allowed; the other first interrupt mask register corresponds to the second tail pointer register, and the value recorded in the seventh interrupt mask status indicator bit is used to indicate whether the interrupt enable indicated by the second tail pointer register is allowed. Similarly, the second interrupt mask register may also include two, one second interrupt mask register corresponds to the first tail pointer register, and the value recorded in the eighth interrupt mask status indicator bit is used to indicate whether the interrupt enable indicated by the first tail pointer register is allowed; the other second interrupt mask register corresponds to the second head pointer register, and the value recorded in the ninth interrupt mask status indicator bit is used to indicate whether the interrupt enable indicated by the second head pointer register is allowed.
[0139] It can be understood that, through the above feasible implementation, it is also possible to control whether the interrupt signal that enables the processor core to process instructions is actually allowed to be generated, so that the microprocessor can be applied to more practical scenarios.
[0140] It can be understood that in an embodiment of the present application, an interrupt generating circuit can be provided in the input / output processor or outside the input / output processor, and each interrupt status register and each interrupt mask register can be connected to the enable end of the corresponding interrupt generating circuit, so as to control whether the interrupt generating circuit generates an interrupt signal.
[0141] Based on the same inventive concept, this embodiment also provides an information processing method in a microprocessor, wherein the microprocessor includes a first processor core and an input / output processor; the first processor core is connected to the input / output processor, and the input / output processor includes a register array and at least one second processor core; the register array includes an interrupt status register. This method can be found in Fig.11 As shown, including:
[0142] S1101: When a software function executed by the second processor core needs to trigger an interruption of the first processor core, the second processor core modifies the value of the interruption status indication bit corresponding to the software function in the interruption status register to a first value to trigger an interruption of the first processor core.
[0143] The first value indicates that the software function needs to trigger an interrupt.
[0144] S1102: When a software function executed by the first processor core needs to trigger an interruption of the second processor core, the first processor core modifies the value of an interruption status indication bit corresponding to the software function in an interruption status register to a first value to trigger an interruption of the second processor core.
[0145] It can be understood that there is no timing restriction between steps S1101 and S1102.
[0146] In this way, by setting the interrupt status register, and when the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, it is indicated that the second processor core needs to be interrupted; when the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, it is indicated that the first processor core needs to be interrupted. In this way, when the software is running in the microprocessor and some functions of the software generate requests requiring the first processor core or the second processor core to process, the triggering of the interrupt corresponding to the software function can be achieved by updating the value of the corresponding interrupt status indication bit in the interrupt status register, thereby allowing the software function to run normally and improving the reliability of the microprocessor.
[0147] It can be understood that in some optional implementations of the embodiments of the present application, when the microprocessor further includes an interrupt generating circuit, the register array further includes an interrupt mask register, and the interrupt mask register includes n first interrupt mask status indication bits, each first interrupt mask status indication bit corresponds to an interrupt status indication bit in the interrupt status register, and the value recorded in each first interrupt mask status indication bit represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, the method provided in the embodiments of the present application may further include:
[0148] When the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, and the value recorded in the first interrupt masking status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generating circuit;
[0149] When the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to the first value, and the value recorded in the first interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generation circuit.
[0150] In this way, by setting the interrupt mask register and setting the value recorded in each first interrupt mask status indication bit of the interrupt mask register to represent whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, the interrupt mask register can be configured to control whether the interrupt generating circuit is actually allowed to generate an interrupt signal corresponding to the software function, thereby decoupling the software function and the interrupt signal generation operation, thereby making the microprocessor suitable for more practical scenarios.
[0151] It can be understood that in some optional implementations of the embodiments of the present application, the interrupt mask register also includes a second interrupt mask state indication bit, a third interrupt mask state indication bit, a fourth interrupt mask state indication bit and a fifth interrupt mask state indication bit, the second interrupt mask state indication bit corresponds to the first head pointer register, and is used to indicate whether the first interrupt enable indicated by the first head pointer register is allowed, the third interrupt mask state indication bit corresponds to the second tail pointer register, and is used to indicate whether the first interrupt enable indicated by the second tail pointer register is allowed; the fourth interrupt mask state indication bit corresponds to the first tail pointer register, and is used to indicate whether the second interrupt enable indicated by the first tail pointer register is allowed, and the fifth interrupt mask state indication bit corresponds to the second head pointer register, and is used to indicate whether the second interrupt enable indicated by the second head pointer register is allowed, the method provided by the embodiment of the present application may also include:
[0152] When the first interrupt trigger value indicates that the second interrupt needs to be triggered, and the value recorded in the fourth interrupt mask state indication bit indicates that the second interrupt indicated by the first tail pointer register is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generation circuit;
[0153] When the second interrupt trigger value indicates that the first interrupt needs to be triggered, and the value recorded in the second interrupt mask state indication bit indicates that the first interrupt indicated by the first pointer register is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generation circuit;
[0154] When the third interrupt trigger value indicates that the first interrupt needs to be triggered and the value recorded in the third interrupt mask state indication bit indicates that the first interrupt indicated by the second tail pointer register is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generation circuit;
[0155] When the fourth interrupt trigger value indicates that the second interrupt needs to be triggered and the value recorded in the fifth interrupt mask status indication bit indicates that the second interrupt indicated by the second first pointer register is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generation circuit.
[0156] In this way, by setting the above-mentioned second interrupt mask status indication bit, third interrupt mask status indication bit, fourth interrupt mask status indication bit and fifth interrupt mask status indication bit in the interrupt mask register, the interrupt mask register can be used to control whether the interrupt generating circuit is actually allowed to generate an interrupt signal that enables the processor core to process instructions, thereby making the microprocessor suitable for more practical scenarios.
[0157] In some other optional implementations of the embodiments of the present application, when the register array further includes a first interrupt status register and a second interrupt status register, the method provided in the embodiments of the present application may further include:
[0158] In the case where the software function executed by the second processor core needs to trigger the first interrupt, the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value; the first value indicates that the software function needs to trigger an interrupt;
[0159] In the case where the software function executed by the first processor core needs to trigger the second interrupt, the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register is modified to the first value by the first processor core.
[0160] In this way, the interrupt mask register can also be configured to control whether the interrupt generation circuit is actually allowed to generate an interrupt signal corresponding to the software function, so that the software function and the interrupt signal generation operation are decoupled, so that the microprocessor can be applied to more practical scenarios. And by setting the first interrupt status register and the second interrupt status, it is possible to distinguish between different interrupt information sending objects, making the circuit design in the microprocessor simpler.
[0161] In some other optional implementations of the embodiments of the present application, the microprocessor further includes an interrupt generation circuit, the register array further includes a first interrupt mask register and a second interrupt mask register, and the first interrupt mask register includes n first interrupt mask status indication bits, each first interrupt mask status indication bit corresponds to an interrupt status indication bit in the first interrupt status register, and the value recorded in each first interrupt mask status indication bit represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, and the second interrupt mask register includes n second interrupt mask status indication bits. Each second interrupt mask status indication bit corresponds to an interrupt status indication bit in the second interrupt status register, and the value recorded in each second interrupt mask status indication bit represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, the method provided by the embodiments of the present application may also include:
[0162] When the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to the first value, and the value recorded in the first interrupt masking status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generating circuit;
[0163] When the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to the first value, and the value recorded in the second interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generation circuit.
[0164] In some other optional implementations of the embodiments of the present application, the first interrupt mask register also includes a sixth interrupt mask state indication bit and a seventh interrupt mask state indication bit, and the second interrupt mask register also includes an eighth interrupt mask state indication bit and a ninth interrupt mask state indication bit, the sixth interrupt mask state indication bit corresponds to the first head pointer register, and is used to indicate whether the first interrupt enable indicated by the first head pointer register is allowed, the seventh interrupt mask state indication bit corresponds to the second tail pointer register, and is used to indicate whether the first interrupt enable indicated by the second tail pointer register is allowed, the eighth interrupt mask state indication bit corresponds to the first tail pointer register, and is used to indicate whether the second interrupt enable indicated by the first tail pointer register is allowed, and the ninth interrupt mask state indication bit corresponds to the second head pointer register, and is used to indicate whether the second interrupt enable indicated by the second head pointer register is allowed, the method provided by the embodiments of the present application may also include:
[0165] When the first interrupt trigger value indicates that the second interrupt needs to be triggered, and the value recorded in the eighth interrupt mask state indication bit indicates that the second interrupt indicated by the first tail pointer register is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generation circuit;
[0166] When the second interrupt trigger value indicates that the first interrupt needs to be triggered and the value recorded in the sixth interrupt mask state indication bit indicates that the first interrupt indicated by the first pointer register is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generation circuit;
[0167] When the third interrupt trigger value indicates that the first interrupt needs to be triggered and the value recorded in the seventh interrupt mask state indication bit indicates that the first interrupt indicated by the second tail pointer register is allowed to be enabled, an interrupt signal is sent to the first processor core through the interrupt generation circuit;
[0168] When the fourth interrupt trigger value indicates that the second interrupt needs to be triggered and the value recorded in the ninth interrupt mask state indication bit indicates that the second interrupt indicated by the second first pointer register is allowed to be enabled, an interrupt signal is sent to the second processor core through the interrupt generation circuit.
[0169] It can be understood that, when there are multiple second processor cores, an interrupt status register and an interrupt mask register may be separately set for each second processor core to manage the interrupt corresponding to the software function of the second processor core.
[0170] In addition, when there are multiple second processor cores, only one set of the above-mentioned interrupt status register and interrupt mask register may be set. In this case, different bit segments corresponding to different second processor cores can be defined in the interrupt status register and the interrupt mask register to implement the management of interrupts corresponding to software functions sent to different second processor cores.
[0171] It should be understood that, for the sake of brevity, some of the content described in the microprocessor embodiment will not be repeated in the method embodiment part, but the relevant content is still applicable.
[0172] Embodiment three:
[0173] exist Figure 1 Based on the provided microprocessor, the second processor core can assist the first processor core in data processing, thereby reducing the occupancy of the first processor and improving the performance of the microprocessor. However, in actual application, the first processor core and the second processor core may cause a certain access delay due to coordination problems during the process of mutual cooperation, forming a bottleneck that limits the performance of the microprocessor.
[0174] To this end, the present application embodiment provides a microprocessor structure, see Fig.12 As shown, the input and output processor of the microprocessor also includes a register array, and the register array includes a hardware direct transfer register. Among them, the hardware direct transfer register is configured with a target transfer address, and the hardware direct transfer register is used to transfer data to the target transfer address after receiving data from the first processor core or the second processor core. In this way, by setting the hardware direct transfer register, the first processor core or the second processor core can access and return the target transfer address immediately, thereby improving the real-time access to the target transfer address. In actual applications, for requests with low delay tolerance, access can be achieved by configuring the hardware direct transfer register, thereby reducing interaction delays and improving interaction efficiency.
[0175] In some optional implementations of the embodiments of the present application, the input / output processor may be connected to the peripheral controller. The hardware direct transfer register may include a point-to-point direct transfer register. The target transfer address configured by the point-to-point direct transfer register is the address of a single peripheral controller.
[0176] In some optional implementations of the embodiments of the present application, the hardware direct transfer register may include a regional direct transfer register. The target transfer address configured by the regional direct transfer register includes addresses of multiple peripheral controllers.
[0177] In some optional implementations of the embodiments of the present application, the hardware direct transfer register may include both a point-to-point direct transfer register and a regional direct transfer register.
[0178] In some optional implementations of the embodiments of the present application, such as Fig.13 As shown, the register array may also include a hardware direct transfer mapping configuration register; the hardware direct transfer mapping configuration register is set with the target transfer address of each hardware direct transfer register and the mapping relationship between each hardware direct transfer register. The target address of the hardware direct transfer register and the hardware direct transfer mapping configuration register may be set by an engineer according to actual needs.
[0179] Based on the same inventive concept, this embodiment also provides an information processing method in a microprocessor, wherein the microprocessor includes a first processor core and an input / output processor; the first processor core is connected to the input / output processor, and the input / output processor includes a register array and at least one second processor core; the register array includes a hardware direct transfer register. This method can be found in Fig.14 As shown, including:
[0180] S1401: When a target processor core has a need for direct data transfer, the target processor core sends data that needs to be directly transferred to a hardware direct transfer register, so that the data is transferred to a target transfer address through the hardware direct transfer register.
[0181] The target processor core is the first processor core or the second processor core.
[0182] In some optional implementations of the embodiments of the present application, when the register array also includes a hardware direct transfer mapping configuration register, and the hardware direct transfer mapping configuration register is set with a mapping relationship between a target transfer address of each hardware direct transfer register and each hardware direct transfer register, before sending the data to be directly transferred to the hardware direct transfer register through the target processor core, the hardware direct transfer mapping configuration register can also be accessed through the target processor core to find the target hardware direct transfer register corresponding to the target transfer address of the data according to the target transfer address of the data and the mapping relationship set in the hardware direct transfer mapping configuration register, and then send the data to be directly transferred to the target hardware direct transfer register through the target processor core.
[0183] It can be understood that in some optional implementations of the embodiments of the present application, for security reasons, the target processor core can be configured to be only the second processor core, and the hardware direct mapping configuration register can be configured to allow only the second processor core to access.
[0184] It can be understood that in some optional implementations of the embodiments of the present application, for security reasons, the target processor core can be configured to be only the first processor core, and the hardware direct transfer register can be configured to allow only the first processor core to access.
[0185] It can be understood that in the embodiment of the present application, corresponding addresses can be assigned to different registers to facilitate access by the first processor core or the second processor core.
[0186] Embodiment 4:
[0187] It can be understood that the various implementations described in the above embodiments 1 to 3 can be freely combined to obtain a more specific implementation. For example, the solutions of embodiment 1 and embodiment 2 can be combined to obtain an implementation in which a pointer register and an interrupt status register are provided at the same time, the solutions of embodiment 1 and embodiment 3 can be combined to obtain an implementation in which a pointer register and a hardware direct transfer register are provided at the same time, the solutions of embodiment 2 and embodiment 3 can be combined to obtain an implementation in which an interrupt status register and a hardware direct transfer register are provided at the same time, and the solutions of embodiment 1, embodiment 2 and embodiment 3 can be combined to obtain an implementation in which a pointer register, an interrupt status register and a hardware direct transfer register are provided at the same time.
[0188] It can also be understood that the microprocessor provided in the embodiment of the present application can also have a peripheral controller, such as Fig.15 As shown, the peripheral controller is connected to the input and output processor, wherein the second processor core serves as an intermediate medium when the first processor core interacts with the peripheral controller.
[0189] That is, when the first processor core needs to perform a series of operations on the peripherals based on business needs, the instructions of the relevant operations can be sent to the corresponding peripheral controller and the second processor core respectively, and the peripheral controller obtains the relevant data from the peripherals and submits it to the second processor core for processing; or the first processor core directly sends the instructions of the relevant operations to the second processor core, and the second processor core obtains and processes the data from the peripheral controller. After the second processor core has processed all operations, it will feed back the processed results to the first processor core. In this way, all the intermediate processes of the interaction between the first processor core and the peripheral controller are handed over to the second processor core to complete, which can reduce the workload and occupancy rate of the first processor core and improve the processing performance of the first processor core.
[0190] In some optional implementations of the embodiments of the present application, there are multiple peripheral controllers, and the input and output processor may further include a first storage module, for example Fig.16 shown.
[0191] In this optional implementation, each peripheral controller has a corresponding exclusive shared space in the first storage module. Each peripheral controller is used to store data of the peripheral into the exclusive shared space corresponding to the peripheral controller when a peripheral corresponding to the peripheral controller is connected, for access by the first processor core or the second processor core.
[0192] That is, in some optional implementations of the embodiments of the present application, for any peripheral controller, information exchange can be achieved between the peripheral controller, the first processor core, and the second processor core through the exclusive shared space corresponding to the peripheral controller.
[0193] For example, assuming that peripheral controller 1 is connected to peripheral 1, and the application needs to obtain a data from peripheral 1 and perform a convolution operation, the first processor core will send a data acquisition instruction and a convolution operation instruction to the exclusive shared space corresponding to peripheral controller 1. When the first processor sends the data acquisition instruction and the convolution operation instruction, it will update the first tail pointer register, thereby generating an interrupt notification to the second processor core. The second processor core obtains the data acquisition instruction and the convolution operation instruction, and accesses peripheral controller 1 according to the data acquisition instruction, and controls peripheral controller 1 to move the peripheral data to be processed from peripheral 1 to the corresponding exclusive shared space. When the peripheral data to be processed is transferred, the peripheral controller 1 generates a peripheral interrupt signal and outputs it to the second processor core. The second processor core updates the first pointer register and obtains the peripheral data to be processed from the exclusive shared space corresponding to the peripheral controller 1, thereby executing the convolution operation instruction, performing a convolution operation on the peripheral data to be processed, and then placing the convolution result into the exclusive shared space corresponding to the peripheral controller 1, and updating the first pointer register to generate a first interrupt, thereby notifying the first processor core to obtain the convolution result from the exclusive shared space corresponding to the peripheral controller 1.
[0194] In the embodiment of the present application, the first storage module can be implemented by, but not limited to, SRAM (Static Random-Access Memory).
[0195] In a feasible implementation of the embodiment of the present application, the peripheral controller may be arranged in the IOP. The reason why the peripheral controller is arranged in the IOP is that the peripheral controller is encapsulated in the IOP for complete privatization of the peripheral controller, and the first processor core (such as AP) cannot directly access the peripheral controller.
[0196] In another feasible implementation of the embodiment of the present application, the peripheral controller may also be disposed outside the IOP.
[0197] In an embodiment of the present application, there are multiple groups of register arrays, and each exclusive shared space corresponds to a group of register arrays; the interrupt triggered by each group of register arrays is used to trigger the first processor core or the second processor core to access the exclusive shared space corresponding to the group of register arrays.
[0198] In some optional implementations of the present application, each group of register arrays may further include a size information register. The size information register may include a first size recording bit, and the first size recording bit is used to record the size of the exclusive shared space corresponding to the register array.
[0199] In some optional implementations of the embodiments of the present application, the size information register may also include a second size record bit and a third size record bit; the second size record bit is used to record the depth of the first pointer register in the register array to which it belongs; the third size record bit is used to record the depth of the second pointer register in the register array to which it belongs.
[0200] In some optional implementations of the embodiments of the present application, the input and output processor may further include an NCC (Network Control Center); the register array and the second processor core are connected to the peripheral controller via the NCC. It is understood that the first processor core may also be connected to the peripheral controller via the NCC.
[0201] It can be understood that in the embodiment of the present application, the input and output processor may also include a DMA (Direct Memory Access) controller, and the second processor core may complete the data transfer operation from the peripheral controller to the exclusive shared space corresponding to the peripheral controller through the DMA controller.
[0202] In the embodiment of the present application, the input / output processor may further include at least one of a trusted domain controller (called TZC (TrustZone Controller) in some documents), a first address remapping module, a second address remapping module, a third address remapping module, a watchdog, a timer, and a register array. In addition, the microprocessor may further include at least one of a SCP (System Control Processor), a DDR (Double Data Rate) memory, and a NOC (network-on-chip).
[0203] For example, Fig.17 As shown, Fig.17 The diagram shows a situation including all the above modules, where the modules in the input and output processor are connected via NCC, and the various parts in the microprocessor are connected via NOC. It can be understood that Fig.17 The modules shown in the figure may also include only part of them. The functions and effects of each module are as follows:
[0204] The system control processor is the clock reset control center of the microprocessor. It mainly provides the working clock and clock frequency adjustment for each module in the microprocessor, and controls the reset of each module so that the chip can complete the initialization normally after power-on.
[0205] DDR memory is a dynamic data storage module inside the microprocessor.
[0206] In an embodiment of the present application, the first processor core can copy the firmware program of the second processor core to the firmware area reserved by the first storage module of the input and output processor before the second processor core is started, thereby realizing firmware loading during the startup process of the second processor core.
[0207] Considering that the size of the first storage module in the input and output processor is greatly limited, when the space of the firmware area reserved in the first storage module is insufficient, the first processor core can copy the firmware program of the second processor core to the DDR memory, and the second processor core reads the firmware program from the DDR memory.
[0208] NOC is an interconnection network inside the microprocessor. By using NOC, the modules inside the microprocessor can be connected to each other, and the communication data of each module can be quickly transmitted to realize efficient operation of the microprocessor.
[0209] The trusted domain controller can be set at the input port of the input / output processor to perform security detection on the information in the input / output processor, thereby improving the security of information transmission.
[0210] It can be understood that the security detection method of the trusted domain controller can be configured by engineers according to actual needs. Exemplarily, the address area in the trusted domain controller can be pre-divided into multiple trusted domains and a zero domain. When the first processor core sends a request, the request can include the address of the request in the trusted domain controller and a preset security identifier. When the address is within the trusted domain of the trusted domain controller and has a security identifier, the request is considered safe. According to the security identifier included in the request, the request is sent to the corresponding module through a secure channel; if the address is outside the trusted domain of the trusted domain controller, the security check fails and the request will be discarded.
[0211] Exemplarily, the trusted domain controller may be used to select whether to prohibit the first processor core from accessing the firmware area in the first storage module according to the value of the register prohibiting the first processor core from accessing the firmware program, in response to the access request to the first storage module.
[0212] It can be understood that in an embodiment of the present application, before the second processor core is started, the value of the register that prohibits the first processor core from accessing the firmware program can be set to a third value, indicating that the first processor core is allowed to access the firmware area in the first storage module; after the second processor core is started, or after the firmware program is written to the firmware area in the first storage module, the value of the register that prohibits the first processor core from accessing the firmware program can be set to a fourth value, indicating that the first processor core is not allowed to access the firmware area in the first storage module.
[0213] In addition, the trusted domain controller can also be used to: after the second processor core is started, filter the requests issued by the first processor core according to the security attributes of the peripherals. Only secure requests can access the exclusive shared space and register array corresponding to the secure peripherals, and non-secure requests to access the exclusive shared space and register array corresponding to the secure peripherals are filtered.
[0214] Exemplarily, the request sent by the first processor core may include a security identifier, and only when the security identifier is consistent with the security attribute of the peripheral device, access to the exclusive shared space and register array corresponding to the secure peripheral device is allowed.
[0215] The first address remapping module can be used to, before prohibiting the first processor core from accessing the firmware area in the first storage module, perform an address offset on the first processor core's request to access the first storage module except the firmware area, so as to prohibit the first processor core from accessing the area of the first storage module except the firmware area.
[0216] In addition, after prohibiting the first processor core from accessing the firmware area in the first storage module, the first address remapping module can be used to perform address mapping for the first processor core's request to access the first storage module other than the firmware area, according to the exclusive shared space actually allocated by the peripheral device in the first storage module, so that the first processor core can access the corresponding exclusive shared space in the first storage module.
[0217] In addition, the first address remapping module can be used to offset the request of the first processor core to access the hardware direct address register in the register array to an undefined address space, that is, prohibit the first processor core from accessing the hardware direct address register in the register array.
[0218] The DMA controller is used to assist the second processor core in completing the data transfer from the peripheral controller to the first storage module, which can not only release the resources of the second processor core, but also realize fast transfer. The DMA controller can be accessed by the second processor core, and can also actively access the peripheral interface controller to send and receive data to the peripheral controller.
[0219] Watchdog and timer: The watchdog is used to monitor whether there is any abnormality in the operation of the second processor core. Once an abnormality occurs, the watchdog will reset the second processor core after the timeout, so that it can return to normal and restart work. The timer is used for system timing of the second processor core.
[0220] The second address remapping module is used for converting the address in the first storage module to the address at the program level of the second processor core, so as to realize the accurate acquisition of the information from the second processor core to the first storage module.
[0221] The third address remapping module is used for address conversion from the address in the first storage module to the address of the DMA controller, so as to realize accurate acquisition of information from the DMA controller to the first storage module.
[0222] Register array module: includes a pointer register, which is used to record the number of instructions issued by the first processor core and the second processor core, and record whether the instruction needs to trigger an interrupt. The first processor core and the second processor core can interact based on the pointer register. Exemplarily, after the first processor core issues an instruction to the second processor core, the number of instructions for the second processor core in the pointer register is increased by 1, and the value for which an interrupt needs to be generated is recorded. Thereafter, the interrupt trigger circuit generates an interrupt signal and sends it to the second processor core so that the second processor core processes the relevant instructions. Similarly, when the second processor core issues an instruction that needs to be processed by the first processor core, the number of instructions for the first processor core in the pointer register is increased by 1, and the value for which an interrupt needs to be generated is recorded. Thereafter, the interrupt trigger circuit generates an interrupt signal and sends it to the first processor core so that the first processor core processes the relevant instructions.
[0223] It can be understood that the instructions generated above can be placed in an exclusive shared space corresponding to the peripheral controller, and the first processor core or the second processor core obtains and processes the instructions from the exclusive shared space after receiving the interrupt signal.
[0224] It can also be understood that the register array module can also include other registers, such as a hardware direct transfer register and a hardware direct transfer address register, wherein the hardware direct transfer address register records the direct transfer address of the hardware direct transfer register, and the hardware direct transfer register is used to directly transfer the received data to the corresponding direct transfer address. For another example, an interrupt status register can also be included to record whether various functions at the software level need to trigger an interrupt.
[0225] In some optional implementations of the embodiments of the present application, such as Fig.18As shown, the input-output processor may also include an address splitting circuit; each target register array in each group of register arrays is connected to the address splitting circuit via a downstream interface bus, and the address splitting circuit is connected to the NCC via a target downstream interface bus for transmitting data of each target register array. Wherein, the target register array is the register array of the same type of peripheral controller in each group of register arrays. In this way, each target register array in each group of register arrays is connected to the address splitting circuit via a downstream interface bus, and the address splitting circuit is connected to the NCC via a target downstream interface bus for transmitting data of each target register array. Then, on the NCC side, access requests for register arrays of the same type of peripheral controllers can go through the same interface, thereby reducing the number of interfaces on the NCC side.
[0226] In addition, see Fig.19 As shown, the hardware direct transfer register is connected to the address splitting circuit. After receiving the data transmitted via the address splitting circuit, the downlink interface data is converted into uplink interface data, and the data is directly sent to the target transmission address through the uplink interface bus.
[0227] It can be understood that the downstream interface bus may be an APB bus, and the upstream interface bus may be an AHB bus.
[0228] It is also understandable that Fig.19 As shown, the address splitting circuit can be connected to the dynamic clock shutdown module through the downstream interface bus. The dynamic clock shutdown module is used to control the clock shutdown of the register array to enter the low power consumption mode when no request is received.
[0229] It can be understood that in the embodiment of the present application, redundant custom registers can also be configured in the register array to meet various requirements required when the software is running, such as meeting the requirements of data temporary storage.
[0230] Based on the same inventive concept, this embodiment provides an electronic device, including the microprocessor provided in the embodiment of the present application.
[0231] It can be understood that the electronic device can be a board with the microprocessor, such as a processor board, a graphics card, etc. In addition, the electronic device can also be a device with complete data processing and user business execution capabilities, such as a smart terminal, a server, etc.
[0232] In the embodiments of the present application, in addition to a microprocessor, the electronic device may also have other components, for example, it may also have a memory (such as memory, hard disk, etc.), and it may also have an internal communication bus for realizing communication between the microprocessor and the memory; for example, it may also have information display components such as a display screen, but this is not a limitation.
[0233] Embodiment five:
[0234] To facilitate understanding of the solution of the embodiment of the present application, the first processor core is AP, the second processor core is RISC-V core (hereinafter referred to as RV), and the microprocessor is as follows: Fig.17 Taking the structure shown as an example, the embodiments of the present application are exemplarily described:
[0235] For each low-speed peripheral controller, there is a corresponding register array, and the address range of the register array is 4KB, as shown in Table 1 below.
[0236] For peripheral controllers of the same type, such as Fig.18 As shown, the same type of peripheral controllers can be connected to the NCC through a target downstream interface bus, and then connected to the corresponding register arrays distributed by each peripheral controller of the same type through the downstream interface bus through the address splitting circuit. In this way, for the NCC side, interface merging can be achieved to reduce the number of interfaces on the NCC side.
[0237] In the embodiments of the present application, the specific configuration and function of each register are shown in the following tables:
[0238] Table 1:
[0239]
[0240]
[0241] The specific description of each register is as follows:
[0242] The first pointer register (0x000) is defined as follows:
[0243]
[0244] It can be understood that WR indicates that both a write operation and a read operation can be performed. 1'b0 represents a value of 1 bit 0, and 1'b1 represents a value of 1 bit 1.
[0245] The first tail pointer register (0x004) is defined as follows:
[0246]
[0247] The second pointer register (0x008) is defined as follows:
[0248]
[0249]
[0250] The second tail pointer register (0x00c) is defined as follows:
[0251]
[0252] The spare 0 first pointer register (0x010) is defined as follows:
[0253]
[0254] The spare 0 tail pointer register (0x014) is defined as follows:
[0255]
[0256] The spare 1st pointer register (0x018) is defined as follows:
[0257]
[0258] The spare 1 tail pointer register (0x01c) is defined as follows:
[0259]
[0260] The first interrupt mask register (0x020) is defined as follows:
[0261]
[0262]
[0263] It can be understood that when the interrupt is enabled, the interrupt signal is allowed to be generated, and when the interrupt is masked, the interrupt signal is not allowed to be generated. The first interrupt status register (0x024) is defined as follows:
[0264]
[0265] It can be understood that when the interrupt is cleared, it indicates that there is no interrupt triggering requirement.
[0266] The second interrupt mask register (0x028) is defined as follows:
[0267]
[0268] The second interrupt status register (0x02c) is defined as follows:
[0269]
[0270]
[0271] The hardware direct mapping configuration register 0 (0x060) is defined as follows: (only RV can access)
[0272] Bit name Read and Write illustrate 31:16 map_addr1 WR Hardware direct transfer register 1 standard transfer address 15:0 map_addr0 WR Hardware direct transfer register 0 standard transfer address
[0273] Hardware direct mapping configuration register 1 (0x064) is defined as follows: (only RV can access)
[0274] Bit name Read and Write illustrate 31:16 map_addr3 WR Hardware direct transfer register 3 standard transfer address 15:0 map_addr2 WR Hardware direct transfer register 2 standard transfer address
[0275] Hardware direct mapping configuration register 2 (0x068) is defined as follows: (only RV can access)
[0276] Bit name Read and Write illustrate 31:16 map_addr5 WR Hardware direct transfer register 5 standard transfer address 15:0 map_addr4 WR Hardware direct transfer register 4 standard transfer address
[0277] The hardware direct transfer register 0 (0x030) is defined as follows:
[0278] Bit name Read and Write illustrate 31:0 hw_reg0 WR Hardware direct transfer register 0
[0279] It can be understood that bits 31:0 are all used for direct transmission of data.
[0280] Hardware direct transfer register 1 (0x034) is defined as follows:
[0281] Bit name Read and Write illustrate 31:0 hw_reg1 WR Hardware direct transfer register 1
[0282] Hardware direct transfer register 2 (0x038) is defined as follows:
[0283] Bit name Read and Write illustrate 31:0 hw_reg2 WR Hardware direct transfer register 2
[0284] Hardware direct transfer register 3 (0x03c) is defined as follows:
[0285] Bit name Read and Write illustrate 31:0 hw_reg3 WR Hardware direct transfer register 3
[0286] Hardware direct transfer register 4 (0x040) is defined as follows:
[0287] Bit name Read and Write illustrate 31:0 hw_reg4 WR Hardware direct transfer register 4
[0288] Hardware direct transfer register 5 (0x044) is defined as follows:
[0289] Bit name Read and Write illustrate 31:0 hw_reg5 WR Hardware direct transfer register 5
[0290] The size information register (0x048) is defined as follows:
[0291]
[0292]
[0293] The custom register 0 (0x04c) is defined as follows:
[0294] Bit name Read and Write illustrate 31:0 software_reg0 WR Software Custom Register 0
[0295] The definition of custom register 1 (0x050) is as follows:
[0296] Bit name Read and Write illustrate 31:0 software_reg1 WR Software custom register 1
[0297] The definition of custom register 2 (0x054) is as follows:
[0298] Bit name Read and Write illustrate 31:0 software_reg2 WR Software custom register 2
[0299] The definition of custom register 3 (0x058) is as follows:
[0300] Bit name Read and Write illustrate 31:0 software_reg3 WR Software custom register 3
[0301] In the 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 merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0302] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, 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 solution of this embodiment.
[0303] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0304] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0305] As used herein, a plurality refers to two or more than two.
[0306] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A microprocessor, characterized in that: include: a first processor core; An input-output processor connected to the first processor core; the input-output processor includes a register array and at least one second processor core; the register array includes an interrupt status register; the interrupt status register includes n interrupt status indication bits, each of which is used to indicate whether an interrupt corresponding to a software function needs to be triggered; n is a positive integer greater than or equal to 1; Among them, when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the second processor core needs to be interrupted; when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the interrupt status register to a first value, indicating that the first processor core needs to be interrupted.
2. The microprocessor according to claim 1, wherein: The register array also includes an interrupt mask register; The interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled.
3. The microprocessor according to claim 1, wherein: The interrupt status register includes a first interrupt status register and a second interrupt status register; The value recorded in each of the interrupt status indication bits in the first interrupt status register indicates whether it is necessary to trigger an interrupt of a corresponding software function to the first processor core; The value recorded in each of the interrupt status indication bits in the second interrupt status register indicates whether it is necessary to trigger an interrupt of a corresponding software function to the second processor core; Among them, when the second processor core executes the software function, the second processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, indicating that the first processor core needs to be interrupted; when the first processor core executes the software function, the first processor core is used to modify the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value, indicating that the second processor core needs to be interrupted.
4. The microprocessor according to claim 3, wherein: The register array also includes a first interrupt mask register and a second interrupt mask register; The first interrupt mask register includes n first interrupt mask state indication bits; each of the first interrupt mask state indication bits corresponds to an interrupt state indication bit in the first interrupt state register; the value recorded in each of the first interrupt mask state indication bits represents whether the interrupt indicated by the corresponding interrupt state indication bit is allowed to be enabled; The second interrupt mask register includes n second interrupt mask status indication bits; each of the second interrupt mask status indication bits corresponds to an interrupt status indication bit in the second interrupt status register; the value recorded in each of the second interrupt mask status indication bits represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled.
5. The microprocessor according to claim 1, wherein: The register array also includes a hardware direct transfer register; The hardware direct transfer register is configured with a target transfer address, and the hardware direct transfer register is used to transfer the data to the target transfer address after receiving the data of the first processor core or the second processor core.
6. The microprocessor according to claim 5, wherein: The hardware direct transfer register includes a point-to-point direct transfer register and a regional direct transfer register; The target transmission address configured by the point-to-point direct transfer register is the address of a single peripheral controller; The target transfer address configured by the regional direct transfer register includes addresses of multiple peripheral controllers.
7. The microprocessor according to claim 5, wherein: The register array also includes a hardware direct mapping configuration register; The hardware direct transfer mapping configuration register is provided with a mapping relationship between a target transfer address of each of the hardware direct transfer registers and each of the hardware direct transfer registers.
8. The microprocessor according to any one of claims 1 to 7, characterized in that: The microprocessor further comprises a peripheral controller, and the peripheral controller is connected to the input-output processor; The second processor core serves as an intermediate medium when the first processor core interacts with the peripheral controller.
9. The microprocessor according to claim 8, wherein: The input-output processor also includes a first storage module, and the peripheral controller has a corresponding exclusive shared space in the first storage module. The peripheral controller, the first processor core and the second processor core interact by accessing the exclusive shared space.
10. The microprocessor according to claim 9, wherein: The register arrays are multiple groups, and each of the exclusive shared spaces corresponds to a group of the register arrays; The interrupt triggered by each group of the register arrays is used to trigger the first processor core or the second processor core to access the exclusive shared space corresponding to the group of the register arrays.
11. The microprocessor according to claim 9, wherein: Each group of the register arrays also includes a size information register; The size information register includes a first size recording bit, and the first size recording bit is used to record the size of the exclusive shared space corresponding to the register array.
12. The microprocessor according to claim 8, wherein: The input-output processor also includes a network control center NCC; the register array and the second processor core are connected to the peripheral controller via the NCC.
13. The microprocessor according to claim 12, wherein: The input-output processor also includes an address splitting circuit; Each target register array in each group of the register arrays is connected to the address splitting circuit via a downstream interface bus, and the address splitting circuit is connected to the NCC via a target downstream interface bus for transmitting data of each target register array; The target register array is a register array corresponding to the same type of peripheral controller in each group of the register arrays.
14. An information processing method in a microprocessor, characterized in that: The microprocessor includes a first processor core and an input-output processor; the first processor core is connected to the input-output processor, and the input-output processor includes a register array and at least one second processor core; the register array includes an interrupt status register; the interrupt status register includes n interrupt status indication bits, each of which is used to indicate whether an interrupt corresponding to a software function needs to be triggered; The n is a positive integer greater than or equal to 1; the method comprises: In the case where the software function executed by the second processor core needs to trigger an interruption of the first processor core, the second processor core modifies the value of the interruption status indication bit corresponding to the software function in the interruption status register to a first value to trigger an interruption of the first processor core; the first value indicates that the software function needs to trigger an interruption; When the software function executed by the first processor core needs to trigger the interruption of the second processor core, the first processor core modifies the value of the interruption status indication bit corresponding to the software function in the interruption status register to a first value to trigger the interruption of the second processor core.
15. The method according to claim 14, characterized in that The register array further includes an interrupt mask register; the interrupt mask register includes n first interrupt mask status indication bits; each of the first interrupt mask status indication bits corresponds to an interrupt status indication bit in the interrupt status register; the value recorded in each of the first interrupt mask status indication bits represents whether the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled; the method further includes: When the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt masking status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, sending an interrupt signal to the first processor core to enable the first processor core to process the interrupt; When the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the second processor core to enable the second processor core to handle the interrupt.
16. The method according to claim 14, characterized in that The interrupt status register includes a first interrupt status register and a second interrupt status register; In a case where the software function executed by the second processor core needs to trigger an interruption of the first processor core, modifying the value of the interruption status indication bit corresponding to the software function in the interruption status register to a first value through the second processor core to trigger the first processor core to execute an interruption, comprising: in a case where the software function executed by the second processor core needs to trigger an interruption of the first processor core, modifying the value of the interruption status indication bit corresponding to the software function in the first interruption status register to a first value through the second processor core to trigger the first processor core to execute an interruption; In a case where a software function executed by the first processor core needs to trigger an interruption of the second processor core, the value of the interrupt status indication bit corresponding to the software function in the interrupt status register is modified to a first value by the first processor core to trigger the second processor core to execute an interrupt, including: in a case where the software function executed by the first processor core needs to trigger an interruption of the second processor core, the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register is modified to a first value by the first processor core to trigger the second processor core to execute an interrupt.
17. The method according to claim 16, characterized in that The register array further includes a first interrupt mask register and a second interrupt mask register; the first interrupt mask register includes n first interrupt mask state indication bits; each of the first interrupt mask state indication bits corresponds to an interrupt state indication bit in the first interrupt state register; the value recorded in each of the first interrupt mask state indication bits indicates whether the interrupt indicated by the corresponding interrupt state indication bit is allowed to be enabled; The second interrupt mask register includes n second interrupt mask state indication bits; each of the second interrupt mask state indication bits corresponds to an interrupt state indication bit in the second interrupt state register; The value recorded in each of the second interrupt masking status indication bits represents whether the interrupt enable indicated by the corresponding interrupt status indication bit is allowed; the method further includes: When the second processor core modifies the value of the interrupt status indication bit corresponding to the software function in the first interrupt status register to a first value, and the value recorded in the first interrupt masking status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, sending an interrupt signal to the first processor core to enable the first processor core to process the interrupt; When the first processor core modifies the value of the interrupt status indication bit corresponding to the software function in the second interrupt status register to a first value, and the value recorded in the second interrupt mask status indication bit indicates that the interrupt indicated by the corresponding interrupt status indication bit is allowed to be enabled, an interrupt signal is sent to the second processor core to enable the second processor core to handle the interrupt.
18. The method of claim 14, wherein: The register array also includes a hardware direct transfer register; the hardware direct transfer register is configured with a target transfer address; the method includes: When the target processor core has a data direct transmission requirement, the target processor core sends the data that needs to be directly transmitted to the hardware direct transmission register, so that the data is transmitted to the target transmission address through the hardware direct transmission register; The target processor core is the first processor core or the second processor core.
19. The method according to claim 18, characterized in that The register array further includes a hardware direct transfer mapping configuration register; the hardware direct transfer mapping configuration register is provided with a mapping relationship between a target transfer address of each of the hardware direct transfer registers and each of the hardware direct transfer registers; Before sending the data to be directly transferred to the hardware direct transfer register through the target processor core, the method further includes: Accessing the hardware direct transfer mapping configuration register through the target processor core to find the target hardware direct transfer register corresponding to the target transfer address of the data according to the target transfer address of the data and the mapping relationship set in the hardware direct transfer mapping configuration register; Correspondingly, sending the data to be directly transferred to the hardware direct transfer register through the target processor core includes: The data to be directly transferred is sent to the target hardware direct transfer register through the target processor core.
20. The method of claim 18, wherein: The target processor core is the first processor core; the hardware direct transfer register is configured to allow only the first processor core to access it.
21. The method of claim 19, wherein: The target processor core is the second processor core; the hardware direct mapping configuration register is configured to allow only the second processor core to access.
22. The method according to any one of claims 14 to 21, characterized in that: The microprocessor further comprises a peripheral controller, which is connected to the input-output processor; the second processor core serves as an intermediate medium when the first processor core interacts with the peripheral controller.
23. The method of claim 22, wherein: The input-output processor also includes a first storage module, and the peripheral controller has a corresponding exclusive shared space in the first storage module. The peripheral controller, the first processor core and the second processor core interact by accessing the exclusive shared space.
24. An electronic device, characterized in that: Comprising a microprocessor as claimed in any one of claims 1-13.
