US20030023799A1 - Interrupt processing apparatus - Google Patents
Interrupt processing apparatus Download PDFInfo
- Publication number
- US20030023799A1 US20030023799A1 US09/960,933 US96093301A US2003023799A1 US 20030023799 A1 US20030023799 A1 US 20030023799A1 US 96093301 A US96093301 A US 96093301A US 2003023799 A1 US2003023799 A1 US 2003023799A1
- Authority
- US
- United States
- Prior art keywords
- interrupt
- signal
- sources
- unit
- interrupts
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/24—Handling requests for interconnection or transfer for access to input/output bus using interrupt
Definitions
- the present invention relates in general to an interrupt processing apparatus, and more particularly to an apparatus for processing interrupts from a plurality of interrupt sources more than the number of input ports of a central processing unit.
- a commercial central processing unit (CPU) is widely used to control motors for industrial robots, as well as personal computers.
- Such a central processing unit executes a corresponding interrupt service routine(or interrupt routine) in response to an interrupt request received through an input port of the CPU during an execution of a given operating program, thus responding to various unexpected situations.
- the interrupts are classified into external interrupts and internal interrupts.
- the external interrupts can be generated by requests of input/output peripheral units, or by intended discontinuity in response to the user's operation.
- the internal interrupts can be generated by a programming problem such as an execution of wrong instruction while executing a program.
- the central processing unit has input ports for receiving interrupt request signals from interrupt sources generating the external interrupts or the internal interrupts.
- the number of the input ports is 2 to 8.
- the CPU is restricted in its ability to process the interrupts from more interrupt sources, thus complicating the processing operation of programs.
- development of a new central processing unit having a large number of input ports would incur high manufacturing costs.
- the conventional central processing unit employs a wired-AND method for connecting a plurality of interrupt sources to one input port.
- FIG. 1 is a view showing a conventional interrupt processing apparatus.
- a central processing unit CPU has input ports E 1 to E 4 for being connected to interrupt sources, respectively.
- the input port E 1 is commonly connected to a plurality of interrupt sources.
- the CPU processes an interrupt corresponding to an interrupt request generated from any one of the interrupt sources commonly connected to the input port E 1 .
- the conventional interrupt processing apparatus can process interrupts from a plurality of interrupt sources, it cannot assign a priority to each interrupt to decide which interrupt has to be processed first among two or more interrupts in the case of receiving the interrupts simultaneously from two or more interrupt sources. For this reason, the conventional interrupt processing apparatus is problematic in that it cannot be commonly applied to various systems in which the number of the interrupt sources varies according to a system situation, thus limiting the design of systems having a variety of functions.
- the CPU when the CPU receives a request to process an interrupt routine B from a second interrupt source during a processing of an interrupt routine A by a request from a first interrupt source, the CPU may discontinue the interrupt routine A in execution, to execute the interrupt routine B. Alternatively, the CPU continues to execute the interrupt routine A while delaying the processing of the interrupt routine B, and later executes the interrupt routine B after the interrupt routine A is completed.
- the central processing unit is problematic in that it cannot process interrupts from two or more interrupt sources simultaneously.
- the present invention has been made in view of the above problems, and it is an object of the present invention to provide an interrupt processing apparatus for simultaneously processing interrupts from a plurality of interrupt sources.
- an interrupt processing apparatus for processing interrupts from a plurality of interrupt sources by a central processing unit having one or more input ports, comprising an interrupt controller for outputting an interrupt request signal for requesting an interrupt process from a corresponding interrupt source to a designated input port if the central processing unit assigns a priority to the corresponding interrupt source which generates the interrupt such that the apparatus processes interrupts from interrupt sources more than the number of the input ports.
- FIG. 1 is a block diagram showing the construction of a conventional interrupt processing apparatus
- FIG. 2 is a block diagram showing the construction of an interrupt processing apparatus according to the preferred embodiment of the present invention.
- FIG. 3 is a view showing an interrupt mask register and an interrupt flag register of this invention.
- FIG. 4 is a flowchart of the operation processed by an interrupt controller of this invention.
- FIG. 5 is a flowchart of the operation processed by a central processing unit of this invention.
- FIG. 2 is a block diagram showing the construction of an interrupt processing apparatus according to the preferred embodiment of the present invention.
- the interrupt processing apparatus of this invention comprises an interrupt generating unit 10 , a central processing unit(CPU) 30 , and an interrupt controller 20 .
- the interrupt generating unit 10 has a plurality of interrupt sources 1 to n.
- the central processing unit 30 has a plurality of input ports E 1 to E 4 for receiving interrupt request signals.
- the interrupt controller 20 is connected between the interrupt generating unit 10 and the central processing unit 30 .
- the interrupt sources 1 to n of the interrupt generating unit 10 each output an interrupt generating signal to the interrupt controller 20 when it is desired to perform an interrupt.
- the interrupt controller 20 includes a plurality of detection units A 1 to A 4 , and a plurality of signal generating units C 1 to C 4 .
- the detection units A 1 to A 4 each receive an interrupt generating signal from the interrupt sources 1 to n, and output a detection signal if the priority is assigned to each interrupt source.
- the signal generating units C 1 to C 4 each output an interrupt request signal to a corresponding input port of the CPU 30 according to each detection signal from the detection units A 1 to A 4 .
- Each output port of the detection units A 1 to A 4 is commonly connected to all input terminals of the signal generating units C 1 to C 4 . Further, the detection units A 1 to A 4 each output a detection signal to a corresponding signal generating unit determined according to a selection control signal a 1 from the CPU 30 .
- the signal generating units C 1 to C 4 are connected to the input ports E 1 to E 4 of the CPU 30 , respectively, such that the units C 1 to C 4 each output an interrupt request signal to a corresponding input port of the CPU 30 .
- the detection units A 1 to A 4 include a plurality of storage units B 1 to B 4 .
- FIG. 3 is a view showing an interrupt flag register and an interrupt mask register of this invention.
- the storage units B 1 to B 4 each include an interrupt flag register(IFR) and an interrupt mask register(IMR) corresponding to the interrupt sources.
- the IFR sets a predetermined bit according to the interrupts generated from the interrupt sources 1 to n.
- the IMR sets a predetermined bit according to whether or not the priority is assigned to each interrupt source. For example, a bit ra 1 of the IFR is set to logic “1” when the interrupt is generated from the interrupt source 1 . On the other hand, the bit rb 1 of the IMR is set to logic “1” when the priority is assigned to the interrupt source 1 .
- the CPU 30 previously outputs an assigning control signal b 1 for assigning priorities to the plurality of the interrupt sources 1 to n to the detection units A 1 to A 4 .
- each IMR of the storage units B 1 to B 4 sets the predetermined bit to logic “1” if the priority is assigned to each interrupt source in response to the assigning control signal b 1 , while clearing the predetermined bit to logic “0” if the priority is not assigned.
- the CPU 30 can set or clear the predetermined bit of each IMR of the storage units B 1 to B 4 , for example to logic “1” or logic “0”, with respect to an interrupt from the same interrupt source.
- the CPU 30 assigns a priority to an IMR of the storage unit B 1 with respect to the interrupt source 1 , thus setting the predetermined bit to logic “1”, while not assigning any priority to the IMRs of the remaining storage units B 2 , B 3 and B 4 , thus clearing the predetermined bits to logic “0”.
- the CPU 30 simultaneously assigns priorities to IMRs of the storage units B 1 and B 2 with respect to interrupt source 2 , thus setting the predetermined bits of the IMRs of the units B 1 and B 2 to logic “1”, while not assigning any priority to the IMRs of the remaining storage units B 3 and B 4 , thus clearing the predetermined bits thereof to logic “0”.
- Each of the detection units A 1 to A 4 ANDs each bit of the IFR and the IMR, and if the AND results are all “0”, there are no interrupts, and then the detection units A 1 to A 4 do not output any detection signal.
- a corresponding detection unit outputs a detection signal to an associated signal generating unit. For example, providing that the priority is assigned to the interrupt source 2 , and the bit rb 2 of the IMR of the storage unit B 1 is set to “1”, then a detection signal of the detection unit A 1 is outputted in response to the selection control signal a 1 , if the predetermined bit ra 2 of the IFR is set to “1” due to the interrupt from the interrupt source 2 , the AND result of two bits ra of IFR and rb of IMR corresponding to the interrupt source 2 is logic “1”.
- the storage unit A 1 outputs a detection signal to the signal generating unit C 1 determined according to the selection control signal a 1 .
- the signal generating unit C 1 applies the interrupt request signal to the input port E 1 corresponding to the signal generating unit C 1 .
- the CPU 30 discontinues an operation program in current execution, and executes an interrupt routine from the interrupt source 2 .
- the CPU 30 outputs a clear control signal ta for clearing the predetermined bit ra 2 of the IFR.
- the interrupt flag register IFR clears the bit ra 2 to “0” in response to the clear control signal ta.
- the interrupt processing apparatus of this invention can simultaneously process interrupts from two or more interrupt sources.
- an operation of processing the interrupts from the interrupt sources 1 and 2 is described.
- a priority is previously assigned to the storage unit B 1 corresponding to the interrupt source 1
- a priority is assigned to the storage unit B 2 corresponding to the interrupt source 2 .
- the bit rb 1 of the IMR of the storage unit B 1 is set to “1”
- the bit rb 2 of the IMR of the storage unit B 2 is set to “1”.
- the bit ra 1 of the IFR of the storage unit B 1 is set to “1”, and AND result of the ra 1 and rb 1 is “1”.
- the signal generating unit C 1 applies the interrupt request signal to the input port E 1 of the CPU 30 in response to the detection signal from the detection unit A 1 . Accordingly, the CPU 30 executes the interrupt routine A corresponding to the interrupt source 1 in response to the interrupt request signal.
- the bit ra 2 of the IFR of the storage unit B 2 is set to “1”, and the AND result of the bits ra 2 and the rb 2 is “1”, such that the interrupt request signal is applied to the CPU 30 not through the input port E 1 , but through one of other input ports.
- the CPU 30 can execute the interrupt routine B corresponding to the interrupt source 2 at the same time it executes the interrupt routine A.
- the CPU 30 can process an internal interrupt that is internally generated. First, in state of compulsorily setting the predetermined bit of the IMR to “1”, if the predetermined bit of the IFR is compulsorily set to “1” when the internal interrupt is generated, the interrupt request signal is applied to a predetermined input port of the CPU 30 , thus allowing the CPU 30 to execute an internal interrupt routine corresponding to the internal interrupt.
- FIG. 4 is a flowchart of the operation processed by the interrupt controller 20 of this invention
- FIG. 5 is a flowchart of the operation processed by the CPU 30 .
- each interrupt source of the interrupt generating unit 10 outputs an interrupt generating signal to each of the detection units A 1 to A 4 if it is required to process an interrupt at step S 10 .
- Each of the detection units A 1 to A 4 sets the predetermined bit of the IFR of the storage units B 1 to B 4 to “1” according to a generated interrupt at step S 20 .
- the CPU 30 When the internal interrupt is generated, the CPU 30 outputs a request signal for requesting the internal interrupt to the detection units A 1 to A 4 at step S 30 , and the predetermined bit of the IFRs of the storage units B 1 to B 4 is set to “1” at step S 40 .
- the predetermined bits of the IFR and IMR are ANDed at step S 50 , wherein the IMR is preset by the CPU 30 , corresponding to the external interrupts from the plurality of interrupt sources, or compulsory internal interrupts.
- the detection units A 1 to A 4 determine whether or not all the AND results are “0” at step S 60 . If all the AND results are “0”, the detection units A 1 to A 4 recognize that either the external interrupts or the internal interrupts are not generated, and returns to the initial processing steps, without outputting any detection signal.
- the detection units A 1 to A 4 output the detection signal to corresponding signal generating units C 1 to C 4 , and the signal generating units C 1 to C 4 apply the interrupt request signal in response to the detection signal to the corresponding input ports E 1 to E 4 at step S 70 .
- the CPU 30 receives the interrupt request signal from the interrupt controller 20 through the input ports E 1 to E 4 at step S 100 .
- the CPU 30 determines whether or not the interrupt request signal is an internal interrupt request signal due to an internal interrupt at step S 110 . If the interrupt request signal is an internal interrupt request signal, the CPU 30 discontinues the operation program in current execution, and executes the internal interrupt routine at step S 120 .
- the CPU 30 determines whether or not the interrupt request signal is an external interrupt request signal from the external interrupt sources 1 to n at steps S 130 , S 150 , and S 170 . If the interrupt request signal is an external interrupt request signal from a corresponding interrupt source, the CPU 30 discontinues the operation program in current execution, and executes the external interrupt routine at steps S 140 , S 160 , and S 180 . When completing its execution, the CPU 30 outputs a clear control signal for clearing the predetermined bit of the IFR to each detection unit A 1 to A 4 at step S 190 , prior to returning to the initial step in order to repeat the process.
- the CPU 30 receives the interrupt request signal through other input ports, such that it can execute the recently generated interrupt routine in parallel with the interrupt routine in execution.
- the CPU 30 outputs the assigning control signal b 1 , thus enabling the CPU 30 to assign a priority to the interrupt sources, or to release the assigned priority, and so a detail description is deemed unnecessary.
- the present invention provides an interrupt processing apparatus for assigning a priority to a plurality of interrupt sources more than the number of input ports of a CPU so as to process the interrupts, thus simultaneously processing a plurality of interrupts without difficulty. Further, the present invention can be commonly adapted in a variety of systems having different numbers of interrupt sources and different functions.
Abstract
An interrupt processing apparatus is disclosed. The apparatus processes interrupts from a plurality of interrupt sources by a central processing unit having one or more input ports. The apparatus has an interrupt controller for outputting an interrupt request signal for requesting an interrupt process from a corresponding interrupt source to a designated input port if the central processing unit assigns a priority to the corresponding interrupt source which generates the interrupt such that the apparatus processes interrupts from the interrupt sources more than the number of the input ports. The interrupt controller has a detection unit and a signal generating unit for outputting the interrupt request signal to a designated input port in conjunction with an operation of the detection unit.
Description
- 1. Field of the Invention
- The present invention relates in general to an interrupt processing apparatus, and more particularly to an apparatus for processing interrupts from a plurality of interrupt sources more than the number of input ports of a central processing unit.
- 2. Description of the Prior Art
- Generally, a commercial central processing unit(CPU) is widely used to control motors for industrial robots, as well as personal computers. Such a central processing unit executes a corresponding interrupt service routine(or interrupt routine) in response to an interrupt request received through an input port of the CPU during an execution of a given operating program, thus responding to various unexpected situations.
- The interrupts are classified into external interrupts and internal interrupts. The external interrupts can be generated by requests of input/output peripheral units, or by intended discontinuity in response to the user's operation. The internal interrupts can be generated by a programming problem such as an execution of wrong instruction while executing a program.
- The central processing unit has input ports for receiving interrupt request signals from interrupt sources generating the external interrupts or the internal interrupts. Typically, the number of the input ports is 2 to 8. However, because it is impossible to increase the number of input ports previously formed to the CPU, the CPU is restricted in its ability to process the interrupts from more interrupt sources, thus complicating the processing operation of programs. Alternatively, development of a new central processing unit having a large number of input ports would incur high manufacturing costs.
- So, in order to solve such problem, the conventional central processing unit employs a wired-AND method for connecting a plurality of interrupt sources to one input port.
- FIG. 1 is a view showing a conventional interrupt processing apparatus. Referring to FIG. 1, a central processing unit CPU has input ports E1 to E4 for being connected to interrupt sources, respectively. For example, the input port E1 is commonly connected to a plurality of interrupt sources. The CPU processes an interrupt corresponding to an interrupt request generated from any one of the interrupt sources commonly connected to the input port E1.
- However, while the conventional interrupt processing apparatus can process interrupts from a plurality of interrupt sources, it cannot assign a priority to each interrupt to decide which interrupt has to be processed first among two or more interrupts in the case of receiving the interrupts simultaneously from two or more interrupt sources. For this reason, the conventional interrupt processing apparatus is problematic in that it cannot be commonly applied to various systems in which the number of the interrupt sources varies according to a system situation, thus limiting the design of systems having a variety of functions.
- Further, in the conventional interrupt processing apparatus, when the CPU receives a request to process an interrupt routine B from a second interrupt source during a processing of an interrupt routine A by a request from a first interrupt source, the CPU may discontinue the interrupt routine A in execution, to execute the interrupt routine B. Alternatively, the CPU continues to execute the interrupt routine A while delaying the processing of the interrupt routine B, and later executes the interrupt routine B after the interrupt routine A is completed. As described above, in the conventional interrupt processing apparatus, the central processing unit is problematic in that it cannot process interrupts from two or more interrupt sources simultaneously.
- Therefore, the present invention has been made in view of the above problems, and it is an object of the present invention to provide an interrupt processing apparatus for simultaneously processing interrupts from a plurality of interrupt sources.
- It is another object of the present invention to provide an interrupt processing apparatus for assigning a priority to interrupt sources more than the number of input ports so as to process the interrupts, and for changing the assigned priority, thus enabling the apparatus to be commonly adapted in a variety of systems.
- In accordance with one aspect of the present invention, the above and other objects can be accomplished by the provision of an interrupt processing apparatus for processing interrupts from a plurality of interrupt sources by a central processing unit having one or more input ports, comprising an interrupt controller for outputting an interrupt request signal for requesting an interrupt process from a corresponding interrupt source to a designated input port if the central processing unit assigns a priority to the corresponding interrupt source which generates the interrupt such that the apparatus processes interrupts from interrupt sources more than the number of the input ports.
- The above and other objects, features and advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
- FIG. 1 is a block diagram showing the construction of a conventional interrupt processing apparatus;
- FIG. 2 is a block diagram showing the construction of an interrupt processing apparatus according to the preferred embodiment of the present invention;
- FIG. 3 is a view showing an interrupt mask register and an interrupt flag register of this invention;
- FIG. 4 is a flowchart of the operation processed by an interrupt controller of this invention; and
- FIG. 5 is a flowchart of the operation processed by a central processing unit of this invention.
- FIG. 2 is a block diagram showing the construction of an interrupt processing apparatus according to the preferred embodiment of the present invention.
- Referring to FIG. 2, the interrupt processing apparatus of this invention comprises an interrupt generating
unit 10, a central processing unit(CPU) 30, and aninterrupt controller 20. The interrupt generatingunit 10 has a plurality ofinterrupt sources 1 to n. Thecentral processing unit 30 has a plurality of input ports E1 to E4 for receiving interrupt request signals. Theinterrupt controller 20 is connected between theinterrupt generating unit 10 and thecentral processing unit 30. - The
interrupt sources 1 to n of the interrupt generatingunit 10 each output an interrupt generating signal to theinterrupt controller 20 when it is desired to perform an interrupt. - The
interrupt controller 20 includes a plurality of detection units A1 to A4, and a plurality of signal generating units C1 to C4. The detection units A1 to A4 each receive an interrupt generating signal from theinterrupt sources 1 to n, and output a detection signal if the priority is assigned to each interrupt source. The signal generating units C1 to C4 each output an interrupt request signal to a corresponding input port of theCPU 30 according to each detection signal from the detection units A1 to A4. - Each output port of the detection units A1 to A4 is commonly connected to all input terminals of the signal generating units C1 to C4. Further, the detection units A1 to A4 each output a detection signal to a corresponding signal generating unit determined according to a selection control signal a1 from the
CPU 30. The signal generating units C1 to C4 are connected to the input ports E1 to E4 of theCPU 30, respectively, such that the units C1 to C4 each output an interrupt request signal to a corresponding input port of theCPU 30. - The detection units A1 to A4 include a plurality of storage units B1 to B4.
- FIG. 3 is a view showing an interrupt flag register and an interrupt mask register of this invention. Referring to FIG. 3, the storage units B1 to B4 each include an interrupt flag register(IFR) and an interrupt mask register(IMR) corresponding to the interrupt sources. The IFR sets a predetermined bit according to the interrupts generated from the
interrupt sources 1 to n. The IMR sets a predetermined bit according to whether or not the priority is assigned to each interrupt source. For example, a bit ra1 of the IFR is set to logic “1” when the interrupt is generated from theinterrupt source 1. On the other hand, the bit rb1 of the IMR is set to logic “1” when the priority is assigned to theinterrupt source 1. - For this operation, the
CPU 30 previously outputs an assigning control signal b1 for assigning priorities to the plurality of theinterrupt sources 1 to n to the detection units A1 to A4. Thereby, each IMR of the storage units B1 to B4 sets the predetermined bit to logic “1” if the priority is assigned to each interrupt source in response to the assigning control signal b1, while clearing the predetermined bit to logic “0” if the priority is not assigned. TheCPU 30 can set or clear the predetermined bit of each IMR of the storage units B1 to B4, for example to logic “1” or logic “0”, with respect to an interrupt from the same interrupt source. For example, theCPU 30 assigns a priority to an IMR of the storage unit B1 with respect to theinterrupt source 1, thus setting the predetermined bit to logic “1”, while not assigning any priority to the IMRs of the remaining storage units B2, B3 and B4, thus clearing the predetermined bits to logic “0”. As another example, theCPU 30 simultaneously assigns priorities to IMRs of the storage units B1 and B2 with respect tointerrupt source 2, thus setting the predetermined bits of the IMRs of the units B1 and B2 to logic “1”, while not assigning any priority to the IMRs of the remaining storage units B3 and B4, thus clearing the predetermined bits thereof to logic “0”. - Each of the detection units A1 to A4 ANDs each bit of the IFR and the IMR, and if the AND results are all “0”, there are no interrupts, and then the detection units A1 to A4 do not output any detection signal.
- On the other hand, if all the AND results are not “0”, in other words, any one of the AND results is “1”, then there is an interrupt, and a corresponding detection unit outputs a detection signal to an associated signal generating unit. For example, providing that the priority is assigned to the
interrupt source 2, and the bit rb2 of the IMR of the storage unit B1 is set to “1”, then a detection signal of the detection unit A1 is outputted in response to the selection control signal a1, if the predetermined bit ra2 of the IFR is set to “1” due to the interrupt from theinterrupt source 2, the AND result of two bits ra of IFR and rb of IMR corresponding to theinterrupt source 2 is logic “1”. As a result, the storage unit A1 outputs a detection signal to the signal generating unit C1 determined according to the selection control signal a1. At this time, the signal generating unit C1 applies the interrupt request signal to the input port E1 corresponding to the signal generating unit C1. If the interrupt request signal is received through the input port E1, theCPU 30 discontinues an operation program in current execution, and executes an interrupt routine from the interruptsource 2. In this case, when completing its execution of the interrupt routine, theCPU 30 outputs a clear control signal ta for clearing the predetermined bit ra2 of the IFR. Then, the interrupt flag register IFR clears the bit ra2 to “0” in response to the clear control signal ta. - On the other hand, the interrupt processing apparatus of this invention can simultaneously process interrupts from two or more interrupt sources. As an example, an operation of processing the interrupts from the interrupt
sources source 1, and a priority is assigned to the storage unit B2 corresponding to the interruptsource 2. Thereby, the bit rb1 of the IMR of the storage unit B1 is set to “1”, and the bit rb2 of the IMR of the storage unit B2 is set to “1”. Due to the interrupt generated from the interruptsource 1, the bit ra1 of the IFR of the storage unit B1 is set to “1”, and AND result of the ra1 and rb1 is “1”. The signal generating unit C1 applies the interrupt request signal to the input port E1 of theCPU 30 in response to the detection signal from the detection unit A1. Accordingly, theCPU 30 executes the interrupt routine A corresponding to the interruptsource 1 in response to the interrupt request signal. As described above, if the interrupt is generated from the interruptsource 2 during an execution of the interrupt routine A, the bit ra2 of the IFR of the storage unit B2 is set to “1”, and the AND result of the bits ra2 and the rb2 is “1”, such that the interrupt request signal is applied to theCPU 30 not through the input port E1, but through one of other input ports. TheCPU 30 can execute the interrupt routine B corresponding to the interruptsource 2 at the same time it executes the interrupt routine A. - Further, the
CPU 30 can process an internal interrupt that is internally generated. First, in state of compulsorily setting the predetermined bit of the IMR to “1”, if the predetermined bit of the IFR is compulsorily set to “1” when the internal interrupt is generated, the interrupt request signal is applied to a predetermined input port of theCPU 30, thus allowing theCPU 30 to execute an internal interrupt routine corresponding to the internal interrupt. - Hereinafter, the interrupt processing method of this invention is described in detail, referring to drawings.
- FIG. 4 is a flowchart of the operation processed by the interrupt
controller 20 of this invention, and FIG. 5 is a flowchart of the operation processed by theCPU 30. - Referring to FIG. 4, each interrupt source of the interrupt generating
unit 10 outputs an interrupt generating signal to each of the detection units A1 to A4 if it is required to process an interrupt at step S10. Each of the detection units A1 to A4 sets the predetermined bit of the IFR of the storage units B1 to B4 to “1” according to a generated interrupt at step S20. - When the internal interrupt is generated, the
CPU 30 outputs a request signal for requesting the internal interrupt to the detection units A1 to A4 at step S30, and the predetermined bit of the IFRs of the storage units B1 to B4 is set to “1” at step S40. - After the steps S20 and S40, the predetermined bits of the IFR and IMR are ANDed at step S50, wherein the IMR is preset by the
CPU 30, corresponding to the external interrupts from the plurality of interrupt sources, or compulsory internal interrupts. - The detection units A1 to A4 determine whether or not all the AND results are “0” at step S60. If all the AND results are “0”, the detection units A1 to A4 recognize that either the external interrupts or the internal interrupts are not generated, and returns to the initial processing steps, without outputting any detection signal.
- On the other hand, if all the AND results are not “0” at step S60, the detection units A1 to A4 output the detection signal to corresponding signal generating units C1 to C4, and the signal generating units C1 to C4 apply the interrupt request signal in response to the detection signal to the corresponding input ports E1 to E4 at step S70.
- Next, if the clear control signal ta is received from the
CPU 30, the predetermined bit of the IFR, which has been set to “1”, is cleared to “0” at step S80, and then the processing step is returned to the initial step to repeat the process. - Referring to FIG. 5, the operation of processing the external interrupt and the internal interrupt while performing the operation program by the
CPU 30 is described. First, theCPU 30 receives the interrupt request signal from the interruptcontroller 20 through the input ports E1 to E4 at step S100. - Then, the
CPU 30 determines whether or not the interrupt request signal is an internal interrupt request signal due to an internal interrupt at step S110. If the interrupt request signal is an internal interrupt request signal, theCPU 30 discontinues the operation program in current execution, and executes the internal interrupt routine at step S120. - Based on the determination result at step S120, if the interrupt request signal is not an internal interrupt request signal, the
CPU 30 determines whether or not the interrupt request signal is an external interrupt request signal from the external interruptsources 1 to n at steps S130, S150, and S170. If the interrupt request signal is an external interrupt request signal from a corresponding interrupt source, theCPU 30 discontinues the operation program in current execution, and executes the external interrupt routine at steps S140, S160, and S180. When completing its execution, theCPU 30 outputs a clear control signal for clearing the predetermined bit of the IFR to each detection unit A1 to A4 at step S190, prior to returning to the initial step in order to repeat the process. - As a result of the determinations at steps S110, S130, S150 and S170, if the interrupt request signal is not an external interrupt request signal from the
external request sources 1 to n, theCPU 30 processes an error for the signal at step S200, and then the process is returned to the initial step. - Further, during an execution of the interrupt routines at step S120, S140, S160, and S180, if an external or internal interrupt is generated, the
CPU 30 receives the interrupt request signal through other input ports, such that it can execute the recently generated interrupt routine in parallel with the interrupt routine in execution. - Further, it is well known in the field that during an execution of the interrupt routine, the
CPU 30 outputs the assigning control signal b1, thus enabling theCPU 30 to assign a priority to the interrupt sources, or to release the assigned priority, and so a detail description is deemed unnecessary. - As apparent from the above description, the present invention provides an interrupt processing apparatus for assigning a priority to a plurality of interrupt sources more than the number of input ports of a CPU so as to process the interrupts, thus simultaneously processing a plurality of interrupts without difficulty. Further, the present invention can be commonly adapted in a variety of systems having different numbers of interrupt sources and different functions.
- Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims.
Claims (6)
1. An interrupt processing apparatus for processing interrupts from a plurality of interrupt sources by a central processing unit having one or more input ports, comprising:
an interrupt controller for outputting an interrupt request signal for requesting an interrupt process from a corresponding interrupt source to a designated input port if the central processing unit assigns a priority to the corresponding interrupt source which generates the interrupt such that the apparatus processes interrupts from interrupt sources more than the number of the input ports.
2. The apparatus as set forth in claim 1 , wherein the interrupt controller includes a detection unit for detecting the interrupts generated from the interrupt sources and assigning a priority to the interrupt sources, and a signal generating unit for outputting the interrupt request signal to a designated input port in conjunction with an operation of the detection unit.
3. The apparatus as set forth in claim 2 , wherein the detection unit and the signal generating unit are plural in their numbers, respectively, in order to correspond to the number of the input ports.
4. The apparatus as set forth in claim 2 , wherein the detection unit includes a storage unit having a first register for setting a predetermined bit according to whether or not an interrupt is generated from the interrupt sources, and a second register for setting a predetermined bit according to whether or not a priority is assigned to the interrupt sources.
5. The apparatus as set forth in claim 2 , wherein each output port of the detection units is commonly connected to all the signal generating units, such that each detection unit outputs a detection signal to a corresponding signal generating unit, and output ports of the signal generating units are connected to the input ports, respectively, such that the signal generating units each output the interrupt request signal to the designated input port.
6. The apparatus as set forth in claim 4 , wherein each detection unit sets the predetermined bit of the first register corresponding to the interrupt source originating the interrupt, and sets the predetermined bit of the second register corresponding to the interrupt source to be assigned the priority according to an assigning control signal from the central processing unit, and thereby outputs a detection signal if the predetermined bits of the first and second registers are set.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR2001-40422 | 2001-07-06 | ||
KR1020010040422A KR20030004763A (en) | 2001-07-06 | 2001-07-06 | Interrupt processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
US20030023799A1 true US20030023799A1 (en) | 2003-01-30 |
Family
ID=19711850
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/960,933 Abandoned US20030023799A1 (en) | 2001-07-06 | 2001-09-25 | Interrupt processing apparatus |
Country Status (3)
Country | Link |
---|---|
US (1) | US20030023799A1 (en) |
JP (1) | JP2003044293A (en) |
KR (1) | KR20030004763A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030074508A1 (en) * | 2001-10-12 | 2003-04-17 | Uhler G. Michael | Configurable prioritization of core generated interrupts |
US20050033889A1 (en) * | 2002-10-08 | 2005-02-10 | Hass David T. | Advanced processor with interrupt delivery mechanism for multi-threaded multi-CPU system on a chip |
US20060253635A1 (en) * | 2001-10-12 | 2006-11-09 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100817047B1 (en) * | 2004-02-27 | 2008-03-26 | 삼성전자주식회사 | Interrupt controller |
KR100908552B1 (en) * | 2007-10-04 | 2009-07-20 | 최용현 | Orthodontic connector |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020002648A1 (en) * | 2000-05-29 | 2002-01-03 | Yuji Kawase | Device for and method of generating interrupt signals |
US6401154B1 (en) * | 2000-05-05 | 2002-06-04 | Advanced Micro Devices, Inc. | Flexible architecture for an embedded interrupt controller |
US6430643B1 (en) * | 1999-09-02 | 2002-08-06 | International Business Machines Corporation | Method and system for assigning interrupts among multiple interrupt presentation controllers |
US20020152344A1 (en) * | 2001-04-17 | 2002-10-17 | International Business Machines Corporation | Method for processing PCI interrupt signals in a logically partitioned guest operating system |
US20020166018A1 (en) * | 2001-05-02 | 2002-11-07 | Kim Jason Seung-Min | Multiprocessor interrupt handling system and method |
US20020174282A1 (en) * | 1999-12-14 | 2002-11-21 | Fujitsu Limited | Multiprocessor system |
US20030172215A1 (en) * | 2000-12-16 | 2003-09-11 | Jorg Franke | Interrupt- controller |
US20040054832A1 (en) * | 2000-12-16 | 2004-03-18 | Joerg Franke | Interrupt-controller with prioity specification |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR940002711A (en) * | 1992-07-31 | 1994-02-19 | 정용문 | Interrupt handler and its method |
GB9509626D0 (en) * | 1995-05-12 | 1995-07-05 | Sgs Thomson Microelectronics | Processor interrupt control |
KR19990066213A (en) * | 1998-01-22 | 1999-08-16 | 윤종용 | Priority interrupt controller |
JP3097648B2 (en) * | 1998-02-04 | 2000-10-10 | 日本電気株式会社 | Information processing apparatus and information processing method |
-
2001
- 2001-07-06 KR KR1020010040422A patent/KR20030004763A/en not_active Application Discontinuation
- 2001-09-25 US US09/960,933 patent/US20030023799A1/en not_active Abandoned
- 2001-10-11 JP JP2001314456A patent/JP2003044293A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6430643B1 (en) * | 1999-09-02 | 2002-08-06 | International Business Machines Corporation | Method and system for assigning interrupts among multiple interrupt presentation controllers |
US20020174282A1 (en) * | 1999-12-14 | 2002-11-21 | Fujitsu Limited | Multiprocessor system |
US6401154B1 (en) * | 2000-05-05 | 2002-06-04 | Advanced Micro Devices, Inc. | Flexible architecture for an embedded interrupt controller |
US20020002648A1 (en) * | 2000-05-29 | 2002-01-03 | Yuji Kawase | Device for and method of generating interrupt signals |
US20030172215A1 (en) * | 2000-12-16 | 2003-09-11 | Jorg Franke | Interrupt- controller |
US20040054832A1 (en) * | 2000-12-16 | 2004-03-18 | Joerg Franke | Interrupt-controller with prioity specification |
US20020152344A1 (en) * | 2001-04-17 | 2002-10-17 | International Business Machines Corporation | Method for processing PCI interrupt signals in a logically partitioned guest operating system |
US20020166018A1 (en) * | 2001-05-02 | 2002-11-07 | Kim Jason Seung-Min | Multiprocessor interrupt handling system and method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030074508A1 (en) * | 2001-10-12 | 2003-04-17 | Uhler G. Michael | Configurable prioritization of core generated interrupts |
US20060253635A1 (en) * | 2001-10-12 | 2006-11-09 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US20070124569A1 (en) * | 2001-10-12 | 2007-05-31 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US7487339B2 (en) | 2001-10-12 | 2009-02-03 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US7487332B2 (en) | 2001-10-12 | 2009-02-03 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US20090119434A1 (en) * | 2001-10-12 | 2009-05-07 | Uhler G Michael | Method and apparatus for binding shadow registers to vectored interrupts |
US7552261B2 (en) * | 2001-10-12 | 2009-06-23 | Mips Technologies, Inc. | Configurable prioritization of core generated interrupts |
US7925864B2 (en) | 2001-10-12 | 2011-04-12 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US8181000B2 (en) | 2001-10-12 | 2012-05-15 | Mips Technologies, Inc. | Method and apparatus for binding shadow registers to vectored interrupts |
US20050033889A1 (en) * | 2002-10-08 | 2005-02-10 | Hass David T. | Advanced processor with interrupt delivery mechanism for multi-threaded multi-CPU system on a chip |
Also Published As
Publication number | Publication date |
---|---|
JP2003044293A (en) | 2003-02-14 |
KR20030004763A (en) | 2003-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20030204655A1 (en) | Prioritizing vector generation in interrupt controllers | |
JPH0454255B2 (en) | ||
US20020099893A1 (en) | System and method for the handling of system management interrupts in a multiprocessor computer system | |
US7290124B2 (en) | Data processor employing register banks with overflow protection to enhance interrupt processing and task switching | |
US6378067B1 (en) | Exception reporting architecture for SIMD-FP instructions | |
US20030023799A1 (en) | Interrupt processing apparatus | |
US6842812B1 (en) | Event handling | |
CN110083473B (en) | Improved system and method based on RISC-V architecture bus access error | |
US11327853B2 (en) | Multicore system for determining processor state abnormality based on a comparison with a separate checker processor | |
JPH04333141A (en) | Information processor | |
JPH0675819A (en) | Microprocessor | |
KR100411113B1 (en) | Method For Processoring of Multi Thread | |
JP2616542B2 (en) | Pseudo failure generation system | |
RU2101759C1 (en) | Computing unit with alternating processing of several instruction flows | |
JPH07168723A (en) | External event detecting method for computer system | |
JPH08241209A (en) | Information processor and its i/o interrupt control method | |
JPH10207718A (en) | Interruption processor and processing method | |
JPH0721111A (en) | Priority level determination system | |
JPS6010381A (en) | System for deciding input and output interruption reception processor in multi-processor system | |
JPH0319002A (en) | Internal processing method for programmable controller | |
JPH0378832A (en) | Data processor | |
JPH02202634A (en) | Setting circuit for interruption priority order of micro computer | |
JPH0381833A (en) | Arithmetic processor | |
JPS61226839A (en) | Event processing system | |
JP2008269549A (en) | Microcomputer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: SAMSUNG ELECTRONICS CO., LTD., KOREA, REPUBLIC OF Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:YOO, HO-SUN;YANG, IN SU;REEL/FRAME:012202/0600 Effective date: 20010823 |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |