WO2004107163A1 - Instruction control device having branching prediction mechanism and control method thereof - Google Patents

Instruction control device having branching prediction mechanism and control method thereof Download PDF

Info

Publication number
WO2004107163A1
WO2004107163A1 PCT/JP2003/006668 JP0306668W WO2004107163A1 WO 2004107163 A1 WO2004107163 A1 WO 2004107163A1 JP 0306668 W JP0306668 W JP 0306668W WO 2004107163 A1 WO2004107163 A1 WO 2004107163A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
branch
prediction
unit
self
Prior art date
Application number
PCT/JP2003/006668
Other languages
French (fr)
Japanese (ja)
Inventor
Ryuichi Sunayama
Aiichirou Inoue
Masaki Ukai
Original Assignee
Fujitsu Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Limited filed Critical Fujitsu Limited
Priority to JP2005500202A priority Critical patent/JP3852782B2/en
Priority to PCT/JP2003/006668 priority patent/WO2004107163A1/en
Publication of WO2004107163A1 publication Critical patent/WO2004107163A1/en
Priority to US11/114,202 priority patent/US7636837B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3861Recovery, e.g. branch miss-prediction, exception handling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3804Instruction prefetching for branches, e.g. hedging, branch folding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3842Speculative instruction execution

Definitions

  • the present invention generally relates to an instruction control device in a central processing unit of a computer, and more particularly, to an out-of-order instruction control device having a branch prediction mechanism, when a branch prediction is erroneous, a re-instruction fetch request is issued. Incorrect or invalid instruction fetch requests and operand requests until memory can be output to memory
  • the execution result of the preceding instruction affects ⁇ of the following instruction; if the processing of the preceding instruction is not completed, Subsequent instructions cannot be executed. Therefore, it waits for the completion of the preceding instruction.
  • Branch instructions include conditional branch instructions and unconditional branch instructions. You. Among these branch instructions, the conditional branch instruction is an instruction in a section earlier than itself that is about to change the branch condition. Until this is done, it is uncertain whether the branching power of the conditional branch instruction or not.
  • the processing capability that is, the reduction in performance, is the same in the order control device employing other processing methods, and is common to the instruction control devices.
  • a prediction mechanism for predicting the branch execution of the branch instruction is provided in the instruction control unit to speed up the execution of the branch instruction. I try to plan.
  • a plurality of branch instructions are input to the cut-off line based on the result of the branch prediction.
  • the existence of a branch and the success or failure of branch prediction are determined sequentially from the branch instruction whose branch condition is determined.
  • the branch prediction by the branch prediction mechanism is correct, the instruction following the predicted branch instruction is correctly input to the execution pipeline. However, if the branch prediction power S is incorrect, the instruction following the predicted branch instruction has an incorrect instruction sequence, so it is necessary to delete the instruction from the node pipeline and to correct it again with the correct instruction sequence. There is.
  • the branch prediction fails, it operates to fetch the instruction again. However, after the branch prediction by the branch prediction mechanism is found to have failed, before the instruction fetch is performed again, or until the wrong instruction sequence is erased from the execution pipeline.
  • the time of the moss S is strong, and it is strong.
  • An object of the present invention is to provide an instruction control method, an instruction fetch method, and an apparatus thereof.
  • the present invention provides an instruction fetch control unit that controls instructions so as to fetch an edit instruction from a storage unit that stores instructions, which registers instructions in an out-order manner;
  • An instruction buffer for temporarily storing instructions supplied from the café's own storage unit
  • An instruction decoder for decoding an instruction sent from the Sfjf own instruction buffer, a branch instruction prediction unit for predicting an instruction branch,
  • Knitting instruction fetch control unit Knitting instruction fetch control unit, kinking instruction buffer, kinking instruction decoder, and
  • an instruction control apparatus having a branch prediction control unit for controlling a branch instruction prediction unit
  • the age at which the unknowing branch prediction control unit determines that the branch prediction power of the unknowing branch instruction prediction unit was S error was wrong.
  • the self-branch prediction control unit determines that the branch predictive power S by the unpleasant branch instruction prediction unit was incorrect
  • the own branch prediction control unit outputs a signal for suppressing the instruction fetch request already output to the ffit self storage unit to the instruction fetch control unit, and outputs a signal for invalidating the own instruction buffer to the instruction buffer. To remove the equipment.
  • the branch prediction failure power s is found, and when the other conditions for issuing a re-order fetch request are not determined, all the criterion forces for the re-order fetch request are equal.
  • the cache control unit can be notified of a cancel signal for invalidating all instruction fetch requests, and can also be notified to the decoder unit to stop issuing instructions at the same time.
  • the present invention provides an instruction fetch control unit which controls an instruction to be fetched from a storage unit storing the instruction, wherein the instruction fetch control unit executes the instruction in an out-of-order manner
  • an instruction decoder for decoding an instruction sent from the iff self instruction buffer buffer; a branch instruction prediction unit for predicting a branch of the instruction;
  • the branch prediction control unit determines whether or not the instruction that is erroneously set due to an error in the branch prediction by the branch instruction prediction unit is incorrect.
  • An instruction control device for outputting a signal for invalidating the operand request to the self-memory unit and outputting a signal for invalidating the obscene instruction decoder to the tiff own instruction decoder.
  • a cancel signal for disabling the above instruction At the same time, and can notify the cache control unit of a cancel signal for suppressing unnecessary operand fetch requests.
  • the cache controller is notified of the fjlj child of the instruction erroneously input to the pipeline at the same time, so that the operand fetch request requested by the cache controller is unnecessary or unnecessary.
  • the request can be determined.
  • the cancel instruction signal for suppressing unnecessary instruction fetch request and operand request is notified from the branch instruction ⁇ IJ control unit to the instruction fetch control unit and the cache control unit, respectively, and re-instruction fetch is performed. Since instruction input can be stopped until completion, unnecessary replacement in the cache section can be suppressed, and processor performance can be improved.
  • FIG. 1 is a block diagram showing an outline of a portion for executing a branch instruction control operation in an instruction control device in a central processing unit of a computer according to an embodiment of the present invention.
  • FIG. 2 is a flowchart showing the operation of the embodiment of the present invention.
  • FIG. 3 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 4 shows a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 5 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 6 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 7 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 8 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 9 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 10 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 11 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 12 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
  • FIG. 13 is a diagram showing a timing chart of the conventional branch control.
  • FIG. 14 is a diagram showing a timing chart of a signal generated according to the present invention.
  • FIG. 1 is a block diagram showing an outline of a portion for executing a branch instruction IJ control operation in an instruction control device 100 (instruction unit) in a central processing unit of a computer according to an embodiment of the present invention.
  • the instruction control device 100 is connected to a storage unit 103 including a cache memory 101 and a cache control unit 102.
  • the part that executes the branch operation in the instruction IJ control device (instruction unit) 100 is mainly composed of an instruction fetch control unit (Inst r uc ti on Fe t ch C
  • the IJ controller 100 controls reading of the instructions from the cache memory 101 via the cache IJ controller 102.
  • the instructions are processed according to the above-described art-over-order system.
  • chrysanthemum and a flag (Instruction ID or I ID) indicating the order of instructions on the pipeline are assigned to all instructions to be machined on the pipeline. Has been. Instructions are processed in the execution pipeline in accordance with out-of-order processing. When an instruction is completed, the instruction is completed in the above-mentioned in-line processing based on the ID.
  • the instruction fetch control unit 111 sends an instruction fetch request (IF-REQ-VAL) such as an address to the cache control unit 102, for example.
  • IF-REQ-VAL instruction fetch request
  • the instruction stored in the cache memory 101 is read out via the cache control unit 102.
  • the instruction read in this way or the cache control unit 102 is stored in the instruction buffer 112.
  • the instruction fetch control unit 111 also sends the above address to the branch prediction unit 113 via a signal 120.
  • the branch prediction is performed in the BRHI S113 based on the instruction fetch address as described above.
  • the instruction whose branch has been predicted in this way is stored in the instruction buffer 112 from the instruction fetch control unit 111.
  • the instruction buffer 112 sends the stored instruction to the instruction decoding unit 115.
  • the instruction decoding unit 115 decodes the instruction sent from the instruction buffer 112.
  • an instruction determined as a “branch instruction” or an “instruction predicted to be known” is entered into the RSBR 114 and the COMIT 116 via a signal 122. Note that all instructions input to the pipeline are entered into the instruction completion control unit (COMIT) 116 irrespective of the decoding result in DDEC Rl15.
  • DDECR115 is designed to send instructions to the ⁇ ? Pipeline and Assigns a flag (Instruction ID or I ID) indicating the order of instructions on the pipeline.
  • the RSBR 114 outputs a re-instruction fetch request (RSBR-RE I FCH-REQ) to the instruction fetch control unit 111 when the branch determination and the branch prediction fail, and performs control.
  • the RSBR114 can control and control a plurality of branching instructions (entries) on the pipeline, and each entry is a flag IID indicating the above-mentioned instruction on the Kikuya pipeline). Is managed.
  • the instruction for which the control in RSB Rl14 has been completed is released from the RSBR114, and is controlled by the COMIT 116 until the instruction is completed.
  • COM I T 116 controls the instruction completion of all instructions on the shear pipeline. ⁇ All instructions on the pipeline are managed by I ID, and instructions are completed by in-order processing in order from the one that satisfies the instruction completion condition.
  • FIG. 2 is a flowchart showing the operation of the embodiment of the present invention.
  • step 201 of FIG. 2 first, a branch instruction is issued from the instruction decode unit (D DECR) 115 to the branch instruction control unit (RSBR) 114 as described above.
  • D DECR instruction decode unit
  • RSBR branch instruction control unit
  • the RSBR 114 registers a branch instruction, as described above.
  • the RSBR 114 can register and control a plurality of branch instructions existing on the execution pipeline.
  • step 203 a branch is determined. If the determination of the branch prediction has failed, the process proceeds to step 204.
  • branch prediction is determined by the RSBR114, it is determined that the branch prediction by the BRHI S113 has failed if the following conditions from the first condition to the fourth condition are different or 1 The two conditions are satisfied.
  • the first condition is that the branch instruction predicted not to branch is known.
  • the second condition is that the predicted branch instruction does not branch: ⁇ .
  • the third condition is that the branch destination address of a branch instruction predicted to branch is: ⁇ .
  • the fourth condition predicts that instructions that are not branch instructions will be seen as if they were branch instructions. It is.
  • the following is a logical expression that satisfies the first to fourth conditions.
  • each signal is a signal having the following meaning.
  • + RSBR—PHANTOM—VAL ID indicates that an instruction that is not a branch instruction has been determined to branch as a branch instruction.
  • a "+" sign added to the head of a signal name indicates positive logic
  • a "-" sign added to a signal name indicates negative logic. That is, for example, For (1) + RSBR—VAL ID, the + RSBR—VAL ID is positive when the entry is “predicted” by BR RH IS 113. On the other hand, the entry + RSBR—VAL ID is negative when is predicted to be “know” by BRH IS 113. The symbol “&” indicates a logical AND operation. : In ⁇ , the process proceeds to step 204. Next, in step 204, the following control is performed simultaneously.
  • the data in all the IBBUFER112 (memory mechanism for temporarily storing the fetched data from the memory until the data is fetched from the memory to the DDECR 115.
  • the IFCL111 has 6 ports) To delete.
  • This signal is sent continuously until a re-instruction fetch request (RSBR-REIFCH-REQ) is issued from RSBR 114 to 111 at signal 123.
  • RSBR-REIFCH-REQ re-instruction fetch request
  • RSBR-REIFCH-REQ re-instruction fetch requests
  • a signal (INH_E_VAL ID) is sent to RSBR114 and DDECR115 to suppress the instruction input to the pipeline. This signal is used until the unnecessary instruction injected into the pipeline due to incorrect branch prediction is deleted from the pipeline (that is, until the branch instruction whose branch prediction fails is completed. , COMI Tl 1
  • the instruction FLUS H_RS is sent and the instruction on the execution pipeline is erased. ) Sent continuously.
  • a signal (CANCEL-OP-IID-VALID) is sent from the RSBR 114 to the cache control unit 102 to notify that the unnecessary operand request is invalid.
  • incorrect branch prediction In order to distinguish operand requests from unnecessary instructions entered into the line from operand requests from instructions entered into the clause pipeline before the branch instruction, I IDs following the branch instruction for which branch prediction failed are distinguished. Is notified from the RSBR 114 to the cache control unit 102 (CANCEL-OP_I ID [5: 0]). This signal (CANCEL—OP_ID [5: 0]) is sent continuously until an unnecessary instruction input to the purple pipeline due to incorrect branch prediction is erased from the ⁇ 1 pipeline. Can be
  • step 205 since control was performed so that one word was generated in step 204 described above, in the cache control unit, C ANC EL—IF_ID—0, 1, 2, 3, 4, and 5 were all 1 During this time, the instruction fetch request is invalid. While CANCEL-OP-I10_10 is 1, operand requests from instructions on the execution pipeline following IID indicated by CANCEL-OP-IIDC5: 0] are invalidated.
  • step 206 an instruction refetch request (RSBR_REIFCH_REQ) is issued from the RSBR 114 to the IFCL 111, and instruction refetching is resumed.
  • RSBR_REIFCH_REQ instruction refetch request
  • step 207 the branch instruction control by the RSBR 114 ends.
  • step 203 If it is determined in step 203 that the branch prediction power is successful, the process proceeds from step 203 to step 207.
  • step 208 the branch instruction is completed.
  • FIG. 3 shows an embodiment of a circuit for generating the above-mentioned control signals according to the present invention.
  • FIG. 13 shows a time chart of a control signal of the conventional RSBR 114
  • FIG. 14 shows a time chart of a control signal of the RSBR 114 to which the above-mentioned control signal is added according to the present invention.
  • Figure 3 shows a signal that sets RSBR-CANCEL-IF—ID—0, 1, 2, 3, 4, 5 (+ SET—RSBR—CANCEL—IF_ID_0, 1, 2, 3, 4, 5 ) Is shown.
  • “ALL” indicates ID-0, 1, 2, 3, 4, 5.
  • FIG. 3 includes circuit blocks 310, 320, and 330 and a multi-input OR gate 340.
  • the circuit block 310 includes a 4-input AND gate 311, a 4-input AND gate 312, a 4-input AND gate 313, a buffer 314, and a 4-input OR gate 315.
  • the circuit blocks 320 and 330 have the same configuration as the circuit block 310. However, the input signal to each circuit block corresponds to each instruction (entry) assigned to RSBR 114.
  • circuit block 310 is a circuit for an instruction for an entry with an IID of 0
  • circuit block 320 is a circuit for an instruction for an entry with an IID of 1
  • the circuit block 330 is a circuit for an instruction for an entry whose IID is n.
  • the four-input AND gate 311 of the circuit block 310 is a circuit that decodes the above first condition.
  • + RSBRO—VALID, + RSBR 0_RE SOLVED, + RSBR—TA KEN, and one RSBR—BRHI S—HIT are input.
  • the four-input AND gate 312 of the circuit block 310 is a circuit for decoding the above-described second condition.
  • Circuit block 310 4-input AND gate 312 has + RSBR VAL ID, 10 RSBR RE SOLVED, 1 RSBR TAKE N and + RSBR-BRHI S- HIT are input. When all the inputs are 1, the 4-input AND gate 312 outputs '1'. This is equivalent to the second condition: ⁇ .
  • the 4-input AND gate 313 of the circuit block 310 is a circuit that decodes the third condition described above.
  • + RSBR-VALID, + RSBR-TAV, -RSBR-TGTCP-MATCH, and + RSBR-BRHIS-HIT are input to the 4-input AND gate 313 of the circuit block 310.
  • the buffer 314 of the circuit block 310 is a circuit for decoding the above-described fourth condition.
  • + RSBR_PHANTOM—VALID is input to the buffer 314 of the circuit block 310.
  • the input is 1, the output of the buffer 314 is output. This reminds us that the fourth condition holds.
  • the 4-input OR gate 315 outputs “1”. You.
  • circuit blocks 320 and 330 The same applies to the circuit blocks 320 and 330. If the output of one of the circuit blocks 310, 320 or 330 is, then OR gate 340 power '1' is output and SET-RSBR-CANCEL-IF-AL L is become.
  • Figure 4 has the same configuration as Figure 3 and generates (+ SET—CANCEL—OP—I ID—VAL ID), which sets CANCEL—OP—I ID—VAL ID.
  • FIG. 5 is composed of similar circuits 310 to 330, inverters 501 and 502, buffers 503 and AND gates 504 and 505 shown in FIG. Figure 5 generates the intermediate signals + CANCEL-OP-RSBR0, + CANCEL-OP-RSBR1, and + CANCEL-OP-RSBRn. These signals indicate the next instruction that failed the branch prediction.
  • + CANCEL—OP—R SBR0 is equal to the output of circuit 310.
  • + CANCEL OP RSBR1 The result of the AND operation performed by the AND gate 504 using the signal obtained by inverting the output of the circuit 310 by the inverter 501 and the output of the circuit 320 as inputs.
  • + CANCEL—OP—RSBRn is calculated by the AND gate 505 and output.
  • FIG. 6 shows a circuit consisting of an RS flip-flop 601 that generates the + RE I FCH—TRG signal.
  • + REIFCH—TRG of the output of the RS flip-flop 601 is set by a re-instruction fetch request (+ RSBR-REIFCH-REQ) input to the set terminal (S) of the RS flip-flop 601.
  • the signal is input to the reset terminal (R) of the RS flip-flop 601 and is reset by a + CLEAR-PIPELINE signal.
  • + CLEAR The PIPELINE signal is a section pipeline tally command signal output by COMIT116.
  • FIG. 7 shows a circuit comprising an RS flip-flop 701 that generates a + RSBR_CANCEL—IF—ALL signal.
  • ALL indicates ID-0, 1, 2, 3, 4, 5.
  • the + R SBR_CANCEL_IF — ALL signal of the output of the RS flip-flop 701 is input to the set terminal (S) of the RS flip-flop 701, output from the OR gate 340 in FIG. CANCEL—set by IF—ALL.
  • the OR gate 702 is connected to the reset terminal (R) of the RS flip-flop 701.
  • the three inputs of the OR gate 702 include a re-instruction fetch request (+ RSBR—RE I FCH_REQ), the + REI FCH—TRG signal output from the RS flip-flop 601 in FIG. 6, and the + CLEAR_PIPEL INE signal. Is entered. Then, one of the re-instruction fetch request (+ RSBR—RE I FCH—REQ) or the + RE I FCH—TRG signal or the + CLEAR—PI PEL INE signal output from the RS flip-flop 601 in FIG. At the time of ', the reset signal from the OR gate 702 is input to the reset terminal (R) of the RS flip-flop 701, and the + RSBR-CANCEL-IF-ALL signal is reset.
  • Figure 8 shows a two-input OR gate 801 and a two-input AND gate 802, +1 NH_E_VAL Indicates a circuit that outputs ID.
  • the OR gate 801 calculates the logical sum of the + RE I FCH— TRG signal output from the RS flip-flop 601 in FIG. 6 and the + R SB R— CANCEL— IF_AL L signal output from the RS flip-flop 701 in FIG.
  • the AND of the output of the OR gate 801 and the FLU SH_RS signal output by the COMITl 16 is calculated by the AND gate 802 to output + I NH-E-VAL ID.
  • One FLUSH-RS signal is a negative logic signal of the + FLUSH-RS signal output from COMITl 16 in FIG. FIG.
  • FIG. 9 shows a circuit configured by an RS flip-flop 901 and a two-input AND gate 902 to output + D-VAL ID.
  • the output of the two-input AND gate 902 is connected to the set terminal (S) of the RS flip-flop 901.
  • the 2-input AND gate 902 outputs the logical product of the + I NH _E_VAL ID negative logic I NH—E—VAL ID signal and the + E—VAL ID signal output from the AND gate 802 in FIG.
  • the + D—VAL ID signal of the output of the RS flip-flop 901 is set by the output signal of the AND gate 902.
  • the VAL ID signal is a signal indicating the start of a decoding cycle, and is output from the instruction decoding unit 115 to the RSBR 114 and the COMITl 16.
  • the + E-VALID signal is a signal indicating the timing of setting from the IBBUFER 112 to the DDECR 115.
  • FIG. 10 shows a circuit for generating a set signal of CANCEL-OP_ID [5: 0] + 3 ⁇ NCEL_OP_ID_5 [0].
  • the circuit shown in FIG. 10 includes two-input AND gates 1001 to 1007, a five-input OR gate 1010, 1011, and a two-input OR gate 1020.
  • the 2-input AND gate 1001 receives + CANCEL—OP—RSBR0 output from the inverter 503 in FIG. 5 and + RSBR0—IID_PL1 [5: 0] of the instruction ID (I ID).
  • the + CANCEL_OP—RSBR 1 output from the 2-input AND gate 504 in FIG. 5 and the instruction ID + RSBR1—II D_P L 1 [5: 0] are input to the 2-input AND gate 1002.
  • the 2-input AND gate 1007 has + CANCEL OP RSBRn output from the 2-input AND gate 505 in FIG. 5 and + RSBRn IID of the instruction ID.
  • PLl [5: 0] is input.
  • the instruction ID of the next instruction of the branch instruction whose branch prediction has failed is output.
  • FIG. 11 shows a circuit configured to generate + CANCEL—OP—I ID—VAL ID formed by the RS flip-flop 1101.
  • the set input terminal (S) of the RS flip-flop 1101 receives the SET—CANCEL—OP—IID—VAL ID output from the OR gate 340 in FIG. 4, and the + CANCEL—OP—IID — VAL ID signal is set.
  • the + CLEAR-PIPE LINE signal is input to the reset input terminal (R) of the RS flip-flop 1101, and the + CANCEL-OP-IID-VALID signal is reset by this signal.
  • + CLEAR—PIPELINE signal is a clear instruction signal of the ⁇ ff pipeline output by COMIT116.
  • FIG. 12 shows a circuit configured by the RS flip-flop 1201 and outputting + CANCEL_OP_ID [5: 0].
  • the SET—CANCEL—OP_I ID [5: 0] signal output from the OR gate 1020 in FIG. 10 is connected to the set terminal (S) of the RS flip-flop 1201.
  • + CANC EL_0 P_IID [5 : 0] signal is set.
  • control signals RSBR_CANCEL_IF—ID_0, 1, 2, 3, 4, 5, RSBR—RE I FCH—REQ, INH_E_VAL ID, CANCEL—OP—I ID—VAL ID, CANCEL-OP—I can generate I ID [5: 0].
  • FIG. 13 is a diagram showing a timing chart of the conventional branch control.
  • FIG. 14 is a diagram showing a timing chart of a signal generated according to the present invention.
  • this signal indicates the start of a decoding cycle, and is output to the instruction decoding unit 115, the RSBR 114 and the COMITl 16, and (1) the cycle starts with the D-VAL ID signal. Then, as shown by the numbers (2) and (12), the above-mentioned signals for controlling the respective parts in FIG. 1 are generated.
  • signals denoted by the same reference numerals as those in FIG. 13 indicate the same signals.
  • the signals indicated by the numbers (101) and (108) generated in accordance with the present invention correspond to those in FIG. 12 shows the signals generated by the circuit of the embodiment shown in FIGS.
  • E—VAL ID, CANCEL—OP—IID—VA LID, and CANCEL—OP—I ID [5: 0] can be generated.
  • erroneous instruction fetch requests and operand requests can be suppressed or invalidated until a branch instruction is erroneously predicted and a re-instruction fetch request is issued to the memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

An instruction control device and control method for suppressing or invalidating an erroneous instruction fetch request or operand request until a re-instruction fetch request is output to a memory when a branching prediction is made incorrectly. In order to achieve this object, an instruction control device fetches an instruction stored in a storage section and executes the instruction in the out-of-order method. The instruction control device includes a branching instruction prediction section for predicting an instruction branching and a branching prediction control section. When the branching prediction control section judges that the branching prediction made by the branching instruction prediction section has been incorrect, the instruction control device suppresses an instruction fetch request which has been output to the storage section and invalidates the instruction already output from the storage section during a period after the branching prediction control section has judged that the branching prediction made by the branching instruction prediction section has been incorrect until a correct instruction is re-fetched from the storage section.

Description

分岐予測機構を持つ命^^御装 ^¾ぴその制御方法 技術分野  Life control with branch prediction mechanism ^^ Control method
本発明は、 一般的には、 コンピュータの中央処理ユニット内の命令制御装置に 関連し、 特に、 分岐予測機構を持つアウトォブオーダ方式の命令制御装置におい て、 分岐予測を誤った時に、 再命令フェッチ要求をメモリに出せるようになるま で、 誤った命令フェッチリクエスト、 オペランドリクエストを抑止もしくは無効 明  The present invention generally relates to an instruction control device in a central processing unit of a computer, and more particularly, to an out-of-order instruction control device having a branch prediction mechanism, when a branch prediction is erroneous, a re-instruction fetch request is issued. Incorrect or invalid instruction fetch requests and operand requests until memory can be output to memory
化する命 卿方式に関連する。 This is related to the evolving order system.
 Rice field
背景技術 Background art
コンピュータの中央処理ュニット内の命令制御装置 (インストラクションュニ ット) を制御するための処 a ^式には、 インオーダー方式とアウトォブオーダ処 ¾ ^式がある。 ィンオーダー方式の処理では、命令がメモリに記憶されてレ、る順 序に菊 Ϊされる。  There are two types of processing for controlling the instruction control unit (instruction unit) in the central processing unit of the computer: the in-order method and the out-of-order processing method. In the in-order processing, instructions are stored in a memory and are executed in the order of execution.
これに対して、 アウトォブオーダ方式の処理では、 一つの命令の実行が完了す るのを待たずに、複数の後続の命令力 順次に、 亍パイプラインに投入されて、 命令が節される。 即ち、 新パイプラインの中で、 複数の演算器より節する 命令の順序を変更しながら、命令を実行する。 そして、 最終的には、 全体的な命 令の実行は、 インオーダーで完了する。 このように、 菊亍パイプラインへの命令 の投入とそこからの完了は、 順次に行われるが、 菊 ϊパイプラインの中では、 実 際には、命令は、 順序を変更しながら!^ ΐされる。  On the other hand, in the out-of-order processing, a plurality of subsequent instructions are sequentially input to the pipeline without waiting for the execution of one instruction to be completed, and the instruction is saved. That is, in the new pipeline, the instructions are executed while changing the order of the instructions to be executed by a plurality of arithmetic units. Finally, the overall execution of the instruction is completed in-order. Thus, the input of instructions to the Kikusui pipeline and the completion from there are performed sequentially, but in the Kikusui pipeline, the instructions are actually changed while changing the order! ^ Ϊ́ Is done.
し力し、 アウトォブオーダ方式の処理でも、 先行している命令の実行結果が後 続の命令の ϊに影響を与える;^には、 先行している命令の処理が終了しなけ れば、 その間、 後続の命令は実行できない。 従って、 先行する命令の完了を待ち 続けることになる。  However, even in out-of-order processing, the execution result of the preceding instruction affects 後 of the following instruction; if the processing of the preceding instruction is not completed, Subsequent instructions cannot be executed. Therefore, it waits for the completion of the preceding instruction.
これは、 上述の先行している命令が分岐命令である に、 この分岐命令の実 行において顕著に見られる。 分岐命令には、 条件分岐命令と無条件分岐命令があ る。 この分岐命令の中でも、 特に条件分岐命令は、 自分自身より以前の節中の 命令において、 分岐条件を変更しょうとしている命令が雜する ¾ ^には、 その 命令が完了して、分岐条件が確定するまで、条件分岐命令による分岐する力又は、 しないかが確定しない。 This is noticeable in the execution of this branch instruction, even though the preceding instruction is a branch instruction. Branch instructions include conditional branch instructions and unconditional branch instructions. You. Among these branch instructions, the conditional branch instruction is an instruction in a section earlier than itself that is about to change the branch condition. Until this is done, it is uncertain whether the branching power of the conditional branch instruction or not.
従って、 この条件分岐命令の後続の命令シーケンス力確定できないために、 後 続の命令を節パイプラインに投入できずに、 処理が停止してしまう。 これによ り、 処理能力が低下する結果となる。  Therefore, since the instruction sequence following the conditional branch instruction cannot be determined, the subsequent instruction cannot be input to the node pipeline, and the processing stops. This results in reduced throughput.
処理能力即ち、性能の低下は、 他の処 ffi^式を採用している命^ $U御装置にお いても同様であり、 そして、 命令制御装置共通の である。 この分岐命令によ る性能低下という,を解決するための手段として、 通常は、 分岐命令の分岐実 行を予測するための予測機構を、命令制御装置に保有し、 分岐命令の実行の高速 化を図るようにしている。  The processing capability, that is, the reduction in performance, is the same in the order control device employing other processing methods, and is common to the instruction control devices. As a means for solving the performance degradation caused by the branch instruction, usually, a prediction mechanism for predicting the branch execution of the branch instruction is provided in the instruction control unit to speed up the execution of the branch instruction. I try to plan.
分岐予測機構を備えたァゥトォプオーダ処理方式の には、 複数の分岐命令 が分岐予測の結果をもとに截亍ハ °ィプラインに投入される。 分岐条件が確定した 分岐命令から順次、 分岐の有無および分岐予測の成否が確定する。  In the top-order processing method provided with the branch prediction mechanism, a plurality of branch instructions are input to the cut-off line based on the result of the branch prediction. The existence of a branch and the success or failure of branch prediction are determined sequentially from the branch instruction whose branch condition is determined.
分岐予測機構による分岐予測が正しレヽ場合には、 予測した分岐命令の後続の命 令は、 正しく実行パイプラインに投入される。 しかし、 分岐予測力 S誤っていた場 合には、 予測した分岐命令の後続の命令は、誤った命令シーケンスであるので、 節パイプライン上から消去し、 且つ、 正しい命令シーケンスで 亍し直す必要 がある。  If the branch prediction by the branch prediction mechanism is correct, the instruction following the predicted branch instruction is correctly input to the execution pipeline. However, if the branch prediction power S is incorrect, the instruction following the predicted branch instruction has an incorrect instruction sequence, so it is necessary to delete the instruction from the node pipeline and to correct it again with the correct instruction sequence. There is.
分岐予測に失敗した齢には、 命令フェッチを再度行うように動作する。 しか し、 分岐予測機構による分岐予測が失敗したことが判明してから、 命令フェッチ が再度行われるまでの間や、 又は、 実行パイプライン上から誤った命令シーケン スが消去されるまでに、 ある禾 S の時間が力、かる^がある。  At the age when the branch prediction fails, it operates to fetch the instruction again. However, after the branch prediction by the branch prediction mechanism is found to have failed, before the instruction fetch is performed again, or until the wrong instruction sequence is erased from the execution pipeline. The time of the moss S is strong, and it is strong.
この間に、 実際には^しなレ、命令が菊亍パイプライン上に することにな り、 これらの実際には^ ί亍しない命令から、 オペランドのリクエスト要求が発生 してしまう。 これは、命令フェッチが行われる についても同様である。即ち、 実際には使用しない命令シーケンスに対する不必要なリクエストが発生してしま う。実際には必要としないオペランド又は命令フェッチリクエストが発生すると、 キャッシュにおける不必要なリプレースが発生し又は、 演難等の命令制御リソ ースの無駄な消費を引き起こし、 それらが、 性能の低下の要因となる。 During this time, the instruction is actually placed on the pipeline, and requests for operands are generated from those instructions that are not actually executed. This is the same for the instruction fetch. That is, unnecessary requests for instruction sequences that are not actually used occur. When an operand or instruction fetch request that is not actually needed occurs, Unnecessary replacements in the cache occur or cause unnecessary consumption of instruction control resources such as exercises, which cause performance degradation.
即ち、 分岐命令の分岐判定がおこなわれて、 分岐予測が失敗していると判断さ れた には、 再命令フェッチリクエストを命令フェッチ制御部に出す必要があ る。 しかし、 再命令フェッチリクエストを出すためには分岐条件と分岐先ァドレ スがともに確定していなければならない。 更に、 分岐条件が確定していて分岐予 測が失敗していることが判明していても分岐先ァドレス力 S確定していなければ再 命令フェツチリクエストは出せずその間命令フェッチ制御部は不必要な命令フエ ツチリクエストを出しつづけるという問題がある。  That is, if it is determined that the branch instruction has failed and the branch prediction has failed, it is necessary to issue a re-instruction fetch request to the instruction fetch control unit. However, in order to issue a re-instruction fetch request, both the branch condition and the branch destination address must be determined. Furthermore, even if it is known that the branch condition has been determined and the branch prediction has failed, if the branch destination addressing power has not been determined, a re-instruction fetch request cannot be issued and the instruction fetch control unit is unnecessary during that time. There is a problem that it keeps issuing a large instruction fetch request.
更に、 分岐予測に失敗し間違った予測をもとに菊亍パイプラインに投入された 命令をパイプライン上から消去しなければならないがそのためには分岐予測に失 敗した分岐命令力 s命令完了しなければならなレヽ。 しかし命令完了はィンオーダ処 理のため分岐命令以前の命令力 S命令完了しなければ薪 Ϊパイプラインに投入され た命令をパイプライン上から消去することが出来ない。 そのため分岐予測に失敗 した分岐命令の命令完了が遅れると誤って 亍パイプラインに投入された命令か ら不必要なオペランドリクエストが出てしまうという問題がある。 発明の開示  Furthermore, the instruction entered into the Kikuzaki pipeline based on the incorrect branch prediction due to the failed branch prediction must be deleted from the pipeline. That must be. However, instruction completion is an in-order processing, so the instruction power before the branch instruction must be completed before the fire instruction 命令 The instruction input to the pipeline cannot be deleted from the pipeline. Therefore, if the completion of a branch instruction that fails to predict a branch is delayed, there is a problem in that an unnecessary operand request is issued from an instruction that is erroneously input to the pipeline. Disclosure of the invention
本発明は上記の点に鑑みてなされたもので、 分岐予測を誤った齢に、 再命令 フェッチ要求をメモリに出すまでの間、 誤った命令フェッチリクエストゃオペラ ンドリクエストを抑止し又は無効化する、命令制御方法及び命令フェッチ方法及 ぴ、 その装置を雞することを目的とする。  The present invention has been made in view of the above points, and suppresses or invalidates an erroneous instruction fetch request / operand request until a branch instruction is incorrectly predicted and a re-instruction fetch request is issued to a memory. An object of the present invention is to provide an instruction control method, an instruction fetch method, and an apparatus thereof.
この目的を達成するために、 本発明は、 アウトォプオーダ方式で命令を節す る、命令を記憶した記憶部から編己命令をフェッチするように制御する命令フエ ツチ制御部と、  In order to achieve this object, the present invention provides an instruction fetch control unit that controls instructions so as to fetch an edit instruction from a storage unit that stores instructions, which registers instructions in an out-order manner;
廳己記憶部から供給される命令を一時記憶する命令バッファと、  An instruction buffer for temporarily storing instructions supplied from the café's own storage unit,
Sfjf己命令バッフアバッファから送られる命令をデコードする命令デコーダと、 命令の分岐を予測する分岐命令予測部と、  An instruction decoder for decoding an instruction sent from the Sfjf own instruction buffer, a branch instruction prediction unit for predicting an instruction branch,
編己命令フェッチ制御部、 嫌己命令バッファ、 嫌己命令デコーダ及び、 ΙίίΙΒ分 岐命令予測部を制御する分岐予測制御部とを有する命令制御装置におレ、て、 嫌己分岐予測制御部が嫌己分岐命令予測部による分岐予測力 S誤りであったと判 断した齢には、 謂己分岐予測制御部が嫌己分岐命令予測部による前記分岐予測 力 S誤であつたと判断してから ΙίίΙΒ記憶部から前記命令パッファが正しレヽ命令を再 フェッチするまでの間、 嫌己分岐予測制御部は、 既に ffit己記憶部に出力された命 令フェッチリクエストを抑止する信号を ΙΐίΙΞ命令フェッチ制御部へ出力し且つ、 ΙΐίΙ己命令バッファを無効化する信号を前記命令パッファへ出力する、 命^^御装 置を撤する。 Knitting instruction fetch control unit, kinking instruction buffer, kinking instruction decoder, and In an instruction control apparatus having a branch prediction control unit for controlling a branch instruction prediction unit, the age at which the unknowing branch prediction control unit determines that the branch prediction power of the unknowing branch instruction prediction unit was S error was wrong. After the so-called self-branch prediction control unit determines that the branch predictive power S by the unpleasant branch instruction prediction unit was incorrect, the operation is continued until the instruction buffer re-fetches the correct instruction from the storage unit. The own branch prediction control unit outputs a signal for suppressing the instruction fetch request already output to the ffit self storage unit to the instruction fetch control unit, and outputs a signal for invalidating the own instruction buffer to the instruction buffer. To remove the equipment.
本発明により、 このように分岐予測失敗力 s判明してレ、て再命令フエッチリクェ ストを出すための他の条件が確定していない時に再命令フェツチリクエストのた めの全ての条件力 s揃うまでキヤッシュ制御部に対して全ての命令フェツチリタエ ストを無効化するためのキャンセル信号を通知でき、 また、 同時にデコーダ部に 対しても命令の発行を止めるよう通知できる。  According to the present invention, as described above, the branch prediction failure power s is found, and when the other conditions for issuing a re-order fetch request are not determined, all the criterion forces for the re-order fetch request are equal. Up to this point, the cache control unit can be notified of a cancel signal for invalidating all instruction fetch requests, and can also be notified to the decoder unit to stop issuing instructions at the same time.
更に、 この目的を達成するために、 本発明は、 アウトォブオーダ方式で命令を 亍する、 命令を記憶した記憶部から命令をフェツチするように制御する命令フ エッチ制御部と、  Further, in order to achieve this object, the present invention provides an instruction fetch control unit which controls an instruction to be fetched from a storage unit storing the instruction, wherein the instruction fetch control unit executes the instruction in an out-of-order manner
嫌己記憶部からの命令を一時記憶する命令バッファと、  An instruction buffer for temporarily storing instructions from the hatred storage unit,
iff己命令バッファバッファから送られる命令をデコードする命令デコーダと、 命令の分岐を予測する分岐命令予測部と、  an instruction decoder for decoding an instruction sent from the iff self instruction buffer buffer; a branch instruction prediction unit for predicting a branch of the instruction;
tiff己命令フェッチ制御部、 ffif己命令 z ッファ、 ΙίίΙΒ命令デコーダ及ぴ、 l己分 岐命令予測部を制御する分岐予測制御部とを有する命令制御装置におレ、て、 iff己分岐予測制御部が iilH分岐命令予測部による分岐予測が誤りであつたと判 断した には、 tiif己分岐予測制御部が tiff己分岐命令予測部による前記分岐予測 力 s誤りであつたと判断してから鍵己記憶部から嫌己命令パッファが正しレヽ命令を 再フェッチするまでの間、 前記分岐予測制御部は、 前記分岐命令予測部による前 記分岐予測の誤りにより、 誤って節されようとしている命令からのオペランド リクエストの無効ィ匕を行う信号を廳己記憶部へ出力し且つ、 嫌己命令デコーダを 無効化する信号を tiff己命令デコーダへ出力する、 命令制御装置を する。 本発明により上記、 命令フェツチリタエストを無効化するためのキヤンセル信号 を出すことができ、 同時にキヤッシュ制御部に対して不必要なオペランドフエッ チリクエストを抑止するためのキャンセル信号を通知できる。 iff self-instruction fetch control unit, ffif self-instruction z-buffer, {instruction decoder}, and l self-branch instruction prediction unit that controls a self-branch instruction prediction unit. To determine that the branch prediction by the iilH branch instruction prediction unit was incorrect, the tiif own branch prediction control unit determines that the branch prediction power by the tiff self branch instruction prediction unit was s error, and Until the hater instruction buffer re-fetches the correct instruction from the storage unit, the branch prediction control unit determines whether or not the instruction that is erroneously set due to an error in the branch prediction by the branch instruction prediction unit is incorrect. An instruction control device for outputting a signal for invalidating the operand request to the self-memory unit and outputting a signal for invalidating the obscene instruction decoder to the tiff own instruction decoder. According to the present invention, there is provided a cancel signal for disabling the above instruction At the same time, and can notify the cache control unit of a cancel signal for suppressing unnecessary operand fetch requests.
また、 この時、 キャッシュ制御部に対して誤って^パイプラインに投入され た命令の f¾lj子を同時に通知することでキヤッシュ制御部において要求されたォ ぺランドフェッチリクエストが必要なリクエストか不必要なリクエストであるか の判別ができる。 このように本発明では不必要な命令フェツチリクエストゃオペ ランドリクエストを抑止するためのキャンセノレ信号を、 分岐命^ IJ御部から命令 フェツチ制御部、 キヤッシュ制御部にそれぞれ通知し、 再命令フェッチが完了す るまで命令投入を止めることができるので、 キヤッシュ部における不必要なリプ レースを抑止し、 プロセッサの性能向上を図ることができる。 図面の簡単な説明  In addition, at this time, the cache controller is notified of the fjlj child of the instruction erroneously input to the pipeline at the same time, so that the operand fetch request requested by the cache controller is unnecessary or unnecessary. The request can be determined. As described above, in the present invention, the cancel instruction signal for suppressing unnecessary instruction fetch request and operand request is notified from the branch instruction ^ IJ control unit to the instruction fetch control unit and the cache control unit, respectively, and re-instruction fetch is performed. Since instruction input can be stopped until completion, unnecessary replacement in the cache section can be suppressed, and processor performance can be improved. BRIEF DESCRIPTION OF THE FIGURES
本発明の他の目的、 t¾ひ利点は、 添付の図面を参照しながら以下の詳細な 説明を読むことにより一層明瞭となるであろう。  Other objects and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings.
図 1は、 本発明の実施例のコンピュータの中央処理ュニット内の命令制御装置 内の分岐命令制御動作を実行する部分の概要を示すプロック図である。  FIG. 1 is a block diagram showing an outline of a portion for executing a branch instruction control operation in an instruction control device in a central processing unit of a computer according to an embodiment of the present invention.
図 2は、 本発明の実施例の動作のフローチヤ一トを示す図である。  FIG. 2 is a flowchart showing the operation of the embodiment of the present invention.
図 3は. 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。  FIG. 3 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 4は. 本発明に従つた制御信号を生成するための回路図の一部を示す図であ る。  FIG. 4 shows a part of a circuit diagram for generating a control signal according to the present invention.
図 5は. 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。  FIG. 5 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 6は. 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。  FIG. 6 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 7は 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。  FIG. 7 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 8は. 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。 図 9は、 本発明に従った制御信号を生成するための回路図の一部を示す図であ る。 FIG. 8 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention. FIG. 9 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 10は、 本発明に従った制御信号を生成するための回路図の一部を示す図で ある。  FIG. 10 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 11は、 本発明に従った制御信号を生成するための回路図の一部を示す図で ある。  FIG. 11 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 12は、 本発明に従った制御信号を生成するための回路図の一部を示す図で ある。  FIG. 12 is a diagram showing a part of a circuit diagram for generating a control signal according to the present invention.
図 13は、 従来の分岐制御のタイミングチャートを示す図である。  FIG. 13 is a diagram showing a timing chart of the conventional branch control.
図 14は、 本発明に従って生成された信号のタイミングチャートを示す図であ る。 発明を実施するための最良の形態  FIG. 14 is a diagram showing a timing chart of a signal generated according to the present invention. BEST MODE FOR CARRYING OUT THE INVENTION
以下に、本発明を実施するための実施の形態について、図面を用いて説明する。 図 1は、 本発明の実施例のコンピュータの中央処理ュニット内の命令制御装置 100 (インストラクションュニット) 内の分岐命^ IJ御動作を実行する部分の 概要を示すブロック図である。 命令制御装置 100は、 キャッシュメモリ 101 キャッシュ制御部 102より構成される記憶部 103と接続されてい 。 命 IJ 御装置 (インストラクションュニット) 100内の分岐命^ W卸動作を実行する 部分は、 主に、命令フエツチ制御部 (I n s t r uc t i on Fe t ch C An embodiment for carrying out the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an outline of a portion for executing a branch instruction IJ control operation in an instruction control device 100 (instruction unit) in a central processing unit of a computer according to an embodiment of the present invention. The instruction control device 100 is connected to a storage unit 103 including a cache memory 101 and a cache control unit 102. The part that executes the branch operation in the instruction IJ control device (instruction unit) 100 is mainly composed of an instruction fetch control unit (Inst r uc ti on Fe t ch C
0 n t r o 1又は、 I FCTL) 111、 命令バッファ ( I n s t r u c t i o n Bu f f e r又は、 I BBUFER) 112、分岐予測部(B r a n c h H0 ntro 1 or IFCTL) 111, instruction buffer (Instructione Buffer or IBBUFER) 112, branch predictor (BranchHH)
1 s t o r y、BRHI S) 113、分岐命令制御部(Re s e r v a t i on S t a t i on Fo r Br anc h又は、 R S BR) 114、命令デコード部 (De c o d e r又は、 DDECR) 115、命令完了制御部(Commi t F a c i 1 i t y又は、 COMIT) 116により構成される。 そして、 命 IJ御 装置 100は、 キャッシュ帘 IJ御部 102を介して、 キャッシュメモリ 101力、ら の命令を読み出しを制御する。 命令制御装置 100では、命令は、 前述のァゥト ォブオーダ方式に従って処理される。 本実施例の命 IJ御装置 100では、菊,パイプライン上に械する全命令に 対して菊 Ϊパイプライン上での命令順序を示すフラグ (Ins t ruc t i on ID又は、 I ID) が割り当てられている。 実行パイプライン上ではアウトォブ オーダ方式の処理に従って、 令が処理されるが、命令完了時には I IDに基 づいて、 前述のイン才一ダ処理で命令の完了が行われる。 1 story, BRHI S) 113, Branch instruction control unit (Reservation on Stand-by Link or RSBR) 114, Instruction decode unit (Decoder or DDECR) 115, Instruction completion control unit (Commit (Faciity or COMIT) 116. Then, the IJ controller 100 controls reading of the instructions from the cache memory 101 via the cache IJ controller 102. In the instruction control device 100, the instructions are processed according to the above-described art-over-order system. In the IJ controller 100 of this embodiment, chrysanthemum and a flag (Instruction ID or I ID) indicating the order of instructions on the pipeline are assigned to all instructions to be machined on the pipeline. Has been. Instructions are processed in the execution pipeline in accordance with out-of-order processing. When an instruction is completed, the instruction is completed in the above-mentioned in-line processing based on the ID.
先ず最初に、 図 1のブロック図の概略の動作にっレ、て説明する。  First, the schematic operation of the block diagram of FIG. 1 will be described.
命令フェッチ制御部 111は、 例えば、 アドレスのような、命令フェッチリク ェスト (IF— REQ一 VAL)をキャッシュ制御部 102へ送る。 これにより、 キヤッシュ制御部 102を介して、 キャッシュメモリ 101に格納された命令が 読み出される。 このように読み出された命令又は、 キヤッシュ制御部 102力ら 命令バッファ 112へ格糸内される。  The instruction fetch control unit 111 sends an instruction fetch request (IF-REQ-VAL) such as an address to the cache control unit 102, for example. Thus, the instruction stored in the cache memory 101 is read out via the cache control unit 102. The instruction read in this way or the cache control unit 102 is stored in the instruction buffer 112.
また、 命令フェッチ制御部 111は、 上述のアドレスを信号 120を介して、 分岐予測部 113へも送る。 命令フェッチ制御部 111により、命令フェッチが 行われると、 命令フェッチアドレスをもとに、 上述のように、 BRHI S113 において分岐予測が実行される。 分岐予測の結果、 分岐すると予測した齢は、 命令は、 その命令に "分岐する" という予測結果を示すフラグ (+BRHI S— H I T=l) を添付して、 信号 121を介して I FCL111へそして、 I FC LI 11と I BBUFER112を介して、 DDE CR 115に投入される。 こ のように分岐予測された命令は、命令フェツチ制御部 111から命令バッファ 1 12へ格納される。  The instruction fetch control unit 111 also sends the above address to the branch prediction unit 113 via a signal 120. When the instruction fetch is performed by the instruction fetch control unit 111, the branch prediction is performed in the BRHI S113 based on the instruction fetch address as described above. As a result of the branch prediction, the age at which the branch is predicted is determined by the instruction to the IFCL111 via the signal 121 by attaching a flag (+ BRHIS—HIT = l) indicating the predicted result of “branch” to the instruction. Then, it is supplied to DDE CR 115 via I FC LI 11 and I BBUFER 112. The instruction whose branch has been predicted in this way is stored in the instruction buffer 112 from the instruction fetch control unit 111.
命令バッファ 112は、 格納された命令を、 命令デコード部 115へ送る。 命令デコード部 115では、命令バッファ 112より送られた命令を、 デコー ドする。  The instruction buffer 112 sends the stored instruction to the instruction decoding unit 115. The instruction decoding unit 115 decodes the instruction sent from the instruction buffer 112.
命令デコード部 (DDECR) 115において命令をデコードする時に、 "分岐 命令"又は "分 ると予測している命令" と判断された命令は、 信号 122を 介して、 RSBR114、 COMIT116にエントリされる。 なお、 DDEC Rl 15でのデコード結果に関わらず、 パイプラインに ¾Λされる全ての命 令は命令完了制御部 (COM IT) 116にェントリされる。  When an instruction is decoded by the instruction decoding unit (DDECR) 115, an instruction determined as a “branch instruction” or an “instruction predicted to be known” is entered into the RSBR 114 and the COMIT 116 via a signal 122. Note that all instructions input to the pipeline are entered into the instruction completion control unit (COMIT) 116 irrespective of the decoding result in DDEC Rl15.
DDECR115は、 命令の^?パイプラインへの投入と全命令に対して ΐ パイプライン上での命令順序を示すフラグ( I ns t ruc t i on I D又は、 I ID) の割り当てを行う。 DDECR115 is designed to send instructions to the ^? Pipeline and Assigns a flag (Instruction ID or I ID) indicating the order of instructions on the pipeline.
RSBR114は、 分岐判定、 及び分岐予測失敗時には、命令フェッチ制御部 111へ、 再命令フェッチリクエスト (RSBR—RE I FCH— REQ) を出 力して制御を行う。 RSBR114は、 ,パイプライン上に雜する複数の分 岐命令 (エントリ) を し制御することが可能であり、 各エントリは、 前述の 菊亍パイプライン上での命令)噴序を示すフラグ I I Dで管理されている。 R S B Rl 14での制御が終了した命令は、 RSBR114力ら解放され、 そして、命 令完了までの間は、 COM I T 116で制御される。 COM I T 116は、 剪亍 パイプラィン上の全命令の命令完了を制御している。 ¾ίϊパイブラィン上の全命 令は、 I IDで管理されており、 そして、 命令完了条件を満たしたものから順に ィンオーダ処理で命令を完了する。  The RSBR 114 outputs a re-instruction fetch request (RSBR-RE I FCH-REQ) to the instruction fetch control unit 111 when the branch determination and the branch prediction fail, and performs control. The RSBR114 can control and control a plurality of branching instructions (entries) on the pipeline, and each entry is a flag IID indicating the above-mentioned instruction on the Kikuya pipeline). Is managed. The instruction for which the control in RSB Rl14 has been completed is released from the RSBR114, and is controlled by the COMIT 116 until the instruction is completed. COM I T 116 controls the instruction completion of all instructions on the shear pipeline.全 All instructions on the pipeline are managed by I ID, and instructions are completed by in-order processing in order from the one that satisfies the instruction completion condition.
次に、 本発明の実施例の動作について、 図 2を参照して説明する。 図 2は、 本 発明の実施例の動作のフローチヤ一トを示す図である。  Next, the operation of the embodiment of the present invention will be described with reference to FIG. FIG. 2 is a flowchart showing the operation of the embodiment of the present invention.
図 2のステップ 201では、 先ず最初に、 上述のように、 命令デコード部 (D DECR) 115から分岐命令が、 分岐命令制御部 (RSBR) 114へ、 発行 される。  In step 201 of FIG. 2, first, a branch instruction is issued from the instruction decode unit (D DECR) 115 to the branch instruction control unit (RSBR) 114 as described above.
次に、 ステップ 202では、 上述のように、 RSBR114は、 分岐命令を登 録する。 RSBR114は、 実行パイプライン上に存在する複数の分岐命令を登 録して制御することが可能である。  Next, in step 202, the RSBR 114 registers a branch instruction, as described above. The RSBR 114 can register and control a plurality of branch instructions existing on the execution pipeline.
次に、 ステップ 203では、 分岐の判定が行われる。 分岐予測の判断が失敗し ている場合には、 処理は、 ステップ 204へ進む。  Next, in step 203, a branch is determined. If the determination of the branch prediction has failed, the process proceeds to step 204.
RSBR114で分岐予測の判定が行われたときに、 BRHI S 113での分 岐予測が失敗していると判断される とは、 次の第 1の条件から第 4の条件の レ、ずれか 1つの条件を満た である。  When the branch prediction is determined by the RSBR114, it is determined that the branch prediction by the BRHI S113 has failed if the following conditions from the first condition to the fourth condition are different or 1 The two conditions are satisfied.
第 1の条件は、 分岐しないと予測した分岐命令が分 る ί である。 第 2の 条件は、 分 ると予測した分岐命令が分岐しない:^である。 第 3の条件は、 分岐すると予測した分岐命令の分岐先ァドレスが誤りの:^である。 第 4の条件 は、 分岐命令でない命令を、 分岐命令であるかのごとく分 ると予測する である。 The first condition is that the branch instruction predicted not to branch is known. The second condition is that the predicted branch instruction does not branch: ^. The third condition is that the branch destination address of a branch instruction predicted to branch is: ^. The fourth condition predicts that instructions that are not branch instructions will be seen as if they were branch instructions. It is.
以下に、 第 1の条件から第 4の条件を満たしている論理式を示す。  The following is a logical expression that satisfies the first to fourth conditions.
第 1の条件を満た は ·· + R S B R_VAL ID & — R S B R_B RH I S— HIT & +RSBR— RESOLVED & +RSBR一 TAKE Nが真である:^であり、 + RSB R_VAL ID & — R SBR R_B RH I S — HIT & + RSBR — RESOLVED & + RSBR-TAKE N is true: ^
第 2の条件を満た は: +RSBR— VAL I D & +RSBR— BRH I S— HIT & +RSBR一 RESOLVED & — RSBR— TAKE Nが真である場合であり、 The second condition is met: + RSBR—VAL I D & + RSBR— BRH I S— HIT & + RSBR- RESOLVED & — RSBR— TAKE N is true,
第 3の条件を満た 1 "^は: +RSBR— VAL I D & +RSBR一 BRH I S一 HIT & +RSBR一 TAV & — RSBR一 TGTCP一 MAT CHが真である場合であり、 Meets the third condition 1 "^ is: + RSBR— VAL I D & + RSBR- BRH I S- HIT & + RSBR- TAV & — RSBR- TGTCP- MATCH is true,
第 4の条件を満たす場合は: +RSBR— PHANTOM— VAL I Dが真であ る である。 If the fourth condition is met: + RSBR—PHANTOM—VAL ID is true.
ここで、 各信号は、 次の意味を有する信号である。  Here, each signal is a signal having the following meaning.
(1) +RSBR— VAL I Dは、 R S BR 114エントリが分岐命令であるこ とを示す。  (1) + RSBR—VAL ID indicates that the RSBR 114 entry is a branch instruction.
(2) +RSBR— BRHI S一 H I Tは、 そのエントリが BRHI S 113で "分岐する" と予測されたことを示す。  (2) + RSBR—BRHIS-HIT indicates that the entry was predicted to "branch" at BRHI S113.
(3) +RSBR_RESOLVEDは、 そのエントリの分岐条件が確定したこ とを示す。  (3) + RSBR_RESOLVED indicates that the branch condition of the entry has been determined.
(4) +RSBR_TAKENは、 そのエントリが分 1^1"ることを示す。  (4) + RSBR_TAKEN indicates that the entry is 1 ^ 1 ".
(5) +RSBR— TAVは、 そのエントリの分岐アドレスが確定したことを示 す。  (5) + RSBR—TAV indicates that the branch address of the entry has been determined.
(6) +RSBR— TGTCP一 MATCHは、 そのエントリの予測分岐アドレ スが正しレ、アドレスであることを示す。  (6) + RSBR—TGTCP-MATCH indicates that the predicted branch address of the entry is correct and is an address.
(7) +RSBR—PHANTOM— VAL I Dは、 分岐命令でない命令を、 分 岐命令のように分岐すると判断したことを示す。  (7) + RSBR—PHANTOM—VAL ID indicates that an instruction that is not a branch instruction has been determined to branch as a branch instruction.
ここで、 信号名の先頭に付された" +"記号は、 正論理であることを示し、一 方信号名に付された" -" 記号は、負論理であることを示す。即ち、例えば、上 述の (1) +RSBR— VAL I Dについては、,, そのエントリが B RH I S 1 13で "分 る" と予測された"時に、 +RSBR— VAL IDは正である。 一方、" そのェントリが BRH I S 113で "分 る" と予測された"時に、 + RSBR— VAL I Dは負である。 又、 記号" &" は論理積の演算をを示す。 上述の何れかの条件が成立する:^には、 処理は、 ステップ 204に進む。 次にステップ 204では、 以下の制御が同時に行われる。 Here, a "+" sign added to the head of a signal name indicates positive logic, while a "-" sign added to a signal name indicates negative logic. That is, for example, For (1) + RSBR—VAL ID, the + RSBR—VAL ID is positive when the entry is “predicted” by BR RH IS 113. On the other hand, the entry + RSBR—VAL ID is negative when is predicted to be “know” by BRH IS 113. The symbol “&” indicates a logical AND operation. : In ^, the process proceeds to step 204. Next, in step 204, the following control is performed simultaneously.
RSBR114力、ら、信号 123 (RSBR— CANCEL— I F—I D—0, 1, 2, 3, 4, 5) により、 I FCTL111を経由して、 キャッシュ制御部 102に対して、命令フェッチリクエストの無効を通知する信号 (CANCEL 一 IF一 ID— 0, 1, 2, 3, 4, 5) 力 S送られる。  Invalid instruction fetch request to cache control unit 102 via IFCTL 111 by RSBR114 force, signal 123 (RSBR—CANCEL—IF—ID—0, 1, 2, 3, 4, 5) (CANCEL-IF-ID- 0, 1, 2, 3, 4, 5, 5) is sent.
この時、 IFCL111では全ての IBBUFER112 (メモリからフェツ チしたデータを DDECR 115に投入するまで、 一時的に保存するためのメモ リ機構。 本実施例では 6ポートを有している) の中のデータを消去する。  At this time, the data in all the IBBUFER112 (memory mechanism for temporarily storing the fetched data from the memory until the data is fetched from the memory to the DDECR 115. In this embodiment, the IFCL111 has 6 ports) To delete.
この信号は、 再命令フェッチリクエスト (RSBR— RE I FCH— REQ) が RSBR 114から1 じ 111に、信号 123を介して出されるまで、 連 続して送られる。  This signal is sent continuously until a re-instruction fetch request (RSBR-REIFCH-REQ) is issued from RSBR 114 to 111 at signal 123.
更に、 分岐予測に失敗した命令 (エントリ) よりも後続の RSBRエントリか らの、 再命令フェッチリクエスト (RSBR— RE I FCH— REQ) を抑える ために、 後続の RSBRエントリを消去する。  Furthermore, in order to suppress re-instruction fetch requests (RSBR-REIFCH-REQ) from the RSBR entry following the instruction (entry) for which branch prediction failed, the subsequent RSBR entry is deleted.
そして、 RSBR114力ら DDECR115に対して、 亍パイプラインへ の命令投入を抑止するための信号 (INH_E_VAL ID) が送られる。 この 信号は、 誤った分岐予測によって^パイプラインに投入された不必要な命令を ^パイプライン上から消去するまで (即ち、 分岐予測に失敗した分岐命令が命 令完了するまでの間。これにより、 COMI Tl 1
Figure imgf000012_0001
Then, a signal (INH_E_VAL ID) is sent to RSBR114 and DDECR115 to suppress the instruction input to the pipeline. This signal is used until the unnecessary instruction injected into the pipeline due to incorrect branch prediction is deleted from the pipeline (that is, until the branch instruction whose branch prediction fails is completed. , COMI Tl 1
Figure imgf000012_0001
FLUS H_R Sという信号が送られて実行パイプラィン上の命令が消去され る。) 連続して送られる。 The instruction FLUS H_RS is sent and the instruction on the execution pipeline is erased. ) Sent continuously.
これと同時に、 RSBR 114から、 キャッシュ制御部 102に対して、 不必 要なオペランドリクエストの無効を通知する信号 (CANCEL— OP—I ID —VALID) が送られる。 これと同時に、 誤った分岐予測によって菊亍パイプ ラインに投入された不必要な命令からのオペランドリクエストと分岐命令以前に 節パイプラインに投入されている命令からのオペランドリタエストとを区別す るため、 分岐予測に失敗した分岐命令以降の I IDを RSBR114からキヤッ シュ制御部 102に対して通知する (CANCEL一 OP_I I D[5 : 0])。 この信号(CANCEL— OP_I ID[5: 0]) は、誤った分岐予測によつ て紫亍パイプラインに投入された不必要な命令を^1パイプライン上から消去す るまで連続して送られる。 At the same time, a signal (CANCEL-OP-IID-VALID) is sent from the RSBR 114 to the cache control unit 102 to notify that the unnecessary operand request is invalid. At the same time, incorrect branch prediction In order to distinguish operand requests from unnecessary instructions entered into the line from operand requests from instructions entered into the clause pipeline before the branch instruction, I IDs following the branch instruction for which branch prediction failed are distinguished. Is notified from the RSBR 114 to the cache control unit 102 (CANCEL-OP_I ID [5: 0]). This signal (CANCEL—OP_ID [5: 0]) is sent continuously until an unnecessary instruction input to the purple pipeline due to incorrect branch prediction is erased from the ^ 1 pipeline. Can be
次に、ステップ 205へ進む。ステップ 205では、上述のステップ 204で、 1言号が発生されるように制御が行われたので、 キヤッシュ制御部では C ANC EL— IF_ID— 0, 1, 2, 3, 4, 5が全て 1である間は、命令フェッチ リクエストが無効となる。 また、 CANCEL— OP—I 10_ し10が1 である間は、 CANCEL— OP—I IDC5: 0]が指し示す I I D以降の実行 パイプライン上の命令からのオペランドリクエストを無効化する。  Next, the routine proceeds to step 205. In step 205, since control was performed so that one word was generated in step 204 described above, in the cache control unit, C ANC EL—IF_ID—0, 1, 2, 3, 4, and 5 were all 1 During this time, the instruction fetch request is invalid. While CANCEL-OP-I10_10 is 1, operand requests from instructions on the execution pipeline following IID indicated by CANCEL-OP-IIDC5: 0] are invalidated.
次に、 ステップ 206では、 RSBR114から I FCL 111へ、 命令再フ エッチ要求 (RSBR_RE I FCH_REQ) が出され、 そして、 命令の再フ エッチが再開される。  Next, in step 206, an instruction refetch request (RSBR_REIFCH_REQ) is issued from the RSBR 114 to the IFCL 111, and instruction refetching is resumed.
そして、 次にステップ 207へ進み、 RSBR114による分岐命令制御が終 了する。  Then, the process proceeds to step 207, where the branch instruction control by the RSBR 114 ends.
ステップ 203で、 分岐予測力成功したと判断された齢には、 処理は、 ステ ップ 203から、 ステップ 207へ進む。  If it is determined in step 203 that the branch prediction power is successful, the process proceeds from step 203 to step 207.
そして、 最後にステップ 208で、 分岐命令は完了する。  Finally, at step 208, the branch instruction is completed.
以上のように本発明では分岐予測の失敗が判明してから正しい命令シーケンス を再フェツチするまで不必要な命令フエッチリクエスト、 オペランドリクエスト を抑止し、 亍パイプラィン上への無意味な命令発行を止めることでキヤッシュ における不必要なリプレースの発生、 演算器等の命令制御リソースの無駄な消費 を防ぎ、命令処«置の性能向上を図ることができる。  As described above, in the present invention, unnecessary instruction fetch requests and operand requests are suppressed until the correct instruction sequence is fetched after the failure of branch prediction is found, and the issue of meaningless instructions on the pipeline is stopped. As a result, unnecessary replacement of the cache and unnecessary consumption of instruction control resources such as arithmetic units can be prevented, and the performance of instruction processing can be improved.
次に、 本発明に従った、 制御信号 RSBR— CANCEL— I F— I D— 0, 1, 2, 3, 4, 5と、 RSBR一 RE I FCH:一 REQと、 I NH一 E一 VA L IDと、 CANCEL OP I ID VAL I D及ぴ、 CANCEL OP — I ID[5: 0]を発生する回路について説明する。 Next, according to the present invention, the control signals RSBR—CANCEL—IF—ID—0, 1, 2, 3, 4, 5, RSBR—RE I FCH: one REQ, and INH—E—one VA L ID And CANCEL OP I ID VAL ID and CANCEL OP — Describe the circuit that generates I ID [5: 0].
図 3力ら 12は、 本発明に従った、 上述の制御信号を発生する回路の実施例を 示す。 図 13は、 従来の R SBR114の制御信号のタイムチヤ一トを示し、 ま た、 図 14は、 本発明に従った、 上述の制御信号を加えた、 RSBR114の制 御信号のタイムチヤートを示す。  FIG. 3 shows an embodiment of a circuit for generating the above-mentioned control signals according to the present invention. FIG. 13 shows a time chart of a control signal of the conventional RSBR 114, and FIG. 14 shows a time chart of a control signal of the RSBR 114 to which the above-mentioned control signal is added according to the present invention.
先ず最初に、 図 3から 12の制御信号を発生する回路について説明する。 図 3は、 RSBR一 CANCEL一 I F— I D— 0, 1, 2, 3, 4, 5をセ ットする信号 (+SET— RSBR— CANCEL— I F_I D_0, 1, 2, 3, 4, 5) を発生する回路を示す。 回路図において、" ALL"は、 ID— 0, 1, 2, 3, 4, 5を示すものとする。  First, a circuit for generating the control signals shown in FIGS. 3 to 12 will be described. Figure 3 shows a signal that sets RSBR-CANCEL-IF—ID—0, 1, 2, 3, 4, 5 (+ SET—RSBR—CANCEL—IF_ID_0, 1, 2, 3, 4, 5 ) Is shown. In the circuit diagram, “ALL” indicates ID-0, 1, 2, 3, 4, 5.
図 3は、 回路ブロック 310、 320、 330及び多入力 ORゲート 340よ り構成される。 回路ブロック 310は、 4入力 ANDゲート 311、 4入力 AN Dゲート 312、 4入力 ANDゲート 313、 バッファ 314及ぴ 4入力 ORゲ ート 315より構成される。 回路ブロック 320と 330は、 回路プロック 31 0と同一の構成である。 しかし各回路ブロックへの入力信号は、 R S B R 114 に ¾ ^されている各々の命令 (エントリ) に対応する。 例えば、 回路ブロック 3 10は、 I I Dが 0のエントリについての命令に対しての回路であり、 回路ブロ ック 320は、 I I Dは 1のエントリについての命令に対しての回路であり、 そ して、 回路ブロック 330は、 I I Dが nのエントリについての命令に対しての 回路である。  FIG. 3 includes circuit blocks 310, 320, and 330 and a multi-input OR gate 340. The circuit block 310 includes a 4-input AND gate 311, a 4-input AND gate 312, a 4-input AND gate 313, a buffer 314, and a 4-input OR gate 315. The circuit blocks 320 and 330 have the same configuration as the circuit block 310. However, the input signal to each circuit block corresponds to each instruction (entry) assigned to RSBR 114. For example, circuit block 310 is a circuit for an instruction for an entry with an IID of 0, circuit block 320 is a circuit for an instruction for an entry with an IID of 1, and The circuit block 330 is a circuit for an instruction for an entry whose IID is n.
回路ブロック 310の 4入力 ANDゲート 311は、 前述の第 1の条件をデコ 一ドする回路である。 回路ブロック 310の 4入力 ANDゲート 311には、 + RSBRO— VALID、 +RS BR 0_RE SOLVED, +RSBR— TA KEN及ぴ、一RSBR— BRHI S— HITが入力される。全ての入力が, の時に、 4入力 ANDゲート 311から, 1' が出力される。 これは第 1の条件 力 S成立した:^に相当する。  The four-input AND gate 311 of the circuit block 310 is a circuit that decodes the above first condition. To the 4-input AND gate 311 of the circuit block 310, + RSBRO—VALID, + RSBR 0_RE SOLVED, + RSBR—TA KEN, and one RSBR—BRHI S—HIT are input. When all inputs are, 1 'is output from the 4-input AND gate 311. This is equivalent to the first condition S being satisfied: ^.
回路ブロック 310の 4入力 ANDゲート 312は、 前述の第 2の条件をデコ 一ドする回路である。 回路プロック 310の 4入力 ANDゲート 312には、 + RSBR VAL ID、 十 RSBR RE SOLVED、 一 RS BR TAKE N及び、 +RSBR—BRHI S— HITが入力される。 全ての入力が, 1, の 時に、 4入力 ANDゲート 312から' 1' が出力される。 これは第 2の条件が 成立した:^に相当する。 The four-input AND gate 312 of the circuit block 310 is a circuit for decoding the above-described second condition. Circuit block 310 4-input AND gate 312 has + RSBR VAL ID, 10 RSBR RE SOLVED, 1 RSBR TAKE N and + RSBR-BRHI S- HIT are input. When all the inputs are 1, the 4-input AND gate 312 outputs '1'. This is equivalent to the second condition: ^.
回路プロック 310の 4入力 ANDゲート 313は、 前述の第 3の条件をデコ 一ドする回路である。 回路ブロック 310の 4入力 ANDゲート 313には、 + RSBR— VALID、 +RSBR一 TAV、 — RSBR— TGTCP— MAT CH及び、 +RSBR— BRHI S— HI Tが入力される。 全ての入力が, 1, の時に、 4入力 ANDゲート 313から, が出力される。 これは第 3の条件 が成立した:^に相当する。  The 4-input AND gate 313 of the circuit block 310 is a circuit that decodes the third condition described above. + RSBR-VALID, + RSBR-TAV, -RSBR-TGTCP-MATCH, and + RSBR-BRHIS-HIT are input to the 4-input AND gate 313 of the circuit block 310. When all inputs are 1 and, is output from the 4-input AND gate 313. This is equivalent to the third condition: ^.
回路プロック 310の/ ッファ 314は、 前述の第 4の条件をデコードする回 路である。 回路ブロック 310のバッファ 314には、 +RSBR_PHANT OM— VAL I Dが入力される。入力が, 1, の時に、バッファ 314力、ら, 1, が出力される。 これは、 第 4の条件が成立した に想到する。  The buffer 314 of the circuit block 310 is a circuit for decoding the above-described fourth condition. + RSBR_PHANTOM—VALID is input to the buffer 314 of the circuit block 310. When the input is 1, the output of the buffer 314 is output. This reminds us that the fourth condition holds.
回路ブロック 310の 4入力 ANDゲート 311、 4入力 ANDゲート 312、 4入力 ANDゲート 313、バッファ 314の何れかの出力が' 1, の場合には、 4入力 ORゲート 315から, 1' が出力される。  If any of the outputs of the 4-input AND gate 311, the 4-input AND gate 312, the 4-input AND gate 313, and the buffer 314 of the circuit block 310 is “1,” the 4-input OR gate 315 outputs “1”. You.
回路ブロック 320と 330についても同様である。 そして、 回路ブロック 3 10、 320又は、 330のいずれか 1つの出力が, の場合には、 ORゲー ト 340力ら' 1' が出力され、 SET— RSBR— CANCEL— I F—AL Lは' となる。  The same applies to the circuit blocks 320 and 330. If the output of one of the circuit blocks 310, 320 or 330 is, then OR gate 340 power '1' is output and SET-RSBR-CANCEL-IF-AL L is Become.
図 4は、 図 3と同一の構成であり、 CANCEL— OP—I I D— VAL I D をセットする、 (+SET— CANCEL— OP—I I D— VAL I D)を発生す る。  Figure 4 has the same configuration as Figure 3 and generates (+ SET—CANCEL—OP—I ID—VAL ID), which sets CANCEL—OP—I ID—VAL ID.
図 5は、 前述の図 3で示されたの同様な回路 310から 330及ぴ、 インバー タ 501、 502、 バッファ 503、 及ぴ、 ANDゲート 504、 505より構 成される。 図 5は、 中間信号 +CANCEL— OP— RSBR0、 +CANCE L一 OP一 RSBR 1、 及ぴ +CANCEL一 OP一 RSBRnを発生する。 こ れらの信号は、 分岐予測を失敗した次の命令を示す。 +CANCEL— OP— R SBR0は、回路 310の出力と等しい。 +CANCEL OP RSBR1は、 回路 310の出力がインパータ 501により反転された信号と、 回路 320の出 力とを入力として、 ANDゲート 504により論理積の演算を行った結果である。 また、 +CANCEL— OP— RSBRnも同様に、 ANDゲート 505により 演算されて出力される。 FIG. 5 is composed of similar circuits 310 to 330, inverters 501 and 502, buffers 503 and AND gates 504 and 505 shown in FIG. Figure 5 generates the intermediate signals + CANCEL-OP-RSBR0, + CANCEL-OP-RSBR1, and + CANCEL-OP-RSBRn. These signals indicate the next instruction that failed the branch prediction. + CANCEL—OP—R SBR0 is equal to the output of circuit 310. + CANCEL OP RSBR1 The result of the AND operation performed by the AND gate 504 using the signal obtained by inverting the output of the circuit 310 by the inverter 501 and the output of the circuit 320 as inputs. Similarly, + CANCEL—OP—RSBRn is calculated by the AND gate 505 and output.
図 6は、 +RE I FCH— TRG信号を発生する、 RSフリップフロップ 60 1より構成される回路を示す。 RSフリップフロップ 601の出力の +RE I F CH— TRGは、 RSフリップフロップ 601のセット端子 (S) に入力される 再命令フェッチリクエスト (+RSBR一 RE I FCH一 REQ) によりセット される。 そして、 RSフリップフロップ 601のリセット端子 (R) に入力され る、 +C LEAR— P I PEL INE信号によりリセットされる信号である。 + CLEAR— P I PEL I NE信号は、 COM I T 116が出力する、 節パイ プラインのタリァ命令信号である。  FIG. 6 shows a circuit consisting of an RS flip-flop 601 that generates the + RE I FCH—TRG signal. + REIFCH—TRG of the output of the RS flip-flop 601 is set by a re-instruction fetch request (+ RSBR-REIFCH-REQ) input to the set terminal (S) of the RS flip-flop 601. The signal is input to the reset terminal (R) of the RS flip-flop 601 and is reset by a + CLEAR-PIPELINE signal. + CLEAR — The PIPELINE signal is a section pipeline tally command signal output by COMIT116.
図 7は、 +RSBR_CANCEL— I F— ALL信号を発生する、 RSフリ ップフロップ 701より構成される回路を示す。 ここで、 記号" ALL" は、 I D— 0, 1, 2, 3, 4, 5を示す。 R Sフリップフロップ 701の出力の +R SBR_CANCEL_I F— ALL信号は、 RSフリップフロップ 701のセ ット端子 (S) に入力される、 図 3の ORゲート 340から出力される、 +SE T—RSBR— CANCEL— I F— ALLによりセットされる。 一方、 ORゲ ート 702が RSフリップフロップ 701のリセット端子 (R) に接続される。 ORゲート 702の 3つの入力には、 再命令フェッチリクエスト (+RSBR— RE I FCH_REQ) と、 図 6の R Sフリップフロップ 601の出力する + R E I FCH— TRG信号と、 + CLEAR_P I PEL I NE信号が入力される。 そして、再命令フェツチリクエスト (+RSBR—RE I FCH—REQ)又は、 図 6の RSフリップフロップ 601の出力する + RE I FCH— TRG信号又は、 +CLEAR— P I PEL INE信号のいずれか 1つが' の時に、 RSフリ ップフロップ 701のリセット端子 (R) には、 ORゲート 702からリセット 信号は入力されて、 +RSBR— CANCEL— I F— ALL信号は、 リセット される。  FIG. 7 shows a circuit comprising an RS flip-flop 701 that generates a + RSBR_CANCEL—IF—ALL signal. Here, the symbol "ALL" indicates ID-0, 1, 2, 3, 4, 5. The + R SBR_CANCEL_IF — ALL signal of the output of the RS flip-flop 701 is input to the set terminal (S) of the RS flip-flop 701, output from the OR gate 340 in FIG. CANCEL—set by IF—ALL. On the other hand, the OR gate 702 is connected to the reset terminal (R) of the RS flip-flop 701. The three inputs of the OR gate 702 include a re-instruction fetch request (+ RSBR—RE I FCH_REQ), the + REI FCH—TRG signal output from the RS flip-flop 601 in FIG. 6, and the + CLEAR_PIPEL INE signal. Is entered. Then, one of the re-instruction fetch request (+ RSBR—RE I FCH—REQ) or the + RE I FCH—TRG signal or the + CLEAR—PI PEL INE signal output from the RS flip-flop 601 in FIG. At the time of ', the reset signal from the OR gate 702 is input to the reset terminal (R) of the RS flip-flop 701, and the + RSBR-CANCEL-IF-ALL signal is reset.
図 8は、 2入力 ORゲート 801と 2入力 ANDゲート 802からなる、 +1 NH_E_VAL I Dを出力する回路を示す。 図 6の R Sフリップフロップ 60 1の出力する + RE I FCH— TRG信号と図 7の RSフリップフロップ 701 の出力の +R SB R— CANCEL— I F_AL L信号の論理和を、 ORゲート 801により演算子、 そして、 この ORゲート 801の出力と、 COMITl 1 6の出力する一 FLU SH_RS信号の論理積を、 ANDゲート 802により演 算して、 + I NH— E— VAL I Dを出力する。 一F LUSH— R S信号は、 図 1の COMITl 16の出力する + FLUSH— RS信号の負論理の信号である。 図 9は、 RSフリップフロップ 901と 2入力 ANDゲート 902により構成 される、 +D— VAL I Dを出力する回路を示す。 2入力 ANDゲート 902の 出力は、 RSフリップフロップ 901のセット端子 (S) に接続されている。 2 入力 ANDゲート 902により、 図 8の ANDゲート 802の出力する + I NH _E_VAL I Dの負論理の一 I NH— E— VAL I D信号と、 +E— VAL I D信号の論理積が、 ANDゲート 902により演算されそして、 ANDゲート 9 02の出力信号により RSフリップフロップ 901の出力の +D— VAL I D信 号がセットされる。 +D— VAL I D信号は、 デコードサイクルの開始を示す信 号であり、命令デコード部 115から RSBR114と COMITl 16へ出力 される。 また、 +E— VALID信号は、 I BBUFER112から DDECR 115へのセットのタイミングを示す信号である。 Figure 8 shows a two-input OR gate 801 and a two-input AND gate 802, +1 NH_E_VAL Indicates a circuit that outputs ID. The OR gate 801 calculates the logical sum of the + RE I FCH— TRG signal output from the RS flip-flop 601 in FIG. 6 and the + R SB R— CANCEL— IF_AL L signal output from the RS flip-flop 701 in FIG. The AND of the output of the OR gate 801 and the FLU SH_RS signal output by the COMITl 16 is calculated by the AND gate 802 to output + I NH-E-VAL ID. One FLUSH-RS signal is a negative logic signal of the + FLUSH-RS signal output from COMITl 16 in FIG. FIG. 9 shows a circuit configured by an RS flip-flop 901 and a two-input AND gate 902 to output + D-VAL ID. The output of the two-input AND gate 902 is connected to the set terminal (S) of the RS flip-flop 901. The 2-input AND gate 902 outputs the logical product of the + I NH _E_VAL ID negative logic I NH—E—VAL ID signal and the + E—VAL ID signal output from the AND gate 802 in FIG. The + D—VAL ID signal of the output of the RS flip-flop 901 is set by the output signal of the AND gate 902. + D— The VAL ID signal is a signal indicating the start of a decoding cycle, and is output from the instruction decoding unit 115 to the RSBR 114 and the COMITl 16. The + E-VALID signal is a signal indicating the timing of setting from the IBBUFER 112 to the DDECR 115.
図 10は、 CANCEL一 OP_I I D[5: 0]のセット信号+3£丁—じ NCE L— O P_ I I D [ 5: 0 ]を発生する回路を示す。 図 10に示す回路は、 2入力 ANDゲート 1001から 1007、 5入力 ORゲート 1010、 101 1及び 2入力 ORゲート 1020より構成される。  FIG. 10 shows a circuit for generating a set signal of CANCEL-OP_ID [5: 0] + 3 × NCEL_OP_ID_5 [0]. The circuit shown in FIG. 10 includes two-input AND gates 1001 to 1007, a five-input OR gate 1010, 1011, and a two-input OR gate 1020.
2入力 ANDゲート 1001には、 図 5のィンバータ 503より出力される + CANCEL— OP—RSBR0と、命令 ID (I ID) の +RSBR0—I I D_PL1 [5: 0]が入力される。 また、 2入力 ANDゲート 1002には、 図 5の2入カANDゲート504ょり出カされる+CANCEL_OP—RSBR 1と、 命令 IDの + RSBR1— I I D_P L 1 [ 5 : 0]が入力される。 また、 2入力 ANDゲート 1007には、 図 5の 2入力 ANDゲート 505より出力さ れる + CANCEL OP RSBRnと、命令 I Dの +RSBRn I I D— PLl [5: 0]が入力される。 そして、 2入力 ORゲート 1020からは、 分岐 予測を失敗した分岐命令の、 次の命令の命令 IDが出力される。 The 2-input AND gate 1001 receives + CANCEL—OP—RSBR0 output from the inverter 503 in FIG. 5 and + RSBR0—IID_PL1 [5: 0] of the instruction ID (I ID). The + CANCEL_OP—RSBR 1 output from the 2-input AND gate 504 in FIG. 5 and the instruction ID + RSBR1—II D_P L 1 [5: 0] are input to the 2-input AND gate 1002. You. Also, the 2-input AND gate 1007 has + CANCEL OP RSBRn output from the 2-input AND gate 505 in FIG. 5 and + RSBRn IID of the instruction ID. PLl [5: 0] is input. Then, from the two-input OR gate 1020, the instruction ID of the next instruction of the branch instruction whose branch prediction has failed is output.
図 11は、 RSフリップフロップ 1101により構成される、 +CANCEL — OP— I I D— VAL I Dを発生する回路を示す。 RSフリップフロップ 11 01のセット入力端子 (S) には、 図 4の ORゲート 340から出力される、 S ET— CANCEL— OP—I I D一 VAL I Dが入力され、 この信号により + CANCEL— OP—I I D— VAL I D信号がセットされる。 また、 RSフリ ップフロップ 1101のリセット入力端子 (R) には、 +CLEAR—PI PE LINE信号が入力され、 この信号により +CANCEL一 OP— I I D一 VA L I D信号がリセットされる。 +CLEAR— P I PEL I NE信号は、 COM I T 116が出力する、 ^ffパイプラインのクリァ命令信号である。  FIG. 11 shows a circuit configured to generate + CANCEL—OP—I ID—VAL ID formed by the RS flip-flop 1101. The set input terminal (S) of the RS flip-flop 1101 receives the SET—CANCEL—OP—IID—VAL ID output from the OR gate 340 in FIG. 4, and the + CANCEL—OP—IID — VAL ID signal is set. The + CLEAR-PIPE LINE signal is input to the reset input terminal (R) of the RS flip-flop 1101, and the + CANCEL-OP-IID-VALID signal is reset by this signal. + CLEAR—PIPELINE signal is a clear instruction signal of the ^ ff pipeline output by COMIT116.
図 12は、 RSフリップフロップ 1201により構成される、 +CANCEL _OP_I I D[5: 0]を出力する回路を示す。 RSフリップフロップ 1201 のセット端子 (S) には、 図 10の ORゲート 1020から出力される、 SET —CANCEL— OP_I ID[5: 0]信号が接続され、 これにより +CANC E L_0 P_ I I D[5 : 0]信号はセットされる。  FIG. 12 shows a circuit configured by the RS flip-flop 1201 and outputting + CANCEL_OP_ID [5: 0]. The SET—CANCEL—OP_I ID [5: 0] signal output from the OR gate 1020 in FIG. 10 is connected to the set terminal (S) of the RS flip-flop 1201. Thus, + CANC EL_0 P_IID [5 : 0] signal is set.
以上のように、 制御信号 RSBR_CANCEL_I F— I D_0, 1, 2, 3, 4, 5と、 RSBR一 RE I FCH一 REQと、 I NH_E_VAL I Dと、 CANCEL— OP— I ID— VAL ID及ぴ、 CANCEL一 OP— I ID [5 : 0]を発生することができる。  As described above, the control signals RSBR_CANCEL_IF—ID_0, 1, 2, 3, 4, 5, RSBR—RE I FCH—REQ, INH_E_VAL ID, CANCEL—OP—I ID—VAL ID, CANCEL-OP—I can generate I ID [5: 0].
次に、 本発明に従って生成された信号のタイミングを説明する。  Next, the timing of a signal generated according to the present invention will be described.
図 13は、 従来の分岐制御のタイミングチャートを示す図である。 そして、 図 14は、 本発明に従って生成された信号のタイミングチャートを示す図である。 図 13においては、 デコードサイクルの開始を示す信号であり、命令デコード 部 115力、ら RSBR114と COMI Tl 16へ出力される、 (1)D一 VAL ID信号でサイクルが開始する。 そして、番号 (2) 力ら (12) に示すように、 図 1の各部を制御する前述した信号が発生される。  FIG. 13 is a diagram showing a timing chart of the conventional branch control. FIG. 14 is a diagram showing a timing chart of a signal generated according to the present invention. In FIG. 13, this signal indicates the start of a decoding cycle, and is output to the instruction decoding unit 115, the RSBR 114 and the COMITl 16, and (1) the cycle starts with the D-VAL ID signal. Then, as shown by the numbers (2) and (12), the above-mentioned signals for controlling the respective parts in FIG. 1 are generated.
図 14おいて、 図 13と同一番号を付した信号は、 同一の信号を示す。 本発明 に従って生成された番号 (101) 力ら (108) に示す信号は、 前述の図 3か ら 12に示された実施例の回路により発生された信号を示す。 In FIG. 14, signals denoted by the same reference numerals as those in FIG. 13 indicate the same signals. The signals indicated by the numbers (101) and (108) generated in accordance with the present invention correspond to those in FIG. 12 shows the signals generated by the circuit of the embodiment shown in FIGS.
以上より、 図 3から 12に示された実施例の回路により, 制御信号 R SBR_ CANCEL— I F—I D—0, 1, 2, 3, 4, 5と、 RSBR一 REIFC H一 REQと、 I NPi一 E— VAL I Dと、 CANCEL— OP—I I D一 VA LID及ぴ、 CANCEL一 OP一 I ID[5: 0]を発生することができる。 こ れにより、 分岐予測を誤った齢に、 再命令フェッチ要求をメモリに出すまでの 間、 誤つた命令フエッチリクエストやオペランドリクエストを抑止し又は無効化 することができる。  From the above, the control signals R SBR_ CANCEL—IF—ID—0, 1, 2, 3, 4, 5, RSBR—REIFC H—REQ, and I NPi One E—VAL ID, CANCEL—OP—IID—VA LID, and CANCEL—OP—I ID [5: 0] can be generated. As a result, erroneous instruction fetch requests and operand requests can be suppressed or invalidated until a branch instruction is erroneously predicted and a re-instruction fetch request is issued to the memory.

Claims

求 の 範 Scope of request
1 . ァゥトォブオーダ方式で命令を節する、 命令を記憶した記憶部から嫌己 命令をフェッチするように制御する命令フェッチ制御部と、 1. an instruction fetch control unit that controls instructions so as to fetch an obscene instruction from a storage unit storing instructions,
編己記憶部から供給される命令を一時記憶する命令バッファと、  An instruction buffer for temporarily storing an instruction supplied from the knitting memory;
嫌己命令バッファバッファから送られる命令をデコードする命令デコーダと、 命令の分岐を予測する分岐命令予測部と、  An instruction decoder for decoding an instruction sent from the obscene instruction buffer, a branch instruction prediction unit for predicting an instruction branch,
tin己命令フェッチ制御部、 it己命令ノ ッファ、 ttrt己命令デコーダ及ぴ、 stff己分 岐命令予測部を制御する分岐予測制御部とを有する命 IJ御装置にぉ 、て、 編己分岐予測制御部が編己分岐命令予測部による分岐予測が誤りであったと判 断した には、 l己分岐予測制御部が前記分岐命令予測部による前記分岐予測 力 S誤であつたと判断してから tfif己記憶部から前記命令バッファが正しレヽ命令を再 フェッチするまでの間、 編己分岐予測制御部は、 既に tiff己記憶部に出力された命 令フェッチリクエストを抑止する信号を iff己命令フエッチ制御部へ出力し且つ、 151己命令バッファを無効化する信号を編己命令バッファへ出力する、命 柳装  A self-instruction fetch control unit, an it self-instruction buffer, a ttrt self-instruction decoder, and a stff self-branch prediction unit having a branch prediction control unit for controlling the self-branch instruction prediction unit. In order for the control unit to determine that the branch prediction by the self-branch instruction predicting unit is incorrect, the control unit determines that the branch prediction power by the branch instruction predicting unit is erroneous. Until the instruction buffer re-fetches the correct instruction from the self-storage unit, the self-branch prediction control unit outputs a signal for suppressing the instruction fetch request already output to the tiff self-storage unit to the iff self-instruction fetch. Output to the control unit and output a signal for invalidating the 151 own instruction buffer to the own instruction buffer.
2. 廳己分岐予測制御部は、 編己分岐命令予測部により分岐すると予測された 分岐命令が分岐しない 又は、 嫌己分岐命令予測部により分岐しないと予測さ れた分岐命令が分岐する場合又は、 前記分岐命令予測部により分岐命令でない命 令を分岐命令であるかのごとく分岐すると予測する 又は、 前記分岐命令予測 かの場合に、 編己分岐命令予測部による分岐予測;^誤りであると判断することを 1敷とする、 請求項 1に記載の命令制御装 2. The self-branch prediction control unit does not branch if the branch instruction predicted to branch by the self-branch instruction prediction unit does not branch, or if the branch instruction predicted to not branch by the unpleasant branch instruction prediction unit branches. The branch instruction prediction unit predicts that an instruction that is not a branch instruction will branch as if it were a branch instruction, or in the case of the branch instruction prediction, the branch prediction by the self-branch instruction prediction unit; The instruction control device according to claim 1, wherein the judgment is made as a single floor.
3. アウトォブオーダ方式で命令を実行する、 命令を記憶した記憶部から命令 をフェッチするように制御する命令フェッチ制御部と、 3. an instruction fetch control unit that executes instructions in an out-of-order manner, controls to fetch instructions from a storage unit that stores the instructions,
Ml己記憶部からの命令を一 Bき記憶する命令バッファと、 tfft己命令バッファバッファから送られる命令をデコードする命令デコーダと、 命令の分岐を予測する分岐命令予測部と、 An instruction buffer for storing an instruction from the Ml self memory unit, an instruction decoder for decoding an instruction sent from the tfft self-instruction buffer buffer; a branch instruction prediction unit for predicting an instruction branch;
Slit己命令フェッチ制御部、 ΙΐίΙ己命令ノ ッファ、 Ιΐίϊ己命令デコーダ及ぴ、 tiff己分 岐命令予測部を制御する分岐予測制御部とを有する命^卿装置において、  In a command device having a Slit self-instruction fetch control unit, a self-instruction buffer, a self-instruction decoder, and a branch prediction control unit for controlling a tiff self-branch instruction prediction unit,
ΙίίΙΕ分岐予測制御部が鍵己分岐命令予測部による分岐予測が誤りであつたと判 断した齢には、 嫌己分岐予測制御部が嫌己分岐命令予測部による嫌己分岐予測 力 s誤であったと判断してから編己記憶部から前記命令バッファが正しレヽ命令を再 フェッチするまでの間、 嫌己分岐予測制御部は、 嫌己分岐命令予測部による編己 分岐予測の誤りにより、 誤って菊 ΐされようとしている命令からのオペランドリ クェストの無効ィ匕を行う信号を編己記憶部へ出力し且つ、 編己命令デコーダを無 効化する信号を嫌己命令デコーダへ出力する、 命^ 御装置。  に は At the age at which the branch prediction control unit determines that the branch prediction by the key-self branch instruction prediction unit is incorrect, the unknowing branch prediction control unit determines that the unknowable branch instruction prediction unit Until the instruction buffer re-fetches the correct instruction from the self-storage unit after judging that the erroneous branch instruction prediction unit re-fetches the correct A signal for invalidating an operand request from an instruction to be executed is output to the edit memory unit, and a signal for disabling the edit instruction decoder is output to the disgusting instruction decoder. ^ Control devices.
4. 編己分岐予測制御部は、 嫌己分岐命令予測部により分 ると予測された 分岐命令が分岐しなレ、齢又は、 嫌己分岐命令予測部により分岐しなレ、と予測さ れた分岐命令が分岐する 又は、 前記分岐命令予測部により分岐命令でなレ、命 令を分岐命令であるかのごとく分岐すると予測する 又は、 嫌己分岐命令予測 部により分岐すると予測した分岐命令の分岐先ァドレスが誤りである ¾ ^の何れ かの^に、 flit己分岐命令予測部による分岐予測が誤りであると判断することを 特徴とする、 請求項 3に記載の命令制御装 4. The self-branch branch prediction control unit predicts that the branch instruction predicted to be known by the unpleasant branch instruction prediction unit will not branch, or that it will not branch by the unpleasant branch instruction prediction unit. The branch instruction predicted to branch or the branch instruction prediction unit predicts that the instruction is not a branch instruction, and the instruction predicts that the instruction will branch as if it were a branch instruction. 4. The instruction control device according to claim 3, wherein a branch destination address is erroneous, and it is determined that the branch prediction by the flit self-branch instruction predicting unit is erroneous for any of ^.
5. 命令を記憶した記憶部から ΙίίΙΒ命令をフェッチし、 アウトォブオーダ方式 で命令を節する、 命令の分岐を予測する分岐命令予測部と分岐予測制御部とを 有する命^ ^御装置を制御する方法であって、 5. A method for fetching an instruction from a storage unit storing the instruction and controlling the instruction control device having a branch instruction prediction unit for predicting the branch of the instruction and a branch prediction control unit for performing the instruction in an out-of-order manner. And
tiff己分岐予測制御部が鍵己分岐命令予測部による分岐予測が誤りであつたと判 断した ^には、 tfft己分岐予測制御部が嫌己分岐命令予測部による前記分岐予測 が誤であったと判断してから tiff己記憶部から正しレヽ命令を再フエッチするまでの 間、既に tfflS記憶部に出力された命令フェッチリクエストを抑止するステップと、 既に前記記憶部から出力された命令を無効化するステップとを有する、 命令制御 装置の制御方法。 The tiff self-branch prediction control unit has determined that the branch prediction by the key self-branch instruction prediction unit was incorrect ^ indicates that the tfft self-branch prediction control unit was incorrect in the branch prediction by the unpleasant branch instruction prediction unit. A step of suppressing an instruction fetch request that has already been output to the tfflS storage unit until the correct lay instruction is re-fetched from the tiff self storage unit after the determination, and invalidating the instruction already output from the storage unit. And controlling the instruction control device.
6. 歸己分岐予測制御部は、 歸己分岐命令予測部により分岐すると予測された 分岐命令が分岐しなレヽ齢又は、 嫌己分岐命令予測部により分岐しないと予測さ れた分岐命令が分岐する ^^又は、 前記分岐命令予測部により分岐命令でない命 令を分岐命令であるかのごとく分 u^ ると予根 ijする 又は、 tin己分岐命令予測 部により分 ると予測した分岐命令の分岐先ァドレスが誤りである の何れ かの場合に、 嫌己分岐命令予測部による分岐予測が誤りであると判断することを 糊數とする、 請求項 5に記載の命令制御装置の制御方法。 6. The return branch prediction control unit determines the age at which the branch instruction predicted to branch by the return branch instruction prediction unit does not branch, or branches the branch instruction predicted not to branch by the return branch instruction prediction unit. ^^ Or, if the instruction which is not a branch instruction is divided by the branch instruction prediction unit as if it is a branch instruction u ^, or tin the branch instruction predicted to be identified by the branch instruction prediction unit 6. The control method of the instruction control device according to claim 5, wherein, when the branch destination address is erroneous, it is determined that the branch prediction by the selfish branch instruction prediction unit is erroneous.
7. 命令を記憶した記憶部から嫌己命令をフェッチし、 アウトォブオーダ方式 で命令を^する、 命令の分岐を予測する分岐命令予測部と分岐予測制御部とを 有する命令制御装置を制御する方法であって、 7. A method of fetching a disgusting instruction from a storage unit storing instructions and executing the instruction in an out-of-order manner, and controlling an instruction control device having a branch instruction prediction unit for predicting a branch of an instruction and a branch prediction control unit. So,
編己分岐予測制御部が嫌己分岐命令予測部による分岐予測が誤りであつたと判 断した^には、 嫌己分岐予測制御部が漏己分岐命令予測部による前記分岐予測 力 S誤であつたと判断してから嫌己記憶部から正しい命令を再フェッチするまでの 間、 誤って されようとしている命令からのオペランドリクエストの無効化を 行うステップと、 実行パイブラィンへ投入される命令を無効化するステップとを 有する、 命^ fij御装置の制御方法。  If the self-branch branch prediction control unit determines that the branch prediction by the unknowing branch instruction prediction unit was incorrect, then the unknowing branch prediction control unit determines that the branch prediction power by the leaky branch instruction prediction unit is incorrect. Between re-fetching the correct instruction from the hatred storage unit after determining that the operand request is invalid, and invalidating the operand request from the instruction that is about to be erroneously executed, and invalidating the instruction input to the execution pipeline. A method for controlling a life control device, comprising:
8. 嫌己分岐予測制御部は、 廳己分岐命令予測部により分岐すると予測された 分岐命令が分岐しなレ、^"又は、 tiff己分岐命令予測部により分岐しないと予測さ れた分岐命令が分岐する 又は、 前記分岐命令予測部により分岐命令でなレ、命 令を分岐命令であるかのごとく分岐すると予測する 又は、 編己分岐命令予測 かの に、 靈己分岐命令予測部による分岐予測力 S誤りであると判断することを 1敷とする、 請求項 7に記載の命令制御装置の制御方法。 8. The unknowing branch prediction control unit determines whether the branch instruction predicted to branch by the self-branch instruction prediction unit does not branch, ^ ", or the branch instruction predicted not to branch by the tiff self-branch instruction prediction unit. Branch or the branch instruction prediction unit predicts that the instruction will not be a branch instruction, or that the instruction will branch as if it were a branch instruction, or that the self-branch branch instruction prediction, 8. The control method of the instruction control device according to claim 7, wherein a judgment is made that the prediction power is S error.
PCT/JP2003/006668 2003-05-28 2003-05-28 Instruction control device having branching prediction mechanism and control method thereof WO2004107163A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2005500202A JP3852782B2 (en) 2003-05-28 2003-05-28 Instruction control device having branch prediction mechanism and control method thereof
PCT/JP2003/006668 WO2004107163A1 (en) 2003-05-28 2003-05-28 Instruction control device having branching prediction mechanism and control method thereof
US11/114,202 US7636837B2 (en) 2003-05-28 2005-04-26 Apparatus and method for controlling instructions at time of failure of branch prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2003/006668 WO2004107163A1 (en) 2003-05-28 2003-05-28 Instruction control device having branching prediction mechanism and control method thereof

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US11/114,202 Continuation US7636837B2 (en) 2003-05-28 2005-04-26 Apparatus and method for controlling instructions at time of failure of branch prediction

Publications (1)

Publication Number Publication Date
WO2004107163A1 true WO2004107163A1 (en) 2004-12-09

Family

ID=33485773

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2003/006668 WO2004107163A1 (en) 2003-05-28 2003-05-28 Instruction control device having branching prediction mechanism and control method thereof

Country Status (2)

Country Link
JP (1) JP3852782B2 (en)
WO (1) WO2004107163A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100240048A1 (en) * 2009-03-17 2010-09-23 Seiko Epson Corporation Biological sample reaction chip, biological sample charging device, biological sample quantifying device, and biological sample reaction method
EP2608016A2 (en) 2011-12-21 2013-06-26 Fujitsu Limited Processing device and method for controlling processing device
JP2020060946A (en) * 2018-10-10 2020-04-16 富士通株式会社 Arithmetic processing device and arithmetic processing device control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4853840A (en) * 1986-01-07 1989-08-01 Nec Corporation Instruction prefetching device including a circuit for checking prediction of a branch instruction before the instruction is executed
JPH07306785A (en) * 1994-05-11 1995-11-21 Toshiba Corp Processor with branch instruction executing function and branch instruction control method
JP2000181711A (en) * 1998-12-18 2000-06-30 Hitachi Ltd System for canceling instruction fetching
JP2000322257A (en) * 1999-05-10 2000-11-24 Nec Corp Speculative execution control method for conditional branch instruction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4853840A (en) * 1986-01-07 1989-08-01 Nec Corporation Instruction prefetching device including a circuit for checking prediction of a branch instruction before the instruction is executed
JPH07306785A (en) * 1994-05-11 1995-11-21 Toshiba Corp Processor with branch instruction executing function and branch instruction control method
JP2000181711A (en) * 1998-12-18 2000-06-30 Hitachi Ltd System for canceling instruction fetching
JP2000322257A (en) * 1999-05-10 2000-11-24 Nec Corp Speculative execution control method for conditional branch instruction

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100240048A1 (en) * 2009-03-17 2010-09-23 Seiko Epson Corporation Biological sample reaction chip, biological sample charging device, biological sample quantifying device, and biological sample reaction method
EP2608016A2 (en) 2011-12-21 2013-06-26 Fujitsu Limited Processing device and method for controlling processing device
JP2020060946A (en) * 2018-10-10 2020-04-16 富士通株式会社 Arithmetic processing device and arithmetic processing device control method
JP7100258B2 (en) 2018-10-10 2022-07-13 富士通株式会社 Arithmetic processing device and control method of arithmetic processing device

Also Published As

Publication number Publication date
JP3852782B2 (en) 2006-12-06
JPWO2004107163A1 (en) 2006-07-20

Similar Documents

Publication Publication Date Title
US8250349B2 (en) Branch prediction control device having return address stack and method of branch prediction
US6662295B2 (en) Method and system dynamically presenting the branch target address in conditional branch instruction
EP1296229A2 (en) Scoreboarding mechanism in a pipeline that includes replays and redirects
JP2011517493A (en) System and method for selectively committing the results of executed instructions
US6981131B2 (en) Early condition code evaluation at pipeline stages generating pass signals for controlling coprocessor pipeline executing same conditional instruction
US8595474B2 (en) Information processing apparatus and branch prediction method
US20050188185A1 (en) Method and apparatus for predicate implementation using selective conversion to micro-operations
JP3163045B2 (en) Branch solution method and processor
JP4009248B2 (en) Branch prediction apparatus and branch prediction method
JP2001060153A (en) Information processor
US8028151B2 (en) Performance of an in-order processor by no longer requiring a uniform completion point across different execution pipelines
JP3683439B2 (en) Information processing apparatus and method for suppressing branch prediction
JP3800533B2 (en) Program counter control method and processor
JP3839755B2 (en) Instruction control method and processor
JP7124670B2 (en) Arithmetic processing device and method of controlling arithmetic processing device
WO2004107163A1 (en) Instruction control device having branching prediction mechanism and control method thereof
US7636837B2 (en) Apparatus and method for controlling instructions at time of failure of branch prediction
US8533441B2 (en) Method for managing branch instructions and a device having branch instruction management capabilities
JPH05224927A (en) Processor
JP2001100994A (en) Device and method for instruction processing controlling branch instruction changing mode
JP2004038338A (en) Information processor having branch estimation mechanism
JP3082944B2 (en) Pipeline processing equipment
JP4728877B2 (en) Microprocessor and pipeline control method
JP2001166934A (en) Instruction fetch controller
JP2007515718A (en) Method and apparatus for execution flow synonyms

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

WWE Wipo information: entry into national phase

Ref document number: 2005500202

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11114202

Country of ref document: US