The processor and its internal interrupt controller
The novel interrupt controller efficiently manages multiple interrupts by segmenting and iteratively determining priorities, addressing complexity and resource issues in high-performance systems.
Patent Information
- Application Number
- JP2022519121
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-25
- Filing Date
- 2020-09-18
- Publication Date
- 2025-01-20
- Estimated Expiration
- 2040-09-18
AI Technical Summary
Conventional interrupt controllers face challenges with increasing complexity and resource demands as the number of interrupt sources grows, leading to performance and scalability issues in high-performance platforms.
A novel interrupt controller that samples interrupts, divides them into segments, and iteratively determines the highest priority interrupts using a priority arbitration unit, reducing the need for extensive arbitration logic resources.
This approach efficiently handles a large number of interrupts with minimal resources, ensuring high-performance interrupt handling and scalability across various configurations.
Smart Images

Figure 0007617907000001 
Figure 0007617907000002 
Figure 0007617907000003
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of processors, and in particular to the field of interrupt handling within processors. [Background technology]
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS The present invention claims priority from Chinese Patent Application No. 201910912610.1, filed on September 25, 2019, the entire contents of which are incorporated herein by reference.
[0003] 2. Background of the Invention A processor needs to handle interrupts coming from interrupt sources such as I / O devices and timers. The processor handles the interrupts by executing an interrupt service routine. Since the processor needs to handle various interrupts from multiple interrupt sources, each interrupt has a corresponding interrupt priority. Generally, a high-performance platform has an elaborately designed system, which has a large number of interrupt sources, usually 512 or more. For this platform, an interrupt controller is required to identify an interrupt with the highest priority from the large number of interrupts through arbitration, and report information, interrupts, etc. The interrupt controller needs to compare the priorities of various interrupts, thereby selecting the interrupt with the highest priority and responding to the interrupt.
[0004] In a conventional interrupt controller, as the number of interrupt sources increases, the resources for priority arbitration swell rapidly. Each additional interrupt source requires additional interrupt arbitration resources. The arbitration logic includes a priority comparator and a selector, etc. Furthermore, in a high-performance interrupt controller, as the number of interrupt sources increases, time phase adjustment is required for design, which makes the design highly complex.
[0005] When the quantity of interrupt sources is very large, the logic resources of the interrupt controller become huge, and the time phase adjustment becomes complicated, so that the traditional interrupt controller affects the performance and scale of the time adjustment in the whole chip.
[0006] For this reason, a new interrupt controller solution in a processor is needed to implement a more efficient interrupt handling scheme and support various interrupt source configurations with only a small amount of resource usage. Summary of the Invention
[0007] SUMMARY OF THE DISCLOSURE In view of the above, the present invention provides a novel processor and an interrupt controller therein, which is intended to overcome or at least mitigate at least one of the above problems.
[0008] According to one aspect of the present invention, the present invention provides an interrupt controller including: a sampling unit adapted to sample interrupts from various interrupt sources coupled to the interrupt controller, and to perform sampling on the various interrupts received, thereby generating sampled interrupts; and a priority arbitration unit adapted to divide the sampled interrupts into a plurality of interrupt segments, each of the interrupt segments including one or more sampled interrupts, and for each interrupt segment, to determine an interrupt having a highest priority among the plurality of interrupt segments, and to identify the interrupt having the highest priority among all the interrupt segments designated as interrupts to be responded to.
[0009] Optionally, in the interrupt controller of the present invention, the priority arbitration unit includes a selection module adapted to select one of a plurality of interrupt segments in turn and send an interrupt in the selected interrupt segment to the arbitration module, and an arbitration module adapted to identify an interrupt having the highest priority as an intermediate arbitration result of a current arbitration round through arbitration by the interrupt selected by the selection module and the intermediate arbitration result of a previous arbitration round, and the arbitration module completes the final arbitration round when it performs arbitration on an interrupt in the final interrupt segment selected by the selection module and treats the result of the final arbitration round as an interrupt to be responded to.
[0010] Optionally, the interrupt controller according to the present invention further comprises an interrupt configuration unit coupled to the sampling unit and adapted to store configuration information of the interrupt, the configuration information comprising one or more of the following information, namely interrupt priority, interrupt processing state and interrupt permission.
[0011] Optionally, the interrupt controller according to the present invention further includes an arbitration iteration control unit adapted to control the priority arbitration unit to perform arbitration for the interrupts and to complete the arbitration after all the interrupts have been examined.
[0012] Optionally, in the interrupt controller according to the present invention, the arbitration iteration control unit is further adapted to control the priority arbitration unit to perform arbitration for interrupts satisfying a preset condition, and complete the arbitration after all interrupts satisfying the preset condition have been investigated, wherein the preset condition is that the interrupt processing state becomes a pending state.
[0013] Optionally, in the interrupt controller of the present invention, the arbitration iterative control unit is further adapted to trigger the priority arbitration unit to perform iterative arbitration when the interrupt group includes an interrupt in a pending state and the priority arbitration unit is not performing arbitration.
[0014] Optionally, in the interrupt controller of the present invention, the quantity of input multi-channel selections supported by the selection module is determined by the quantity of interrupts received and the quantity of input multi-channel selections supported by the arbitration module, the quantity of input multi-channel selections supported by the arbitration module being determined by the quantity of interrupts received.
[0015] Optionally, in the interrupt controller of the present invention, the priority arbitration unit is further adapted to divide the various received interrupts into a plurality of interrupt segments in an ordered or random manner, and select one of the interrupt segments by arbitration.
[0016] Optionally, in the interrupt controller of the present invention, the priority arbitration unit is further adapted to block interrupt sources that do not contain any interrupts and to split interrupts in interrupt sources that do contain interrupts before splitting the received interrupts into multiple interrupt segments.
[0017] Optionally, the interrupt controller according to the present invention further includes a threshold comparison unit coupled to the interrupt configuration unit and adapted to compare the interrupt priority and the preset priority and input an interrupt to the priority arbitration unit when the interrupt priority becomes higher than the preset priority.
[0018] According to another aspect related to the present invention, the present invention includes an interrupt controller as described above and coupled to the interrupt controller adapted to sample interrupts from various interrupt sources and select an interrupt to be processed, and a processor core coupled to the interrupt controller for processing the interrupt selected by the interrupt controller.
[0019] Optionally, in the processor of the present invention, the processor core is adapted to suspend processing for the interrupt being processed and start processing for the interrupt selected by the interrupt controller when the interrupt priority of the interrupt selected by the interrupt controller is higher than the interrupt priority of the interrupt being processed by the processor core.
[0020] Optionally, in the processor of the present invention, the processor core is adapted to skip processing for an interrupt selected by the interrupt controller when the interrupt priority of the interrupt selected by the interrupt controller is not higher than the interrupt priority of the interrupt being processed by the processor core.
[0021] According to yet another aspect, the present invention provides a system on a chip including a processor as described above, and an interrupt source, the interrupt source being coupled to the processor and configured to generate an interrupt to be processed by the processor.
[0022] According to yet another aspect of the present invention, there is provided an intelligent device including a system-on-chip as described above.
[0023] According to the problem solving of the present invention, the priority arbitration unit identifies the interrupts to be responded to through arbitration in the manner of iterative arbitration, thereby reducing arbitration logic resources. The main principle is that in terms of arbitration logic, only a small amount of arbitration logic is used. During each round of arbitration, the arbitration logic only performs arbitration for a part of all interrupts. The interrupts obtained through arbitration are saved as intermediate arbitration results. Then, multiple rounds of arbitration are performed until all arbitrations go through the priority arbitration unit. Finally, the result output by the priority arbitration unit becomes the final interrupt result. [Brief description of the drawings]
[0024] To accomplish the foregoing and related ends, certain illustrative aspects are described herein in combination with the following description and with reference to the accompanying drawings. These aspects can embody the principles described herein, and it is intended that all aspects and equivalents thereof fall within the scope of the protected subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description and from the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements. [Figure 1] 1 is a schematic diagram illustrating a processor 100, according to one embodiment of the present invention. [Diagram 2] 2 is a schematic diagram illustrating an interrupt controller 200, according to one embodiment of the present invention. [Diagram 3] 2 is a schematic diagram illustrating a priority arbitration unit 230, according to one embodiment of the present invention. [Figure 4] 12 is a schematic diagram illustrating a computer system 1200, according to one embodiment of the present invention. [Diagram 5] 15 is a schematic diagram illustrating a system-on-chip (SoC) 1500 in accordance with one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] Detailed Description of the Invention Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the accompanying drawings illustrate exemplary embodiments of the present disclosure, it should be understood that the present disclosure can be implemented in various forms and should not be limited to the embodiments described herein. Instead, these embodiments are provided so that the present disclosure may be better understood and the scope of the present disclosure may be fully conveyed to those skilled in the art.
[0026] FIG 1 illustrates a schematic diagram of a processor 100, according to one embodiment of the present invention. As illustrated in FIG 1, a processing system 190 includes the processor 100 and various interrupt sources 210 (interrupt sources 210 are, for example, external I / O devices and timers) coupled to the processor 100. The interrupt sources 210 generate various types of interrupts that are processed by the processor 100. The processor 100 includes a processor core 150 and an interrupt controller 200. The processor core 150 is coupled to the interrupt controller 200 and processes interrupts selected by the interrupt controller 200.
[0027] The processor core 150 further includes an instruction processing device 110 and a processor resource 120. The instruction processing device 110 is a component of instruction processing in the processor 200, which performs processing including fetching instruction codes for decoding, and then executing various instructions obtained after decoding. The instruction processing device 110 responds to concurrent interrupts, modifies the procedure flow for instruction execution in the processor 100, and executes corresponding interrupt handling routines. It should be noted that the instruction processing device 110 is a logic part related to the function of the processor 100. All instruction-related parts in the processor 100 can be classified as part of the instruction processing device 110 without exceeding the protection scope of the present invention.
[0028] According to one embodiment, the instruction processing device 110 includes an instruction fetch unit 112, an instruction decode unit 114, and an instruction execution unit 116. The instruction fetch unit 112 obtains an instruction code to be executed from an instruction storage area 130 and sends the obtained instruction code to the instruction decode unit 112.
[0029] An instruction code typically indicates an operation code and an address code, where the operation code indicates the operation to be performed and the address code indicates the address or contents of the object of the operation when the operation code is executed. The instruction decode unit 114 decodes and analyzes the instruction code to determine the operation code of the instruction and further determines the nature and method of the operation.
[0030] Then, the instruction decode unit 114 sends the decoded instruction to the instruction execution unit 116. The instruction is executed by the instruction execution unit 116. According to an embodiment of the present invention, the instruction execution unit 116 includes various execution units used to execute specific instructions. The specific form of the instruction execution unit that executes the specific instruction is not limited in the present invention. All instruction execution units 116 that are capable of executing instructions are within the protection scope of the present invention.
[0031] When executing an instruction, the instruction execution unit 116 accesses processor resources 120, such as various registers and data storage areas 140, to, for example, obtain data from the registers and data storage areas 140 and write execution results to the registers or data storage spaces.
[0032] The processor core 150 further includes an interrupt processing module 152. During the instruction processing by the instruction processing device 110, the interrupt processing module 152 changes the procedure executed by the processor through the instruction processing unit 110 to handle the external interrupt, so as to execute an interrupt service routine in response to the external interrupt that should be processed.
[0033] According to one embodiment, when handling an interrupt, the processor core 150 first saves the current processor status and processor execution site (the processor's program counter (PC)), obtains the registration address of the interrupt service routine based on the interrupt information about the interrupt to be responded to, and jumps to this address to start the interrupt handling task. After completing the interrupt handling task, the processor core 150 executes an interrupt return instruction. The processor restores the previously saved processor status, returns to the previous site (saved program counter), and continues execution. The interrupt handling module 152 can implement the above interrupt response processing by using the instruction processing device 110.
[0034] The interrupt controller 200 is coupled to the processor core 150 and selects the interrupts to be processed and sends them to the processor core 150 for operation. Each interrupt has a corresponding interrupt priority. The processor 100 determines the interrupt processing order based on the interrupt priorities in the interrupt group. When multiple interrupts occur simultaneously, the interrupt with the highest priority is processed first.
[0035] When the interrupt priority of the interrupt selected by the interrupt controller 200 is higher than the interrupt priority of the interrupt being processed by the processor core 150, the processor core 150 suspends the processing of the interrupt being processed and starts the processing of the interrupt selected by the interrupt controller 200. Similarly, when the interrupt priority of the interrupt selected by the interrupt controller 200 is not higher than the interrupt priority of the interrupt being processed by the processor core 150, the processor core 150 proceeds without processing the interrupt selected by the interrupt controller 200.
[0036] According to this embodiment of the present invention, the interrupt controller 200 partitions the received interrupts to obtain multiple interrupt segments, and then selects one interrupt from each of the interrupt segments through arbitration to identify the interrupt with the highest priority. The interrupt controller 200 iteratively repeats the arbitration process multiple times, and after all interrupts have been examined, completes the arbitration and determines the interrupt with the highest priority. The instruction processing device 110 executes the interrupt service routine.
[0037] 2 illustrates a schematic diagram showing an interrupt controller 200 according to one embodiment of the present invention. The interrupt controller 200 obtains interrupts from multiple interrupt sources 210 coupled to the interrupt controller 200 and selects the interrupts to be sent to the processor core 150 for processing.
[0038] As illustrated in Fig. 2, the interrupt controller 200 includes a sampling unit 220 and a priority arbitration unit 230. The sampling unit 220 receives various interrupts from the interrupt sources 210 coupled to the interrupt controller 200. Generally, the clock of the external interrupt source 210 is asynchronous with the clock of the processor. The sampling unit 220 synchronizes the external interrupt source 210 with the clock of the processor and performs sampling to generate effective interrupt information. In addition, the interrupt source 210 has two different trigger attributes, namely, level trigger and edge trigger (or pulse trigger). The sampling unit 220 samples these two different trigger methods and integrates them into one processing method.
[0039] The priority arbitration unit 230 determines an interrupt with the highest priority from the interrupts received from the sampling unit 220, and treats the interrupt as an interrupt to be sent to the processor core 150 for response processing. The priority arbitration unit 230 first partitions the various interrupts received into a number of interrupt segments. Generally, each of the interrupt segments includes one or more sampled interrupts. According to this embodiment of the present invention, the amount of interrupts included in each partitioned interrupt segment may be a fixed amount or may be dynamically adjusted. This is not limited in this embodiment of the present invention. Then, the priority arbitration unit 230 determines, for each segment, an interrupt with the highest priority in the selected segment until an interrupt with the highest priority among all interrupts is identified through arbitration and treated as an interrupt to be responded to.
[0040] 3 illustrates a schematic diagram of a priority arbitration unit 230 according to an embodiment of the present invention. As illustrated in FIG. 3, the priority arbitration unit 230 includes a selection module 232 and an arbitration module 234.
[0041] In one embodiment, the selection module 232 is responsible for selecting, from the received interrupts, an interrupt that should be sent to the arbitration module 234 for arbitration. Specifically, the selection module 232 sequentially selects one of a plurality of interrupt segments and sends the interrupt in the selected interrupt segment to the arbitration module 233 for arbitration.
[0042] Each arbitration performed by the arbitration module 234 for an interrupt segment is called an arbitration round. In each arbitration round, the arbitration module 234 identifies an interrupt with the highest priority in the interrupt segment as an intermediate arbitration result through arbitration. According to this embodiment of the present invention, the arbitration module 234 identifies an interrupt with the highest priority as an intermediate arbitration result of a current arbitration round through arbitration by the interrupt selected by the selection module 232 and the intermediate arbitration result of a previous arbitration round. When the arbitration module 234 performs arbitration for the interrupt in the last interrupt segment selected by the selection module 232 and treats the result of the final arbitration round as the interrupt to be responded to, the arbitration module 234 completes the final arbitration round.
[0043] It should be noted that the quantity of interrupts illustrated in Figure 3 and the quantity of input / output signals for the selectors used for multi-channel selection deployed in the selection module 232 and the arbitration module 234 are merely examples. This embodiment of the invention is not limited to these quantities. The implementation of the selectors used for multi-channel selection is not limited in this embodiment of the invention.
[0044] Furthermore, the priority arbitration unit 230 identifies the interrupt with the highest priority through arbitration based on preconfigured configuration information for the interrupt, which includes one or more of the following information: interrupt priority, interrupt processing state, and interrupt permission.
[0045] Optionally, the interrupt controller 200 further includes an interrupt configuration unit 240 adapted to store configuration information of the interrupt. As illustrated in FIG. 2, the interrupt configuration unit 240 is coupled to the sampling unit 220. The interrupt configuration unit 240 stores configuration information of the interrupt (including interrupt priority, interrupt processing state, and interrupt permission). Depending on the processing status by the processor, the interrupt has multiple processing states, including an interrupt pending state and an interrupt active state. The interrupt pending state indicates that the interrupt is generated by the interrupt source 210 and received by the sampling unit 220, but is processed by the processor core 150 without being acknowledged. The interrupt active state indicates that the interrupt is not only received by the sampling unit 220, but also processed by the processor core 150, but the processing is incomplete. This includes not only the case being processed by the processor core 150, but also the execution suspension case due to nesting of interrupts that causes the processor core 150 to execute an interrupt with a higher priority.
[0046] Interrupt nesting means that the processor core 150 receives a new interrupt with a higher priority while the processor core 150 is processing an interrupt with a lower priority. In this case, the processor core 150 suspends processing of the interrupt with the lower priority, saves the site of the interrupt (including the program counter (PC)), pushes the contents of the relevant registers onto the corresponding stack, and starts executing the process corresponding to the interrupt with the higher priority. In this way, interrupt nesting occurs. When the interrupt nesting has a relatively large number of hierarchies, a relatively large amount of processor-related resources may be consumed because a relatively large amount of information about the interrupts needs to be stored.
[0047] According to one embodiment, interrupt configuration unit 240 uses registers to store configuration information for interrupts and can change the state of interrupts by changing the values at the corresponding locations for these registers.
[0048] Optionally, the interrupt configuration unit 240 further stores an enable bit for each interrupt to indicate whether the interrupt should be taken and processed. The sampling unit 220 can determine whether to take an interrupt based on the value of the enable bit for the interrupt.
[0049] According to this embodiment of the present invention, the interrupt controller 200 further includes an arbitration iteration control unit 250. As further illustrated in Fig. 2, the arbitration iteration control unit 250 is coupled to the priority arbitration unit 230 and is adapted to control the priority arbitration unit 230, thereby performing arbitration for various received interrupts and completing the arbitration after all the interrupts have been examined.
[0050] In some preferred embodiments, the arbitration iterative control unit 250 controls the priority arbitration unit 230 to perform arbitration for interrupts that satisfy a preset condition and complete arbitration after all interrupts that satisfy the preset condition have been examined, where the preset condition is that the interrupt processing state becomes pending.
[0051] An arbitration iteration control unit 250 controls the triggering of interrupt arbitration, the selection of interrupts for intermediate arbitration, and the determination of arbitration completion.
[0052] To trigger interrupt arbitration, the arbitration iterative control unit 250 controls the priority arbitration unit 230 and triggers the priority arbitration unit 230 to perform iterative arbitration when the various interrupts received include an interrupt that is in a pending state and the priority arbitration unit 230 is not performing arbitration.
[0053] For interrupt selection for intermediate arbitration, the arbitration iteration control unit 250 controls the priority arbitration unit 230 to partition various received interrupts into multiple interrupt segments in an ordered or random manner, and select one of the multiple interrupt segments through arbitration until all interrupts are examined. Assume that a total of nine interrupts are received and partitioned into three interrupt segments. The amount of interrupts in each interrupt segment can be fixed in an ordered manner. Specifically, the first three interrupts are used as one interrupt segment, the middle three interrupts are used as one interrupt segment, and the last three interrupts are used as one interrupt segment. (Certainly, the amount of interrupts in each interrupt segment can alternatively be dynamically adjusted. For example, the first four interrupts are used as one interrupt segment, the middle three interrupts are used as one interrupt segment, and the last two interrupts are used as one interrupt segment. This is not limited in this specification.) Furthermore, the interrupts can alternatively be partitioned into three interrupt segments in a random manner. The method of identifying the number of interrupts may even be used such that the first, fourth and seventh interrupts are used as one interrupt segment, the second, fifth and eighth interrupts are used as one interrupt segment, the third, sixth and ninth interrupts are used as one interrupt segment, etc. The method of dividing the interrupts into multiple interrupt segments and thus completing the interrupt investigation is not limited within the embodiments of the present invention.
[0054] In some other embodiments, arbitration iteration control unit 250 may control priority arbitration unit 230 to only examine those interrupts that are in a pending state.
[0055] To determine arbitration completion, the arbitration iteration control unit 250 controls the priority arbitration unit 230, thereby completing arbitration only if all interrupts are repeated in a repeat cycle.
[0056] To further describe the logic for iterative arbitration performed by priority arbitration unit 230, an example is presented below.
[0057] The number of interrupt sources is 1024, and the arbitration module 234 supports priority arbitration to select one from 32+1 interrupts (1 being the intermediate arbitration result). The selection module 232 is required to support 32 selectors to select one from 32 interrupts. A relatively simple logic for performing iterative arbitration can be designed as follows: Partition the 1024 interrupts into 32 interrupt segments, each of which includes 32 interrupts. Partition the 1024 interrupts into 32 interrupt segments in sequence. Select one interrupt segment in each arbitration round, i.e., repeat a total of 32 times in the iteration cycle. Then, the selection signals of the 32 selectors in the selection module 232 are the number of arbitration rounds. Each selector selects an interrupt to be repeated in the current round. After the final arbitration round, the interrupt output by the arbitration module 234 is the interrupt obtained from the final arbitration.
[0058] It should be noted that the example in which both the selection module 232 and the arbitration module 234 use a selector (i.e., a many-to-one data selector) is used herein for ease of description. This is not a limitation within this embodiment of the invention. The selection module 232 and the arbitration module 234 may use any type of device with a multi-channel selection function (such as a multiplexer) that receives multi-channel interrupt signals and selects one of the received interrupts for output.
[0059] The following can be learned from the above example. That is, when the number of received interrupts is N, the number of interrupts supported by the arbitration module 234 is M+1 (i.e., the number of input multi-channel selection signals supported by the arbitration module 234). At this time, the selection module 232 needs M selectors with multi-channel selection function. Each selector has a specification of [N / M] to 1, that is, supports the input of [N / M] interrupt signals and the output of one interrupt signal. [N / M] indicates rounding up. That is, if N / M is an integer, then [N / M]=N / M. Also, if N / M is not an integer, then [N / M]=N / M+1. In other words, the number of input multi-channel selectors supported by the selection module 232 (i.e., [N / M]) is determined by the number of received interrupts (i.e., N) and the number of input multi-channel selectors supported by the arbitration module 234 (i.e., M).
[0060] The number of input multi-channel selections (i.e., M) supported by the arbitration module 234 is determined by the number of interrupts received (i.e., N). In general, M can be any number as long as it is less than N.
[0061] As described above, the priority arbitration unit 230 can only examine interrupts in a pending state, not all interrupts, i.e., can only select any iteration in an iteration cycle. To optimize the iteration arbitration speed of the priority arbitration unit 230 and implement high-speed processing, in some further embodiments of the present invention, the priority arbitration unit 230 may further block interrupt sources that do not include interrupts before partitioning the received interrupts into multiple interrupt segments, and partition the interrupts only among the interrupt sources that include interrupts. For example, if the number of interrupt sources is 1024, but only 20 interrupts are actually received, the priority arbitration unit 230 may block the remaining interrupt sources 1004 and partition only these 20 interrupts for subsequent iteration arbitration.
[0062] According to another embodiment, the interrupt controller 200 further includes a threshold comparison unit 260 coupled to the interrupt configuration unit 240. The threshold comparison unit 260 compares the interrupt priority with a preset priority, and inputs the interrupt to the priority arbitration unit 230 for iterative arbitration when the interrupt priority is higher than the preset priority.
[0063] The preset priorities may be stored in a threshold register and may be set and modified. The specific storage form of the preset priorities is not limited in the present invention. All methods that can read and modify the preset priorities are within the scope of protection of the present invention.
[0064] Further, according to some embodiments, the interrupt configuration unit 240 sets the interrupt priority of the specific interrupt as the highest value. When the specific interrupt enters the priority arbitration unit 230, no recursive arbitration is required, and the specific interrupt is directly output as an interrupt to be acknowledged. This method implements a quick response to the specific interrupt.
[0065] Indeed, the threshold comparison unit 260 can alternatively be used to set a preset priority for a particular interrupt, so that recursive arbitration is no longer performed for a particular interrupt having a priority higher than the preset priority, and the particular interrupt is directly responded to and processed. This implements a quick response to the particular interrupt without affecting the processing for other interrupts.
[0066] The interrupt controller 200 of the present invention uses a priority arbitration unit 230, which identifies, through arbitration, interrupts that should be responded to in the manner of iterative arbitration, so as to reduce arbitration logic resources. The main principle is that in terms of arbitration logic, only a small amount of arbitration logic is used. During each round of arbitration, the arbitration logic only performs arbitration for a part of all interrupts. The interrupts obtained through arbitration are saved as intermediate arbitration results. Then, multiple rounds of arbitration are performed until all arbitrations go through the priority arbitration unit 230. Finally, the result output by the priority arbitration unit 230 becomes the final interrupt result. At the same time, the interrupt controller 200 further uses an arbitration iterative control unit 250, which controls the arbitration logic of the priority arbitration unit 230 to complete arbitration for all examined interrupts that satisfy a condition. The condition may be set based on actual requirements, such as interrupts in a pending state, so that the arbitration process becomes more efficient and flexible.
[0067] In conclusion, the interrupt controller 200 of the present invention can support arbitration for a large number of interrupt sources while using only a small amount of resources. Moreover, the interrupt controller 200 is highly scalable and can support configurations for various types of interrupt sources.
[0068] Figure 4 illustrates a schematic diagram showing a computer system 1200 according to an embodiment of the present invention. The computer system 1200 shown in Figure 4 can be applied to laptops, desktop computers, handheld PCs, personal digital assistants, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), graphic devices, video game devices, set-top boxes, microcontrollers, mobile phones, portable media players, handheld devices, and various other electronic devices. The present invention is not limited thereto, and any system including the processor and / or other execution logic disclosed in the description falls within the scope of protection of the present invention.
[0069] As shown in FIG. 4, system 1200 includes one or more processors 1210 and 1215. These processors are coupled to a controller hub 1220. In one embodiment, controller hub 1220 includes a graphics memory controller hub (GMCH) 1290 and an input / output hub (IOH) 1250 (which may be located on separate chips). GMCH 1290 includes a memory controller and a graphics controller coupled to memory 1240 and coprocessor 1245. IOH 1250 couples input / output (i / O) devices 1260 to GMCH 1290. Alternatively, the memory controller and graphics controller are integrated within the processor, such that memory 1240 and coprocessor 1245 are directly coupled to processor 1210. In this case, controller hub 1220 includes only IOH 1250.
[0070] Optional features for additional processor 1215 are indicated by dashed lines in Figure 4. Each of processors 1210 or 1215 may include one or more of the processor cores described herein and may be a particular version of processor 100 illustrated in Figure 1.
[0071] Memory 1240 may be, for example, dynamic random access memory (DRAM), phase change memory (PCM), or a combination thereof. In at least one embodiment, controller hub 1220 communicates with processors 1210 and 1215 through a multi-drop bus such as a front side bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or similar connection 1295.
[0072] In one embodiment, coprocessor 1245 is a special purpose processor, such as a high throughput MIC processor, a network or communication processor, a compression engine, a graphics processing unit, a general purpose graphics processing unit (GPGPU), or an embedded processor. In one embodiment, controller hub 1220 may be an integrated graphics accelerator.
[0073] In one embodiment, the processor 1210 executes instructions that control general types of data processing operations. Embodied among these instructions may be coprocessor instructions. The processor 1210 identifies these coprocessor instructions, for example, of a type that requires execution by an attached coprocessor 1245. The processor 1210 then issues these coprocessor instructions (or control signals representing the coprocessor instructions) to the coprocessor 1245 across a coprocessor bus or other interconnect.
[0074] FIG. 5 illustrates a schematic diagram showing a system-on-chip (SoC) 1500 according to one embodiment of the present invention. As shown in FIG. 5, the interconnection unit 1502 is coupled to an application processor 1510 (e.g., the processor 100 illustrated in FIG. 1, which is not shown in FIG. 5), a system agent unit 1110, a bus controller unit 1116, an integrated memory controller unit 1114, one or more coprocessors 1520, a static random access memory (SRAM) unit 1530, a direct memory access (DRM) unit 1532, and a display unit 1540 for connection to one or more external displays. The application processor 1510 may further include a combination of one or more cores 1102A-N, and a shared cache unit 1106. The coprocessor 1520 includes integrated graphics logic, an image processor, an audio processor, and a video processor. In one embodiment, the coprocessor 1520 includes a special purpose processor, such as a network or communication processor, a compression engine, a GPGPU, a high-throughput MIC processor, or an embedded processor.
[0075] The above-mentioned system-on-chip may be included inside an intelligent device to implement response functions in the intelligent device, including but not limited to running related control programs, data analysis, calculation and processing, network communication, peripheral device control of the intelligent device, etc.
[0076] Such intelligent devices include dedicated intelligent devices such as mobile terminals and personal digital assistants that include one or more system-on-chips according to the present invention to perform data processing or control the peripherals of the device.
[0077] Such intelligent devices also include dedicated devices designed for specific functions, such as smart speakers and smart display devices, which include a system-on-chip according to the present invention to control the speaker or display device to provide the speaker or display device with additional functionality, such as communication, recognition, data processing, etc.
[0078] Such intelligent devices also include various IoT and AIoT devices, which include the system-on-chip according to the present invention to perform data processing, e.g., AI calculations, or data communication and transmission, thereby implementing denser and more intelligent device distribution.
[0079] Such intelligent devices may be used in vehicles and may be implemented as on-board equipment or assembled within the vehicle, for example to provide data processing to enable intelligent operation of the vehicle.
[0080] Such intelligent devices may be used in the home and entertainment fields and may be implemented as, for example, smart speakers, smart air conditioners, smart refrigerators, smart display devices, etc. These devices include the system-on-chip according to the present invention, which makes the home and entertainment devices intelligent and performs data calculation and peripheral device control.
[0081] Furthermore, such intelligent devices may be used in the industrial field and may be implemented as, for example, industrial control devices, sensing devices, IoT devices, AIoT devices, brake devices, etc. These devices include the system-on-chip according to the present invention, thereby making the industrial equipment intelligent and performing data calculations and peripheral device control.
[0082] The above description of the intelligent device is merely an example, and the intelligent device of the present invention is not limited to the description. Any intelligent device that can perform data processing by using the system-on-chip of the present invention falls within the protection scope of the present invention.
[0083] It should be understood that in the above description of exemplary embodiments of the invention, various features of the invention may be grouped together in a single embodiment, diagram, or description thereof to simplify the disclosure and aid in understanding one or more aspects of the invention. The disclosed method, however, should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Instead, as the following claims reflect, inventive aspects lie in fewer than all features of a single embodiment disclosed above. Thus, the claims following the detailed description are hereby expressly incorporated into this disclosed description, with each claim standing on its own as a separate embodiment of the invention.
[0084] Those skilled in the art should understand that the modules, units, or components of the devices in the examples disclosed herein may be arranged in the device described in the embodiment, or may alternatively be provided in one or more devices different from the device in the example. The modules described in the above examples may be integrated into a single module or may be divided into multiple sub-modules.
[0085] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and provided in one or more devices different from the devices in the embodiments. The modules, units, or components in the embodiments can be integrated into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. All features disclosed in the description (including the accompanying claims, aspects, and drawings), and all processes or units of any method or device disclosed similarly, can be combined in any manner, except that at least some features and / or processes or units are mutually exclusive. Unless otherwise specified, each feature disclosed in the description (including the accompanying claims, aspects, and drawings) can be replaced with an alternative feature serving the same, equivalent, or similar purpose.
[0086] Furthermore, those skilled in the art will understand that some embodiments described herein include some but not all features that are included in other embodiments, and that combinations of features in different embodiments are meant to form different embodiments within the scope of the invention. For example, in the following claims, any one of the claimed embodiments may be used in any combination.
[0087] Furthermore, some embodiments are described herein as combinations of methods or elements of methods that may be implemented by a processor of a computer system or other device that performs that function. Thus, a processor with the necessary instructions to implement a method or element of a method forms a device for implementing the method or element of a method. Furthermore, elements described in device embodiments are examples of devices for implementing the functions performed by the elements for purposes of implementing the invention.
[0088] As used herein, unless otherwise specified, the use of ordinal numbers such as "first," "second," "third," etc. to describe a general object merely represents different entities that contain similar objects, and is not intended to imply that the objects so described must have a certain order in time, space, sorting, or in any other respect.
[0089] Although the present invention has been described with respect to a limited number of embodiments, those skilled in the art, having the benefit of the above description, can appreciate that other embodiments may be conceived within the scope of the invention described thereby. It should further be noted that the language used in the specification has been selected primarily for readability and instructional purposes, rather than for interpretation or definition of the subject matter of the invention. Thus, many modifications and variations that may be made without departing from the scope and spirit of the appended claims will be apparent to those of ordinary skill in the art. With respect to the scope of the invention, the disclosure of the invention is intended to be illustrative rather than restrictive, and the scope of the invention must be defined by the appended claims.
Claims
1. a sampling unit adapted to sample interrupts received from various interrupt sources to generate sampled interrupts; A priority arbitration unit, dividing the sampled interrupts into a plurality of interrupt segments; determining, for each interrupt segment, an interrupt having a highest priority from among the sampled interrupt or interrupts of said interrupt segment; identifying an interrupt having a highest priority from among said one or more interrupt segments designated for an interrupt to be responded to; a priority arbitration unit adapted to an arbitration iteration control unit adapted to control the priority arbitration unit to perform arbitration for the interrupts and to complete the arbitration after all the interrupts have been examined; the arbitration iteration control unit is further adapted to control the priority arbitration unit to perform arbitration for interrupts that satisfy a preset condition, and to complete the arbitration after all the interrupts that satisfy the preset condition have been examined.
2. The priority arbitration unit: a selection module adapted to sequentially select one of the plurality of interrupt segments and transmit an interrupt in the selected interrupt segment to an arbitration module; the arbitration module adapted to identify the interrupt having the highest priority as an intermediate arbitration result of a current arbitration round through arbitration based on the interrupt selected by the selection module and an intermediate arbitration result of a previous arbitration round; Equipped with The arbitration module performs arbitration on the interrupts in the final interrupt segment selected by the selection module and completes a final round of arbitration when the arbitration module treats a result of the final round of arbitration as the interrupt to be responded to.
2. The interrupt controller of claim 1 .
3. an interrupt configuration unit coupled to the sampling unit and adapted to store configuration information of the interrupts, the configuration information including one or more of an interrupt priority, an interrupt processing state, and an interrupt enablement; 3. The interrupt controller of claim 2, further comprising:
4. 4. The interrupt controller of claim 3, wherein the preset condition is an interrupt processing state being pending.
5. 5. The interrupt controller of claim 4, wherein the arbitration iterative control unit is further adapted to trigger the priority arbitration unit to perform iterative arbitration if the interrupt includes an interrupt in the pending state and the priority arbitration unit is not currently performing arbitration.
6. a quantity of input multi-channel selections supported by the selection module is determined by a quantity of received interrupts and a quantity of input multi-channel selections supported by the arbitration module; The number of input multi-channel selections supported by the arbitration module is determined by the number of received interrupts.
6. An interrupt controller as claimed in claim 5.
7. 7. The interrupt controller of claim 6, wherein the priority arbitration unit is further adapted to divide the received interrupts into the plurality of interrupt segments in an ordered or random manner and to select one of the plurality of interrupt segments for arbitration.
8. 8. The interrupt controller of claim 7, wherein the priority arbitration unit is further adapted to, before dividing the received interrupt into the plurality of interrupt segments, block interrupt sources that do not include an interrupt and divide interrupts among interrupt sources that include an interrupt.
9. a threshold comparison unit coupled to the interrupt configuration unit and adapted to compare the interrupt priority and a preset priority and input the interrupt to the priority arbitration unit if the interrupt priority is higher than the preset priority; 4. The interrupt controller of claim 3, further comprising:
10. 10. An interrupt controller as claimed in any one of claims 1 to 9, adapted to sample the interrupts from the various interrupt sources coupled to the interrupt controller and to select an interrupt to be processed; a processor core coupled to the interrupt controller for processing the interrupt selected by the interrupt controller; A processor comprising:
11. When the interrupt priority of the interrupt selected by the interrupt controller is higher than the interrupt priority of an interrupt being processed in the processor core, the processor core is adapted to suspend processing for the interrupt being processed and start processing for the interrupt selected by the interrupt controller. The processor of claim 10 .
12. 12. The processor of claim 10 or 11, characterized in that if the interrupt priority of the interrupt selected by the interrupt controller is not higher than the interrupt priority of the interrupt being processed in the processor core, the processor core is adapted to skip processing for the interrupt selected by the interrupt controller.
13. A processor according to any one of claims 10 to 12; the various interrupt sources coupled to the processor and generating interrupts to be processed by the processor; A system on a chip comprising:
14. An intelligent device comprising a system on a chip according to claim 13.
Citation Information
Patent Citations
Interruption controller and time-division interruption generation method
JP2012181790A
Synchronization of interrupt handling to reduce power consumption
JP2017509059A