JPH0760387B2 - Information processing equipment - Google Patents

Information processing equipment

Info

Publication number
JPH0760387B2
JPH0760387B2 JP62286065A JP28606587A JPH0760387B2 JP H0760387 B2 JPH0760387 B2 JP H0760387B2 JP 62286065 A JP62286065 A JP 62286065A JP 28606587 A JP28606587 A JP 28606587A JP H0760387 B2 JPH0760387 B2 JP H0760387B2
Authority
JP
Japan
Prior art keywords
instruction
branch
address
decoding
buffer
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.)
Expired - Lifetime
Application number
JP62286065A
Other languages
Japanese (ja)
Other versions
JPH01126732A (en
Inventor
浩三 木村
敏道 松崎
督三 清原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP62286065A priority Critical patent/JPH0760387B2/en
Priority to EP88118764A priority patent/EP0315995B1/en
Priority to KR1019880014765A priority patent/KR930009617B1/en
Priority to DE3856299T priority patent/DE3856299T2/en
Publication of JPH01126732A publication Critical patent/JPH01126732A/en
Priority to US07/614,680 priority patent/US5197136A/en
Publication of JPH0760387B2 publication Critical patent/JPH0760387B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は情報処理装置における分岐命令の高速化に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to speeding up a branch instruction in an information processing device.

従来の技術 従来の情報処理装置は、実行中の命令のアドレスを保持
するプログラムカウンタ(以下、PCと省略)を持ってお
り、PCで保持されるアドレスより主記憶の命令を読み込
み、命令の実行を行う。
2. Description of the Related Art A conventional information processing device has a program counter (hereinafter, abbreviated as PC) that holds an address of an instruction being executed, reads an instruction in main memory from an address held by the PC, and executes the instruction. I do.

第4図はこの従来の情報処理装置を示すブロック図であ
り、18は命令およびデータを格納する主記憶部、19は主
記憶部18から情報処理装置内部に命令を読みこむ命令読
みこみ部、20は読みこんだ命令を解読してコマンドを生
成する命令解読部、21は現在実行している命令のアドレ
スを示すプログラムカウンタ(PC)、22はコマンドを実
行する実行部である。
FIG. 4 is a block diagram showing this conventional information processing apparatus, in which 18 is a main storage section for storing instructions and data, 19 is an instruction reading section for reading instructions from the main storage section 18 into the information processing apparatus, Reference numeral 20 is an instruction decoding unit that decodes the read instruction to generate a command, 21 is a program counter (PC) that indicates the address of the instruction that is currently being executed, and 22 is an execution unit that executes the command.

以上のように構成された従来の装置においては、命令読
みこみ部19が、指定されたアドレスについて、主記憶部
18より命令を読みこむ。命令解読部20は読みこんだ命令
を解読し、実行部22にコマンドを発行する。実行部22は
受取ったコマンドを実行し、命令が終了するとPC21を更
新する。
In the conventional device configured as described above, the instruction reading unit 19 uses the main storage unit for the specified address.
Read instructions from 18. The instruction decoding unit 20 decodes the read instruction and issues a command to the execution unit 22. The execution unit 22 executes the received command and updates the PC 21 when the command is completed.

発明が解決しようとする問題点 しかしながら上記のような構成では、分岐命令も実行部
22で処理させているので、次のような問題点を有してい
た。
Problems to be Solved by the Invention However, in the above configuration, the branch instruction is also executed by the execution unit.
Since it is processed at 22, it had the following problems.

(1)命令読みこみ部19および命令解読部20内の既に読
みこんだ命令を無効化しなければならない。
(1) It is necessary to invalidate the already read instruction in the instruction reading unit 19 and the instruction decoding unit 20.

(2)分岐命令実行以前に分岐先命令のアドレスおよび
分岐先命令を準備しないので、分岐成立時の命令実行開
始が遅れる。
(2) Since the address of the branch destination instruction and the branch destination instruction are not prepared before the branch instruction is executed, the start of instruction execution when the branch is taken is delayed.

(3)分岐命令より先に解読された命令の処理が終わる
まで分岐命令が処理できない。
(3) The branch instruction cannot be processed until the processing of the instruction decoded before the branch instruction is completed.

(4)実行部22で条件付分岐命令の条件判定を処理する
ため、条件付分岐命令の処理時間が増加する。
(4) Since the execution unit 22 processes the conditional judgment of the conditional branch instruction, the processing time of the conditional branch instruction increases.

本発明はかかる点に鑑み、分岐命令を高速に実行する情
報処理装置を提供することを目的とする。
In view of the above point, the present invention has an object to provide an information processing apparatus that executes a branch instruction at high speed.

問題点を解決するための手段 本発明は分岐命令を処理する命令解読部と、読みだした
命令を格納する命令バッファと、アドレス計算を行う加
算器と、先読み命令のアドレスを格納する命令先読みカ
ウンタと、解読中の命令のアドレスを格納する命令解読
カウンタと、分岐命令処理時に分岐先命令のアドレスを
格納する分岐用命令先読みレジスタと、分岐命令処理時
に分岐先命令のアドレスを格納する分岐用命令解読レジ
スタと、分岐命令処理時に分岐先命令を格納する分岐用
命令バッファを備えた装置である。
Means for Solving Problems The present invention relates to an instruction decoding unit for processing a branch instruction, an instruction buffer for storing a read instruction, an adder for calculating an address, and an instruction prefetch counter for storing the address of a prefetch instruction. , An instruction decoding counter that stores the address of the instruction being decoded, a branch instruction prefetch register that stores the address of the branch target instruction when processing the branch instruction, and a branch instruction that stores the address of the branch target instruction when processing the branch instruction The apparatus includes a decoding register and a branch instruction buffer that stores a branch destination instruction when processing a branch instruction.

作用 本発明は前記した構成により、命令解読部が条件付分岐
命令を解読すると、実行部とは独立かつ並列に分岐先命
令のアドレスを算出し、分岐先命令を高速に準備する。
分岐命令より先に解読された命令の終了まで動作を停止
し、分岐成立の有無の確定を待つ。演算結果フラグ確定
と同時に命令解読部は分岐成立の有無を判断し、成立時
には既に準備されている分岐先命令の解読を始め、同時
に既に解読されている分岐命令に後続する命令を無効化
する。不成立時には既に解読されている分岐命令に後続
する命令を引き続いて実行する。
Operation According to the present invention, when the instruction decoding unit decodes the conditional branch instruction, the address of the branch destination instruction is calculated independently of and parallel to the execution unit, and the branch destination instruction is prepared at high speed.
The operation is stopped until the end of the instruction decoded before the branch instruction, and the determination of whether or not the branch is taken is waited. Simultaneously with the determination of the operation result flag, the instruction decoding unit judges whether or not the branch is taken, and when the branch is taken, the already prepared branch destination instruction is started to be decoded, and at the same time, the instruction following the already decoded branch instruction is invalidated. When not established, the instruction following the branch instruction which has already been decoded is continuously executed.

実施例 第1図は本発明の一実施例における情報処理装置の構成
を示すブロック図である。第1図において、1は実行す
べき命令が格納されており高速に命令を読みだすことの
可能な命令用のキャッシュ、2は先行的に命令を読み込
むためのアドレスを保持し、先読みした命令のバイト数
分カウントアップする機能を持つ命令先読みカウンタ、
3は分岐命令の解読後演算される分岐先アドレスを一時
的に保持する分岐用命令先読みレジスタ、4は読みださ
れた命令をキューイングするFIFO形式の命令バッファ、
5は分岐命令の解読後読みだされた分岐先命令を一時的
に保持する分岐用命令バッファ、6は読み込んだ命令を
解読し実行部のコマンドを生成する命令解読部、7は命
令解読部6が発行した実行コマンドをキューイングする
FIFO形式の実行コマンドバッファ、8は入力された実行
コマンドを処理する実行部、9は次に命令解読部6で解
読する命令のアドレスを保持し、解読した命令のバイト
数分カウントアップする機能を持つ命令解読カウンタ、
10は分岐命令の解読後演算される分岐先アドレスを一時
的に保持する分岐用命令解読レジスタ、11は実行部8お
よび命令解読部6に存在する命令に対応するアドレスを
キューイングするFIFO形式のプログラムカウンタバッフ
ァ、12は命令解読カウンタ9のアドレスとディスプレー
スメントを加算する加算器、13は命令先読みカウンタ2
の入力を選択するセレクタ、14はキャシュ1の入力を選
択するセレクタ、15は命令解読部6の入力を選択するセ
レクタ、16は命令解読カウンタ9の入力を選択するセレ
クタ、17は加算器12の入力を選択するセレクタである。
Embodiment 1 FIG. 1 is a block diagram showing the configuration of an information processing apparatus in an embodiment of the present invention. In FIG. 1, 1 is an instruction cache in which instructions to be executed are stored and instructions can be read at high speed, 2 is an address for reading instructions in advance, An instruction prefetch counter that has the function of counting up by the number of bytes,
3 is a branch instruction prefetch register for temporarily holding a branch destination address calculated after decoding the branch instruction, 4 is a FIFO type instruction buffer for queuing the read instruction,
Reference numeral 5 is a branch instruction buffer that temporarily holds the branch destination instruction read after decoding the branch instruction, 6 is an instruction decoding unit that decodes the read instruction and generates the command of the execution unit, and 7 is the instruction decoding unit 6 The execution command issued by
FIFO-type execution command buffer, 8 is an execution unit that processes an input execution command, and 9 is a function that holds the address of an instruction to be decoded next by the instruction decoding unit 6 and counts up by the number of bytes of the decoded instruction. Instruction decoding counter,
Reference numeral 10 is a branch instruction decoding register for temporarily holding a branch destination address calculated after decoding of the branch instruction, and 11 is a FIFO type for queuing addresses corresponding to the instructions existing in the execution section 8 and the instruction decoding section 6. Program counter buffer, 12 is an adder for adding the address and displacement of the instruction decoding counter 9, 13 is the instruction prefetch counter 2
, A selector for selecting the input of the cache 1, a selector 15 for selecting the input of the instruction decoding unit 6, a selector 16 for selecting the input of the instruction decoding counter 9, and a selector 17 for the adder 12. It is a selector that selects an input.

第2図は本発明における条件付分岐命令の分岐成立時の
動作を示すタイミングチャート図である。第3図は本発
明における条件付分岐命令の分岐不成立時の動作を示す
タイミングチャート図である。第2図、第3図において
A0は条件付分岐命令(Bcc)より先に解読された命令、B
ccは条件付分岐命令、A1は条件付分岐命令(Bcc)に後
続する命令、A2はA1に後続する命令、B0は分岐先の命令
である。
FIG. 2 is a timing chart showing the operation of the conditional branch instruction of the present invention when a branch is taken. FIG. 3 is a timing chart showing the operation of the conditional branch instruction of the present invention when a branch is not taken. 2 and 3
A0 is the instruction decoded before the conditional branch instruction (Bcc), B
cc is a conditional branch instruction, A1 is an instruction following a conditional branch instruction (Bcc), A2 is an instruction following A1, and B0 is a branch destination instruction.

以上のように構成されたこの実施例の情報処理装置につ
いて、最初に分岐をしない通常動作を説明する。
Regarding the information processing apparatus of this embodiment configured as described above, the normal operation without branching will be described first.

(1)命令先読みカウンタ2に格納されているアドレス
によりキャッシュ1から命令を読出し、命令バッファ4
に格納する。(以後、命令先読み動作と呼ぶ。) (2)命令先読みカウンタ2は命令バッファ4に格納し
た命令のバイト数分だけアドレスをカウントアップした
後、そのアドレスを保持する。
(1) An instruction is read from the cache 1 by the address stored in the instruction prefetch counter 2 and the instruction buffer 4
To store. (Hereinafter, referred to as instruction prefetch operation.) (2) The instruction prefetch counter 2 counts up the address by the number of bytes of the instruction stored in the instruction buffer 4, and then holds the address.

(3)命令解読部6は命令バッファ4の底の命令をセレ
クタ15を通して取り出し、解読する。
(3) The instruction decoding unit 6 takes out the instruction at the bottom of the instruction buffer 4 through the selector 15 and decodes it.

(4)命令解読部6は解読後、実行コマンドバッファ7
にコマンドを格納すると同時に、命令解読カウンタ9は
命令解読部6で解読した命令のバイト数分だけアドレス
をカウントアップした後、そのアドレスを保持する。
(4) The instruction decoding unit 6 decodes and then executes the execution command buffer 7
At the same time as storing the command in, the instruction decoding counter 9 holds the address after counting up the address by the number of bytes of the instruction decoded by the instruction decoding unit 6.

(5)命令解読部6が命令の最終語を解読中には、命令
解読カウンタ9は次に解読すべき命令の先頭アドレスに
セットされる。
(5) While the instruction decoding unit 6 is decoding the last word of the instruction, the instruction decoding counter 9 is set to the leading address of the next instruction to be decoded.

(6)命令解読部6は1命令解読後、命令解読カウンタ
9に準備された次に解読すべき命令の先頭アドレスをセ
レクタ17を通してプログラムカウンタバッファ11に格納
する。
(6) After decoding one instruction, the instruction decoding unit 6 stores the leading address of the next instruction to be decoded prepared in the instruction decoding counter 9 in the program counter buffer 11 through the selector 17.

(7)実行部8は、前実行コマンドの処理が終了する
と、実行コマンドバッファ7の底のコマンドを取り出
し、実行する。現在実行中の命令のアドレスはプログラ
ムカウンタバッファ11の底に格納されている。
(7) When the processing of the pre-execution command is completed, the execution unit 8 takes out the command at the bottom of the execution command buffer 7 and executes it. The address of the instruction currently being executed is stored at the bottom of the program counter buffer 11.

(8)実行部8は読みこんだコマンドを実行し、1命令
が実行終了するとプログラムカウンタバッファ11の底の
アドレスを廃棄する。
(8) The execution unit 8 executes the read command and discards the bottom address of the program counter buffer 11 when the execution of one instruction is completed.

次に条件付分岐命令の分岐成立時の動作を第2図を用い
て説明する。
Next, the operation of the conditional branch instruction when the branch is taken will be described with reference to FIG.

(1)〜(3)は分岐をしない通常動作と同じである。(1) to (3) are the same as the normal operation without branching.

(4)命令解読部6はサイクルC2で、条件付分岐命令Bc
cを解読すると命令先読み動作を停止させる。命令バッ
ファ4の底にはA2が準備された状態で停止する。
(4) The instruction decoding unit 6 executes the conditional branch instruction Bc in cycle C2.
Decoding c stops the instruction prefetch operation. The command buffer 4 stops at the bottom with A2 prepared.

(5)命令解読部6はサイクルC3で、条件付分岐命令Bc
cに後続する命令A1を読みこみ解読を始める。
(5) The instruction decoding unit 6 executes the conditional branch instruction Bc in the cycle C3.
The instruction A1 following c is read and decoding is started.

(6)加算器12はサイクルC3で、命令バッファ4内に格
納されている分岐命令に付属するディスプレースメント
と命令解読カウンタ9に格納された分岐命令のアドレス
とをセレクタ15とセレクタ17とを通して加算し、分岐先
アドレスを生成する。その後、命令解読カウンタ9は解
読した命令のバイト数分だけアドレスをカウントアップ
した後、そのアドレスを保持する。
(6) In cycle C3, the adder 12 adds the displacement attached to the branch instruction stored in the instruction buffer 4 and the address of the branch instruction stored in the instruction decoding counter 9 through the selector 15 and the selector 17. Then, the branch destination address is generated. After that, the instruction decoding counter 9 counts up the address by the number of bytes of the decoded instruction and holds the address.

(7)同サイクルで生成された分岐先アドレスは分岐用
命令先読みレジスタ3に格納されると同時に、分岐用命
令解読レジスタ10にも格納される。命令先読みカウンタ
2および命令解読カウンタ9には分岐先命令B0のアドレ
スは格納されない。
(7) The branch destination address generated in the same cycle is stored in the branch instruction prefetch register 3 and at the same time stored in the branch instruction decoding register 10. The address of the branch destination instruction B0 is not stored in the instruction prefetch counter 2 and the instruction decoding counter 9.

(8)サイクルC4で、命令解読部6は分岐用命令先読み
レジスタ3の分岐先命令B0のアドレスをセレクタ14を通
して出力し、キャッシュ1から分岐先命令B0を読出し
て、分岐用命令バッファ5に格納する。命令バッファ4
には分岐先命令B0を格納しない。
(8) In cycle C4, the instruction decoding unit 6 outputs the address of the branch destination instruction B0 of the branch instruction prefetch register 3 through the selector 14, reads the branch destination instruction B0 from the cache 1, and stores it in the branch instruction buffer 5. To do. Instruction buffer 4
The branch destination instruction B0 is not stored in.

(9)サイクルC4の最終では、命令先読みカウンタ2に
は、命令バッファ4に格納されている命令の次に読みこ
む命令のアドレスが格納されている。分岐用命令先読み
レジスタ3には、分岐先命令B0のアドレスが格納されて
いる。命令解読カウンタ9には、分岐命令に後続する命
令A1のアドレスが格納されている。分岐用命令解読レジ
スタ10には、分岐先命令B0のアドレスが格納されてい
る。
(9) At the end of cycle C4, the instruction prefetch counter 2 stores the address of the instruction to be read next to the instruction stored in the instruction buffer 4. The address of the branch destination instruction B0 is stored in the branch instruction prefetch register 3. The instruction decoding counter 9 stores the address of the instruction A1 following the branch instruction. The address of the branch destination instruction B0 is stored in the branch instruction decoding register 10.

命令バッファ4の底には、分岐命令に後続する命令A2が
格納されている。分岐用命令バッファ5には、分岐先命
令B0が格納されている。
At the bottom of the instruction buffer 4, the instruction A2 following the branch instruction is stored. A branch target instruction B0 is stored in the branch instruction buffer 5.

(10)分岐成立、不成立それぞれ確定後に実行されるべ
き命令(A2,B0)およびアドレスを準備した後、分岐命
令より先に解読された命令A0の実行部8における条件フ
ラグの確定を待ち、実行部8以外の動作を停止する。
(10) After preparing an instruction (A2, B0) and an address to be executed after the branch is taken and not taken, respectively, wait for the condition flag in the execution unit 8 of the instruction A0 decoded before the branch instruction to be fixed and execute. The operations other than the part 8 are stopped.

(11)サイクルC5で、実行部8においてフラグ確定後、
命令解読部6は条件付分岐命令Bccの条件が成立したか
どうかを判断する。
(11) In the cycle C5, after the flag is determined in the execution unit 8,
The instruction decoding unit 6 determines whether the condition of the conditional branch instruction Bcc is satisfied.

(12)分岐が成立の場合、同サイクルで命令解読部6は
セレクタ15を分岐用命令バッファ5側に切り換え、バッ
ファ5に格納されている分岐先命令B0をセレクタ15を通
して読みこむ。
(12) If the branch is taken, the instruction decoding unit 6 switches the selector 15 to the branch instruction buffer 5 side in the same cycle and reads the branch destination instruction B0 stored in the buffer 5 through the selector 15.

(13)命令解読部6は命令バッファ4を初期化する。(13) The instruction decoding unit 6 initializes the instruction buffer 4.

(14)命令解読部6はセレクタ13を分岐用命令先読みレ
ジスタ3側に切り換え、レジスタ3に格納されている分
岐先命令B0の先頭アドレスをセレクタ13を通して命令先
読みカウンタ2に書き込む。
(14) The instruction decoding unit 6 switches the selector 13 to the branch instruction prefetch register 3 side, and writes the start address of the branch destination instruction B0 stored in the register 3 to the instruction prefetch counter 2 through the selector 13.

(15)命令解読部6はセレクタ16およびセレクタ17を分
岐用命令解読レジスタ10側に切り換え、レジスタ10に格
納されている分岐先命令B0の先頭アドレスをセレクタ16
を通して命令解読カウンタ9に書き込むと同時に、セレ
クタ17を通してプログラムカウンタバッファ11内の分岐
命令のアドレスにオーバーライトする。
(15) The instruction decoding unit 6 switches the selector 16 and the selector 17 to the branch instruction decoding register 10 side, and sets the start address of the branch destination instruction B0 stored in the register 10 to the selector 16
At the same time as writing to the instruction decoding counter 9 through the address, the address of the branch instruction in the program counter buffer 11 is overwritten through the selector 17.

(16)命令解読部6は命令先読み動作を再開し、分岐先
命令B0を解読する。
(16) The instruction decoding unit 6 restarts the instruction prefetch operation and decodes the branch destination instruction B0.

(17)命令解読部6は解読済の命令A1を無効化する。(17) The instruction decoding unit 6 invalidates the decoded instruction A1.

(18)命令解読部6は解読後、実行コマンドバッファ7
にコマンドを格納する。
(18) The instruction decoding unit 6 decodes and then executes the execution command buffer 7
Store the command in.

(19)実行部8は、実行コマンドバッファ7の底のコマ
ンドを取り出し、実行する。現在実行中の命令のアドレ
スはプログラムカウンタバッファ11の底に格納されてい
る。
(19) The execution unit 8 takes out the command at the bottom of the execution command buffer 7 and executes it. The address of the instruction currently being executed is stored at the bottom of the program counter buffer 11.

(20)実行部8は読みこんだコマンドを実行し、1命令
が実行終了するとプログラムカウンタバッファ11の底の
アドレスを廃棄する。
(20) The execution unit 8 executes the read command and discards the bottom address of the program counter buffer 11 when the execution of one instruction is completed.

次に条件付分岐命令の分岐不成立時の動作を第3図を用
いて説明する。
Next, the operation of the conditional branch instruction when the branch is not taken will be described with reference to FIG.

(1)〜(11)は条件付分岐命令の条件成立時の動作と
同じである。
(1) to (11) are the same as the operation when the condition of the conditional branch instruction is satisfied.

(12)分岐が不成立の場合、サイクルC5で命令解読部6
はセレクタ15を命令バッファ4側に切り換え、バッファ
4に格納されている分岐命令に後続する命令A2をセレク
タ15を通して読みこむ。
(12) If the branch is not taken, the instruction decoding unit 6 is used in cycle C5.
Switches the selector 15 to the instruction buffer 4 side and reads the instruction A2 following the branch instruction stored in the buffer 4 through the selector 15.

(13)命令解読部6はセレクタ13、セレクタ14、セレク
タ15、セレクタ16およびセレクタ17を分岐をしない通常
動作と同じように切り換える。
(13) The instruction decoding unit 6 switches the selector 13, the selector 14, the selector 15, the selector 16 and the selector 17 in the same manner as the normal operation without branching.

(14)命令解読カウンタ9に格納されている分岐命令に
後続する命令A2の先頭アドレスをセレクタ17を通してプ
ログラムカウンタバッファ11内に既に格納されている分
岐命令のアドレスにオーバーライトする。
(14) The start address of the instruction A2 following the branch instruction stored in the instruction decoding counter 9 is overwritten by the selector 17 to the address of the branch instruction already stored in the program counter buffer 11.

(15)命令解読部6は分岐命令に後続する命令A2を解読
する。
(15) The instruction decoding unit 6 decodes the instruction A2 following the branch instruction.

(16)命令解読部6は解読済の命令A1を次のステージに
流す。
(16) The instruction decoding unit 6 sends the decoded instruction A1 to the next stage.

(17)命令解読部6は解読後、実行コマンドバッファ7
にコマンドを格納する。
(17) The instruction decoding unit 6 executes the execution command buffer 7 after decoding
Store the command in.

(18)実行部8は、実行コマンドバッファ7の底のコマ
ンドを取り出し、実行する。現在実行中の命令のアドレ
スはプログラムカウンタバッファ11の底に格納されてい
る。
(18) The execution unit 8 takes out the command at the bottom of the execution command buffer 7 and executes it. The address of the instruction currently being executed is stored at the bottom of the program counter buffer 11.

(19)実行部6は読みこんだコマンドを実行し、1命令
が実行終了するとプログラムカウンタバッファ11の底の
アドレスを廃棄する。
(19) The execution unit 6 executes the read command and discards the bottom address of the program counter buffer 11 when the execution of one instruction is completed.

第2図について以下補足説明する。命令解読部は分岐命
令(Bcc)を解読後、実効アドレス計算を行うと、直ち
に分岐先の命令の読みこみを行い分岐先命令B0を準備
し、現在実行中の命令A0の終了を待つ。命令A0が終了し
フラグが確定すると分岐が成立し、分岐先命令B0が直ち
に解読ステージに流される。解読ステージにて待ち状態
に置かれていた分岐命令に後続する命令A1は無効化され
る。(斜線は無効化された命令およびコマンド) 第3図について以下補足説明する。命令解読部は分岐命
令(Bcc)を解読後、実効アドレス計算を行うと、直ち
に分岐先の命令の読みこみを行い分岐先命令B0を準備
し、現在実行中の命令A0の終了を待つ。命令A0が終了し
フラグが確定すると分岐が不成立となり、既に準備され
ている分岐命令に後続する命令A2が直ちに解読ステージ
に流される。当然命令A1は次のステージへ流される。
FIG. 2 will be supplementarily described below. When the effective address is calculated after decoding the branch instruction (Bcc), the instruction decoding unit immediately reads the branch destination instruction, prepares the branch destination instruction B0, and waits for the end of the currently executing instruction A0. When the instruction A0 ends and the flag is determined, the branch is taken and the branch destination instruction B0 is immediately sent to the decoding stage. The instruction A1 following the branch instruction placed in the waiting state at the decoding stage is invalidated. (Slanted lines indicate invalidated commands and commands) A supplementary description will be given below with reference to FIG. When the effective address is calculated after decoding the branch instruction (Bcc), the instruction decoding unit immediately reads the branch destination instruction, prepares the branch destination instruction B0, and waits for the end of the currently executing instruction A0. When the instruction A0 ends and the flag is fixed, the branch is not taken, and the instruction A2 following the already prepared branch instruction is immediately sent to the decoding stage. Of course, the instruction A1 is sent to the next stage.

なお、この実施例において命令バッファ3、実行コマン
ドバッファ5、プログラムカウンタバッファ8は複数段
としたが、1段でも実行可能である。
Although the instruction buffer 3, the execution command buffer 5, and the program counter buffer 8 have a plurality of stages in this embodiment, they can be executed in one stage.

また、この実施例においてキャッシュヒットの場合を説
明したが、キャッシュミスヒットの場合、キャッシュ1
がない場合においても主記憶に対して命令の読みこみ動
作が行なわれるだけで、効果には影響しない。
Although the cache hit has been described in this embodiment, in the case of a cache miss, the cache 1
Even if there is no, only the instruction read operation is performed to the main memory, and the effect is not affected.

発明の効果 本発明によれば、条件付分岐命令が発生した場合、分岐
命令を実行部へ発行せず命令解読部で処理すること、分
岐先の命令および分岐命令に後続する命令の両方を高速
に実行と独立かつ並列に準備すること、分岐条件が確定
するまで解読動作やコマンド発行を停止することによ
り、以下の効果が生まれる。
According to the present invention, when a conditional branch instruction occurs, the branch instruction is processed by the instruction decoding unit without being issued to the execution unit, and both the instruction at the branch destination and the instruction subsequent to the branch instruction are executed at high speed. The following effects can be obtained by preparing in parallel with the execution and suspending the decoding operation and command issuance until the branch condition is fixed.

(1)既に読みこんだ命令のうち、無効化しなければな
らない命令が少ない。
(1) Of the commands that have already been read, there are few commands that must be invalidated.

(2)分岐先命令のアドレス計算および分岐先命令の読
みこみを実行部の動作と独立かつ並列に行えるため、高
速に分岐先命令を準備できる。
(2) Since the address calculation of the branch destination instruction and the reading of the branch destination instruction can be performed independently and in parallel with the operation of the execution unit, the branch destination instruction can be prepared at high speed.

(3)分岐命令に後続する命令は命令バッファに準備さ
れており、かつ解読済の命令も準備されているため、後
続する命令を高速に実行できる。
(3) Since the instruction following the branch instruction is prepared in the instruction buffer and the decoded instruction is prepared, the following instruction can be executed at high speed.

(4)実行部のフラグ確定より以前に、分岐先命令およ
び分岐命令に後続する命令が準備されているため、分岐
成立後、直ちに分岐先命令を解読できる。
(4) Since the branch destination instruction and the instruction following the branch instruction are prepared before the flag of the execution unit is determined, the branch destination instruction can be immediately decoded after the branch is taken.

(5)分岐先命令および分岐命令に後続する命令を準備
後、実行部のフラグ確定まで動作を停止し、また無効化
機構により命令およびコマンドを無効化することによ
り、実行コマンドバッファ内および実行部内でのコマン
ドキャンセル機構、状態回復機構およびコマンド再実行
機構などを必要としない。
(5) In the execution command buffer and in the execution unit, after preparing the branch destination instruction and the instruction following the branch instruction, the operation is stopped until the flag of the execution unit is determined, and the instruction and the command are invalidated by the invalidation mechanism. It does not require the command cancellation mechanism, state recovery mechanism, command re-execution mechanism, etc.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明の実施例における情報処理装置の構成を
示すブロック図、第2図は本発明における条件付分岐命
令の分岐成立時の動作を示すタイミングチャート図、第
3図は本発明における条件付分岐命令の分岐不成立時の
動作を示すタイミングチャート図、第4図は従来の情報
処理装置を示すブロック図である。 2……命令先読みカウンタ、3……分岐用命令先読みレ
ジスタ、4……命令バッファ、5……分岐用命令バッフ
ァ、6……命令解読部、9……命令解読カウンタ、10…
…分岐用命令解読レジスタ、12……加算器。
FIG. 1 is a block diagram showing the configuration of an information processing apparatus according to an embodiment of the present invention, FIG. 2 is a timing chart showing the operation of a conditional branch instruction of the present invention when a branch is taken, and FIG. FIG. 4 is a timing chart showing an operation when a conditional branch instruction is not taken, and FIG. 4 is a block diagram showing a conventional information processing apparatus. 2 ... Instruction prefetch counter, 3 ... Branch instruction prefetch register, 4 ... Instruction buffer, 5 ... Branch instruction buffer, 6 ... Instruction decoding unit, 9 ... Instruction decoding counter, 10 ...
… Branch instruction decoding register, 12 …… Adder.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−54342(JP,A) 特開 昭61−289429(JP,A) 特開 昭53−62438(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP 62-54342 (JP, A) JP 61-289429 (JP, A) JP 53-62438 (JP, A)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】先読み命令のアドレスを格納する命令先読
みカウンタと、先読みする分岐先命令のアドレスを格納
する分岐用命令先読みレジスタと、解読する命令のアド
レスを格納する命令解読カウンタと、解読する分岐先命
令のアドレスを格納する分岐用命令解読レジスタと、前
記命令先読みカウンタのアドレスにより読み込んだ命令
を格納する命令バッファと、前記分岐用命令先読みレジ
スタの分岐先命令のアドレスにより読み込んだ分岐先命
令を格納する分岐用命令バッファと、前記命令解読カウ
ンタに格納された解読中の命令のアドレスと前記命令バ
ッファ内のデータとを加算する加算器と、前記命令バッ
ファより条件付分岐命令を取り出して解読後この分岐命
令より先に解読された命令の実行と独立かつ並列して前
記加算器により分岐先アドレスを計算し、結果を前記分
岐用命令先読みレジスタおよび前記分岐用命令解読レジ
スタに格納させ、格納した分岐先アドレスにより読みこ
んだ分岐先命令を前記分岐用命令バッファに格納し、分
岐命令より先に解読された命令の実行完了まで動作を停
止して演算結果の確定を待つ命令解読部とを備えたこと
を特徴とする情報処理装置。
1. An instruction prefetch counter for storing the address of a prefetch instruction, a branch instruction prefetch register for storing the address of a branch destination instruction for prefetching, an instruction decoding counter for storing the address of an instruction for decoding, and a branch for decoding. A branch instruction decoding register for storing the address of the destination instruction; an instruction buffer for storing the instruction read at the address of the instruction prefetch counter; and a branch destination instruction read at the address of the branch destination instruction of the branch instruction prefetch register. A branch instruction buffer for storing, an adder for adding the address of the instruction being decoded stored in the instruction decoding counter and the data in the instruction buffer, and a conditional branch instruction fetched from the instruction buffer and decoded Independently and in parallel with the execution of the instruction decoded prior to this branch instruction, The destination address is calculated, the result is stored in the branch instruction prefetch register and the branch instruction decoding register, and the branch destination instruction read by the stored branch destination address is stored in the branch instruction buffer. An information processing device, comprising: an instruction decoding unit that stops the operation until the execution of the previously decoded instruction is completed and waits for the determination of the operation result.
【請求項2】演算結果の確定後分岐成立の有無を判断
し、分岐成立の場合は分岐命令に後続する解読済の命令
を無効化すると同時に分岐用命令バッファに格納された
分岐先命令を解読し、分岐不成立の場合は分岐命令に後
続する解読済の命令を引き続き実行させると同時に命令
バッファに格納された命令を解読する命令解読部を有す
ることを特徴とする特許請求の範囲第一項記載の情報処
理装置。
2. After the operation result is determined, it is judged whether or not a branch is taken, and if the branch is taken, the decoded instruction following the branch instruction is invalidated and the branch destination instruction stored in the branch instruction buffer is decoded. However, when the branch is not taken, an instruction decoding unit that decodes the instruction stored in the instruction buffer while continuing to execute the decoded instruction following the branch instruction is set forth in claim 1. Information processing equipment.
JP62286065A 1987-11-12 1987-11-12 Information processing equipment Expired - Lifetime JPH0760387B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP62286065A JPH0760387B2 (en) 1987-11-12 1987-11-12 Information processing equipment
EP88118764A EP0315995B1 (en) 1987-11-12 1988-11-10 Processing system for branch instruction
KR1019880014765A KR930009617B1 (en) 1987-11-12 1988-11-10 Branch processing device
DE3856299T DE3856299T2 (en) 1987-11-12 1988-11-10 Branch instruction processing system
US07/614,680 US5197136A (en) 1987-11-12 1990-11-19 Processing system for branch instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62286065A JPH0760387B2 (en) 1987-11-12 1987-11-12 Information processing equipment

Publications (2)

Publication Number Publication Date
JPH01126732A JPH01126732A (en) 1989-05-18
JPH0760387B2 true JPH0760387B2 (en) 1995-06-28

Family

ID=17699496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62286065A Expired - Lifetime JPH0760387B2 (en) 1987-11-12 1987-11-12 Information processing equipment

Country Status (1)

Country Link
JP (1) JPH0760387B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06124205A (en) * 1992-10-12 1994-05-06 Matsushita Electric Ind Co Ltd Instruction prefetch device
US20090253820A1 (en) * 2006-03-21 2009-10-08 Honeywell International Inc. Foaming agents and compositions containing fluorine sustituted olefins and methods of foaming
JP5580404B2 (en) * 2010-03-29 2014-08-27 株式会社東芝 Semiconductor device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5362438A (en) * 1976-11-17 1978-06-03 Hitachi Ltd Microprogram controller
JPS61289429A (en) * 1985-06-18 1986-12-19 Matsushita Electric Ind Co Ltd arithmetic processing unit
US4777587A (en) * 1985-08-30 1988-10-11 Advanced Micro Devices, Inc. System for processing single-cycle branch instruction in a pipeline having relative, absolute, indirect and trap addresses

Also Published As

Publication number Publication date
JPH01126732A (en) 1989-05-18

Similar Documents

Publication Publication Date Title
US4701844A (en) Dual cache for independent prefetch and execution units
JP3800383B2 (en) Computer random access memory system
JP3016575B2 (en) Multiple cache memory access methods
US20100199045A1 (en) Store-to-load forwarding mechanism for processor runahead mode operation
JP2002297379A (en) Hardware prefetch system
JP5089226B2 (en) Hardware assisted exceptions for software miss handling of I/O address translation cache misses - Patents.com
US6108768A (en) Reissue logic for individually reissuing instructions trapped in a multiissue stack based computing system
JP2596712B2 (en) System and method for managing execution of instructions, including adjacent branch instructions
JPH02287626A (en) Pipeline system branch instruction controller
US6237086B1 (en) 1 Method to prevent pipeline stalls in superscalar stack based computing systems
US20060224870A1 (en) Information processing device
JPH0760387B2 (en) Information processing equipment
US6170050B1 (en) Length decoder for variable length data
EP0156307A2 (en) Pipelined processor having dual cache memories
US5463737A (en) Instruction buffer controller in processor enabling direct refetching of an instruction
US20210294609A1 (en) Processor and pipeline processing method
JPH07306785A (en) Processor having branch instruction execution function and branch instruction control method
JP4111645B2 (en) Memory bus access control method after cache miss
JPH0766326B2 (en) Information processing equipment
JP2668987B2 (en) Data processing device
JP2511978B2 (en) Data processing device
JPH0646382B2 (en) Prefetch queue control method
JP3039391B2 (en) Memory system
JPH01193938A (en) Instruction pre-reader
JP3838405B2 (en) Central processing unit and central processing system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080628

Year of fee payment: 13