JPH0421129A - Instruction cache device - Google Patents

Instruction cache device

Info

Publication number
JPH0421129A
JPH0421129A JP2126165A JP12616590A JPH0421129A JP H0421129 A JPH0421129 A JP H0421129A JP 2126165 A JP2126165 A JP 2126165A JP 12616590 A JP12616590 A JP 12616590A JP H0421129 A JPH0421129 A JP H0421129A
Authority
JP
Japan
Prior art keywords
compartment
output
instruction
selection
register
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
JP2126165A
Other languages
Japanese (ja)
Inventor
Atsushi Yamazaki
篤 山崎
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 JP2126165A priority Critical patent/JPH0421129A/en
Publication of JPH0421129A publication Critical patent/JPH0421129A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To shorten a processing time by reading out data from a data matrix in a most lately used compartment and simultaneously reading out a branched instruction obtained at the time of satisfying a branching condition from a data matrix in another compartment. CONSTITUTION:A compartment selecting register 25 stores the compartment number of a most lately used compartment and outputs a positive output 14 and an inverted output 215. A bit deciding circuit 10 inputs the outputs 107, 108 of the 1st and 2nd comparators 13, 14, and if the address matrix of the compartment in the output 215 coincides with the outputs 107, 108 when a branch instruction code 201 is '1' (when the branch instruction is executed), a data selection signal 111 for selecting the compartment of the data matrix corresponding to the compartment concerned is outputted. When the branch condition is satisfied at the time of executing the branch instruction, an output data selecting signal selecting circuit 27 sends the signal 111 to an output data selecting circuit 17 as a data selection signal 216. Consequently, time from the satisfaction of the branching condition up to the sending of the branched instruction can be shortened.

Description

【発明の詳細な説明】 〔産業上の利用分野1 本発明はキャッシュ装置に関し、特に情報処理装置に用
いられる命令キャッシュ装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application 1] The present invention relates to a cache device, and particularly to an instruction cache device used in an information processing device.

〔従来の技術〕[Conventional technology]

第2図は、2個のコンパートメントを有する従来の命令
キャッシュ装置のブロック図である。
FIG. 2 is a block diagram of a conventional instruction cache device having two compartments.

まず、分岐命令実行等によって命令アドレスが書き代わ
ると、演算装置(図示せず)から送られた命令アドレス
121が命令アドレスレジスタ入力選択回路40を経て
命令アドレスレジスタ38に書込まれる。その後、命令
アドレスレジスタ38の出力101の中位部分103で
アドレス行列の各コンパートメント31.32を読出す
。同時に、命令アドレスレジスタ38の出力101の中
位部分と下位部分とを結合した値102でデータ行列の
各コンパートメント35.36を読出す。アドレス行列
コンパートメント31.32の出力105,106はそ
れぞれ比較回路3334によって命令アドレスレジスタ
38の出力101の上位部分104と比較される。ヒツ
ト判定回路30は、比較回路33.34の比較結果10
7 108を入力し、もし、アドレス行列コンパートメ
ント31の出力が一致していれば、データ行列コンパー
トメント35を選択するように、逆に、アドレス行列コ
ンパートメント32の出力が一致していれば、データ行
列コンパートメント36を選択するように、出力データ
選択回路37に対してデータ選択信号111を送る。そ
して出力データ選択回路37の出力115は演算装置に
送られる。命令アドレスレジスタ38の出力101は加
算器39によって、演算装置から送られた命令後長11
3と加算され、加算結果114は、次の命令取り出しの
ために、命令アドレスレジスタ38に格納される。もし
、アドレス行列コンパートメント31.32のいずれも
一致していなければヒツト判定回路30は、主記憶装置
(図示せず)にデータ読出し要求112を送る。主記憶
装置から読出しデータ116が送られてくると、予め決
められた置換コンパートメント決定方式(例えばLRU
方式)によって決定されたコンパートメント、例えばデ
ータ行列コンパートメント35 (36)に対して、デ
ータ行列更新指示117.118を送り、読出しデータ
116を格納させる。同時に、対応するアドレス行列コ
ンパートメント31 (32)に対してアドレス行列更
新指示119(120)を送り、命令アドレスレジスタ
38の出力101の上位部分104を格納させる。
First, when an instruction address is rewritten due to execution of a branch instruction or the like, an instruction address 121 sent from an arithmetic unit (not shown) is written to the instruction address register 38 via the instruction address register input selection circuit 40. Thereafter, each compartment 31 , 32 of the address matrix is read at the middle part 103 of the output 101 of the instruction address register 38 . At the same time, each compartment 35,36 of the data matrix is read out with a value 102 which is the combination of the middle part and the lower part of the output 101 of the instruction address register 38. The outputs 105, 106 of the address matrix compartments 31, 32 are each compared with the upper part 104 of the output 101 of the instruction address register 38 by a comparator circuit 3334. The hit determination circuit 30 compares the comparison results 10 of the comparison circuits 33 and 34.
7 108, and if the outputs of the address matrix compartment 31 match, the data matrix compartment 35 is selected; conversely, if the outputs of the address matrix compartment 32 match, the data matrix compartment is selected. A data selection signal 111 is sent to the output data selection circuit 37 to select the output data selection circuit 36. The output 115 of the output data selection circuit 37 is then sent to the arithmetic unit. The output 101 of the instruction address register 38 is output by the adder 39 to the instruction length 11 sent from the arithmetic unit.
3, and the addition result 114 is stored in the instruction address register 38 for fetching the next instruction. If none of the address matrix compartments 31, 32 match, the hit determination circuit 30 sends a data read request 112 to the main memory (not shown). When read data 116 is sent from the main storage device, a predetermined replacement compartment determination method (for example, LRU
A data matrix update instruction 117, 118 is sent to the compartment determined by the data matrix compartment 35 (36), for example, the data matrix compartment 35 (36), to cause the read data 116 to be stored. At the same time, an address matrix update instruction 119 (120) is sent to the corresponding address matrix compartment 31 (32) to store the upper part 104 of the output 101 of the instruction address register 38.

[発明が解決しようとする課題] 上述した従来の命令キャッシュ装置は、分岐条件の成立
確定で分岐先の命令取り出しのための命令キャッシュの
検索が行なえないため、分岐条件が成立してから分岐先
の命令を演算装置に送るまでに1サイクルかかるという
欠点がある。
[Problems to be Solved by the Invention] The conventional instruction cache device described above cannot search the instruction cache for retrieving the branch destination instruction after the branch condition has been established. The disadvantage is that it takes one cycle to send the instruction to the arithmetic unit.

本発明の目的は、分岐条件成立してから分岐先の命令を
演算装置に送るまでの平均サイクル数が1サイクルより
短かい命令キャッシュ装置を提供することである。
SUMMARY OF THE INVENTION An object of the present invention is to provide an instruction cache device in which the average number of cycles from the establishment of a branch condition to the sending of a branch destination instruction to an arithmetic unit is less than one cycle.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の命令キャッシュ装置は、 第1、第2の命令アドレスレジスタと、該命令アドレス
レジスタの出力と命令語長とを加算する加算器と、 該加算器の出力または命令アドレス入力データを選択し
、それぞれ第1、第2の命令アドレスレジスタに供給す
る第1、第2の命令アドレスレジスタ入力選択回路と、 第1、第2の命令アドレスレジスタの出力を選択する第
1、第2の命令アドレスレジスタ出力選択回路と、 第1、第2のコンパートメントからなり、それぞれ第1
の命令アドレスレジスタ出力選択回路、第2の命令アド
レスレジスタ出力選択回路の出力のアドレス行列エント
リフィールドで読出されるアドレス行列と、 アドレス行列の第1、第2のコンパートメントにそれぞ
れ対応する第1、第2のコンパートメントからなり、そ
れぞれ第1の命令アドレスレジスタ出力選択回路、第2
の命令アドレスレジスタ出力選択回路の出力のデータ行
列エントリフィールドで読出されるデータ行列と、 前記データ行列の第1のコンパートメントまたは第2の
コンパートメントの出力を選択し、演算装置に送る出力
データ選択回路と、 第1の命令アドレスレジスタ選択回路の出力のアドレス
行列キーフィールドとアドレス行列の第1のコンパート
メントの出力を比較する第1の比較回路と、 第2の命令アドレスレジスタ選択回路の出力のアドレス
行列キーフィールドとアドレス行列の第2のコンパート
メントのaカを比較する第2の比較回路と、 最も最近使用されたコンパートメントのコンパートメン
ト番号を記憶するコンパートメント選択レジスタと、 第1、第2の比較回路の出力を入力し、分岐命令以外の
命令実行時には、一致を検出した比較回路に対応するデ
ータ行列のコンパートメントを選択するデータ選択信号
を出力するとともに、一致が検8された前記コンパート
メント選択レジスタに更新指示を送り、いずれの比較回
路からも一致が検出されない場合には、主記憶装置にデ
ータ読出し要求を送り、主記憶装置から読出しデータが
送られてくると、予め決められた置換コンパートメント
決定方式によって決定されたコンパートメントのデータ
行列に対してデータ行列更新指示を送って前記読出しデ
ータを格納させるとともに対応するアドレス行列のコン
パートメントに対してアドレス行列更新指示を送り、対
応するアドレスレジスタ出力選択回路のアドレス行列キ
ーフィールドを格納させ、同時に読出しデータを格納し
たコンパートメントのコンパートメント番号を記憶する
ようにコンパートメント選択レジスタに更新指示を送り
、分岐命令実行時には、コンパートメント選択レジスタ
が示さない方のコンパートメントのアドレス行列が一致
していれば該コンパートメントと対応するデータ行列の
コンパートメントを選択するデータ選択信号を出力し、
分岐条件成立時にコンパートメント選択レジスタが示さ
ない方のアドレス行列のコンパートメントの出力が一致
していない場合、または、分岐条件成立時にコンパート
メント選択レジスタが示す方のアドレス行列のコンパー
トメントの出力が一致していない場合、コンパートメン
ト選択レジスタが他方のコンパートメントを示すように
、コンパートメント選択レジスタ更新指示を送り、分岐
命令実行時の上記動作をもう一度繰り返させ、それでも
一致しない場合、主記憶装置にデータ読出し要求を送り
、主記憶装置から読出しデータが送られてくると、予め
決められた置換コンパートメント決定方式によって決定
されたコンパートメントに対してデータ行列更新指示を
送り、読出しデータを格納させ、同時に対応するアドレ
ス行列のコンパートメントに対してアドレス行列更新指
示を送り、第1の命令アドレスレジスタ出力選択回路の
出力のアドレス行列キーフィールドを格納させ、同時に
コンパートメント選択レジスタに対して、データを格納
した方のコンパートメントのコンパートメント番号を記
憶するように、コンパートメント選択レジスタ更新指示
を送るヒツト判定回路と、分岐命令以外の命令実行時に
は、コンパートメント選択レジスタが第1のコンパート
メントを示せば第1、第2の命令アドレスレジスタ入力
選択回路が共に加算器の出力を選択し、第1、第2の命
令アドレスレジスタ出力選択回路が共に第1の命令アド
レスレジスタの出力を選択し、コンパートメント選択レ
ジスタが第2のコンパートメントを示せば第1、第2の
命令アドレスレジスタ入力選択回路が共に加算器の出力
を選択し、第1、第2の命令アドレスレジスタ出力選択
回路が共に第2の命令アドレスレジスタの出力を選択し
、分岐命令の実行時には、コンパートメント選択レジス
タが第1のコンパートメントを示せば第1、第2の命令
アドレスレジスタ入力選択回路がそれぞれ加算器の出力
、演算装置から送られてきた命令アドレスを選択し、第
1、第2の命令アドレスレジスタ出力選択回路がそれぞ
れ第1、第2の命令アドレスレジスタの出力を選択し、
コンパートメント選択レジスタが第2のコンパートメン
トを示せば第1、第2の命令アドレスレジスタ入力選択
回路がそれぞれ演算装置から送られてきた命令アドレス
、加算器の出力を選択し、第1、第2の命令アドレスレ
ジスタ出力選択回路がそれぞれ第2、第1の命令アドレ
スレジスタの出力を選択するように第1、第2の命令ア
ドレスレジスタ入力選択回路と第1、第2の命令アドレ
スレジスタ出力選択回路を制御する選択回路と、 分岐命令以外の命令実行時には、ヒツト判定回路から出
力されたデータ選択信号を出力データ選択回路に送り、
分岐命令実行時で、かつ分岐条件成立ならばヒツト判定
回路から出力されたデータ選択信号を出力データ選択回
路に送り、分岐命令実行時で、かつ分岐条件不成立なら
ばコンパート選択レジスタが示すコンパートメントを選
択するデータ選択信号を出力データ選択回路に送る出力
データ選択信号選択回路とを有している。
The instruction cache device of the present invention includes first and second instruction address registers, an adder that adds the output of the instruction address register and the instruction word length, and an adder that selects the output of the adder or instruction address input data. , first and second instruction address register input selection circuits that supply the first and second instruction address registers, respectively, and first and second instruction addresses that select outputs of the first and second instruction address registers. It consists of a register output selection circuit, a first compartment, and a second compartment, each with a first compartment.
the instruction address register output selection circuit of the second instruction address register output selection circuit, the address matrix read in the address matrix entry field of the output of the second instruction address register output selection circuit; It consists of two compartments, the first instruction address register output selection circuit, and the second compartment.
a data matrix read out in a data matrix entry field of an output of an instruction address register output selection circuit; and an output data selection circuit that selects an output of a first compartment or a second compartment of the data matrix and sends it to an arithmetic unit. , a first comparator circuit that compares the address matrix key field of the output of the first instruction address register selection circuit with the output of the first compartment of the address matrix; and the address matrix key of the output of the second instruction address register selection circuit. a second comparator circuit that compares the a of the second compartment of the field and address matrix; a compartment selection register that stores the compartment number of the most recently used compartment; and an output of the first and second comparator circuits. input, and when executing an instruction other than a branch instruction, it outputs a data selection signal that selects the compartment of the data matrix corresponding to the comparison circuit that detected a match, and also sends an update instruction to the compartment selection register where a match was detected. , if no match is detected from any of the comparison circuits, a data read request is sent to the main memory, and when the read data is sent from the main memory, it is determined by a predetermined replacement compartment determination method. A data matrix update instruction is sent to the data matrix of the compartment to store the read data, and an address matrix update instruction is sent to the compartment of the corresponding address matrix to update the address matrix key field of the corresponding address register output selection circuit. At the same time, an update instruction is sent to the compartment selection register to store the compartment number of the compartment in which the read data is stored, and when the branch instruction is executed, if the address matrix of the compartment not indicated by the compartment selection register matches. outputting a data selection signal for selecting a compartment of the data matrix corresponding to the compartment;
If the outputs of the compartments in the address matrix not indicated by the compartment selection register do not match when the branch condition is met, or if the outputs of the compartments in the address matrix indicated by the compartment selection register do not match when the branch condition is met. , sends a compartment selection register update instruction so that the compartment selection register indicates the other compartment, and repeats the above operation when executing the branch instruction once again. If they still do not match, a data read request is sent to the main memory, and the main memory When read data is sent from the device, a data matrix update instruction is sent to the compartment determined by a predetermined replacement compartment determination method to store the read data, and at the same time, the data matrix is updated to the compartment in the corresponding address matrix. Sends an address matrix update instruction to store the address matrix key field of the output of the first instruction address register output selection circuit, and at the same time stores the compartment number of the compartment in which data is stored in the compartment selection register. , a hit determination circuit that sends a compartment selection register update instruction, and when an instruction other than a branch instruction is executed, if the compartment selection register indicates the first compartment, the first and second instruction address register input selection circuits both output the output of the adder. is selected, the first and second instruction address register output selection circuits both select the output of the first instruction address register, and if the compartment selection register indicates the second compartment, the first and second instruction address registers are selected. The input selection circuits both select the output of the adder, the first and second instruction address register output selection circuits both select the output of the second instruction address register, and when a branch instruction is executed, the compartment selection register selects the output of the second instruction address register. 1 compartment, the first and second instruction address register input selection circuits select the output of the adder and the instruction address sent from the arithmetic unit, respectively, and the first and second instruction address register output selection circuits select the output of the adder and the instruction address sent from the arithmetic unit, respectively. select the outputs of the first and second instruction address registers, respectively,
If the compartment selection register indicates the second compartment, the first and second instruction address register input selection circuits select the instruction address sent from the arithmetic unit and the output of the adder, respectively, and select the first and second instructions. Controls the first and second instruction address register input selection circuits and the first and second instruction address register output selection circuits so that the address register output selection circuits select the outputs of the second and first instruction address registers, respectively. When an instruction other than a branch instruction is executed, the data selection signal output from the hit determination circuit is sent to the output data selection circuit.
When a branch instruction is executed and the branch condition is met, the data selection signal output from the hit judgment circuit is sent to the output data selection circuit, and when the branch instruction is executed and the branch condition is not met, the compartment indicated by the compartment selection register is selected. and an output data selection signal selection circuit that sends a data selection signal to the output data selection circuit.

[作 用1 分岐命令実行で分岐条件不成立の場合、分岐命令の後続
命令はコンパートメント選択レジスタが示す最も最近使
用したコンパートメントのデータ行列から読出し、分岐
条件成立時の分岐先の命令はそれ以外のコンパートメン
トのデータ行列から同時に読出すので、分岐条件が成立
してから分岐先の命令を演算装置に送るまでの時間が1
サイクルより短かくなる。
[Function 1: When a branch condition is not met when a branch instruction is executed, the instruction following the branch instruction is read from the data matrix of the most recently used compartment indicated by the compartment selection register, and the branch destination instruction when the branch condition is met is read from the data matrix of the most recently used compartment indicated by the compartment selection register. Since data is read from the data matrix simultaneously, the time from when the branch condition is satisfied to when the branch destination instruction is sent to the arithmetic unit is 1.
shorter than the cycle.

[実施例] 次に、本発明の実施例について図面を参照して説明する
[Example] Next, an example of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例の命令キャッシュ装置のブロ
ック図である。
FIG. 1 is a block diagram of an instruction cache device according to an embodiment of the present invention.

加算器19は、命令アドレスレジスタ18または23の
出力と命令語長113とを加算する。第1、第2の命令
アドレスレジスタ入力選択回路20.22は加算器19
の出力114または命令アドレス入力データ121を選
択し、出力202.203をそれぞれ第1、第2の命令
アドレスレジスタ1B、23に供給する。第1、第2の
命令アドレスレジスタ出力選択回路21.24は第1、
第2の命令アドレスレジスタ18.23の出力204,
205を選択する。アドレス行列は、第11第2のコン
パートメント11.12からなり、それぞれ第1の命令
アドレスレジスタ出力選択回路21、第2の命令アドレ
スレジスタ出力選択回路24の出力206,207の中
位部分210211で読出される。データ行列は、アド
レス行列の第1、第2のコンパートメント11゜12に
それぞれ対応する第1、第2のコンパートメント15.
16からなり、それぞれ第1の命令アドレスレジスタ出
力選択回路21、第2の命令アドレスレジスタ出力選択
回路24の出力206.207の中位部分と下位部分を
結合した値212213で読出される。出力データ選択
回路17は、データ行列の第1のコンパートメント15
または第2のコンパートメント16の出力109.11
0を選択し、演算装置(図示せず)に出力115を送る
。第1の比較回路11は第1の命令アドレスレジスタ選
択回路21の出力206の上位部分208とアドレス行
列の第1のコンパートメント11の出力105を比較す
る。
Adder 19 adds the output of instruction address register 18 or 23 and instruction word length 113. The first and second instruction address register input selection circuits 20 and 22 are connected to the adder 19.
output 114 or instruction address input data 121 and supplies outputs 202 and 203 to the first and second instruction address registers 1B and 23, respectively. The first and second instruction address register output selection circuits 21.24
Output 204 of second instruction address register 18.23,
Select 205. The address matrix consists of eleven second compartments 11.12, which are read out at the middle part 210211 of the outputs 206, 207 of the first instruction address register output selection circuit 21 and the second instruction address register output selection circuit 24, respectively. be done. The data matrix has first and second compartments 15 . . . corresponding to the first and second compartments 11 , 12 of the address matrix, respectively.
16, and are read as a value 212213 which is a combination of the middle part and the lower part of the outputs 206 and 207 of the first instruction address register output selection circuit 21 and the second instruction address register output selection circuit 24, respectively. The output data selection circuit 17 selects the first compartment 15 of the data matrix.
or the output 109.11 of the second compartment 16
0 and sends output 115 to a computing device (not shown). The first comparison circuit 11 compares the upper part 208 of the output 206 of the first instruction address register selection circuit 21 with the output 105 of the first compartment 11 of the address matrix.

第2の比較回路14は、第2の命令アドレスレジスタ選
択回路24の出力207の上位部分209とアドレス行
列の第2のコンパートメント12の出力106を比較す
る。コンパートメント選択レジスタ25は、最も最近使
用されたコンパートメントのコンパートメント番号(第
1のコンパートメントはO1第2のコンパートメントは
l)を記憶し、正出力214と反転出力215を出力す
る。ヒツト判定回路10は、第1、第2の比較回路13
.14の出力107,108を入力し、分岐命令デコー
ド信号201が”0”の時(分岐命令以外の命令実行時
)には、一致を検出した比較回路に対応するデータ行列
のコンパートメントを選択するデータ選択信号111を
出力するとともに、一致が検出された前記コンパートメ
ントのコンパートメント番号を記憶するようにコンパー
トメント選択レジスタ25に更新指示218を送り、い
ずれの比較回路13.14からも一致が検出されない場
合には、主記憶装置にデータ読出し要求112を送り、
主記憶装置から読出しデータ116が送られてくると、
予め決められた置換コンパートメント決定方式によって
決定されたコンパートメントのデータ行列に対してデー
タ行列更新指示120または118を送って前記読出し
データ116を格納させるとともに対応するアドレス行
列のコンパートメントに対してアドレス行列更新指示1
19または120を送り、対応する命令アドレスレジス
タ出力選択回路21または22の上位部分208または
209を格納させ、同時に読出しデータ116を格納し
たコンパートメントのコンパートメント番号を記憶する
ようにコンパートメント選択レジスタ25に更新指示2
18を送り、分岐命令コード信号201が”1”のとき
(分岐命令実行時)には、コンパートメント選択レジス
タ25の反転出力215のコンパートメントのアドレス
行列が一致していれば該コンパートメントと対応するデ
ータ行列のコンパートメントを選択するデータ選択信号
111を出力し、分岐条件成立時にコンパートメント選
択レジスタ25が示さない(反転出力215)のアドレ
ス行列のコンパートメントの出力が一致していない場合
、または、分岐条件不成立時にコンパートメント選択レ
ジスタ25が示す方のアドレス行列のコンパートメント
の出力が一致していない場合、コンパートメント選択レ
ジスタ25の値を反転するように、コンパートメント選
択レジスタ更新指示218を送り、上記分岐命令実行時
の動作をもう一度繰り返させ、それでも一致しない場合
、主記憶装置にデータ読出し要求112を送り、主記憶
装置から読出しデータ116が送られてくると、予め決
められた置換コンパートメント決定方式によって決定さ
れたコンパートメントに対してデータ行列更新指示11
7を送り、読出しデータ116を格納させ、同時に、対
応するアドレス行列のコンパートメントに対してアドレ
ス行列更新指示119または120を送り、第1の命令
アドレスレジスタ出力選択回路21の出力206の上位
部分208を格納させ、同時にコンパ−トメント選択レ
ジスタ25に対して読出しデータ116を格納した方の
コンパートメントのコンパートメント番号を記憶するよ
うに、コンパートメント選択レジスタ更新指示218を
送る。選択回路26は、分岐命令以外の命令実行時には
、コンパートメント選択レジスタ25の出力214が0
であれば第1、第2の命令アドレスレジスタ入力選択回
路20.22が共に加算器I9の出力114を選択し、
第1、第2の命令アドレスレジスタ出力選択回路21.
24が共に第1の命令アドレスレジスタ18の出力を選
択し、コンパートメント選択レジスタ25の正出力21
4カ月であれば第1、第2の命令アドレスレジスタ入力
選択回路20.22が共に加算器19の出力114を選
択し、第1、第2の命令アドレスレジスタ出カ遺択回路
21.24が共に第2の命令アドレスレジスタ25の出
力205を選択し、分岐命令の実行時には、コンパート
メント選択レジスタ25の正比力214がOであれば第
1、第2の命令アドレスレジスタ入力選択回路20.2
2がそれぞれ加算器19の出力114、演算装置から送
られてきた命令アドレス121を選択し、第1、第2の
命令アドレスレジスタ出力選択回路21.24がそれぞ
れ第1、第2の命令アドレスレジスタ18.23の出力
104,205を選択し、コンパートメント選択レジス
タ25の正比力214が1であれば第1、第2の命令ア
ドレスレジスタ入力選択回路20.22がそれぞれ演算
装置から送られてきた命令アドレス121、加算器19
の出力114を選択し、第1、第2の命令アドレスレジ
スタ出力選択回路21.24がそれぞれ第2、第1の命
令アドレスレジスタ21.18の出力205.204を
選択するように、第1、第2の命令アドレスレジスタ入
力選択回路20.22と第1、第2の命令アドレスレジ
スタ出力選択回路21.24を制御する。出力データ選
択信号選択回路27は分岐命令以外の命令実行時には、
ヒツト判定回路10から出力されたデータ選択信号11
4を出力データ選択回路17にデータ選択信号116と
して送り、分岐命令実行時で、かつ分岐条件成立ならば
、ヒツト判定回路10から出力されたデータ選択信号1
11をデータ選択信号216として出力データ選択回路
17に送り、分岐命令実行時で、かつ分岐条件不成立な
らばコンパート選択レジスタ25の正出力214が示す
コンパートメントを選択するデータ選択信号216を出
力データ選択回路I7に送る。
The second comparison circuit 14 compares the upper part 209 of the output 207 of the second instruction address register selection circuit 24 with the output 106 of the second compartment 12 of the address matrix. The compartment selection register 25 stores the compartment number of the most recently used compartment (the first compartment is O1 and the second compartment is I), and outputs a positive output 214 and an inverted output 215. The hit determination circuit 10 includes first and second comparison circuits 13
.. 14 outputs 107 and 108 are input, and when the branch instruction decode signal 201 is "0" (when an instruction other than a branch instruction is executed), data that selects the compartment of the data matrix corresponding to the comparison circuit that has detected a match is input. While outputting the selection signal 111, an update instruction 218 is sent to the compartment selection register 25 to store the compartment number of the compartment in which a match has been detected, and if a match is not detected from any of the comparison circuits 13 and 14, , sends a data read request 112 to the main storage device,
When read data 116 is sent from the main storage device,
A data matrix update instruction 120 or 118 is sent to the data matrix of the compartment determined by a predetermined replacement compartment determination method to store the read data 116, and an address matrix update instruction is sent to the compartment of the corresponding address matrix. 1
19 or 120 to store the upper part 208 or 209 of the corresponding instruction address register output selection circuit 21 or 22, and at the same time instruct the compartment selection register 25 to update the compartment number of the compartment in which the read data 116 is stored. 2
18, and when the branch instruction code signal 201 is "1" (when executing a branch instruction), if the address matrix of the compartment of the inverted output 215 of the compartment selection register 25 matches, the data matrix corresponding to the compartment is sent. If the compartment selection register 25 does not indicate (inverted output 215) when the branch condition is met and the outputs of the compartments in the address matrix do not match, or when the branch condition is not met, the compartment is selected. If the outputs of the compartments in the address matrix indicated by the selection register 25 do not match, a compartment selection register update instruction 218 is sent to invert the value of the compartment selection register 25, and the operation at the time of executing the branch instruction described above is repeated. If the data still does not match after repeated attempts, a data read request 112 is sent to the main storage, and when the read data 116 is sent from the main storage, the data is stored in the compartment determined by a predetermined replacement compartment determination method. Queue update instruction 11
7 to store the read data 116, and at the same time send an address matrix update instruction 119 or 120 to the corresponding compartment of the address matrix, so that the upper part 208 of the output 206 of the first instruction address register output selection circuit 21 is At the same time, a compartment selection register update instruction 218 is sent to the compartment selection register 25 to store the compartment number of the compartment in which the read data 116 is stored. The selection circuit 26 sets the output 214 of the compartment selection register 25 to 0 when executing an instruction other than a branch instruction.
If so, both the first and second instruction address register input selection circuits 20.22 select the output 114 of the adder I9,
First and second instruction address register output selection circuits 21.
24 together select the output of the first instruction address register 18 and the positive output 21 of the compartment selection register 25.
If it is four months, both the first and second instruction address register input selection circuits 20.22 select the output 114 of the adder 19, and the first and second instruction address register output selection circuits 21.24 select the output 114 of the adder 19. Both select the output 205 of the second instruction address register 25, and when a branch instruction is executed, if the direct ratio force 214 of the compartment selection register 25 is O, the first and second instruction address register input selection circuits 20.2
2 selects the output 114 of the adder 19 and the instruction address 121 sent from the arithmetic unit, respectively, and the first and second instruction address register output selection circuits 21 and 24 select the first and second instruction address registers, respectively. 18.23 outputs 104 and 205 are selected, and if the direct ratio force 214 of the compartment selection register 25 is 1, the first and second instruction address register input selection circuits 20 and 22 select the instructions sent from the arithmetic unit. address 121, adder 19
, and the first and second instruction address register output selection circuits 21.24 select the outputs 205.204 of the second and first instruction address registers 21.18, respectively. It controls the second instruction address register input selection circuit 20.22 and the first and second instruction address register output selection circuits 21.24. When the output data selection signal selection circuit 27 executes an instruction other than a branch instruction,
Data selection signal 11 output from hit determination circuit 10
4 is sent to the output data selection circuit 17 as the data selection signal 116, and when the branch instruction is executed and the branch condition is satisfied, the data selection signal 1 output from the hit determination circuit 10 is sent to the output data selection circuit 17.
11 as a data selection signal 216 to the output data selection circuit 17, and when a branch instruction is executed and the branch condition is not satisfied, the data selection circuit outputs a data selection signal 216 that selects the compartment indicated by the positive output 214 of the compartment selection register 25. Send to I7.

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

(1)まず、分岐命令以外の命令実行時について説明す
る。
(1) First, the execution of instructions other than branch instructions will be explained.

この場合、演算装置から送られた分岐命令デコード信号
201がOであるため、選択回路26はその出力217
としてコンパートメント選択レジスタ25の正出力21
4を選択する。したがって、そのときのコンパートメン
ト選択レジスタ25の値が、例えば”0”であれば第1
、第2の命令アドレスレジスタ入力選択回路20.22
は共に加算器19の出力114を、第1、第2の命令ア
ドレスレジスタ出力選択回路21.24は共に第1の命
令レジスタ18の出力204をそれぞれ選択する。そし
て、第1の命令アドレスレジスタ出力選択回路21の出
力206の中位部分210でアドレス行列の第1のコン
パートメント11を読出す、同時に、第1の命令アドレ
スレジスタ出力選択回路21の出力20Bの中位部分と
下位部分とを結合した値212でデータ行列の第1のコ
ニ/バー)メント15を読出す。アドレス行列コンパー
トメント11の出力105は比較回路13によって、第
1の命令アドレスレジスタ出力選択回路21の出力20
6の上位部分208と比較される。また、第2の命令ア
ドレスレジスタ出力選択回路24の出力207の中位部
分211でアドレス行列の第2のコンパートメント12
を読出す。
In this case, since the branch instruction decode signal 201 sent from the arithmetic unit is O, the selection circuit 26 outputs its output 217.
as the positive output 21 of the compartment selection register 25
Select 4. Therefore, if the value of the compartment selection register 25 at that time is, for example, "0", the first
, second instruction address register input selection circuit 20.22
Both select the output 114 of the adder 19, and both the first and second instruction address register output selection circuits 21.24 select the output 204 of the first instruction register 18. Then, the first compartment 11 of the address matrix is read at the middle part 210 of the output 206 of the first instruction address register output selection circuit 21, and at the same time, the output 20B of the first instruction address register output selection circuit 21 is read out. The first convergence part 15 of the data matrix is read out with the value 212 that is the combination of the lower part and the lower part. The output 105 of the address matrix compartment 11 is outputted by the comparison circuit 13 to the output 20 of the first instruction address register output selection circuit 21.
6 is compared with the upper part 208 of 6. Also, the middle part 211 of the output 207 of the second instruction address register output selection circuit 24 selects the second compartment 12 of the address matrix.
Read out.

同時に、第2の命令アドレスレジスタ出力選択回路24
の出力207の中位部分と下位部分とを結合した値21
3でデータ行列の第2のコンパートメント16を読出す
、アドレス行列コンパートメント12の出力106は比
較回路14によって、第2の命令アドレスレジスタ出力
選択回路24の出力207の上位部分209と比較され
る。ヒツト判定回路10は、比較回路13.14の比較
結果107,108を入力とし、もし、アドレス行列コ
ンパートメント11の出力が一致していればデータ行列
コンパートメント15を選択するように、逆に、アドレ
ス行列コンパートメント12の出力が一致していれば、
データ行列コンパートメント16を選択するように、出
力データ選択信号選択回路27に対してデータ選択信号
111を送る。出力データ選択信号選択回路27は分岐
命令デコード信号201が0なのでデータ選択信号11
1をデータ選択信号216としてデータ選択回路17に
送る。そして、出力データ選択回路17の出力115は
演算装置に送られる。同時に、コンパートメント選択レ
ジスタ25に対して、一致した方のコンパートメント番
号を記憶するように、コンパートメント選択レジスタ更
新指示218がヒツト判定回路10から送られる。第1
の命令アドレスレジスタ出力選択回路21の出力206
は加算器19によって、演算装置から送られた命令語長
113と加算され、加算結果114は、次の命令取り出
しのために、第1、第2の命令アドレスレジスタ18.
23に格納される。もし、アドレス行列コンパートメン
ト11.12のいずれも一致していなければヒツト判定
回路10は、主記憶装置(図示せず)にデータ読出し要
求112を送る。主記憶装置から読出しデータ116が
送られてくると、予め決められた置換コンパートメント
決定方式(例えばLRU方式)によって決定されたコン
パートメント、例えばデータ行列コンパートメント15
に対して、データ行列更新指示117を送り、読出しデ
ータ116を格納させる。同時に、対応するアドレス行
列のコンパートメント11に対して、アドレス行列更新
指示119を送り、第1の命令アドレスレジスタ出力選
択回路21の出力206の上位部分208を格納させる
。同時に、コンパートメント選択レジスタ25に対して
データを格納した方のコンパートメント番号を記憶する
ようにコンパートメント選択レジスタ更新指示218が
送られる。
At the same time, the second instruction address register output selection circuit 24
The value 21 that combines the middle part and the lower part of the output 207 of
The output 106 of the address matrix compartment 12, which reads the second compartment 16 of the data matrix at 3, is compared by the comparison circuit 14 with the upper part 209 of the output 207 of the second instruction address register output selection circuit 24. The hit determination circuit 10 inputs the comparison results 107 and 108 of the comparison circuits 13 and 14, and conversely selects the data matrix compartment 15 if the outputs of the address matrix compartment 11 match. If the outputs of compartment 12 match,
A data selection signal 111 is sent to the output data selection signal selection circuit 27 to select the data matrix compartment 16. Since the branch instruction decode signal 201 is 0, the output data selection signal selection circuit 27 outputs the data selection signal 11.
1 is sent to the data selection circuit 17 as a data selection signal 216. The output 115 of the output data selection circuit 17 is then sent to the arithmetic unit. At the same time, a compartment selection register update instruction 218 is sent from the human judgment circuit 10 to the compartment selection register 25 to store the matching compartment number. 1st
The output 206 of the instruction address register output selection circuit 21
is added by the adder 19 to the instruction word length 113 sent from the arithmetic unit, and the addition result 114 is stored in the first and second instruction address registers 18 .
23. If none of the address matrix compartments 11, 12 match, the hit determination circuit 10 sends a data read request 112 to the main memory (not shown). When read data 116 is sent from the main storage device, a compartment determined by a predetermined replacement compartment determination method (for example, LRU method), for example, the data matrix compartment 15
A data matrix update instruction 117 is sent to the data matrix to store the read data 116. At the same time, an address matrix update instruction 119 is sent to the corresponding compartment 11 of the address matrix to store the upper part 208 of the output 206 of the first instruction address register output selection circuit 21. At the same time, a compartment selection register update instruction 218 is sent to the compartment selection register 25 to store the compartment number in which the data is stored.

(2)次に、分岐命令実行時について説明する。(2) Next, the execution of a branch instruction will be explained.

分岐命令実行時は、演算装置から送られた分岐命令デコ
ード信号201が1であるため、選択回路26はその出
力217としてコンパートメント選択レジスタ25の反
転出力215を選択する。したがって、そのときのコン
パートメント選択レジスタ25の値が、例えばOであれ
ば第1の命令アドレスレジスタ入力選択回路20は加算
器19の出力114を、第2の命令アドレスレジスタ入
力選択回路22は演算装置から送られた命令アドレス1
21を、また、第1の命令アドレスレジスタ出力選択回
路21は第1の命令1ノジスタ18の出力204を、第
2の命令アドレスレジスタ出力選択回路24は第2の命
令アドレスレジスタ23の出力205をそれぞれ選択す
る。そして分岐命令以外の命令実行時と同様に、第1、
第2の命令アドレスレジスタ出力選択回路21.24の
出力206,207によってアドレス行列のコンパート
メント11.12およびデータ行列のコンパートメント
15.16をそれぞれ読出す。さらに、アドレス行列コ
ンパートメント11.12の出力105.106は比較
回路13.14によって、第1、第2の命令アドレスレ
ジスタ出力選択回路21.24の出力206.207の
上位部分208,209とそれぞれ比較される。
When a branch instruction is executed, the branch instruction decode signal 201 sent from the arithmetic unit is 1, so the selection circuit 26 selects the inverted output 215 of the compartment selection register 25 as its output 217. Therefore, if the value of the compartment selection register 25 at that time is O, for example, the first instruction address register input selection circuit 20 selects the output 114 of the adder 19, and the second instruction address register input selection circuit 22 selects the output 114 of the adder 19. Command address 1 sent from
21, the first instruction address register output selection circuit 21 receives the output 204 of the first instruction 1 register 18, and the second instruction address register output selection circuit 24 receives the output 205 of the second instruction address register 23. Select each. Then, as with the execution of instructions other than branch instructions, the first,
The outputs 206, 207 of the second instruction address register output selection circuit 21.24 read out the address matrix compartment 11.12 and the data matrix compartment 15.16, respectively. Furthermore, the outputs 105.106 of the address matrix compartment 11.12 are compared by the comparison circuit 13.14 with the upper parts 208, 209 of the outputs 206.207 of the first and second instruction address register output selection circuits 21.24, respectively. be done.

ヒツト判定回路10は、比較回路13.14の比較結果
107.108と、さらにコンパートメント選択レジス
タ25の反転出力215を入力とし、コンパートメント
選択レジスタ25が示さない方のアドレス行列コンパー
トメントの出力が一致していれば、そちら側のデータ行
列コンパートメントを選択するように、出力データ選択
信号選択回路27に対してデータ選択信号111を送る
。出力データ選択信号選択回路27は、分岐命令デコー
ド信号201が1、かつ分岐条件不成立ならばコンパー
トメント選択レジスタ25の正出力214を、そうでな
ければデータ選択信号111をデータ選択回路17に送
る。同時に、コンパートメント選択レジスタ25は、分
岐条件成立時にはその値を反転する。
The hit determination circuit 10 inputs the comparison results 107 and 108 of the comparison circuits 13 and 14 and the inverted output 215 of the compartment selection register 25, and determines whether the output of the address matrix compartment not indicated by the compartment selection register 25 matches. If so, the data selection signal 111 is sent to the output data selection signal selection circuit 27 to select the data matrix compartment on that side. The output data selection signal selection circuit 27 sends the positive output 214 of the compartment selection register 25 to the data selection circuit 17 if the branch instruction decode signal 201 is 1 and the branch condition is not satisfied, and otherwise sends the data selection signal 111 to the data selection circuit 17. At the same time, the compartment selection register 25 inverts its value when the branch condition is met.

分岐条件成立時にコンパートメント選択レジスタ25が
示さない方のアドレス行列コンパートメントの出力が一
致していない場合、または、分岐条件不成立時にコンパ
ートメント選択レジスタ25が示す方のアドレス行列コ
ンパートメントの出力が一致していない場合、ヒツト判
定回路10は、コンパートメント選択レジスタ25の値
を反転するように、コンパートメント選択レジスタ更新
指示218を送り、上記動作をもう一度繰り返させる。
If the outputs of the address matrix compartment not indicated by the compartment selection register 25 do not match when the branch condition is met, or if the outputs of the address matrix compartment indicated by the compartment selection register 25 do not match when the branch condition is not met. , the hit determination circuit 10 sends a compartment selection register update instruction 218 to invert the value of the compartment selection register 25, and repeats the above operation once again.

主記憶装置から読出しデータ116が送られてくると、
予め決められた置換コンパートメント決定方式(例えば
LRU方式)によって決定されたコンパートメント、例
えばデータ行列コンパートメント15に対してデータ行
列更新指示117を送り、読出しデータ116を格納さ
せる。同時に、対応するアドレス行列のコンパートメン
ト11に対してアドレス行列更新指示119を送り、第
1の命令アドレスレジスタ出力選択回路21の出力20
6の上位部分208を格納させる。同時に、コンパート
メント選択レジスタ25に対してデータを格納した方の
コンパートメント番号を記憶するようにコンパートメン
ト選択レジスタ更新指示218が送られる。
When read data 116 is sent from the main storage device,
A data matrix update instruction 117 is sent to a compartment determined by a predetermined replacement compartment determination method (for example, LRU method), for example, the data matrix compartment 15, to cause the read data 116 to be stored. At the same time, an address matrix update instruction 119 is sent to the compartment 11 of the corresponding address matrix, and the output 20 of the first instruction address register output selection circuit 21
The upper part 208 of 6 is stored. At the same time, a compartment selection register update instruction 218 is sent to the compartment selection register 25 to store the compartment number in which the data is stored.

[発明の効果] 以上説明したように本発明は、命令キャッシュの検索に
ついて、分岐命令の後続命令は最も最近使用したコンパ
ートメントから分岐先の命令はそれ以外のコンパートメ
ントから同時に読出しを可能とすることにより、分岐条
件が成立してから分岐先の命令を演算装置に送るまでの
平均サイクル数を従来よりも05サイクル短縮できると
いう効果がある。
[Effects of the Invention] As explained above, the present invention enables the instruction subsequent to a branch instruction to be read from the most recently used compartment, and the branch destination instruction from other compartments at the same time. This has the effect that the average number of cycles from when a branch condition is established to when an instruction at a branch destination is sent to an arithmetic unit can be reduced by 0.5 cycles compared to the conventional method.

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

第1図は本発明の一実施例の命令キャッシュ装置を示す
ブロック図、第2図は従来の命令キャッシュ装置を示す
ブロック図である。 lO・・・・・・・・・ヒツト判定回路、11・・・・
・・・・・アドレス行列の第1のコンパートメント、 12・・・・・・・・・アドレス行列の第2のコンパー
トメント、 13・・・・・・・・・第1の比較回路、l4・・・・
・・・・・第2の比較回路、15・・・・・・・・・デ
ータ行列の第1のコンパートメント16・・・・・・・
・・データ行列の第2のコンパートメント17・・・・
・・・・・出力データ選択回路、】8・・・・・・・・
・第1の命令アドレスレジスタ、19・・・・・・・・
・加算器、 20・・・・・・・・・第1の命令アドレスレジスタ入
力選択回路、 21・・・・・・・・・第1の命令アドレスレジスタ出
力選択回路、 22・・・・・・・・・第2の命令アドレスレジスタ入
力選択回路、 23・・・・・・・・・第2の命令アドレスレジスタ、
24・・・・・・・・・第2の命令アドレスレジスタ出
力選択回路、 25・・・・・・・・・コンパートメント選択レジスタ
、26・・・・・・・・・選択回路、 27・・・・・・・・・出力データ選択信号選択回路、
30・・・・・・・・・ヒツト判定回路、31・・・・
・・・・・アドレス行列の第1のコンパートメン32・
・・・・・・・・アドレス行列の第2のコンパートメン
ト、 33・・・・・・・・・第1の比較回路、34・・・・
・・・・・第2の比較回路、35・・・・・・・・・デ
ータ行列の第1のコンパートメント36・・・・・・・
・・データ行列の第2のコンパートメント37・・・・
・・・・・出力データ選択回路、38・・・・・・・・
・命令アドレスレジスタ、39・・・・・・・・・加算
器、 40・・・・・・・・・命令アドレスレジスタ入力選択
回路、101・・・・・・命令アドレスレジスタ38の
出力、102・・・・・・命令アドレスレジスタ38の
出力の中位部分と下位部分とを結合した値、 103・・・・・・命令アドレス38の出力の中位部分
、104−・・・・・命令アドレスレジスタ38の出力
の上位部分、 105・・・・・・アドレス行列の第1のコンパートメ
ント31の出力、 106・・・・・・アドレス行列の第2のコンパートメ
ン0B ト32の出力、 ・・・・・・第1の比較回路13の比較結果、・・・・
・・第2の比較回路14の比較結果、・・・・・・デー
タ行列の第1のコンパートメント35の出力、 ・・・・・・データ行列の第2のコンパートメント36
の出力、 ・・・・・・データ選択信号、 ・・・・・・データ読出し要求、 ・・・・・・命令語長、 ・・・・・・出力データ選択回路17の出力、・・・・
・・主記憶装置からの読出しデータ、・・・・・・第1
のデータ行列更新指示、・・・・・・第2のデータ行列
更新指示、・・・・・・第1のアドレス行列更新指示、
・・・・・・第2のアドレス行列更新指示、・・・・・
・演算装置からの命令アドレス、・・・・・・命令バッ
ファ出力、 ・・・・・・命令整列回路出力、 ・・・・・・分岐命令デコード信号、 202・・・・・・第1の命令アドレスレジスタ入力選
択回路20の出力、 203・・・・・・第2の命令アドレスレジスタ入カ選
択回路22の出力、 204・・・・・・第1の命令アドレスレジスタ18の
出力、 205・・・・・・第2の命令アドレスレジスタ23の
出力、 206・・・・・・第1の命令アドレスレジスタ出力選
択回路21の出力、 207・・・・・・第2の命令アドレスレジスタ出力選
択回路24の出力、 208・・・・・・第1の命令アドレスレジスタ8力選
択回路21の出力の中位部分と下位部分 とを結合した値、 209・・・・・・第2の命令アドレスレジスタ出力選
択回路24の出力の中位部分と下位部分 とを結合した値、 210・・・・・・第1の命令アドレスレジスタ出力選
択回路21の出力の中位部分、 ・・・・・・第2の命令アドレスレジスタ出力選択回路
24の出力の中位部分、 ・・・・・・第1の命令アドレスレジスタ出力選択回路
21の出力の上位部分、 ・・・・・・第2の命令アドレスレジスタaカ選択回路
24の出力の上位部分、 ・・・・・・コンパートメント選択レジスタ25の正出
力、 ・・・・・・コンパートメント選択レジスタ25の反転
出力、 ・・・・・・出力データ選択信号選択回路27の出力、 ・・・・・・選択回路26の出力、 ・・・・・・コンパートメント選択レジスタ更新指ボー ・・・・・・分岐条件成立信号。
FIG. 1 is a block diagram showing an instruction cache device according to an embodiment of the present invention, and FIG. 2 is a block diagram showing a conventional instruction cache device. lO......Human judgment circuit, 11...
...First compartment of address matrix, 12... Second compartment of address matrix, 13... First comparison circuit, l4...・・・
. . . Second comparison circuit, 15 . . . First compartment of the data matrix 16 . . .
...Second compartment 17 of the data matrix...
...Output data selection circuit, ]8...
・First instruction address register, 19...
-Adder, 20...First instruction address register input selection circuit, 21...First instruction address register output selection circuit, 22... ...Second instruction address register input selection circuit, 23...Second instruction address register,
24... Second instruction address register output selection circuit, 25... Compartment selection register, 26... Selection circuit, 27...・・・・・・Output data selection signal selection circuit,
30......Human judgment circuit, 31...
...First compartment member 32 of the address matrix
. . . Second compartment of address matrix, 33 . . . First comparison circuit, 34 . . .
. . . Second comparator circuit, 35 . . . First compartment 36 of the data matrix.
...Second compartment 37 of the data matrix...
...Output data selection circuit, 38...
- Instruction address register, 39... Adder, 40... Instruction address register input selection circuit, 101... Output of instruction address register 38, 102 . . . The combined value of the middle part and the lower part of the output of the instruction address register 38, 103 . . . The middle part of the output of the instruction address 38, 104 - . . . Instruction Upper part of the output of the address register 38, 105... Output of the first compartment 31 of the address matrix, 106... Output of the second compartment 32 of the address matrix, . ... Comparison result of the first comparison circuit 13, ...
...comparison result of the second comparison circuit 14, ...output of the first compartment 35 of the data matrix, ...second compartment 36 of the data matrix
...data selection signal, ...data read request, ...instruction word length, ...output of output data selection circuit 17, ...・
・・Read data from main storage device, ・・・1st
data matrix update instruction, . . . second data matrix update instruction, . . . first address matrix update instruction,
...Second address matrix update instruction, ...
・Instruction address from the arithmetic unit, ...Instruction buffer output, ...Instruction alignment circuit output, ...Branch instruction decode signal, 202...First Output of the instruction address register input selection circuit 20, 203... Output of the second instruction address register input selection circuit 22, 204... Output of the first instruction address register 18, 205. ...output of the second instruction address register 23, 206...output of the first instruction address register output selection circuit 21, 207...output selection of the second instruction address register Output of the circuit 24, 208... Value that combines the middle part and the lower part of the output of the first instruction address register 8 output selection circuit 21, 209... Second instruction address A value that combines the middle part and the lower part of the output of the register output selection circuit 24, 210... The middle part of the output of the first instruction address register output selection circuit 21, ... Middle part of the output of the second instruction address register output selection circuit 24, . . . Upper part of the output of the first instruction address register output selection circuit 21, . . . Second instruction address Upper part of the output of the register a selection circuit 24, ... Positive output of the compartment selection register 25, ... Inverted output of the compartment selection register 25, ... Output data selection signal Output of the selection circuit 27, . . . Output of the selection circuit 26, . . . Compartment selection register update finger baud, . . . Branch condition fulfillment signal.

Claims (1)

【特許請求の範囲】 1、第1、第2の命令アドレスレジスタと、該命令アド
レスレジスタの出力と命令語長とを加算する加算器と、 該加算器の出力または命令アドレス入力データを選択し
、それぞれ第1、第2の命令アドレスレジスタに供給す
る第1、第2の命令アドレスレジスタ入力選択回路と、 第1、第2の命令アドレスレジスタの出力を選択する第
1、第2の命令アドレスレジスタ出力選択回路と、 第1、第2のコンパートメントからなり、それぞれ第1
の命令アドレスレジスタ出力選択回路、第2の命令アド
レスレジスタ出力選択回路の出力のアドレス行列エント
リフィールドで読出されるアドレス行列と、 アドレス行列の第1、第2のコンパートメントにそれぞ
れ対応する第1、第2のコンパートメントからなり、そ
れぞれ第1の命令アドレスレジスタ出力選択回路、第2
の命令アドレスレジスタ出力選択回路の出力のデータ行
列エントリフィールドで読出されるデータ行列と、 前記データ行列の第1のコンパートメントまたは第2の
コンパートメントの出力を選択し、演算装置に送る出力
データ選択回路と、 第1の命令アドレスレジスタ選択回路の出力のアドレス
行列キーフィールドとアドレス行列の第1のコンパート
メントの出力を比較する第1の比較回路と、 第2の命令アドレスレジスタ選択回路の出力のアドレス
行列キーフィールドとアドレス行列の第2のコンパート
メントの出力を比較する第2の比較回路と、 最も最近使用されたコンパートメントのコンパートメン
ト番号を記憶するコンパートメント選択レジスタと、 第1、第2の比較回路の出力を入力し、分岐命令以外の
命令実行時には、一致を検出した比較回路に対応するデ
ータ行列のコンパートメントを選択するデータ選択信号
を出力するとともに、一致が検出された前記コンパート
メント選択レジスタに更新指示を送り、いずれの比較回
路からも一致が検出されない場合には、主記憶装置にデ
ータ読出し要求を送り、主記憶装置から読出しデータが
送られてくると、予め決められた置換コンパートメント
決定方式によって決定されたコンパートメントのデータ
行列に対してデータ行列更新指示を送って前記読出しデ
ータを格納させるとともに対応するアドレス行列のコン
パートメントに対してアドレス行列更新指示を送り、対
応するアドレスレジスタ出力選択回路のアドレス行列キ
ーフィールドを格納させ、同時に読出しデータを格納し
たコンパートメントのコンパートメント番号を記憶する
ようにコンパートメント選択レジスタに更新指示を送り
、分岐命令実行時には、コンパートメント選択レジスタ
が示さない方のコンパートメントのアドレス行列が一致
していれば該コンパートメントと対応するデータ行列の
コンパートメントを選択するデータ選択信号を出力し、
分岐条件成立時にコンパートメント選択レジスタが示さ
ない方のアドレス行列のコンパートメントの出力が一致
していない場合、または、分岐条件成立時にコンパート
メント選択レジスタが示す方のアドレス行列のコンパー
トメントの出力が一致していない場合、コンパートメン
ト選択レジスタが他方のコンパートメントを示すように
、コンパートメント選択レジスタ更新指示を送り、上記
分岐命令実行時の動作をもう一度繰り返させ、それでも
一致しない場合、主記憶装置にデータ読出し要求を送り
、主記憶装置から読出しデータが送られてくると、予め
決められた置換コンパートメント決定方式によって決定
されたコンパートメントに対してデータ行列更新指示を
送り、読出しデータを格納させ、同時に対応するアドレ
ス行列のコンパートメントに対してアドレス行列更新指
示を送り、第1の命令アドレスレジスタ出力選択回路の
出力のアドレス行列キーフィールドを格納させ、同時に
コンパートメント選択レジスタに対して、データを格納
した方のコンパートメントのコンパートメント番号を記
憶するように、コンパートメント選択レジスタ更新指示
を送るヒット判定回路と、分岐命令以外の命令実行時に
は、コンパートメント選択レジスタが第1のコンパート
メントを示せば第1、第2の命令アドレスレジスタ入力
選択回路が共に加算器の出力を選択し、第1、第2の命
令アドレスレジスタ出力選択回路が共に第1の命令アド
レスレジスタの出力を選択し、コンパートメント選択レ
ジスタが第2のコンパートメントを示せば第1、第2の
命令アドレスレジスタ入力選択回路が共に加算器の出力
を選択し、第1、第2の命令アドレスレジスタ出力選択
回路が共に第2の命令アドレスレジスタの出力を選択し
、分岐命令の実行時には、コンパートメント選択レジス
タが第1のコンパートメントを示せば第1、第2の命令
アドレスレジスタ入力選択回路がそれぞれ加算器の出力
、演算装置から送られてきた命令アドレスを選択し、第
1、第2の命令アドレスレジスタ出力選択回路がそれぞ
れ第1、第2の命令アドレスレジスタの出力を選択し、
コンパートメント選択レジスタが第2のコンパートメン
トを示せば第1、第2の命令アドレスレジスタ入力選択
回路がそれぞれ演算装置から送られてきた命令アドレス
、加算器の出力を選択し、第1、第2の命令アドレスレ
ジスタ出力選択回路がそれぞれ第2、第1の命令アドレ
スレジスタの出力を選択するように第1、第2の命令ア
ドレスレジスタ入力選択回路と第1、第2の命令アドレ
スレジスタ出力選択回路を制御する選択回路と、 分岐命令以外の命令実行時には、ヒット判定回路から出
力されたデータ選択信号を出力データ選択回路に送り、
分岐命令実行時で、かつ分岐条件成立ならばヒット判定
回路から出力されたデータ選択信号を出力データ選択回
路に送り、分岐命令実行時で、かつ分岐条件不成立なら
ばコンパート選択レジスタが示すコンパートメントを選
択するデータ選択信号を出力データ選択回路に送る出力
データ選択信号選択回路とを有する命令キャッシュ装置
[Claims] 1, a first and a second instruction address register, an adder that adds the output of the instruction address register and an instruction word length, and an adder that selects the output of the adder or the instruction address input data. , first and second instruction address register input selection circuits that supply the first and second instruction address registers, respectively, and first and second instruction addresses that select outputs of the first and second instruction address registers. It consists of a register output selection circuit, a first compartment, and a second compartment, each with a first compartment.
the instruction address register output selection circuit of the second instruction address register output selection circuit, the address matrix read in the address matrix entry field of the output of the second instruction address register output selection circuit; It consists of two compartments, the first instruction address register output selection circuit, and the second compartment.
a data matrix read out in a data matrix entry field of an output of an instruction address register output selection circuit; and an output data selection circuit that selects an output of a first compartment or a second compartment of the data matrix and sends it to an arithmetic unit. , a first comparator circuit that compares the address matrix key field of the output of the first instruction address register selection circuit with the output of the first compartment of the address matrix; and the address matrix key of the output of the second instruction address register selection circuit. a second comparator circuit that compares the outputs of the second compartment of the field and address matrix; a compartment selection register that stores the compartment number of the most recently used compartment; and inputs the outputs of the first and second comparator circuits. However, when executing an instruction other than a branch instruction, it outputs a data selection signal that selects the compartment of the data matrix corresponding to the comparison circuit that detected a match, and sends an update instruction to the compartment selection register where a match was detected. If no match is detected from the comparison circuit, a data read request is sent to the main memory, and when the read data is sent from the main memory, the compartment determined by the predetermined replacement compartment determination method is sent. A data matrix update instruction is sent to the data matrix to store the read data, and an address matrix update instruction is sent to the corresponding compartment of the address matrix to store the address matrix key field of the corresponding address register output selection circuit. At the same time, an update instruction is sent to the compartment selection register to store the compartment number of the compartment in which the read data is stored, and when the branch instruction is executed, if the address matrix of the compartment that is not indicated by the compartment selection register matches, that compartment is output a data selection signal that selects the compartment of the data matrix corresponding to
If the outputs of the compartments in the address matrix not indicated by the compartment selection register do not match when the branch condition is met, or if the outputs of the compartments in the address matrix indicated by the compartment selection register do not match when the branch condition is met. , sends a compartment selection register update instruction so that the compartment selection register indicates the other compartment, and repeats the above operation when executing the branch instruction. If they still do not match, sends a data read request to the main memory, and When read data is sent from the device, a data matrix update instruction is sent to the compartment determined by a predetermined replacement compartment determination method to store the read data, and at the same time, the data matrix is updated to the compartment in the corresponding address matrix. Sends an address matrix update instruction to store the address matrix key field of the output of the first instruction address register output selection circuit, and at the same time stores the compartment number of the compartment in which data is stored in the compartment selection register. , a hit determination circuit that sends a compartment selection register update instruction, and when an instruction other than a branch instruction is executed, if the compartment selection register indicates the first compartment, the first and second instruction address register input selection circuits both output the adder output. is selected, the first and second instruction address register output selection circuits both select the output of the first instruction address register, and if the compartment selection register indicates the second compartment, the first and second instruction address registers are selected. The input selection circuits both select the output of the adder, the first and second instruction address register output selection circuits both select the output of the second instruction address register, and when a branch instruction is executed, the compartment selection register selects the output of the second instruction address register. 1 compartment, the first and second instruction address register input selection circuits select the output of the adder and the instruction address sent from the arithmetic unit, respectively, and the first and second instruction address register output selection circuits select the output of the adder and the instruction address sent from the arithmetic unit, respectively. select the outputs of the first and second instruction address registers, respectively,
If the compartment selection register indicates the second compartment, the first and second instruction address register input selection circuits select the instruction address sent from the arithmetic unit and the output of the adder, respectively, and select the first and second instructions. Controls the first and second instruction address register input selection circuits and the first and second instruction address register output selection circuits so that the address register output selection circuits select the outputs of the second and first instruction address registers, respectively. When an instruction other than a branch instruction is executed, the data selection signal output from the hit determination circuit is sent to the output data selection circuit.
When a branch instruction is executed and the branch condition is met, the data selection signal output from the hit judgment circuit is sent to the output data selection circuit, and when the branch instruction is executed and the branch condition is not met, the compartment indicated by the compartment selection register is selected. an output data selection signal selection circuit that sends a data selection signal to an output data selection circuit.
JP2126165A 1990-05-16 1990-05-16 Instruction cache device Pending JPH0421129A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2126165A JPH0421129A (en) 1990-05-16 1990-05-16 Instruction cache device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2126165A JPH0421129A (en) 1990-05-16 1990-05-16 Instruction cache device

Publications (1)

Publication Number Publication Date
JPH0421129A true JPH0421129A (en) 1992-01-24

Family

ID=14928291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2126165A Pending JPH0421129A (en) 1990-05-16 1990-05-16 Instruction cache device

Country Status (1)

Country Link
JP (1) JPH0421129A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5494841A (en) * 1977-12-30 1979-07-26 Honeywell Inf Systems Data processing system having instruction buffer relative to cache memory
JPS59128642A (en) * 1983-01-14 1984-07-24 Hitachi Ltd Pipe line method of microprogram controller
JPS63172343A (en) * 1987-01-12 1988-07-16 Hitachi Ltd Instruction prefetching system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5494841A (en) * 1977-12-30 1979-07-26 Honeywell Inf Systems Data processing system having instruction buffer relative to cache memory
JPS59128642A (en) * 1983-01-14 1984-07-24 Hitachi Ltd Pipe line method of microprogram controller
JPS63172343A (en) * 1987-01-12 1988-07-16 Hitachi Ltd Instruction prefetching system

Similar Documents

Publication Publication Date Title
US5680631A (en) Data processor with on-chip cache memory and purge controller responsive to external signal for controlling access to the cache memory
JPH0414385B2 (en)
US5117499A (en) Data flow type processing apparatus having external and cache memories for fetching paired executing instruction when mishit occurs
US5598574A (en) Vector processing device
JPH02287626A (en) Pipeline system branch instruction controller
JP2000330791A (en) Computer system and its operating method
JP2636088B2 (en) Information processing device
JPH0421129A (en) Instruction cache device
JPH06168263A (en) Vector processor
JP3145545B2 (en) Memory access device
JPH0552539B2 (en)
JPH01177145A (en) Information processor
JP2621763B2 (en) Information processing device
JPS60103454A (en) Instruction pre-reading controller
US5524221A (en) Next instruction pointer calculation system for a microcomputer
JP2716254B2 (en) List vector processing device
JPH10111798A (en) Information processor
JPS61175733A (en) Control system of branch estimation
JPH01147723A (en) Pipe line processing system for information processor
JP2881023B2 (en) Instruction buffer configuration method
JPH03269650A (en) Buffer storage
JPH03127126A (en) Information processor
JPH09212488A (en) Access controller for vector processor
JPS63197233A (en) Information processor
JPH04266140A (en) Address conversion buffer device