WO2001014977A1 - Servicing of interrupts with stored and restored flags - Google Patents
Servicing of interrupts with stored and restored flags Download PDFInfo
- Publication number
- WO2001014977A1 WO2001014977A1 PCT/EP2000/007402 EP0007402W WO0114977A1 WO 2001014977 A1 WO2001014977 A1 WO 2001014977A1 EP 0007402 W EP0007402 W EP 0007402W WO 0114977 A1 WO0114977 A1 WO 0114977A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- indicator
- processor
- interrupts
- status
- status data
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
- G06F9/4831—Task transfer initiation or dispatching by interrupt, e.g. masked with variable priority
-
- 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 invention relates to the servicing of interrupts and, in particular to the servicing of interrupts in connection with nested subroutines.
- interrupt servicing subroutines In processing systems, it is common to utilize interrupt servicing subroutines to facilitate the processing of multiple demands for shared resources, e.g. memories. These subroutines typically include instructions for disabling further interrupts, until completion of the current interrupt, and then re-enabling interrupts.
- the primary purpose of this disable/enable feature is to ensure that conflicting demands for the same resources are serviced without corrupting already-existing information.
- each interrupt subroutine In some situations, the simple acts of disabling and then re-enabling interrupts in beginning and end portions, respectively, of each interrupt subroutine are inadequate to prevent the corruption of information. For example, it is sometimes desirable to permit nesting of a second subroutine within a first, each of which includes its own disable and enable interrupt instructions.
- the end of the nested second subroutine can include an enable interrupt instruction followed by a return instruction to effect return to and completion of the first subroutine.
- the other interrupt could be serviced by a third subroutine before completion of the first.
- the third subroutine could modify and inadvertently corrupt information in these shared memory locations.
- these memory locations could contain incorrect information, e.g. memory addresses which had not yet been updated by the first subroutine.
- the third subroutine could either read or store information at an incorrect address.
- a known solution to this problem is to first store pertinent data (e.g. a processor status word) relating to the status of a processor performing the nested subroutines, disable interrupts to facilitate performance of one of the subroutines, and then to read the stored data and restoring the processor to its earlier status before reenabling interrupts.
- pertinent data e.g. a processor status word
- European Patent 441054 discusses this problem generally and proposes as a solution a combination of register banks, status bits and interrupt logic for servicing interrupts. It is desirable to provide a simpler solution.
- memory is intended to be interpreted as generally as is consistent with the manner in which it is used and includes, without limitation, volatile and non-volatile devices of various types, such as registers, RAMs, DRAMs, ROMs,
- a method of servicing such interrupts includes:
- Figure 1 is a diagram illustrating a processing system which is capable of servicing interrupts in accordance with an embodiment of the invention.
- Figure 2 is a table demonstrating an exemplary sequence of operations employing an embodiment of a method in accordance with the invention.
- Figure 3 is a diagram illustrating exemplary interrupt subroutines utilized in the embodiment. DESCRIPTION OF THE PREFERRED EMBODIMENT
- the processing system of Figure 1 includes a processor 10, a memory 20 and a bus 30.
- the exemplary processor 10 utilizes clock pulses to sequence through instructions identified by a program counter register.
- the program counter register contains the memory location of the next instruction to be read and acted upon by the processor.
- the processor includes an interrupt servicing unit 12, a register set 14, an instruction decoder 16 and an arithmetic logic unit 18.
- the memory 20, in this exemplary embodiment, comprises a RAM having a multiplicity of memory locations for storing, inter alia, subroutines and data. In the preferred embodiment, a portion of the memory is utilized as a LIFO stack 22.
- the processor 10 and the memory 20 are connected to the bus 30 for communicating with each other and with other hardware that is connected to the bus.
- the bus includes respective lines for carrying information such as addresses, interrupts, data, read strobes, write strobes and device-select strobes. Operation of the processor 10 is controlled by instructions in the program stream and by interrupts.
- the interrupts may be either external interrupts received from the bus 30 or internal interrupts generated within the processor itself, e.g., from a timer (not shown) in the processor.
- interrupt servicing unit 12 which produces addresses identifying the memory locations that are associated with the external and internal interrupts.
- unit 12 produces an address identifying the location in the memory 20 of the corresponding interrupt subroutine.
- the interrupt servicing unit comprises a dedicated priority-sensitive hardware component for producing the addresses, such as a programmable look-up table or an encoder, both of which are well known in the art. This both maximizes speed and enables servicing of higher priority interrupts before lower priority interrupts.
- the register set 14 comprises a plurality of registers for containing updatable memory addresses and variables produced by the interrupt subroutines.
- the register set 14 includes: • variables registers 140,141,142 for holding respective variables A0,A1,A2;
- a counter register 144 for holding a count indicating a number of pieces of information waiting to be used; • one or more general purpose registers (not shown); and
- the instruction decoder 16 is a conventional hardware component, such as a sequencer or micro-sequencer, for converting the instructions read from the memory 20 to lower-level operation codes to be executed by the arithmetic logic unit 18.
- the arithmetic logic unit is also a conventional hardware component.
- FIG. 2 illustrates a typical example of sequential steps that would be performed by the processor 10 in servicing a plurality of interrupts in accordance with a preferred embodiment of the invention.
- Interrupt subroutines that are utilized in this example are:
- the symbol IR represents the state of an interrupt request flag, with a " 1 " indicating that an interrupt request is being received and a "0" indicating that no interrupt request is being received.
- the symbol IE represents the state of an interrupt enable flag, with a " 1 " indicating that this flag is set (i.e. interrupts are currently enabled) and a "0” indicating that this flag is reset (i.e. interrupts are currently disabled).
- • "Inst. #” indicates the number of the instruction currently being executed by the processor 10.
- • "Count” is the number currently contained in register 144, i.e. the number of pieces of already-produced information waiting to be consumed.
- Figure 3 illustrates the exemplary subroutines, with each instruction that is included in the subroutines being preceded by the respective Instruction #.
- the processor 10 responds to this request by switching from whatever routine it had been performing to the interrupt subroutine Produce Info.
- steps 2 and 3 the processor resets the interrupt request flag, produces information and stores it in the memory 20, and executes Instructions #1 and #2 of the Produce Info subroutine. Specifically:
- step 3 it executes Inst. #2, i.e. calls the subroutine Update Count.
- Inst. #10 i.e. Push & Disable Int.
- step 8 it executes Inst. #14, i.e. Restore Int.
- step 9 it executes Inst. #15, i.e. Return.
- the processor returns to the subroutine that was previously being performed, i.e. to the Produce Info subroutine.
- step 10 the processor executes the next instruction to be executed in the Produce Info subroutine, i.e. Inst. #3, Jump to Produce Info. This simply restarts the Produce Info subroutine.
- the processor produces information, stores it in the memory 20 and executes Instructions #1 and #2 of the Produce Info subroutine. Specifically:
- step 11 it executes Inst. #1 by reinitializing the variable Al to the value 1.
- step 12 it executes Inst. #2 by calling the Update Count subroutine.
- Inst. #10 Push & Disable Int
- step 18 the processor responds to the interrupt request received in step 15, which is a request to consume information. It responds by switching to the Consume Info subroutine.
- step 20 it executes Inst. #5, i.e. Test A0, by reading the current value of A0 (now equal to the count) from register 140.
- step 22 it executes Inst. # 7 by setting the value of variable Al (in register 141) equal to -1. • In step 23 it executes Inst. # 8 by calling the Update Count subroutine.
- steps 24 through 28 the processor undertakes performance of the called Update Count subroutine, during which an interrupt request is received. Specifically:
- Inst. #10 Push & Disable Int
- step 29 the processor responds to the interrupt request received in step 25, which is a request to switch to the previously-running Produce Info subroutine.
- IR interrupt request flag
- step 32 the processor produces information, stores it in the memory 20 and executes Instructions #1 and #2 of the Produce Info subroutine. Specifically: • In step 32, it executes Inst. #1 by reinitializing the variable Al to the value 1.
- step 33 it executes Inst. #2 by calling the Update Count subroutine.
- steps 34 through 38 the processor again undertakes performance of the Update Count subroutine, during which another interrupt request is received. Specifically:
- step 39 the processor responds to the interrupt request received in step 37, which is a request to switch to the previously-running Consume Info subroutine.
- step 41 the processor will continue to operate in similar fashion.
- the exemplary steps shown in Figure 2 are provided to demonstrate how the servicing of interrupts, in accordance with an embodiment of the invention, can be done effectively in a simple manner, with few instructions, by saving minimal information, and without the need for specialized hardware.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Description
Claims
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP00953128A EP1127320A1 (en) | 1999-08-19 | 2000-07-31 | Servicing of interrupts with stored and restored flags |
JP2001519271A JP2003507815A (en) | 1999-08-19 | 2000-07-31 | Interrupt service with save and return flags |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/377,358 | 1999-08-19 | ||
US09/377,358 US6493781B1 (en) | 1999-08-19 | 1999-08-19 | Servicing of interrupts with stored and restored flags |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2001014977A1 true WO2001014977A1 (en) | 2001-03-01 |
Family
ID=23488795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/EP2000/007402 WO2001014977A1 (en) | 1999-08-19 | 2000-07-31 | Servicing of interrupts with stored and restored flags |
Country Status (7)
Country | Link |
---|---|
US (1) | US6493781B1 (en) |
EP (1) | EP1127320A1 (en) |
JP (1) | JP2003507815A (en) |
KR (1) | KR100817947B1 (en) |
CN (1) | CN1184571C (en) |
TW (1) | TW518468B (en) |
WO (1) | WO2001014977A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2461851A (en) * | 2008-07-10 | 2010-01-20 | Cambridge Consultants | Processor, which stores interrupt enable flags in a location used for other functions |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001256062A (en) * | 2000-03-09 | 2001-09-21 | Omron Corp | Interruption processing method and operation processor using the same |
US6971095B2 (en) * | 2000-05-17 | 2005-11-29 | Fujitsu Limited | Automatic firmware version upgrade system |
US7007119B2 (en) * | 2001-09-28 | 2006-02-28 | Intel Corporation | System and method for supporting split transactions on a bus |
US20060090032A1 (en) * | 2004-10-22 | 2006-04-27 | Broadcom Corporation | Method and computer program product of obtaining temporary conventional memory usage in BIOS |
JP2006309508A (en) * | 2005-04-28 | 2006-11-09 | Oki Electric Ind Co Ltd | Stack control device and method |
CN100369028C (en) * | 2005-06-15 | 2008-02-13 | 威盛电子股份有限公司 | Device and method for reading data |
CN100419689C (en) * | 2006-12-05 | 2008-09-17 | 北京中星微电子有限公司 | Processing method for interruption and apparatus thereof |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0441054A1 (en) * | 1990-01-05 | 1991-08-14 | Motorola, Inc. | Method and apparatus for handling nested interrupts |
US5448705A (en) * | 1991-07-08 | 1995-09-05 | Seiko Epson Corporation | RISC microprocessor architecture implementing fast trap and exception state |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4930068A (en) * | 1986-11-07 | 1990-05-29 | Nec Corporation | Data processor having different interrupt processing modes |
US5161228A (en) | 1988-03-02 | 1992-11-03 | Ricoh Company, Ltd. | System with selectively exclusionary enablement for plural indirect address type interrupt control circuit |
JPH02190937A (en) | 1989-01-19 | 1990-07-26 | Sanyo Electric Co Ltd | Interruption circuit for microcomputer |
JPH0743653B2 (en) * | 1990-07-25 | 1995-05-15 | 株式会社東芝 | Interrupt controller |
JPH04306735A (en) | 1991-04-04 | 1992-10-29 | Toshiba Corp | Asynchronous interruption inhiobition mechanism |
US5542076A (en) * | 1991-06-14 | 1996-07-30 | Digital Equipment Corporation | Method and apparatus for adaptive interrupt servicing in data processing system |
JPH05233318A (en) * | 1992-02-18 | 1993-09-10 | Nec Corp | Microprocessor |
JP3678759B2 (en) * | 1992-07-21 | 2005-08-03 | アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド | Apparatus for generating an interrupt and method for generating an interrupt |
JPH06161779A (en) * | 1992-11-17 | 1994-06-10 | Fujitsu Ltd | Interruption control system for data processor |
JP3242508B2 (en) | 1993-11-05 | 2001-12-25 | 松下電器産業株式会社 | Microcomputer |
JPH07262152A (en) * | 1994-03-24 | 1995-10-13 | Hitachi Ltd | Computer system |
EP0788057B1 (en) * | 1996-01-31 | 2003-05-02 | Compaq Computer Corporation | Computer system with controllerless modem |
US5944816A (en) | 1996-05-17 | 1999-08-31 | Advanced Micro Devices, Inc. | Microprocessor configured to execute multiple threads including interrupt service routines |
US5944809A (en) | 1996-08-20 | 1999-08-31 | Compaq Computer Corporation | Method and apparatus for distributing interrupts in a symmetric multiprocessor system |
KR19980075754A (en) * | 1997-04-01 | 1998-11-16 | 윤종용 | Computer with interrupt processing display function and processing method |
US6061787A (en) * | 1998-02-02 | 2000-05-09 | Texas Instruments Incorporated | Interrupt branch address formed by concatenation of base address and bits corresponding to highest priority interrupt asserted and enabled |
US6212593B1 (en) * | 1998-06-01 | 2001-04-03 | Advanced Micro Devices, Inc. | Method and apparatus for generating interrupts on a buffer by buffer basis in buffer descriptor ring direct memory access system |
US6112274A (en) * | 1998-06-17 | 2000-08-29 | Intel Corporation | Method and apparatus for processing more than one interrupts without reinitializing the interrupt handler program |
-
1999
- 1999-08-19 US US09/377,358 patent/US6493781B1/en not_active Expired - Lifetime
-
2000
- 2000-07-31 CN CNB008017344A patent/CN1184571C/en not_active Expired - Lifetime
- 2000-07-31 JP JP2001519271A patent/JP2003507815A/en not_active Withdrawn
- 2000-07-31 KR KR1020017004846A patent/KR100817947B1/en active IP Right Grant
- 2000-07-31 EP EP00953128A patent/EP1127320A1/en not_active Ceased
- 2000-07-31 WO PCT/EP2000/007402 patent/WO2001014977A1/en not_active Application Discontinuation
- 2000-08-17 TW TW089116580A patent/TW518468B/en not_active IP Right Cessation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0441054A1 (en) * | 1990-01-05 | 1991-08-14 | Motorola, Inc. | Method and apparatus for handling nested interrupts |
US5448705A (en) * | 1991-07-08 | 1995-09-05 | Seiko Epson Corporation | RISC microprocessor architecture implementing fast trap and exception state |
Non-Patent Citations (2)
Title |
---|
INTEL: "Microprocessor and Peripheral Handbook Vol. 1", 1988, INTEL, SANTA CLARA, US, ISBN: 1-55512-073-3, XP002152077 * |
PHILIPS: "8051 Based 8 Bit Microcontrollers, Data Handbook Integrated Circuits, Book IC20", 1991, PHILIPS, NETHERLANDS, XP002152078, 174120 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2461851A (en) * | 2008-07-10 | 2010-01-20 | Cambridge Consultants | Processor, which stores interrupt enable flags in a location used for other functions |
Also Published As
Publication number | Publication date |
---|---|
EP1127320A1 (en) | 2001-08-29 |
CN1320243A (en) | 2001-10-31 |
KR20010080223A (en) | 2001-08-22 |
US6493781B1 (en) | 2002-12-10 |
JP2003507815A (en) | 2003-02-25 |
TW518468B (en) | 2003-01-21 |
KR100817947B1 (en) | 2008-03-31 |
CN1184571C (en) | 2005-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6401155B1 (en) | Interrupt/software-controlled thread processing | |
US4410939A (en) | System for program interrupt processing with quasi-stack of register-sets | |
US5634046A (en) | General purpose use of a stack pointer register | |
US5557766A (en) | High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank | |
US6275749B1 (en) | Interrupt-controlled thread processing | |
US6604189B1 (en) | Master/slave processor memory inter accessability in an integrated embedded system | |
US5815733A (en) | System for handling interrupts in a computer system using asic reset input line coupled to set of status circuits for presetting values in the status circuits | |
US6493781B1 (en) | Servicing of interrupts with stored and restored flags | |
JP3970609B2 (en) | Processor system | |
US5901309A (en) | Method for improved interrupt handling within a microprocessor | |
JP4985452B2 (en) | Vector processing equipment | |
US20030028696A1 (en) | Low overhead interrupt | |
EP0915415A2 (en) | Stack pointer with post increment/decrement operation | |
WO2006111881A2 (en) | Implementation of multi-tasking on a digital signal processor | |
US20010003201A1 (en) | Pre-decoded stack pointer with post increment /decrement operation | |
AU626067B2 (en) | Apparatus and method for control of asynchronous program interrupt events in a data processing system | |
US5355463A (en) | Circuit configuration for transforming the logical address space of a processor unit to the physical address space of a memory | |
US6311266B1 (en) | Instruction look-ahead system and hardware | |
JPH056281A (en) | Information processor | |
EP1125190A1 (en) | A method and apparatus for providing a general purpose stack | |
EP4193250B1 (en) | Processing apparatus | |
US10817288B2 (en) | Combined instruction for addition and checking of terminals | |
KR100329780B1 (en) | Interrupt processing apparatus reducing interrupt response time | |
JPH0756633B2 (en) | Task switching method | |
CN116185501A (en) | Command execution method, device, graphics processor, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 00801734.4 Country of ref document: CN |
|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): CN JP KR |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2000953128 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2001 519271 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 1020017004846 Country of ref document: KR |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
WWP | Wipo information: published in national office |
Ref document number: 2000953128 Country of ref document: EP |
|
WWR | Wipo information: refused in national office |
Ref document number: 2000953128 Country of ref document: EP |
|
WWW | Wipo information: withdrawn in national office |
Ref document number: 2000953128 Country of ref document: EP |