JP2794782B2 - Instruction fetch device - Google Patents

Instruction fetch device

Info

Publication number
JP2794782B2
JP2794782B2 JP1126689A JP12668989A JP2794782B2 JP 2794782 B2 JP2794782 B2 JP 2794782B2 JP 1126689 A JP1126689 A JP 1126689A JP 12668989 A JP12668989 A JP 12668989A JP 2794782 B2 JP2794782 B2 JP 2794782B2
Authority
JP
Japan
Prior art keywords
instruction
block
buffer
word
bits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP1126689A
Other languages
Japanese (ja)
Other versions
JPH02306340A (en
Inventor
清貴 ▲吉▼田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1126689A priority Critical patent/JP2794782B2/en
Publication of JPH02306340A publication Critical patent/JPH02306340A/en
Application granted granted Critical
Publication of JP2794782B2 publication Critical patent/JP2794782B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は,高速の情報処理装置における命令取出装置
に関するものである。
Description: TECHNICAL FIELD The present invention relates to an instruction fetching device in a high-speed information processing device.

[従来の技術] 近年、高速の情報処理装置においては,命令の実行と
並行して,実行中の命令シーケンスの後続の命令シーケ
ンスをキャシュ・メモリより読出し,これを一時記憶す
る為の命令バッファを持つことが多い。又命令バッファ
からの命令の取出,命令のデコード,オペランドの準備
演算の各過程に対応した一連の処理ステージを備え,マ
シンサイクルの周期で順次命令を前記一連のステージに
流して処理するパイプライン処理が行なわれることが多
い。
2. Description of the Related Art In recent years, in a high-speed information processing apparatus, an instruction buffer subsequent to an instruction sequence being executed is read from a cache memory in parallel with execution of an instruction, and an instruction buffer for temporarily storing the instruction sequence is read. Often have. A series of processing stages corresponding to the steps of fetching an instruction from an instruction buffer, decoding an instruction, and preparing an operand; pipeline processing for sequentially flowing instructions to the series of stages at the cycle of a machine cycle for processing; Is often performed.

従来科学技術計算専用の処理装置に於ける命令取出方
式の1つとして,命令バッファの容量を,例えば,数K
バイト程度に大きくして,これを複数個のブロックに分
割し,記憶装置の命令語エリア内の実行中の命令語をブ
ロック単位に前記命令バッファ上のブロックに転記す
る。同時に命令バッファの各ブロック毎に該ブロックに
保持されている命令語の命令アドレスを保持する手段を
設け,デコードすべき命令語のアドレスで前記アドレス
保持手段のアドレスをサーチすることにより,命令バッ
ファ上のブロック番号を求め,該ブロックから順次命令
をデコード・ステージに取出す方式がある。なお,命令
バッファ上のアドレスは,主記憶のアドレスとは異な
り,命令バッファ上のブロック番号とブロック内ワード
番号,ときにはワード内語番号等から構成されている。
Conventionally, as one of the instruction fetching methods in a processor dedicated to scientific and technical calculations, the capacity of an instruction buffer is, for example, several K
The instruction word is enlarged to about a byte, divided into a plurality of blocks, and the instruction word being executed in the instruction word area of the storage device is transferred to the block on the instruction buffer in block units. At the same time, means for holding the instruction address of the instruction word held in each block of the instruction buffer is provided, and the address of the address holding means is searched by the address of the instruction word to be decoded. In this method, an instruction is sequentially fetched from the block to the decode stage. The address in the instruction buffer is different from the address in the main memory, and is composed of a block number and a word number in a block in the instruction buffer, and sometimes a word number in a word.

ブロックの最後まで読出して他ブロックの先頭命令を
読みに行く際や,分岐命令で指定された分岐先命令を読
みに行く際に,所定の命令語が命令バッファ上に無い
(命令バッファ・ミスヒット)場合は,複数個のブロッ
ク内の1つに,所定の命令語を含む,記憶装置上のエリ
アを転記する。これを命令バッファのブロックの書換と
呼ぶ。
When reading to the end of a block and reading the first instruction of another block, or when reading the branch destination instruction specified by a branch instruction, a predetermined instruction word is not in the instruction buffer (instruction buffer miss In the case of (1), an area on the storage device including a predetermined instruction word is transferred to one of the plurality of blocks. This is called rewriting the block of the instruction buffer.

[発明が解決しようとする課題] しかしながら,上述した従来の命令取出装置では,分
岐命令が連続している場合,ブロックの書換が頻繁に起
きるという欠点がある。すなわち,命令バッファが保持
するブロック数以上のブロックを次々にジャンプしてい
く様なループが存在すると,1ブロック内で実行される命
令が少ない割にはミスヒットが頻発し,記憶装置から命
令バッファへの転送によるロスタイムが増大する。
[Problems to be Solved by the Invention] However, the conventional instruction fetching apparatus described above has a disadvantage that block rewriting frequently occurs when branch instructions are consecutive. In other words, if there is a loop that jumps one block after another from the number of blocks held by the instruction buffer one after another, the number of instructions executed in one block is small, but mishit often occurs, and the instruction buffer is stored in the storage device. Loss time due to transfer to the server increases.

そこで,本発明の技術的課題は,上記欠点に鑑み,命
令バッファミスヒットの回数を低減した命令取出装置を
提供することである。
Accordingly, a technical object of the present invention is to provide an instruction fetching device that reduces the number of instruction buffer misses in view of the above-mentioned drawbacks.

[課題を解決するための手段] 本発明によれば,記憶装置より読出された命令語をブ
ロック単位に保持する命令バッファと,該命令バッファ
上のブロックの個数に対応して該ブロック群に保持され
る命令語の先頭アドレスを保持するアドレス保持手段
と,前記命令バッファから読出されている命令語のアド
レスの上位ビットを保持する命令カウンタと,該命令バ
ッファから読出されている命令語のブロック番号及びブ
ロック内アドレスを示す命令ポインタと,読出したい命
令語が該命令バッファ上に存在しないケースが,予め定
められた時間内で何回発生するかをカウントする頻度数
測定手段とを有し,該測定手段で示される頻度が予め定
められた回数を越えると,該命令バッファのブロックサ
イズを減らして,ブロック数を増加させることを特徴と
する命令取出装置が得られる。
[Means for Solving the Problems] According to the present invention, an instruction buffer that holds instruction words read from a storage device in block units, and an instruction buffer that holds the instruction words in the block group corresponding to the number of blocks in the instruction buffer Address holding means for holding a head address of an instruction word to be read, an instruction counter for holding upper bits of the address of the instruction word read from the instruction buffer, and a block number of the instruction word read from the instruction buffer An instruction pointer indicating an address in the block; and a frequency measuring means for counting how many times a case where the instruction word to be read does not exist in the instruction buffer occurs within a predetermined time. When the frequency indicated by the measuring means exceeds a predetermined number, the block size of the instruction buffer is reduced and the number of blocks is increased. An instruction fetching device characterized by the following.

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

−第1実施例− 第1図は,本発明の第1実施例である命令取出装置の
ブロック図である。この実施例では,命令長は4バイト
即ち32ビットであり,命令の論理アドレスは30ビットの
バイトアドレスである。
First Embodiment FIG. 1 is a block diagram of an instruction fetching device according to a first embodiment of the present invention. In this embodiment, the instruction length is 4 bytes, that is, 32 bits, and the logical address of the instruction is a 30-bit byte address.

第1図において,命令バッファ3は32バイト×64ワー
ドの構成で,読出書込が同時に可能な記憶素子で実現さ
れている。ブロックとしては,16ワード毎にブロック0,
1,2,3,として使用するモード(以降4ブロック・モード
と呼ぶ)と8ワード毎にブロック00,01,10,11,20,21,3
0,31として使用するモード(以降8ブロック・モードと
呼ぶ)とがある。
In FIG. 1, the instruction buffer 3 has a configuration of 32 bytes × 64 words, and is realized by a storage element capable of simultaneously reading and writing. Block 0, block 16 every 16 words
Modes used as 1,2,3 (hereinafter referred to as 4-block mode) and blocks 00,01,10,11,20,21,3 every 8 words
There is a mode used as 0, 31 (hereinafter referred to as an 8-block mode).

最初に4ブロック・モード時での動作を説明する。命
令バッファ3の各ブロックにはキャシュ・メモリにある
命令語情報の1ブロック即ち512バイト境界から始まる5
12バイトの情報がロードされる。書込データレジスタ2
は前記のロード時にキャシュ・メモリからの応答情報を
一度受け命令バッファに書換む為のレジスタで,32バイ
トである。セレクタ4は命令バッファ3の読出出力8語
の内の1つを選択し,その出力は4バイトの命令レジス
タ5にストローブされる。
First, the operation in the 4-block mode will be described. In each block of the instruction buffer 3, one block of instruction word information in the cache memory, that is, starting from a 512-byte boundary
12 bytes of information are loaded. Write data register 2
Is a register for receiving the response information from the cache memory once at the time of loading and rewriting it in the instruction buffer, and is 32 bytes. The selector 4 selects one of the eight words read out from the instruction buffer 3, and its output is strobed into a 4-byte instruction register 5.

先頭アドレス・レジスタ21及び25は,命令バッファ3
のブロック0ないしブロック3の前半256バイトに保持
されている命令語のアドレスの上位24ビットをそれぞれ
保持する為のレジスタである。
Start address registers 21 and 25 are in instruction buffer 3
This register is for holding the upper 24 bits of the address of the instruction word held in the first 256 bytes of the blocks 0 to 3 of FIG.

先頭アドレス・レジスタ31及び35は,命令バッファ3
のブロック0ないしブロック3の後半256バイトに保持
されている命令語のアドレスの上位24ビットをそれぞれ
保持する為のレジスタである。
Start address registers 31 and 35 are in instruction buffer 3
This register holds the upper 24 bits of the address of the instruction word held in the latter 256 bytes of blocks 0 to 3.

尚,第1図では一部省略しているが先頭アドレス・レ
ジスタは命令バッファ3の各ブロック対応にあり計8個
用意されている。ただし4ブロックモード時に主に用い
るのは先頭アドレスレジスタ21及び25である。
Although a part is omitted in FIG. 1, a total of eight head address registers are prepared for each block of the instruction buffer 3. However, the main address registers 21 and 25 are mainly used in the 4-block mode.

命令カウンタ18は,命令バッファ3から読出されてい
る命令語の記憶装置上のアドレス上位24ビットと,図示
しないインストラクション・カウンタの初期値(以下,
初期ICという)の上位24ビットと,分岐命令によって指
定される分岐先の命令語のアドレス上位24ビットがセッ
トされるレジスタである。この命令カウンタ18の値をコ
ンパレータ22,26により,先頭アドレス・レジスタ21,25
とそれぞれ比較し,一致出力により,分岐先の命令語の
あるブロック番号やブロック越先(読出される命令語
が,あるブロックの最後の命令語から他のブロック最初
の命令語に移るシーケンスをブロック越と呼ぶ。)の命
令語のあるブロック番号を求める。
The instruction counter 18 stores the upper 24 bits of the address of the instruction word read from the instruction buffer 3 in the storage device and the initial value of an instruction counter (not shown).
It is a register in which the upper 24 bits of the initial IC) and the upper 24 bits of the address of the instruction word at the branch destination specified by the branch instruction are set. The value of the instruction counter 18 is compared with the start address registers 21 and 25 by the comparators 22 and 26.
The block number and the destination of the instruction word at the branch destination and the crossover destination (the sequence in which the instruction word to be read moves from the last instruction word of a block to the first instruction word of another block) The block number where the instruction word is called is obtained.

ここで,命令バッファ3に入力する2つのカウンタに
つき説明しておく。
Here, two counters input to the instruction buffer 3 will be described.

第3図の(a)は命令バッファ3の読出しアドレス・
カウンタ(以降“命令ポインタ”と呼ぶ)6の形式を示
す図である。ビット0と1はブロック番号,ビット2〜
5はブロック内のワード番号,ビット6〜8はワード内
語番号を夫々示す。命令バッファ3から順次命令語を読
出している時は,ビット2〜8の下位7ビットは+1加
算器11及びセレクタ9,10の回路で+1される。ビット2
は4ブロック・モード時はワード番号,ブロック・モー
ド時はブロック番号を表わす。セレクタ8は命令ポイン
タ6のブロック番号部への入力を選択し、ビット0,1に
対しては信号線202で,ビット2に対しては信号線204で
入力データを供給する。セレクタ9は命令ポインタ6の
ワード番号部及び語番号部への入力を選択し,ビット2
に対しては信号線205で,ビット3〜8に対しては信号
線201入力データを供給する。セレクタ10は信号線203を
介してビット2の入力データを最終的に選択する。すな
わち4ブロック・モードならば信号線205を8ブロック
・モードならば信号線204を選択する。
FIG. 3A shows the read address of the instruction buffer 3.
FIG. 3 is a diagram showing a format of a counter (hereinafter, referred to as an “instruction pointer”) 6. Bits 0 and 1 are block numbers, bits 2
5 indicates the word number in the block, and bits 6 to 8 indicate the word number in the word. When an instruction word is sequentially read from the instruction buffer 3, the lower 7 bits of the bits 2 to 8 are incremented by 1 in the circuit of the +1 adder 11 and the selectors 9 and 10. Bit 2
Indicates a word number in the 4-block mode and a block number in the block mode. The selector 8 selects the input to the block number portion of the instruction pointer 6, and supplies the input data to the signal lines 202 for the bits 0 and 1 and the signal line 204 for the bits 2. The selector 9 selects the input to the word number part and the word number part of the instruction pointer 6, and selects the bit 2
, And the input data of the signal line 201 is supplied to the bits 3 to 8. The selector 10 finally selects the input data of bit 2 via the signal line 203. That is, the signal line 205 is selected in the 4-block mode, and the signal line 204 is selected in the 8-block mode.

第3図の(b)は命令バッファ3に対する書込みアド
レスのカウンタ1の形式を示す図であり,形式の面から
は(a)と同じである。主記憶又はキャッシュ・メモリ
から命令バッファ3へ命令語情報をロードしている時
は,ビット2〜5は+1されてゆき,命令バッファには
順次命令語情報が書込まれてゆく。
FIG. 3B shows the format of the counter 1 for the write address for the instruction buffer 3, which is the same as FIG. When the instruction word information is being loaded from the main memory or the cache memory into the instruction buffer 3, bits 2 to 5 are incremented by one, and the instruction word information is sequentially written into the instruction buffer.

ラウンド・ロビン(以降R.R.と呼ぶ)12は,主記憶又
はキャッシュ・メモリから命令バッファ3へ命令語情報
をロードする際に,ロード先のブロック番号を示すレジ
スタであり,形式を第3図(c)に示す。ロード先のブ
ロック番号は,過去のアクセス履歴にかかわり無く,ブ
ロック0からブロック3へと順々に持回られる。従っ
て,ブロックロード要求が出される度に,R.R.12は+2
される(4ブロックモード時はR.R.12のビット2は意味
が無いことに注意)。
A round robin (hereinafter referred to as RR) 12 is a register indicating the block number of a load destination when the instruction word information is loaded from the main memory or the cache memory to the instruction buffer 3, and has a format shown in FIG. ). The block number of the load destination is carried around from block 0 to block 3 in sequence regardless of the past access history. Therefore, every time a block load request is issued, RR12 is +2.
(Note that bit 4 of RR12 is meaningless in 4-block mode).

制御回路38は上記の命令のバッファ3の読出し,書込
み,レジスタのストローブ及びレジスタの入出力切替時
等の信号を発生する回路である。
The control circuit 38 is a circuit for generating signals for reading and writing the above-mentioned instruction in the buffer 3, register strobe, and register input / output switching.

次に第1図及び第3図を参照して4ブロック・モード
時の動作を説明する。制御回路38は,命令取出の開始指
示を受けると,初期ICの上位24ビットをセレクタ17を介
して命令カウンタ18にセットし,初期ICの下位7ビット
を命令ポインタ6のブロック内ワード番号部及びワード
内語番号部にセットする。4ブロック・モード時では命
令カウンタ18のLSBと命令ポインタ6のワード番号部のM
SB(ビット2)とは重複している。
Next, the operation in the 4-block mode will be described with reference to FIGS. Upon receiving the instruction fetch start instruction, the control circuit 38 sets the upper 24 bits of the initial IC in the instruction counter 18 via the selector 17, and sets the lower 7 bits of the initial IC in the word number part of the instruction pointer 6 in the block. Set to word number part in word. In the 4-block mode, the LSB of the instruction counter 18 and the M of the word number part of the instruction pointer 6
It overlaps with SB (bit 2).

開始指示を受けた時点では,命令バッファ3には有効
な命令語はロードされておらず,先頭アドレスレジスタ
21,25,31,35対応に設けられた有効性表示ビット(以降
Vビットと呼ぶ)20,24,30,34は全てリセット状態であ
る。従ってブロック0〜3の内,ヒットするものは無
く,命令カウンタ18の値をアクセス・アドレスとして,
図示していないキャッシュ・メモリにブロックロード要
求を送出する。ロード先のブロック番号はR.R.12で示さ
れるブロックを選択するので,最初はブロック0が選ば
れる。
At the time when the start instruction is received, a valid instruction word has not been loaded in the instruction buffer 3 and the start address register
The validity indication bits (hereinafter referred to as V bits) 20, 24, 30, and 34 provided for 21, 25, 31, and 35 are all in a reset state. Therefore, none of blocks 0 to 3 hit, and the value of the instruction counter 18 is used as an access address.
A block load request is sent to a cache memory (not shown). Since the block number of the load destination selects the block indicated by RR12, block 0 is initially selected.

制御回路38は,キャッシュ・メモリから応答信号を受
けると,データ線600を通して送られて来る32バイト×1
6回の応答情報を命令バッファ3のブロック0の各ワー
ドに書込む。情報はリクエスト・アドレスの情報を含む
32バイトを先頭にして16回送られてくる。
When the control circuit 38 receives the response signal from the cache memory, the control circuit 38 transmits 32 bytes × 1 transmitted through the data line 600.
The response information of six times is written into each word of the block 0 of the instruction buffer 3. Information includes request address information
Sent 16 times, starting with 32 bytes.

又,制御回路38は応答信号を受けると,命令カウンタ
18の値を先頭アドレス・レジスタ21に,命令カウンタ18
の値に+1加算した値を先頭アドレス・レジスタ31にセ
ットし(セレクタ29は信号線400を選ぶ),このレジス
タ対応のVビット20,30をセットする。これによりコン
パレータ22の出力が“1"となり,エンコーダ27からヒッ
ト信号501とブロック信号500が出力される。ブロック番
号信号500は3ビットの信号線だが4ブロック・モード
時はLSBは意味を持たない。又コンパレータ32,36の出力
は4ブロック・モード時には常に“0"であり,比較結果
は8ブロック・モード600によってイネーブされる。
When the control circuit 38 receives the response signal, the control circuit 38
18 to the start address register 21 and the instruction counter 18
Is set in the start address register 31 (the selector 29 selects the signal line 400), and the V bits 20, 30 corresponding to this register are set. As a result, the output of the comparator 22 becomes “1”, and the hit signal 501 and the block signal 500 are output from the encoder 27. Although the block number signal 500 is a 3-bit signal line, the LSB has no meaning in the 4-block mode. The outputs of the comparators 32 and 36 are always "0" in the 4-block mode, and the comparison result is enabled by the 8-block mode 600.

制御回路38はブロック番号信号500を命令ポインタ6
のブロック番号部にセットし,以降カウンタの下位7ビ
ットを順次+1カウントする(先に第3図(a)の説明
のところで言及)。これにより先頭レジスタ5には所定
の命令語が順次読出される。
The control circuit 38 sends the block number signal 500 to the instruction pointer 6
, And then the lower 7 bits of the counter are sequentially incremented by +1 (referred to earlier in the description of FIG. 3A). As a result, predetermined instruction words are sequentially read out to the first register 5.

命令ポインタ6の下位7ビットがオール“1"を示す
と,すなわちブロック末尾の命令語アドレスがセットさ
れると,検出回路7から+2セレクト信号200が生じ,
これによりセレクタ17を介して命令カウンタ18の値が+
2加算器19によって+2される。+2された命令カウン
タ18の値をコンパレータ22,26を用いて先頭アドレス・
レジスタ21,25と比較し,一致出力によりブロック越先
の命令語のあるブロック番号を求める。
When the lower 7 bits of the instruction pointer 6 indicate all "1", that is, when the instruction word address at the end of the block is set, the detection circuit 7 generates a +2 select signal 200,
As a result, the value of the instruction counter 18 becomes + through the selector 17.
+2 is added by the two adder 19. Using the comparators 22 and 26, the value of the +2 incremented instruction counter 18 is
Compared with the registers 21 and 25, the block number with the instruction word of the block destination is obtained by the coincidence output.

左記のサーチの結果,ブロック越先のブロックが命令
バッファ3上に存在する時(ヒットと呼ぶ),エンコー
ダ27の出力500がブロック越先のブロックとなり,命令
ポインタ6の上位2ビットにセットされ,ブロック越先
の命令語が読出される。ブロック優先のブロックが命令
バッファ3上に存在しない時(ミス・ヒットと呼ぶ)
は,ブロック0の命令語を全て読出した後にキャッシュ
・メモリに対してブロック・ロード要求が出される。
As a result of the search described on the left, when the block beyond the block exists in the instruction buffer 3 (called a hit), the output 500 of the encoder 27 becomes the block beyond the block, and is set to the upper 2 bits of the instruction pointer 6. The instruction word beyond the block is read. When a block-priority block does not exist in the instruction buffer 3 (called a miss hit)
After reading all the instruction words of block 0, a block load request is issued to the cache memory.

先に述べた様に,R.R.12で示されるブロックがブロッ
ク・ロードの対照となる。R.R.12の出力100はセレクタ
8を介して書込アドレスカウンタ1及び命令ポインタ6
の上位2ビットにセットされる。R.R.12で示されるブロ
ック(例えばブロック3とする)に対応する先頭アドレ
ス・レジスタ25,35にはトローブ信号103によりそれぞれ
命令カウンタ18の値と命令カウンタ18の値をさらに+1
にした値がセットされVビット24,34がセットされる。
後は開始指示を受けた時のシーケンスと同様である。
As described above, the block indicated by RR12 is the control of the block load. The output 100 of RR12 is supplied to the write address counter 1 and the instruction pointer 6 via the selector 8.
Is set to the upper two bits of The value of the instruction counter 18 and the value of the instruction counter 18 are further increased by +1 in the head address registers 25 and 35 corresponding to the block indicated by RR12 (for example, block 3) by the trobe signal 103.
Is set, and V bits 24 and 34 are set.
The rest is the same as the sequence when the start instruction is received.

命令バッファ3から読出した命令語が分岐命令であっ
てパイプラインの実行ステージより分岐指示201が出さ
れた場合は,アドレス演算部の出力である分岐先のアド
レスのうち上位24ビットが命令カウンタ18にセットさ
れ,分岐先アドレスの下位7ビットが命令ポインタ6の
ワード番号部及び語番号部にセットされる。次に命令カ
ウンタ18の値をコンパレータ22,26を用いて先頭アドレ
ス・レジスタ21,25と比較して一致出力により分岐先の
命令語のあるブロック番号を求める。左記のサーチの結
果,ヒットした場合は,エンコーダ27の出力500が命令
ポインタ6の上位2ビットにセットされ分岐先の命令語
が続出される。サーチの結果がミスヒットだった場合
は,ブロック・ロード要求が出される。後のシーケンス
はブロック越えミスヒットのケースと同じである。
When the instruction word read from the instruction buffer 3 is a branch instruction and the branch instruction 201 is issued from the execution stage of the pipeline, the upper 24 bits of the branch destination address output from the address operation unit are stored in the instruction counter 18. And the lower 7 bits of the branch destination address are set in the word number part and word number part of the instruction pointer 6. Next, the value of the instruction counter 18 is compared with the start address registers 21 and 25 using the comparators 22 and 26, and the block number having the instruction word at the branch destination is obtained by the coincidence output. As a result of the search on the left, if a hit is found, the output 500 of the encoder 27 is set in the upper two bits of the instruction pointer 6, and the instruction word at the branch destination is continued. If the search result is a mishit, a block load request is issued. The subsequent sequence is the same as the case of a block crossing miss.

次に8ブロック・モード時での動作を説明する。8ブ
ロック・モード時では,命令バッファ3の各ブロック
(ブロック00,01,〜31)にキャッシュ・メモリにある命
令語情報の1ブロック即ち256バイト境界から始まる256
バイトの情報がロードされる。先頭アドレスレジスタ21
及び25は命令バッファ3のブロック00,10,20,30に保持
されている命令語のアドレスの上位24ビットを夫々保持
する為のレジスタである。先頭アドレス・レジスタ31及
び35は,ブロック01,11,21,31に保持されている命令語
のアドレスの上位24ビットを保持する為のレジスタであ
る。
Next, the operation in the 8-block mode will be described. In the 8-block mode, each block (blocks 00, 01, to 31) of the instruction buffer 3 stores one block of instruction word information in the cache memory, that is, 256 blocks starting from a 256-byte boundary.
The byte information is loaded. Start address register 21
And 25 are registers for respectively holding the upper 24 bits of the address of the instruction word held in blocks 00, 10, 20, and 30 of the instruction buffer 3. The start address registers 31 and 35 are registers for storing the upper 24 bits of the address of the instruction word held in the blocks 01, 11, 21, and 31.

命令カウンタ18と先頭アドレス・レジスタ31,35との
比較を行なうコンパレータ32,36の出力は,ミスヒット
頻度数測定回路39から供給される8ブロックモード信号
によってイネーブルされる。4ブロックモードから8ブ
ロックモードへの移行は,ある一定時間内に発生するミ
ス・ヒットの回数が規定値を越えた場合に起こる。ミス
・ヒット頻度測定回路39は,このミスヒットの回数をカ
ウントする回路であり,現在この命令取出装置がどちら
のブロックモードで動いているかを示すモードビットを
持っている。
The outputs of the comparators 32 and 36 for comparing the instruction counter 18 with the start address registers 31 and 35 are enabled by the 8-block mode signal supplied from the mishit frequency measuring circuit 39. The transition from the 4-block mode to the 8-block mode occurs when the number of miss hits occurring within a certain time exceeds a prescribed value. The miss / hit frequency measurement circuit 39 is a circuit that counts the number of miss hits, and has a mode bit indicating which block mode the instruction fetch device is currently operating.

第2図はミスヒット頻度測定回路39の詳細を示す。ブ
ロック越えや分岐等でミスヒットが発生した時,ミスヒ
ットカウンタ60はミスヒット信号502によってカウント
アップされる。タイマ62は或る一定時間が経過すると,
リセット信号64によってミスヒットカウンタ60をクリア
する。デコーダ61はミスヒットカウンタ60の値が規定値
を越えた場合にセット信号線65を介して,8ブロック・モ
ードビットをセットする。8ブロック・モードビットは
一旦セットされると命令取出装置の各セレクタやキャッ
シュメモリへその出力が送られ,以後本命令取出装置8
ブロック・モードで動作する。
FIG. 2 shows the details of the mishit frequency measuring circuit 39. When a mishit occurs due to block crossing or branching, the mishit counter 60 is counted up by the mishit signal 502. After a certain time has elapsed, the timer 62
The mishit counter 60 is cleared by the reset signal 64. The decoder 61 sets an eight-block mode bit via the set signal line 65 when the value of the mishit counter 60 exceeds a specified value. Once the 8 block mode bit is set, its output is sent to each selector and cache memory of the instruction fetch device, and thereafter, the instruction fetch device 8
Operate in block mode.

4ブロックモードで動作中にミスヒットが頻繁に起こ
るプログラム例を第4図に示す。この例ではLBL1からLB
L5まで分岐命令が連続しており,かつ各分岐命令は512B
単位の5つのブロックに分散している。従って,LBL1か
らLBL4まで実行しようとすると,第4図に示す512B単位
の4つのブロックがそれぞれ命令バッファ3のブロック
#0〜3にマッピングされる。そしてLBL5を実行時には
ブロック#0の内容(LBL1を含む512B)がLBL5を含む51
2Bに置き換えられる。LBL1からLBL5は100回のループに
なっていて,LBL5実行後は再びLBL1を実行しなければな
らない。
FIG. 4 shows an example of a program in which a miss hit frequently occurs during operation in the 4-block mode. In this example, LBL1 to LB
Branch instructions are consecutive up to L5, and each branch instruction is 512B
It is distributed over five blocks of units. Therefore, when trying to execute from LBL1 to LBL4, four blocks of 512B unit shown in FIG. 4 are mapped to blocks # 0 to # 3 of the instruction buffer 3, respectively. When executing LBL5, the contents of block # 0 (512B including LBL1) include LBL5.
Replaced by 2B. LBL1 to LBL5 form a loop of 100 times, and after executing LBL5, LBL1 must be executed again.

ところが,LBL1を含むブロックは直前にLBL5を含むブ
ロックに置換されている為,命令バッファミスヒットと
なり,今度はブロック#1(LBL2を含む512Bがロードさ
れている)がLBL1を含むブロックに置き換えられる。以
下同様に100回ループ中いずれの分岐命令を実行する時
も命令バッファミスヒットとなり,ブロックロードが行
なわれる。すなわち命令取出しは命令バッファ3ではな
く,キャッシュ・メモリに対して行なわれており,命令
バッファ3の存在意義がなくなる。左記の様な状態が発
生する原因は命令バッファ3のブロック数が4に固定さ
れている為である。
However, since the block containing LBL1 has been replaced with the block containing LBL5 immediately before, an instruction buffer miss occurs. This time, block # 1 (512B containing LBL2 is loaded) is replaced with the block containing LBL1. . Similarly, when any of the branch instructions in the loop is executed 100 times, an instruction buffer miss occurs, and a block load is performed. That is, the instruction fetch is performed not on the instruction buffer 3 but on the cache memory, and the existence of the instruction buffer 3 is lost. The reason for the occurrence of the state shown on the left is that the number of blocks in the instruction buffer 3 is fixed at four.

第4図の例の様に,頻繁にミスヒットが起きるとミス
ヒット頻度数測定回路39により本命令取出装置は8ブロ
ックモードに移行する。
As shown in the example of FIG. 4, when a mishit occurs frequently, the instruction fetching device shifts to the 8-block mode by the mishit frequency measuring circuit 39.

第5図に4ブロックモードから8ブロックモードに移
る際の命令バッファ3のマッピング状態の遷移を示す。
第5図(a)の状態で8ブロックモードに移り,(b)
の様なマッピング状態になった(ブロックモードを4か
ら8に移行させる契機となったブロックロードは,ブロ
ック#3へのLBL4を含む512Bのロードとする)。ブロッ
ク#30のLBL4の分岐命令が実行されると命令カウンタ18
には分岐先のLBL5のアドレスのうち上位24ビットがセッ
トされ,下位7ビットが命令ポインタ6のワード番号部
(ビット3〜5)と語番号部(ビット6〜8)にセット
される。次に,命令カウンタ18の値をコンパレータ22,2
6,32,36を用いて,先頭アドレス・レジスタ21,25,31,35
と比較して一致出力により分岐先命令語のブロック番号
を求める。左記サーチの場合ヒットした場合は,エンコ
ーダ27の出力500が命令ポインタ6の上位3ビットにセ
ットされ,分岐先の命令語が読出される。第5図の例で
は分岐先のLBL5が命令バッファ上に無いのでミスヒット
となる。直前のブロックロードの対象がブロック#3だ
ったので,ラウンドロビン12はビット2も含めてオール
0となっている。
FIG. 5 shows the transition of the mapping state of the instruction buffer 3 when shifting from the 4-block mode to the 8-block mode.
In the state of FIG. 5 (a), the mode shifts to the 8-block mode, and (b)
(The block load that caused the block mode to shift from 4 to 8 is a 512B load including LBL4 to block # 3). When the branch instruction of LBL4 of block # 30 is executed, the instruction counter 18
, The upper 24 bits of the address of the branch destination LBL5 are set, and the lower 7 bits are set in the word number portion (bits 3 to 5) and the word number portion (bits 6 to 8) of the instruction pointer 6. Next, the value of the instruction counter 18 is compared with the values of the comparators 22 and 2
Using 6,32,36, start address register 21,25,31,35
Then, the block number of the branch instruction word is obtained by the match output. In the case of a hit in the case of the search on the left, the output 500 of the encoder 27 is set in the upper three bits of the instruction pointer 6, and the instruction word at the branch destination is read. In the example of FIG. 5, since the branch destination LBL5 is not in the instruction buffer, a miss occurs. Since the block load target immediately before was block # 3, the round robin 12 is all 0 including bit 2.

従って,置換の対象はブロック#00となり,ラウンド
・ロビン12の出力はセレクタ8,10を介して命令カウンタ
6の上位ビットにセットされる。一方,デコーダ16はラ
ウンドロビン12の出力を受けて,置換されるブロックに
対応する先頭アドレスレジスタ21のストローブ信号103
を生成する。ストローブ信号103によって先頭アドレス
レジスタ21には命令カウンタ18の値がセットされる。先
頭アドレスレジスタが更新されると,ラウンドロビン12
の値は+1される。キャツシュメモリに対しては8ブロ
ックモードビットがセットされた時点で8ブロックモー
ドに遷移した旨が通知されているので,ブロックロード
で送られて来るブロックサイズでも256Bと4ブロックモ
ードの半分となっている。ロードデータは書込みデータ
レジスタ2を介してブロック#00にロードされ,命令バ
ッファ3は第5図(c)の様にマッピングされる。
Therefore, the replacement target is block # 00, and the output of the round robin 12 is set to the upper bits of the instruction counter 6 via the selectors 8 and 10. On the other hand, the decoder 16 receives the output of the round robin 12, and receives the strobe signal 103 of the head address register 21 corresponding to the block to be replaced.
Generate The value of the instruction counter 18 is set in the start address register 21 by the strobe signal 103. When the start address register is updated, round robin 12
Is incremented by one. Since the cache memory is notified that the mode has shifted to the 8-block mode when the 8-block mode bit is set, the block size sent by block load is 256B, which is half of the 4-block mode. I have. The load data is loaded into the block # 00 via the write data register 2, and the instruction buffer 3 is mapped as shown in FIG.

LBL5が読出され実行されると,命令カウンタ18には分
岐先のLBL1のアドレスのうち上位24ビットがセットさ
れ,下位7ビットが命令ポインタ6の下位6ビットにセ
ットされる。LBL1を含むブロック(256B)は直前に置換
されているので,またミスセットとなる。ラウンドロビ
ン12の値“001"(2進表現)が再び命令ポインタ6の上
位3ビットにセットされる。先頭アドレスレジスタ31は
ストローブ信号103によってストローブされ命令カウン
タ18の値がセレクタ29を介してセットされる。セレクタ
29は信号線300の方を向いている。以後のシーケンスはL
BL5のブロックロードと同じ,これによって命令バッフ
ァ3は第5図(d)の様にマッピングされる。
When the LBL 5 is read and executed, the upper 24 bits of the address of the branch destination LBL 1 are set in the instruction counter 18, and the lower 7 bits are set in the lower 6 bits of the instruction pointer 6. Since the block (256B) containing LBL1 has been replaced immediately before, it becomes a misset again. The value “001” (binary representation) of the round robin 12 is set in the upper 3 bits of the instruction pointer 6 again. The start address register 31 is strobed by the strobe signal 103, and the value of the instruction counter 18 is set via the selector 29. selector
29 faces the signal line 300. Subsequent sequence is L
This is the same as the block load of BL5, whereby the instruction buffer 3 is mapped as shown in FIG.

これによって第4図のループプログラムで現われる分
岐命令が全て命令バッファ3上にマッピングされ,以降
のループから抜けるまでミスヒットは起らない。ループ
から抜けると,第5図(d)の例では,LBL5はブロック
#00の最後の命令なのでブロック越えが生する。8ブロ
ックモード時では命令ポインタ6の下位6ビットがオー
ル“1"を示すと,検出回路7から+1セレクト信号200
が生じ,これによりセレクタ17を介して,命令カウンタ
18の値が+1加算器23によって+1される。+1された
命令カウンタ18の値をコンパレータ22,26,32,36を用い
て先頭アドレス・レジスタ21,25,31,35と比較し,一致
出力によりブロック越先の命令語のあるブロック番号を
求める。後のシーケンスはヒットでもミスヒットでも分
岐指示を受けた時のシーケンスと同じである。
As a result, all the branch instructions appearing in the loop program of FIG. 4 are mapped on the instruction buffer 3, and no mishit occurs until the processing exits from the subsequent loop. When the process exits from the loop, in the example of FIG. 5 (d), LBL5 is the last instruction of block # 00, so that block over occurs. In the 8-block mode, if the lower 6 bits of the instruction pointer 6 indicate all “1”, the detection circuit 7 outputs a +1 select signal 200
Which causes the instruction counter via selector 17
The value of 18 is incremented by 1 by the +1 adder 23. The value of the incremented instruction counter 18 is compared with the start address registers 21, 25, 31, and 35 using the comparators 22, 26, 32, and 36, and the block number of the instruction word at the block destination is obtained from the match output. . The subsequent sequence is the same as the sequence when a branch instruction is received regardless of whether it is a hit or a mishit.

8ブロックモードから4ブロックモードに戻る契機
は,ソフトウェアによって提供される。すなわち,ソフ
トウェアによってキャツシュクリア命令が発行され,キ
ャッシュメモリが無効化された時に限って,8ブロックモ
ードビットがリセットされ4ブロックモードに戻る。キ
ャッシュクリア命令が実行されると命令バッファ3も,
各ブロックのVビット20,24,30,34が全てリセットされ
て無効化にされる。よってキャッシュクリア命令の次命
令からは再び4ブロックモードでのブロックロードが開
始される。
The opportunity to return from 8-block mode to 4-block mode is provided by software. That is, only when the cache clear instruction is issued by software and the cache memory is invalidated, the 8-block mode bit is reset and the mode returns to the 4-block mode. When the cache clear instruction is executed, the instruction buffer 3 also
The V bits 20, 24, 30, and 34 of each block are all reset and invalidated. Therefore, the block loading in the 4-block mode is started again from the instruction following the cache clear instruction.

−第2実施例− 次に第6図を用いて,本発明に係る第2実施例を説明
する。
Second Embodiment Next, a second embodiment according to the present invention will be described with reference to FIG.

第2実施例においては第1実施例で説明したコンパレ
ータ32,36の出力イネーブルの方法が異なる。
The second embodiment differs from the first embodiment in the method of enabling the outputs of the comparators 32 and 36.

即ち,命令カウンタ18と先頭アドレスレジスタ31,35
との比較を行なうコンパレータ32,36の出力は,8ブロッ
クモードビット70から供給される8ブロックモード信号
600によってイネーブルされる。4ブロックモードから
8ブロックモードへの移行は,ソフトウェアの指示によ
る。すなわち,4ブロックto8ブロックモード変換命令が
ハードウェアによってサポートされており,ソフトウェ
アが左記命令を発行すると,本命令取出装置は8ブロッ
クモードとして機能する。具体的には命令レジスタ5に
ブロックto8ブロックモード変換命令がセットされる
と,デコーダ61がこれを検出し,8ブロックモードビット
70をセットする。8ブロックモードビットは,一旦セッ
トされると命令取出装置の各セレクタやキャッシュメモ
リへその出力が送られ,以後本命令取出装置は8ブロッ
クモードで動作する。
That is, the instruction counter 18 and the start address registers 31, 35
The outputs of the comparators 32 and 36 for comparing with the 8 block mode signal 70 supplied from the 8 block mode bit 70
Enabled by 600. The transition from the 4-block mode to the 8-block mode is based on software instructions. That is, the 4-block to 8-block mode conversion instruction is supported by hardware, and when the software issues the instruction on the left, the instruction fetch device functions in the 8-block mode. More specifically, when a block-to-8 block mode conversion instruction is set in the instruction register 5, the decoder 61 detects this and sets an 8-block mode bit.
Set 70. Once the 8-block mode bit is set, its output is sent to each selector or cache memory of the instruction fetch device, and thereafter, the present instruction fetch device operates in the 8-block mode.

4ブロックモードで動作中にミスヒットが頻繁に起こ
るプログラム例を第4図に示す。この例ではLBL1からLB
L5まで分岐命令が連続しており,かつ各分岐命令は512B
単位の5つのブロックに分散している。従ってLBL1から
LBL4まで実行しようとすると,第4図に示す512B単位の
4つのブロックがそれぞれ命令バッファ3のブロック#
0〜3にマッピングされる。そしてLBL5を実行時にはブ
ロック#0の内容(LBL1を含む512B)がLBL5を含む512B
に置き換えられる。LBL1からLBL5は100回のループにな
っていて,LBL5実行後は再びLBL1を実行しなければなら
ない。ところが,LBL1を含むブロックは直前にLBL5を含
むブロックに置換されている為命令バッファミスヒット
となり,今度はブロック#1(LBL2を含む512Bがロード
されている)がLBL1を含むブロックに置き換えられる。
以下同様に100回ループ中いずれの分岐命令を実行する
時も命令バッファミスヒットとなりブロックロードが行
なわれる。すなわち命令取出しは命令バッファ3ではキ
ャッシュ・メモリに対して行なわれており,命令バッフ
ァ3の存在意義がなくなる。左記の様な状態が発生する
原因は命令バッファ3のブロック数が4に固定されてい
る為である。
FIG. 4 shows an example of a program in which a miss hit frequently occurs during operation in the 4-block mode. In this example, LBL1 to LB
Branch instructions are consecutive up to L5, and each branch instruction is 512B
It is distributed over five blocks of units. Therefore from LBL1
When trying to execute up to LBL4, the four blocks in 512B units shown in FIG.
Mapped to 0-3. When LBL5 is executed, the content of block # 0 (512B including LBL1) is changed to 512B including LBL5.
Is replaced by LBL1 to LBL5 form a loop of 100 times, and after executing LBL5, LBL1 must be executed again. However, since the block containing LBL1 has been replaced with the block containing LBL5 immediately before, an instruction buffer miss occurs, and this time, block # 1 (512B containing LBL2 is loaded) is replaced with a block containing LBL1.
Similarly, when any branch instruction is executed in the loop 100 times, an instruction buffer mishit occurs and block loading is performed. That is, instruction fetch is performed to the cache memory in the instruction buffer 3, and the existence of the instruction buffer 3 is lost. The reason for the occurrence of the state shown on the left is that the number of blocks in the instruction buffer 3 is fixed at four.

第4図の例の様に,頻繁にミスヒットが起きるケース
では,予めプログラマが4ブロックto8ブロックモード
変換命令を100回ループの直前に実行させて8ブロック
モードに移しておく。第5図に4ブロックモードから8
ブロックモードに移る際の命令バッファ3のマッピング
状態の遷移を示す。第5図(a)の状態で8ブロックモ
ードに移り,(b)の様なマッピング状態になった。
(LBL1〜LBL4は100回のループが始まる前に既に命令バ
ッファ3にロードされていたとする)。ブロック#30の
LBL4の分岐命令が実行されると命令カウンタ18には分岐
先のLBL5のアドレスのうち上位24ビットがセットされ,
下位7ビットが命令ポインタからのワード番号部(ビッ
ト3〜5)と語番号部(ビット6〜8)にセットされ
る。次に命令カウンタ18の値を,コンパレータ22,26,3
2,36を用いて,先頭アドレス・レジスタ21,25,31,35と
比較して一致出力により分岐先命令語のブロック番号を
求める左記サーチの結果ヒットした場合は,エンコーダ
27の出力500が命令ポインタ6の上位3ビットにセット
され,分岐先の命令語が読出される。以下、第1実施例
と同様であり,省略する。
As in the case of the example shown in FIG. 4, in the case where frequent mishits occur, the programmer previously executes a 4-block to 8-block mode conversion instruction 100 times immediately before the loop to shift to the 8-block mode. Fig. 5 shows 8 from 4 block mode.
7 shows a transition of a mapping state of the instruction buffer 3 when shifting to the block mode. In the state shown in FIG. 5A, the mode is shifted to the 8-block mode, and the mapping state shown in FIG.
(It is assumed that LBL1 to LBL4 have already been loaded into the instruction buffer 3 before 100 loops have started). Block # 30
When the LBL4 branch instruction is executed, the upper 24 bits of the address of the branch destination LBL5 are set in the instruction counter 18, and
The lower 7 bits are set in the word number part (bits 3 to 5) and word number part (bits 6 to 8) from the instruction pointer. Next, the value of the instruction counter 18 is compared with the comparators 22, 26, 3
If the result of the left search to find the block number of the branch target instruction word based on the match output by comparing with the start address registers 21, 25, 31, and 35 using 2,36,
The output 500 of 27 is set in the upper 3 bits of the instruction pointer 6, and the instruction word at the branch destination is read. Hereinafter, it is the same as the first embodiment, and the description is omitted.

[発明の効果] 以上説明したように,本発明によれば,予め定められ
た時間内に起こる命令バッファミスヒットの回数が規定
値を越えた場合に,命令バッファのブロック・サイズを
半減し,ブロック数を倍加させることにより,分岐命令
が連続し,命令バッファのオリジナルのブロック数以上
のブロックを次々にジャンプして行くケースでも命令バ
ッファミスヒットの回数を減らす効果がある。
[Effects of the Invention] As described above, according to the present invention, when the number of instruction buffer misses occurring within a predetermined time exceeds a specified value, the block size of the instruction buffer is halved, By doubling the number of blocks, there is an effect of reducing the number of instruction buffer misses even in the case where branch instructions are consecutive and jumping one block after another in the instruction buffer.

また,本発明によれば命令バッファのブロック数をソ
フトウェアが変更できることによって,分岐命令が連続
し,命令バッファのオリジナルのブロック数以上のブロ
ックを次々にジャンプして行くケースでも,命令バッフ
ァミスヒットの回数を減らす様にプログラミングできる
という効果がある。
Further, according to the present invention, since the number of blocks in the instruction buffer can be changed by software, even in a case where branch instructions are consecutive and jumping one block after the number of original blocks in the instruction buffer one after another, an instruction buffer miss hit can be prevented. The effect is that programming can be performed to reduce the number of times.

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

第1図は,本発明による命令取出装置の第1実施例を示
すブロック図, 第2図は,第1図に示すミスヒット頻度数測定回路の詳
細ブロック図, 第3図は,第1図に示す命令ポインタレジスタ,書込み
アドレスレジスタ及びラウンド・ロビンカウンタにセッ
トされるデータの形式を示す説明図, 第4図は,分岐命令が連続して,命令バッファミスヒッ
トが頻繁に起こる一例を示した説明図である。第5図
は,4ブロックモードから8ブロックモードに移っていく
際の命令バッファのマッピングの遷移を示した説明図, 第6図は,本発明の第2実施例を示すブロック図であ
る。 1……命令バッファ書込みアドレス・レジスタ,2……命
令バッファ書込みデータ・レジスタ,3……命令バッフ
ァ,4,8,9,10,13,17,29,33……切換え回路,5……命令レ
ジスタ,6……命令ポインタ,7……検出回路,11,14,23…
…+1加算器,15,19……+2加算器,12……ラウンド・
ロビン・カウンタ,16,61……デコーダ,18……命令カウ
ンタ,20,24,30,34……命令バッファブロック対応有効性
表示ビット(Vビット),21,25,31,35……先頭アドレス
レジスタ,22,26,32.,36……コンパレータ,27……エンコ
ーダ,38……制御回路,39……ミスヒット頻度数測定回
路,60……ミスヒットカウンタ,62……タイマ,63,70……
8ブロックモード・ビット,100〜103,200〜205,300〜30
4,400〜404,500〜502,600,64,65……信号線。
FIG. 1 is a block diagram showing a first embodiment of an instruction fetching device according to the present invention, FIG. 2 is a detailed block diagram of a mishit frequency measuring circuit shown in FIG. 1, and FIG. FIG. 4 is an explanatory diagram showing the format of data set in the instruction pointer register, write address register, and round robin counter shown in FIG. 4. FIG. 4 shows an example in which branch instructions are consecutive and instruction buffer mishit frequently occurs. FIG. FIG. 5 is an explanatory diagram showing a transition of mapping of an instruction buffer when shifting from a 4-block mode to an 8-block mode, and FIG. 6 is a block diagram showing a second embodiment of the present invention. 1 ... Instruction buffer write address register, 2 ... Instruction buffer write data register, 3 ... Instruction buffer, 4, 8, 9, 10, 13, 17, 29, 33 ... Switching circuit, 5 ... Instruction Register, 6 ... Instruction pointer, 7 ... Detection circuit, 11, 14, 23 ...
… + 1 adder, 15,19 …… + 2 adder, 12 …… Round
Robin counter, 16, 61… Decoder, 18… Instruction counter, 20, 24, 30, 34… Instruction buffer block validity indication bit (V bit), 21, 25, 31, 35… Start address Register, 22, 26, 32, 36 Comparator, 27 Encoder, 38 Control circuit, 39 Mishit frequency measurement circuit, 60 Mishit counter, 62 Timer, 63, 70 ......
8 block mode bits, 100-103,200-205,300-30
4,400 to 404,500 to 502,600,64,65 ... signal lines.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】記憶装置より読出された命令語をブロック
単位に保持する命令バッファ(3)と, 該命令バッファ(3)上のブロックの個数に対応して該
ブロック群に保持される命令語の先頭アドレスを保持す
るアドレス保持手段(21,61,28,35)と, 前記命令バッファ(3)から読出されている命令語のア
ドレスの上位ビットを保持する命令カウンタ(18)と, 該命令バッファ(3)から読出されている命令語のブロ
ック番号及びブロック内アドレスを示す命令ポインタ
(6)と, 読出したい命令語が該命令バッファ(3)上に存在しな
いケースが,予め定められた時間内で何回発生するかを
カウントする頻度数測定手段(39)とを有する命令取出
装置であって,該測定手段(39)で示される頻度が予め
定められた回数を越えると,該命令バッファ(3)のブ
ロックサイズを減らして,ブロック数を増加させること
を特徴とする命令取出装置。
An instruction buffer (3) for holding an instruction word read from a storage device in block units, and an instruction word held in the block group corresponding to the number of blocks in the instruction buffer (3). Address holding means (21, 61, 28, 35) for holding the start address of the instruction; an instruction counter (18) for holding the upper bits of the address of the instruction word read from the instruction buffer (3); The instruction pointer (6) indicating the block number and the address in the block of the instruction word read from the buffer (3), and the case where the instruction word to be read does not exist in the instruction buffer (3) are determined for a predetermined time. An instruction fetching device having frequency number measuring means (39) for counting how many times the number of occurrences occurs in the instruction buffer, wherein when the frequency indicated by the measuring means (39) exceeds a predetermined number, the instruction buffer is provided. (3) of the block by reducing the size, instruction fetch apparatus characterized by increasing the number of blocks.
JP1126689A 1989-05-22 1989-05-22 Instruction fetch device Expired - Fee Related JP2794782B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1126689A JP2794782B2 (en) 1989-05-22 1989-05-22 Instruction fetch device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1126689A JP2794782B2 (en) 1989-05-22 1989-05-22 Instruction fetch device

Publications (2)

Publication Number Publication Date
JPH02306340A JPH02306340A (en) 1990-12-19
JP2794782B2 true JP2794782B2 (en) 1998-09-10

Family

ID=14941413

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1126689A Expired - Fee Related JP2794782B2 (en) 1989-05-22 1989-05-22 Instruction fetch device

Country Status (1)

Country Link
JP (1) JP2794782B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3804941B2 (en) 2002-06-28 2006-08-02 富士通株式会社 Instruction fetch control device
JP3845043B2 (en) 2002-06-28 2006-11-15 富士通株式会社 Instruction fetch control device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63106849A (en) * 1986-10-24 1988-05-11 Sony Corp Control method for cache memory
JPH0646381B2 (en) * 1986-11-28 1994-06-15 日本電気株式会社 Instruction fetching device
JPS63157249A (en) * 1986-12-22 1988-06-30 Nippon Telegr & Teleph Corp <Ntt> Cache memory control system

Also Published As

Publication number Publication date
JPH02306340A (en) 1990-12-19

Similar Documents

Publication Publication Date Title
US4764861A (en) Instruction fpefetching device with prediction of a branch destination for each branch count instruction
US5933860A (en) Multiprobe instruction cache with instruction-based probe hint generation and training whereby the cache bank or way to be accessed next is predicted
EP0689128B1 (en) Computer instruction compression
US4725947A (en) Data processor with a branch target instruction storage
JP3542020B2 (en) Processor device and processor control method for executing instruction cache processing for instruction fetch alignment over multiple predictive branch instructions
KR100212204B1 (en) Apparatus for processing instruction in computer system
US4888679A (en) Method and apparatus using a cache and main memory for both vector processing and scalar processing by prefetching cache blocks including vector data elements
EP0227892B1 (en) Updates to branch history table in a pipeline processing system
US4827402A (en) Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
KR920006275B1 (en) Data processing apparatus
EP0320098B1 (en) Jump prediction
US4040034A (en) Data security system employing automatic time stamping mechanism
EP0394624B1 (en) Multiple sequence processor system
US20110264894A1 (en) Branching processing method and system
JPH02208728A (en) Virtual instruction cash refill algorithm
WO2000042502A1 (en) Trace based instruction caching
US6823446B1 (en) Apparatus and method for performing branch predictions using dual branch history tables and for updating such branch history tables
CA1243124A (en) Look-ahead instruction fetch control for a cache memory
US5930520A (en) Pipelining device in a parallel processing apparatus and an instruction supplying method therefor
US6385720B1 (en) Branch prediction method and processor using origin information, relative position information and history information
JP2794782B2 (en) Instruction fetch device
US4616315A (en) System memory for a reduction processor evaluating programs stored as binary directed graphs employing variable-free applicative language codes
US4737908A (en) Buffer memory control system
US4947358A (en) Normalizer for determining the positions of bits that are set in a mask
US4212058A (en) Computer store mechanism

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees