Single cycle transition pipeline processing using shadow...

Electrical computers and digital processing systems: processing – Processing control – Context preserving (e.g. – context swapping – checkpointing,...

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C709S241000, C710S260000, C712S229000, C712S244000

Reexamination Certificate

active

06243804

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to the field of computer microcontrollers and more particularly to the field of interrupt handling in a microcontroller environment.
2. Description of Background Art
Microcontrollers are microprocessors integrated with peripherals on a single integrated circuit. They are compact in size and yet retain the computational power of traditional microprocessors, allowing them to be used in a multitude of applications. For example, in a single household, microcontrollers are a part of microwave ovens, televisions, calculators, remote controls, clocks, etc. In a microwave oven, for example, the microcontroller senses the settings keyed in by the user and heats up the food for the set time interval and power level. The microcontroller keeps track of real time and produces a beep to notify the user when the heating is done. The microcontroller also displays the status of the microwave oven on a suitable display, typically an LCD or LED.
Every car has about twenty microcontrollers. In a car, they are used in the engine control modules, the antilock braking systems, the sound systems, the airbags, and automobile suspension control modules. In antilock braking systems, the microcontroller monitors the rotational speed of the tires through sensors attached to the tires. When the driver applies the brakes, the microcontroller determines whether any of the tires have locked. If any of the tires are locked, the microcontroller releases the brakes for that tire through a servo-mechanical device coupled to the brakes. Thus, the driver is able to steer the car during emergency braking situations without fear of having the tires lock and causing the car to skid or turn over.
A modem semiconductor microcontroller is basically a low-cost computer adapted to provide rapid solutions to external events after intensive computation. The microcontroller senses the happening of external events through signals received at input ports, and transmits responses to the events through its output ports. In order to provide this functionality, a typical microcontroller employs an on-chip Programmable Read Only Memory (PROM) to store its instructions, an on-chip data RAM to store the data temporarily, a Central Processing Unit (CPU) to execute the instructions stored in the PROM, an oscillator driver to generate the system clock, and other application-specific peripherals such as timers, interrupt handlers, watchdogs, analog comparators, etc.
If important events occur during the execution of the normal flow of program, the microcontroller must be able to respond quickly. In the microwave oven example, if a metal container is placed within the oven and the oven begins heating, the microcontroller must interrupt the heating before the metal container causes sparks or a fire in the oven. In the antilock braking example, applying the brakes interrupts the monitoring function of the microcontroller and forces it to immediately determine whether any of the tires have locked. As can be seen, an important design criterion for microcontrollers is the ability of the microcontroller to respond to external events as quickly as possible.
An interrupt mechanism is implemented in modern 8-bit ALU microcontrollers to provide a means for departing from the normal flow of program execution in response to an external event. In conventional systems, the interrupt logic of the microcontroller temporarily stops the normal flow of program execution and causes a separate interrupt service routine to be executed. After the interrupt has been serviced, execution continues with the next instruction in the main program that would normally have been executed following the point of interruption. In order to continue normal execution of the main program, however, certain critical data regarding the state of the microcontroller prior to servicing the interrupt routine must be known.
Conventional microcontroller interrupt handling designs use program code to save and retrieve the current state of the microcontroller to and from memory. The use of this code requires critical bandwidth to execute, slowing down interrupt response and recovery time. Additionally, this design requires the use of extra RAM registers to store the state information while the interrupt routine is being executed.
Below is an example of code currently required to initiate an interrupt service routine:
; Interrupt Service routine entry
; Interrupt entry, save context
intentry
movwfwsave
; Save the W register into WSAVE
movf status, 0
; Save the STATUS register into W
movwfstatussave
; Move from W into STATUSSAVE
; (Z flag was affected, but after STATUS read)
movf fsr, 0
; Save the FSR register into W
movwffsrsave
; Move from W into FSRSAVE
(MAIN CODE)
; Main interrupt code which affects W, STATUS,
; and FSR
; Get ready to exit Interrupt Service routine,
; restore context
movf fsrsave, 0
; Move FSRSAVE into W
movwffsr
; Restore FSR from W
movf statussave, 0
; Move STATUSSAVE into W
movwfstatus
; Restore STATUS from W
swapf wsave, 1
; Swap WSAVE so that it can be un-swapped
swapf wsave, 0
; Move data back into W without affecting
; STATUS's Z flag
reti
; return from interrupt (program counter is restored)
Executing the above code may take thirty to forty clock cycles, making conventional microcontrollers ineffective when external events require immediate responses. Thus, there is needed a system and method for quickly and efficiently handling interrupts in a microcontroller environment which does not require the use of expensive memory.
SUMMARY OF THE INVENTION
The invention is a system and method for efficiently handling interrupts in a microcontroller environment. An interrupt handling circuit is disclosed for preserving a current state of a microcontroller comprising a plurality of primary registers for storing information relating to the current state of the microcontroller and a plurality of shadow registers coupled to at least two of the primary registers for storing the information contained in the coupled primary registers in response to receiving an interrupt signal. Conditional control logic is used to control the transfer of data responsive to the state of the interrupt signal. The information relating to the current state of the microcontroller preferably includes the program counter, accumulator data, CPU status data, and an address pointer to a portion of data memory. The critical information is stored and retrieved quickly, each operation occurring within a single clock cycle. As the interrupt service routine no longer needs to save and retrieve the critical data to and from memory, as in conventional systems, the interrupt service routine is able to immediately execute event-handling instructions and is able to more quickly return control to the main program. Thus, the microcontroller's response time to external events is greatly shortened. In a further embodiment, a second set of shadow registers is employed to allow multiple copies of the critical data to be stored, for example, in response to an interrupt generated from debugging circuitry while the main program has already been interrupted.


REFERENCES:
patent: 5327566 (1994-07-01), Forsyth
patent: 5386563 (1995-01-01), Thomas
patent: 5530873 (1996-06-01), Takano
patent: 5615375 (1997-03-01), Ibusuki et al.
patent: 5642516 (1997-06-01), Hedayat et al.
patent: 5812868 (1998-09-01), Moyer et al.
patent: 5987258 (1999-11-01), Daniel et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Single cycle transition pipeline processing using shadow... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Single cycle transition pipeline processing using shadow..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Single cycle transition pipeline processing using shadow... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2514812

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.