JPH02306341A - Microprocessor - Google Patents
MicroprocessorInfo
- Publication number
- JPH02306341A JPH02306341A JP2023687A JP2368790A JPH02306341A JP H02306341 A JPH02306341 A JP H02306341A JP 2023687 A JP2023687 A JP 2023687A JP 2368790 A JP2368790 A JP 2368790A JP H02306341 A JPH02306341 A JP H02306341A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- signal
- branch
- decoder
- decoded
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30072—Arrangements for executing specific machine instructions to perform conditional operations, e.g. using predicates or guards
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3842—Speculative instruction execution
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
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はパイプライン処理のマイクロプロセッサに関し
、特にパイプラインマイクロプロセッサの命令デコード
ユニットの改良に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a pipeline processing microprocessor, and more particularly to an improvement of an instruction decode unit of a pipeline microprocessor.
パイプラインマイクロプロセッサでは、命令を先取りす
る命令先取りユニッ) (PDU)、先取りされた命令
をデコードする命令デコード情報ッ) (IDU)、同
ユニットからのオペランドアクセス情報にもとづきオペ
ランドアドレスの実効アドレス等を計算するメモリ管理
ユニッ) (MMU)、IDUからのデコード情報にも
とづき命令を実行する命令実行ユニット(EXU)等の
各ユニットは、所定のパイプライン処理の流れに従つて
それぞれ要求される処理を実行1〜でいる。したがっで
、IDUは、EXUが現在実行中の命令の数ステップ後
の命令を通常デコード12でいる。In a pipeline microprocessor, there is an instruction prefetch unit (PDU) that prefetches instructions, an instruction decode information unit (IDU) that decodes the prefetched instructions, and the effective address of the operand address based on the operand access information from the same unit. Each unit, such as the memory management unit (MMU) that performs calculations and the instruction execution unit (EXU) that executes instructions based on decode information from the IDU, executes each required process according to a predetermined pipeline processing flow. It's 1~. Therefore, the IDU typically decodes 12 an instruction that is several steps after the instruction that the EXU is currently executing.
ところで、条件分岐命令が実行すべき一連の命令の中に
1−ばしば用いられる。条件分岐命令は、当該命令で指
定される分岐条件がEXUで実行された命令の結果や状
態によって制御されるプログラムステータスフラグをも
とに成立するか否かによって処理すべき命令の流れを制
御するものである。かかる条件分岐命令がIDUに転送
されると、IDUは当該命令をデコードするわけである
が、EXUが現在実行中の命令および/又は当該実行中
の命令と条件分岐命令との間にある本実行のデコード済
命令がプログラムステ・−タスフラグの内容を変更する
命令である場合には、EXUがそのような命令を実行す
るまで分岐するか否かを確定することはできない。Incidentally, a conditional branch instruction is often used in a series of instructions to be executed. A conditional branch instruction controls the flow of instructions to be processed depending on whether the branch condition specified by the instruction is satisfied based on the program status flag, which is controlled by the result and state of the instruction executed by the EXU. It is something. When such a conditional branch instruction is transferred to the IDU, the IDU decodes the instruction, but the EXU decodes the instruction currently being executed and/or the actual execution between the currently executing instruction and the conditional branch instruction. If the decoded instruction in is an instruction that changes the contents of the program status flag, it cannot be determined whether or not to branch until the EXU executes such an instruction.
そこで、I D Uが条件分岐命令をデコードすると、
同命令によって指定される分岐条件が確定するまて、以
後の命令のデコードを停止することが一般的に行なわれ
ている。しか1.なから、これは、パイプライン処理の
流れを停止することを意味しており、マイクロプロセッ
サのスピード・ネックにつながる。このように、条件分
岐命令はマイクロプロセッサのバ・fブライン処理を乱
す大きな原因として挙げられる。Therefore, when the IDU decodes the conditional branch instruction,
It is common practice to stop decoding subsequent instructions until the branch condition specified by the instruction is determined. Only 1. Therefore, this means stopping the flow of pipeline processing, leading to a speed bottleneck in the microprocessor. As described above, conditional branch instructions can be cited as a major cause of disrupting the microprocessor's b/f line processing.
それ故、本発明の目的は、条件分岐命令によって生じる
パイプライン処理の乱れをより少なくしたマイクロプロ
セッサを提供することにある。SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a microprocessor in which disturbances in pipeline processing caused by conditional branch instructions are reduced.
本発明の目的は、条件分岐命令をデコードしても可能な
限りパイプライン処理の乱れを防止1〜得る命令テコニ
ドユニットを含むマイクロプロセッサを提供することに
ある。SUMMARY OF THE INVENTION It is an object of the present invention to provide a microprocessor including an instruction teconic unit that prevents disturbances in pipeline processing as much as possible even when a conditional branch instruction is decoded.
本発明によるマイクロプロセッサは、命令を解1洸する
デコーダと、このデコーダからのデコード情報を一時格
納するキューレジスタと、このレジスタに格納されたデ
コード情報が実行準備完了状態となると当該レジスタか
らデコード情報を読み出しする手段と、読み出されたデ
コード情報を受取り実行する実行部と、前記デコーダが
条件分岐命令をデコード1−たことを示す情報に応答し
て、当該条件分岐命令が指定する分岐条件が確定するま
での期間に前記デコーダによって解読された命令の実行
準備完了状態をマスクする手段と、前記分岐条件が確立
した後、当該分岐条件の成立/不成立に応答1−で前記
実行準備完了状態のマスクを解除するか又は前記実行準
備完了状態を実行不可状態に変更する手段とを備え、前
記実行準備完了状態が実行不可状態に変更された場合、
当該変更された命令のデコード情報が格納されたキュー
レジスタに他の命令のデコード情報を格納することを特
徴としている。The microprocessor according to the present invention includes a decoder that parses an instruction, a queue register that temporarily stores decode information from this decoder, and when the decode information stored in this register becomes ready for execution, decode information is sent from the register. an execution unit that receives and executes the read decoding information; and a means for reading out the decoded information, and in response to information indicating that the decoder has decoded the conditional branch instruction, the branch condition specified by the conditional branch instruction is determined. means for masking the ready-for-execution state of the instruction decoded by the decoder during a period until the branch condition is established; means for canceling the mask or changing the execution ready state to an execution disabled state, when the execution ready state is changed to an execution disabled state,
It is characterized in that the decode information of other instructions is stored in the queue register in which the decode information of the changed instruction is stored.
以下、本発明を図面により詳述する。 Hereinafter, the present invention will be explained in detail with reference to the drawings.
第1図は本発明の一実施例を示すバイブラインマイクロ
プロセッサのブロック図である。バスインターフェース
ユニット(BIU)20はシステムバス21を介して図
示1〜ないメモリや周辺■10テバ・イスの間でデータ
のリード/ライトを実行する。ブリフェッチ/ブリデコ
ードユニソh(PDU)301−1:バス21を介して
BIU20と通信し、命令の先取りを実行する。PDU
30は先取りされた命令ストリームを一担保持し、その
命令ストリームを、命令テコードユニッ)(IDU)4
0でデコードし易いようにブリデコードし、すなわち、
オペコード、アドレシングモード情報。FIG. 1 is a block diagram of a Vibrine microprocessor showing one embodiment of the present invention. A bus interface unit (BIU) 20 reads/writes data between memories (not shown) and peripheral devices (10) via a system bus 21. Briefetch/Briedecode Unison h (PDU) 301-1: communicates with the BIU 20 via the bus 21 and executes prefetching of instructions. PDU
30 holds the pre-fetched instruction stream and transfers the instruction stream to an instruction code unit (IDU) 4.
Buri-decoded so that it is easy to decode with 0, that is,
Opcode, addressing mode information.
データ等に分割し、バス31を介してIDU40に転送
する。IDU303は転送された壷金コート′をデコー
ドし、メモリ管理ユニット (MMU)50にはオペラ
ンドの実効アト1/ス計算に必要なアドレス情報をバス
42を介して転送し、一方、命令実行ユニッ) (EX
U)60には命令処理のための情報(オペランドデータ
の位置や算術論理演算処理の種類等)をバス41を介し
て転送する。The data is divided into data, etc., and transferred to the IDU 40 via the bus 31. The IDU 303 decodes the transferred code and transfers address information necessary for calculating the effective address of the operand to the memory management unit (MMU) 50 via the bus 42, while the instruction execution unit (MMU) 50 decodes the transferred address information. (EX
U) Information for instruction processing (position of operand data, type of arithmetic and logic operation processing, etc.) is transferred to the bus 41.
MMU50はIDU40からのアドレス情報をもとにオ
ペランドデータの実効アドレスを計算し、実アドレスに
変換してBIU20に対しバス51を介してオペランド
アクセス要求を発行する。分枝先アドレス情報はバス5
2を介してPDU30に転送される。MMU50はアド
レス変換が終了したことをTLENDI信号によってI
DU40に通知する。EXU60はIDU40からのデ
コード情報をもとにBIU20とバス61を介シて通信
しオペランドがそろった時点で命令の実行を開始する。The MMU 50 calculates the effective address of the operand data based on the address information from the IDU 40, converts it into a real address, and issues an operand access request to the BIU 20 via the bus 51. Branch destination address information is bus 5
2 to the PDU 30. The MMU 50 uses the TLENDI signal to indicate that the address translation has been completed.
Notify DU40. The EXU 60 communicates with the BIU 20 via the bus 61 based on the decode information from the IDU 40, and starts executing instructions when the operands are ready.
IDU40は命令デコード情報を・一時ストアする複数
のキューレジスタ(第2図)を有シ、すべてのレジスタ
に未実行のデコード命令が格納されると、IDQFUL
L信号をPDU30に供給し、PDU30からの命令転
送を一時禁止する。すべてのキューレジスタの空き状態
になると、IDQEMP信号を発行し、EXU60に対
し命令の引き取りを一時禁止させる。EXU60は、I
DU40からの命令フードを引き取ると■DQACK信
号を発生する。また、EXU506は、実行した命令の
結果や状態によって制御されるプログラムステータスフ
ラグ(図示せず)を有し、条件分岐命令によって指定さ
り、た分岐条件フラグを参照してその条件が成立したか
否かを示すTAKEN信号をIDU40に供給する。こ
のTAKEN信号をもとに、IDU40は条件分岐命令
で指定された分岐条件が成立した場合はVCAN信号を
、不成立のときUCAN信号を発生ずる。The IDU 40 has a plurality of queue registers (Fig. 2) that temporarily store instruction decode information, and when unexecuted decode instructions are stored in all registers, the IDQFUL
An L signal is supplied to the PDU 30 to temporarily prohibit command transfer from the PDU 30. When all queue registers become empty, an IDQEMP signal is issued to temporarily prohibit the EXU 60 from receiving instructions. EXU60 is I
When the command food from DU40 is received, ■DQACK signal is generated. The EXU 506 also has a program status flag (not shown) that is controlled by the result or state of an executed instruction, and is specified by a conditional branch instruction and refers to the branch condition flag to determine whether the condition has been met. A TAKEN signal indicating this is supplied to the IDU 40. Based on this TAKEN signal, the IDU 40 generates a VCAN signal when the branch condition specified by the conditional branch instruction is satisfied, and generates a UCAN signal when it is not satisfied.
これらの信号はPDU30.Mネtυ;1丑−BIU2
0に供給さh分岐条件成立/不成立を通知する。These signals are PDU30. Mnet tυ;1丑-BIU2
0 to notify whether the branch condition is met or not.
これらBIU20.PDU30.IDU40.MMrJ
5QおよびEXtJ60はバイブラインで動作1、てお
り、互いに並行に割り合てられた処理を実行している。These BIU20. PDU30. IDU40. MMrJ
5Q and EXtJ60 are operating on the vibe line and are executing assigned processes in parallel to each other.
第2図を参照すると、本発明によるIDU40がより詳
細に示されている。バス31を介するPDU30からの
命令は、シーケンサ401によって制御されるデコード
シーケンスに従ってデコーダ400で解読される。解読
された情報のうち、オペランドアドレス情報はバス42
を介してMMU50に供給され、命令処理情報はバス4
13を介して3つのキュー17ジスタ(IDQO,ID
Ql、1DQ2)402−404に共通に供給される。Referring to FIG. 2, IDU 40 according to the present invention is shown in more detail. Instructions from PDU 30 via bus 31 are decoded by decoder 400 according to a decoding sequence controlled by sequencer 401. Among the decoded information, operand address information is transferred to bus 42.
The instruction processing information is supplied to the MMU 50 via the bus 4.
13 through three queues 17 registers (IDQO, ID
Ql, 1DQ2) 402-404.
各IDQ40 :2−404はそのライトイネーブル端
子WEへの対応するストローブ信号QSLSTBO−2
の供給によってバス413上の情報を一時スドアし、そ
のリードイネーブル端子REへの対応するストローブ信
号EXQSLO−2の供給によってEXU60へのバス
」二にストアしていた情報を読み出す。これらQST、
5TEO−2,EXQS L O−2はキューレジスタ
リード/ライト制御回路405から出力される。同回路
405は、シーケンサ401から一つの命令のデコード
が終了する毎に発生されるIDQSTB信号に応答1〜
てQSLSTBO−2を順々に発生し、デコーダ413
からのデコード情報をIDQ (0−2)402−40
4に順4にスI・アさせる。そして、キューレディー制
御回路407からの各キューレディ信号IDQRDYO
−2とEXU60からのIDQACK信号によってEX
Q、5LO−2を順々に発生1〜IDQ (0−2)
402−404から順々にストア情報をバス41上に転
送させる。Each IDQ40:2-404 has a corresponding strobe signal QSLSTBO-2 to its write enable terminal WE.
The information stored on the bus 413 is temporarily stored by supplying the bus 413, and the information stored on the bus 413 to the EXU 60 is read by supplying the corresponding strobe signal EXQSLO-2 to the read enable terminal RE. These QSTs,
5TEO-2 and EXQS LO-2 are output from the queue register read/write control circuit 405. The circuit 405 responds to the IDQSTB signal generated every time the decoding of one instruction from the sequencer 401 is completed.
QSLSTBO-2 is generated in sequence, and the decoder 413
IDQ (0-2)402-40
4 to 4 in order. Each queue ready signal IDQRDYO from the queue ready control circuit 407
-2 and the IDQACK signal from EXU60
Q, 5LO-2 occur in order 1~IDQ (0-2)
The store information is sequentially transferred onto the bus 41 from 402-404.
制御回路407は、IDQO−2にストアされたデコー
ド命令が必要とするオペランドのアドレス変換が終了し
た信号TLENDIに応答して、対応するIDQRDY
O−2信号を発生する。IDQRDYO−2はギューレ
ディークリア制御回路411からのクリア信号VQCL
RO−2によってそれぞれクリアされる。本IDU40
は、デコーダ400が条件分岐命令をデコードしたこと
によってデコーダ400から発生される信号CBRAに
応答して、同命令のデコード情報をストアするギ、−レ
ジスタ(IDQ)の位置を格納する分岐キューレジスタ
ポインタ406と、デコーダ400からデコー ドした
命令がEXU60内のプログラムステータスフラグの内
容を変更し得る命令であることを示すFLAGM信号を
受けて、条件分岐命令によって指定される分岐条件が確
定1〜ない期間をF HZ R信号によって通知する分
岐未確定期間検出回路409と、F HZ R信号がイ
ンアクティブとなったときに、EXU60からのTAK
EN信号をもとに確定した分岐成立信号vCAN、分岐
不成立信号UCANを出力する分岐確定信号出力回路4
08とをさらに有している。CBRAR号によって条件
分岐命令がデコードされない限り出力回路408からの
信号VCAN、UCANは両方ともインアクティブレベ
ルとなる。The control circuit 407 responds to the signal TLENDI indicating that the address translation of the operand required by the decode instruction stored in IDQO-2 is completed, and converts the corresponding IDQRDY.
Generates O-2 signal. IDQRDYO-2 is the clear signal VQCL from the gyu-ready clear control circuit 411.
Each is cleared by RO-2. This IDU40
is a branch queue register pointer that stores the location of a register (IDQ) that stores decode information of a conditional branch instruction in response to a signal CBRA generated by the decoder 400 when the decoder 400 decodes the instruction. 406 and the FLAGM signal indicating that the instruction decoded from the decoder 400 is an instruction that can change the contents of the program status flag in the EXU 60, the branch condition specified by the conditional branch instruction is determined. The branch undetermined period detection circuit 409 notifies the TAK from the EXU 60 when the F HZ R signal becomes inactive.
A branch confirmation signal output circuit 4 that outputs a branch establishment signal vCAN and a branch failure signal UCAN determined based on the EN signal.
08. Unless a conditional branch instruction is decoded by the CBRAR signal, the signals VCAN and UCAN from the output circuit 408 are both at an inactive level.
本IDU40は、デコーダ400が条件分岐命令をデコ
ードした後もそれに続く命令(あるいは分岐先の命令)
のデコードを続行しているので、キューレディマスク制
御回路410がさらに設けられている。同回路410は
、マスク信号INVO−2によって、条件分岐命令後に
デコードされる命令に対するキューレディ信号IDQR
DY、0−2をマスクし、回路408からのBRENR
号によってそのマスク信号INVO−2を解除する。Even after the decoder 400 has decoded the conditional branch instruction, the IDU 40 continues to use the instruction that follows the conditional branch instruction (or the instruction at the branch destination).
Since decoding continues, a queue ready mask control circuit 410 is further provided. The circuit 410 uses a mask signal INVO-2 to generate a queue ready signal IDQR for an instruction to be decoded after a conditional branch instruction.
Mask DY, 0-2 and BRENR from circuit 408
The mask signal INVO-2 is canceled by the signal.
もし、条件分岐命令後にデコードされた命令が分岐条件
成立又は不成立によって実行すべき命令でないときは、
クリア回路411が対応するIDQRDY信号をクリア
し、同命令がEXU60に転送されることを禁止する。If the instruction decoded after the conditional branch instruction is not an instruction to be executed depending on whether the branch condition is met or not, then
The clear circuit 411 clears the corresponding IDQRDY signal and prohibits the same instruction from being transferred to the EXU 60.
上述した回路405−411の動作は第3図A、Hに示
した詳細な回路構成によって実現される。第3図Aは回
路405,406,408゜409の構成を、第3図B
は回路キュー17デイに関する回路407,410,4
11を示している。The operations of the circuits 405-411 described above are realized by the detailed circuit configurations shown in FIGS. 3A and 3H. Figure 3A shows the configuration of the circuits 405, 406, 408°409, and Figure 3B
is the circuit 407, 410, 4 related to the circuit queue 17 days.
11 is shown.
以下、動作について第1図乃至第3図および第4図、第
5図のタイミングチャートを用いて説明する。なお、本
実施例では、条件分岐命令がデコードされた場合、同命
令の次のアドレスに続く命令を先行デコードしている。The operation will be explained below using the timing charts of FIGS. 1 to 3 and FIGS. 4 and 5. In this embodiment, when a conditional branch instruction is decoded, the instruction following the next address of the conditional branch instruction is pre-decoded.
第4図は条件分岐命令で指定された分岐条件が成立しな
かった場合、すなわち先行デコードされた命令が有効で
なる場合であり、第5図は分岐条件が成立して次に実行
すべき命令が分岐先アドレスの命令である場合、すなわ
ち、先行デコードされた命令が無効となる場合である。Figure 4 shows the case where the branch condition specified by the conditional branch instruction is not satisfied, that is, the previously decoded instruction becomes valid, and Figure 5 shows the case where the branch condition is satisfied and the next instruction to be executed. is the instruction at the branch destination address, that is, the previously decoded instruction becomes invalid.
まず第4図において、条件分岐命令■の前の命令0の解
読をデコーダ400が開始するとともに、D型フリップ
フロップ(D−F/F) 307 。First, in FIG. 4, the decoder 400 starts decoding the instruction 0 before the conditional branch instruction (2), and the D-type flip-flop (D-F/F) 307 is decoded.
317.360が“l”をストアしているとする。Assume that 317.360 stores "l".
またこの時、EXU60はIDQ(2)404にストア
されていた命令■を実行中であり、IDQ(0)402
には命令■と命令0の間にある命令■をストアしている
。デコーダ400にJ:る命令Oのデコード終了によっ
てシーケンサはIDQSTEを発生し、その結果、AN
Dゲート312からQSLSTBI信号が発生される。Also, at this time, the EXU 60 is executing the instruction ■ stored in IDQ (2) 404, and
stores the instruction ■ between instruction ■ and instruction 0. Upon completion of the decoding of instruction O in the decoder 400, the sequencer generates IDQSTE, and as a result, AN
A QSLSTBI signal is generated from D-gate 312.
命令@のデコード情報はかくしてI DQ(1)403
にストアさ九る。The decoding information of the instruction @ is thus IDQ(1) 403
Store in the store.
SR型ラフリップフロップSR−F/F)303がセッ
トされる。遅延回路314により遅延されたIDQST
B信号によってD−F/F 316−318はそのD入
力のデータを取り込む。マルチプレクサ(MPX)31
9−321は図示していないがVCAN信号によって制
御さh、同信号がインアクティブレベル(ロウレベル)
のときはF/F316−318のQ出力をそれぞれ選択
する。An SR type rough flip-flop (SR-F/F) 303 is set. IDQST delayed by delay circuit 314
The B signal causes D-F/Fs 316-318 to take in data on their D inputs. Multiplexer (MPX) 31
Although not shown, 9-321 is controlled by the VCAN signal, and the signal is inactive level (low level).
In this case, each of the Q outputs of F/Fs 316-318 is selected.
したがって、F/F 317のQ出力“1″はF/F3
18に転送され、F/F 317はF/F316からの
Onを取り込む。命令0は算術論理演算命令であってE
XTJ60内のプログラムステータスフラグの内容を変
更する命令であるので、デコーダ400はFLA、GM
倍信号発生し、5R−F/F 506がセットされる。Therefore, the Q output “1” of F/F 317 is F/F 3
18, and the F/F 317 takes in the On signal from the F/F 316. Instruction 0 is an arithmetic and logic operation instruction, and E
Since this is an instruction to change the contents of the program status flag in the XTJ60, the decoder 400
A double signal is generated and 5R-F/F 506 is set.
命令[相]のためのオペランドのアドレス計算および返
換が終了するとMMIJ50はTLENDI信号を発生
し、その結果、5R−F/F354がセットされる。5
R−F/F366−368はリセット状態にあるので、
それらの司出力である■Nvo−2はハイレベルであり
、その結果、命令0が実行可能状態であるこ七を示すI
DQRDYI信号がアクティブハイレベルとなる。この
レベルによってANDゲート507がυnきFHzD信
号がハイレベルとなる。When the operand address calculation and return for the instruction [phase] is complete, the MMIJ 50 generates the TLENDI signal, which causes the 5R-F/F 354 to be set. 5
Since R-F/F366-368 is in the reset state,
Their outputs Nvo-2 are at a high level, and as a result, I indicates that instruction 0 is executable.
The DQRDYI signal becomes active high level. This level causes the AND gate 507 to turn υn and the FHzD signal to go high.
なお、命令■又は■もプログラムステータスフラグの内
容を変更し得る命令である場合には対応するF/F50
2,510がセット状態となっており、FHzD信号は
すでにハイレベルとなっている。遅延回路362によっ
て遅延されたTLENDI信号によってD−F/F35
9−361は入力データDを取り込む。MPX363−
364もVCAN信号によって制御されるので、F/F
360のQ出力“1″はF/F 361に取り込まれ、
F/F 360はF/F 359からのQ出力“0゛を
取り込む、F/F354によってIDQRDY1信号は
アクティブハイレベルのままである。Note that if the instruction ■ or ■ is also an instruction that can change the contents of the program status flag, the corresponding F/F50
2,510 is in the set state, and the FHzD signal is already at a high level. DF/F 35 by the TLENDI signal delayed by the delay circuit 362.
9-361 takes in input data D. MPX363-
364 is also controlled by the VCAN signal, so the F/F
Q output “1” of 360 is taken into F/F 361,
The F/F 360 takes in the Q output "0" from the F/F 359, and the IDQRDY1 signal remains at active high level due to the F/F 354.
デコーダ400は条件分岐命令■のデコードを開始する
。そのデコードの最中にEXtJ60は命令■の実行を
終了し、命令実行終了信号EXQENDを発生して5R
−F/F518をリセットする。すなわち、5R−F/
F502,506゜510はそれぞれ対応するIDQO
−2にストアされた命令がプログラムステータスフラグ
の内容を変更し得るかどうかの情報をストアし、5R−
F/F 518はEXU60によって実行中の命令がプ
ログラムステータスフラグの内容を変更し得るかどうか
の情報をストアしている。EXU60は命令実行を終了
するとバス41上の命令を取り込む。本説明では、EX
QSLO信号がアクティブハイレベルであるので、
I DQ(0)402にスI・アされていた命令■がE
XU60に取り込まれる。The decoder 400 starts decoding the conditional branch instruction (2). During the decoding, EXtJ60 completes the execution of the instruction ■, generates the instruction execution end signal EXQEND, and
-Reset F/F518. That is, 5R-F/
F502, 506°510 are the corresponding IDQOs
-2 stores information on whether the instruction stored in 5R-2 can change the contents of the program status flag;
F/F 518 stores information whether an instruction being executed by EXU 60 may change the contents of the program status flag. When the EXU 60 finishes executing the instruction, it takes in the instruction on the bus 41. In this explanation, EX
Since the QSLO signal is active high level,
I
Imported into XU60.
EXU60は命令を取り込むとIDQACK信号を発生
する。この信号によって、命令■がプログラムステータ
スフラグの内容を変更し得るかどうかの情報(F/F
502のストアデータ)が)/′F518に取り込まれ
る。IDQACK信号によってF/F 307のQ出力
゛1′′はF/F 308に取り込まれるので、F/F
307のQ出力は′“0″となり、IDQRDYO信
号はハイレベルからロウレベルに反転する。この反転に
応答してワンショットパルス発生器08504はワンシ
ョットパルスEXQEOを発生しF/F502をリセッ
トとする。また、EXQEOによってキューレデイクリ
ア制御回路411のORゲート373はVQCLROを
発生し、F’/F301゜353をリセットとする。I
DQRDYO信号はかくしてインアクティブレベルとな
る。F/F308はパ1″を取り込み、IDQRDY1
信号はすでにアクティブハイレベルであるので、EXQ
SLI信号がアクティブハイレベルとなる。かくして、
IDQI (403)にストアされていた命令■がバ
ス41上に読み出される。EXU60は命令■を実行中
である。When the EXU 60 receives an instruction, it generates an IDQACK signal. This signal provides information (F/F
502 store data) is taken into )/'F 518. The Q output ``1'' of F/F 307 is taken into F/F 308 by the IDQACK signal, so the F/F
The Q output of 307 becomes ``0'', and the IDQRDYO signal is inverted from high level to low level. In response to this inversion, one-shot pulse generator 08504 generates one-shot pulse EXQEO to reset F/F 502. Further, due to EXQEO, the OR gate 373 of the cue ready clear control circuit 411 generates VQCLRO, and resets F'/F 301°353. I
The DQRDYO signal is thus at an inactive level. F/F308 takes in Pa1'' and IDQRDY1
Since the signal is already at active high level, EXQ
The SLI signal becomes active high level. Thus,
The instruction ■ stored in IDQI (403) is read onto the bus 41. The EXU 60 is currently executing instruction (2).
デコーダ400による条件分岐命令0のデコード終了を
示すIDQSTB信号によってQSLSTE2信号が発
生され、命令■のデコード情報はIDQ2 (404)
に取り込まれる。F/F 303がセットされ、データ
“1″はF/F318からF/F316に移る。条件分
岐命令0の分岐条件はバス412を介してEXU60に
先行して渡たされる。デコーダ400はまたCBRA信
号をアクティブにする。FLAGM信号はロウレベルで
あり、F’/F 510はリセットされたままである。The QSLSTE2 signal is generated by the IDQSTB signal indicating the completion of decoding of the conditional branch instruction 0 by the decoder 400, and the decoding information of the instruction ■ is sent to IDQ2 (404).
be taken in. F/F 303 is set, and data "1" is transferred from F/F 318 to F/F 316. The branch condition of conditional branch instruction 0 is passed to EXU 60 via bus 412 in advance. Decoder 400 also activates the CBRA signal. The FLAGM signal is low and F'/F 510 remains reset.
CBRA信号とQSLSTB2信号とによってANDゲ
ート341はラッチ回路を活性化する。すなわち、条件
分岐命令■がストアされたキューレジスタの位置(ID
Q2=“001”)がラッチ回路322に取り込まれる
。ANDゲート341はさらに5R−F/F343をセ
ットする。F/F343の出力CBRAQLは遅延回路
372によって遅延されてANDゲー)369−371
に供給されるため、5R−F/F368はセット状態と
ならない。INV2はハイレベルのままである。CBR
AQL信号によってANDケート327は開くが、少な
くともF/F 506がセット状態でありIDQRDY
I信号はアクティブハイレベルであるので、ORゲート
519の出力FHzRはハイレベルでありANDゲート
327は出力はロウレベルを保持している。分岐先アド
レスの実効アドレス計算、変換の終了を示す信号TLE
NDIによって5R−F/F355はセットされ、ID
QRDY2信号はアクティブハイレベルとなる。テーダ
′1°′はF/F 361からF/F 359に移る。The AND gate 341 activates the latch circuit by the CBRA signal and the QSLSTB2 signal. In other words, the position (ID
Q2="001") is taken into the latch circuit 322. AND gate 341 further sets 5R-F/F 343. The output CBRAQL of the F/F 343 is delayed by the delay circuit 372 and becomes an AND game) 369-371
5R-F/F368 is not set. INV2 remains at high level. CBR
The AND gate 327 is opened by the AQL signal, but at least F/F 506 is in the set state and IDQRDY
Since the I signal is at an active high level, the output FHzR of the OR gate 519 is at a high level, and the output of the AND gate 327 is held at a low level. Signal TLE indicating the end of effective address calculation and conversion of branch destination address
5R-F/F355 is set by NDI and ID
The QRDY2 signal becomes active high level. Teda '1°' moves from F/F 361 to F/F 359.
IDU40は条件分岐命令■の次のアドレスにある命令
0を先行デコード゛するので・、デコーダ400は命令
0のデコードを開始する。このデコード最中に、EXU
60は命令■の実行の終了し、F/F 518をリセッ
トする。EXU60はさらにデコーダ400から先行し
て渡された条件分岐命令0が指定する分岐条件が自己の
プログラムステータスフラグの内容と一致するかどうか
を命令の実行終了の毎に判定し、その結果をT A K
EN信号として出力する。しかしながら、この時、FH
2R信号はハイl/ベルであって分岐未確定期間を示し
ているので、ANDゲート324,325は閉じたまま
であり、分岐確定信号出力回路408は有効なVCAN
、UCAN信号を発生しない。Since the IDU 40 pre-decodes the instruction 0 at the address following the conditional branch instruction (2), the decoder 400 starts decoding the instruction 0. During this decoding, EXU
60 completes the execution of the instruction (2) and resets the F/F 518. The EXU 60 further determines whether the branch condition specified by the conditional branch instruction 0 previously passed from the decoder 400 matches the contents of its own program status flag each time the execution of the instruction ends, and sends the result to T A K
Output as EN signal. However, at this time, FH
Since the 2R signal is high l/bell and indicates a branch undetermined period, AND gates 324 and 325 remain closed, and the branch determined signal output circuit 408 outputs a valid VCAN signal.
, does not generate a UCAN signal.
EXQSLI信号がハイレベルであるので、EXU60
は命令0を取り込み、そしてIDQACK信号を出力す
る。この信号によってF/F 506のストア情報の“
1″ (すなわち、命令[F]はプログラムステータス
フラグの内容を変更し得る命令であることを示す)はF
/F 518に取り込まれ、FH2R信号はハイレベル
を保持する。さらに■DQACK信号によって、EXQ
SLIはハイレベルからロウレベルに反転し、F/F5
Q6゜354.302がリセットされる。F/F 30
9は“1″を取り込む。Since the EXQSLI signal is high level, EXU60
takes in instruction 0 and outputs an IDQACK signal. This signal causes the store information of F/F 506 to be
1'' (in other words, indicates that the instruction [F] is an instruction that can change the contents of the program status flag) is F
/F 518, and the FH2R signal maintains a high level. In addition, by the DQACK signal, EXQ
SLI is inverted from high level to low level, and F/F5
Q6°354.302 is reset. F/F 30
9 takes in "1".
命令■のデコード終了によってQSLSTBO信号が発
生し、命令0のデコード情報はIDQ(0)402にス
トアされる。この命令0がプログラムステータスフラグ
の内容を変更し得るものであればFLAGM信号も発生
され、F/F 502がセットされる。このとぎ、まだ
IDQRDYO信号は発生していないのでANDゲート
503は閉じたままである。F/F 302はセットさ
れ、データ“′1″はF/F 316からF/F 31
7に移る。QSLSTBO信号と遅延されたCBRAQ
、 L信号とによってANDゲート369が開きF/F
366をセット状態とする。すなわち、命令0は条件分
岐命令0のデコード後に先行してデコードされた命令と
1−でキューレディマスク信号IVOがアクティブロウ
レベルをとる。したがって、命令0のオペランドアドレ
ス計算、変換が終了してF/F 353がセットされて
も、IDQRDYO信号)11Vo信号およびANDゲ
ート350によってマスクされロウレベルを保持したま
まとなる。IDQRDYO信号がマスクされるのでF/
F502の内容もANDゲート503によってマスクさ
れる。デコーダは命令0の先行デコードを続行し、命令
0のデコード情報はI DQ(1)403にストアされ
る。命令0の場合と同様に、命令0のためのIDQRD
Y1信号はマスクされ、F/F506の情報もマスクさ
れる。IDQ (0−2)402−404にはそれぞれ
未実行の命令■、0.0がストアされキューレジスタに
空きがなくなったため、ANDゲート300はアクティ
ブハイレベルのIDQFULL信号を発生する。The QSLSTBO signal is generated upon completion of the decoding of the instruction (2), and the decode information of the instruction 0 is stored in the IDQ(0) 402. If this instruction 0 is capable of changing the contents of the program status flag, a FLAGM signal is also generated and F/F 502 is set. At this point, since the IDQRDYO signal has not yet been generated, the AND gate 503 remains closed. F/F 302 is set and data “'1” is from F/F 316 to F/F 31
Move on to 7. QSLSTBO signal and delayed CBRAQ
, L signal opens the AND gate 369 and F/F
366 is set. That is, for instruction 0, the queue ready mask signal IVO takes an active low level at 1- with the instruction decoded in advance after the decoding of conditional branch instruction 0. Therefore, even when the operand address calculation and conversion of instruction 0 is completed and the F/F 353 is set, it is masked by the IDQRDYO signal)11Vo signal and the AND gate 350 and remains at a low level. Since the IDQRDYO signal is masked, F/
The contents of F502 are also masked by AND gate 503. The decoder continues to predecode instruction 0, and the decode information for instruction 0 is stored in IDQ(1) 403. As for instruction 0, IDQRD for instruction 0
The Y1 signal is masked, and the information of the F/F 506 is also masked. Since unexecuted instructions (1) and 0.0 are stored in IDQ (0-2) 402-404, respectively, and there is no space left in the queue register, the AND gate 300 generates an IDQFULL signal at an active high level.
これによって、シーケンサ401はその後のデコード処
理を一時中断させ、PDU30に対し命令の転送を一時
中断させる。As a result, the sequencer 401 temporarily suspends the subsequent decoding process and temporarily suspends the transfer of instructions to the PDU 30.
EXU60が命令0の実行を終了すると、F/F518
がリセットされ、その結果、FHzR信号はロウレベル
に反転する。すなわち、回路409は分岐未確定期間が
終了したことをF HZ R信号のロウレベルによって
出力回路408に通知する。When EXU60 finishes executing instruction 0, F/F518
is reset, and as a result, the FHzR signal is inverted to low level. That is, the circuit 409 notifies the output circuit 408 that the branch undetermined period has ended by the low level of the F HZ R signal.
この結果、ANDゲー)324,325が開く。As a result, AND games) 324 and 325 are opened.
また、EXU60はバス412を介して先行1.て渡さ
れた条件分岐命令■の分岐条件が命令[F]の実行結果
によって制御されたプログラムステータスフラグの内容
と一致するかどうか、すなわち分岐条件が成立したかど
うかのTAKEN信号を発生している。本説明では分岐
未成室であるので、TAKEN信号はロウレベルとなっ
ている。したがって、出力回路408はVCAN信号を
ロウレベルのままとしUCAN信号をハイレベルとして
、分岐条件不成立であることを出力する。VCAN、U
CAN信号のORゲート323を通した出力BRENに
よってF/F 343はリセットされ、その結果、出力
回路408はVCAN、UCANの両信号を無効なもの
とする。BREN信号によってF/F366−368も
リセットされ、各マスク信号INVO−2はハイレベル
となる。したがって、IDQRDYo、1信号のマスク
は解除されそれぞれアクティブハイレベルとなる6F/
F502,506の出力のマスクも解除され、命令0,
0の少なくとも一方がプログラムステータスフラグの内
容を変更し得る場合はF HZ R信号がハイレベルと
なる。かくして、命令0,0は実行すべき有効な命令と
なる。命令0の実行終了時点ではEXQSL2が出力さ
れているので、EXU60は命令■を引き取り、IDQ
ACK信号を発生する。EXQSI、2はハイからロウ
に反転I2、F/F 355がリセットされIDQRD
Y 2信号をロウレベルどなる。また、F/F 303
がリセットされ、IDQFULL信号がロウレベルとな
るので、IDU40は命令0のデコード処理を開始する
。さらにまた、データ“1”がF/F309からF/F
307に移るため、EXQSLOがハイレベルとなり
、命令0がバス412に出力される。EXU60は条件
分岐命令■を引き取るが、同命令はすでに実行されてい
るので、EXU60は同命令■を所謂NOP (ノーオ
ペレーション)命令として処理する。EXU60はその
後、命令0を引き取り実行を開始する。The EXU 60 also connects the preceding 1. Generates a TAKEN signal indicating whether the branch condition of the conditional branch instruction . In this description, since the branch is not yet completed, the TAKEN signal is at a low level. Therefore, the output circuit 408 keeps the VCAN signal at a low level, sets the UCAN signal at a high level, and outputs that the branch condition is not satisfied. VCAN, U
The F/F 343 is reset by the output BREN of the CAN signal through the OR gate 323, and as a result, the output circuit 408 invalidates both the VCAN and UCAN signals. The F/Fs 366-368 are also reset by the BREN signal, and each mask signal INVO-2 becomes high level. Therefore, the masking of the IDQRDYo and 1 signals is canceled and the 6F/1 signal becomes active high level.
The masking of the outputs of F502 and 506 is also canceled, and instructions 0,
0 can change the contents of the program status flag, the F HZ R signal goes high. Thus, instruction 0,0 becomes a valid instruction to be executed. Since EXQSL2 is output at the end of execution of instruction 0, EXU60 receives instruction ■ and outputs IDQ
Generates an ACK signal. EXQSI, 2 is inverted from high to low I2, F/F 355 is reset and IDQRD
The Y2 signal goes low. Also, F/F 303
is reset and the IDQFULL signal becomes low level, so the IDU 40 starts decoding the instruction 0. Furthermore, the data “1” is from F/F309 to F/F
To move to 307, EXQSLO becomes high level and instruction 0 is output to bus 412. The EXU 60 receives the conditional branch instruction (2), but since the instruction has already been executed, the EXU 60 processes the instruction (2) as a so-called NOP (no operation) instruction. The EXU 60 then receives instruction 0 and starts executing it.
以上の説明から明らかなように、条件分岐命令■がデコ
ードされても、PDU30.IDU40.MMU50は
その後の処理を続行しており、しかも分岐不成立のとき
は先行処理は無効とならずパイプライン処理の流れは実
質停止しない。As is clear from the above explanation, even if the conditional branch instruction ■ is decoded, PDU30. IDU40. The MMU 50 continues the subsequent processing, and when the branch is not taken, the preceding processing is not invalidated and the flow of the pipeline processing does not substantially stop.
一方、条件分岐命令■の分岐条件が成立l−た場合は、
第5図のようにVCAN信号がアクティブハイレベルと
なるため、クリア制御回路411内のANDケ’−)3
74,376がクリア信号VQCLR70,1を発生1
〜、F/F354,355をリセットする。したがって
、INVo、1がハイ1/ベルとなってマスクが解除さ
れても、IDQRl)YO,lはロウレベルとなり、デ
コードされた命令0,0は実行されない無効なものとな
る。F/F301,302もリセットされIDQFUL
L信号はロウレベルとなる。VCAN信号によって、B
IU20.PDU20は分岐先の命令をフェッチするよ
うに指示される。さらに、VCAN信号はORゲー)3
15,560を介してF/F316−318,359−
360にクロックを与え、MPX319−321,36
4−365にラッチ回路322から分岐キューレジスタ
のポインタ情報“001”を選択するJ:うに指示する
。On the other hand, if the branch condition of conditional branch instruction ■ is satisfied,
As the VCAN signal becomes active high level as shown in FIG.
74,376 generates clear signal VQCLR70,11
~, reset F/Fs 354 and 355. Therefore, even if INVo,1 becomes high 1/bell and the mask is released, IDQRl)YO,l becomes low level, and the decoded instructions 0,0 are not executed and become invalid. F/F301 and 302 are also reset and IDQFUL
The L signal becomes low level. By the VCAN signal, B
IU20. PDU 20 is instructed to fetch the branch destination instruction. Furthermore, the VCAN signal is an OR game)3
F/F316-318,359- via 15,560
360, MPX319-321, 36
4-365 is instructed to select pointer information "001" of the branch queue register from the latch circuit 322.
その結果、データ“1”′がF/F316,359に取
り込まれ、F/F317,318,360゜361はデ
ータ“ONを取り込む。すなわち、分岐先アドレスの命
令のデコード情報をストアするキューレジスタとして、
条件分岐命令0をストアしたキューレジスタIDQ(2
)404の次のレジスタI DQ(0)402が指定さ
れる。I〜たがって、EXU60に転送すべき命令の流
れに何ら不都合は生じない。EXU60が命令■を引き
取ることによって発生されるIDQACK信号によって
、F/F355がリセットされIDQRDY2がロウレ
ベルとなる。このため、すべてのIDQRDYO−2が
ロウレベルとなり、NORゲート310はハイレベルの
IDQEMP信号を発生し、EXU60に実行可能なデ
コード済命令がキューレジスタIDQO−2に存在しな
いことを通知する。As a result, data "1"' is taken into F/Fs 316 and 359, and F/Fs 317, 318, and 360° 361 take in data "ON".In other words, it is used as a queue register to store decode information of the instruction at the branch destination address. ,
Queue register IDQ (2) that stores conditional branch instruction 0
) 404, the next register IDQ(0) 402 is specified. I~ Therefore, no inconvenience occurs in the flow of instructions to be transferred to the EXU 60. The F/F 355 is reset by the IDQACK signal generated when the EXU 60 receives the instruction (2), and the IDQRDY2 becomes low level. Therefore, all IDQRDYO-2 are at a low level, and the NOR gate 310 generates a high-level IDQEMP signal to notify the EXU 60 that no executable decoded instruction exists in the queue register IDQO-2.
これに応答して、EXTJ60はIDU40からの命令
引き取りを一時中断し、IDU40に実行可能なデコー
ド済命令が存在するまで、処理を中断する。したがって
、EXU60の誤動作が防止される。PDU30から分
岐先の命令0がIDU40に転送され、IDU40が同
命令のデコードを完了しかつオペランドアドレス計算、
変換が終了してIDQEMPがロウレベルとなると、E
XU60は処理を再開して命令0を引き取り実行する。In response, the EXTJ 60 temporarily suspends receiving instructions from the IDU 40 and suspends processing until an executable decoded instruction exists in the IDU 40. Therefore, malfunction of EXU 60 is prevented. The branch destination instruction 0 is transferred from the PDU 30 to the IDU 40, and the IDU 40 completes decoding of the instruction and calculates the operand address.
When the conversion is completed and IDQEMP becomes low level, E
The XU 60 resumes processing, picks up instruction 0, and executes it.
このように、分岐条件成立の場合、命令0,0のデコー
ド処理およびオペランドアドレス計算。In this way, if the branch condition is satisfied, the decoding process of instructions 0 and 0 and operand address calculation are performed.
変換処理は無効となるが、分岐条件が確定するまでID
U40.MMU50は有効に働いていることになりその
効果は大きい。ここで、分岐先アドレスの計算、変換は
すでに終了しているから、PDU30が命令@、 @、
@たけてなく分岐先の命令ω、■も予じめ先取りして
おくように構成することにより、VCAN信号の発生に
よってPPU3Oは命令0.oを直ちにIDU40に転
送することが可能となる。この場合、バイブライン処理
の流れは停止は最小限に抑えられる。第4図、第5図で
、命令[F]はプログラムステータスフラグの内容を変
更I7ない命令であり、命令■は同内容を変更する場合
は、命令■の実行終了時にTAKEN信号は確定し、有
効なVCAN、UCAN信号が出力される。The conversion process will be invalidated, but the ID will remain unchanged until the branch condition is finalized.
U40. This means that MMU50 is working effectively, and the effect is great. Here, since the calculation and conversion of the branch destination address has already been completed, the PDU30 executes the instructions @, @,
By configuring the structure so that instructions ω and ■ which are branch destinations are also prefetched in advance, the PPU 30 executes instructions 0, . o can be immediately transferred to the IDU 40. In this case, the flow of Vibrine processing is minimized with interruptions. In FIGS. 4 and 5, instruction [F] is an instruction that does not change the contents of the program status flag, and when instruction ■ changes the same contents, the TAKEN signal is determined at the end of execution of instruction ■, Valid VCAN and UCAN signals are output.
なお、第3図A、Bに示した具体的構成は第2図の各回
路405−411の機能実現のための−例であり、同一
機能のために適宜変更し得ることは熱論である。It should be noted that the specific configurations shown in FIGS. 3A and 3B are examples for realizing the functions of each circuit 405 to 411 in FIG. 2, and it is a matter of course that they can be modified as appropriate to achieve the same function.
第6図に本発明の他の実施例を示す。第1図と同一構成
部は同じ番号で示す。本実施例では、第1図のブリフェ
ッチ/プリデコードユニッ)PDU30の代わりにプリ
フェッチ/分岐予測ヒツトリデフ−1フ分岐予測ユニツ
U)600が設けられている。このユニット600は、
命令プリフェッチ制御およびプリデコード制御の他に、
分岐予測制御も実行する。分岐予測制御のため、BPP
DU600は、現在プリフェッチしている命令のアドレ
スを格納するレジスタ(CPFIAR)601.条件分
岐命令がストア、されているアドレス(分岐元アドレス
)を格納するレジスタ(BRAIAR)602.当該分
岐命令で指定される分岐先アドレスを格納する1/ジス
タ(BRDTAR)603.および比較器604を有す
る。FIG. 6 shows another embodiment of the invention. Components that are the same as those in FIG. 1 are indicated by the same numbers. In this embodiment, a prefetch/branch prediction hit def-1 branch prediction unit U) 600 is provided in place of the prefetch/predecode unit PDU 30 shown in FIG. This unit 600 is
In addition to instruction prefetch control and predecode control,
It also performs branch prediction control. BPP for branch prediction control
The DU 600 has a register (CPFIAR) 601. which stores the address of the currently prefetched instruction. A register (BRAIAR) 602 that stores an address (branch source address) where a conditional branch instruction is stored. 1/register (BRDTAR) 603 that stores the branch destination address specified by the branch instruction. and a comparator 604.
CPFIAR601の内容は通常はプリフェッチした命
令のバイト数だけプリフェッチ毎に更新される。BRA
IAR602には前回プリフェッチした条件分岐命令の
分岐元アドレスを格納できる。The contents of the CPFIAR 601 are normally updated every prefetch by the number of bytes of the prefetched instruction. B.R.A.
The IAR 602 can store the branch source address of the previously prefetched conditional branch instruction.
したがって、プログラム処理が進みBRAIAR602
の分岐元アドレスにある条件分岐命令が再度フェッチさ
れると、比較器604は分岐予測ヒツト信号HITBR
Aを発生する。そして、BPPDU600はBRDTA
R603の内容を用いて、条件分岐命令に引き続く命令
ではなく、分岐先アドレスの命令から以降プリフェッチ
する。Therefore, program processing progresses and BRAIAR602
When the conditional branch instruction at the branch source address is fetched again, the comparator 604 outputs the branch prediction hit signal HITBR.
Generate A. And BPPDU600 is BRDTA
Using the contents of R603, prefetching is performed from the instruction at the branch destination address instead of the instruction following the conditional branch instruction.
分岐予測ヒツト信号HITBRAはIDU40の分岐確
定信号出力回路に供給される。ただし、第6図で408
′として示しているように、この構成は第7図に示すよ
うに第3図Aのものとは若干異なっている。The branch prediction hit signal HITBRA is supplied to the branch confirmation signal output circuit of the IDU 40. However, in Figure 6, 408
7, this configuration differs slightly from that of FIG. 3A, as shown in FIG.
すなわち、HITBRA信号は5R−F/F701に記
憶される。F/F 701のQ出力はマルチプレクサ(
MPX)702を制御する。MPX702はF/F 7
01のQ出力が“l”のときは、ANDゲート324お
よび325の出力をそわ2ぞれUCANおよびVCAN
として出力し、一方、′0”のときはANDゲート32
4,325の出力をVCAN、UCANとして出力する
。That is, the HITBRA signal is stored in 5R-F/F 701. The Q output of F/F 701 is a multiplexer (
MPX) 702. MPX702 is F/F 7
When the Q output of 01 is "L", the outputs of AND gates 324 and 325 are
On the other hand, when it is '0', the AND gate 32
The output of 4,325 is output as VCAN and UCAN.
その動作はIDU40に条件分岐命令後に転送される命
令が変更されるだけでIDU40の基本動作は第4図、
第5図と同じである。すなわち、BPPDU600が条
件分岐命令■をプリフェッチした結果として分岐予測ヒ
ツトが生じると、F/F70.1はセットされ、BPP
DU600はそれ以降分岐先の命令0.oをプリフェッ
チする。The basic operation of the IDU 40 is as shown in Fig. 4, except that the instruction transferred to the IDU 40 after the conditional branch instruction is changed.
Same as Figure 5. That is, when a branch prediction hit occurs as a result of the BPPDU 600 prefetching the conditional branch instruction ■, F/F 70.1 is set and the BPP
DU600 then branches to the instruction 0. Prefetch o.
したがって、第4図、第5図で“デコード処理”と1.
て示した命令の流れは■→0→■→・・・となる。Therefore, in FIGS. 4 and 5, "decoding processing" and 1.
The flow of instructions shown in the figure is ■→0→■→...
命令0の実行終了時点で分岐条件が確定するが、この条
件が命令00条件を満足する場合、ANDゲー)324
,325の出力はそれぞれノ・イレベル、ロウレベルと
なる。F/F 701はセットされているので、AND
ゲート324の出力がUCANとなる。かくして、ID
Qo、1にストアされた命令0.oのデコード情報は有
効となり実行される。一方、条件不成立のとぎはV C
A、 N信号がアクティブハイレベルとなるので、ID
QO。The branch condition is determined at the end of execution of instruction 0, but if this condition satisfies the instruction 00 condition, the AND game) 324
, 325 are at the no/y level and low level, respectively. Since F/F 701 is set, AND
The output of gate 324 becomes UCAN. Thus, I.D.
Instructions 0.Qo, stored in 1. The decoding information of o is valid and executed. On the other hand, when the condition is not met, V C
Since the A and N signals become active high level, the ID
Q.O.
■のストア命令0.oは無効となり、命令O2゜のプリ
フェッチ、デコード処理に移行する。BPPDU 60
0が条件分岐命令をプリフェッチしても分岐予測がミス
ヒツトした場合は、第4図、第5図と同一の動作となる
。■Store instruction 0. o becomes invalid, and the process shifts to prefetch and decode processing of instruction O2°. BPPDU 60
If branch prediction misses even if 0 prefetches a conditional branch instruction, the same operation as in FIGS. 4 and 5 will occur.
上述の実施例において、分岐条件命令■のデフード後の
命令のオペランドのアクセスは分岐が確定した後に行な
う必要がある。この目的のために、BIU20は第8図
に示すように、アクセス情報保持部800を有する。回
部800はキュー構成の3本のバッファレジスタADR
O(801)。In the above-described embodiment, the operand of the defooded instruction of the branch condition instruction (2) must be accessed after the branch is established. For this purpose, the BIU 20 has an access information holding unit 800, as shown in FIG. The circuit 800 has three buffer registers ADR in a queue configuration.
O (801).
ADR,1(803)、 ADR2(805)を有し、
各レジスタにオペランドアクセスアドレスがストアされ
る。また、各レジスタに付随してタグフラグBTO(8
02)、BTI (804)、Br3(805)があ
り、これらはCBRA、QL(第3図A)が入力されて
いる。したがって、条件分岐命令0後にデコードされた
命令、すなわち分岐未確定期間中にデコードされた命令
のオペランドアドレス情報は同期間であることを示すタ
グ情報とともに保持部800に一時スドアされる。アク
セスコントローラ810はBTO−2の内容を受ケ、そ
こにタグ情報があればオペランドアクセスを一時中断す
る。そして、VCANに応答して保持部800の内容を
無効とし、UCANに応答して有効としアクセスを開始
する。ADR,1 (803), ADR2 (805),
Operand access addresses are stored in each register. Additionally, a tag flag BTO (8
02), BTI (804), and Br3 (805), to which CBRA and QL (Fig. 3A) are input. Therefore, operand address information of an instruction decoded after conditional branch instruction 0, that is, an instruction decoded during a branch undetermined period, is temporarily stored in the holding unit 800 together with tag information indicating that the branch is in the same period. The access controller 810 receives the contents of BTO-2, and if there is tag information, temporarily suspends operand access. Then, in response to VCAN, the content of the holding unit 800 is invalidated, and in response to UCAN, it is validated and access is started.
なお、第8図で、各バッファにさらにアクセス優先情報
も付加しておき、UCANに応答して優先度の高いもの
からアクセスを開始してもよい。In addition, in FIG. 8, access priority information may also be added to each buffer, and access may be started from the one with the highest priority in response to UCAN.
以上のとおり、本発明によれば、条件分岐命令カテコー
ドされてもバイブライン処理の流れを停止させないか又
はその停止を最小限に抑えたマイクロプロセツサが提供
される。As described above, according to the present invention, there is provided a microprocessor that does not stop the flow of vibe line processing even when a conditional branch instruction is coded, or that stops the flow to a minimum.
第1図は本発明の一実施例を示すブロック図、第2図は
第1図で示したIDUのブロック図、第3図A、Bは第
2図の要部回路図、第4図、第5図はそれぞれ条件分岐
命令デコード時のIDUの動作を示すタイミングチャー
ト、第6図は本発明の他の実施例を示すブロック図、第
7図は第6図に示した出力回路408′の回路図、第8
図は第1図又は第6図のB I Uの要部構成図である
。FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram of the IDU shown in FIG. 1, FIGS. 3A and B are circuit diagrams of the main parts of FIG. 5 is a timing chart showing the operation of the IDU when decoding a conditional branch instruction, FIG. 6 is a block diagram showing another embodiment of the present invention, and FIG. 7 is a diagram showing the output circuit 408' shown in FIG. 6. Circuit diagram, 8th
The figure is a diagram showing the main parts of the B I U shown in FIG. 1 or 6.
Claims (1)
ド情報を一時格納するキューレジスタと、このレジスタ
に格納されたデコード情報が実行準備完了状態となると
当該レジスタからデコード情報を読み出しする手段と、
読み出されたデコード情報を受取り実行する実行部と、
前記デコーダが条件分岐命令をデコードしたことを示す
情報に応答して、当該条件分岐命令が指定する分岐条件
が確定するまでの期間に前記デコーダによって解読され
た命令の実行準備完了状態をマスクする手段と、前記分
岐条件が確立した後、当該分岐条件の成立/不成立に応
答して前記実行準備完了状態のマスクを解除するか又は
前記実行準備完了状態を実行不可状態に変更する手段と
を備え、前記実行準備完了状態が実行不可状態に変更さ
れた場合、当該変更された命令のデコード情報が格納さ
れたキューレジスタに他の命令のデコード情報を格納す
ることを特徴とするマイクロプロセッサ。a decoder for decoding instructions; a queue register for temporarily storing decode information from the decoder; and means for reading the decode information from the register when the decode information stored in the register is ready for execution;
an execution unit that receives and executes the read decode information;
Means for, in response to information indicating that the decoder has decoded a conditional branch instruction, masking the execution ready state of the instruction decoded by the decoder during a period until the branch condition specified by the conditional branch instruction is determined. and means for unmasking the execution ready state or changing the execution ready state to a non-executable state in response to the establishment/non-satisfaction of the branch condition after the branch condition is established, A microprocessor characterized in that when the execution ready state is changed to a non-executable state, decode information of another instruction is stored in a queue register in which decode information of the changed instruction is stored.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1-24864 | 1989-02-03 | ||
| JP2486489 | 1989-02-03 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02306341A true JPH02306341A (en) | 1990-12-19 |
Family
ID=12150083
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2023687A Pending JPH02306341A (en) | 1989-02-03 | 1990-02-02 | Microprocessor |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US5185869A (en) |
| EP (1) | EP0381246B1 (en) |
| JP (1) | JPH02306341A (en) |
| DE (1) | DE69031229T2 (en) |
Families Citing this family (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2560889B2 (en) * | 1990-05-22 | 1996-12-04 | 日本電気株式会社 | Microprocessor |
| JP2834862B2 (en) * | 1990-07-13 | 1998-12-14 | 松下電器産業株式会社 | Processor |
| JP2875909B2 (en) * | 1991-07-12 | 1999-03-31 | 三菱電機株式会社 | Parallel processing unit |
| US5428579A (en) * | 1992-03-31 | 1995-06-27 | Intel Corporation | Flash memory card with power control register and jumpers |
| US5375222A (en) * | 1992-03-31 | 1994-12-20 | Intel Corporation | Flash memory card with a ready/busy mask register |
| US5422855A (en) * | 1992-03-31 | 1995-06-06 | Intel Corporation | Flash memory card with all zones chip enable circuitry |
| JP3452655B2 (en) * | 1993-09-27 | 2003-09-29 | 株式会社日立製作所 | Digital signal processor and method of executing instructions using the same |
| US5428566A (en) * | 1993-10-27 | 1995-06-27 | Intel Corporation | Nonvolatile memory card with ready and busy indication and pin count minimization |
| US5634119A (en) * | 1995-01-06 | 1997-05-27 | International Business Machines Corporation | Computer processing unit employing a separate millicode branch history table |
| US5812861A (en) * | 1995-06-22 | 1998-09-22 | Intel Corporation | Override signal for forcing a powerdown of a flash memory |
| JPH10161871A (en) * | 1996-11-28 | 1998-06-19 | Toshiba Corp | Processor |
| JP3699796B2 (en) * | 1996-11-29 | 2005-09-28 | 株式会社東芝 | Processor |
| US6282663B1 (en) * | 1997-01-22 | 2001-08-28 | Intel Corporation | Method and apparatus for performing power management by suppressing the speculative execution of instructions within a pipelined microprocessor |
| US5983341A (en) * | 1997-04-25 | 1999-11-09 | International Business Machines Corporation | Data processing system and method for extending the time for execution of an instruction |
| US6205506B1 (en) * | 1998-08-25 | 2001-03-20 | Stmicroelectronics, Inc. | Bus interface unit having multipurpose transaction buffer |
| US6101568A (en) * | 1998-08-25 | 2000-08-08 | Stmicroelectronics, Inc. | Bus interface unit having dual purpose transaction buffer |
| US7114059B2 (en) | 2001-11-05 | 2006-09-26 | Intel Corporation | System and method to bypass execution of instructions involving unreliable data during speculative execution |
| DE10332311B3 (en) * | 2003-07-16 | 2004-10-07 | Infineon Technologies Ag | Pipeline processing method for implementation of jump commands in which to speed processing jump command addresses and control information are stored in a special jump memory |
| US20170315812A1 (en) | 2016-04-28 | 2017-11-02 | Microsoft Technology Licensing, Llc | Parallel instruction scheduler for block isa processor |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS612971A (en) * | 1984-05-05 | 1986-01-08 | エスカ−エフ ゲ−エムベ−ハ− | Tension roller |
Family Cites Families (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US3490005A (en) * | 1966-09-21 | 1970-01-13 | Ibm | Instruction handling unit for program loops |
| US3771138A (en) * | 1971-08-31 | 1973-11-06 | Ibm | Apparatus and method for serializing instructions from two independent instruction streams |
| US3736567A (en) * | 1971-09-08 | 1973-05-29 | Bunker Ramo | Program sequence control |
| US4200927A (en) * | 1978-01-03 | 1980-04-29 | International Business Machines Corporation | Multi-instruction stream branch processing mechanism |
| US4298927A (en) * | 1978-10-23 | 1981-11-03 | International Business Machines Corporation | Computer instruction prefetch circuit |
| JPS56129950A (en) * | 1980-03-07 | 1981-10-12 | Hitachi Ltd | Information processor |
| DE3382350D1 (en) * | 1982-11-17 | 1991-08-29 | Nec Corp | ARRANGEMENT FOR RETRIEVING COMMANDS PREDICTING A BRANCH TARGET ADDRESS. |
| US4742451A (en) * | 1984-05-21 | 1988-05-03 | Digital Equipment Corporation | Instruction prefetch system for conditional branch instruction for central processor unit |
| DE3752100T2 (en) * | 1986-01-07 | 1997-12-11 | Nippon Electric Co | Instruction prefetcher having a circuit for checking the prediction of a branch instruction before it is executed |
| JPS6393038A (en) * | 1986-10-07 | 1988-04-23 | Mitsubishi Electric Corp | Computer |
| JPS63131230A (en) * | 1986-11-21 | 1988-06-03 | Hitachi Ltd | Information processor |
| US4881194A (en) * | 1987-11-16 | 1989-11-14 | Intel Corporation | Stored-program controller for equalizing conditional branch delays |
-
1990
- 1990-02-02 JP JP2023687A patent/JPH02306341A/en active Pending
- 1990-02-05 EP EP90102242A patent/EP0381246B1/en not_active Expired - Lifetime
- 1990-02-05 DE DE69031229T patent/DE69031229T2/en not_active Expired - Fee Related
- 1990-02-05 US US07/474,263 patent/US5185869A/en not_active Expired - Fee Related
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS612971A (en) * | 1984-05-05 | 1986-01-08 | エスカ−エフ ゲ−エムベ−ハ− | Tension roller |
Also Published As
| Publication number | Publication date |
|---|---|
| DE69031229D1 (en) | 1997-09-18 |
| EP0381246B1 (en) | 1997-08-13 |
| EP0381246A2 (en) | 1990-08-08 |
| EP0381246A3 (en) | 1992-10-28 |
| US5185869A (en) | 1993-02-09 |
| DE69031229T2 (en) | 1998-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH02306341A (en) | Microprocessor | |
| JP2504830Y2 (en) | Data processing device | |
| JP3760041B2 (en) | Information processing device for branch prediction | |
| WO2001016715A9 (en) | Branch instructions in a multithreaded parallel processing system | |
| JPH02208728A (en) | Virtual instruction cash refill algorithm | |
| JP2560889B2 (en) | Microprocessor | |
| JPH02240735A (en) | Multiple instruction processing system with data redundancy resolutions | |
| JPH0795271B2 (en) | Branch instruction execution device | |
| JPH04232549A (en) | Cache memory apparatus | |
| JPH01214932A (en) | Data processor | |
| US5197136A (en) | Processing system for branch instruction | |
| JP3683248B2 (en) | Information processing apparatus and information processing method | |
| JPH06161779A (en) | Interruption control system for data processor | |
| US5421026A (en) | Data processor for processing instruction after conditional branch instruction at high speed | |
| JP3741945B2 (en) | Instruction fetch control device | |
| US5828861A (en) | System and method for reducing the critical path in memory control unit and input/output control unit operations | |
| EP0315995B1 (en) | Processing system for branch instruction | |
| JP2532560B2 (en) | Data processing device for high-performance exception handling | |
| JPH027128A (en) | Information processor | |
| JPH04340145A (en) | Cache memory device | |
| JPH0774992B2 (en) | Data processing device | |
| JPH0471028A (en) | Microprocessor | |
| JPH0855033A (en) | Information processor | |
| JPH01281534A (en) | Data processor | |
| JPH05307483A (en) | Method and circuit for controlling write-in to register |