Abstract: A novel method of handling interrupts generated in a system is introduced by the present invention. A processor known as Interrupt Processor is provided in the embedded system. The function of interrupt processor is to handle interrupts and execute interrupt routines. It performs code execution for,interrupts which require immediate response. The other interrupts received by the interrupt processor are arranged in a queue on the basis of their respective priorities. An interrupt signal is then sent to the main processor which processes all the signals in one go. This prevents multiple and frequent switching of the main processor and hence avoids the switching overhead. Since the main processor operates at low frequency, the system disclosed by the present invention consumes less power as compared to conventional systems.
ADVANCED INTERRUPT PROCESSOR IN EMBEDDED SYSTEMS
Field of the Invention
The present invention relates to a method of handling interrupts in embedded systems. More particularly, the present invention provides an advanced interrupt processor with efficient interrupt handling technique that reduces power consumption in an embedded system.
Background of the Invention
An "interrupt" is a signal sent by a process to a computer's Central Processing Unit (CPU) / processor, through hardware or software sources in order to signal the need of processor's cycles or other hardware resources. The CPU responds to an interrupt signal by suspending its current operations, saving the status of its work, and transtemng control to a process for handling the interrupt. Interrupt signals can come from a variety of sources. For example, every keystroke generates an interrupt signal. Interrupts can also be generated by other devices such as a printer, key board, disk drive etc. These are called hardware interrupts. Interrupts initiated by programs are called software interrupts. Interrupts can occur for many reasons, such as service requests from hardware, errors in processing, memory problems etc. They allow the CPU to deal with asynchronous events occurring in the operating system.
The processing required for responding to an interrupt is done by an interrupt handler. An interrupt handler is basically a set of instructions typically residing in the CPU at a known address. Whenever, an interrupt occurs. CPU jumps to that address and begins executing instructions stored there. At the end of the interrupt handler is an instruction that tells the CPU to jump back to what it was doing; it docs that by restoring its previously saved state. In case of' interrupt requests from more than one source, the interrupt handler prioritizes the interrupts and saves them in a queue. This is done by invoking a hierarchy of permission levels, called "interrupt priorities".
Conventional software- based interrupt handlers suffer from many drawbacks. Speed and performance of these interrupt handlers does not match the requirements of operating systems that execute interrupts at very high speed and efficiency. Moreover, since different hardware platforms have different interrupts and dissimilar interrupt priorities, software based interrupt handlers are not efficient in handling prioritized sets of interrupts from many diverse hardware platforms.
To overcome the drawbacks of conventional software- based interrupt handlers, hardware-based interrupt handlers were introduced. This type of interrupt handler minimizes software overhead to improve performance. One such hardware based interrupt handler has been described in U.S. Patent Application Number 6,499,078 Bl by Beckert et al. It discloses an interrupt handler implemented in hardware and external to a processor to handle interrupts destined for the processor. The interrupt handler is an Tridimensional prioritized interrupt array constructed as hardware register. This array receives inteirupts from different sources. The interrupt handler also has an interrupt scanning state machine that scans the prioritized interrupt array following receipt of an interrupt to extract the priority level and handling process associated with the interrupt.
The functionality described by the above mentioned patent has become an integral pail of every processor at present. However, the operation of these present day processors involves high power consumption.
When a conventional processor switches from application execution to interrupt routine, it is required to halt its current program execution, save its current context or status, service the interrupt, restore the interrupted context or status and resume execution of the interrupted program. Since the number of instructions executed for performing all these functions is very large, the processor needs to run at very high frequency for fast response. Even when a particular application does not require high operating frequency, processor is made to run at high frequency to support real time interrupt response and thus consumes more power. Moreover, since in the present day processors, interrupt responses are made to work on the principle of responding as fast as possible based on their configured priorities; this introduces extra over head related to more switching. The
switching overhead adversely impacts the performance of conventional processors each and every time any hardware interrupt occurs.
Thus there arises a need for an interrupt processor which reduces power consumption in a system.
Summary of the Invention
An object of the present invention is to provide an improved interrupt processor that reduces power consumption in an embedded system.
In order to overcome the drawbacks of the prior art and achieve the aforementioned object, the present invention provides an advanced interrupt handling mechanism, which improves the overall performance of an embedded system by reducing the switching of lhain processor. This is done by making the interrupt responses to work on the principle of responding only as fast as required by the real time events.
A novel method of handling interrupts generated in a system is introduced by the present invention. A processor known as Interrupt Processor is provided in the embedded system. The function of interrupt processor is to handle interrupts and execute interrupt routines. It perforins code execution for interrupts which require immediate response. Other interrupts received by the interrupt processor arc arranged in a queue on the basis of their respective priorities. An interrupt signal is then sent to the main processor which processes all the signals in one go. This prevents multiple and frequent switching of the main processor and hence avoids the switching overhead as seen in the systems of the prior art. Moreover, since the main processor operates at low frequency, the system disclosed by the present invention consumes less power as compared to conventional systems.
To achieve the aforesaid objects the present invention provides an interrupt handling processor in an embedded system comprising:
a timer block for keeping track of arrival time of interrupt signals;
an instruction set for execution of code of time sensitive interrupts;
a priority selection block for arranging interrupts in a queue as per their
priorities;
at least one storage device for storing vector addresses of interrupt service
routines of interrupt; and
at least one storage device for storing priorities of interrupt signals.
Further the present invention provides an embedded system utilizing an interrupt handling processor for reducing power consumption comprising:
a main processor for processing a plurality of instructions; and
an interrupt handling processor operatively coupled to said main processor for handling a plurality of interrupt signals, said interrupt handling processor comprising:
a timer block for keeping track of arrival time of interrupt signals;
an instruction set for execution of code of time sensitive interrupts;
a priority selection block for arranging interrupts in a queue as per their priorities;
at least one storage device for storing vector addresses of interrupt service routines of interrupt; and
at least one storage device for storing priorities of interrupt signals.
Further the invention provides a method for handling interrupts in an embedded system comprising the steps of:
receiving interrupt signals generated in a system;
executing code of time sensitive interrupts;
storing other interrupts in a queue in order of decreasing priority of
interrupts;
sending signal to main processor when the most critical interrupt requires
execution; and
processing all interrupts in the queue in one go.
Brief Description of the Drawings
The present invention is described with the help of accompanying drawings:
FIGURE 1 illustrates a block diagram of an interrupt handling processor according to the present invention.
FIGURE 2 illustrates a block diagram of an embedded system utilizing an interrupt handling processor according to the present invention.
Detailed Description of the Invention
The preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to the preferred embodiments. The present invention can be modified in various forms. The preferred embodiments of the present invention arc only provided to explain more clearly the present invention to the ordinarily skilled in the art of the present invention. In the accompanying drawings, like reference numerals are used to indicate like components.
Interrupt routines in embedded systems are generally divided into parts. The first part of interrupt routine is called directly from the interrupt vector table. It comprises of time critical interrupts which need immediate response. These interrupts if not executed immediately, further interrupts corresponding to same event can be lost. The other part of the interrupt routine comprises of interrupts which are scheduled by Real Time Operating
system when a signal is sent from first part of interrupt routine. These interrupts are scheduled at higher priority than application tasks but at much lower priority than other hardware interrupts.
The present invention provides a novel method of handling interrupts generated in a system. For this purpose, a processor known as Interrupt Processor is provided. This processor is small in terms of size and frequency as compared to the main processor. The function of interrupt processor is to handle interrupts and execute interrupt routines. It performs code execution for interrupts which require immediate response. It queues the other interrupts according to their priorities and sends a signal to the main processor. The priority of an interrupt is decided by its "defined time". The "defined time'" of an interrupt is the time period within which it must be responded. The interrupt processor does not send signal to the main processor as soon as an interrupt is generated. It keeps all the signals in a queue. Based on minimum defined time, al.l the signals are sent to the main processor and main processor executes all signals in one go.
FIGURE 1 shows a block diagram of Interrupt Processor as disclosed by the present invention. The Interrupt Processor (10) receives interrupt signals (11A, 11B, 11C, 11D...) from various sources of interrupts in the system. The Interrupt Processor (10) executes the code of the interrupt signals which are critical and require immediate response. This is done by execution of instructions in the instruction set (12). Since, all the interrupts have almost same kind of code; therefore the instruction set (12) is very small. Hence the processor can be implemented using a Reduced Instruction Set Computer (RISC) processor. After the execution oi' instruction set (12), the interrupt signals are received by a timer/comparator block (13) as shown in FIGURE 1. The function of this block is to keep track of elapsed time before the arrival of each interrupt signal. The interrupt signals are then sent to Priority Selection Block (14). This block executes queue management algorithm and stores the vector addresses o\ interrupt service routines of interrupt signals in a register according to their respective priorities. Block (15A) in FIGURE 1 contains vector addresses of interrupt service routines corresponding to interrupt signals received by the Interrupt Processor (10). The priorities
of received interrupt signals are stored in register (15B). The priority of a particular interrupt signal is decided by the Priority Selection Block (14) on the basis of number of factors. The most important of these factors is the "Defined Time" of an interrupt signal.
An interrupt signal generated in a system need not be responded immediately. There exists a time period associated with each interrupt signal within which that signal must be responded. This time period is known as "Defined time". Defined times of all the interrupt signals determine their respective absolute priorities. The Priority selection Block (14) arranges all the interrupt signals according to their defined times in a queue. These signals are kept in a queue and a signal (S) is sent to the main processor depending upon the minimum defined time of an interrupt signal in the queue. The signal (S) to be sent to the main processor is generated by the timer/comparator block (13).In the meantime, if another interrupt signal is generated, the Priority Selection Block (14) does not place this signal at the end of the queue. Instead, it compares the defined time of all the signals, reshuffles the queue and places the interrupt signal accordingly in the queue.
As explained above, the signals are placed in a queue based on their absolute required response time. As a result, when these signals are executed by the main processor, the — interrupt which is most critical is executed first. Also, by following this method, the Priority Selection Block (14) ensures that all the interrupt signals are responded before their respective defined times elapse.
Apart from absolute priority of an interrupt signal, dynamic priority of an interrupt signal is also considered at the time of deciding its place in the queue. Dynamic priority of an interrupt signal depends on the time of generation ol" the interrupt by hardware of the system. Consider for example, two interrupt signals X and Y. The defined time for X signal is 10 msec and that for Y signal is 15 msec. If for example, Y interrupt occurs first and X interrupt occurs 8 msec after the occurrence of Y interrupt. In this case, although the defined time for X interrupt is less than the defined time for Y interrupt, however since the remaining time. i.e. the time after which interrupt signal Y will be sent to the main processor (15msec-Smsec =7msec) is less than the defined time for X interrupt, the Priority Selection Block (14) places interrupt Y before the interrupt X in the queue.
Besides the aforementioned absolute and dynamic priorities, further priorities may be defined for some critical signals which require immediate response. Priority Selection Block (14) uses this priority information before deciding the place of an interrupt signal in a queue. As a result, the most critical of the interrupts are placed first in the queue and responded immediately.
Priorities of interrupt signals may also be defined in the form of weighted vajues. Less weighted value of an interrupt signal means that more priority is to be given to that particular interrupt. The weighted value of each interrupt signal is then multiplied with its calculated defined time. This is done by a Shift Block (16) as shown in FIGURE 1. The weighted value of interrupt signals may be in the form of binary numbers. The resultant weighted value obtained by multiplying weighted value of an interrupt with its defined time determines the place of the interrupt signal in the queue. For example, consider the above mentioned case. The defined times for X and Y signals arc 10 msec and 15 msec respectively. Now assuming that the weighted values of these signals are 10 and 20, the resultant weighted value for interrupt X is 10* 10= 100. The resultant weighted value for inteirupt Y is 7*20 = 140 where 7 msec is the time after which interrupt signal Y will be sent to the main processor. Therefore, the resultant weighted value oi"X is less than that of Y; as a result. X has higher priority than Y. The interrupt signal X is hence placed above Y.
FIGURE 2 illustrates a block diagram of an embedded system utilizing an interrupt handling processor according to the present invention. The embedded system includes a main processor (17) and an interrupt handling processor (10). The interrupt handling processor (10) is coupled to the main processor (17). When a Priority Selection Block (14) arranges all the interrupt signals according to their defined times in a queue, the signal (S) is sent to the main processor depending upon the minimum defined time of an interrupt signal in the queue. The main processor (17) processes the interrupts at one go and avoid context switching. This reduces the power consumption of the embedded system.
In the present configuration, since more than one interrupts are processed by the main processor in one go, multiple and frequent switching of the main processor is avoided. The number of times the main processor switches from application execution to interrupt routine is greatly reduced. This results in reduction of main processor operating frequency. As a result, the total operating frequency of the system in present invention, which is the sum of operating frequency of main processor and interrupt processor is much lower than the frequency of main processor in case of conventional systems. As a result of low frequency of operation, the system disclosed by the present invention consumes less power as-compared to conventional systems.
Although the disclosure of circuit and method has been described in connection with the embodiment of the present invention illustrated in the accompanying drawings, it is not limited thereto. It will be apparent to those skilled in the art that various substitutions, modifications and changes may be made thereto without departing from the scope and spirit of the disclosure.
We Claim:
1. An interrupt handling processor in an embedded system comprising:
a timer block for keeping a track of arrival time of a plurality of interrupt signals;
an instruction set for execution of code of time sensitive interrupts;
a priority selection block for arranging the plurality of interrupt signals in a queue as per priorities of the plurality of interrupt signals;
at least one storage device for storing vector addresses of interrupt service routines of the plurality of interrupt signals; and
at least one storage device for storing priorities of the plurality of interrupt signals.
2. The interrupt processor as claimed in claim 1, wherein said storage device is any storage device such as memory register or the like.
3. The interrupt processor as claimed in claim 1 further comprising a shift block for calculating weighted values of interrupt signals.
4. An embedded system utilizing an interrupt handling processor for reducing power consumption comprising:
a main processor for processing a plurality of instructions; and
an interrupt handling processor operatively coupled to said main processor for handling a plurality of interrupt signals, said interrupt handling processor comprising:
a timer block for keeping a track of arrival time of the plurality of interrupt signals;
an instruction set for execution of code of time sensitive interrupts;
a priority selection block for arranging the plurality of interrupt signals in a queue as per priorities of the plurality of interrupt signals;
at least one storage device for storing vector addresses of interrupt service routines of the plurality of interrupt signals; and
at least one storage device for storing priorities of the plurality of interrupt signals.
5. A method of handling interrupts in an embedded system comprising the steps of:
receiving interrupt signals generated in a system;
executing code of time sensitive interrupts:
storing other interrupts in a queue in order of decreasing priority of interrupts:
sending signal to main processor when the most critical interrupt requires execution: and
processing all interrupts in said queue one after the other.
6. The method as claimed in claim 5, wherein priority of an interrupt is determined
by its absolute required response time.
7. The method as claimed in claim 5, wherein priority of an intemapt is dynamic and depends on time elapsed before the occurrence of an intemapt.
8. The method as claimed in claim 5, wherein priority of an intemapt is defined in terms of weighted value, more priority being given to interrupt with less weighted value.
9. The method as claimed in claim 8. wherein said weighted value is in the form of binary numbers.
10. An interrupt handling processor in an embedded system substantially as herein described with reference to and as illustrated in the accompanying drawings.
11. An embedded system utilizing an interrupt handling processor for reducing power consumption substantially as herein described with reference to and as illustrated in the accompanying drawings.
12. A method of handling interrupts in an embedded system substantially as herein described with reference to and as illustrated in the accompanying drawings.
| # | Name | Date |
|---|---|---|
| 1 | 3547-DEL-2005-AbandonedLetter.pdf | 2018-01-23 |
| 1 | 3547-DEL-2005-Form-18-(18-12-2009).pdf | 2009-12-18 |
| 2 | 3547-DEL-2005-FER.pdf | 2017-06-13 |
| 2 | 3547-DEL-2005-Correspondence-Others-(18-12-2009).pdf | 2009-12-18 |
| 3 | 3547-del-2005-pa.pdf | 2011-08-21 |
| 3 | 3547-del-2005-abstract.pdf | 2011-08-21 |
| 4 | 3547-del-2005-form-5.pdf | 2011-08-21 |
| 4 | 3547-del-2005-claims.pdf | 2011-08-21 |
| 5 | 3547-del-2005-form-3.pdf | 2011-08-21 |
| 5 | 3547-del-2005-correspondence-others.pdf | 2011-08-21 |
| 6 | 3547-del-2005-form-2.pdf | 2011-08-21 |
| 6 | 3547-del-2005-correspondence-po.pdf | 2011-08-21 |
| 7 | 3547-del-2005-form-1.pdf | 2011-08-21 |
| 7 | 3547-del-2005-description (complete).pdf | 2011-08-21 |
| 8 | 3547-del-2005-drawings.pdf | 2011-08-21 |
| 8 | 3547-del-2005-description (provisional).pdf | 2011-08-21 |
| 9 | 3547-del-2005-drawings.pdf | 2011-08-21 |
| 9 | 3547-del-2005-description (provisional).pdf | 2011-08-21 |
| 10 | 3547-del-2005-description (complete).pdf | 2011-08-21 |
| 10 | 3547-del-2005-form-1.pdf | 2011-08-21 |
| 11 | 3547-del-2005-form-2.pdf | 2011-08-21 |
| 11 | 3547-del-2005-correspondence-po.pdf | 2011-08-21 |
| 12 | 3547-del-2005-form-3.pdf | 2011-08-21 |
| 12 | 3547-del-2005-correspondence-others.pdf | 2011-08-21 |
| 13 | 3547-del-2005-form-5.pdf | 2011-08-21 |
| 13 | 3547-del-2005-claims.pdf | 2011-08-21 |
| 14 | 3547-del-2005-pa.pdf | 2011-08-21 |
| 14 | 3547-del-2005-abstract.pdf | 2011-08-21 |
| 15 | 3547-DEL-2005-FER.pdf | 2017-06-13 |
| 15 | 3547-DEL-2005-Correspondence-Others-(18-12-2009).pdf | 2009-12-18 |
| 16 | 3547-DEL-2005-Form-18-(18-12-2009).pdf | 2009-12-18 |
| 16 | 3547-DEL-2005-AbandonedLetter.pdf | 2018-01-23 |
| 1 | search_09-06-2017.pdf |