US11182318B2ActiveUtilityA1

Processor and interrupt controller

43
Assignee: ALIBABA GROUP HOLDING LTDPriority: Mar 27, 2019Filed: Mar 24, 2020Granted: Nov 23, 2021
Est. expiryMar 27, 2039(~12.7 yrs left)· nominal 20-yr term from priority
G06F 9/4818G06F 13/4031G06F 9/30101G06F 13/26G06F 9/485
43
PatentIndex Score
0
Cited by
16
References
13
Claims

Abstract

Embodiments of the present disclosure provide an interrupt controller in a processor, comprising: an interrupt sampling circuitry configured to receive one or more interrupts from one or more interrupt sources that are communicatively coupled to the interrupt controller; and an arbitration circuitry configured to select a to-be-responded interrupt from the received one or more interrupts, the arbitration circuitry comprising: a selection circuitry configured to select from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts; and a threshold comparison circuitry communicatively coupled to the selection circuitry, the threshold comparison circuitry configured to compare the priority of the highest-priority interrupt with a preset priority threshold, wherein the arbitration circuitry is configured to select the highest-priority interrupt as the to-be-responded interrupt in response to the threshold comparison circuitry determining that the priority of the highest-priority interrupt is higher than the preset priority threshold.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. An interrupt controller in a processor, comprising:
 an interrupt sampling circuitry configured to receive one or more interrupts from one or more interrupt sources that are communicatively coupled to the interrupt controller; 
 an arbitration circuitry configured to select a to-be-responded interrupt from the received one or more interrupts, the arbitration circuitry comprising:
 a selection circuitry configured to select from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts, 
 a threshold setting circuitry configured to:
 set the preset priority threshold, and 
 store, in response to setting the preset priority threshold, a priority indicator in a priority indicator register, 
 
 a threshold comparison circuitry communicatively coupled to the selection circuitry, the threshold comparison circuitry configured to:
 determine that processing on a current interrupt is completed in response to the processor executing an interrupt return instruction, and 
 compare the priority of the highest-priority interrupt with the preset priority threshold, and 
 
 a threshold clearing circuitry configured to:
 determine that a current priority indicator matches the stored priority indicator, and 
 clear, in response to the determination that the processing of the current interrupt is completed and the determination that the current priority indicator matches the stored priority indicator, the preset priority threshold; 
 
 wherein the current priority indicator comprises a current interrupt vector and the stored priority indicator comprises a stored interrupt vector or the current priority indicator comprises a current interrupt vector priority and the stored priority indicator comprises a stored interrupt vector priority; and 
 wherein the arbitration circuitry is configured to select the highest-priority interrupt as the to-be-responded interrupt in response to the comparison between the priority of the highest-priority interrupt and the preset priority threshold. 
 
 
     
     
       2. The interrupt controller of  claim 1 , wherein the threshold clearing circuitry is further configured to clear the preset priority threshold in response to a determination that there is no interrupt nesting. 
     
     
       3. The interrupt controller of  claim 1 , wherein the threshold setting circuitry is further configured to set an interrupt priority of one of the interrupts being currently processed as the preset priority threshold. 
     
     
       4. The interrupt controller of  claim 1 , wherein the threshold clearing circuitry is further configured to clear the priority threshold by setting the priority threshold as a lowest interrupt priority. 
     
     
       5. The interrupt controller of  1 , further comprising:
 an interrupt configuring circuitry configured to store interrupt priorities and interrupt processing states of the one or more interrupts, wherein:
 the threshold clearing circuitry is further configured to determine, according to the interrupt priorities of the one or more interrupts stored in the interrupt configuring circuitry, whether there is interrupt nesting, and 
 the threshold setting circuitry is further configured to determine, according to the interrupt processing states of the one or more interrupts stored in the interrupt configuring circuitry, an interrupt being currently processed. 
 
 
     
     
       6. The interrupt controller of  claim 1 , wherein the arbitration circuitry further comprises:
 a priority comparison circuitry communicatively coupled to the selection circuitry, the priority comparison circuitry configured to compare the priority of the highest-priority interrupt with the priority of the current interrupt, wherein:
 the arbitration circuitry is further configured to select the highest-priority interrupt as the to-be-responded interrupt in response to: 
 the comparison between the priority of the highest-priority interrupt and the preset priority threshold; and 
 the comparison between the priority of the highest-priority interrupt and the priority of the current interrupt. 
 
 
     
     
       7. A processor, comprising:
 a processor core; and 
 an interrupt controller communicatively coupled with the processor core, the interrupt controller comprising:
 an interrupt sampling circuitry configured to receive one or more interrupts from one or more interrupt sources that are communicatively coupled to the interrupt controller; and 
 an arbitration circuitry configured to select a to-be-responded interrupt from the received one or more interrupts, the arbitration circuitry comprising:
 a selection circuitry configured to select from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts, 
 a threshold setting circuitry configured to:
 set the preset priority threshold, and 
 store, in response to setting the preset priority threshold, a priority indicator in a priority indicator register, 
 
 a threshold comparison circuitry communicatively coupled to the selection circuitry, the threshold comparison circuitry configured to:
 determine that processing on a current interrupt is completed in response to the processor executing an interrupt return instruction, and 
 compare the priority of the highest-priority interrupt with a preset priority threshold, and 
 
 
 a threshold clearing circuitry configured to:
 determine that a current priority indicator matches the stored priority indicator, and 
 clear, in response to the determination that the processing of the current interrupt is completed and the determination that the current priority indicator matches the stored priority indicator, the preset priority threshold; 
 
 wherein the current priority indicator comprises a current interrupt vector and the stored priority indicator comprises a stored interrupt vector or the current priority indicator comprises a current interrupt vector priority and the stored priority indicator comprises a stored interrupt vector priority; and 
 wherein the arbitration circuitry is configured to select the highest-priority interrupt as the to-be-responded interrupt in response to the comparison between the priority of the highest-priority interrupt and the preset priority threshold. 
 
 
     
     
       8. The processor of  claim 7 , wherein:
 in response to a determination that an interrupt priority of the interrupt selected by the interrupt controller is higher than an interrupt priority of the current interrupt, the processor core is configured to suspend processing of the current interrupt and start processing of the interrupt selected by the interrupt controller. 
 
     
     
       9. The processor of  claim 7 , wherein the processor core is configured to not process the interrupt selected by the interrupt controller in response to a determination that an interrupt priority of the interrupt selected by the interrupt controller is not higher than an interrupt priority of the current interrupt. 
     
     
       10. A system on chip, comprising:
 a processor, comprising:
 a processor core; and 
 an interrupt controller communicatively coupled with the processor core, the interrupt controller comprising:
 an interrupt sampling circuitry configured to receive one or more interrupts from one or more interrupt sources that are communicatively coupled to the interrupt controller; and 
 an arbitration circuitry configured to select a to-be-responded interrupt from the received one or more interrupts, the arbitration circuitry comprising:
 a selection circuitry configured to select from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts, 
 a threshold setting circuitry configured to: 
  set the preset priority threshold, and 
  store, in response to setting the preset priority threshold, a priority indicator in a priority indicator register, 
 a threshold comparison circuitry communicatively coupled to the selection circuitry, the threshold comparison circuitry configured to: 
  determine that processing on a current interrupt is completed in response to the processor executing an interrupt return instruction, and 
  compare the priority of the highest-priority interrupt with a preset priority threshold, and 
 a threshold clearing circuitry configured to: 
  determine that a current priority indicator matches the stored priority indicator, and 
  clear, in response to the determination that the processing of the current interrupt is completed and the determination that the current priority indicator matches the stored priority indicator, the preset priority threshold; 
 wherein the current priority indicator comprises a current interrupt vector and the stored priority indicator comprises a stored interrupt vector or the current priority indicator comprises a current interrupt vector priority and the stored priority indicator comprises a stored interrupt vector priority; and 
 wherein the arbitration circuitry is configured to select the highest-priority interrupt as the to-be-responded interrupt in response to the comparison between the priority of the highest-priority interrupt and the preset priority threshold, and 
 
 
 
 one or more interrupt sources communicatively coupled to the processor, the one or more interrupt sources are configured to generate interrupts to be processed by the processor. 
 
     
     
       11. A method for executing interrupts in a processor, the method comprising:
 setting a preset priority threshold; 
 receiving one or more interrupts from one or more interrupt sources; 
 selecting from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts; 
 comparing the priority of the highest-priority interrupt with the preset priority threshold; and 
 in response to the comparison between the priority of the highest-priority interrupt and the preset priority threshold, selecting the highest-priority interrupt as a to-be-responded interrupt; 
 storing, in response to setting the preset priority threshold, a priority indicator in a priority indicator register; 
 determining that processing on a current interrupt is completed in response to the processor executing an interrupt return instruction; 
 determine that a current priority indicator matches the stored priority indicator; 
 in response to a determination that the processing of the current interrupt is completed and a determination that a current priority indicator matches the stored priority indicator, clearing the priority threshold; and 
 wherein the current priority indicator comprises a current interrupt vector and the stored priority indicator comprises a stored interrupt vector or the current priority indicator comprises a current interrupt vector priority and the stored priority indicator comprises a stored interrupt vector priority. 
 
     
     
       12. The method of  claim 11 , further comprising:
 determining, according to interrupt priorities of the one or more interrupts, whether there is interrupt nesting; and 
 clearing the priority threshold in response to a determination that there is no interrupt nesting. 
 
     
     
       13. A non-transitory, computer-readable medium that stores a set of instructions that is executable by one or more processors of an apparatus to cause the apparatus to initiate an instruction execution method for executing interrupts in a processor, the method comprising:
 setting a preset priority threshold; 
 receiving one or more interrupts from one or more interrupt sources; 
 selecting from the one or more interrupts a highest-priority interrupt that has a highest priority among the one or more interrupts; 
 comparing the priority of the highest-priority interrupt with the preset priority threshold; and 
 in response to the comparison between the priority of the highest-priority interrupt and the preset priority threshold, selecting the highest-priority interrupt as a to-be-responded interrupt; 
 storing, in response to setting the preset priority threshold, a priority indicator in a priority indicator register; 
 determining that processing on a current interrupt is completed in response to the processor executing an interrupt return instruction; 
 determine that a current priority indicator matches the stored priority indicator; 
 in response to a determination that the processing of the current interrupt is completed and a determination that a current priority indicator matches the stored priority indicator, clearing the priority threshold; and 
 wherein the current priority indicator comprises a current interrupt vector and the stored priority indicator comprises a stored interrupt vector or the current priority indicator comprises a current interrupt vector priority and the stored priority indicator comprises a stored interrupt vector priority.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.