US20080046697A1 - Data processor - Google Patents
Data processor Download PDFInfo
- Publication number
- US20080046697A1 US20080046697A1 US11/868,471 US86847107A US2008046697A1 US 20080046697 A1 US20080046697 A1 US 20080046697A1 US 86847107 A US86847107 A US 86847107A US 2008046697 A1 US2008046697 A1 US 2008046697A1
- Authority
- US
- United States
- Prior art keywords
- register
- banks
- interrupt
- bank
- data processor
- 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
- 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3004—Arrangements for executing specific machine instructions to perform operations on memory
- G06F9/30043—LOAD or STORE instructions; Clear instruction
-
- 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/3012—Organisation of register space, e.g. banked or distributed register file
-
- 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/3012—Organisation of register space, e.g. banked or distributed register file
- G06F9/30123—Organisation of register space, e.g. banked or distributed register file according to context, e.g. thread buffers
Definitions
- the present invention relates to a data processor including register banks, more particularly to register set saving and restoring involved in interrupt exception (refers to both interrupts and exceptions) handling and task switching, and a technique effectively applied to, e.g., single chip microcomputers.
- a predetermined register set such as general purpose registers, a status register, and the like at that time is saved to enable restoration to a previous state.
- register banks can be used to rapidly save and restore the register set. Use of the register bank method shortens interrupt response time.
- Patent Publication 1 describes a single-chip microcomputer including general purpose registers of bank structure by use of an internal RAM (random access memory), provided with a dedicated bus for that purpose.
- Patent Publication 2 describes an information processing unit having a register bank configuration in which a dedicated bus is provided between a register file and an internal RAM.
- Patent Publication 3 describes an extended central processing unit having a register file configuration with a dedicated bus provided between the register file and an internal RAM.
- a CPU central processing unit
- the present invention provides a technique for preventing a data processor from malfunctioning on saving and restoring register banks.
- An object of the present invention is to provide a data processor that is free from undesirable operation stop due to an overflow of register banks.
- Another object of the present invention is to provide a data processor that can smoothly and efficiently perform restoration from interrupts, whether task switching is involved or not, and is excellent in applicability to multitask processing.
- the status register includes an overflow flag to indicate an overflow of the plural register banks.
- the data processor comprises: a status register; a central processing unit (CPU) including a predetermined register set; and a plurality of register banks corresponding to the predetermined register set, wherein the plurality of register banks are used to save storage information held by the predetermined register set when an interrupt occurs, and the status register includes an overflow flag to indicate an overflow of the plural register banks.
- CPU central processing unit
- the central processing unit saves data of the register set to a stack area and reflects an overflow state in the overflow flag.
- the overflow flag indicates an overflow state, if data restoration from the register banks to the register set is directed, the central processing unit restores the data from the stack area to the register set.
- the status register including the overflow flag and the program counter are saved to a stack area, and an interrupt restore instruction (RTE instruction) restores the values of the program counter and the status register from the stack area.
- RTE instruction an interrupt restore instruction
- any interrupt service routines can determine whether the register banks have overflowed due to an interrupt concerned by observing the overflow flag (overflow bit) in the status register.
- the CPU executes a predetermined exception handling routine.
- the plural register banks are constituted by a RAM, a dedicated bus is used for connection between the RAM and a predetermined register set, and the bus is given as many bits as parallel data transfer is allowed in units of plural registers contained in the register set.
- Interrupt exception handling can be performed in parallel with save processing for the register set through the dedicated bus, resulting in a higher interrupt response speed.
- concurrent saving of plural registers contributes to reduction in interrupt service time (interrupt response performance and interrupt restore performance).
- the central processing unit starts saving to the register banks in response to the occurrence of interrupt exception handling.
- the central processing unit executes a register restore instruction (RESBANK instruction) and restores storage information from a register bank last saved to the predetermined register set.
- REBANK instruction a register restore instruction
- the central processing unit stores general purpose registers of a task before the switching to a store area of the OS, and restores stored data on a task after the switching from the management area of the OS to the register set.
- the central processing unit restores the value of a program counter value and the value of the status register stored in a stack area, prepared by the OS, and executes a return instruction (RTE instruction) to enable program execution processing at a switching destination.
- RTE instruction return instruction
- the central processing unit to save the values of registers to the register banks upon the occurrence of an interrupt must separately have the register restore instruction (RESBANK instruction) and the return instruction (RTE instruction) to perform OS-based task switching. If task switching is not involved, the OS-based task switching following the processing of the register restore instruction become unnecessary, and there is no need to separate processing of the register restore instruction and processing of the return instruction; restoration from the register banks may be performed by an instruction (RTE instruction) to restore from the interrupt service routine.
- RTE instruction unifying the both instructions into one instruction makes task switching difficult.
- the data processor can perform interrupt exception handling according to control of the OS and can perform task switching, using the interrupt exception handling.
- the predetermined register set is saved to register banks; an interrupt exception service routine (interrupt service routine) is executed; in return from the interrupt exception service routine, the register restore instruction (RESBANK instruction) is executed to restore data of a register bank used for a last save operation to the register set; and the return instruction (RTE instruction) is executed to return to previous program execution processing.
- the register restore instruction is executed to restore data of a register bank in a task of a switching source to the register set; the restored data is stored in an area managed by the OS; register set data of a task of a switching destination is restored from the OS management area to the predetermined register set; and the return instruction is executed to transfer control to program execution processing of the task of the switching destination.
- FIG. 1 is a block diagram showing a data processor according to an embodiment of the present invention
- FIG. 2 is a diagram illustrating register banks and a register set to be saved and restored
- FIG. 3 is a diagram showing examples of control registers for saving and restoring a predetermined register set
- FIG. 4 is a diagram showing an operation configuration of register banks RBK 0 to RBKi;
- FIG. 5 is a timing chart showing how register save processing is performed concurrently with CPU processing when an interrupt occurs
- FIG. 6 is a diagram showing examples of interrupt response processing time and interrupt restore processing time when a register bank method is used
- FIG. 7 which illustrates comparisons with FIG. 6 , is a diagram showing examples of interrupt response processing time and interrupt restore processing time when saving and restoring to and from a stack area are performed using data transfer instructions without employing register banks;
- FIG. 8 is a diagram showing the placement of an overflow flag in a status register
- FIG. 9 is a diagram explaining that, when a CPU performs multitask processing under management of an OS, a return destination after interrupt service is not always an interrupt source, and tasks may be switched;
- FIG. 10 is a diagram showing a processing procedure when task switching is performed.
- FIG. 11 is a diagram showing a relationship among a register set, register banks, and an OS internal table in processing of FIG. 10 ;
- FIG. 12 is a diagram illustrating register bank transfer instructions
- FIG. 13 is a diagram illustrating correspondences between addresses specified by register bank transfer instructions and the entries of register banks.
- FIG. 1 is a block diagram showing a data processor according to an embodiment of the present invention.
- a data processor 1 shown in the figure is formed on a single semiconductor board (semiconductor chip) such as a single-crystal silicon by, e.g., CMOS integrated circuit manufacturing technology.
- the data processor 1 shown in the figure comprises: a CPU 2 ; a bank memory 3 ; an interrupt controller (INTC) 4 ; a bus state controller (BSC) 5 ; a ROM (read only memory) 6 ; and a RAM 7 .
- the CPU 2 is connected to the RAM 7 over a data bus 10 and a data address bus 11 , and to the ROM 6 over an instruction data bus 12 and an instruction address bus 13 .
- the RAM 7 is used as a work area or data temporary storage area of the CPU 2 .
- the ROM 6 stores operation programs of the CPU 2 such as OS and control programs.
- the buses 10 to 13 are interfaced via the bus state controller 5 to a peripheral data bus 14 and a peripheral address bus 15 , where external input-output circuits such as the interrupt controller 4 and an I/O port 16 are provided.
- the bank memory 3 comprises plural register banks RBK 0 to RBKi, which are connected to the CPU 2 over a bus 17 dedicated to the register banks.
- the I/O port 16 is connected with a bus (not shown in the figure) outside the data processor.
- the CPU 2 decodes an instruction fetched to an instruction register 20 in an instruction decoder 21 , and according to a result of the decoding, controls a register circuit 23 , an operation circuit 24 , an address operation circuit 25 , a system controller 26 , and the like to execute the instruction.
- the address operation circuit 25 according to an instruction address owned by a program counter (PC) 27 and address information owned by the register circuit 23 , outputs the instruction address to the instruction address bus 13 and an operand address to the data address bus 11 .
- the interrupt controller 4 inputs interrupt requests from inside and outside the data processor, arbitrates them according to interrupt priority levels and the like, and upon accepting them, asserts an interrupt signal IRQ to the CPU 2 .
- the interrupt signal IRQ may be composed of plural signal lines containing information of an interrupt vector number (IVN).
- the operation circuit 24 comprises an arithmetic logic unit, shifter, multiplier, and the like, which are not shown in the figure.
- the register circuit 23 includes: general purpose registers R 0 to R 15 (SP); multiplication registers MACH and MACL; a procedure register PR; a global base register GBR; a read data buffer register RBR; a write data buffer register WBR; a status register SR; and the like.
- the general purpose registers R 0 to R 15 can be used as address registers and data registers.
- functions as a stack pointer SP are assigned, in addition to functions as a general purpose register.
- a return address and general purpose registers are saved and restored to and from a stack area, using the stack pointer.
- the stack pointer SP points to a stackable address of the stack area.
- the stack area is allocated to the RAM 7 or a memory (not shown in the figure) on an external bus connected to the I/O port 16 .
- the program counter (PC) 27 indicates the address of an instruction executed by the CPU 2 .
- the status register SR indicates the status of the CPU 2 .
- the procedure register PR stores a return address at a subroutine call.
- FIG. 2 shows register banks and a register set to be saved and restored.
- the register banks RBK 0 to RBKi are used as bank areas exclusively used to save registers.
- the register banks RBK 0 to RBKi are allocated to a memory cell array of the bank memory 3 .
- the bank memory 3 is implemented as, for example, SRAM (static random access memory).
- the registers to be saved and restored are a predetermined register set whose contents could be destroyed due to interrupts, such as the general purpose registers R 0 to R 14 , the global register GBR, the multiplication registers MACH and MACL, the procedure register PR, and a vector number (IVN) corresponding to a pertinent interrupt as debug information.
- the register banks RBK 0 to RBKi each are assigned a storage capacity enough to hold the register set.
- register banks RBK 0 to RBKi since registers must be saved and restored each time interrupts are nested (interrupt are multiplexed), it is desirable to provide a number of register banks equal, at the minimum, to the number of interrupt levels. If there are, e.g., 15 interrupt priority levels, 15 register banks RBK 0 to RBKi should be provided.
- the predetermined register set R 0 to R 14 , GBR, MACH, MACL, PR, and vector number IVN are automatically stored in predetermined register banks by CPU processing when an interrupt occurs.
- the data (register set data) of the predetermined register set stored in the register banks is restored to the register set by the CPU 2 executing a predetermined register restore instruction.
- a RESBANK instruction is used as the predetermined register restore instruction.
- FIG. 3 shows examples of control registers for saving and restoring the predetermined register set.
- the interrupt controller 4 is provided with a bank control register IBCR and a bank number register IBNR.
- the bank control register IBCR is a register for defining whether to permit or prohibit the use of the register banks RBK 0 to RBKi for interrupt priority levels or interrupt factors (interrupt requests).
- the interrupt priority levels range from 1 to 15, with greater levels indicating higher interrupt priorities and 0 being masked.
- the register banks are respectively associated with E 1 to E 15 defining whether to permit or prohibit their use, which are allocated to bits 1 to 15 , respectively. “0” denotes prohibition of use and “1” denotes permission of use. Bit 0 is a reserved bit.
- a bank number register IBNR shown in FIG. 3 has a master enable ME field and a bank number BN field.
- the master enable ME of “00” denotes that the use of the register banks is prohibited for all interrupts. In this case, the status of the bank control register IBCR is ignored.
- the master enable ME of “00” denotes that the use of the banks is permitted for all interrupts other than NMI (non-maskable interrupt).
- NMI non-maskable interrupt
- the register banks RBK 0 to RBKi operate in the form of FILO (first in, last out); registers first entered are last removed.
- the FILO operation of the register banks RBK 0 to RBKi involves control of the system controller 26 and the instruction decoder 21 .
- the bank number BN is delivered to the system controller 26 .
- the system controller 26 is supplied with an interrupt signal IRQ from the interrupt controller 4 , and with a predetermined instruction decode signal from the instruction decoder 21 . Other mode signals shown in the figures are supplied.
- the system controller 26 is implemented as a logic circuit that performs flow control for instruction execution, operation mode control, control of access to the bank memory 3 , and the like.
- FIG. 4 shows an operation configuration of the register banks RBK 0 to RBKi.
- a description is made of FILO access control over the bank memory 3 by the system controller 26 .
- the value of the bank number BN is set to 0 immediately after reset. If an interrupt is accepted to use the register banks, the system controller 26 saves a register set to a bank indicated by the bank number BN and increments the bank number BN by 1. If the RESBANK instruction is executed, the system controller 26 decrements the bank number BN by 1 and then restores (data restore) register set data for the predetermined register set from a register bank indicated by the bank number BN. Increment and decrement operations on the bank number BN are performed by an incrementer/decrementer 29 within the controller 4 .
- FIG. 5 shows how register save processing is performed concurrently with CPU exception handling when an interrupt occurs.
- Each of registers of the register set is, e.g., 32 bits long.
- the dedicated bus 17 for operating the register banks has a width of 128 bits to allow parallel input and output of, e.g., four registers.
- the wide bus width of the dedicated bus 17 enables concurrent transfer of plural registers and increases transfer efficiency. Since the dedicated bus 17 for operating the register banks is exclusively used for the register banks, the CPU 2 can perform save and restore processing for the register set concurrently with other processing.
- Register save processing is performed concurrently with CPU exception handling when an interrupt occurs, so that overhead by the register save processing can be apparently zeroed or greatly reduced.
- saving of the register set is automatically started when an interrupt is accepted, it is started before the first instruction of an interrupt service routine is fetched according to an interrupt vector, resulting in further increased interrupt responsibility.
- FIG. 6 shows examples of interrupt response processing time and interrupt restore processing time when the above-described register bank method is used.
- FIG. 7 shows examples of interrupt response processing time and interrupt restore processing time when saving and restoring to and from a stack area are performed using data transfer instructions without employing the register banks.
- An overflow of the register banks is made detectable by providing the status register SR with an overflow flag BO indicating an overflow of the register banks.
- FIG. 8 shows the overflow flag BO.
- register set data is automatically saved to a stack area instead of the register banks. Automatic saving to and restoring from the stack area are performed as described below.
- the status register SR, the program counter PC, and the predetermined register set R 0 to R 14 , GBR, MACH, MACL, and PR are saved to a stack area.
- a register bank overflow bit BO of the status register SR is set to “1”.
- a bank number BN of the bank number register IBNR is kept set to a maximum value.
- restore operation is performed as follows. According to the value of the stack pointer SP, data is restored from the stack area to the predetermined register set R 0 to R 14 , GBR, MACH, MACL, and PR. A bank number BN of the bank number register IBNR is kept set to a maximum value.
- the register bank error exception handling described below is started.
- the status register SR is saved to the stack area.
- the program counter (PC) 27 is saved to the stack area.
- the value of the program counter (PC) 27 to be saved is the start address of an instruction next to the instruction last executed.
- An exception service routine address is fetched from an exception handling vector table corresponding to a register bank error that occurred, and a program is executed from the address. In this case, saving to the register banks is not performed and the bank number BN is unchanged. This is intended for applications requested to take necessary action, upon detecting that the register banks cannot be used due to an overflow of them. This function is effective to detect that desired performance is not obtained, and at least for debugging.
- overflow flag BO when data is restored to a register set, an overflow of the register banks can be recognized. This helps to prevent the data processor from undesirable operation stop due to an overflow of the register banks.
- a return destination after interrupt service is not always an interrupt source.
- control may be returned to a different task (task B).
- FIG. 10 shows a processing procedure when task switching is performed.
- FIG. 11 shows a relationship among a register set, register banks, and an OS internal table in processing of FIG. 10 .
- the CPU 2 starts saving to the register banks in response to the occurrence of the interrupt exception handling ( ⁇ circle around (1) ⁇ ).
- the interrupt service routine that is, within OS processing after the interrupt exception handling, the CPU 2 executes a RESBANK instruction to restore storage information from a register bank last saved to the predetermined register set ( ⁇ circumflex over (2) ⁇ ).
- the central processing unit stores the register set data of a task (task A) before the switching in an OS internal table ( ⁇ circumflex over (3) ⁇ ), and restores the stored data of a register set on a task (task B) after the switching from the OS internal table to the register set ( ⁇ circumflex over (4) ⁇ ).
- the processings of ⁇ circumflex over (3) ⁇ and ⁇ circumflex over (4) ⁇ are based on the OS.
- the CPU 2 restores them from the stack area and executes a return instruction (RTE instruction) to enable return to program execution processing at a switching destination.
- the central processing unit separately has the RESBANK instruction (register restore instruction) and the RTE instruction (return instruction). This takes into account a case where the return from the OS in interrupt exception handling involves task switching. If task switching is not involved, the processings ⁇ circumflex over (3) ⁇ and ⁇ circumflex over (4) ⁇ by the OS following the register restore instruction become unnecessary, and there is no need to separate processing of the register restore instruction from processing of the return instruction.
- unifying the both instructions into one instruction makes task switching difficult and causes an overhead.
- unifying the both instructions into one instruction makes it necessary to specify operation corresponding to OS processing by parameters of instructions concerned, and produces the need to identify specification of addressing modes for an OS internal table and the processing routines to be executed differently depending on whether task switching is to be performed, increasing parameters and complicating instructions.
- RESBANK instruction bank restore instruction
- RTE instruction subroutine return instructions
- An instruction set of the CPU 2 contains register bank transfer instructions as shown in FIG. 12 .
- the register bank transfer instructions which are instructions used for debugging, transfer arbitrary data of register banks to the general purpose register R 0 .
- An LDBANK instruction transfers 4-byte data from a register bank address indicated by Rm to R 0 .
- An STBANK instruction transfers R 0 to a register bank address indicated by Rn.
- FIG. 13 shows correspondences between addresses (the values of Rm for LDBANK and the values of Rn for STBANK) of register bank transfer instructions and the entries of register banks.
- a bank number is specified by bits 15 to 7 (BN) of address, and entries (R 0 to R 14 , GBR, MACH, MACL, PR, IVN) within the bank are specified by bits 6 to 2 of the address.
- Bits 31 to 16 and bits 1 and 0 of the address are set to all-zeros.
- Arbitrary data of register banks can be transferred by one register bank transfer instruction.
- coprocessor registers such as a floating-point operation unit (FPU) and a digital signal processing unit (DSP) may be contained in a register set and saved and restored together with the general purpose registers and the like.
- FPU floating-point operation unit
- DSP digital signal processing unit
- interrupt selection type register banks may be used.
- an interrupt occurs, if there is no empty bank, a stack area is used. In this case, there may occur a situation where interrupts of high levels cannot use banks, depending on an interrupt nest status; this is fatal to real-time systems. Therefore, if there is no empty bank, interrupts to use banks are made selectable to maintain real-time capability. This helps to improve interrupt performance in microcomputers with limited bank areas.
- bank interrupts interrupt levels that always use banks
- Don't care interrupt interrupt levels that may use either of banks and stack
- register banks are switched by a bank switching instruction (e.g., current bank 0 ⁇ 1). If it is a don't care interrupt, when the number of remaining banks minus the number of remaining interrupts is one or greater, banks are switched, and when 0, the contents of a current bank are saved to the stack, whereby the don't care interrupt also effectively uses the banks.
- This area is provided an area using a dedicated bus which is different from the RAM area. Memory access is enabled in parallel with other execution stages of an instruction, so that apparent memory access overhead is zeroed.
- This area is allocated to address space and can be accessed like normal memory areas.
- This area can be used as a memory area exclusively used for stack to speed up register saving and restoring and increase the performance of interrupt service and task processing. Also, its use can be expanded in combination with the RAM.
- the register banks are not limited to a circuit allocated on the RAM for a register set within the CPU.
- they may be constituted by a register file that makes up plural register sets.
- a bank restore instruction is used as an instruction exclusively used to restore banks, which is independent of a return instruction, the data processor can smoothly and efficiently perform restoration from interrupts, whether task switching is involved or not, and is excellent in applicability to multitask processing.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
Abstract
The present invention prevents a data processor from undesirable operation stop due to an overflow of a plurality of register banks. A status register includes an overflow flag to indicate an overflow of the plurality of register banks. When an interrupt exception occurs in a state in which data has been saved to all banks of the register banks, and the accepted interrupt exception is permitted to use the register banks, a central processing unit saves data of a register set to a stack area and reflects an overflow state in the overflow flag. When the overflow flag indicates an overflow state, if data restoration from the register banks to the register set is directed, the central processing unit restores the data from the stack area to the register set.
Description
- The present invention relates to a data processor including register banks, more particularly to register set saving and restoring involved in interrupt exception (refers to both interrupts and exceptions) handling and task switching, and a technique effectively applied to, e.g., single chip microcomputers.
- When interrupt exception handling or task switching under multitask environments is performed, a predetermined register set such as general purpose registers, a status register, and the like at that time is saved to enable restoration to a previous state. Although a stack area allocated to an external memory and the like can be used as a save destination, register banks can be used to rapidly save and restore the register set. Use of the register bank method shortens interrupt response time.
-
Patent Publication 1 describes a single-chip microcomputer including general purpose registers of bank structure by use of an internal RAM (random access memory), provided with a dedicated bus for that purpose.Patent Publication 2 describes an information processing unit having a register bank configuration in which a dedicated bus is provided between a register file and an internal RAM.Patent Publication 3 describes an extended central processing unit having a register file configuration with a dedicated bus provided between the register file and an internal RAM. - [Patent Publication 1]
- Japanese Unexamined Patent Publication No. Hei 5 (1993)-165641
- [Patent Publication 2]
- Japanese Unexamined Patent Publication No. Hei 6 (1994)-309169
- [Patent Publication 3]
- Japanese Unexamined Patent Publication No. Hei 5 (1993)-265753
- The inventor studied a register bank method to shortens interrupt response time. First, an overflow of register banks is taken into account. When an interrupt occurs, some interrupt service routines mask only a critical section having a high emergency level such as interrupt factor flag clear with the interrupt level, and after servicing the interrupt, accept re-input of interrupts of the same or lower levels. In such a case where interrupt service is performed by intentionally lowering interrupt levels, since more interrupts than the number of interrupt levels occur, register banks provided by the number of interrupt levels overflows. As a result, a CPU (central processing unit) taking no measures against overflow may fall into undesirable operation stop.
- Second, in the case where an OS (operating system) is used, task switching by interrupt is taken into account. Specifically, in task switching, after data of a register set before the task switching is saved to an OS internal table, data of the register set on tasks after the switching must be restored from the OS internal table to the register set. Unless such processing is performed, control cannot be returned to a previous task again.
- The present invention provides a technique for preventing a data processor from malfunctioning on saving and restoring register banks.
- An object of the present invention is to provide a data processor that is free from undesirable operation stop due to an overflow of register banks.
- Another object of the present invention is to provide a data processor that can smoothly and efficiently perform restoration from interrupts, whether task switching is involved or not, and is excellent in applicability to multitask processing.
- The foregoing and other objects, and novel features of the present invention will become apparent from this specification and the accompanying drawings.
- Representative examples of the invention disclosed in the present application will be briefly described below.
- [1] In a data processor that uses a status register and plural register banks to execute instructions, the status register includes an overflow flag to indicate an overflow of the plural register banks.
- As a further embodiment of the present invention, the data processor comprises: a status register; a central processing unit (CPU) including a predetermined register set; and a plurality of register banks corresponding to the predetermined register set, wherein the plurality of register banks are used to save storage information held by the predetermined register set when an interrupt occurs, and the status register includes an overflow flag to indicate an overflow of the plural register banks.
- By providing the overflow flag, when data is restored to the register set, an overflow of the register banks can be recognized.
- For example, when an interrupt exception occurs in a state in which data has been saved to all banks of the register banks, and the accepted interrupt exception is permitted to use the register banks, the central processing unit saves data of the register set to a stack area and reflects an overflow state in the overflow flag. When the overflow flag indicates an overflow state, if data restoration from the register banks to the register set is directed, the central processing unit restores the data from the stack area to the register set.
- It is to be noted that, in the interrupt exception handling, the status register including the overflow flag and the program counter are saved to a stack area, and an interrupt restore instruction (RTE instruction) restores the values of the program counter and the status register from the stack area. Specifically, even if interrupt service processing is multiplexed, any interrupt service routines can determine whether the register banks have overflowed due to an interrupt concerned by observing the overflow flag (overflow bit) in the status register.
- However, in cases where task switching by the OS is performed by interrupts, before execution of an instruction (RTE instruction) to restore from an interrupt service routine, a status register value corresponding to a switching destination task must be prepared in advance in a stack area where restore values are placed. This is operation indispensable to task switching processing in the OS and not extra processing added by the present invention.
- This helps to prevent the data processor from undesirable operation stop due to an overflow of the register banks.
- When an interrupt exception occurs in a state in which data has been saved to all banks of the register banks, and the accepted interrupt exception is not permitted to use the register banks, the CPU executes a predetermined exception handling routine.
- The plural register banks are constituted by a RAM, a dedicated bus is used for connection between the RAM and a predetermined register set, and the bus is given as many bits as parallel data transfer is allowed in units of plural registers contained in the register set. Interrupt exception handling can be performed in parallel with save processing for the register set through the dedicated bus, resulting in a higher interrupt response speed. In short, concurrent saving of plural registers contributes to reduction in interrupt service time (interrupt response performance and interrupt restore performance). By connecting the bank area over the dedicated bus to perform parallel processing, apparent overhead of register save and restore processing can be reduced.
- [2] We will examine the case where interrupt exception handling is used to perform OS-based task switching. The central processing unit starts saving to the register banks in response to the occurrence of interrupt exception handling. Upon return from an interrupt service routine, the central processing unit executes a register restore instruction (RESBANK instruction) and restores storage information from a register bank last saved to the predetermined register set. At this time, if a return destination from the interrupt service routine is a different task, that is, task switching is performed, according to the OS, the central processing unit stores general purpose registers of a task before the switching to a store area of the OS, and restores stored data on a task after the switching from the management area of the OS to the register set. Thereafter, the central processing unit restores the value of a program counter value and the value of the status register stored in a stack area, prepared by the OS, and executes a return instruction (RTE instruction) to enable program execution processing at a switching destination. What is important here is that the central processing unit to save the values of registers to the register banks upon the occurrence of an interrupt must separately have the register restore instruction (RESBANK instruction) and the return instruction (RTE instruction) to perform OS-based task switching. If task switching is not involved, the OS-based task switching following the processing of the register restore instruction become unnecessary, and there is no need to separate processing of the register restore instruction and processing of the return instruction; restoration from the register banks may be performed by an instruction (RTE instruction) to restore from the interrupt service routine. However, unifying the both instructions into one instruction makes task switching difficult.
- According to a further embodiment, the data processor can perform interrupt exception handling according to control of the OS and can perform task switching, using the interrupt exception handling. In the interrupt exception handling, the predetermined register set is saved to register banks; an interrupt exception service routine (interrupt service routine) is executed; in return from the interrupt exception service routine, the register restore instruction (RESBANK instruction) is executed to restore data of a register bank used for a last save operation to the register set; and the return instruction (RTE instruction) is executed to return to previous program execution processing. In the task switching using the interrupt exception handling, in return from the interrupt exception handling routine, the register restore instruction is executed to restore data of a register bank in a task of a switching source to the register set; the restored data is stored in an area managed by the OS; register set data of a task of a switching destination is restored from the OS management area to the predetermined register set; and the return instruction is executed to transfer control to program execution processing of the task of the switching destination.
-
FIG. 1 is a block diagram showing a data processor according to an embodiment of the present invention; -
FIG. 2 is a diagram illustrating register banks and a register set to be saved and restored; -
FIG. 3 is a diagram showing examples of control registers for saving and restoring a predetermined register set; -
FIG. 4 is a diagram showing an operation configuration of register banks RBK0 to RBKi; -
FIG. 5 is a timing chart showing how register save processing is performed concurrently with CPU processing when an interrupt occurs; -
FIG. 6 is a diagram showing examples of interrupt response processing time and interrupt restore processing time when a register bank method is used; -
FIG. 7 , which illustrates comparisons withFIG. 6 , is a diagram showing examples of interrupt response processing time and interrupt restore processing time when saving and restoring to and from a stack area are performed using data transfer instructions without employing register banks; -
FIG. 8 is a diagram showing the placement of an overflow flag in a status register; -
FIG. 9 is a diagram explaining that, when a CPU performs multitask processing under management of an OS, a return destination after interrupt service is not always an interrupt source, and tasks may be switched; -
FIG. 10 is a diagram showing a processing procedure when task switching is performed; -
FIG. 11 is a diagram showing a relationship among a register set, register banks, and an OS internal table in processing ofFIG. 10 ; -
FIG. 12 is a diagram illustrating register bank transfer instructions; and -
FIG. 13 is a diagram illustrating correspondences between addresses specified by register bank transfer instructions and the entries of register banks. - <<Register Bank>>
-
FIG. 1 is a block diagram showing a data processor according to an embodiment of the present invention. Adata processor 1 shown in the figure is formed on a single semiconductor board (semiconductor chip) such as a single-crystal silicon by, e.g., CMOS integrated circuit manufacturing technology. - The
data processor 1 shown in the figure comprises: aCPU 2; abank memory 3; an interrupt controller (INTC) 4; a bus state controller (BSC) 5; a ROM (read only memory) 6; and aRAM 7. - The
CPU 2 is connected to theRAM 7 over adata bus 10 and adata address bus 11, and to theROM 6 over aninstruction data bus 12 and aninstruction address bus 13. TheRAM 7 is used as a work area or data temporary storage area of theCPU 2. TheROM 6 stores operation programs of theCPU 2 such as OS and control programs. Thebuses 10 to 13 are interfaced via thebus state controller 5 to aperipheral data bus 14 and aperipheral address bus 15, where external input-output circuits such as the interruptcontroller 4 and an I/O port 16 are provided. Thebank memory 3 comprises plural register banks RBK0 to RBKi, which are connected to theCPU 2 over abus 17 dedicated to the register banks. The I/O port 16 is connected with a bus (not shown in the figure) outside the data processor. - The
CPU 2 decodes an instruction fetched to aninstruction register 20 in aninstruction decoder 21, and according to a result of the decoding, controls aregister circuit 23, anoperation circuit 24, anaddress operation circuit 25, asystem controller 26, and the like to execute the instruction. Theaddress operation circuit 25, according to an instruction address owned by a program counter (PC) 27 and address information owned by theregister circuit 23, outputs the instruction address to theinstruction address bus 13 and an operand address to the data addressbus 11. The interruptcontroller 4 inputs interrupt requests from inside and outside the data processor, arbitrates them according to interrupt priority levels and the like, and upon accepting them, asserts an interrupt signal IRQ to theCPU 2. The interrupt signal IRQ may be composed of plural signal lines containing information of an interrupt vector number (IVN). - The
operation circuit 24 comprises an arithmetic logic unit, shifter, multiplier, and the like, which are not shown in the figure. Theregister circuit 23 includes: general purpose registers R0 to R15 (SP); multiplication registers MACH and MACL; a procedure register PR; a global base register GBR; a read data buffer register RBR; a write data buffer register WBR; a status register SR; and the like. - The general purpose registers R0 to R15 can be used as address registers and data registers. To the general purpose register R15, functions as a stack pointer SP are assigned, in addition to functions as a general purpose register. During an interrupt or subroutine call, a return address and general purpose registers are saved and restored to and from a stack area, using the stack pointer. The stack pointer SP points to a stackable address of the stack area. The stack area is allocated to the
RAM 7 or a memory (not shown in the figure) on an external bus connected to the I/O port 16. - The program counter (PC) 27 indicates the address of an instruction executed by the
CPU 2. The status register SR indicates the status of theCPU 2. The procedure register PR stores a return address at a subroutine call. -
FIG. 2 shows register banks and a register set to be saved and restored. In this embodiment, for register saving and restoring in interrupt service, instead of conventional stack areas, the register banks RBK0 to RBKi are used as bank areas exclusively used to save registers. The register banks RBK0 to RBKi are allocated to a memory cell array of thebank memory 3. Thebank memory 3 is implemented as, for example, SRAM (static random access memory). - The registers to be saved and restored are a predetermined register set whose contents could be destroyed due to interrupts, such as the general purpose registers R0 to R14, the global register GBR, the multiplication registers MACH and MACL, the procedure register PR, and a vector number (IVN) corresponding to a pertinent interrupt as debug information. The register banks RBK0 to RBKi each are assigned a storage capacity enough to hold the register set.
- As the number of the register banks RBK0 to RBKi, since registers must be saved and restored each time interrupts are nested (interrupt are multiplexed), it is desirable to provide a number of register banks equal, at the minimum, to the number of interrupt levels. If there are, e.g., 15 interrupt priority levels, 15 register banks RBK0 to RBKi should be provided.
- The predetermined register set R0 to R14, GBR, MACH, MACL, PR, and vector number IVN are automatically stored in predetermined register banks by CPU processing when an interrupt occurs. The data (register set data) of the predetermined register set stored in the register banks is restored to the register set by the
CPU 2 executing a predetermined register restore instruction. In this embodiment, a RESBANK instruction is used as the predetermined register restore instruction. - <<Control Registers for Saving and Restoring>>
-
FIG. 3 shows examples of control registers for saving and restoring the predetermined register set. The interruptcontroller 4 is provided with a bank control register IBCR and a bank number register IBNR. The bank control register IBCR is a register for defining whether to permit or prohibit the use of the register banks RBK0 to RBKi for interrupt priority levels or interrupt factors (interrupt requests). The interrupt priority levels range from 1 to 15, with greater levels indicating higher interrupt priorities and 0 being masked. Furthermore, the register banks are respectively associated with E1 to E15 defining whether to permit or prohibit their use, which are allocated tobits 1 to 15, respectively. “0” denotes prohibition of use and “1” denotes permission of use.Bit 0 is a reserved bit. - A bank number register IBNR shown in
FIG. 3 has a master enable ME field and a bank number BN field. The master enable ME of “00” denotes that the use of the register banks is prohibited for all interrupts. In this case, the status of the bank control register IBCR is ignored. The master enable ME of “00” denotes that the use of the banks is permitted for all interrupts other than NMI (non-maskable interrupt). When the master enable ME is “11”, the register banks are used according to the setting of the bank control register IBCR. “10” of the master enable ME is reserved. A bank number BN indicates the next bank number to be saved. - <<FILO Control of Register Banks>>
- The register banks RBK0 to RBKi operate in the form of FILO (first in, last out); registers first entered are last removed. The FILO operation of the register banks RBK0 to RBKi involves control of the
system controller 26 and theinstruction decoder 21. The bank number BN is delivered to thesystem controller 26. Thesystem controller 26 is supplied with an interrupt signal IRQ from the interruptcontroller 4, and with a predetermined instruction decode signal from theinstruction decoder 21. Other mode signals shown in the figures are supplied. Thesystem controller 26 is implemented as a logic circuit that performs flow control for instruction execution, operation mode control, control of access to thebank memory 3, and the like. -
FIG. 4 shows an operation configuration of the register banks RBK0 to RBKi. A description is made of FILO access control over thebank memory 3 by thesystem controller 26. The value of the bank number BN is set to 0 immediately after reset. If an interrupt is accepted to use the register banks, thesystem controller 26 saves a register set to a bank indicated by the bank number BN and increments the bank number BN by 1. If the RESBANK instruction is executed, thesystem controller 26 decrements the bank number BN by 1 and then restores (data restore) register set data for the predetermined register set from a register bank indicated by the bank number BN. Increment and decrement operations on the bank number BN are performed by an incrementer/decrementer 29 within thecontroller 4. - <<Concurrent Execution of CPU Processing and Register Save Processing>>
-
FIG. 5 shows how register save processing is performed concurrently with CPU exception handling when an interrupt occurs. Each of registers of the register set is, e.g., 32 bits long. In this case, thededicated bus 17 for operating the register banks has a width of 128 bits to allow parallel input and output of, e.g., four registers. The wide bus width of thededicated bus 17 enables concurrent transfer of plural registers and increases transfer efficiency. Since thededicated bus 17 for operating the register banks is exclusively used for the register banks, theCPU 2 can perform save and restore processing for the register set concurrently with other processing. Register save processing is performed concurrently with CPU exception handling when an interrupt occurs, so that overhead by the register save processing can be apparently zeroed or greatly reduced. InFIG. 5 , since saving of the register set is automatically started when an interrupt is accepted, it is started before the first instruction of an interrupt service routine is fetched according to an interrupt vector, resulting in further increased interrupt responsibility. -
FIG. 6 shows examples of interrupt response processing time and interrupt restore processing time when the above-described register bank method is used. To illustrate comparisons withFIG. 6 ,FIG. 7 shows examples of interrupt response processing time and interrupt restore processing time when saving and restoring to and from a stack area are performed using data transfer instructions without employing the register banks. - <<Register Bank Overflow Processing>>
- Next, register bank overflow processing will be described. An overflow of the register banks is made detectable by providing the status register SR with an overflow flag BO indicating an overflow of the register banks.
FIG. 8 shows the overflow flag BO. - If an interrupt occurs in a state in which data has been saved to all banks of the register banks, and the interrupt accepted in the
CPU 2 is permitted to use the register banks (register bank overflow), register set data is automatically saved to a stack area instead of the register banks. Automatic saving to and restoring from the stack area are performed as described below. - In save operation, according to the value of the stack pointer SP, the status register SR, the program counter PC, and the predetermined register set R0 to R14, GBR, MACH, MACL, and PR are saved to a stack area. Next, a register bank overflow bit BO of the status register SR is set to “1”. A bank number BN of the bank number register IBNR is kept set to a maximum value.
- If the RESBANK instruction is executed when the register bank overflow bit BO of the status register SR is set to “1”, restore operation is performed as follows. According to the value of the stack pointer SP, data is restored from the stack area to the predetermined register set R0 to R14, GBR, MACH, MACL, and PR. A bank number BN of the bank number register IBNR is kept set to a maximum value.
- On the other hand, if an interrupt occurs in a state in which data has been saved to all banks of the register banks, the interrupt accepted in the
CPU 2 is permitted to use the register banks, and the execution of register bank error exception handling is selected by predetermined setting within the interrupt controller, the register bank error exception handling described below is started. First, the status register SR is saved to the stack area. Next, the program counter (PC) 27 is saved to the stack area. The value of the program counter (PC) 27 to be saved is the start address of an instruction next to the instruction last executed. An exception service routine address is fetched from an exception handling vector table corresponding to a register bank error that occurred, and a program is executed from the address. In this case, saving to the register banks is not performed and the bank number BN is unchanged. This is intended for applications requested to take necessary action, upon detecting that the register banks cannot be used due to an overflow of them. This function is effective to detect that desired performance is not obtained, and at least for debugging. - By the way, also when the register bank restore instruction (RESBANK instruction) is executed when the register banks are empty (BN=0), register bank error exception handling is performed. This is obviously abnormal operation that must be detected.
- By providing the above-described overflow flag BO, when data is restored to a register set, an overflow of the register banks can be recognized. This helps to prevent the data processor from undesirable operation stop due to an overflow of the register banks.
- <<Consideration of Task Switching>>
- When the
CPU 2 performs multitask processing under management of the OS, as shown inFIG. 9 , a return destination after interrupt service is not always an interrupt source. Depending on the status of events managed by the OS, control may be returned to a different task (task B). -
FIG. 10 shows a processing procedure when task switching is performed.FIG. 11 shows a relationship among a register set, register banks, and an OS internal table in processing ofFIG. 10 . We will examine tag switching by the above-described interrupt, with reference toFIGS. 10 and 11 . TheCPU 2 starts saving to the register banks in response to the occurrence of the interrupt exception handling ({circle around (1)}). In an interrupt service routine, that is, within OS processing after the interrupt exception handling, theCPU 2 executes a RESBANK instruction to restore storage information from a register bank last saved to the predetermined register set ({circumflex over (2)}). At this time, if task switching is performed depending on the status of events managed by the OS, the central processing unit stores the register set data of a task (task A) before the switching in an OS internal table ({circumflex over (3)}), and restores the stored data of a register set on a task (task B) after the switching from the OS internal table to the register set ({circumflex over (4)}). The processings of {circumflex over (3)} and {circumflex over (4)} are based on the OS. After a program counter value indicating of a return destination of the task B and the value of the status register are prepared in the stack area of the OS, theCPU 2 restores them from the stack area and executes a return instruction (RTE instruction) to enable return to program execution processing at a switching destination. The central processing unit separately has the RESBANK instruction (register restore instruction) and the RTE instruction (return instruction). This takes into account a case where the return from the OS in interrupt exception handling involves task switching. If task switching is not involved, the processings {circumflex over (3)} and {circumflex over (4)} by the OS following the register restore instruction become unnecessary, and there is no need to separate processing of the register restore instruction from processing of the return instruction. However, unifying the both instructions into one instruction makes task switching difficult and causes an overhead. In addition, unifying the both instructions into one instruction makes it necessary to specify operation corresponding to OS processing by parameters of instructions concerned, and produces the need to identify specification of addressing modes for an OS internal table and the processing routines to be executed differently depending on whether task switching is to be performed, increasing parameters and complicating instructions. - Since the RESBANK instruction (bank restore instruction) is used as an instruction exclusively used to restore banks, which is independent of the RTE instruction such as subroutine return instructions, the data processor smoothly and efficiently perform restoration from interrupts, whether task switching is involved or not, and is excellent in applicability to multitask processing.
- <<Register Bank Transfer Instruction>>
- An instruction set of the
CPU 2 contains register bank transfer instructions as shown inFIG. 12 . The register bank transfer instructions, which are instructions used for debugging, transfer arbitrary data of register banks to the general purpose register R0. An LDBANK instruction transfers 4-byte data from a register bank address indicated by Rm to R0. An STBANK instruction transfers R0 to a register bank address indicated by Rn. -
FIG. 13 shows correspondences between addresses (the values of Rm for LDBANK and the values of Rn for STBANK) of register bank transfer instructions and the entries of register banks. A bank number is specified bybits 15 to 7 (BN) of address, and entries (R0 to R14, GBR, MACH, MACL, PR, IVN) within the bank are specified bybits 6 to 2 of the address.Bits 31 to 16 andbits - Arbitrary data of register banks can be transferred by one register bank transfer instruction.
- Hereinbefore, the invention made by the inventor has been described in detail based on embodiments. It goes without saying that the present invention is not limited to the embodiments, and variations and modifications may be made without departing from the scope of the present invention.
- For example, coprocessor registers such as a floating-point operation unit (FPU) and a digital signal processing unit (DSP) may be contained in a register set and saved and restored together with the general purpose registers and the like. In cases where the coprocessors are used in interrupt service, if these registers are also saved and restored at the same time, performance is increased. However, it is necessary to devise interrupt handling so as not to use the coprocessor registers and provide more bank areas. Thereby, time required to save and restore the coprocessors can be cut.
- If a number of bank areas equal to the number of interrupts cannot be allocated, a method referred to as interrupt selection type register banks may be used. When an interrupt occurs, if there is no empty bank, a stack area is used. In this case, there may occur a situation where interrupts of high levels cannot use banks, depending on an interrupt nest status; this is fatal to real-time systems. Therefore, if there is no empty bank, interrupts to use banks are made selectable to maintain real-time capability. This helps to improve interrupt performance in microcomputers with limited bank areas.
- To be more specific, for each interrupt level, “bank interrupts (interrupt levels that always use banks)” and “don't care interrupt (interrupt levels that may use either of banks and stack)” are statically decided. When an interrupt occurs, if the interrupt is a bank interrupt, register banks are switched by a bank switching instruction (e.g.,
current bank 0→1). If it is a don't care interrupt, when the number of remaining banks minus the number of remaining interrupts is one or greater, banks are switched, and when 0, the contents of a current bank are saved to the stack, whereby the don't care interrupt also effectively uses the banks. Since register save destinations extend to banks and the stack, the CPU keeps track of how many stacking operations have been performed in which bank being used, a bank switching instruction switches banks on the basis of the information, and stack/pop control is performed. However, since this method requires bank and stack control, it has less effective performance and more complicated CPU hardware than the above-described interrupt bank method. - By providing register banks for all tasks respectively besides interrupts, register save and restore processing during task switching can be omitted. Task registers can be rapidly saved and restored. Since the hardware cannot recognize OS tasks, it is necessary to switch banks, based on information indicating which tasks are assigned to which banks. This method complicates CPU hardware and requires large-capacity banks, like the above-described method.
- There is provided an area using a dedicated bus which is different from the RAM area. Memory access is enabled in parallel with other execution stages of an instruction, so that apparent memory access overhead is zeroed. This area is allocated to address space and can be accessed like normal memory areas. This area can be used as a memory area exclusively used for stack to speed up register saving and restoring and increase the performance of interrupt service and task processing. Also, its use can be expanded in combination with the RAM.
- The register banks are not limited to a circuit allocated on the RAM for a register set within the CPU. Conceptually, they may be constituted by a register file that makes up plural register sets.
- Effects obtained by representative examples of the invention disclosed in this application will be briefly described.
- Since an overflow flag of the register banks is used, in data restoration to a register set, an overflow of the register banks can be recognized. This prevents the data processor from undesirable operation stop due to an overflow of the register banks.
- Since a bank restore instruction is used as an instruction exclusively used to restore banks, which is independent of a return instruction, the data processor can smoothly and efficiently perform restoration from interrupts, whether task switching is involved or not, and is excellent in applicability to multitask processing.
- Concurrent saving of plural registers reduces interrupt service time. By connecting a bank area over a dedicated bus to perform parallel processing, apparent overhead of register save and restore processing can be reduced.
Claims (9)
1-15. (canceled)
16. A data processor comprising:
a central processing unit including a status register and a register set;
a plurality of register banks corresponding to said register set;
a bank number register indicating states of said register banks; and
a bank control register indicating permit using of said register banks for each of interrupt priority levels,
wherein said plurality of register banks are operable to save information of said register set,
wherein said status register includes an overflow flag indicating states of said plurality of register banks, and
wherein said overflow flag is set when an interrupt of a priority level which is permitted use of said register banks occurs in a state of said bank number register indicating that information has been saved to all of said register banks.
17. A data processor according to claim 16 ,
wherein said central processing unit saves information of said register set to a stack area when an interrupt of priority level, which is permitted use of said register banks, occurs in state of said bank number register indicating that information has been saved to all of said register banks.
18. A data processor according to claim 17 ,
wherein said central processing unit restores information from said stack area to said register set when said restore is instructed in a state of said overflow flag being set.
19. A data processor according to claim 18 , further comprising:
a program counter indicating an instruction address executed by said central processing unit,
wherein said register set is operable for saving information to said register banks, and
wherein said register set includes general purpose registers, a global register, a multiplication register, a procedure register.
20. A data processor according to claim 19 ,
wherein information of said status register and said program counter is saved to said stack area.
21. A data processor according to claim 20 ,
wherein said central processing unit executes a predetermined exception handling routine and saves information of said program counter to said stack area, when an interrupt occurs in a state in which information has been saved to all register banks, and said interrupt is allowed use of said register banks, and said interrupt indicates execution of said predetermined exception handling routine.
22. A data processor according to claim 16 , further comprising:
a memory including said plurality of register banks; and
a bus coupled to said memory and said register set,
wherein said bus has at least a number of bits of two registers included in said register set.
23. A data processor according to claim 19 ,
wherein said central processing unit operates to effect saving of said information of said status register, said program counter and said register set in response to said occurrence of an interrupt exception.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/868,471 US20080046697A1 (en) | 2002-11-05 | 2007-10-06 | Data processor |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002320788A JP2004157636A (en) | 2002-11-05 | 2002-11-05 | Data processing apparatus |
JP2002-320788 | 2002-11-05 | ||
US10/690,643 US7290124B2 (en) | 2002-11-05 | 2003-10-23 | Data processor employing register banks with overflow protection to enhance interrupt processing and task switching |
US11/868,471 US20080046697A1 (en) | 2002-11-05 | 2007-10-06 | Data processor |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/690,643 Continuation US7290124B2 (en) | 2002-11-05 | 2003-10-23 | Data processor employing register banks with overflow protection to enhance interrupt processing and task switching |
Publications (1)
Publication Number | Publication Date |
---|---|
US20080046697A1 true US20080046697A1 (en) | 2008-02-21 |
Family
ID=32375701
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/690,643 Expired - Lifetime US7290124B2 (en) | 2002-11-05 | 2003-10-23 | Data processor employing register banks with overflow protection to enhance interrupt processing and task switching |
US11/868,471 Abandoned US20080046697A1 (en) | 2002-11-05 | 2007-10-06 | Data processor |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/690,643 Expired - Lifetime US7290124B2 (en) | 2002-11-05 | 2003-10-23 | Data processor employing register banks with overflow protection to enhance interrupt processing and task switching |
Country Status (2)
Country | Link |
---|---|
US (2) | US7290124B2 (en) |
JP (1) | JP2004157636A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100100691A1 (en) * | 2008-10-18 | 2010-04-22 | Micron Technology, Inc. | Indirect Register Access Method and System |
US20110225397A1 (en) * | 2010-03-15 | 2011-09-15 | Arm Limited | Mapping between registers used by multiple instruction sets |
US20130166810A1 (en) * | 2011-12-27 | 2013-06-27 | Electronics And Telecommunications Research Institute | Apparatus for processing register window overflow and underflow |
US20180293095A1 (en) * | 2017-04-07 | 2018-10-11 | Renesas Electronics Corporation | Semiconductor device |
US10559055B2 (en) | 2015-07-31 | 2020-02-11 | Arm Limited | Graphics processing systems |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005020065A2 (en) * | 2003-08-25 | 2005-03-03 | Koninklijke Philips Electronics, N.V. | Dynamic retention of hardware register content in a computer system |
JP2007072857A (en) * | 2005-09-08 | 2007-03-22 | Oki Electric Ind Co Ltd | Arithmetic processing unit and information processing device |
JP4756599B2 (en) * | 2006-07-04 | 2011-08-24 | ルネサスエレクトロニクス株式会社 | Data processing device |
US7685409B2 (en) * | 2007-02-21 | 2010-03-23 | Qualcomm Incorporated | On-demand multi-thread multimedia processor |
JP4965638B2 (en) * | 2009-12-25 | 2012-07-04 | インターナショナル・ビジネス・マシーンズ・コーポレーション | System and method for controlling task switching |
FR2962567B1 (en) * | 2010-07-12 | 2013-04-26 | Bull Sas | METHOD FOR OPTIMIZING MEMORY ACCESS, WHEN RE-EXECUTING AN APPLICATION, IN A MICROPROCESSOR COMPRISING SEVERAL LOGICAL HEARTS AND COMPUTER PROGRAM USING SUCH A METHOD |
GB2486738B (en) * | 2010-12-24 | 2018-09-19 | Qualcomm Technologies Int Ltd | Instruction execution |
US11226909B2 (en) * | 2018-08-24 | 2022-01-18 | Rambus Inc. | DRAM interface mode with interruptible internal transfer operation |
JP6973856B2 (en) * | 2018-11-22 | 2021-12-01 | Necプラットフォームズ株式会社 | Information processing device, execution method and program modification method |
CN111782269B (en) * | 2020-06-04 | 2023-12-12 | 珠海格力电器股份有限公司 | Interrupt processing method and interrupt processing equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3810117A (en) * | 1972-10-20 | 1974-05-07 | Ibm | Stack mechanism for a data processor |
US5640582A (en) * | 1992-05-21 | 1997-06-17 | Intel Corporation | Register stacking in a computer system |
US5642516A (en) * | 1994-10-14 | 1997-06-24 | Cirrus Logic, Inc. | Selective shadowing of registers for interrupt processing |
US5696957A (en) * | 1991-05-17 | 1997-12-09 | Ricoh Company, Ltd | Integrated circuit comprising a central processing unit for executing a plurality of programs |
US6108767A (en) * | 1998-07-24 | 2000-08-22 | Sun Microsystems, Inc. | Method, apparatus and computer program product for selecting a predictor to minimize exception traps from a top-of-stack cache |
US6223279B1 (en) * | 1991-04-30 | 2001-04-24 | Kabushiki Kaisha Toshiba | Single chip microcomputer having a dedicated address bus and dedicated data bus for transferring register bank data to and from an on-line RAM |
US6487630B2 (en) * | 1999-02-26 | 2002-11-26 | Intel Corporation | Processor with register stack engine that dynamically spills/fills physical registers to backing store |
US7024541B2 (en) * | 2002-06-07 | 2006-04-04 | Sun Microsystems, Inc. | Register window spill technique for retirement window having entry size less than amount of spill instructions |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05165641A (en) | 1991-04-30 | 1993-07-02 | Toshiba Corp | Single chip microcomputer |
JP3206960B2 (en) | 1991-05-17 | 2001-09-10 | 株式会社リコー | Extended central processing unit |
JPH06309169A (en) | 1993-04-27 | 1994-11-04 | Toshiba Corp | Information processor |
-
2002
- 2002-11-05 JP JP2002320788A patent/JP2004157636A/en active Pending
-
2003
- 2003-10-23 US US10/690,643 patent/US7290124B2/en not_active Expired - Lifetime
-
2007
- 2007-10-06 US US11/868,471 patent/US20080046697A1/en not_active Abandoned
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3810117A (en) * | 1972-10-20 | 1974-05-07 | Ibm | Stack mechanism for a data processor |
US6223279B1 (en) * | 1991-04-30 | 2001-04-24 | Kabushiki Kaisha Toshiba | Single chip microcomputer having a dedicated address bus and dedicated data bus for transferring register bank data to and from an on-line RAM |
US5696957A (en) * | 1991-05-17 | 1997-12-09 | Ricoh Company, Ltd | Integrated circuit comprising a central processing unit for executing a plurality of programs |
US5640582A (en) * | 1992-05-21 | 1997-06-17 | Intel Corporation | Register stacking in a computer system |
US5642516A (en) * | 1994-10-14 | 1997-06-24 | Cirrus Logic, Inc. | Selective shadowing of registers for interrupt processing |
US6108767A (en) * | 1998-07-24 | 2000-08-22 | Sun Microsystems, Inc. | Method, apparatus and computer program product for selecting a predictor to minimize exception traps from a top-of-stack cache |
US6487630B2 (en) * | 1999-02-26 | 2002-11-26 | Intel Corporation | Processor with register stack engine that dynamically spills/fills physical registers to backing store |
US7024541B2 (en) * | 2002-06-07 | 2006-04-04 | Sun Microsystems, Inc. | Register window spill technique for retirement window having entry size less than amount of spill instructions |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9734876B2 (en) * | 2008-10-18 | 2017-08-15 | Micron Technology, Inc. | Indirect register access method and system |
US10020033B2 (en) * | 2008-10-18 | 2018-07-10 | Micron Technology, Inc. | Indirect register access method and system |
US8938590B2 (en) * | 2008-10-18 | 2015-01-20 | Micron Technology, Inc. | Indirect register access method and system |
US20150134898A1 (en) * | 2008-10-18 | 2015-05-14 | Micron Technology, Inc. | Indirect Register Access Method and System |
US20100100691A1 (en) * | 2008-10-18 | 2010-04-22 | Micron Technology, Inc. | Indirect Register Access Method and System |
US20110225397A1 (en) * | 2010-03-15 | 2011-09-15 | Arm Limited | Mapping between registers used by multiple instruction sets |
US9092215B2 (en) * | 2010-03-15 | 2015-07-28 | Arm Limited | Mapping between registers used by multiple instruction sets |
US9213549B2 (en) * | 2011-12-27 | 2015-12-15 | Electronics And Telecommunications Research Institute | Apparatus for processing register window overflow and underflow |
US20130166810A1 (en) * | 2011-12-27 | 2013-06-27 | Electronics And Telecommunications Research Institute | Apparatus for processing register window overflow and underflow |
KR101927255B1 (en) * | 2011-12-27 | 2018-12-12 | 한국전자통신연구원 | Processing device of register window overflow/underflow |
US10559055B2 (en) | 2015-07-31 | 2020-02-11 | Arm Limited | Graphics processing systems |
US20180293095A1 (en) * | 2017-04-07 | 2018-10-11 | Renesas Electronics Corporation | Semiconductor device |
US11392407B2 (en) * | 2017-04-07 | 2022-07-19 | Renesas Electronics Corporation | Semiconductor device |
Also Published As
Publication number | Publication date |
---|---|
US7290124B2 (en) | 2007-10-30 |
US20040107337A1 (en) | 2004-06-03 |
JP2004157636A (en) | 2004-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080046697A1 (en) | Data processor | |
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 | |
US5812868A (en) | Method and apparatus for selecting a register file in a data processing system | |
US5740413A (en) | Method and apparatus for providing address breakpoints, branch breakpoints, and single stepping | |
US6425039B2 (en) | Accessing exception handlers without translating the address | |
US6223279B1 (en) | Single chip microcomputer having a dedicated address bus and dedicated data bus for transferring register bank data to and from an on-line RAM | |
US5701493A (en) | Exception handling method and apparatus in data processing systems | |
US5043867A (en) | Exception reporting mechanism for a vector processor | |
US5568643A (en) | Efficient interrupt control apparatus with a common interrupt control program and control method thereof | |
US4851992A (en) | Register/saving/restoring system for saving and restoring data in a register of a slave processor | |
KR100495240B1 (en) | Processor system | |
JP4114946B2 (en) | Data processing device | |
US5790872A (en) | Interrupt control handler for a RISC-type microprocessor | |
JP4756599B2 (en) | Data processing device | |
JP2677458B2 (en) | System call execution device | |
JP3659048B2 (en) | Operating system and computer | |
JPH07311686A (en) | Computer system and method for generation and processing of system management interrupt in it | |
JP3539984B2 (en) | Processor | |
EP0560393B1 (en) | Microprocessor and data processing system with register file | |
US20030051123A1 (en) | Microprocessor | |
JPH0668725B2 (en) | Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition | |
JPH07210400A (en) | Processor for multi-task processing | |
US5778207A (en) | Assisting operating-system interrupts using application-based processing | |
JPH05165641A (en) | Single chip microcomputer | |
JP2003196251A (en) | Multi-cpu system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |