METHOD AND APPARATUS FOR REQUEUEING TRAPPED MICROADDRESSES IN A PIPELINED DATA PROCESSING SYSTEM

Abstract: In a microprogrammed central processing subsystem, the apparatus and method for requeueing a sequence of microinstructions after the execution of the sequence is interrupted by identification and response to a trap condition includes a microinstruction address silo. Associated with each address is a tag field. The logic signal bit is asserted in the tag field position when a microinstruction address is selected from the decoder. When the trap return microinstruction is executed, on completion of the trap routine, and the first tag bit in the silo is asserted, then apparatus generates a Decoder Next signal as if this signal was generated by the trap return microinstruction and the addresses of the microinstruction stored in the silo are not used. If the first location in the silo does not have the tag bit asserted, then the contents of the silo are requeued to resume the original microprogram sequence until either an asserted tag bit is encountered or the silo is empty.

Description: METHOD AND APPARATUS FOR REQUEUEING TRAPPED MICROADDRESSES IN A PIPELINED DATA PROCESSING SYSTEM BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates generally to data processing systems and, more particularly, to apparatus and method for permitting a pipelined and microprogrammed data processing system, having had a microinstruction sequence in current execution interrupted to perform a procedure having a higher priority, to return to the program sequence in execution at the time of the interruption. 2. Description of the Related Art Referring to Figure 1, a typical data processing system-is shown. The data processing system includes at least one central processing unit or subsystem 10 (or 11), at least one input/output unit or subsystem 13 (or 14), a main memory unit or subsystem 15 and a system bus 19 coupling the plurality of units or subsystems. The central processing unit(s) manipulate groups of logic signals according to a sequence of instructions in a program stored in software or firmware. Typically the logic signal groups and frequently the program itself are stored in the memory unit. The input/output unit(s) provide(s) an interface between the data processing system and terminal units, mass storage units, communication units and other units requiring coupling to the data processing system. A console unit can be coupled to the central processing unit(s) in order to initialize the data processing system, to control test and diagnostic procedures, and to be used as a terminal unit after the system is in operation. The system bus, by providing a coupling between data processing system subsystems, provides a convenient technique for altering the configuration of the data processing system to accommodate a variety of processing requirements. In a data processing system, such as is illustrated in Figure 1, the actual manipulation of data signal groups takes place under the control of a group of related instructions that is generally called a program. These instructions are executed in a sequence. Referring next to Figure 2a, the execution of a series of instructions according to the related art is illustrated. During a first time interval, T,- , the instruction #1, is executed by a central processing unit subsystem. After the first instruction is executed, a next instruction #2 in the sequence is executed by the central processing unit subsystem during the second time interval,T n . Upon completion of instruction #2, the data processing unit executes instruction #3 during time interval T n . In order to maintain an orderly execution of instructions, the interval for the execution of any _ _ instruction by the data processing unit requires a predetermined period of time. If the execution time for an instruction can have a variable length, complex apparatus must then be included in the central processing unit to coordinate the exchange of data signal groups between the central processing unit and the other subsystems of the data processing system. Thus, the period for execution of the three instructions will generally be three times the basic time period. It will be clear that the basic time interval must be of sufficient duration to permit the execution of the lengthiest instruction in the instruction set. In order to provide for faster operation of the data processing system, a technique for dividing the execution of an instruction into the execution of a plurality of instruction segments has been devised. By organizing the apparatus implementing the segments in an appropriate manner, the execution of the instructions can be performed in an overlapping manner. This technique is referred to as "pipelining" the execution of an instruction set. While the execution of each pipelined instruction can take a longer period of time than is required for the execution of a nonpipelined instruction, because of the additional apparatus required for the division of the instruction into the instruction segments, an instruction stream can be executed faster than is possible for the nonsegmented instructions. In Figure 2b, the division of an instruction into a plurality of segments is shown. It will be understood in that each segment relates to a separate and independently operating group of components in the central processing unit. Registers and gates, according to principals well-known in the art of data processing system design, separate the operation of component group executing a particular segment. The subinterval, t n , for each segment must be of sufficient period of time to permit the execution of all possible segments in each apparatus group. Referring next to Figure 2c, the resulting increase in the rate of execution of a .sequence of instructions possible through the use of pipelining techniques is illustrated. Instruction #1 is now completed in the new (and possibly longer) time period of T' n equals n times t n , where t n is the subinterval required for the execution of each instruction segment and where n is the number of instruction segments required for the execution of each instruction. The next instruction in the sequence, instruction #2, begins an interval t n after the beginning of instruction #1. The third instruction in the sequence, i-nstruction #3, then begins an interval thereafter. Each instruction can take the increased amount of time for the execution. However, once the initial interval for the completion of the first instruction has passed, an instruction is completed after each interval . Thus, for a sequence of instructions, the execution of the sequence can be accelerated even though the individual instruction can take an increased length of time to execute. Referring next to Figure 3, an organization for a central processing unit 10 implementing the pipelined execution of an instruction sequence is shown. The central processing unit is divided into an instruction subunit 31 and associated control unit 32, an execution subunit 33 and a cache (or local) memory subunit 34. The- cache memory subunit 34 is coupled to the system bus 19 and exchanges groups of logic signals with the other subsystems of the data processing system by means of the system bus under control of the control unit 32. The execution subunit 33, again under control of the control unit 32, performs the manipulation of the data signal groups that is defined by the instructions being executed. The instruction subunit 31 receives the instructions to be executed and reformats the instructions in a manner that can be used to control the operation of the central processing unit 10. The reformatted instructions, or at least portions thereof, are applied to the control unit 32 to provide the configuration of the logic elements of the data processing unit 10 to implement the operation defined by the instruction. The structure defined above supports the use of microinstructions to implement macroinstructions . The macroinstructions can be implemented by a single microinstruction or by a plurality of microinstructions depending on the complexity, the nature of the apparatus of he central processing unit, and similar parameters. It β is the microinstructions that are divided into microinstruction segments, as shown in Fig. 2b. Referring to the simplified division of the data processing unit shown in Figure 3 and for purposes of illustrating the invention, the length of time for each unit of the central processing unit to complete its portion of an execution of an instruction will be taken to be equal. Thus, for an instruction to be executed by the data processing unit, the execution of a set of instructions is illustrated in Figure 2c. The first instruction will be processed by instruction unit during a first interval t n . During a second interval t , the execution subunit 33 of the data processing unit can be processing the first instruction, while the instruction subunit 31 of the central processing system can be processing the second instruction. During the third interval «, the cache memory unit can be processing instruction #1, the execution unit can be processing instruction #2, and the instruction unit can be processing instruction #3. This three level pipeline can continue as long as instructions are entered into the instruction unit. It will be clear that the division of the data processing unit into the indicated functional units is, in general, not sufficient to provide an operable pipeline configuration. Each of the functional units described above can require a plurality of suboperations to complete each requisite operation to complete the execution of each instruction. For ■ purposes of illustration, a pipeline that includes four segments, instead of the three segments described with reference to Figure 3, will be used to describe the invention. A need has therefore been felt for apparatus and method that can continue executing the instruction sequence, in a pipelined instruction sequence, at the point of interruption of the sequence. SUMMARY OF THE INVENTION It is an object of the present invention to provide an improved data processing system. It is a further object of the present invention to provide a technique for continuing execution of an instruction sequence after an interruption, at the point in the sequence at which the interruption occurred . The aforementioned and other objects are accomplished, according to the present invention, by providing a storage unit for storing the addresses of microinstructions, a well as a tag field signal associated with each address from the decoder unit that resulted in a microinstruction, that are in execution at the time an interrupting program begins execution. The original microinstruction sequence is reestablished by using the addresses in the storage unit when a tag signal is not in the storage unit and by synchronizing the instruction sequence with the address from the decoder unit corresponding to the tag signal in the tag field of the storage unit. These and other features of the present invention will be understood upon reading of the following description along with the drawings. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a data processing system capable of utilizing the present invention. FIG. 2 is a diagrammatic representation of the division of an instruction into segments. FIG. 3 is a block diagram of a control unit that can be used to control a central processing unit using segmented instruction. FIG. 4 is a diagrammatic representation of a sequence of instructions in execution that is interrupted by the identification of a trap condition. FIG. 5 is a block diagram of the circuits used for requeueing trapped microaddresses according to the present invention. FIG. 6 is a block diagram of the apparatus storing the decode marker signal. FIG. 7 is a block diagram of the apparatus illustrating how the decode marker signal provides the Decoder Select signal. FIG. 8 is a block diagram illustrating the generation of a microtrap return state signal. OPERATION OF THE PREFERRED EMBODIMENT 1. Detailed Description of the Figures Figure 1, Figure 2 and Figure 3 have been described-in the discussion of the related art. Referring to Figure 4, the requirement for the requeueing of microaddresses is illustrated. During the execution of instruction 4010, a trap condition is identified. In the example shown, the trap is identified during the fourth segment. Therefore, instructions 4011, 4012 and 4013 have begun execution and instruction 4014 would have followed had the trap condition not intervened. At the beginning of the next segment following the segment in which the trap condition was identified, a trap routine comprising instructions 5000 through 5020 is executed. The last instruction 5020 of the trap routine is a trap return instruction that terminates the trap routine. In order to resume execution of the original routine, the instructions 4011, 4012, 4013 and 4014 must be reentered into the microinstruction sequence, these instructions having been aborted. Referring next to Figure 5, a block diagram of the apparatus associated with the use of the present invention is shown. A controllable gate or multiplexer 51 selects a group of address signals that can eventually be applied to the control store 56. The selected signals can be Microcode Next Address with the Decoder Select signal, can be signals from the microaddress silo 57, or can be signals from the microstack 55. The Microcode Next Address is the address signal used in the normal microprogram sequence. The Decoder Select signal, used to control the multiplexer 54, is also used as a tag and is stored in the tag field of the silo. The signals from the microstack 55 are subroutine calling address sequences that makes returns to the calling microprogram possible on completion of execution of a micro-subroutine. The microaddress silo 57 holds the signals needed to requeue-the executing program after the execution of a trap routine. The signals selected by the controllable gate or multiplexer 51 are determined by the microaddress source select logic 58. The output signals from the multiplexer 51 are applied to icrobranch logic unit 52. The microbranch logic unit 52 also receives microbranch condition signals and these signal groups are processed in the microbranch logic unit according to a preestablished algorithm. The output signals of the microbranch logic unit 52 are applied to controllable gate or multiplexer 53 and to the microaddress silo 57. Any of the addresses 4011 to 4014 in Figure 4 could have resulted from the branch conditions produced by previous microinstructions. Because these conditions are not saved and restored across execution of trap routines, all resulting addresses 4011 through 4014 must be saved and requeued, rather than allowing the microbranch logic to regenerate them. The multiplexer 53 also receives microtrap vector signals, and the signal group selected by the multiplexer 53 and applied to its output terminals is determined by the presence or absence of a Global Microtrap signal, a signal that is generated when the trap conditions are identified. The output signals of the multiplexer 53 are applied to the micro stack " 55 and to a controllable gate or multiplexer 54. The multiplexer 54 also receives Decoder Microaddress signals, and the signals selected at the output terminals of the multiplexer 54 are determined by the assertion of the Decoder Select signal. The output signals from the multiplexer 54 are applied as the address to the control store 56. The output signals from the control store 56 are used to control the state of the central processing unit. Referring next to Figure 6, a diagram illustrating the contents of the microaddress silo 57 is illustrated. The size of the silo is determined by the number of microinstructions that are in execution at the time that the trap conditions are identified. Referring to Figure 4, the instructions 4011, 4012 and 4013 are still in execution, and 4014 would follow, at the time of the trap condition identification in the fourth segment of the microinstruction 4010; therefore a four deep silo (having locations 601, 602, 603 and 604) is required. The address of the instruction 4014 replaced by the trap routine 5000 is thus saved at location 604 immediately behind the addresses of instructions 4011 (at location 601), 4012 (at location 602) and 4013 (at location 603) in the silo. The contents of each location in the silo 57 include a microaddress field and a (single bit position) tag field. Figure 6 also illustrates a feature of the present invention wherein the tag field is associated with the address in lieu of which decoder's address was used. Referring next to Figure 7, the multiplexer/controllable gate 71 receives the Decoder Tag signal at one terminal and the Decoder Next signal at the second terminal. A signal associated with the Trap Return instruction selects the Decoder Tag signal for the duration that the Trap Return signal is present. After the Trap Return signal is removed, gate 71 thereafter selects the Decoder Next signal from the control store 56. The output signal of the multiplexer 71, after some processing, becomes the Decoder Select signal, which is applied to the control terminal of multiplexer 54 and is used as input to the microaddress silo 57 to be stored as the tag signal. Referring next to Figure 8, the apparatus for selecting or not selecting the addresses in the silo is shown. The tag field signal of a location in silo 57 is applied to an inverting terminal of logic "AND" gate 81, while a second input terminal of logic "AND" gate 81 has a signal applied thereto when the Microtrap Return instruction is present. The output terminal of the logic "AND" gate 81 is coupled to an input terminal of delay network 82 and to a "set" terminal of a state device 84. The output terminal of delay network 82 is coupled to a first input terminal of logic "OR" gate 83, while a second input terminal of logic "OR" gate 83 receives the tag field signal. The output terminal of logic "OR" gate 83 is coupled to the "reset" terminal of state device 84. When the Microtrap Return signal and the tag field signal are present, then the signal at the output terminal of the state device 84 is not asserted and the silo 57 is prevented from applying addresses to the control store 56. When the Microtrap Return signal is present, but the tag field is not present, then the state device is set, resulting in the use of the address fields in the silo 57 to be used in addressing the control store 56. The state device 84 will be set for the delay time of the network 82. This delay time will be determined by the depth of the silo, and in the present example, the delay will be for three clock cycles, and, in conjunction with one cycle long trap return signal, it can be used to requeue the four microaddresses saved in the silo. During this period, if the tag signal is found to be asserted at any location in the silo, then state device 84 is reset via logic "OR" gate 83, thus preventing any subsequent requeueing. 2. Operation of the Preferred Embodiment The operation of the present invention can be understood with reference to Figure 5. The control store 56 provides the signals that control the associated apparatus during the execution of a sequence of instructions. During the execution, if any reason arises requiring execution of a special microinstruction sequence, then the currently executing sequence must be interrupted, giving precedence to the special sequence and, on completion of which, the original sequence can be resumed. When such conditions, known as trap conditions, are identified in the data processing unit, then a Global Micro Trap signal is generated. The Global Micro Trap signal causes the multiplexer circuit 55 to apply the Microtrap Vector signal, appropriate for the trap condition, to the control store units 56, thereby configuring the central processing unit to execute the trap procedure. In -addition, the Global Micro Tra'p signal causes the contents of the microaddress silo 58 to be frozen for the duration of the execution of the trap procedure. In the absence of the Global Micro Trap signal, the address of the control store is determined by multiplexer circuit 53 and multiplexer circuit 54. During the normal execution of an instruction sequence, the address applied to the control store unit 56 is determined by microbranch conditions, Microcode Next Address and Decoder Select signals and by subroutine calling an address stored in the microstack 101. During return from a trap procedure, the microaddresses that would continue the interrupted microprogram sequence come from the microaddress silo 57. During normal operation of the central processing unit, the address applied to the control store units are stored in silo 57 along with its tag signal and are therefore available to reestablish the state of the central processing unit that existed at the time of identification of a trap condition. The requeueing of the stored microaddresses has the following priorities as implemented by the present invention. The first priority is to synchronize the instruction sequence with the Decoder Tag signal. An explanation of the need for such synchronization is as follows. The Decoder Select signal causes multiplexer or controllable gate 54 to select the decoder-prepared microaddress which results from decoding of the current or following macroinstruction. Once the microprogam originating at the decoder's microaddress begins execution, the addresses stored in the silo are not necessary and may even be incorrect. The Decoder tag signal, derived from the Decoder Select signal and stored in the tag field portion of the silo 57, is available during the requeueing of the microaddresses from the silo 57 and is in time to decide if the decoder's microaddress should "be selected in preference over the address from the silo 57. Such decision is made with the selection apparatus shown in Figure 7. Thus, the presence of the decoder tag signal in the silo causes the instruction sequence to be synchronized with the macroinstruction sequence. In other words, when the tag signal is in the first position, 601, of the silo 57 and the signal is then applied to the selection apparatus of Figure 7, the instruction sequence appears as if the preceding instruction (trap return instruction) had requested the next microinstruction address to "come from the decoder. If the decoder tag signal is present in the tag field of the microaddress silo at a position other than the first position (i.e. 602, 603 or 604), the tag signal is used only to prevent the remaining addresses stored in the silo from being used. The corresponding preceding microinstruction, which gave rise to the Decoder Next signal, would, during requeueing normally cause the selection of decoder's microaddress, just as it did at the time of the trap. When the tag signal is not in the silo, the priority situation of requeueing all the addresses stored in microaddress silo 57 occurs. The result is that the original instruction sequence can be correctly resumed after the interruption. The foregoing description is included to illustrate the operation of the preferred embodiment and is not meant to limit the scope of the invention. The scope of the invention is to be limited only by the following claims. From the foregoing description, many variations will be apparent to those skilled in the art that would yet be encompassed by the spirit and scope of the invention.

Claims: What is Claimed is: 1. In a microprogrammed central processing unit, the method of requeueing addresses of executing microinstructions after execution of a trap routine comprising the steps of: storing the addresses of said microinstructions in execution when a trap condition is identified; associating with each of said stored addresses a tag signal whenever a microaddress from a decoder is used as a consequence of a decoder select signal; and generating a decoder select signal along with a trap return microinstruction when said tag signal is associated with a first stored instruction. 2. The method of requeueing microinstructions of Claim 1 further comprising the step of applying said stored addresses to a microprogrammed control unit when said tag signal is not associated with said first stored address. 3. The method of requeueing microinstructions of Claim 2 further including the step of ignoring stored addresses associated with and following said stored tag signal. 4. Apparatus for requeueing microinstructions following an interruption in a microinstruction sequence comprising: storage means for storing microaddresses of microinstructions in execution when said interruption is identified; tag means for storing an activation signal that is applied to an address selection logic when a decoder address is applied to a microprogam control unit; and gate means for using ' said stored activation signal to control an address applied to said control store . 5. The requeueing apparatus of claim 4 further including means for issuing said activation signal during a last instruction of an interrupting instruction sequence when said activation signal is stored along with the first instruction to be requeued. 6. The requeueing apparatus of Claim 5 further including means for transferring said stored addresses to a control unit following completion of said interrupting instruction sequence and means for preventing said transfer following identification of an activation signal stored in said storage means. 7. Apparatus for requeueing a microinstruction sequence after interruption by a trap routine comprising : storage means for storing addresses of microinstructions interrupted by said trap routine, said storage means sequentially transferring said stored addresses after execution of said trap routine, wherein a decoder signal is stored with an address of the following microinstruction; synchronization means for synchronizing said o requeued instruction sequence with a decoder signal. 8. The requeueing apparatus of Claim 7 further comprising means for generating said decoder signal when said stored decoder signal is in the first stored microinstruction.

Inventors: CLARK DOUGLAS W, MISHRA SUDHINDRA N, CLARK, DOUGLAS, W., MISHRA, SUDHINDRA, N.
Applicants: DIGITAL EQUIPMENT CORP, DIGITAL EQUIPMENT CORPORATION
Application year: 1987
Main classification: G06F9
IPC codes: G06F9