INSTRUCTION BUFFER BYPASS APPARATUS

Abstract: A bypass apparatus in a computer system is disclosed. The computer system includes a central storage facility for storing various instructions to be executed, an instruction register for storing an instruction being executed, and an instruction buffer, interconnected between the central storage facility and the instruction register, for temporarily storing the next instructions to be executed following execu­ tion of the instruction stored in the instruction register. A bypass path interconnects the cache to the instruction regis­ ter for bypassing the instruction buffer when certain special instructions are being executed, such as an EXECUTE in­ struction. Consequently, the contents of the instruction buf­ fer are not lost or destroyed as a result of execution of the special instruction. The computer system further includes an execute register interconnected between the central storage facility and the instruction register for storing one or more bytes of the instruction being executed when the byte-length of the instruction is greaterthan the byte-length of the instruction register which stores said instruction.

Description: The subject matter of the present invention pertains to a computer system, and more particularly, to a bypass path in a computer system for bypassing an instruction buffer when certain specific instructions are being executed. Prior art computer systems, such as that shown in U.S. Patent No. 3,949,379, execute instructions in a predetermined sequence. In such systems, an instruction to be executed is stored in an instruction register. An instruction buffer is connected to the instruction register for storing a next instruction to be executed in the sequence. When execution of the instruction is complete, the next instruction in the sequence, stored in the instruction buffer, is transferred to the instruction register, whereby execution of the next instruction commences. When execution of the next instruction begins, a further instruction in the sequence is stored in the instruction buffer. However, certain special instructions, such as an EXECUTE instruction, may appear in the sequence. When a special instruction in the sequence is transferred to the instruction register for execution, another instruction, herein referred to as a "subject instruction", is taken out-of-sequence from the central storage facility and is transferred to the instruction register via the instruction buffer for execution. Since the "subject instruction" is transferred to the instruction register via the instruction buffer, the previous contents of the instruction buffer are destroyed. The previous contents of the instruction buffer include the next instruction to be executed in the sequence following execution of the special instruction. Since the previous contents of the instruction buffer were destroyed, the predetermined sequence of instructions to be executed by the computer system was disrupted. Therefore, it was necessary to re-initialize the instruction buffer, that is, to fetch the next instruction in the sequence from storage and re-store it in the instruction buffer. This re-initialization consumes time and resources. In addition, there are instances in which the byte-length of the instruction register is smaller than the byte-length of the instruction to be stored in the instruction register for execution. The prior art, such as U.S. Patents 4,268,907, 4,189,770, and IBM Technical Disclosure Bulletin Vol. 23, No. 12, May 1981, pp. 5329-5331 discloses various types of buffer bypass circuitry. However, this prior art fails to disclose, teach, or suggest the invention disclosed in this application, whereby the contents of the instruction buffer, containing the next instruction to be executed in the sequence, are preserved during execution of certain special instructions, such as the EXECUTE instruction. A primary object of the present invention involves the elimination of the disadvantages associated with the computer system of the prior art, especially with regard to elimination of the disadvantage involving re-initialization of the instruction buffer associated with said computer system. Another object of the present invention includes the provision of an additional register to store one or more bytes of the instruction to be executed when the byte-length of said instruction is larger than the byte-length of the instruction register. These and other objects of the present invention are accomplished by creating a bypass path for bypassing the instruction buffer when certain special instructions are executed, such as the EXECUTE instruction, thereby transferring the "subject instruction" from storage to the instruction register via the bypass path in lieu of the instruction buffer. As a result, the previous contents of the instruction buffer, comprising the next instruction to be executed in the sequence, are preserved for execution following execution of the special instruction. Furthermore, an execute register is provided for storing one or more bytes of the subject instruction to be executed when all of the bytes of said instruction cannot be stored in the instruction register. The present invention is claimed in Claim 1, which has been delimited against the prior art known from PATENT ABSTRACTS OF JAPAN, vol. 6, no. 13 (P₋₉₉) [891], 26th January 1982, and JP-A- 56 137 447. In this prior art only the instruction code of an instruction word can be transferred via via the bypass path. A full understanding of the present invention will be obtained from the detailed description given hereinbelow and the accompanying drawings, which are given by way of illustration only, and thus are not limitative of the present invention, and wherein: figure 1 illustrates a basic block diagram of a portion of a computer system including an instruction buffer, an instruction register, an execute register, and a bypass path representing one feature of the present invention; figure 2 illustrates a sample special instruction in the sequence as executed by the computer system and a sample "subject instruction" taken out of the sequence and fetched from storage in response to execution of the special instruction, such as said EXECUTE instruction; figures 3a through 3f illustrate a portion of a prior art computer system whereby the execution of the special instruction occurs without the utilization of the bypass path of figure 1; figures 4a through 4d illustrate a portion of the computer system of the present invention, whereby the execution of the special instruction occurs while utilizing the bypass path of figure 1; figures 5a through 5d illustrate the basic block diagram of figure 1 and emphasize the function performed by the execute register representing another feature of the present invention, whereby the byte-length of the instruction register is greater than or equal to the byte-length of the instruction to be executed; figures 6a through 6d illustrate the basic block diagram of figure 1 and emphasize the function performed by the execute register representing another feature of the present invention, whereby the byte-length of the instruction register is less than the byte-length of the instruction to be executed; and figure 7 illustrates a flow chart depicting the operation of the block diagram shown in figure 1 of the drawings and further shown in figures 4 through 6 of the drawings. Referring to figure 1, a basic block diagram of a portion of a computer system is illustrated. In fig. 1, a byte shifter 3 receives instructions from a central storage facility within the computer system and aligns the instructions during their transfer through the byte shifter. An instruction buffer 9 is connected to the byte shifter 3 for receiving and temporarily storing instructions from the byte shifter 3. An instruction register 11 is connected to the instruction buffer 9 and to the byte shifter 3 via busses 5 and 7 for receiving and storing for execution the instruction stored in the instruction buffer 9 including the special instruction, and for receiving the "subject instruction" via busses 5 and 7 from the byte shifter 3. An execute register 13 is interconnected between the byte shifter 3 and the instruction register 11 for temporarily storing one or more additional bytes of the instruction to be executed when the byte-length of the instruction is greater than the byte-length of the instruction register 11. A computer system processor 16 is connected to the instruction register 11 for receiving the instruction stored in the register 11 and for executing said instruction. For further information on a system with which the components of figure 1 interface, reference is directed to a manual entitled "IBM System/370 Principles of Operation" (IBM FORM NO. GA22-7000). In operation, referring to figure 1; a computer system processor 16 executes in sequence a plurality of instructions, each of the instructions being sequentially transferred to the instruction register 11 via the instruction buffer 9 for execution. Under normal circumstances, during execution of an instruction stored in the instruction register, the next instruction to be executed in the sequence is stored in the instruction buffer 9. When execution of the instruction is complete, the next instruction in sequence is retrieved from the instruction buffer 9, and is stored in the instruction register 11 for execution. If the next instruction in the sequence is a special instruction, such as an EXECUTE instruction, when the special instruction is executed, another instruction, referred to herein as a "subject instruction", is retrieved from the processor's central storage facility. The subject instruction is not a member of the plurality of instructions sequentially executed by the computer system processor 16. Therefore, during the sequential execution of the plurality of instructions by the processor 16, when the special instruction is transferred from the instruction buffer 9 to the instruction register 11 for execution, the "subject instruction" is retrieved from the central storage facility, out-of-sequence, is transferred to the instruction register 11, and is executed by the processor 16. When execution of the "subject instruction" is complete, a further instruction in the sequence is transferred to the instruction register 11 for execution. In the prior art, the "subject instruction" was taken out of sequence and transferred to the instruction register 11 via the instruction buffer 9. As a result of this transfer, the previous contents of the instruction buffer 9 were destroyed. The previous contents of the instruction buffer 9 comprises the next instruction in the sequence to be executed following execution of the subject instruction. Since the previous contents were destroyed, re-initialization of the instruction buffer 9 was necessary - that is, the next instruction in the sequence was again retrieved from the central storage facility and was stored in the instruction buffer 9. This re-initialization consumed time and resources. According to the present invention, the "subject instruction" is transferred to the instruction register 11 via paths 5 and 7, as shown in figure 1. Paths 5 and 7 represent a bypass path, whereby the instruction buffer 9 is bypassed during execution of the special instruction. When the "subject instruction" is retrieved from the processor's central storage facility, in response to execution of the special instruction, it is transferred to the instruction register 11 via the bypass path, that is, paths 5 and 7, in lieu of via the instruction buffer. As a result, the previous contents of the instruction buffer 9, comprising the next instruction in the sequence to be executed, are not lost or destroyed. Following the execution of the subject instruction, the next instruction in the sequence, stored in the instruction buffer 9, is transferred from the buffer 9 to the instruction register 11 for execution. As a result of utilization of the bypass paths 5 and 7, re-initialization of the instruction buffer 9 is not necessary. Referring to figure 2, sample instructions are illustrated. These instructions are intended to be executed in sequence and include op 0, opl, op3 through op 7, and the special instruction, namely; the EXECUTE op "Ex op". In figure 2, a "subject instruction" is also illustrated, retrieved from the processor's central storage facility in response to the execution of the EXECUTE op shown in figure 2. The sample instructions of figure 2 will be utilized in a discussion of figures 3 through 6 of the drawings. Referring to figure 3a through 3f, a portion of a computer system of the prior art is illustrated representing various steps performed during the execution of the special EXECUTE instruction and the resultant retrieval of the "subject instruction" from the processor's central storage facility. In figure 3a, the EXECUTE op is stored in the instruction register 11. The processor 16 executes the EXECUTE op instruction. As a result, the address of the "subject instruction" is calculated. In figure 3b, the "subject instruction" is fetched from the central storage facility. In figures 3c and 3d, the "subject instruction" is transferred to the instruction register 11 via the instruction buffer 9. Ops 3, 4, 5, and 6 were previously stored in the instruction buffer 9. As a result, these ops were destroyed during the transfer of the "subject instruction" to the instruction register 11 via buffer 9. In figure 3e, these ops are re-fetched from the processor's central storage facility and stored in the instruction buffer 9, that is, the instruction buffer 9 is re-initialized. In figure 3f, the next instruction in sequence, op 3, stored in the instruction register 11, is executed. Referring to figure 4, a portion of a computer system of the present invention is illustrated representing various steps performed during the execution of the special EXECUTE instruction and the resultant retrieval of the "subject instruction" from the processor's central storage facility. However, in this figure, the bypass path 5 and 7 of figure 1 is utilized. In figure 4a, a special EXECUTE op is transferred from buffer 9 to instruction register 11 for storage and execution. Ops 3, 4, 5, and 6 are stored in buffer 9 and await execution in sequence. In figure 4b, the EXECUTE op is stored in the instruction register 11 for execution. In response to execution of the EXECUTE op instruction, the "subject instruction" is fetched from the processor central storage facility. In figure 4c, the "subject instruction" is transferred to and loaded into the instruction register 11 via byte shifter 3 and bypass paths 5 and 7 representing one feature of the present invention. As a result, in figure 4d, the next instruction to be executed in sequence, op 3, is transferred from buffer 9 to the instruction register 11 for execution. Therefore, re-initialization of the instruction buffer 9 is not necessary. An additional feature of the present invention will be described in the paragraphs to follow. As previously mentioned, there are instances in which the byte-length of the instruction to be executed is greater than the byte-length of the instruction register 11 which stores said instruction. One or more additional bytes of the instruction cannot be loaded into the instruction register 11 for storage. In order to accommodate the one or more additional bytes of the instruction, the execute register 13 is connected between the byte shifter 3 and the instruction register 11 for receiving and storing the one or more additional bytes of the instruction to be executed. For example, if the instruction register 11 is four bytes in length, and the instruction to be executed is six bytes in length, the low-order two bytes of the instruction are stored in the execute register 13, and the high-order four bytes of the instruction are stored in the instruction register 11. The high-order four bytes are processed by the processor 16. When processing of the high-order four bytes is complete, the low-order two bytes are loaded into the instruction register 11 from the execute register 13 for execution by the processor 16. To further illustrate the utilization of the execute register 13 for receiving and storing the one or more additional bytes of the instruction to be executed, refer to figures 5 and 6 of the drawings. Figure 5 illustrates a condition whereby the instruction to be executed, passing through the byte shifter 3 possesses a byte-length which is equal to or less than the byte-length of the instruction register 11. Consequently, the execute register 13 is not utilized. The instruction buffer 9 is not shown in the figure. Figure 5 also illustrates a concept. That is, the byte shifter 3 comprises a shifting or alignment apparatus for receiving the instructions from the processor's central storage facility, examining the low order bits of the instruction address representing the amount of shift required, and shifting (ie -aligning) the instruction a specified amount depending on the examined address bits of the instruction. For example, in figure 5a, the instruction address is XX---XX000. The last three low order bits of the instruction address are "000" as indicated by element no. 20. As a result, no shifting or alignment of the instruction occurs. In figure 5b, the last three low order bits of the instruction address are "010" as indicated by element no. 22. As a result, the instruction is shifted from a position corresponding to byte 2 to a position corresponding to byte 0 as it passes through the byte shifter 3. In figure 5c, the last three low order bits of the instruction address are "100" as indicated by element no. 24. As a result, the instruction is shifted from a position corresponding to byte 4 to a position corresponding to byte 0 as it passes through the byte shifter 3 (in the figure, the shifting occurs from right to left within the byte shifter). In figure 5a through 5c, dark lines 18 are shown. These lines are the bypass paths 5 and 7 of figure 1. In figure 5a through 5c, the dark lines 18 indicate that one fetch is required to transfer the instruction from the central storage facility to the instruction register 11 via the byte shifter 3. However, in figures 5d1 and 5d2, a dark line is shown in each figure. As a result, in figure 5d1, a first fetch is required to transfer a portion of the instruction to the register 11 via byte shifter 3. In figure 5d2, a second fetch is required to transfer another portion of the instruction to the register 11 via byte shifter 3. Furthermore, in fig. 5d, the last three low order bits of the instruction address are "110" as indicated by element no. 26. As a result, both portions of the instruction are shifted from a position corresponding to byte 6 to a position corresponding to byte 0 as they pass through the byte shifter 3. In figure 5, since the byte-length of the instruction to be executed is less than or equal to the byte-length of the instruction register 11, the execute register 13 is not utilized. However, in figure 6, the byte-length of the instruction to be executed is greater than the byte-length of the instruction register 11. Therefore, the one or more additional bytes of the instruction are stored in the execute register 13, while the high order bytes of the instruction are stored in the instruction register 11 for execution. When the instruction is being processed, the one or more bytes of the instruction are transferred to the instruction register 11 from the execute register 13 for execution. In fig. 6, when the instruction passes through the byte shifter 3 for shifting and alignment, the low order bits of the instruction address are examined. In response thereto, the instruction is shifted, within the byte shifter 3, by a specific amount in the same manner as described above with reference to figure 5 of the drawings. For example, in figure 6a, the last three bits of the instruction address are "000" as indicated by element no. 28. Therefore, when the instruction passes through the byte shifter 3, no shifting occurs. One or more bytes of the instruction pass to the execute register 13 while the high order bytes pass to the instruction register 11 for execution. Subsequently, the one or more bytes stored in the execute register 13 pass to the instruction register 11 for execution. In figure 6b, the last three bits of the instruction address are "010" as indicated by element no. 30. As a result, when the instruction passes through the byte shifter 3, it is shifted from a position corresponding to byte 2 to a position corresponding to byte 0. The high order bytes of the instruction are transferred to the instruction register 11 while the low order bytes are transferred to the execute register 13 in the same manner as described with reference to fig. 6a. In figure 6c, the dark lines 18 indicate the transfer of instruction bytes. Utilizing the dark lines to interpret fig. 6c, since the last three bits of the instruction address are "100" as indicated by element no. 32, during a first fetch of the high order bytes of the instruction, said high order bytes are shifted from a position corresponding to byte 4 to a position corresponding to byte 0 as they pass through the byte shifter 3. The high order bytes are stored within the instruction register 11. During a second fetch of the low order bytes of the instruction, since the last three bits of the instruction address are "100", said low order bytes are shifted from a position corresponding to byte 4 to a position corresponding to byte 0 as they pass through the byte shifter 3. The low order bytes are stored within the execute register 13. In figure 6d, the last three bits of the instruction address "110" indicate that the instruction is shifted from a position corresponding to byte 6 to a position corresponding to byte 0. As the dark lines 18 of fig. 6d indicate, a first half of the high order bytes are transferred to the instruction register 11 during a first fetch. During a second fetch, a second half of the high order bytes are transferred to the instruction register 11. One or more additional low order bytes of the instruction are transferred to and stored in the execute register 13. Thereafter, the one or more additional low order bytes are transferred to the instruction register 11 from the execute register 13 for execution by the processor 16. Figure 7 illustrates an instruction processing flow chart depicting the manner by which instructions are processed utilizing the block diagram shown in figures 1 and 4 through 6 of the drawings. In figure 7, assume that an instruction to be executed possesses the following address: XX---XXYYY. If a second fetch of another portion of the instruction is required, assume that the address of the other portion of the instruction is: XX---XXYYY + (+8) = X'X'---X'X'YYY. In figure 7, block 34 indicates that the instruction is decoded, addresses are calculated, the op-type of the instruction is determined, and the state of an execute latch is determined. The execute latch is set to "1" when the instruction being executed is an EXECUTE instruction. When the instruction being executed is a subject instruction of an execute instruction, the state of the execute latch will therefore be a "1". If the instruction being executed is not a subject instruction of an EXECUTE instruction, the state of the execute latch will be a "0". As indicated by block 36, if the instruction being decoded is not a subject instruction, the instruction is executed normally. If the instruction being executed is not an EXECUTE instruction and the execute latch is set to "1" (i.e. - the instruction being executed is a subject instruction of an EXECUTE instruction), the latch is reset, as indicated by block 38, and the next instruction is decoded for execution. If the instruction previously decoded was an EXECUTE instruction, but the subject instruction is not another EXECUTE instruction, the subject instruction is retrieved at address XX---XX000. When the subject instruction passes through the byte shifter 3, it is shifted or aligned by an amount corresponding to YYY. The instruction register 11 is set and the execute register 13 is set, as indicated by block 42 in figure 7. If a second fetch of the target instruction is required, the second portion of the instruction is retrieved at address X'X'---X'X'000. The second portion of the instruction is shifted by an amount corresponding to YYY. The execute register 13 and the instruction register 11 is set, as indicated by block 44 in figure 7. The execute latch is set (block 46) and the next instruction (in this case, the subject instruction) is decoded. However, if a second fetch is not required, the execute latch is set (block 46) and the next instruction (in this case, the subject instruction) is decoded for execution. If, however, the instruction being decoded is an EXECUTE instruction, and the subject instruction of the EXECUTE is another EXECUTE instruction, an execute exception is initiated, that is, the operation is suppressed, as indicated by block 40.

Claims: A computer system including a central storage facility for storing a plurality of instructions and at least one special instruction, an instruction buffer (9) connected to the central storage facility for retrieving each of the plurality of instructions and said special instruction in sequence from said storage facility, an instruction register (11) connected to the instruction buffer for retrieving an instruction from the instruction buffer and holding at least some of the bytes of said instruction therein during execution thereof and bypass path means (5,7) connected between said central storage facility and said instruction register for bypassing said instruction buffer: so that when the special instruction is held in said instruction register for execution, another instruction is transferred from said central storage facility to said instruction register via said bypass path means during execution of said special instruction thereby preventing the destruction of the contents of said buffer; characterized in that an execute ¹execute register means (13) is connected between said central storage facility and said instruction register for storing one or more additional bytes of said another instruction during the transfer of said another instruction from said central storage facility to said instruction register via said bypass path means when the byte length of said another instruction is greater than the byte length of said instruction register. The computer system of claim 1, further comprising: byte-shifter means (3) interconnecting said instruction buffer and said instruction register to said central storage facility for shifting the bytes of said instruction received from said central storage facility by a predetermined amount prior to the holding of said some of the bytes of said instruction in said instruction register and the storage of said one or more additional bytes in said execute register means, the magnitude of said predetermined amount depending upon the magnitude of a set of bits which comprise at least a portion of the address of said instruction. The computer system of claim 2, wherein said bypass path means comprises an instruction transfer path connecting said byte shifter means to said instruction register and bypassing said instruction buffer, said instruction transfer path being enabled when said special instruction is stored in said instruction register for execution.

Inventors: BURGER, MARK EDWARD, GEORGE, STEVEN LEE, NGAI, CHUCK HONG
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1984
Main classification: G06F9
IPC codes: G06F9