Single-chip data processor handling synchronous and asynchronous exceptions by branching from a first exception handler to a second exception handler
First Claim
1. A single-chip data processor comprising:
- a central processing unit; and
a storage circuit, adapted for storing an exception code in response to an exception event, wherein the exception code corresponds to the exception event, comprising;
a first portion adapted for storing the exception code corresponding to a first type of exception event that occurs synchronously with the operation of the central processing unit; and
a second portion adapted for storing the exception code corresponding to a second type of exception event that occurs asynchronously with the operation of the central processing unit; and
wherein the central processing unit includes;
a program counter;
a plurality of general purpose registers;
a base register storing a vector base address, the vector base address representing a start address of a vector table corresponding to a plurality of exception handlers, wherein the vector base address is changeable in response to a program executed by the central processing unit, anda control unit which, in response to the occurrence of an exception event, writes a first instruction address into the program counter based on the vector base address and a predetermined vector offset, wherein the predetermined vector offset is assigned in advance to the exception event and provided in response to the exception event so that a first exception handler assigned to the first instruction address may be executed,wherein the central processing unit calculates a second instruction address of a second exception handler from the first exception handler by utilizing the exception code stored in the storage circuit as an address offset without the calculation effecting the plurality of general purpose registers.
3 Assignments
0 Petitions
Accused Products
Abstract
A vector point of an exception handler related to TLB miss exception events is obtained by reading a vector base address of a register VBR one time, and by adding a vector offset (H'"'"'400) thereto. A vector point of an exception handler related to exception events other than the TLB miss exception events is obtained by adding a vector offset to a value (vector base address) of the register VBR, and an exception code which is an address offset obtained by reading a value of the register EXPEVT or INTEVT one time is added to the vector point that is obtained. Thus, the processing is branched to a required exception handler to execute the exception event processing related to exception events other than the TLB miss exception events.
-
Citations
15 Claims
-
1. A single-chip data processor comprising:
-
a central processing unit; and a storage circuit, adapted for storing an exception code in response to an exception event, wherein the exception code corresponds to the exception event, comprising; a first portion adapted for storing the exception code corresponding to a first type of exception event that occurs synchronously with the operation of the central processing unit; and a second portion adapted for storing the exception code corresponding to a second type of exception event that occurs asynchronously with the operation of the central processing unit; and wherein the central processing unit includes; a program counter; a plurality of general purpose registers; a base register storing a vector base address, the vector base address representing a start address of a vector table corresponding to a plurality of exception handlers, wherein the vector base address is changeable in response to a program executed by the central processing unit, and a control unit which, in response to the occurrence of an exception event, writes a first instruction address into the program counter based on the vector base address and a predetermined vector offset, wherein the predetermined vector offset is assigned in advance to the exception event and provided in response to the exception event so that a first exception handler assigned to the first instruction address may be executed, wherein the central processing unit calculates a second instruction address of a second exception handler from the first exception handler by utilizing the exception code stored in the storage circuit as an address offset without the calculation effecting the plurality of general purpose registers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A single-chip data processor comprising:
-
a central processing unit; an exception register for storing an exception code in response to occurrence of an exception event, the exception code corresponding to the exception event that has occurred, wherein the exception event is a predetermined type of exception event, the exception register having a first portion corresponding to a first predetermined type of exception event that occurs synchronously with the operation of the central processing unit and having a second portion corresponding to a second type of exception event that occurs asynchronously with the operation of the central processing unit; and the central processing unit including; a program counter; a plurality of general purpose registers; a vector base address register storing a vector base address, wherein the vector base address is changeable in response to a program executed by the central processing unit; a circuit responsive to an exception event and forming a vector offset from a number of vector offsets depending upon the type of the exception event, wherein the number of vector offsets is smaller than the number of exception events and wherein the vector offsets are fixed offsets to the vector base address for calculating vector addresses; and an arithmetic and logic unit for adding the vector base address and the vector offset and storing a calculated value in the program counter so that processing of the single-chip data processor branches to a first exception handler specified by the calculated value, wherein the central processing unit calculates a first instruction address of a second exception handler from the first exception handler utilizing the exception code stored in the exception register as an address offset without the calculation effecting the plurality of general purpose registers. - View Dependent Claims (10, 11)
-
-
12. A single-chip data processor comprising:
-
a central processing unit; an address translation look-aside buffer controller including; a storage circuit, adapted for storing an exception code in response to an exception event, wherein the exception code corresponds to the exception event, comprising; a first portion adapted for storing the exception code corresponding to a first type of exception event that occurs synchronously with the operation of the central processing unit; and a second portion adapted for storing the exception code corresponding to a second type of exception event that occurs asynchronously with the operation of the central processing unit; and the central processing unit including; a program counter; a plurality of general purpose registers; a base register storing a vector base address, the vector base address representing a start address of a vector table corresponding to a plurality of exception handlers, wherein the vector base address is changeable in response to a program executed by the central processing unit, and a control unit which, in response to the occurrence of an exception event, writes a first instruction address into the program counter based on the vector base address and a predetermined vector offset, wherein the predetermined vector offset is assigned in advance to the exception event and provided in response to the exception event so that a first exception handler assigned to the first instruction address may be executed, wherein the storage circuit holds the exception code so that the central processing unit can calculate a second instruction address of a second exception handler from the first exception handler by utilizing the exception code as an address offset without the calculation effecting the plurality of general purpose registers.
-
-
13. A single-chip data processor comprising:
-
a central processing unit; an exception register storing an exception code in response to occurrence of an exception event, the exception code corresponding to the exception event that has occurred, the exception register having a first portion corresponding to a first predetermined type of exception event that occurs synchronously with the operation of the central processing unit and having a second portion corresponding to a second type of exception event that occurs asynchronously with the operation of the central processing unit; and the central processing unit including; a program counter; a plurality of general purpose registers; a vector base address register storing a vector base address, wherein the vector base address is changeable in response to a program executed by the central processing unit; a circuit responsive to an exception event and determining a vector offset depending upon the type of the exception event; an arithmetic and logic unit, wherein the arithmetic and logic unit calculates a first address of a first exception handler based on the vector base address and the vector offset, wherein processing of the single-chip data processor branches to the first exception handler; wherein the central processing unit calculates a first instruction address of a second exception handler from the first exception handler utilizing the exception code stored in the exception register as an address offset without the calculation effecting the plurality of general purpose registers. - View Dependent Claims (14, 15)
-
Specification