Method for managing an instruction execution pipeline during debugging of a data processing system
First Claim
1. A method for debugging a data processing system, said data processing system having a processor which has an instruction execution pipeline, comprising the steps of:
- executing system code in said processor instruction execution pipeline in a normal operational manner to initiate a plurality of overlapping operations in said instruction pipeline;
halting said normal operation of said processor in a manner that saves a plurality of states representative of said overlapping operations;
executing debug code in said processor instruction execution pipeline to perform a debug operation on said processor; and
continuing execution of said system code in said processor instruction execution pipeline by restoring said plurality of states in a manner that no extraneous operations occur within said data processing system; and
wherein the step of halting further comprises;
halting the processor on a phase boundary before at least one of the plurality of overlapping operations is complete and then storing as a first state first contents of a plurality of memory elements within the processor;
executing one phase of the instruction execution pipeline and then storing as a second state second contents of the plurality of memory elements; and
repeating the step of executing one phase and then storing another state until all of the plurality of overlapping operations is complete.
1 Assignment
0 Petitions
Accused Products
Abstract
A data processing system on an integrated circuit 42 with microprocessor 1 and peripheral devices 60-61 is provided with an emulation unit 50 which allows debugging and emulation of integrated circuit 42 when connected to an external test system 51. Microprocessor 1 has in instruction execution pipeline which has several execution phases which involve fetch/decode units 10a-c and functional execution units 12, 14, 16 and 18. The pipeline of microprocessor 1 is unprotected so that memory access latency to data memory 22 and register file 20 can be utilized by system program code which is stored in instruction memory 23. Emulation unit 50 provides means for emulating the unprotected pipeline of microprocessor 1 and for rapidly uploading and downloading memories 22-23. Emulation unit 50 operates in a manner to prevent extraneous operations from occurring which could otherwise affect memories 22-23 or peripheral devices 60-61 during emulation.
125 Citations
24 Claims
-
1. A method for debugging a data processing system, said data processing system having a processor which has an instruction execution pipeline, comprising the steps of:
-
executing system code in said processor instruction execution pipeline in a normal operational manner to initiate a plurality of overlapping operations in said instruction pipeline; halting said normal operation of said processor in a manner that saves a plurality of states representative of said overlapping operations; executing debug code in said processor instruction execution pipeline to perform a debug operation on said processor; and continuing execution of said system code in said processor instruction execution pipeline by restoring said plurality of states in a manner that no extraneous operations occur within said data processing system; and wherein the step of halting further comprises; halting the processor on a phase boundary before at least one of the plurality of overlapping operations is complete and then storing as a first state first contents of a plurality of memory elements within the processor; executing one phase of the instruction execution pipeline and then storing as a second state second contents of the plurality of memory elements; and repeating the step of executing one phase and then storing another state until all of the plurality of overlapping operations is complete. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for debugging a processor within a data processing system, the processor having an instruction execution pipeline, comprising the steps of:
-
executing a sequence of instructions in the processor instruction execution pipeline in a normal operational manner to initiate a plurality of partially executed instructions in a plurality of stages of the instruction pipeline; halting the normal operation of the processor in response to a debug event such that the plurality of partially executed instructions is maintained and then saving a first state representative of the instruction execution pipeline; inhibiting fetching of a new instruction; single stepping the instruction execution pipeline one pipeline phase and then saving a second state representative of the instruction pipeline; and repeating the step of single stepping the instruction execution pipeline one pipeline phase and saving another state representative of the instruction pipeline until the instruction execution pipeline is flushed of partially executed instructions. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A data processing system comprising a microprocessor instruction, the microprocessor comprising:
-
an instruction register; an instruction execution pipeline connected to the instruction register for executing system code from the instruction register, operable to initiate a plurality of overlapping operations in the instruction execution pipeline; emulation circuitry connected to the instruction execution pipeline and to the instruction register for halting the normal operation of the processor, the emulation circuitry operable to halt the instruction execution pipeline on a phase boundary before at least one of the plurality of overlapping operations is complete and then store as a first state first contents of a plurality of memory elements within the processor; the emulation circuitry further operable to inhibit instruction fetching in the instruction register and to cause the instruction execution pipeline to advance on one phase and to then store as a second state second contents of the plurality of memory elements; and the emulation circuitry further operable to repeat the steps of executing one phase and then storing another state until the system code instructions are flushed from the instruction execution pipeline. - View Dependent Claims (21, 22, 23, 24)
-
Specification