JPS61133439A - Instruction advance fetch control system - Google Patents

Instruction advance fetch control system

Info

Publication number
JPS61133439A
JPS61133439A JP25608684A JP25608684A JPS61133439A JP S61133439 A JPS61133439 A JP S61133439A JP 25608684 A JP25608684 A JP 25608684A JP 25608684 A JP25608684 A JP 25608684A JP S61133439 A JPS61133439 A JP S61133439A
Authority
JP
Japan
Prior art keywords
instruction
signal line
fetch
control signal
decoder
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
JP25608684A
Other languages
Japanese (ja)
Inventor
Akira Kuwata
桑田 明
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP25608684A priority Critical patent/JPS61133439A/en
Publication of JPS61133439A publication Critical patent/JPS61133439A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To decrease the data access wait time by providing a pre-decoder to an internal instruction buffer and giving an intermission request of fetch when a decoded instruction is a branch instruction so as to minimize the instruction fetch which would be useless by the execution of the branch instruction. CONSTITUTION:The pre-decoder 220 is provided to the pre-stage of the internal instruction buffer 202, and when the pre-decoder 220 detects that the fetched instruction if a branch instruction and all instruction bytes constituting the branch instruction are stored in the internal instruction buffer 202, a fetch intermission signal line 221 is brought into a low level to request the intermission of fetch. That is, the branch instruction is detected much earlier by the pre-decoder to the pre-stage of the internal instruction buffer 202, and when it is confirmed that all the instruction bytes constituting the branch instruction are stored to the internal instruction buffer 202, the intermission of the fetch is requested immediately to a bus control section 213 to minimize ineffective fetch.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は電子計算機に関し、特に命令の先取り制御方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an electronic computer, and particularly to an instruction preemption control system.

(従来の技術) コンピュータの高速化技法の一つとして命令の先取り制
御方式がある。ノイマン型コンビーータの特徴の一つに
、次に実行される命令は、現在実行中の命令の次の命令
である確率が非常に高いことが挙げられる。命令の先取
り制御方式とは、この特徴を利用して外部バスの空き時
間に、シーケンシャルに命令フェッチを行い、予めコン
ピュータ内部の命令バッファに蓄えておくことで、命令
フェッチに要する時間を減らすことを目的としている。
(Prior Art) One of the techniques for speeding up computers is an instruction preemption control system. One of the characteristics of the Neumann type combiner is that the next instruction to be executed has a very high probability of being the instruction following the currently executing instruction. The instruction prefetch control method utilizes this feature to sequentially fetch instructions during free time on the external bus and store them in the computer's internal instruction buffer in advance, thereby reducing the time required to fetch instructions. The purpose is

第4図は従来の命令先取り機構を有するCPUのブロッ
ク図である。
FIG. 4 is a block diagram of a CPU having a conventional instruction prefetch mechanism.

CPU2は外部バス1との間でデータの授受を行う。フ
ェッチ要求信号線119がノ・イレベルであればフェッ
チ要求信号線119を入力とするバス制御部113は外
部メモリに対し命令フエ、チの要求を出す。フェッチ要
求が出されたとき、バス制御部113はアドレス・デー
タバス115上にフェッチすべき命令のアドレスを出力
し、その結果外部メモリ内の前記アドレスに保持されて
いる命令をアドレス・データバス115を通してバス制
御部113に入力する。さらに内部データバス101を
通して内部命令バッファ102に蓄えられる内部命令バ
、77102はF I FO(Fir−st In F
irst Out )構造になっており、フェッチされ
た命令の順に命令バス105を通してデコーダ106に
入る。キュー・ライト・カウンタ#≠104は、外部メ
モリからフェ ッチした命令を内部命令バッファ102に書き込む位置
を示しており、キー−・リード・カウンタ103は内部
命令バッファ102に蓄えられた命令をデコーダ106
へ読出す位置を示している。
The CPU 2 exchanges data with the external bus 1. If the fetch request signal line 119 is at the no-y level, the bus control unit 113, which receives the fetch request signal line 119 as an input, issues a request to the external memory for instructions to be sent. When a fetch request is issued, the bus control unit 113 outputs the address of the instruction to be fetched onto the address/data bus 115, and as a result, the instruction held at the address in the external memory is transferred to the address/data bus 115. The signal is input to the bus control unit 113 through the bus control unit 113. Further, an internal instruction buffer 77102 stored in the internal instruction buffer 102 through the internal data bus 101 is an FIFO (First In F
irst Out ) structure, and the fetched instructions enter the decoder 106 through the instruction bus 105 in the order they are fetched. Queue write counter #≠104 indicates the position where the instruction fetched from the external memory is written to the internal instruction buffer 102, and the key read counter 103 indicates the position where the instruction stored in the internal instruction buffer 102 is written to the decoder 106.
It shows the position to read to.

すなわち、キュー・ライト・カウンタ104とキュー・
リード・カウンタ103の差が現在の内部命令バッファ
102に蓄えられている命令の総バイト数となる。デコ
ーダ106の出力はマイクロ命令アドレスバス107を
通してマイクロプログラム108のスタート番地を知ら
せる。そのマイクロプロゲラにの実行によって実行ユニ
ット110へ制御信号群109を出力し、実行ユニッ)
 110では、制御信号群109に従いバス制御部11
3を経由して外部メモリとの間でデータのリード/ライ
ト動作等を行う。命令の7エツチはデータ・リード/ラ
イトのない外部バス1の空き時間に内部命令バッファ1
02からのフェッチ要求に基いて行なわれるが、もし外
部バス1が命令フェッチを行っている最中にデータ・リ
ード/ライト要求が実行ユニツ)110から発生した場
合は、そのリード/ライト要求は、現在実行中の命令フ
エ。
That is, the queue write counter 104 and the queue
The difference between the read counters 103 becomes the total number of bytes of instructions currently stored in the internal instruction buffer 102. The output of decoder 106 informs the start address of microprogram 108 via microinstruction address bus 107. The control signal group 109 is output to the execution unit 110 by the execution by the micro programger, and the execution unit)
At 110, the bus control unit 11 according to the control signal group 109
3, data read/write operations are performed with the external memory. The 7th instruction is stored in the internal instruction buffer 1 during the free time of the external bus 1 when there is no data read/write.
However, if a data read/write request is generated from the execution unit 110 while the external bus 1 is fetching an instruction, the read/write request is The command currently being executed.

チが終了するまで待たされることKなる。You will have to wait until the end of the game.

フェッチ要求はキュー・リード−カウンタ103とキュ
ー・ライト・カウンタ104を入力とするキュー制御部
116によって、内部命令バッファ102に空きバッフ
ァがあると判断されたときに     、。
A fetch request is issued when the queue control unit 116, which receives the queue read counter 103 and the queue write counter 104 as input, determines that there is an empty buffer in the internal instruction buffer 102.

出され、フェッチ要求信号線117がI・イレベルとな
る。ただし、フェッチ要求がないときは、フェッチ要求
信号線117はロウレベルであるものとする。ここで、
命令のフェッチは、大部分がシーケンシャルに実行され
るものという前提のもとでは有効であるが、ジャンプ、
コール、リターン命令等のプログラムのフローを乱すよ
うな分岐命令がある場合、内部命令バッファ102に蓄
えられていた分岐命令以降の命令をすべて消去し、また
新たに分岐先の命令を再フェツチしなければならない。
The fetch request signal line 117 becomes the I level. However, when there is no fetch request, the fetch request signal line 117 is assumed to be at a low level. here,
Fetching instructions is valid under the assumption that most of the instructions are executed sequentially, but
If there is a branch instruction such as a call or return instruction that disturbs the flow of the program, all instructions after the branch instruction stored in the internal instruction buffer 102 must be erased, and a new branch destination instruction must be re-fetched. Must be.

その結果、消去された分の命令フェッチが無効なものと
なってしまう。ここで、その無効な命令7エツチがデー
タ・リード/ライト等のメモリアクセスの無い外部バス
1の完全な空き時間に行なわれる時は問題ないが、もし
無効な命令フェッチを行っている途中にメモリアクセス
要求が生じた場合には、無効な命令フェッチサイクルが
完了するまでメモリアクセス要求が待たされることとな
り、その間CPU2は無効なフェッチのために無駄な時
間を資すことになる。その結果、無駄な時間分全体とし
てのコンピュータの実行時間を遅くする原因となる。そ
こで、今までの命令先取り制御の一方式として1分岐命
令によって無駄罠なってしまう命令フェッチを減らすた
め、分岐命令を構成する命令バイトをすべてデコーダ1
06でデコードした後に以降の命令フェッチを中断する
方法をとっていた。
As a result, the erased instruction fetches become invalid. Here, there is no problem if the invalid instruction 7 fetch is performed during a completely free time on the external bus 1 with no memory access such as data read/write, but if the invalid instruction 7 is fetched while the memory is being fetched, When an access request occurs, the memory access request is forced to wait until the invalid instruction fetch cycle is completed, and during this time the CPU 2 wastes time due to the invalid fetch. As a result, the overall execution time of the computer is slowed down by wasted time. Therefore, as a method of instruction prefetch control, in order to reduce instruction fetches that become wasteful traps due to one branch instruction, all instruction bytes constituting a branch instruction are transferred to the decoder 1.
The method used was to interrupt subsequent instruction fetches after decoding with 06.

以上説明した命令先取り制御方式は、アイ・イー・イー
・イー・スペクト2ム(I EEE Spec−tru
m)、1979.3月号、28〜34頁に記載されてい
る方式である。
The instruction prefetch control method described above is based on the IEE Spec-tru
m), March 1979 issue, pages 28-34.

上記方式では、分岐命令を構成する全バイトを完全にデ
コードし命令フェッチの中断要求が出されるまでに無効
な命令フェッチを行い、コンビーータの実行時間を遅く
するという欠点を有していた。
The above method has the disadvantage that all bytes constituting the branch instruction are completely decoded and an invalid instruction is fetched before an instruction fetch interrupt request is issued, slowing down the execution time of the conbeater.

本発明の目的は、分岐命令をより早く検出することで7
工ツチ動作をより早い段階で中断し無効なフェッチを最
小限に抑えることによってコンビーータの高速化を実現
するための命令先取り制御方式を提供することにある。
The purpose of the present invention is to detect branch instructions earlier.
An object of the present invention is to provide an instruction prefetch control method for realizing high-speed converter operation by interrupting the fetch operation at an earlier stage and minimizing invalid fetches.

(問題点を解決するための手段) 本発明の命令先取り制御方式は、情報処理装置の命令先
取り方式において、先取りした命令を記憶しておく記憶
手段と、先取りした命令が前記記憶手段に記憶される前
に先取りした命令の命令語長を検出する検出手段と、同
じく先取りした命令が前記記憶手段に記憶される前に先
取りした命令が少なくとも分岐命令であることを検出す
るデコード手段と、前記検出手段と前記デコード手段か
らの制御情報により、前記分岐命令を構成するバイトが
すべて前記記憶手段に記憶されるとすぐに命令先取りの
中断を要求する制御手段とを含んで構成される。
(Means for Solving the Problems) The instruction prefetch control method of the present invention includes a storage means for storing a prefetched instruction, and a storage means for storing the prefetched instruction in the instruction prefetching method for an information processing device. a detection means for detecting the instruction word length of the prefetched instruction before the prefetched instruction is stored in the storage means; a decoding means for detecting that the prefetched instruction is at least a branch instruction before the prefetched instruction is stored in the storage means; and control means for requesting suspension of instruction prefetching as soon as all bytes constituting the branch instruction are stored in the storage means, according to control information from the decoding means.

(実施例) 次に、本発明の実施例について図面を用いて説明する。(Example) Next, embodiments of the present invention will be described using the drawings.

第1図は本発明の一実施例のプロ、り図である。FIG. 1 is a schematic diagram of an embodiment of the present invention.

この実施例は、先取りした命令を記憶しておく記憶手段
としての内部命令バッファ202と、先取りした命令が
゛内部命令バッファ202に記憶される前に先取りした
命令の命令語長を検出する検出手段としてのブリ・デコ
ーダ201と、同じく先取りした命令が内部命令バッフ
ァ202に記憶される前に先取りした命令が少なくとも
分岐命令であることを検出するデコード手段としてブリ
・デコーダ201に内蔵されるデコーダと、ブリ・デコ
ーダ201からの制御情報により、分岐命令を構成する
バイトがすべて内部命令バッファ202に記憶されると
すぐに命令先取りの中断を要求する制御手段としての2
人カアンド回路218とを含んで構成される。
This embodiment includes an internal instruction buffer 202 as a storage means for storing prefetched instructions, and a detection means for detecting the instruction word length of the prefetched instruction before the prefetched instruction is stored in the internal instruction buffer 202. A decoder built into the Buri decoder 201 as a decoding means for detecting that the prefetched instruction is at least a branch instruction before the prefetched instruction is stored in the internal instruction buffer 202; 2 as a control means that requests interruption of instruction prefetching as soon as all bytes constituting the branch instruction are stored in the internal instruction buffer 202 according to control information from the branch decoder 201;
It is configured to include a driver AND circuit 218.

次に、この実施例の動作について説明する。Next, the operation of this embodiment will be explained.

CPU4は外部データバス3との間でデータの授受を行
い、フェッチ要求信号219がハイレベルであればバス
制御部213は外部メモリに対して命令7エツチ要求を
出す。フェッチ要求が出されたとき、バス制御部213
はアドレス・データ・バス215を通してフェッチすべ
き命令のアドレスを外部バス3に出力し、その結果再び
アドレス・データ・バス215を通して外部メモリ内の
フェッチすべき命令を外部バス3からアドレス・データ
・バス215を通してバス制御部213に入力する。さ
らに、バス制御部213に入力された命令は内部データ
バス201を通して内部命令バッファ202に蓄えられ
る。内部命令バッファ202はFIFO構造になってお
り、フェッチされた命令の劇に命令バス205を通し゛
Cデコーダ206!’C入る。キ、−・ライト・カラ/
り204は外部メモリからフェッチし九命令を内部命令
バ、ファ202に書込むべき位置を指しており、キー−
・リード・カウンタ203は内部命令バッファ202に
蓄えられた命令をデコーダ206へ読出す位置を示して
いる。すなわち、キュー・ライト・カラ〉′夕204と
キュー・リード・カウンタ203との差が内部命令バッ
ファ202に蓄えられている命令の総バイト数となる。
The CPU 4 exchanges data with the external data bus 3, and if the fetch request signal 219 is at a high level, the bus control unit 213 issues an instruction 7 fetch request to the external memory. When a fetch request is issued, the bus control unit 213
outputs the address of the instruction to be fetched from the external bus 3 through the address/data bus 215, and outputs the address of the instruction to be fetched in the external memory from the external bus 3 via the address/data bus 215 again. 215 to the bus control unit 213. Furthermore, instructions input to the bus control unit 213 are stored in the internal instruction buffer 202 via the internal data bus 201. The internal instruction buffer 202 has a FIFO structure, and the fetched instructions are passed through the instruction bus 205 to the C decoder 206! 'C enters. Ki, - Light Color/
Reference numeral 204 indicates the location where nine instructions should be fetched from the external memory and written to the internal instruction bar, file 202, and the key
- Read counter 203 indicates the position at which instructions stored in internal instruction buffer 202 are read to decoder 206. That is, the difference between the queue write counter 204 and the queue read counter 203 is the total number of bytes of instructions stored in the internal instruction buffer 202.

さらに、デコーダ206の出力は、マイクロ命令アドレ
スバス207を通してマイクロプログラム208のスタ
ート番地を知らせ、そのマイクロプログラムの実行によ
って実行ユニット210へ制御信号群209を出力する
。実行ユニット210では制御信号群209に従いバス
制御部213を通し、外部メモリとの間でデータのリー
ド・ライト動作等を行う。
Further, the output of the decoder 206 informs the start address of the microprogram 208 through the microinstruction address bus 207, and outputs a group of control signals 209 to the execution unit 210 upon execution of the microprogram. In accordance with the control signal group 209, the execution unit 210 performs data read/write operations to/from the external memory via the bus control section 213.

命令のフェッチはデータのリード・ライト・サイクルの
無い外部バス3の空き時間に、キュー制御部216から
の7工ツチ要求償号217に従って行なわれる。フェッ
チ要求はキュー・ライト・カウンタ204とキュー・リ
ード・カウンタ203を入力とするキュー制御部216
によって内部命令バッファ202に空バッファがあると
判断されたときに出され、キュー制御部216からの7
工ツチ要求償号217がハイレベルとなり、内部命令バ
ッファ202からの7エツチ要求を発生する。
Fetching of instructions is performed in accordance with a seven-way request signal 217 from the queue control unit 216 during idle time on the external bus 3 when there is no data read/write cycle. The fetch request is sent to the queue control unit 216 which receives the queue write counter 204 and queue read counter 203 as inputs.
This is issued when it is determined that there is an empty buffer in the internal instruction buffer 202, and the command 7 from the queue control unit 216
The etch request signal 217 goes high and generates a 7 etch request from the internal instruction buffer 202.

但し、7エツチ要求が無いとき、7工ツチ要求償号21
7は、ロウレベルであるものとする。従来例でも述べた
ように命令フェッチは大部の命令がシーケンシャルに実
行されるものという前提のもとでは有効であるが、ジャ
ンプ、コール、リターン命令等のプログラムのフローを
乱すような分岐命令がある場合には内部命令バッファ2
02に蓄えられていた分岐命令以降の命令をすべて消去
し、また新たに分岐先の命令を再フェツチしなければな
らない。そこで、本実施例では内部命令バッファ202
の前段にブリ・デコーダ220を設け、71J・デコー
ダ220はフェッチした命令が分岐命令であり、かつそ
の分岐命令を構成する命令バイトがすべて内部命令バッ
ファ202に格納されたことを検知すると7工ツチ中断
信号線221をロウレベルにし、フェッチの中断を要求
する。但し、通常フェッチ中断信号線221はハイレベ
ルであるものとする。フェッチ中断信号線221がロウ
レベルであれば2人カアンド回路218の出力信号線2
19はロウレベルとなり、命令フェッチの中断をバス制
御部213に知らせる。一方、フェッチ中断信号線22
1がハイレベルであり、かつ内部命令バ、77202に
空バッファがあってキュー制御部216からのフェッチ
要求信号線217がハイレベル(フェッチ要求)であれ
ば、2人カアンド回路218の出力線219はノ・イレ
ベルとなりバス制御部213に7エツチの要求をする。
However, if there is no 7-etch request, 7-etch request compensation number 21
7 is assumed to be a low level. As mentioned in the conventional example, instruction fetch is effective on the premise that most instructions are executed sequentially, but it is effective when there are branch instructions that disturb the program flow, such as jump, call, or return instructions. In some cases, internal instruction buffer 2
All instructions after the branch instruction stored in 02 must be deleted, and a new branch destination instruction must be re-fetched. Therefore, in this embodiment, the internal instruction buffer 202
When the 71J decoder 220 detects that the fetched instruction is a branch instruction and that all instruction bytes constituting the branch instruction have been stored in the internal instruction buffer 202, the 71J decoder 220 The interrupt signal line 221 is set to low level to request suspension of fetch. However, it is assumed that the normal fetch interrupt signal line 221 is at a high level. If the fetch interrupt signal line 221 is at low level, the output signal line 2 of the two-man AND circuit 218
19 becomes low level and notifies the bus control unit 213 of the suspension of instruction fetch. On the other hand, the fetch interrupt signal line 22
1 is at a high level, and there is an empty buffer in the internal command bar 77202, and the fetch request signal line 217 from the queue control unit 216 is at a high level (fetch request), the output line 219 of the two-man AND circuit 218 becomes the NO-I level and requests the bus control unit 213 to perform 7 etchings.

本発明は、以上述べてきたような構成により内部命令バ
ッファ202の前般にブリ・デコーダ220を設けるこ
とで、分岐命令をより早く検知し、内部命令バッファ2
02に分岐命令を構成する命令バイトがすべて格納され
ていることを確認すると直ちにバス制御部213に7エ
ツチの中断を要求し、無効なフェッチを最小限に抑える
手段を提供するものである。
The present invention has the configuration described above, and by providing the predecoder 220 in front of the internal instruction buffer 202, a branch instruction can be detected earlier, and the internal instruction buffer 202 can be detected more quickly.
As soon as it is confirmed that all the instruction bytes constituting the branch instruction are stored in 02, the bus controller 213 is requested to interrupt the 7-etch, thereby providing a means for minimizing invalid fetches.

第2図は第1図に示すブリ・デコーダの詳細回路図であ
る。
FIG. 2 is a detailed circuit diagram of the Buri decoder shown in FIG. 1.

デコーダ305は信号[303より入力したデータから
現在フェッチしている命令語長を検出し、信号線307
を通してカウンタ309へ出力する。
The decoder 305 detects the length of the instruction word currently being fetched from the data input from the signal line [303, and
It is output to the counter 309 through the counter 309.

デコーダ306は、信号線304より入力したデータか
ら現在フェッチしている命令が分岐命令か否かを検出し
、分岐命令である場合は制御信号線308iハイレベル
にする。カウンタ309は信号線より現在フェッチして
いる命令の命令語長を入力し、バス制御部213からの
制御信号223がハイレベルになると、1回デクリメ/
ト動作を行い、保持していた内容を −1すると同時に
ラッチ回路310にデクリメントした後の内容を出力す
る。ここで、カウンタ309はその値が10“になると
制御信号311をハイレベルにし、またラッチ回路31
0はその値が%% o # Kなると制御信号312を
ハイレベルにする。さらにカラ/り309及びう、子回
路310は初期状態(リセット時)において、その値は
“O#になっている。バス制御部213からの制御信号
線222は現在実行しているバス・サイクルがフェッチ
・サイクルであるときにハイレベルとなる制御信号であ
り、制御信号線223は制御信号線222よりlクロ、
り分遅延してハイレベルとなる制御信号である。2人カ
アンド回路313は制御信号線222及び制御信号!1
312を入力とし、制御信号線222がハイレベル、す
なわち、フェッチ・サイクルであり、かつ制御信号線3
12がハイレベル、すなわちう、子回路310の値がゝ
ゝo〃であるとき制御信号線314とハイレベルにし、
ゲ−1301及びゲート302を共にオンにする。
The decoder 306 detects whether the currently fetched instruction is a branch instruction from the data input through the signal line 304, and if it is a branch instruction, sets the control signal line 308i to a high level. The counter 309 inputs the instruction word length of the instruction currently being fetched from the signal line, and when the control signal 223 from the bus control unit 213 becomes high level, the counter 309 decrement/decrement once.
performs an operation to decrement the held contents by -1, and at the same time outputs the decremented contents to the latch circuit 310. Here, when the value of the counter 309 reaches 10", the control signal 311 is set to high level, and the latch circuit 31
0 sets the control signal 312 to a high level when its value becomes %%o #K. Furthermore, in the initial state (at the time of reset), the color/receiver 309 and child circuit 310 have a value of "O#".The control signal line 222 from the bus control unit 213 is connected to This is a control signal that becomes high level when is a fetch cycle, and the control signal line 223 is one cycle lower than the control signal line 222
This is a control signal that becomes high level with a delay corresponding to the amount of time. The two-man AND circuit 313 connects the control signal line 222 and the control signal! 1
312 as an input, the control signal line 222 is at high level, that is, the fetch cycle, and the control signal line 3
12 is at a high level, that is, when the value of the child circuit 310 is ゝゝo〃, the control signal line 314 is set to a high level,
Both gate 1301 and gate 302 are turned on.

ゲー)301及び302はオン状態で内部データバス2
01上の値をそれぞれデータバス303及びデータバス
304へ出力する。2人カアンド回路315は制御信号
線311及び制御信号線308を入力とし、制御信号線
311がハイレベル、すなわちカウンタ309の値がゝ
O“であり、かつ制御信号線308がハイレベル、すな
わち現在フェッチしている命令が分岐命令であるとき、
制御信号線316をハイレベルにする。う、子回路31
7は制御信号線316がハイレベルになると制御信号線
221をロウレベルにし、制御信号線318がロウレベ
ルになるまでロウレベルを出力する。制御信号線318
は分岐先のアドレスが確定し7エツチの再開要求によっ
てロウレベルになる。制御信号線318がロウレベルに
なると、ラッチ回路317は制御信号線221をハイレ
ベルにし、制御信号線316が再びハイレベルになるま
で制御信号線221はハイレベルを出力している。
game) 301 and 302 are on internal data bus 2.
The values on 01 are output to data bus 303 and data bus 304, respectively. The two-person AND circuit 315 receives the control signal line 311 and the control signal line 308 as input, and the control signal line 311 is at a high level, that is, the value of the counter 309 is "O", and the control signal line 308 is at a high level, that is, the current When the instruction being fetched is a branch instruction,
Control signal line 316 is set to high level. U, child circuit 31
7 sets the control signal line 221 to low level when the control signal line 316 becomes high level, and outputs a low level until the control signal line 318 becomes low level. Control signal line 318
The branch destination address is determined and becomes low level by the 7th etching restart request. When the control signal line 318 becomes low level, the latch circuit 317 makes the control signal line 221 high level, and the control signal line 221 outputs a high level until the control signal line 316 becomes high level again.

次に、第3図に示すタイミング図を用いて第2図に示す
ブリ・デコーダ220の動作について説明する。ここで
、リセット後最初にフェッチする命令が分岐命令でない
3バイト命令Aであり、次にフェッチする命令が3バイ
トの命令Bであるものとする。
Next, the operation of the Buri decoder 220 shown in FIG. 2 will be explained using the timing chart shown in FIG. Here, it is assumed that the first instruction to be fetched after reset is a 3-byte instruction A, which is not a branch instruction, and the next instruction to be fetched is a 3-byte instruction B.

まず、リセット直後カウンタ309及びラッチ回路31
0は共に′0“となっており、ラッチ回路310がゝO
“であるため制御信号線312はハイレベルとなってい
る。
First, immediately after reset, the counter 309 and the latch circuit 31
0 are both ``0'', and the latch circuit 310 is ``O''.
", so the control signal line 312 is at a high level.

次に、最初の3バイト命令人の第1バイト目の7エツチ
・サイクルが起ると制御信号線222がハイレベルとな
り、制御信号線222がノ・イレベルの間、2人カアン
ド回路313の出力信号線314がハイレベルとなる。
Next, when the 7th etching cycle of the first byte of the first 3-byte command occurs, the control signal line 222 becomes high level, and while the control signal line 222 is at the no-low level, the output of the two-man AND circuit 313 The signal line 314 becomes high level.

制御信号線314がハイレベルのとき、ゲート301及
びゲート302が共にオンとなり、内部データバス20
1上の第1バイト目がデータバス303及びデータバス
304を通してデコーダ305及び306へ入る。
When the control signal line 314 is at a high level, both the gates 301 and 302 are turned on, and the internal data bus 20
The first byte on data bus 304 enters decoders 305 and 306 through data bus 303 and data bus 304.

デコーダ305では、入力した第1バイト目から命令A
の命令語長(=3)をデコードし、信号線307を通し
てカウンタ309へ命令語長(=3)を出力する。一方
、デコーダ306では入力した第1バイト目から命令A
が分岐命令か否かを判断し、この場合は分岐命令ではな
いため制御信号線308はロウレベルを出力する。カウ
ンタ309は信号線307を通して入力し九命令語長(
=3)を保持し、バス制御部213からの制御信号線2
23がハイレベルになると保持していた値をデクリメン
トすると共にそのデクリメントした値(=2)をラッチ
回路310へ出力する。このとき、ラッチ回路310の
値が12“となるため、制御信号線312はロウレベル
となり、以後制御信号線222がハイレベルとなっても
2人カアンド回路313の出力信号線314はロウレベ
ルのままでゲート301及びゲート302はオフのため
、内部データバス201上のデータはデータIくス30
3及び304には入力されない。カウンタ309はデク
リメントされ九億(=2)を保持し′Cいるが、フェッ
チ・サイクル毎に制御信号線223がハイレベルになる
ため、その都度保持している値をゝゝ−1“するととも
にラッチ回路310ヘテクリメントした値を出力する。
The decoder 305 starts with the instruction A from the input first byte.
The instruction word length (=3) is decoded and the instruction word length (=3) is output to the counter 309 through the signal line 307. On the other hand, the decoder 306 starts with the instruction A from the input first byte.
It is determined whether or not it is a branch instruction. In this case, since it is not a branch instruction, the control signal line 308 outputs a low level. The counter 309 receives input through the signal line 307 and inputs nine instruction word lengths (
=3) and control signal line 2 from the bus control unit 213
When 23 becomes high level, the held value is decremented and the decremented value (=2) is output to the latch circuit 310. At this time, since the value of the latch circuit 310 becomes 12'', the control signal line 312 becomes low level, and even if the control signal line 222 becomes high level thereafter, the output signal line 314 of the two-man AND circuit 313 remains at low level. Since the gates 301 and 302 are off, the data on the internal data bus 201 is transferred to the data bus 30.
3 and 304 are not input. The counter 309 is decremented and holds 900 million (=2), but since the control signal line 223 becomes high level every fetch cycle, the held value is decremented by 1 and each time the control signal line 223 becomes high level. The latch circuit 310 outputs the incremented value.

第3図に示すようK、命令Aの第3バイト目の7エツチ
・サイクルで制御信号223がノ1イレベルとなるとカ
ウンタ309は保持していた値(=1)をデクリメント
するとともにデクリメントした値(=O)をラッチ回路
310へ出力する。ここで再びラッチ回路310の内容
が10“となるため、制御信号線312はノ・イレペル
となり、次の命令Bの第1バイト目の7エツチ・サイク
ルで制御信号線222がハイレベルとなると2人カアン
ド回路313の出力信号線314が/・イレベルとなり
As shown in FIG. 3, when the control signal 223 reaches the 1 level in the 7th etching cycle of the 3rd byte of the instruction A, the counter 309 decrements the value (=1) held by the counter 309 and the decremented value ( =O) is output to the latch circuit 310. Here, the content of the latch circuit 310 becomes 10'' again, so the control signal line 312 becomes a no-repel, and when the control signal line 222 becomes high level at the 7th etch cycle of the first byte of the next instruction B, the The output signal line 314 of the driver AND circuit 313 becomes /.level.

ゲート301及びゲート302がオンして、内部データ
バス201上の命令Bの第1バイト目をデコーダ305
及び306に入力する。デコーダ305では、入力した
第1バイト目から命令Bの命令語長(=2)をデコード
し、信号線307を通してカウンタ309へ命令語長(
=2)を出力する。一方、デコーダ306では、入力し
た第1バイト目から命令Bが分岐命令か否かを判断し、
この場合は分岐命令であったとすると、制御信号線30
8はハイレベルを出力する。カウンタ309は命令Bの
命令語長(=2)を保持し、制御信号線223がハイレ
ベルになると保持していた値をデクリメントするととも
に、デクリメントされた値(=1)をラッチ回路310
へ出力する。
Gates 301 and 302 are turned on, and the first byte of instruction B on internal data bus 201 is read by decoder 305.
and 306. The decoder 305 decodes the instruction word length (=2) of instruction B from the input first byte, and sends the instruction word length (=2) to the counter 309 through the signal line 307.
=2) is output. On the other hand, the decoder 306 determines whether instruction B is a branch instruction from the input first byte,
In this case, if it is a branch instruction, the control signal line 30
8 outputs a high level. The counter 309 holds the instruction word length (=2) of the instruction B, and when the control signal line 223 becomes high level, it decrements the held value and transfers the decremented value (=1) to the latch circuit 310.
Output to.

次に、命令Bの第2バイト目のフェッチ・サイクルで制
御信号223がハイレベルになるとカウンタ309は保
持していた値(=1)をデクリメントすると共にデクリ
メントされた値(二〇)をラッチ回路310へ出力する
。ここでラッチ310の値が10″となるため、制御信
号線311はノ・イレペルとなる。一方、デコーダ30
6の制御信号線308はハイレベルとなっているため、
2人カアンド回路315の出力信号線316も/1イレ
ペルとなる。制御信号線316がハイレベルとなるとラ
ッチ回路317は制御信号線221をロウレベルにする
。制御信号線221は制御信号線318がロウレベルに
なるまでロウレベルを出力する。制御信号線221がロ
ウレベルであるため、フェッチ要求信号線217がハイ
レベルとなりフェッチ要求が発生したとしても制御信号
線221がロウレベルであるため、2人カアンド回路2
18の出力信号線219はロウレベルのままで、パスコ
ントロール213に対しフェッチ要求を行なわない。フ
ェッチ要求は分岐先のアドレスが確定し、制御信号線3
18がロウレベルとなって制御信号線221がハイレベ
ルとなって初めて受付けられる。
Next, when the control signal 223 becomes high level in the fetch cycle of the second byte of instruction B, the counter 309 decrements the held value (=1) and transfers the decremented value (20) to the latch circuit. Output to 310. Here, since the value of the latch 310 is 10'', the control signal line 311 becomes a no-repel. On the other hand, the decoder 30
Since the control signal line 308 of No. 6 is at a high level,
The output signal line 316 of the two-man AND circuit 315 also becomes a /1 level. When the control signal line 316 becomes high level, the latch circuit 317 sets the control signal line 221 to low level. The control signal line 221 outputs a low level until the control signal line 318 becomes low level. Since the control signal line 221 is at low level, even if the fetch request signal line 217 becomes high level and a fetch request occurs, the control signal line 221 is at low level, so the two-man AND circuit 2
The output signal line 219 of No. 18 remains at a low level and does not issue a fetch request to the path control 213. For the fetch request, the branch destination address is determined and the control signal line 3
18 becomes low level and the control signal line 221 becomes high level before it is accepted.

上記実施例のように、外部パスからプロセッサ内部に命
令を取り込む前にブリ・デコーダを設け、現在取り込ん
でいる命令が分岐命令であり、かつ分岐命令と構成する
命令バイトがすべてプロセッサ内部に取り込まれたこと
を検出することでより早い段階で7エツチの中断要求を
出力し、無効な命令フェッチを最小限に抑えることが可
能となる。
As in the above embodiment, a BRI decoder is provided before an instruction is taken into the processor from an external path, and the instruction currently being taken in is a branch instruction, and all instruction bytes making up the branch instruction are taken into the processor. By detecting this, it is possible to output a 7-etch interrupt request at an earlier stage, thereby minimizing invalid instruction fetches.

(発明の効果) 以上説明したように、本発明は内部命令バッファに外部
データバスより命令をフェッチする前段にブリ・デコー
ダを設はフェッチする命令の第1バイト目をデコードし
、デコードした命令が分岐命令である場合、分岐命令を
構成する命令バイトがすべてフェッチされたことを検出
すると、直ちにフェッチの中断要求を出して命令フェッ
チを中断し、分岐命令の実行によって無駄になってしま
う命令フェッチを最小限に抑え、データアクセス待ち時
間を減らし、コンピュータの高速化を計ることが可能と
なるという効果を有する。
(Effects of the Invention) As explained above, the present invention provides a BRI decoder in the internal instruction buffer before fetching an instruction from an external data bus, decodes the first byte of the instruction to be fetched, and reads the decoded instruction. In the case of a branch instruction, when it is detected that all the instruction bytes that make up the branch instruction have been fetched, a fetch interrupt request is immediately issued to interrupt the instruction fetch, and the instruction fetch that would be wasted due to the execution of the branch instruction is stopped. This has the effect of minimizing data access latency, reducing data access latency, and increasing computer speed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のブロック図、第2図は第1
図に示すブリ・デコーダの詳細回路図、第3図は第2図
に示したブリ・デコーダの動作時のタイミング図、第4
図は従来の命令先取り機構を有するCPUのブロック図
である。 1・・・・・・外部データバス、2・・・・・・CPU
% 3・・・・・・外部データバス、4・・・・−CP
U、101.201・・・・・・命令パス、102,2
02・・・・・・内部命令バラ      47ア、1
03,203・・・・・・キュー・リード拳カウンタ、
104.204・・・・・・キュー・ライトφカウンタ
、105.205・・・・・・命令ノ(ス、106゜2
06・・・・・・デコーダ、107,207・・・・−
・マイクロ命令アドレスバス、108,208・・・・
パマイクロプログラム、109,209・・・・・°制
御信号群、110.210・・°°゛°実行ユニット、
111,221・・・・・・フェッチ中断信号線、11
3,213・・・・・・パス制御部、114,115.
2141215・°°°°。 アドレス・データ・パス、116.216・・・・・・
キュー制御部、117,217°°°°°°フェ、チ要
求信号線、118,218°−−−−−2人カアンド回
路、119.219・・・・・・フェッチ要求信号線、
220・・・・・・ブリ・デコーダ、222,223・
・・・・・フエ。 チサイクル信号線、301.302・・・・・・ゲート
、303.304・・・・・・データバス、305.3
06・・・・・・デコーダ、307−°“・°°命令長
信号線、308・・・・・・分岐命令信号線、309・
・・・・・カウンタ、310・・−・・・ラッチ、31
1,312・・・・−°制御信号線。 313°“°・°°2人カアカアンド回路14・・・・
・・制御信号線、315・・・・°・2人カアンド回路
、316・・・・・・制御信号線、317・°°°°°
ラッチ回路、318 °“。 フェッチ再開信号線。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG. 2 is a block diagram of an embodiment of the present invention.
Figure 3 is a detailed circuit diagram of the Buri decoder shown in Figure 2. Figure 3 is a timing diagram of the operation of the Buri decoder shown in Figure 2.
The figure is a block diagram of a CPU having a conventional instruction prefetch mechanism. 1...External data bus, 2...CPU
% 3...External data bus, 4...-CP
U, 101.201...Instruction path, 102,2
02...Internal command rose 47a, 1
03,203...Cue lead fist counter,
104.204...Queue write φ counter, 105.205...Instruction no(s), 106°2
06...Decoder, 107,207...-
・Microinstruction address bus, 108, 208...
microprogram, 109,209...°control signal group, 110.210...°°゛°execution unit,
111, 221...Fetch interrupt signal line, 11
3,213...path control unit, 114,115.
2141215・°°°°. Address data path, 116.216...
Queue control unit, 117,217°°°°°°F, fetch request signal line, 118,218°--Two-person AND circuit, 119,219...Fetch request signal line,
220... Buri decoder, 222, 223.
...Hue. cycle signal line, 301.302...gate, 303.304...data bus, 305.3
06...Decoder, 307-°"・°°instruction length signal line, 308...Branch instruction signal line, 309.
... Counter, 310 ... Latch, 31
1,312...-° control signal line. 313°“°・°°2 person Kaakaand circuit 14...
・・Control signal line, 315・・・・°・Two-person circuit, 316・・・・Control signal line, 317・°°°°°
Latch circuit, 318 °“. Fetch resume signal line.

Claims (1)

【特許請求の範囲】 情報処理装置の命令先取り方式において、先取りした命
令を記憶しておく記憶手段と、先 取りした命令が前記記憶手段に記憶される前に先取りし
た命令の命令語長を検出する検出手段と、同じく先取り
した命令が前記記憶手段に記憶される前に先取りした命
令が少なくとも分岐命令であることを検出するデコード
手段 と、前記検出手段と前記デコード手段からの制御情報に
より、前記分岐命令を構成するバイトがすべて前記記憶
手段に記憶されるとすぐに命令先取りの中断を要求する
制御手段とを有することを特徴とする命令先取り制御方
式。
[Claims] In an instruction prefetching method for an information processing device, there is provided a storage means for storing a prefetched instruction, and an instruction word length of the prefetched instruction is detected before the prefetched instruction is stored in the storage means. a detecting means, a decoding means for detecting that the prefetched instruction is at least a branch instruction before the prefetched instruction is stored in the storage means, and control information from the detecting means and the decoding means to detect the branch An instruction prefetch control system comprising: control means for requesting interruption of instruction prefetch as soon as all bytes constituting the instruction are stored in the storage means.
JP25608684A 1984-12-04 1984-12-04 Instruction advance fetch control system Pending JPS61133439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25608684A JPS61133439A (en) 1984-12-04 1984-12-04 Instruction advance fetch control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25608684A JPS61133439A (en) 1984-12-04 1984-12-04 Instruction advance fetch control system

Publications (1)

Publication Number Publication Date
JPS61133439A true JPS61133439A (en) 1986-06-20

Family

ID=17287696

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25608684A Pending JPS61133439A (en) 1984-12-04 1984-12-04 Instruction advance fetch control system

Country Status (1)

Country Link
JP (1) JPS61133439A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148329A (en) * 1986-12-11 1988-06-21 Nec Ic Microcomput Syst Ltd Instruction prefetch control system
JPH01263727A (en) * 1988-04-13 1989-10-20 Mitsubishi Electric Corp Data processor
US6934829B2 (en) 1991-07-08 2005-08-23 Seiko Epson Corporation High-performance, superscalar-based computer system with out-of-order instruction execution

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148329A (en) * 1986-12-11 1988-06-21 Nec Ic Microcomput Syst Ltd Instruction prefetch control system
JPH01263727A (en) * 1988-04-13 1989-10-20 Mitsubishi Electric Corp Data processor
US6934829B2 (en) 1991-07-08 2005-08-23 Seiko Epson Corporation High-performance, superscalar-based computer system with out-of-order instruction execution
US6986024B2 (en) 1991-07-08 2006-01-10 Seiko Epson Corporation High-performance, superscalar-based computer system with out-of-order instruction execution

Similar Documents

Publication Publication Date Title
KR910006144B1 (en) Pipeline processor with smooth connection
JPS60168238A (en) Instruction control system
KR970005021A (en) A data processor capable of executing two instructions simultaneously
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JPS61133439A (en) Instruction advance fetch control system
EP0385136B1 (en) Microprocessor cooperating with a coprocessor
KR940003696B1 (en) Microprocessor
JPS61211744A (en) Instruction prefetch control circuit
JP2532560B2 (en) Data processing device for high-performance exception handling
JPH04188226A (en) Instruction pre-read controller
JP2504191B2 (en) Microprocessor
JP3184363B2 (en) Microprocessor device
JP2636074B2 (en) Microprocessor
TW202144998A (en) Device and method for controlling command sequence
JPS62151936A (en) Cache circuit built in microprocessor
JP2766114B2 (en) Instruction prefetch device
JPH02307130A (en) Execution controller for instruction pre-read type microprocessor
JPH0364903B2 (en)
JPH04162135A (en) Data processor
JPH01193943A (en) Micro computer
JPH01234936A (en) Instruction prefetch suppressing device
JPH0752402B2 (en) Data processing device
JPH0795288B2 (en) Microcomputer
JPH04213120A (en) Information processor
JPS62264332A (en) Preread control circuit for instruction