JP2001142703A - Microcomputer and method for controlling conditional branch instruction fetch - Google Patents

Microcomputer and method for controlling conditional branch instruction fetch

Info

Publication number
JP2001142703A
JP2001142703A JP32629799A JP32629799A JP2001142703A JP 2001142703 A JP2001142703 A JP 2001142703A JP 32629799 A JP32629799 A JP 32629799A JP 32629799 A JP32629799 A JP 32629799A JP 2001142703 A JP2001142703 A JP 2001142703A
Authority
JP
Japan
Prior art keywords
instruction
branch
microcomputer
conditional
fetch
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
Application number
JP32629799A
Other languages
Japanese (ja)
Inventor
Nobuyuki Hirai
伸幸 平井
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP32629799A priority Critical patent/JP2001142703A/en
Publication of JP2001142703A publication Critical patent/JP2001142703A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a microcomputer and a conditional branch instruction fetch control method which prevent deterioration in execution performance caused by the time loss of the microcomputer due to a branch instruction by predicting the branch instruction destination of a conditional branch instruction and controlling a next instruction code in instruction fetch operation after the branch instruction code. SOLUTION: The addresses of branch instructions which were executed in the past and a history counter are recorded in a branch information RAM 13 and when a branch instruction is detected at instruction fetch time, a predicted branch-destination address is set in a program fetch counter 8 by the branch information RAM 13 and a large/small decision circuit 17. Consequently, when the branch prediction coincides and when an unconditional branch instruction is executed, the microcomputer continuously operates without making the instruction code in an instruction queue 3 by the branch instruction ineffective.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータ技術に係り、特に条件分岐命令の分岐命令先を予測
し分岐命令コード後の命令フェッチ動作で次の命令コー
ドを制御することにより分岐命令によるマイクロコンピ
ュータのタイムロスが引き起こす実行性能の低下を防止
するマイクロコンピュータおよび条件分岐命令フェッチ
制御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer technology, and more particularly to a microcomputer using a branch instruction by predicting a branch instruction destination of a conditional branch instruction and controlling the next instruction code by an instruction fetch operation after the branch instruction code. The present invention relates to a microcomputer and a conditional branch instruction fetch control method for preventing a decrease in execution performance caused by a computer time loss.

【0002】[0002]

【従来の技術】図9は第1従来技術のマイクロコンピュ
ータ504のブロック構成図である。図9で示す第1従
来技術のマイクロコンピュータ504では、プログラム
格納メモリ500より命令コードを読み出し(命令フェ
ッチ)し、命令キュー501に格納する。次に処理され
る命令デコーダ502が動作している間、命令フェッチ
を繰り返し、命令デコーダ502が処理を終了すると、
命令キュー501に命令フェッチされた順序に従って、
命令デコーダ502により解読され、命令実行部503
を経由して命令が実行される。
2. Description of the Related Art FIG. 9 is a block diagram of a microcomputer 504 of the first prior art. In the microcomputer 504 of the first related art shown in FIG. 9, an instruction code is read (instruction fetch) from the program storage memory 500 and stored in the instruction queue 501. While the instruction decoder 502 to be processed next is operating, the instruction fetch is repeated, and when the instruction decoder 502 ends the processing,
According to the order of instruction fetch in the instruction queue 501,
Decoded by the instruction decoder 502, the instruction execution unit 503
The instruction is executed via.

【0003】また、近年、マイクロコンピュータ処理の
高速化に伴い、特開平1−193939号公報に記載の
技術(第2従来技術)や特開平4−195630号公報
に記載の技術(第3従来技術)のように、上記回路を基
本としたマイクロコンピュータを高速に動作させるため
の回路も提案されている。次に、それらについて説明す
る。
In recent years, with the increase in the speed of microcomputer processing, the technology described in Japanese Patent Application Laid-Open No. 1-193939 (second conventional technology) and the technology described in Japanese Patent Application Laid-Open No. 4-195630 (third conventional technology) have been proposed. ), A circuit for operating a microcomputer based on the above circuit at high speed has been proposed. Next, they will be described.

【0004】図10は特開平1−193939号公報
(第2従来技術)に記載されている無条件分岐に対する
マイクロコンピュータの高速化を目的とした回路の構成
図である。図10を参照すると、命令格納メモリ101
は、命令コード102を格納するメモリである。各命令
コード102は、命令コード102と別に、分岐命令コ
ードであることを示す分岐命令検出フラグ103を有
し、分岐命令には”1”に、それ以外の命令には”0”
に設定されている。命令キュー109は、データバス1
04および入力ポート105を介して命令格納メモリ1
01より命令コード102を順次格納する。キューカウ
ンタ110は、命令キュー109の命令コード格納状態
をカウンタ値で示すためのカウンタであり、命令フェッ
チ要求制御回路111に入力する。命令コード102が
命令キュー109に格納されると、分岐命令検出信号線
106を介して、分岐命令検出フラグ103が、フリッ
プフロップ113に入力される。フリップフロップ11
3より出力され、インバータ116で反転された結果と
命令フェッチ要求制御回路111からの出力の論理積を
アンドゲート112により行い、フェッチ要求信号11
4、命令フェッチ回路115に入力する。
FIG. 10 is a block diagram of a circuit for increasing the speed of a microcomputer for unconditional branches described in Japanese Patent Application Laid-Open No. 1-193939 (second prior art). Referring to FIG. 10, the instruction storage memory 101
Is a memory for storing the instruction code 102. Each instruction code 102 has, separately from the instruction code 102, a branch instruction detection flag 103 indicating that the instruction code is a branch instruction code, and is "1" for a branch instruction and "0" for other instructions.
Is set to The instruction queue 109 is connected to the data bus 1
04 and the instruction storage memory 1 via the input port 105
Instruction codes 102 are stored sequentially from 01. The queue counter 110 is a counter for indicating the instruction code storage state of the instruction queue 109 by a counter value, and is input to the instruction fetch request control circuit 111. When the instruction code 102 is stored in the instruction queue 109, the branch instruction detection flag 103 is input to the flip-flop 113 via the branch instruction detection signal line 106. Flip-flop 11
3 and the result inverted by the inverter 116 and the output from the instruction fetch request control circuit 111 are ANDed by the AND gate 112, and the fetch request signal 11
4. Input to the instruction fetch circuit 115.

【0005】次に、図10を参照して第2従来技術の動
作を説明する。まず、命令コード102が、命令格納メ
モリ101よりデータバス104および入力ポート10
5を介して命令キュー109に格納され、命令デコーダ
へ出力される。キューカウンタ110は命令キュー10
9に空きがあると、命令フェッチ要求制御回路111
に”1”を、それ以外は”0”を出力する。
Next, the operation of the second prior art will be described with reference to FIG. First, the instruction code 102 is transmitted from the instruction storage memory 101 to the data bus 104 and the input port 10.
5 is stored in the instruction queue 109 and output to the instruction decoder. The queue counter 110 stores the instruction queue 10
9 has an empty space, the instruction fetch request control circuit 111
"1", and "0" otherwise.

【0006】無条件分岐命令以外の命令コード102を
命令キュー109に命令フェッチした場合、分岐命令検
出信号線106が“0”となる。インバータ116から
アンドゲート112への入力は”1”となり、命令フェ
ッチ要求制御回路111からの入力に応じて、命令フェ
ッチ回路115が命令フェッチ動作を行う。
When an instruction code 102 other than an unconditional branch instruction is fetched into the instruction queue 109, the branch instruction detection signal line 106 becomes "0". The input from the inverter 116 to the AND gate 112 becomes “1”, and the instruction fetch circuit 115 performs an instruction fetch operation according to the input from the instruction fetch request control circuit 111.

【0007】また、無条件分岐命令コードが命令キュー
109に命令フェッチされた場合、分岐検出信号線10
6が”1”となる。フリップフロップ113は”1”に
セットされ、インバータ116からアンドゲート112
への入力が“0”となるため、命令フェッチ要求制御回
路111からの入力に関わらず、命令フェッチ要求信号
114は”0”となる。前記より、命令フェッチ回路1
15は命令フェッチ動作を停止し、命令キュー109に
は無条件分岐命令コードを命令フェッチした状態とな
る。これ以降、命令フェッチ動作を停止した状態で、命
令キュー109内の命令コード102が順次実行され、
前記の無条件分岐命令が実行されると、命令フェッチ動
作を再開し、分岐先命令コード102を命令フェッチす
る。
When an unconditional branch instruction code is fetched into the instruction queue 109, the branch detection signal line 10
6 becomes “1”. The flip-flop 113 is set to “1”, and the inverter 116 supplies the AND gate 112
Becomes "0", the instruction fetch request signal 114 becomes "0" regardless of the input from the instruction fetch request control circuit 111. From the above, the instruction fetch circuit 1
Reference numeral 15 denotes a state in which the instruction fetch operation is stopped, and an unconditional branch instruction code is fetched into the instruction queue 109. Thereafter, while the instruction fetch operation is stopped, the instruction codes 102 in the instruction queue 109 are sequentially executed,
When the unconditional branch instruction is executed, the instruction fetch operation is resumed, and the branch destination instruction code 102 is fetched.

【0008】無条件分岐命令の命令フェッチから実行さ
れるまでの間、命令コード102がフェッチされていな
いため、マイクロコンピュータは命令を実行しなくな
る。
Since the instruction code 102 has not been fetched from the instruction fetch of the unconditional branch instruction until the instruction is executed, the microcomputer does not execute the instruction.

【0009】図11は特開平4−195630号公報
(第3従来技術)に記載されいる命令フェッチ部の内部
構成を示すブロック図である。図11を参照すると、第
3従来技術に記載されている命令フェッチ部は、外部メ
モリからフェッチした命令コード202A、分岐命令時
の分岐初期化信号205B、比較回路のCAM206、
分岐命令の分岐先アドレスを出力するCAバス261、
分岐命令がフェッチされたことを示す分岐命令検出フラ
グ206A、命令キュー207、セレクタ207A、過
去の分岐先アドレスを登録する分岐先アドレス登録メモ
リ208Aを有し、CAバス261の入力とCAM20
6により比較できる構成でされている。
FIG. 11 is a block diagram showing the internal configuration of an instruction fetch unit described in Japanese Patent Application Laid-Open No. 4-195630 (third prior art). Referring to FIG. 11, an instruction fetch unit described in the third related art includes an instruction code 202A fetched from an external memory, a branch initialization signal 205B at the time of a branch instruction, a CAM 206 of a comparison circuit,
A CA bus 261 for outputting a branch destination address of a branch instruction;
It has a branch instruction detection flag 206A indicating that a branch instruction has been fetched, an instruction queue 207, a selector 207A, and a branch destination address registration memory 208A for registering past branch destination addresses.
6, and can be compared.

【0010】208Bは分岐先アドレス登録メモリ20
8Aに対応する分岐命令を登録する分岐命令登録メモ
リ、208Cはアドレス不一致信号、208DはCAバ
ス261の値と分岐先アドレス登録メモリ208Aの比
較の結果を出力するヒット信号、209は分岐先アドレ
ス登録メモリ208Aおよび分岐命令登録メモリ208
Bの示すメモリの有効無効を示す登録有効フラグ、21
0はフェッチすべき命令のアドレスを示すアドレスカウ
ンタである。
Reference numeral 208B denotes a branch destination address registration memory 20
A branch instruction registration memory for registering a branch instruction corresponding to 8A, 208C is an address mismatch signal, 208D is a hit signal for outputting the result of comparison between the value of the CA bus 261 and the branch destination address registration memory 208A, and 209 is a branch destination address registration Memory 208A and branch instruction registration memory 208
A registration valid flag indicating whether the memory indicated by B is valid or invalid, 21
0 is an address counter indicating the address of the instruction to be fetched.

【0011】次に第3従来技術の動作について説明す
る。本実施の形態では、リセット実行後、外部メモリよ
り命令フェッチを開始すると、命令キュー207にセレ
クタ207Aを介して命令コード202Aが入力され、
同時にCAM206にも入力され、あらかじめCAM2
06に登録されていた無条件分岐命令のコードと入力さ
れたコードとを比較する。
Next, the operation of the third prior art will be described. In the present embodiment, when the instruction fetch is started from the external memory after the reset, the instruction code 202A is input to the instruction queue 207 via the selector 207A,
At the same time, it is also input to CAM 206,
The code of the unconditional branch instruction registered in 06 is compared with the input code.

【0012】この比較動作は命令フェッチされる毎に繰
り返される。CAM206により比較され、無条件分岐
命令が初めて命令フェッチされると、分岐命令検出フラ
グ206Aがセットされると同時に、分岐先アドレス登
録メモリ208Aにも登録する。その後、無条件分岐が
実行されると、分岐初期化信号205Bにより命令キュ
ー207が初期化される。
This comparison operation is repeated every time an instruction is fetched. When the comparison is performed by the CAM 206 and the unconditional branch instruction is fetched for the first time, the branch instruction detection flag 206A is set and registered in the branch destination address registration memory 208A. Thereafter, when the unconditional branch is executed, the instruction queue 207 is initialized by the branch initialization signal 205B.

【0013】次に第3従来技術において、以前に実行さ
れた無条件分岐命令が外部メモリより命令フェッチされ
た場合の動作について説明する。無条件分岐命令が命令
キュー207にフェッチされると同時に、CAM206
に入力そして登録されたコードとを比較される。分岐命
令検出フラグ206Aがセットされ、登録されている分
岐先アドレス登録メモリ208Aおよび分岐命令登録メ
モリ208Bから分岐先命令を読み出す。読み出された
分岐先アドレス登録メモリ208Aのアドレスをインク
リメントし、アドレスカウンタ210に出力すること
で、分岐先命令の次の命令が命令フェッチされる。
Next, the operation of the third prior art in the case where a previously executed unconditional branch instruction is fetched from an external memory will be described. As soon as the unconditional branch instruction is fetched into the instruction queue 207, the CAM 206
Is entered and compared with the registered code. The branch instruction detection flag 206A is set, and the branch destination instruction is read from the registered branch destination address registration memory 208A and the registered branch instruction registration memory 208B. By incrementing the read address of the branch destination address registration memory 208A and outputting it to the address counter 210, the instruction next to the branch destination instruction is fetched.

【0014】一方、分岐命令登録メモリ208Bから読
み出された分岐先命令はセレクタ207Aを介して命令
キュー207に入力される。これにより、命令キュー2
07を初期化することなく、無条件分岐の命令コード2
02Aにより連続して命令が実行される。
On the other hand, the branch destination instruction read from the branch instruction registration memory 208B is input to the instruction queue 207 via the selector 207A. Thereby, the instruction queue 2
Instruction code 2 of unconditional branch without initializing 07
02A executes instructions continuously.

【0015】[0015]

【発明が解決しようとする課題】しかしながら、上記従
来技術のマイクロコンピュータにおいて分岐命令を実行
すると、命令キュー内の命令コードを無効にして、改め
て分岐命令先の命令コードを命令フェッチするため、マ
イクロコンピュータのタイムロスが発生し、処理性能が
低下するという問題点があった。
However, when a branch instruction is executed in the above-mentioned prior art microcomputer, the instruction code in the instruction queue is invalidated and the instruction code of the branch instruction destination is fetched again. However, there is a problem that a time loss occurs and the processing performance decreases.

【0016】本発明は斯かる問題点を鑑みてなされたも
のであり、その目的とするところは、条件分岐命令の分
岐命令先を予測し分岐命令コード後の命令フェッチ動作
で次の命令コードを制御することにより分岐命令による
マイクロコンピュータのタイムロスが引き起こす実行性
能の低下を防止するマイクロコンピュータおよび条件分
岐命令フェッチ制御方法を提供する点にある。
SUMMARY OF THE INVENTION The present invention has been made in view of such a problem, and an object of the present invention is to predict a branch instruction destination of a conditional branch instruction and to execute the next instruction code by an instruction fetch operation after the branch instruction code. It is another object of the present invention to provide a microcomputer and a conditional branch instruction fetch control method for controlling the microcomputer to prevent a decrease in execution performance caused by a time loss of the microcomputer due to the branch instruction.

【0017】[0017]

【課題を解決するための手段】請求項1に記載の発明の
要旨は、命令コードを格納する命令キューと、命令をフ
ェッチする命令フェッチ部と、命令コードを解読する命
令デコーダ部と、命令を実行する演算・命令実行部を有
し、条件分岐命令の分岐命令先を予測し分岐命令コード
後の命令フェッチ動作で次の命令コードを制御すること
により分岐命令によるマイクロコンピュータのタイムロ
スが引き起こす実行性能の低下を防止するマイクロコン
ピュータであって、過去に実行した分岐命令のプログラ
ムカウンタ値、当該分岐命令に対する分岐命令先アドレ
ス、および分岐先に分岐した回数を示す履歴カウンタ値
を条件分岐情報として記録する手段を有することを特徴
とするマイクロコンピュータに存する。また請求項2に
記載の発明の要旨は、前記命令キューへのプリフェッチ
動作時に、分岐情報である前記分岐命令のプログラムカ
ウンタ値とプリフェッチカウンタ値を比較することで当
該分岐命令を検出する手段を有することを特徴とする請
求項1に記載のマイクロコンピュータに存する。また請
求項3に記載の発明の要旨は、前記条件分岐命令を前記
命令キューへプリフェッチした場合に、前記条件分岐情
報を基に今回分岐する条件分岐先アドレスを予測する分
岐予測回路を有することを特徴とする請求項1に記載の
マイクロコンピュータに存する。また請求項4に記載の
発明の要旨は、前記分岐予測回路は条件付き分岐を用い
るプログラムの分岐特徴から分岐先を予測する手段を有
することを特徴とする請求項3に記載のマイクロコンピ
ュータに存する。また請求項5に記載の発明の要旨は、
命令コードを格納する命令キューと、命令をフェッチす
る命令フェッチ部と、命令コードを解読する命令デコー
ダ部と、命令を実行する演算・命令実行部を有し、条件
分岐命令の分岐命令先を予測し分岐命令コード後の命令
フェッチ動作で次の命令コードを制御することにより分
岐命令によるマイクロコンピュータのタイムロスが引き
起こす実行性能の低下を防止するマイクロコンピュータ
に対して、過去に実行した分岐命令のプログラムカウン
タ値、当該分岐命令に対する分岐命令先アドレス、およ
び分岐先に分岐した回数を示す履歴カウンタ値を条件分
岐情報として記録する工程を有することを特徴とする条
件分岐命令フェッチ制御方法に存する。また請求項6に
記載の発明の要旨は、前記命令キューへのプリフェッチ
動作時に、分岐情報である前記分岐命令のプログラムカ
ウンタ値とプリフェッチカウンタ値を比較することで当
該分岐命令を検出する工程を有することを特徴とする請
求項5に記載の条件分岐命令フェッチ制御方法に存す
る。また請求項7に記載の発明の要旨は、前記条件分岐
命令を前記命令キューへプリフェッチした場合に、前記
条件分岐情報を基に今回分岐する条件分岐先アドレスを
予測する分岐予測工程を有することを特徴とする請求項
5に記載の条件分岐命令フェッチ制御方法に存する。ま
た請求項8に記載の発明の要旨は、前記分岐予測工程
は、条件付き分岐を用いるプログラムの分岐特徴から、
分岐先を予測する工程を有することを特徴とする請求項
7に記載の条件分岐命令フェッチ制御方法に存する。
The gist of the present invention is that an instruction queue for storing an instruction code, an instruction fetch unit for fetching an instruction, an instruction decoder unit for decoding an instruction code, and an instruction Execution performance that has an operation / instruction execution unit to execute, predicts the branch instruction destination of a conditional branch instruction, and controls the next instruction code in the instruction fetch operation after the branch instruction code, thereby causing the microcomputer to lose time due to the branch instruction A program counter value of a branch instruction executed in the past, a branch instruction destination address for the branch instruction, and a history counter value indicating the number of times of branching to the branch destination are recorded as conditional branch information. The present invention resides in a microcomputer having means. According to another aspect of the present invention, there is provided a means for detecting a branch instruction by comparing a program counter value of the branch instruction, which is branch information, with a prefetch counter value during a prefetch operation to the instruction queue. The microcomputer according to claim 1, wherein: The gist of the invention described in claim 3 is that, when the conditional branch instruction is prefetched into the instruction queue, a branch predicting circuit for predicting a conditional branch destination address to branch this time based on the conditional branch information is provided. A microcomputer according to claim 1 characterized by the above-mentioned. According to a fourth aspect of the present invention, there is provided the microcomputer according to the third aspect, wherein the branch prediction circuit includes a unit that predicts a branch destination from a branch feature of a program using conditional branch. . The gist of the invention described in claim 5 is that
It has an instruction queue for storing instruction codes, an instruction fetch unit for fetching instructions, an instruction decoder unit for decoding instruction codes, and an operation / instruction execution unit for executing instructions, and predicts a branch instruction destination of a conditional branch instruction. A program counter for a previously executed branch instruction for a microcomputer that controls the next instruction code in the instruction fetch operation after the branch instruction code to prevent the microcomputer from deteriorating execution performance caused by the time loss of the microcomputer due to the branch instruction A conditional branch instruction fetch control method characterized by comprising a step of recording, as conditional branch information, a value, a branch instruction destination address for the branch instruction, and a history counter value indicating the number of branches to the branch destination. The gist of the invention described in claim 6 includes a step of detecting a branch instruction by comparing a program counter value of the branch instruction, which is branch information, with a prefetch counter value during a prefetch operation to the instruction queue. A conditional branch instruction fetch control method according to claim 5, characterized in that: The gist of the invention described in claim 7 is that, when the conditional branch instruction is prefetched into the instruction queue, a branch prediction step of predicting a conditional branch destination address to branch this time based on the conditional branch information is provided. A conditional branch instruction fetch control method according to claim 5 is provided. The gist of the invention described in claim 8 is that the branch predicting step is characterized by the following:
8. The method according to claim 7, further comprising a step of predicting a branch destination.

【0018】[0018]

【発明の実施の形態】本発明は、分岐命令によるマイク
ロコンピュータのタイムロスが引き起こす実行性能の低
下を防止することを目的とするものであって、分岐情報
を記録する分岐情報RAMと分岐先を予測する大小判定
回路を有し、条件分岐命令の分岐命令先を予測し分岐命
令コード後の命令フェッチ動作で次の命令コードを制御
することを特徴としている。
SUMMARY OF THE INVENTION An object of the present invention is to prevent a decrease in execution performance caused by a time loss of a microcomputer due to a branch instruction, and to provide a branch information RAM for recording branch information and a prediction of a branch destination. The circuit is characterized by predicting a branch instruction destination of a conditional branch instruction and controlling the next instruction code by an instruction fetch operation after the branch instruction code.

【0019】分岐情報RAMは、過去に実行された条件
分岐命令のプログラムカウンタ値、分岐先アドレス、履
歴カウンタそして判定結果情報を分岐情報として分岐情
報RAMに記録する。大小判定回路は、条件分岐命令フ
ェッチ時に、前記の分岐情報である分岐命令アドレスR
AMと履歴カウンタを用いて、条件分岐命令の分岐先ア
ドレスを予測し、当該分岐先アドレスをプログラムフェ
ッチカウンタに設定する。その結果、分岐命令コードの
次のコードに、分岐命令先の命令コードが、命令キュー
3(PreFetch Memory)で命令フェッチ
され、分岐命令実行後に命令フェッチし直す処理が不必
要となり、コンピュータは連続して処理を実行できるよ
うになるといった効果を奏する。以下、図面に基づき本
発明の各種実施の形態を説明する。
The branch information RAM records the program counter value, the branch destination address, the history counter, and the determination result information of the conditional branch instruction executed in the past as branch information in the branch information RAM. When the conditional branch instruction is fetched, the magnitude determining circuit determines whether or not the branch instruction address R, which is the aforementioned branch information,
The branch destination address of the conditional branch instruction is predicted using the AM and the history counter, and the branch destination address is set in the program fetch counter. As a result, the instruction code following the branch instruction code is fetched with the instruction code of the branch instruction destination in the instruction queue 3 (PreFetch Memory), and there is no need to re-fetch the instruction after executing the branch instruction. This makes it possible to execute the processing. Hereinafter, various embodiments of the present invention will be described with reference to the drawings.

【0020】図1は本発明の第1の実施の形態にかかる
マイクロコンピュータ30のシステム構成図である。図
1において、1はデータバス(DataBus)、2は
アドレスバス(AdressBus)、3は命令キュー
(PreFetch Memory)、4は命令フェッ
チ部(Fetch)、5は命令デコーダ部(Decod
e)、6は演算・命令実行部(ALU)、7はプログラ
ムカウンタ(PC)、8はプログラムフェッチカウンタ
(PFC)、9はテーブル検出回路、10はセレクタ
(SEL)、11は分岐命令アドレスRAM、12は分
岐先アドレスラッチ回路、13は分岐情報RAM、14
は履歴カウンタ、15はセレクタ(SEL)、16はP
FC分岐PC値比較回路、17は大小判定回路、18は
セレクタ(SEL)、19は判定結果情報、20は分岐
先比較回路、30はマイクロコンピュータを示してい
る。
FIG. 1 is a system configuration diagram of a microcomputer 30 according to the first embodiment of the present invention. In FIG. 1, 1 is a data bus (Data Bus), 2 is an address bus (Address Bus), 3 is an instruction queue (PreFetch Memory), 4 is an instruction fetch unit (Fetch), and 5 is an instruction decoder unit (Decode).
e) and 6 are operation / instruction execution units (ALU), 7 is a program counter (PC), 8 is a program fetch counter (PFC), 9 is a table detection circuit, 10 is a selector (SEL), and 11 is a branch instruction address RAM. , 12 are branch destination address latch circuits, 13 is branch information RAM, 14
Is a history counter, 15 is a selector (SEL), 16 is P
FC branch PC value comparison circuit, 17 is a magnitude judgment circuit, 18 is a selector (SEL), 19 is judgment result information, 20 is a branch destination comparison circuit, and 30 is a microcomputer.

【0021】図1を参照すると、本実施の形態のマイク
ロコンピュータ30は、プログラムが格納されているメ
モリと接続されるアドレスバス2(AdressBu
s)とデータバス1(DataBus)と、先読み先出
し方式で命令コードを格納する命令キュー3(PreF
etch Memory)と、命令フェッチ部4(Fe
tch)と、命令デコーダ部5(Decode)と、演
算・命令実行部6(ALU)と、プログラムカウンタ7
(PC)と、命令キュー3(PreFetchMemo
ry)に命令フェッチされる命令コードのアドレスをア
ドレスバス2(AdressBus)に出力するプログ
ラムフェッチカウンタ8(PFC)と、命令デコーダ部
5(Decode)で解読された分岐命令の分岐先アド
レスを格納する分岐先アドレスラッチ回路12と、大小
判定回路17と、PFC分岐PC値比較回路16と、テ
ーブル検出回路9と、分岐命令アドレスRAM11と、
履歴カウンタ14や前回の分岐先を示す判定結果情報1
9と、分岐情報RAM13そして分岐先比較回路20を
備えている。
Referring to FIG. 1, a microcomputer 30 of the present embodiment has an address bus 2 (AddressBus) connected to a memory storing a program.
s), a data bus 1 (DataBus), and an instruction queue 3 (PreF
etch Memory) and the instruction fetch unit 4 (Fe
tch), an instruction decoder unit 5 (Decode), an operation / instruction execution unit 6 (ALU), and a program counter 7
(PC) and instruction queue 3 (PreFetchMemo)
ry) stores a program fetch counter 8 (PFC) for outputting an address of an instruction code to be fetched to the address bus 2 (Address Bus) and a branch destination address of a branch instruction decoded by the instruction decoder unit 5 (Decode). A branch destination address latch circuit 12, a magnitude determination circuit 17, a PFC branch PC value comparison circuit 16, a table detection circuit 9, a branch instruction address RAM 11,
Determination result information 1 indicating the history counter 14 and the previous branch destination
9, a branch information RAM 13 and a branch destination comparison circuit 20.

【0022】分岐情報RAM13は、過去に実行された
分岐命令のプログラムカウンタ値(PC値)、分岐先の
アドレス、分岐回数を示す履歴カウンタ14および判定
結果情報19を含む分岐情報を記録するRAM(随時書
き込み読み出しメモリ)である。
The branch information RAM 13 stores a program counter value (PC value) of a previously executed branch instruction, an address of a branch destination, a history counter 14 indicating the number of branches, and a RAM for recording branch information including determination result information 19. Write / read memory as needed).

【0023】大小判定回路17は、予測した分岐先アド
レスをプログラムフェッチカウンタ8(PFC)に設定
するように、セレクタ18(SEL)を制御する。当該
切り替えは分岐情報RAM13の履歴カウンタ14によ
り、過去に分岐した回数が等しい、もしくはその分岐回
数の差が1以内の場合は、前回分岐予測した分岐先アド
レスとは逆の分岐先アドレスをテーブル検出回路9も設
定するようにセレクタ18(SEL)を切り替える。そ
れ以外の場合は、過去に分岐した回数の多い分岐先アド
レスをプログラムフェッチカウンタ8(PFC)に設定
するようにセレクタ18(SEL)を切り替える。また
セレクタ18(SEL)の切り替えと同時に、判定結果
情報19に大小判定結果が記録される。
The magnitude determination circuit 17 controls the selector 18 (SEL) to set the predicted branch destination address in the program fetch counter 8 (PFC). In the case of the switching, the history counter 14 of the branch information RAM 13 detects, in the case where the number of times of branching in the past is equal, or the difference of the number of times of branching is within 1, detects a branch destination address opposite to the previously predicted branch destination address in the table. The selector 18 (SEL) is switched so that the circuit 9 is also set. In other cases, the selector 18 (SEL) is switched so that a branch destination address having a large number of branches in the past is set in the program fetch counter 8 (PFC). At the same time as the selector 18 (SEL) is switched, the magnitude determination result is recorded in the determination result information 19.

【0024】テーブル検出回路9は、分岐命令実行時に
現在のプログラムカウンタ値(PC値)と分岐命令アド
レスRAM11内の分岐のプログラムカウンタ値(PC
値)を比較する。一致した場合は、分岐先の履歴カウン
タ14をインクリメントする。また不一致の場合は、現
在のプログラムカウンタ値(PC値)および分岐先アド
レスラッチ回路12によりラッチされた分岐先アドレス
を分岐情報RAM13に記録し、履歴カウンタ14を初
期化し、分岐先の履歴カウンタ14をインクリメントす
る。
When the branch instruction is executed, the table detection circuit 9 compares the current program counter value (PC value) with the branch program address (PC value) in the branch instruction address RAM 11.
Value). If they match, the branch destination history counter 14 is incremented. If they do not match, the current program counter value (PC value) and the branch destination address latched by the branch destination address latch circuit 12 are recorded in the branch information RAM 13, the history counter 14 is initialized, and the branch destination history counter 14 Is incremented.

【0025】PFC分岐PC値比較回路16は、現在の
プログラムフェッチカウンタ値(PFC値)と分岐情報
RAM13の分岐命令アドレスRAM11とを比較す
る。比較結果、一致した場合は、大小判定回路17によ
り分岐情報RAM13から選択された分岐先アドレスを
プログラムフェッチカウンタ8(PFC)に設定する。
また不一致の場合は、現在のプログラムフェッチカウン
タ8(PFC)の値をインクリメントする。
The PFC branch PC value comparison circuit 16 compares the current program fetch counter value (PFC value) with the branch instruction address RAM 11 of the branch information RAM 13. As a result of the comparison, if they match, the branch destination address selected from the branch information RAM 13 by the magnitude determination circuit 17 is set in the program fetch counter 8 (PFC).
If they do not match, the current value of the program fetch counter 8 (PFC) is incremented.

【0026】分岐先比較回路20は、条件分岐命令が演
算・命令実行部6(ALU)で実行された場合に、当該
条件分岐命令をプリフェッチ時に予測した分岐予測結果
を示す判定結果情報19と、分岐命令の実行結果を比較
する。比較結果が不一致の場合のみ、命令デコーダ部5
(Decode)、命令フェッチ部4(Fetch)そ
して命令キュー3(PreFetch Memory)
にある命令コードを初期化し、条件分岐命令の分岐先ア
ドレスをプログラムフェッチカウンタ8(PFC)に設
定する。
When the conditional branch instruction is executed by the operation / instruction execution unit 6 (ALU), the branch destination comparing circuit 20 determines the branch result obtained by predicting the conditional branch instruction at the time of prefetching. Compare the execution results of the branch instructions. Only when the comparison result does not match, the instruction decoder unit 5
(Decode), instruction fetch unit 4 (Fetch) and instruction queue 3 (PreFetch Memory)
Is set, and the branch destination address of the conditional branch instruction is set in the program fetch counter 8 (PFC).

【0027】次に図1を用いて本実施形態の主な動作に
ついて説明する。図1を参照すると、本実施の形態で
は、プログラムフェッチカウンタ8(PFC)示すプロ
グラムカウンタ値(PC値)がアドレスバス2(Adr
essBus)に出力され、当該アドレスに記憶されて
いる命令コードがデータバス1(DataBus)を介
して命令キュー3(PreFetch Memory)
にプリフェッチされる。毎回、プログラムフェッチカウ
ンタ8(PFC)がアドレスバス2(AdressBu
s)にプログラムカウンタ値(PC値)を出力する毎
に、PFC分岐PC値比較回路16により分岐命令アド
レスRAM11内のプログラムカウンタ値(PC値)と
プログラムフェッチカウンタ8(PFC)の値を比較す
る。続いて、命令キュー3(PreFetch Mem
ory)から命令コードが命令フェッチ部4(Fetc
h)を介して、命令デコーダ部5(Decode)に入
力されて解読され、演算・命令実行部6(ALU)で実
行される。
Next, the main operation of this embodiment will be described with reference to FIG. Referring to FIG. 1, in the present embodiment, a program counter value (PC value) indicated by a program fetch counter 8 (PFC) is stored in an address bus 2 (Adr).
essBus), and the instruction code stored at the address is stored in the instruction queue 3 (PreFetch Memory) via the data bus 1 (DataBus).
Is prefetched to Each time, the program fetch counter 8 (PFC) sets the address bus 2 (AddressBus).
s), every time the program counter value (PC value) is output, the PFC branch PC value comparison circuit 16 compares the program counter value (PC value) in the branch instruction address RAM 11 with the value of the program fetch counter 8 (PFC). . Subsequently, the instruction queue 3 (PreFetch Mem)
ory) from the instruction fetch unit 4 (Fetc)
h), it is input to the instruction decoder unit 5 (Decode), decoded, and executed by the operation / instruction execution unit 6 (ALU).

【0028】上記一連の詳細な処理として、分岐予測に
用いる分岐情報を取得する処理、分岐先予測を行う処理
そして分岐予測を確認する処理があり、それぞれの動作
について下記で説明する。
As a series of detailed processes, there are a process of acquiring branch information used for branch prediction, a process of performing branch destination prediction, and a process of confirming branch prediction. The respective operations will be described below.

【0029】まず分岐情報を取得する処理について、図
2を用いて説明する。図2は本発明の第1の実施の形態
にかかるマイクロコンピュータ30の分岐情報取得に関
する回路の構成図であって、図1で示すブロック構成図
より、分岐情報取得に必要となるブロックのみを選出し
たブロック構成図である。まず最初に、条件分岐命令が
命令デコーダ部5(Decode)で解読され、演算・
命令実行部6(ALU)で実行された場合の動作につい
て説明する。
First, the process of acquiring branch information will be described with reference to FIG. FIG. 2 is a block diagram of a circuit related to branch information acquisition of the microcomputer 30 according to the first embodiment of the present invention. Only blocks necessary for branch information acquisition are selected from the block diagram shown in FIG. FIG. First, the conditional branch instruction is decoded by the instruction decoder unit 5 (Decode), and the operation
The operation when executed by the instruction execution unit 6 (ALU) will be described.

【0030】図2を参照すると、本実施の形態では、命
令デコーダ部5(Decode)で解読された命令コー
ドが条件分岐命令であると判断されると、分岐先アドレ
スラッチ回路12に解読された条件分岐先アドレスがラ
ッチされる。当該条件分岐命令が演算・命令実行部6
(ALU)で実行されると、テーブル検出回路9が分岐
命令アドレスRAM11内の条件分岐命令のプログラム
カウンタ値(PC値)と現在のプログラムカウンタ7
(PC)の値を比較する。
Referring to FIG. 2, in the present embodiment, when the instruction code decoded by the instruction decoder unit 5 (Decode) is determined to be a conditional branch instruction, the instruction code is decoded by the branch destination address latch circuit 12. The conditional branch destination address is latched. The conditional branch instruction is executed by the operation / instruction execution unit 6
(ALU), the table detection circuit 9 compares the program counter value (PC value) of the conditional branch instruction in the branch instruction address RAM 11 with the current program counter 7
Compare the value of (PC).

【0031】前記比較の結果、プログラムカウンタ値
(PC値)が一致しない場合、すなわち、以前に実行し
たことのない条件分岐命令が実行された場合は、現在の
プログラムカウンタ値(PC値)と分岐先アドレスラッ
チ回路12にラッチされた分岐先のプログラムカウンタ
値(PC値)が、分岐情報RAM13の分岐命令アドレ
スRAM11と分岐先のプログラムカウンタ値(PC
値)にそれぞれ記録される。同時に、それに対応する履
歴カウンタ14をクリアし、今回分岐した分岐先の履歴
カウンタ14をカウントアップする。この一連の処理に
より、条件分岐命令先アドレスの予測に必要となる情報
を新たに分岐情報RAM13に記録される。
As a result of the comparison, if the program counter value (PC value) does not match, that is, if a conditional branch instruction that has not been executed before is executed, the current program counter value (PC value) is branched. The branch destination program counter value (PC value) latched in the destination address latch circuit 12 is stored in the branch instruction address RAM 11 of the branch information RAM 13 and the branch destination program counter value (PC value).
Value). At the same time, the corresponding history counter 14 is cleared, and the history counter 14 at the branch destination this time is counted up. Through this series of processing, information necessary for predicting the conditional branch instruction destination address is newly recorded in the branch information RAM 13.

【0032】一方、テーブル検出回路9の比較結果が一
致した場合は、一致した分岐命令のプログラムカウンタ
値(PC値)に対応する履歴カウンタ14をインクリメ
ントする。これにより、条件分岐命令の分岐先予測を行
うに必要な情報が記録される。
On the other hand, when the comparison results of the table detection circuit 9 match, the history counter 14 corresponding to the program counter value (PC value) of the matching branch instruction is incremented. As a result, information necessary for predicting the branch destination of the conditional branch instruction is recorded.

【0033】次に分岐予測を行う動作について図3を用
いて説明する。図3は本発明の第1の実施の形態にかか
るマイクロコンピュータ30の分岐予測に関する回路の
構成図であって、図1で示すブロック構成図より、分岐
予測に必要となるブロックのみを選出したブロック構成
図である。図3を参照すると、本実施の形態では、プロ
グラムフェッチカウンタ8(PFC)がアドレスバス2
(AdressBus)にプログラムカウンタ値(PC
値)を出力する毎に、PFC分岐PC値比較回路16を
用いて、分岐命令アドレスRAM11内のプログラムカ
ウンタ値(PC値)と現在のプログラムフェッチカウン
タ8(PFC)の値を比較する。
Next, the operation of performing branch prediction will be described with reference to FIG. FIG. 3 is a block diagram of a circuit relating to branch prediction of the microcomputer 30 according to the first embodiment of the present invention, in which only blocks necessary for branch prediction are selected from the block configuration diagram shown in FIG. It is a block diagram. With reference to FIG. 3, in the present embodiment, the program fetch counter 8 (PFC)
(AddressBus) contains the program counter value (PC
Each time the value is output, the PFC branch PC value comparison circuit 16 is used to compare the program counter value (PC value) in the branch instruction address RAM 11 with the current value of the program fetch counter 8 (PFC).

【0034】PFC分岐PC値比較回路16による比較
結果が一致した場合は、一致した分岐命令アドレスRA
M11のプログラムカウンタ値(PC値)に対応する履
歴カウンタ14の値が大小判定回路17に入力される。
If the comparison results by the PFC branch PC value comparison circuit 16 match, the matched branch instruction address RA
The value of the history counter 14 corresponding to the program counter value (PC value) of M11 is input to the magnitude determination circuit 17.

【0035】続いて、大小判定回路17を用いて、予測
された分岐情報RAM13内の分岐先アドレスを、大小
判定回路17がセレクタ18(SEL)を制御し、プロ
グラムフェッチカウンタ8(PFC)に設定する。同時
に、大小判定回路17により予測された結果は判定結果
情報19にも記録される。
Subsequently, using the magnitude determination circuit 17, the predicted branch destination address in the branch information RAM 13 is set in the program fetch counter 8 (PFC) by controlling the selector 18 (SEL). I do. At the same time, the result predicted by the magnitude determination circuit 17 is also recorded in the determination result information 19.

【0036】PFC分岐PC値比較回路16による比較
結果が不一致の場合は、現在のプログラムフェッチカウ
ンタ8(PFC)の値をインクリメントする。これによ
り、条件分岐命令の次の命令コードに、予測された分岐
先の命令コードが命令フェッチされ、条件分岐命令実行
時にその予測が一致すると、分岐先の命令コードをフェ
ッチすることなく連続してマイクロコンピュータ30が
動作できる。
If the comparison result by the PFC branch PC value comparison circuit 16 does not match, the current value of the program fetch counter 8 (PFC) is incremented. As a result, the predicted instruction code of the branch destination is instruction-fetched to the instruction code following the conditional branch instruction, and if the prediction matches when the conditional branch instruction is executed, the instruction code of the branch destination is continuously fetched without fetching. The microcomputer 30 can operate.

【0037】次に分岐予測の確認動作について図3を用
いて説明する。図3を参照すると、本実施の形態では、
条件分岐命令が実行される毎に、それに対応する判定結
果情報19に記録された前回の分岐先予測結果と現在の
条件分岐命令の分岐結果を分岐先比較回路20により比
較する。
Next, the operation of confirming the branch prediction will be described with reference to FIG. Referring to FIG. 3, in the present embodiment,
Each time a conditional branch instruction is executed, the previous branch destination prediction result recorded in the corresponding determination result information 19 and the current branch result of the conditional branch instruction are compared by the branch destination comparison circuit 20.

【0038】分岐先比較回路20による比較結果が一致
しない場合、すなわち、大小判定回路17により予測さ
れた分岐先のプログラムカウンタ値(PC値)と条件分
岐命令の分岐先アドレスが異なった場合は、命令デコー
ダ部5(Decode)、命令フェッチ部4(Fetc
h)、および命令キュー3(PreFetch Mem
ory)にある命令コードを無効とし、条件分岐命令が
示す分岐先のプログラムカウンタ値(PC値)をプログ
ラムフェッチカウンタ8(PFC)に設定する。
When the comparison result by the branch destination comparison circuit 20 does not match, that is, when the program counter value (PC value) of the branch destination predicted by the magnitude judgment circuit 17 differs from the branch destination address of the conditional branch instruction, Instruction decoder unit 5 (Decode), instruction fetch unit 4 (Fetc)
h) and instruction queue 3 (PreFetch Mem)
The instruction code in (ory) is invalidated, and the program counter value (PC value) of the branch destination indicated by the conditional branch instruction is set in the program fetch counter 8 (PFC).

【0039】次に図4および図5のタイミングチャート
を用いて、分岐情報RAM13に記録された条件分岐命
令が図6で示すプログラムフローに従い、実行された場
合の動作について説明する。図6は本発明にかかる条件
分岐命令フェッチ制御方法の動作を説明するためのフロ
ーチャートである。図6を参照すると、本実施の形態で
は、,,,I,II,IIIで示す命令コードは条件
分岐命令コード以外の命令コード、は条件分岐命令コ
ードである。で示す条件分岐命令が実行されると、分
岐条件が成立した場合、Iで示す命令コードに分岐し命
令を実行する。分岐条件が不成立の場合は、で示す命
令コードに分岐し命令を実行する。
Next, the operation when the conditional branch instruction recorded in the branch information RAM 13 is executed according to the program flow shown in FIG. 6 will be described with reference to the timing charts of FIGS. FIG. 6 is a flowchart for explaining the operation of the conditional branch instruction fetch control method according to the present invention. Referring to FIG. 6, in the present embodiment, the instruction codes indicated by,,, I, II, and III are instruction codes other than the conditional branch instruction code, and the instruction codes are conditional branch instruction codes. When the conditional branch instruction is executed, if the branch condition is satisfied, the process branches to the instruction code indicated by I and executes the instruction. If the branch condition is not satisfied, the process branches to the instruction code indicated by で and executes the instruction.

【0040】図4は本発明にかかる条件分岐命令フェッ
チ制御方法にかかる分岐予測一致時のタイミングチャー
トであって、分岐予測が条件分岐命令の実行結果と一致
した場合を示している。サイクルT2でで示す条件分
岐命令が命令フェッチされると、サイクルT3で大小判
定回路17により予測されたIで示す命令コードが命令
フェッチされる。
FIG. 4 is a timing chart at the time of branch prediction matching according to the conditional branch instruction fetch control method according to the present invention, showing a case where the branch prediction matches the execution result of the conditional branch instruction. When the conditional branch instruction indicated by the cycle T2 is fetched, the instruction code indicated by I predicted by the magnitude determination circuit 17 is fetched in the cycle T3.

【0041】続いて、サイクルT4でで示す条件分岐
命令コードが実行され、当該分岐先アドレスが、分岐先
比較回路20を用いて、Iで示す分岐先コードのアドレ
スと一致したと判断されると、マイクロコンピュータ3
0はサイクルT5、サイクルT6、サイクルT7と連続
して命令を実行する。
Subsequently, the conditional branch instruction code shown in cycle T4 is executed, and when it is determined, using the branch destination comparison circuit 20, that the branch destination address matches the address of the branch destination code shown by I. , Microcomputer 3
0 executes the instruction continuously in cycle T5, cycle T6, and cycle T7.

【0042】図5は本発明にかかる条件分岐命令フェッ
チ制御方法にかかる分岐予測不一致時のタイミングチャ
ートであって、条件分岐命令予測が条件分岐命令の実行
結果と不一致の場合および通常のマイクロコンピュータ
30におけるタイミングを示している。図5を参照する
と、本実施の形態では、サイクルT2でで示す条件分
岐命令が命令フェッチされると、サイクルT3では大小
判定回路17により予測されたで示す命令コードが命
令フェッチされる。
FIG. 5 is a timing chart of the conditional branch instruction fetch control method according to the present invention when the branch prediction does not match. Shows the timing of the operation. Referring to FIG. 5, in the present embodiment, when the conditional branch instruction indicated by cycle T2 is fetched, in cycle T3, the instruction code predicted by the magnitude determination circuit 17 is fetched.

【0043】サイクルT4でで示す条件分岐命令コー
ドが実行され、当該分岐先アドレスが、分岐先比較回路
20によりで示す命令コードのアドレスと不一致であ
ると判断されたため、サイクルT5で条件分岐命令のI
で示す分岐先命令コードを命令フェッチし直す。これに
より、サイクルT3とサイクルT4で命令フェッチされ
た命令コードが、サイクルT5とサイクルT6で実行を
されず、サイクルT7で条件分岐先のIで示す命令を実
行し始める。
The conditional branch instruction code shown in cycle T4 is executed, and it is determined that the branch destination address does not match the address of the instruction code shown by the branch destination comparison circuit 20. I
The instruction code is re-fetched for the branch instruction code indicated by. As a result, the instruction code fetched in the cycles T3 and T4 is not executed in the cycles T5 and T6, but starts executing the instruction indicated by the conditional branch destination I in the cycle T7.

【0044】上記の動作説明では、条件分岐命令が実行
された場合について説明してきたが、本実施形態では無
条件分岐命令にも対応するため、その動作について、条
件分岐命令の動作と違いのある部分のみを記載する。
In the above description of the operation, the case where the conditional branch instruction is executed has been described. However, since the present embodiment corresponds to an unconditional branch instruction, the operation is different from that of the conditional branch instruction. Only the part is described.

【0045】第1の異なる動作として、分岐先アドレス
ラッチ回路12から分岐情報RAM13への分岐先のプ
ログラムカウンタ値(PC値)の記録動作にある。条件
分岐命令の分岐先が2つあるのに対して、無条件分岐命
令の分岐先は1つである。このため、分岐情報RAM1
3内に2つある分岐先のプログラムカウンタ値(PC
値)を記録するためのRAMの一方に不定が生じる。
The first different operation is an operation of recording the program counter value (PC value) of the branch destination from the branch destination address latch circuit 12 to the branch information RAM 13. While there are two branch destinations for the conditional branch instruction, there is one branch destination for the unconditional branch instruction. Therefore, the branch information RAM1
3 are the program counter values of two branch destinations (PC
Value) is recorded in one of the RAMs.

【0046】上記の不定を防止するため、無条件分岐命
令の場合、無条件命令の分岐先のプログラムカウンタ値
(PC値)を前記の両方のRAMに記録する。第2の異
なる動作として、無条件分岐の場合、履歴カウンタ14
のカウントアップを、いずれか一方のカウンタのみ行
う。
In order to prevent the above uncertainty, in the case of an unconditional branch instruction, the program counter value (PC value) of the branch destination of the unconditional instruction is recorded in both of the RAMs. As a second different operation, in the case of an unconditional branch, the history counter 14
Is performed on only one of the counters.

【0047】以上に記載した第1および第2の動作に違
いが生じるが、条件分岐命令と同じ分岐予測の動作によ
り、大小判定回路17による分岐予測結果が、常に無条
件分岐先のプログラムカウンタ値(PC値)をプログラ
ムフェッチカウンタ8(PFC)を選択されることで、
無条件分岐命令コードの次のコードに、分岐先の命令コ
ードが命令フェッチされる。
Although there is a difference between the first and second operations described above, the same branch prediction operation as that of the conditional branch instruction always causes the result of the branch prediction by the magnitude judgment circuit 17 to be always the unconditional branch destination program counter value. (PC value) by selecting the program fetch counter 8 (PFC),
The instruction code at the branch destination is fetched into the code following the unconditional branch instruction code.

【0048】(第2の実施の形態)次に分岐予測の精度
を上げることを目的とした第2の実施の形態について図
7を用いて説明する。なお、上記実施の形態において既
に記述したものと同一の部分については、同一符号を付
し、重複した説明は省略する。図7は本発明の第2の実
施の形態にかかるマイクロコンピュータ30のシステム
構成図である。
(Second Embodiment) Next, a second embodiment aiming at improving the accuracy of branch prediction will be described with reference to FIG. Note that the same parts as those already described in the above embodiment are denoted by the same reference numerals, and redundant description will be omitted. FIG. 7 is a system configuration diagram of a microcomputer 30 according to the second embodiment of the present invention.

【0049】図7において、1はデータバス(Data
Bus)、2はアドレスバス(AdressBus)、
3は命令キュー(PreFetch Memory)、
4は命令フェッチ部(Fetch)、5は命令デコーダ
部(Decode)、6は演算・命令実行部(AL
U)、7はプログラムカウンタ(PC)、8はプログラ
ムフェッチカウンタ(PFC)、9はテーブル検出回
路、10はセレクタ(SEL)、11は分岐命令アドレ
スRAM、12は分岐先アドレスラッチ回路、13は分
岐情報RAM、15はセレクタ(SEL)、16はPF
C分岐PC値比較回路、18はセレクタ(SEL)、1
9は判定結果情報、20は分岐先比較回路、21は予測
回路、22は履歴情報、30はマイクロコンピュータを
示している。
In FIG. 7, reference numeral 1 denotes a data bus (Data).
Bus), 2 is an address bus (Address Bus),
3 is an instruction queue (PreFetch Memory),
4 is an instruction fetch unit (Fetch), 5 is an instruction decoder unit (Decode), and 6 is an operation / instruction execution unit (AL).
U), 7 are a program counter (PC), 8 is a program fetch counter (PFC), 9 is a table detection circuit, 10 is a selector (SEL), 11 is a branch instruction address RAM, 12 is a branch destination address latch circuit, 13 is Branch information RAM, 15 is a selector (SEL), 16 is PF
C branch PC value comparison circuit, 18 is a selector (SEL), 1
Reference numeral 9 denotes judgment result information, 20 denotes a branch destination comparison circuit, 21 denotes a prediction circuit, 22 denotes history information, and 30 denotes a microcomputer.

【0050】図7を参照すると、本実施の形態では、第
1の実施の形態から、履歴カウンタ14と大小判定回路
17を、履歴情報22と予測回路21に変更した構成と
なっている点に特徴を有している。履歴情報22は、過
去に実行された条件分岐命令の分岐先が実行順に記録さ
れており、大小判定回路17による大小判定に代えて、
予測回路21により過去の分岐履歴から分岐傾向を予測
することで条件分岐命令の予測結果を高確率化できるよ
うになるといった効果を奏する。
Referring to FIG. 7, this embodiment is different from the first embodiment in that the history counter 14 and the magnitude judgment circuit 17 are changed to history information 22 and a prediction circuit 21. Has features. In the history information 22, branch destinations of conditional branch instructions executed in the past are recorded in the order of execution, and instead of the magnitude judgment by the magnitude judgment circuit 17,
By predicting the branch tendency from the past branch history by the prediction circuit 21, an effect is obtained that the prediction result of the conditional branch instruction can be made higher in probability.

【0051】(第3の実施の形態)次に本回路構成をよ
り小さくすることを目的とした第3の実施の形態につい
て図8を用いて説明する。なお、上記実施の形態におい
て既に記述したものと同一の部分については、同一符号
を付し、重複した説明は省略する。図8は本発明の第3
の実施の形態にかかるマイクロコンピュータ30のシス
テム構成図である。
(Third Embodiment) Next, a third embodiment aiming at making the circuit configuration smaller will be described with reference to FIG. Note that the same parts as those already described in the above embodiment are denoted by the same reference numerals, and redundant description will be omitted. FIG. 8 shows a third embodiment of the present invention.
FIG. 2 is a system configuration diagram of a microcomputer 30 according to the embodiment.

【0052】図8において、1はデータバス(Data
Bus)、2はアドレスバス(AdressBus)、
3は命令キュー(PreFetch Memory)、
4は命令フェッチ部(Fetch)、5は命令デコーダ
部(Decode)、6は演算・命令実行部(AL
U)、7はプログラムカウンタ(PC)、8はプログラ
ムフェッチカウンタ(PFC)、9はテーブル検出回
路、10はセレクタ(SEL)、11は分岐命令アドレ
スRAM、12は分岐先アドレスラッチ回路、13は分
岐情報RAM、14は履歴カウンタ、15はセレクタ
(SEL)、16はPFC分岐PC値比較回路、17は
大小判定回路、18はセレクタ(SEL)、19は判定
結果情報、20は分岐先比較回路、30はマイクロコン
ピュータを示している。
In FIG. 8, reference numeral 1 denotes a data bus (Data).
Bus), 2 is an address bus (Address Bus),
3 is an instruction queue (PreFetch Memory),
4 is an instruction fetch unit (Fetch), 5 is an instruction decoder unit (Decode), and 6 is an operation / instruction execution unit (AL).
U), 7 are a program counter (PC), 8 is a program fetch counter (PFC), 9 is a table detection circuit, 10 is a selector (SEL), 11 is a branch instruction address RAM, 12 is a branch destination address latch circuit, 13 is Branch information RAM, 14 is a history counter, 15 is a selector (SEL), 16 is a PFC branch PC value comparison circuit, 17 is a magnitude judgment circuit, 18 is a selector (SEL), 19 is judgment result information, and 20 is a branch destination comparison circuit. , 30 indicate a microcomputer.

【0053】本実施の形態では、プログラム命令コード
の配置において、条件分岐命令の2つの分岐先のうち、
分岐条件の成立または不成立のいずれか一方の分岐先以
降の命令を連続して配置する。下記の説明では、分岐命
令の次に分岐成立時の命令コードが連続して配置されて
いる場合について説明する。
In this embodiment, in the location of the program instruction code, of the two branch destinations of the conditional branch instruction,
Instructions subsequent to one of the branch conditions that are satisfied or not satisfied are sequentially arranged. In the following description, a case will be described in which the instruction code at the time of branch establishment is continuously arranged after the branch instruction.

【0054】第1の実施の形態と異なる動作として、分
岐予測における分岐先アドレスの選択動作と分岐先アド
レスラッチ回路12から分岐情報RAM13への分岐先
のアドレスの記録動作についてのみ説明する。
As operations different from those in the first embodiment, only the operation of selecting a branch destination address in branch prediction and the operation of recording a branch destination address from the branch destination address latch circuit 12 to the branch information RAM 13 will be described.

【0055】図8を参照すると、本実施の形態では、命
令デコーダ部5(Decode)で解読された命令コー
ドが、条件分岐命令であると判断されると、分岐先アド
レスラッチ回路12に解読され、分岐不成立時の条件分
岐先アドレスがラッチされる。
Referring to FIG. 8, in the present embodiment, when the instruction code decoded by instruction decoder unit 5 (Decode) is determined to be a conditional branch instruction, it is decoded by branch destination address latch circuit 12. , The condition branch destination address when the branch is not taken is latched.

【0056】また大小判定回路17は、予測された分岐
情報RAM13内の分岐先アドレス、もしくは現状のプ
ログラムフェッチカウンタ8(PFC)のインクリメン
トしたアドレスをセレクタ18(SEL)を制御してプ
ログラムフェッチカウンタ8(PFC)に設定する。
The magnitude determination circuit 17 controls the selector 18 (SEL) to store the predicted branch destination address in the branch information RAM 13 or the current incremented address of the program fetch counter 8 (PFC) to control the program fetch counter 8. (PFC).

【0057】以上の処理を第1の実施の形態から変更す
ることにより、分岐情報RAM13より分岐先のプログ
ラムカウンタ値(PC値)を記録するRAM(随時書き
込み読み出しメモリ)を1つ削除することが可能とな
り、回路の小型化ができるようになるといった効果を奏
する。
By changing the above processing from the first embodiment, it is possible to delete one RAM (random write / read memory) for recording the program counter value (PC value) of the branch destination from the branch information RAM 13. This makes it possible to reduce the size of the circuit.

【0058】以上説明したように上記各実施の形態によ
れば、以下に掲げる効果を奏する。まず第1の効果は、
条件分岐命令実行時に本回路による分岐予測が一致した
場合は、分岐命令実行以外に無駄な命令をフェッチする
ことがなく、効率よく命令のフェッチができることであ
る。その理由は、条件分岐命令がプリフェッチされる
と、分岐情報RAM13と大小判定回路17から分岐先
アドレスを予測し、分岐先アドレスに記憶されている命
令コードをプリフェッチするようにプリフェッチ動作を
制御したためである。
As described above, according to the above embodiments, the following effects can be obtained. First, the first effect is
When the branch prediction by this circuit coincides with the execution of a conditional branch instruction, there is no need to fetch useless instructions other than the execution of the branch instruction, so that the instructions can be fetched efficiently. The reason is that, when the conditional branch instruction is prefetched, the branch destination address is predicted from the branch information RAM 13 and the size determination circuit 17, and the prefetch operation is controlled so as to prefetch the instruction code stored in the branch destination address. is there.

【0059】そして第2の効果は、無条件分岐だけでな
く、条件付き分岐命令の予測が可能となることである。
その理由は、過去実行した条件分岐命令および無条件分
岐命令のプログラムカウンタ値(PC値)、分岐先のプ
ログラムカウンタ値(PC値)、過去の分岐回数を示す
履歴カウンタ14そして判定結果情報19からなる分岐
予測に必要となる分岐履歴情報22を、分岐情報RAM
13に記録するためである。
The second effect is that not only unconditional branch but also conditional branch instruction can be predicted.
The reason is that the program counter value (PC value) of the previously executed conditional branch instruction and unconditional branch instruction, the program counter value (PC value) of the branch destination, the history counter 14 indicating the number of past branches, and the judgment result information 19 The branch history information 22 required for branch prediction is stored in a branch information RAM.
13 is recorded.

【0060】なお、本発明が上記実施の形態に限定され
ず、本発明の技術思想の範囲内において、各実施の形態
は適宜変更され得ることは明らかである。また上記構成
部材の数、位置、形状等は上記実施の形態に限定され
ず、本発明を実施する上で好適な数、位置、形状等にす
ることができる。また、各図において、同一構成要素に
は同一符号を付している。
It should be noted that the present invention is not limited to the above embodiments, and it is clear that each embodiment can be appropriately modified within the scope of the technical idea of the present invention. Further, the number, position, shape, and the like of the constituent members are not limited to the above-described embodiment, and can be set to numbers, positions, shapes, and the like suitable for carrying out the present invention. In each drawing, the same components are denoted by the same reference numerals.

【0061】[0061]

【発明の効果】本発明は以上のように構成されているの
で、以下に掲げる効果を奏する。まず第1の効果は、条
件分岐命令実行時に本回路による分岐予測が一致した場
合、分岐命令実行以外に無駄な命令をフェッチすること
がなく、効率よく命令のフェッチができることである。
その理由は、条件分岐命令がプリフェッチされると、分
岐情報RAMと大小判定回路から分岐先アドレスを予測
し、分岐先アドレスにある命令コードをプリフェッチす
るようにプリフェッチ動作を制御したためである。
Since the present invention is configured as described above, the following effects can be obtained. First, the first effect is that when the branch prediction by the present circuit coincides with the execution of the conditional branch instruction, the instruction can be efficiently fetched without fetching a useless instruction other than executing the branch instruction.
The reason is that when the conditional branch instruction is prefetched, the branch destination address is predicted from the branch information RAM and the size determination circuit, and the prefetch operation is controlled so as to prefetch the instruction code at the branch destination address.

【0062】そして第2の効果は、無条件分岐だけでな
く、条件付き分岐命令の予測が可能となることである。
その理由は、過去実行した条件分岐命令および無条件分
岐命令のPC値、分岐先のPC値、過去の分岐回数を示
す履歴カウンタそして判定結果情報からなる分岐予測に
必要となる分岐履歴情報を、分岐情報RAMに記録する
ためである。
The second effect is that not only unconditional branch but also conditional branch instruction can be predicted.
The reason is that the PC value of the previously executed conditional branch instruction and the unconditional branch instruction, the PC value of the branch destination, a history counter indicating the number of past branches, and the branch history information necessary for branch prediction including the determination result information are described below. This is for recording in the branch information RAM.

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

【図1】本発明の第1の実施の形態にかかるマイクロコ
ンピュータのシステム構成図である。
FIG. 1 is a system configuration diagram of a microcomputer according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態にかかるマイクロコ
ンピュータの分岐情報取得に関する回路の構成図であ
る。
FIG. 2 is a configuration diagram of a circuit relating to acquisition of branch information of the microcomputer according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態にかかるマイクロコ
ンピュータの分岐予測に関する回路の構成図である。
FIG. 3 is a configuration diagram of a circuit relating to branch prediction of the microcomputer according to the first embodiment of the present invention.

【図4】本発明にかかる条件分岐命令フェッチ制御方法
にかかる分岐予測一致時のタイミングチャートである。
FIG. 4 is a timing chart at the time of branch prediction matching according to the conditional branch instruction fetch control method according to the present invention.

【図5】本発明にかかる条件分岐命令フェッチ制御方法
にかかる分岐予測不一致時のタイミングチャートであ
る。
FIG. 5 is a timing chart at the time of branch prediction mismatch according to the conditional branch instruction fetch control method according to the present invention.

【図6】本発明にかかる条件分岐命令フェッチ制御方法
の動作を説明するためのフローチャートである。
FIG. 6 is a flowchart illustrating an operation of a conditional branch instruction fetch control method according to the present invention.

【図7】本発明の第2の実施の形態にかかるマイクロコ
ンピュータのシステム構成図である。
FIG. 7 is a system configuration diagram of a microcomputer according to a second embodiment of the present invention.

【図8】本発明の第3の実施の形態にかかるマイクロコ
ンピュータのシステム構成図である。
FIG. 8 is a system configuration diagram of a microcomputer according to a third embodiment of the present invention.

【図9】第1従来技術のマイクロコンピュータ104の
ブロック構成図である。
FIG. 9 is a block diagram of a microcomputer 104 according to the first related art.

【図10】特開平1−193939号公報(第2従来技
術)に記載されている無条件分岐に対するマイクロコン
ピュータの高速化を目的とした回路の構成図である。
FIG. 10 is a configuration diagram of a circuit for increasing the speed of a microcomputer for unconditional branches described in Japanese Patent Application Laid-Open No. 1-193939 (second prior art).

【図11】特開平4−195630号公報(第3従来技
術)に記載されいる命令フェッチ部の内部構成を示すブ
ロック図である。
FIG. 11 is a block diagram showing an internal configuration of an instruction fetch unit described in Japanese Patent Application Laid-Open No. 4-195630 (third prior art).

【符号の説明】[Explanation of symbols]

1…データバス(DataBus) 2…アドレスバス(AdressBus) 3…命令キュー(PreFetch Memory) 4…命令フェッチ部(Fetch) 5…命令デコーダ部(Decode) 6…演算・命令実行部(ALU) 7…プログラムカウンタ(PC) 8…プログラムフェッチカウンタ(PFC) 9…テーブル検出回路 10…セレクタ(SEL) 11…分岐命令アドレスRAM 12…分岐先アドレスラッチ回路 13…分岐情報RAM 14…履歴カウンタ 15…セレクタ(SEL) 16…PFC分岐PC値比較回路 17…大小判定回路 18…セレクタ(SEL) 19…判定結果情報 20…分岐先比較回路 21…予測回路 22…履歴情報 30…マイクロコンピュータ DESCRIPTION OF SYMBOLS 1 ... Data bus (DataBus) 2 ... Address bus (Address Bus) 3 ... Instruction queue (PreFetch Memory) 4 ... Instruction fetch part (Fetch) 5 ... Instruction decoder part (Decode) 6 ... Arithmetic / instruction execution part (ALU) 7 ... Program counter (PC) 8 Program fetch counter (PFC) 9 Table detection circuit 10 Selector (SEL) 11 Branch instruction address RAM 12 Branch destination address latch circuit 13 Branch information RAM 14 History counter 15 selector ( SEL) 16 PFC branch PC value comparison circuit 17 Size determination circuit 18 Selector (SEL) 19 Determination result information 20 Branch destination comparison circuit 21 Prediction circuit 22 History information 30 Microcomputer

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 命令コードを格納する命令キューと、命
令をフェッチする命令フェッチ部と、命令コードを解読
する命令デコーダ部と、命令を実行する演算・命令実行
部を有し、条件分岐命令の分岐命令先を予測し分岐命令
コード後の命令フェッチ動作で次の命令コードを制御す
ることにより分岐命令によるマイクロコンピュータのタ
イムロスが引き起こす実行性能の低下を防止するマイク
ロコンピュータであって、 過去に実行した分岐命令のプログラムカウンタ値、当該
分岐命令に対する分岐命令先アドレス、および分岐先に
分岐した回数を示す履歴カウンタ値を条件分岐情報とし
て記録する手段を有することを特徴とするマイクロコン
ピュータ。
An instruction queue for storing an instruction code, an instruction fetch unit for fetching an instruction, an instruction decoder unit for decoding an instruction code, an operation / instruction execution unit for executing an instruction, and a conditional branch instruction A microcomputer that predicts a branch instruction destination and controls the next instruction code by an instruction fetch operation after the branch instruction code, thereby preventing a decrease in execution performance caused by time loss of the microcomputer due to the branch instruction, and executed in the past. A microcomputer having means for recording, as conditional branch information, a program counter value of a branch instruction, a branch instruction destination address for the branch instruction, and a history counter value indicating the number of times of branch to the branch destination.
【請求項2】 前記命令キューへのプリフェッチ動作時
に、分岐情報である前記分岐命令のプログラムカウンタ
値とプリフェッチカウンタ値を比較することで当該分岐
命令を検出する手段を有することを特徴とする請求項1
に記載のマイクロコンピュータ。
2. The apparatus according to claim 1, further comprising means for detecting a branch instruction by comparing a program counter value of the branch instruction, which is branch information, with a prefetch counter value during a prefetch operation to the instruction queue. 1
The microcomputer according to 1.
【請求項3】 前記条件分岐命令を前記命令キューへプ
リフェッチした場合に、前記条件分岐情報を基に今回分
岐する条件分岐先アドレスを予測する分岐予測回路を有
することを特徴とする請求項1に記載のマイクロコンピ
ュータ。
3. The branch prediction circuit according to claim 1, further comprising a branch prediction circuit for predicting a conditional branch destination address to branch this time based on the conditional branch information when the conditional branch instruction is prefetched into the instruction queue. The microcomputer as described.
【請求項4】 前記分岐予測回路は条件付き分岐を用い
るプログラムの分岐特徴から分岐先を予測する手段を有
することを特徴とする請求項3に記載のマイクロコンピ
ュータ。
4. The microcomputer according to claim 3, wherein said branch prediction circuit has means for predicting a branch destination from a branch feature of a program using a conditional branch.
【請求項5】 命令コードを格納する命令キューと、命
令をフェッチする命令フェッチ部と、命令コードを解読
する命令デコーダ部と、命令を実行する演算・命令実行
部を有し、条件分岐命令の分岐命令先を予測し分岐命令
コード後の命令フェッチ動作で次の命令コードを制御す
ることにより分岐命令によるマイクロコンピュータのタ
イムロスが引き起こす実行性能の低下を防止するマイク
ロコンピュータに対して、 過去に実行した分岐命令のプログラムカウンタ値、当該
分岐命令に対する分岐命令先アドレス、および分岐先に
分岐した回数を示す履歴カウンタ値を条件分岐情報とし
て記録する工程を有することを特徴とする条件分岐命令
フェッチ制御方法。
5. An instruction queue for storing an instruction code, an instruction fetch unit for fetching an instruction, an instruction decoder unit for decoding an instruction code, and an operation / instruction execution unit for executing an instruction. A past instruction was executed for a microcomputer that predicts the branch instruction destination and controls the next instruction code in the instruction fetch operation after the branch instruction code, thereby preventing the microcomputer from losing execution performance caused by the branch instruction's time loss. A conditional branch instruction fetch control method, comprising the step of recording, as conditional branch information, a program counter value of a branch instruction, a branch instruction destination address for the branch instruction, and a history counter value indicating the number of times of branch to the branch destination.
【請求項6】 前記命令キューへのプリフェッチ動作時
に、分岐情報である前記分岐命令のプログラムカウンタ
値とプリフェッチカウンタ値を比較することで当該分岐
命令を検出する工程を有することを特徴とする請求項5
に記載の条件分岐命令フェッチ制御方法。
6. The method according to claim 1, further comprising the step of detecting a branch instruction by comparing a program counter value of the branch instruction, which is branch information, with a prefetch counter value during a prefetch operation to the instruction queue. 5
2. The conditional branch instruction fetch control method according to 1.
【請求項7】 前記条件分岐命令を前記命令キューへプ
リフェッチした場合に、前記条件分岐情報を基に今回分
岐する条件分岐先アドレスを予測する分岐予測工程を有
することを特徴とする請求項5に記載の条件分岐命令フ
ェッチ制御方法。
7. The method according to claim 5, further comprising a branch predicting step of predicting a conditional branch destination address to branch this time based on the conditional branch information when the conditional branch instruction is prefetched into the instruction queue. The described method for controlling conditional branch instruction fetch.
【請求項8】 前記分岐予測工程は、条件付き分岐を用
いるプログラムの分岐特徴から、分岐先を予測する工程
を有することを特徴とする請求項7に記載の条件分岐命
令フェッチ制御方法。
8. The method according to claim 7, wherein the branch prediction step includes a step of predicting a branch destination from a branch feature of a program using a conditional branch.
JP32629799A 1999-11-17 1999-11-17 Microcomputer and method for controlling conditional branch instruction fetch Pending JP2001142703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32629799A JP2001142703A (en) 1999-11-17 1999-11-17 Microcomputer and method for controlling conditional branch instruction fetch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32629799A JP2001142703A (en) 1999-11-17 1999-11-17 Microcomputer and method for controlling conditional branch instruction fetch

Publications (1)

Publication Number Publication Date
JP2001142703A true JP2001142703A (en) 2001-05-25

Family

ID=18186205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32629799A Pending JP2001142703A (en) 1999-11-17 1999-11-17 Microcomputer and method for controlling conditional branch instruction fetch

Country Status (1)

Country Link
JP (1) JP2001142703A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140134421A (en) * 2013-05-14 2014-11-24 한국전자통신연구원 Dual instruction fetch apparatus and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140134421A (en) * 2013-05-14 2014-11-24 한국전자통신연구원 Dual instruction fetch apparatus and method

Similar Documents

Publication Publication Date Title
CN1150455C (en) Optimal Execution of Strong Statically Predicted Branch Instructions
US4858104A (en) Preceding instruction address based branch prediction in a pipelined processor
US6081887A (en) System for passing an index value with each prediction in forward direction to enable truth predictor to associate truth value with particular branch instruction
JP2504830Y2 (en) Data processing device
JP3803723B2 (en) Branch prediction mechanism that employs a branch selector that selects branch prediction
US7266676B2 (en) Method and apparatus for branch prediction based on branch targets utilizing tag and data arrays
US6832305B2 (en) Method and apparatus for executing coprocessor instructions
US20010020267A1 (en) Pipeline processing apparatus with improved efficiency of branch prediction, and method therefor
CN101228506A (en) Method and apparatus for predicting branch instructions
JP2006520964A5 (en)
CN101884025B (en) Method and system for accelerating procedure return sequences
RU2419835C2 (en) Methods and devices for reducing search in branch target address cache
US5146570A (en) System executing branch-with-execute instruction resulting in next successive instruction being execute while specified target instruction is prefetched for following execution
EP0297943B1 (en) Microcode reading control system
JP3794918B2 (en) Branch prediction that classifies branch prediction types using return selection bits
US10853081B2 (en) Processor and pipelining method
US6446143B1 (en) Methods and apparatus for minimizing the impact of excessive instruction retrieval
US20080126770A1 (en) Methods and apparatus for recognizing a subroutine call
JP2001236224A (en) How to reduce branch prediction table contamination
US6289428B1 (en) Superscaler processor and method for efficiently recovering from misaligned data addresses
JP2001142703A (en) Microcomputer and method for controlling conditional branch instruction fetch
JP2001100994A (en) Instruction processing apparatus and method for controlling branch instruction for changing mode
WO2012132214A1 (en) Processor and instruction processing method thereof
US6360310B1 (en) Apparatus and method for instruction cache access
JPS62224829A (en) Instruction cache control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040409

A977 Report on retrieval

Effective date: 20060419

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060425

A521 Written amendment

Effective date: 20060626

Free format text: JAPANESE INTERMEDIATE CODE: A523

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Effective date: 20060801

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Effective date: 20060823

Free format text: JAPANESE INTERMEDIATE CODE: A61

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees