Claims
- 1. Apparatus for detecting and executing program instruction traps in a superscalar processor operating on a plurality of pipelined instructions, said apparatus comprising:
- a fetch means for fetching consecutive instructions from an instruction cache and a main memory,
- an instruction FIFO memory for storing fetched instructions from said fetch means, and
- an instruction decode means for removing instructions from said FIFO memory in accordance with the relative ages of instructions stored in said FIFO memory, said decode means examining said instructions removed from said FIFO memory for trapping conditions, and flushing from said FIFO memory all younger instructions in response to identification of a trap in an instruction, and
- a plurality of state registers coupled to the decode means for indicating the operating state of the processor and wherein certain instructions in a sequence of instructions modify said state registers,
- said decode means examining said instructions for modifying said state registers and performing a specified trap action by blocking the issuance of younger instructions until a state register modifying instruction has been executed, the state register being locked and inaccessible until updated by execution of the instruction.
- 2. Apparatus as defined by claim 1 wherein said state registers include a supervisor register, an enable floating-point (EF) register, a current window pointer (CWP) register, and a window invalid mask (WIM) register.
- 3. Apparatus as defined by claim 2 and further including a trap base register and a trap type register which are concatenated to form an address for said fetch means in accessing a trapping instruction.
- 4. Apparatus as defined by claim 3 wherein said fetch means includes memory management means for supporting paging of main memory.
- 5. Apparatus as defined by claim 3 wherein said decode means distinguishes between hardware traps and software traps.
- 6. Apparatus as defined by claim 5 wherein in response to a hardware trap instruction said decode means
- a) waits for said CWP register to become unlocked, decrements the CWP register current value by one, and forces said supervisor register to one,
- b) formulates and issues a pseudo-instruction containing an address of the oldest instruction in said FIFO memory,
- c) flushes all contents of said FIFO memory, thereby deleting the trapping instruction and all younger instructions,
- d) determines a correct code for a highest-priority trapping condition for said hardware trap instruction and writes said code into said trap type register, and
- e) signals said fetch means to update the fetch address as the concatenation of contents of said trap base register and said trap type register.
- 7. Apparatus as defined by claim 5 wherein in response to a software trap instruction said decode means
- a) waits for said CWP register to become unlocked, decrements the CWP register current value by one, and forces said supervisor register to one,
- b) formulates and issues a pseudo-instruction containing an address of the oldest instruction in said FIFO memory,
- c) issues the oldest instruction to an execution means, records an identification of said oldest instruction, and flushes all remaining instructions from said FIFO memory,
- d) monitors an update bus from the execution means for a valid signal concurrent with an instruction identification matching the recorded identification,
- e) captures a code for a data portion from the execution means and write said code into said trap type register, and
- f) signals said fetch means to update the fetch address as the concatenation of contents of said trap base register and said trap type register.
- 8. Apparatus as defined by claim 1 and further including a trap base register and a trap type register which are concatenated to form an address for said fetch means in accessing a trapping instruction.
- 9. Apparatus as defined by claim 1 wherein said fetch means includes memory management means for supporting paging of main memory.
Parent Case Info
This is a division of application Ser. No. 08/431,219, filed Apr. 28, 1995, now U.S. Pat. No. 5,692,170.
US Referenced Citations (11)
Foreign Referenced Citations (3)
Number |
Date |
Country |
0 514 092 A3 |
Nov 1992 |
EPX |
0 529 305 |
Mar 1993 |
EPX |
WO 9301563 |
Jan 1993 |
WOX |
Non-Patent Literature Citations (2)
Entry |
C. Melear, "The design of the 88000 RISC family," IEEE Micro, 9(2) pp. :26-38 (Apr. 1, 1989). |
J. Smith et al., "Implementing precise interrupts in pipelined processors," IEEE Transactions on Computers 37(5), pp. 562-573 (May 5, 1988). |
Divisions (1)
|
Number |
Date |
Country |
Parent |
431219 |
Apr 1995 |
|