Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH07117919B2 - Cache memory device - Google Patents
[go: Go Back, main page]

JPH07117919B2 - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH07117919B2
JPH07117919B2 JP1112191A JP11219189A JPH07117919B2 JP H07117919 B2 JPH07117919 B2 JP H07117919B2 JP 1112191 A JP1112191 A JP 1112191A JP 11219189 A JP11219189 A JP 11219189A JP H07117919 B2 JPH07117919 B2 JP H07117919B2
Authority
JP
Japan
Prior art keywords
address
data
cache memory
cache
requested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1112191A
Other languages
Japanese (ja)
Other versions
JPH02292646A (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
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 JP1112191A priority Critical patent/JPH07117919B2/en
Publication of JPH02292646A publication Critical patent/JPH02292646A/en
Publication of JPH07117919B2 publication Critical patent/JPH07117919B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はキャッシュメモリ装置に関し,特に複数個のキ
ャッシュメモリを索引して要求データを決定すること
と,キャッシュメモリの置換制御を行うキャッシュメモ
リ装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device, and more particularly to a cache memory device for indexing a plurality of cache memories to determine request data and controlling replacement of the cache memories. Regarding

[従来の技術] 通常,1つのキャッシュメモリ(以下,単にキャッシュと
も略す)は,主メモリのデータの一部を保持するデータ
アレイ部と,このデータアレイ部の登録データのアドレ
スを管理するアドレスアレイ部から構成されている。
[Prior Art] Usually, one cache memory (hereinafter, also simply referred to as cache) includes a data array section that holds a part of the data in the main memory, and an address array that manages the address of the registered data in this data array section. It is composed of parts.

従来,複数レベルから構成されるキャッシュメモリで
は,所望の要求データがどのレベルのデータアレイ部に
存在するかを,複数のアドレスアレイ部の索引によって
判定し,その結果に従って複数のデータアレイ部から読
み出されたデータを選択して,所望の要求データを得て
いた。
Conventionally, in a cache memory composed of a plurality of levels, it is determined by which index of a plurality of address array units the desired request data exists in the data array unit, and the data is read from the plurality of data array units according to the result. The requested data was obtained by selecting the issued data.

さらに,全てのキャッシュメモリに要求データが存在し
ない場合には,LRU(Least−Recently−Used)アルゴリ
ズム等を用いたリプレースメントアルゴリズム回路によ
って,置換対象のキャッシュメモリを決定していた。
Furthermore, when the requested data does not exist in all the cache memories, the replacement algorithm circuit using the LRU (Least-Recently-Used) algorithm or the like determines the cache memory to be replaced.

[発明が解決しようとする課題] 上述した従来のキャッシュメモリ装置では,要求データ
がどのデータアレイ部に存在するかを判定してから,要
求データが存在するデータアレイを選択するために,選
択回路が必要となる。そのために,キャッシュメモリを
索引してか要求データを得るまでのゲート遅延が大きく
なり,システムのマシンサイクルを小さくできないとい
う欠点がある。
[Problems to be Solved by the Invention] In the above-described conventional cache memory device, the selection circuit is used to select the data array in which the requested data exists after determining in which data array section the requested data exists. Is required. Therefore, there is a drawback that the gate delay until indexing the cache memory or obtaining the requested data becomes large and the machine cycle of the system cannot be shortened.

又,キャッシュメモリの置換アルゴリズム回路が必要な
ために,装置の小型化を図る上で,支障となる欠点があ
る。
Further, since a replacement algorithm circuit for the cache memory is required, there is a drawback that it hinders miniaturization of the device.

[課題を解決するための手段] 本発明の第1の態様によるキャッシュメモリ装置は, 各々がアドレスと該アドレスに対応するメモリデータか
ら成るアドレス・データ対を複数個保持し,第1乃至第
N(N≧2)の優先順位が与えられた第1乃至第Nのキ
ャッシュメモリと, 該第1乃至第Nのキャッシュメモリを同時に索引する手
段と, 前記第1のキャッシュメモリに要求データが存在しない
ときは,該第1のキャッシュメモリ以外の他のキャッシ
ュメモリに存在するアドレス・データ対と前記第1のキ
ャッシュメモリのアドレス・データ対とを置換し,常に
第1のキャッシュメモリから要求データを得る手段とを
有する。
[Means for Solving the Problem] A cache memory device according to a first aspect of the present invention holds a plurality of address / data pairs each of which comprises an address and memory data corresponding to the address. First to Nth cache memories given a priority of (N ≧ 2), means for simultaneously indexing the first to Nth cache memories, and no request data exists in the first cache memory In this case, the address / data pair existing in another cache memory other than the first cache memory is replaced with the address / data pair in the first cache memory, and the request data is always obtained from the first cache memory. And means.

本発明の第2の態様によるキャッシュメモリ装置は, 各々がアドレスと該アドレスに対応するメモリデータか
ら成るアドレス・データ対を複数個保持し,命令アドレ
ス索引に対する第1乃至第N(N≧2)の優先順位とオ
ペランドアドレス索引に対する第1乃至第Nの優先順位
とが個別に割当てられたN個のキャッシュメモリと, 該N個のキャッシュメモリを同時に索引する手段と, 命令アドレス索引とオペランドアドレス索引のそれぞれ
の索引において,第1の優先順位をもつキャッシュメモ
リに要求データが存在しないときは,該第1の優先順位
をもつキャッシュメモリ以外の他のキャッシュメモリに
存在するアドレス・データ対と前記第1の優先順位をも
つキャッシュメモリのアドレス・データ対とを置換し,
常に命令アドレス又はオペランドアドレス索引毎に,個
別に割当てられた第1の優先順位をもつ第1のキャッシ
ュメモリから要求データを得る手段とを有する。
A cache memory device according to a second aspect of the present invention holds a plurality of address / data pairs each consisting of an address and memory data corresponding to the address, and the first to Nth (N ≧ 2) to the instruction address index. Number of cache memories to which priority levels of 1 and N to 1 to N for the operand address index are individually assigned, means for simultaneously indexing the N number of cache memories, instruction address index and operand address index In each of the indexes, when the requested data does not exist in the cache memory having the first priority, the address / data pair existing in the cache memory other than the cache memory having the first priority and the first Replace the address / data pair of the cache memory with the priority of 1,
And means for always obtaining the requested data from the first cache memory having the first priority assigned individually for each instruction address or operand address index.

本発明の第3の態様によるキャッシュメモリ装置は, 各々がアドレスと該アドレスに対応するメモリデータか
ら成るアドレス・データ対を複数個保持する第1乃至第
N(N≧2)のキャッシュメモリと, 要求データが存在するまで前記第1のキャッシュメモリ
から前記第Nのキャッシュメモリまで連続に索引する手
段と, 前記第1のキャッシュメモリに要求データが存在しない
ときは,該第1のキャッシュメモリ以外の他のキャッシ
ュメモリに存在するアドレス・データ対と前記第1のキ
ャッシュメモリのアドレス・データ対とを置換し,常に
第1のキャッシュメモリから要求データを得る手段とを
有する。
A cache memory device according to a third aspect of the present invention includes first to Nth (N ≧ 2) cache memories each of which holds a plurality of address / data pairs each of which includes an address and memory data corresponding to the address. Means for continuously indexing from the first cache memory to the Nth cache memory until request data exists; and when request data does not exist in the first cache memory, the means other than the first cache memory Means for replacing the address / data pair existing in another cache memory with the address / data pair of the first cache memory and always obtaining the requested data from the first cache memory.

本発明の第4の態様によるキャッシュメモリ装置は, 各々がアドレスと該アドレスに対応するメモリデータか
ら成るアドレス・データ対を複数個保持する第1乃至第
N(N≧2)のキャッシュメモリと, 要求データが存在するまで前記第1キャッシュメモリか
ら前記第Nのキャッシュメモリまで連続に索引する手段
と, 要求データが存在するキャッシュメモリから要求データ
を得る手段とを有する。
A cache memory device according to a fourth aspect of the present invention comprises first to Nth (N ≧ 2) cache memories each of which holds a plurality of address / data pairs each of which includes an address and memory data corresponding to the address. It has means for continuously indexing from the first cache memory to the Nth cache memory until the requested data exists, and means for obtaining the requested data from the cache memory where the requested data exists.

本発明の第5の態様によるキャッシュメモリ装置は, 各々がアドレスと該アドレスに対応するメモリデータか
ら成るアドレス・データ対を複数個保持し,第1乃至第
N(N≧2)の優先順位が与えられた第1乃至第Nのキ
ャッシュメモリと, 前記第1のキャッシュメモリに要求データが存在せず,
該第1のキャッシュメモリ以外の他のキャッシュメモリ
に要求データが存在する場合は,当該要求データを含む
アドレス・データ対が前記第1のキャッシュメモリに置
換されるように,前記第1のキャッシュメモリから当該
要求データを含むアドレス・データ対が存在するキャッ
シュメモリまでの間の優先順位を有する全てのキャッシ
ュメモリのアドレス・データ対を前記優先順位に従って
置換し,常に第1のキャッシュメモリから要求データを
得る手段と, 全てのキャッシュメモリに要求データが存在しない場合
には,最も優先順位の低いキャッシュメモリのアドレス
・データ対を置換対象として選択する手段とを有する。
A cache memory device according to a fifth aspect of the present invention holds a plurality of address / data pairs each consisting of an address and memory data corresponding to the address, and the first to Nth (N ≧ 2) priority levels are set. Given first to Nth cache memory, and the requested data does not exist in the first cache memory,
When request data exists in a cache memory other than the first cache memory, the first cache memory is configured so that the address / data pair including the request data is replaced by the first cache memory. To the cache memory in which the address / data pair including the requested data exists, the address / data pairs of all the cache memories having the priority order are replaced according to the priority order, and the requested data is always sent from the first cache memory. It has a means for obtaining and a means for selecting the address / data pair of the cache memory having the lowest priority as a replacement target when the requested data does not exist in all the cache memories.

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

第1図は本発明の第1の実施例によるキャッシュメモリ
装置を示すブロック図である。
FIG. 1 is a block diagram showing a cache memory device according to a first embodiment of the present invention.

第1図において,PAR100はキャッシュのアドレスアレイ
部及びデータアレイ部を索引するための実アドレスを受
ける実アドレスレジスタ,AA110〜113はキャッシュのデ
ータアレイ部のアドレスを管理するアドレスアレイ部,A
AW120〜123はそれぞれAA110〜113への書き込みレジス
タ,セレクタ130〜133はそれぞれAAW120〜123への入力
データを選択する選択器,CMP140〜143はPAR100の出力と
AA110〜113の出力をそれぞれ比較する比較器,キャッシ
ュ制御回路200はCMP140〜143の出力結果に従ってキャッ
シュの制御を司る制御回路,FF201はキャッシュ制御回路
200からの制御信号の一部を受け取るフリップフロップ,
DA210〜213は主メモリ(図示せず)のデータの一部を保
持するキャッシュのデータアレイ部,DAW220〜223はそれ
ぞれDA210〜213への書き込みレジスタ,セレクタ230〜2
33はそれぞれDAW220〜223への入力データを選択する選
択器,セレクタ240はDA210から読み出されたブロックデ
ータのうち,要求元が要求した部分のデータを選択する
選択器,DAR250はセレクタ240が選択したDA210からの読
み出しデータを受けるデータアレイ読み出しレジスタで
ある。
In FIG. 1, PAR100 is a real address register that receives a real address for indexing the address array section and the data array section of the cache, and AA110 to 113 are address array sections that manage the addresses of the data array section of the cache, A
AW120 to 123 are write registers to AA110 to 113 respectively, selectors 130 to 133 are selectors for selecting input data to AAW120 to 123 respectively, and CMP140 to 143 are outputs of PAR100.
A comparator for comparing the outputs of the AA110 to 113, a cache control circuit 200 is a control circuit that controls the cache according to the output results of the CMPs 140 to 143, and a FF201 is a cache control circuit.
A flip-flop that receives a portion of the control signal from 200,
DA210-213 is a data array section of a cache that holds a part of data in a main memory (not shown), DAW220-223 are write registers to DA210-213, selectors 230-2
33 is a selector that selects the input data to the DAWs 220 to 223, a selector 240 is a selector that selects the part of the block data read from the DA 210 that the requester requested, and a DAR 250 is the selector 240 that is selected. A data array read register that receives read data from the DA 210.

AA110〜113はブロックを単位としてデータを登録するデ
ータアレイ部のブロックアドレスを管理する。本実施例
ではキャッシュのブロックサイズは64バイトであり,AA1
10〜113はPAR100の実アドレスのうちの下位の6ビット
(ブロック内アドレス)を無視したブロック外アドレス
部の下位部分のアドレスでアクセスされ,残りのブロッ
ク外アドレスがキーアドレスとしてAA110〜113内に登録
されている。
The AA 110 to 113 manage the block address of the data array unit that registers data in units of blocks. In this embodiment, the cache block size is 64 bytes, and AA1
10 to 113 are accessed by the lower address of the out-of-block address part ignoring the lower 6 bits (in-block address) of the real address of PAR100, and the remaining out-of-block address is stored in AA110 to 113 as a key address. It is registered.

DA210〜213はそれぞれAA110〜113と対応するアドレス位
置にブロックデータを登録する。即ち,AA110〜113と対
応するそれぞれのDA210〜213でキャッシュメモリのアド
レス・データ対を保持している。
DAs 210 to 213 register block data at address positions corresponding to AA 110 to 113, respectively. That is, each DA 210-213 corresponding to AA 110-113 holds the address / data pair of the cache memory.

キャッシュメモリからは,要求元が要求するデータのサ
イズでデータが読み出され,要求元へ送出される。本実
施例ではこのデータのサイズは8バイトである。DA210
〜213はAA索引アドレスと同じPAR100の実アドレス部分
で索引され,それぞれ64バイトデータが読み出される。
DA210から読み出された64バイトデータはセレクタ240に
出力され,PAR100の実アドレスのブロック内アドレス部
のうちの下位3ビット(8バイト内アドレス)を無視し
たアドレス部により,64バイトデータのうちの要求元が
要求した8バイトデータが選択されて,DAR250より要求
データが要求元へ送出される。
Data is read from the cache memory in the size of the data requested by the request source and sent to the request source. In this embodiment, the size of this data is 8 bytes. DA210
Up to 213 are indexed by the real address part of PAR100, which is the same as the AA index address, and 64-byte data is read from each.
The 64-byte data read from the DA210 is output to the selector 240, and the address portion ignoring the lower 3 bits (8-byte internal address) of the block address portion of the real address of PAR100 ignores the 64-byte data. The 8-byte data requested by the request source is selected and the request data is sent from the DAR250 to the request source.

1つのアドレスアレイと対応するデータアレイで1レベ
ル分のキャッシュメモリが構成され,本実施例のキャッ
シュメモリは,アドレスアレイとデータアレイをそれぞ
れ4レベル有する4レベル構成のキャッシュメモリであ
る。そして,AA110〜113及びDA210〜213がそれぞれレベ
ル0〜3に対応しており,レベル0〜3に対応してそれ
ぞれ第1から第4の優先順位が与えられている。また,
キャッシュメモリ全体で同一ブロックデータが二重に登
録されることはない。
A cache memory for one level is constructed by one address array and a corresponding data array. The cache memory of this embodiment is a four-level cache memory having four levels of address arrays and four data arrays, respectively. The AA 110 to 113 and the DA 210 to 213 correspond to the levels 0 to 3, respectively, and the first to the fourth priorities are assigned to the levels 0 to 3, respectively. Also,
The same block data will not be registered twice in the entire cache memory.

次に第1図を参照して本発明の第1の実施例の動作につ
いて詳細に説明する。
Next, the operation of the first embodiment of the present invention will be described in detail with reference to FIG.

PAR100に実アドレスがセットされると,ブロック外アド
レスの下位アドレス部でAA110〜113及びDA210〜213が同
時に索引される。AA110〜113からはキーアドレスが読み
出されてそれぞれCMP140〜143に送出される。CMP140〜1
43では,PAR100のキーアドレス部分に対応するブロック
外アドレスの残りのアドレス部分とそれぞれ同時に比較
され,比較結果がキャッシュ制御回路200へ出力され
る。CMP140〜143は一致を検出した場合は論理“1"を,
不一致を検出した場合は論理“0"を出力する。
When the real address is set in PAR100, AA110-113 and DA210-213 are simultaneously indexed in the lower address part of the out-of-block address. The key address is read from the AA 110 to 113 and sent to the CMPs 140 to 143, respectively. CMP140 ~ 1
At 43, the remaining address portions of the out-of-block addresses corresponding to the key address portion of PAR 100 are simultaneously compared, and the comparison result is output to the cache control circuit 200. When CMP140-143 detect a match, logical "1",
When a mismatch is detected, a logical "0" is output.

今,第1の優先順位を有するキャッシュメモリ即ち,レ
ベル0のキャッシュメモリに要求データが存在すると仮
定しよう。
Now, assume that the requested data exists in the cache memory having the first priority, that is, the level 0 cache memory.

即ち,CMP140が論理“1"を出力してDA210に要求データが
存在することを検出する。この時,キャッシュ制御回路
200はFF201に論理“1"をセットして,第1の優先順位を
有するキャッシュメモリに要求データが存在することを
表示する。と同時に,DA210からは要求データを含むブロ
ックデータが読み出されてセレクタ240に送出され,PAR1
00のブロック内アドレスのうちの8バイトデータ指定ア
ドレス部分によって8バイトの要求データが選択されて
DAR250にセットされる。DAR250にセットされた要求デー
タは,DAR250の内容が有効であることを表示するFF201の
信号と共に要求元に送出される。
That is, the CMP 140 outputs a logical “1” and detects that the requested data exists in the DA 210. At this time, the cache control circuit
200 sets FF201 to logical "1" to indicate that the requested data exists in the cache memory having the first priority. At the same time, block data including request data is read from DA 210 and sent to selector 240, and PAR1
The 8-byte request data is selected by the 8-byte data designation address portion of the 00 block address.
It is set to DAR250. The request data set in the DAR250 is sent to the request source together with the FF201 signal indicating that the contents of the DAR250 are valid.

次に,第1の優先順位を有するキャッシュメモリに即
ち,レベル0のキャッシュメモリに要求データが存在せ
ず,例えばレベル2のキャッシュメモリに要求データが
存在すると仮定しよう。
Next, suppose that the requested data does not exist in the cache memory having the first priority, that is, the cache memory of level 0, and the requested data exists in the cache memory of level 2, for example.

この場合,CMP142が論理“1"を出力してDA212に要求デー
タが存在することを検出する。そのため,キャッシュ制
御回路200は,FF201に論理“0"をセットして,第1の優
先順位を有するキャッシュメモリに要求データが存在し
ないことを表示する。このFF201の出力により,DAR250に
セットされるデータは無効データであることが要求元へ
通知される。
In this case, the CMP 142 outputs a logic "1" and detects that the requested data exists in the DA 212. Therefore, the cache control circuit 200 sets a logical "0" in the FF 201 to indicate that the requested data does not exist in the cache memory having the first priority. The output of this FF201 notifies the request source that the data set in the DAR250 is invalid data.

この時同時にキャッシュ制御回路200は,AA110,112及びD
A210,212に該当するアドレス位置のキーアドレスと,ブ
ロックデータを置換することを指示する。即ち,AA110,1
12に対してはセレクタ130,132を制御して,AA110から読
み出されたキーアドレスをAAW122にセットし,AA112から
読み出されたキーアドレスをAAW120にセットする。そし
て,AAW120,122にセットされたデータをそれぞれAA110,1
12の該当アドレス位置に書き込む。DA210,212に対して
はセレクタ230,232を制御して,DA210から読み出された
ブロックデータをDAW222にセットし,DA212から読み出さ
れたブロックデータをDAW220にセットする。そして,DAW
220,222にセットされたデータをそれぞれDA210,212の該
当アドレス位置に書き込む。
At this time, the cache control circuit 200 simultaneously operates AA 110, 112 and D
Instruct to replace the block data with the key address of the corresponding address position in A210, 212. That is, AA110,1
For 12, the selectors 130 and 132 are controlled so that the key address read from AA110 is set in AAW122 and the key address read from AA112 is set in AAW120. Then, the data set in AAW120, 122 is changed to AA110, 1
Write to 12 applicable address locations. For the DAs 210 and 212, the selectors 230 and 232 are controlled to set the block data read from the DA 210 in the DAW 222 and the block data read from the DA 212 in the DAW 220. And DAW
The data set in 220 and 222 are written in the corresponding address positions of DA 210 and 212, respectively.

これで,レベル0とレベル2のキャッシュメモリのアド
レス・データ対の置換処理が終了する。この置換処理
は,アドレスアレイ,データアレイ共に同時並列に実行
される。
This completes the replacement processing of the address / data pairs in the level 0 and level 2 cache memories. This replacement process is simultaneously executed in parallel for both the address array and the data array.

置換処理が終了すると,再びキャッシュメモリの索引が
行なわれる。要求データは第1の優先順位を有するDA21
0に存在するため,要求データはDAR250にセットされ,FF
201はDAR250の内容が有効であることを表示する論理
“1"にセットされてそれぞれ要求元へ送出される。
When the replacement process is completed, the cache memory is indexed again. Request data is DA21 with first priority
Since it exists in 0, the requested data is set in DAR250 and FF
201 is set to a logic "1" indicating that the contents of DAR250 are valid and sent to the requesting sources respectively.

また,要求データがレベル1及びレベル3のキャッシュ
メモリに存在する場合も,全く同様にレベル0とのキャ
ッシュメモリのアドレス・データ対の置換処理を実施し
た後で,第1の優先順位を有するレベル0のキャッシュ
メモリから要求データが固定的に供給される。
Also, even when the requested data exists in the level 1 and level 3 cache memories, the level having the first priority is executed in exactly the same manner as the replacement of the address / data pair of the level 0 cache memory. Request data is fixedly supplied from the cache memory of 0.

第2図を参照すると,本発明の第2の実施例によるキャ
ッシュメモリ装置は,I/O101とセレクタ235が付加されて
いることを除いて,第1図に示されたものと同様の構成
を有する。
Referring to FIG. 2, the cache memory device according to the second embodiment of the present invention has the same configuration as that shown in FIG. 1 except that an I / O 101 and a selector 235 are added. Have.

I/O101は命令アドレス索引であるか,オペランドアドレ
ス索引であるかを表示するフラグレジスタである。キャ
ッシュ制御回路200aは,CMP140〜143の出力結果及びI/O1
01の出力結果に従ってキャッシュの制御を司る。セレク
タ235はDA210とDA213からの読み出しデータを選択する
選択器である。セレクタ240aはセレクタ235から出力さ
れたブロックデータのうち,要求元が要求した部分のデ
ータを選択する。
The I / O 101 is a flag register that indicates whether it is an instruction address index or an operand address index. The cache control circuit 200a outputs the output results of the CMPs 140 to 143 and the I / O 1
It controls the cache according to the output result of 01. The selector 235 is a selector that selects read data from the DA 210 and DA 213. The selector 240a selects the part of the block data output from the selector 235 that is requested by the request source.

DA210とDA213から読み出された64バイトデータはセレク
タ235でいずれか一方が選択されて,セレクタ240aに出
力され,PAR100の実アドレスのブロック内アドレス部の
うちの下位3ビット(8バイト内アドレス)を無視した
アドレス部により,64バイトデータのうちの要求元が要
求した8バイトデータが選択されて,DAR250より要求デ
ータが要求元へ送出される。
One of the 64-byte data read from DA210 and DA213 is selected by the selector 235 and output to the selector 240a, and the lower 3 bits (8-byte address) of the block address part of the real address of PAR100. The 8-byte data requested by the request source out of the 64-byte data is selected by the address section ignoring the, and the request data is sent from the DAR250 to the request source.

AA110〜113及びDA210〜213がそれぞれレベル0〜3に対
応しており,命令アドレス索引の場合はレベル0〜3に
対応してそれぞれ第1から第4の優先順位が与えられて
おり,オペランドアドレス索引の場合は逆にレベル3〜
0に対応してそれぞれ第1から第4の優先順位が与えら
れている。
AA110 to 113 and DA210 to 213 respectively correspond to levels 0 to 3, and in the case of the instruction address index, the first to fourth priorities are given respectively corresponding to levels 0 to 3 and the operand address On the contrary, in case of index, level 3 ~
Corresponding to 0, the first to fourth priorities are given respectively.

次に第2図を参照して,本発明の第2の実施例の動作に
ついて詳細に説明する。
Next, the operation of the second embodiment of the present invention will be described in detail with reference to FIG.

I/O101に命令アドレス索引であるか,オペランドアドレ
ス索引であるかの指示がセットされ,同時にPAR100に実
アドレスがセットされると,ブロック外アドレスの下位
アドレス部でAA110〜113及びDA210〜213が同時に索引さ
れる。AA110〜113からはキーアドレスが読み出されてそ
れぞれCMP140〜143に送出される。CMP140〜143では,PAR
100のキーアドレス部分に対応するブロック外アドレス
の残りのアドレス部分とそれぞれ同時に比較され,比較
結果がキャッシュ制御回路200aへ出力される。CMP140〜
143は一致を検出した場合は論理“1"を,不一致を検出
した場合は論理“0"を出力する。
When the instruction address index or operand address index is set in the I / O 101 and the real address is set in the PAR 100 at the same time, AA110 to 113 and DA210 to 213 in the lower address part of the out-of-block address Indexed at the same time. The key address is read from the AA 110 to 113 and sent to the CMPs 140 to 143, respectively. PAR for CMP140-143
The remaining address parts of the out-of-block addresses corresponding to the key address part of 100 are simultaneously compared, and the comparison result is output to the cache control circuit 200a. CMP140 ~
143 outputs a logic "1" when a match is detected and outputs a logic "0" when a mismatch is detected.

今,I/O101が命令アドレス索引を指示しており,かつ第
1の優先順位を有するキャッシュメモリに要求データが
存在する即ち,DA210に要求データが存在すると仮定しよ
う。
Suppose now that the I / O 101 points to the instruction address index, and the requested data exists in the cache memory having the first priority, that is, the requested data exists in the DA 210.

従って,CMP140が論理“1"を出力してDA210に要求データ
が存在することをキャッシュ制御回路200aに通知する。
この時,キャッシュ制御回路200aはFF201に論理“1"を
セットして,第1の優先順位を有するキャッシュメモリ
に要求データが存在することを表示する。と同時に,DA2
10からは要求データを含むブロックデータが読み出さ
れ,セレクタ235で選択されてセレクタ240aに送出され
る。セレクタ240aではPAR100のブロック内アドレスのう
ちの8バイトデータ指定アドレス部分によって8バイト
の要求データが選択されてDAR250にセットされる。DAR2
50にセットされた要求データは,DAR250の内容が有効で
あることを表示するFF201の信号と共に要求元に送出さ
れる。
Therefore, the CMP 140 outputs a logic "1" to notify the cache control circuit 200a that the DA 210 has the requested data.
At this time, the cache control circuit 200a sets a logical "1" in the FF 201 to indicate that the requested data exists in the cache memory having the first priority. At the same time, DA2
Block data including request data is read from 10, selected by the selector 235, and sent to the selector 240a. In the selector 240a, 8-byte request data is selected by the 8-byte data designated address portion of the address in the block of PAR100 and set in the DAR250. DAR2
The request data set in 50 is sent to the request source together with the signal of FF201 indicating that the contents of DAR250 are valid.

第1の優先順位を有するキャッシュメモリに要求データ
がしない場合の動作は,上述した第1の実施例のそれと
同様なので,説明を省略する。
The operation when there is no requested data in the cache memory having the first priority is the same as that of the above-described first embodiment, and therefore its explanation is omitted.

一般に,プログラムの局所性のために,命令語とオペラ
ンドとは独立的にメモリ上に存在する可能性が高く,か
つ命令語及びオペランド共に現在アクセスされているデ
ータの接傍に次にアクセスされるデータが存在する可能
性が高い。従って,上記のように制御することにより要
求される命令語がDA210内に登録されている可能性を高
くでき,要求データをDA210より高速に供給できるよう
になる。即ち,DA210内にアクセスされる可能性の高い命
令語を集中的に登録できるようになる。
Generally, because of the locality of the program, the instruction word and the operand are likely to exist in memory independently, and both the instruction word and the operand are next accessed next to the data currently being accessed. Data is likely to exist. Therefore, by controlling as described above, it is possible to increase the possibility that the command word requested is registered in the DA210, and the requested data can be supplied faster than the DA210. That is, it becomes possible to centrally register the command words that are likely to be accessed in the DA 210.

一方,I/O101にオペランドアドレス索引の指示がセット
された場合には,その指示がキャッシュ制御回路200aに
通知され,キャッシュ制御回路200aは,命令語が集中し
ているDA210,即ちレベル0の内容を壊さないように,求
めるべきオペランドをDA213,即ちレベル3から固定的に
供給するように制御を切り替える。
On the other hand, when the instruction of the operand address index is set in the I / O 101, the instruction is notified to the cache control circuit 200a, and the cache control circuit 200a informs the DA 210 where the instruction words are concentrated, that is, the contents of level 0. The control is switched so that the operand to be sought is fixedly supplied from DA 213, that is, level 3 so as not to destroy the above.

以後の動作は,命令アドレスの索引の場合と同様であ
り,DA213に要求データが存在することが検出された場合
には,DA213より要求データがDAR250に読み出され,DA213
に要求データが存在せず,他のDA210,211若しくは212,
即ちレベル0,レベル1若しくはレベル2に存在すること
が検出された場合には,レベル3のキャッシュメモリの
アドレス・データ対との置換処理を実施した後で第1の
優先順位を有するレベル3のキャッシュメモリから要求
データが固定的に供給される。このように制御すること
により,DA213内にアクセスされる可能性の高いオペラン
ドを集中的に登録できるようになる。
The subsequent operation is the same as that for the index of the instruction address. When it is detected that the requested data exists in DA213, the requested data is read from DA213 to DAR250, and DA213 is read.
There is no required data in other DA210, 211 or 212,
That is, when it is detected that the data exists in the level 0, the level 1 or the level 2, the replacement process with the address / data pair of the cache memory of the level 3 is performed, and then the level 3 of the first priority is used. Request data is fixedly supplied from the cache memory. By controlling in this way, it becomes possible to centrally register operands that are likely to be accessed in DA213.

第3図を参照すると,本発明の第3の実施例によるキャ
ッシュメモリ装置は,セレクタ135とセレクタ235aが付
加され,CMP140〜143の代わりにCMP140aが設けられてい
ることを除いて,第1図に示されたものと同様の構成を
有する。
Referring to FIG. 3, the cache memory device according to the third embodiment of the present invention is different from that shown in FIG. 1 except that a selector 135 and a selector 235a are added and a CMP 140a is provided instead of the CMPs 140-143. It has a configuration similar to that shown in FIG.

セレクタ135はAA110〜113の出力を選択する選択器であ
る。CMP140aはPAR100の出力とセレクタ135で選択された
AA110〜113のいずれかの出力とを比較する。キャッシュ
制御回路200bはCMP140aの出力結果に従ってキャッシュ
の制御を司る。セレクタ235aはDA210〜213の出力を選択
する。セレクタ240bはセレクタ235aで選択されたDA210
〜213のいずれかから読み出されたブロックデータのう
ち,要求元が要求した部分のデータを選択する。
The selector 135 is a selector that selects the outputs of AA110 to 113. CMP140a selected by PAR100 output and selector 135
Compare with the output of any of AA110-113. The cache control circuit 200b controls the cache according to the output result of the CMP 140a. Selector 235a selects the output of DA 210-213. Selector 240b is DA210 selected by selector 235a
Of the block data read from any of the items ˜213, the data of the part requested by the request source is selected.

DA210〜213から読み出された64バイトデータはセレクタ
235aで選択されてセレクタ240bに出力され,PAR100の実
アドレスのブロック内アドレス部のうちの下位3ビット
(8バイト内アドレス)を無視したアドレス部により,6
4バイトデータのうちの要求元が要求した8バイトデー
タが選択されて,DAR250より要求データが要求元へ送出
される。
64-byte data read from DA210-213 is a selector
It is selected by 235a and output to the selector 240b. By the address part that ignores the lower 3 bits (8-byte address) of the in-block address part of the real address of PAR100, 6
The 8-byte data requested by the request source is selected from the 4-byte data, and the request data is sent from the DAR250 to the request source.

AA110〜113及びDA210〜213がそれぞれレベル0〜3に対
応しており,レベル0,1,2,3の順に索引が試みられる。
そして,レベル0〜3がそれぞれ第1〜第4のキャッシ
ュメモリに対応している。
AA110 to 113 and DA210 to 213 correspond to levels 0 to 3, respectively, and the index is tried in order of levels 0, 1, 2, and 3.
The levels 0 to 3 correspond to the first to fourth cache memories, respectively.

次に第3図を参照して,本発明の第3の実施例の動作に
ついて詳細に説明する。
Next, the operation of the third embodiment of the present invention will be described in detail with reference to FIG.

PAR100に実アドレスがセットされると,ブロック外アド
レスの下位アドレス部でAA110〜113及びDA210〜213がア
クセスされる。AA110〜113からはキーアドレスが読み出
されてセレクタ135に出力され,キャッシュ制御回路200
bはAA110の出力を選択するように指示する。CMP140aは,
PAR100のキーアドレス部分に対応するブロック外アドレ
スの残りのアドレス部分とセレクタ135で選択されたAA1
10の出力を比較し,比較結果をキャッシュ制御回路200b
へ出力する。CMP140aは一致を検出した場合は論理“1"
を,不一致を検出した場合は論理“0"を出力する。
When the real address is set in PAR100, AA110-113 and DA210-213 are accessed in the lower address part of the out-of-block address. The key address is read from the AA 110 to 113 and output to the selector 135, and the cache control circuit 200
b instructs to select the output of AA110. CMP140a,
The remaining address part of the address outside the block corresponding to the key address part of PAR100 and AA1 selected by the selector 135
The 10 outputs are compared, and the comparison result is the cache control circuit 200b.
Output to. CMP140a is logical "1" when a match is detected
If a mismatch is detected, a logical "0" is output.

今,第1のキャッシュメモリに要求データが存在すると
仮定しよう。
Now suppose that the requested data exists in the first cache memory.

即ち,CMP140aが論理“1"を出力してDA210に要求データ
が存在することを検出する。この時,キャッシュ制御回
路200bはFF201に論理“1"をセットして,第1のキャッ
シュメモリに要求データが存在することを表示する。こ
の時同時に,DA210からは要求データを含むブロックデー
タが読み出されており,キャッシュ制御回路200bの指示
によってセレクタ235aで選択されて,セレクタ240bに送
出される。セレクタ240bではPAR100のブロック内のアド
レスのうちの8バイトデータ指定アドレス部分によって
8バイトの要求データが選択されてDAR250にセットされ
る。DAR250にセットされた要求データは,DAR250の内容
が有効であることを表示するFF201の信号と共に要求元
に送出される。
That is, the CMP 140a outputs a logical "1" and detects that the requested data exists in the DA 210. At this time, the cache control circuit 200b sets a logical "1" in the FF 201 to indicate that the requested data exists in the first cache memory. At this time, at the same time, the block data including the requested data is read from the DA 210, selected by the selector 235a according to the instruction from the cache control circuit 200b, and sent to the selector 240b. In the selector 240b, 8-byte request data is selected by the 8-byte data designation address portion of the address in the block of PAR100 and set in the DAR250. The request data set in the DAR250 is sent to the request source together with the FF201 signal indicating that the contents of the DAR250 are valid.

次に,第1のキャッシュメモリに要求データが存在せ
ず,例えばレベル2のキャッシュメモリに要求データが
存在すると仮定しよう。
Next, suppose that the requested data does not exist in the first cache memory, for example, the requested data exists in the level 2 cache memory.

この場合,CMP140aは論理“0"を出力してDA210に要求デ
ータが存在しないことを検出する。そのためキャッシュ
制御回路200bは,FF201に論理“0"をセットして,第1の
キャッシュメモリに要求データが存在しないことを表示
する。このFF201の出力により,DAR250にセットされるデ
ータは無効データであることが要求元へ通知される。
In this case, the CMP 140a outputs logic "0" and detects that the requested data does not exist in the DA 210. Therefore, the cache control circuit 200b sets a logical "0" in the FF 201 to indicate that the requested data does not exist in the first cache memory. The output of this FF201 notifies the request source that the data set in the DAR250 is invalid data.

と同時に,キャッシュ制御回路200bはセレクタ135及び2
35bがAA111,DA211を選択するように指示する。そして再
びCMP140aでPAR100の出力とAA111の出力とが比較され,C
MP140aは論理“0"を出力し,DA211に要求データが存在し
ないことを検出する。
At the same time, the cache control circuit 200b operates the selectors 135 and 2
35b instructs to select AA111, DA211. Then, again the output of PAR100 and the output of AA111 are compared by CMP140a, and C
The MP140a outputs logic "0" and detects that the requested data does not exist in the DA211.

キャッシュ制御回路200bはCMP140aが論理“1"を出力し
て,要求データが存在するキャッシュメモリを検出する
まで,セレクタ135,235aの出力を切り替えて順に索引を
繰り返す。
The cache control circuit 200b switches the outputs of the selectors 135 and 235a and repeats the index in order until the CMP 140a outputs a logical "1" and detects the cache memory in which the requested data exists.

そして,セレクタ135,235aがそれぞれAA112,DA212を選
択すると,CMP140aは論理“1"を出力してDA212に要求デ
ータが存在することを検出して,その旨をキャッシュ制
御回路200bに通知する。
Then, when the selectors 135 and 235a select AA112 and DA212, respectively, the CMP 140a outputs a logic "1", detects that the requested data exists in the DA212, and notifies the cache control circuit 200b to that effect.

キャッシュ制御回路200bは,AA110,112及びDA210,212に
該当するアドレス位置のキーアドレスと,ブロックデー
タを置換することを指示する。即ち,AA110,112に対して
はセレクタ130,132を制御して,AA110から読み出された
キーアドレスをAAW122にセットし,AA112から読み出さ
れ,セレクタ135で選択されたキーアドレスをAAW120に
セットする。そして,AAW120,122にセットされたデータ
をそれぞれAA110,112の該当アドレス位置に書き込む。D
A210,212に対してはセレクタ230,232を制御して,DA210
から読み出されたブロックデータをDAW222にセットし,D
A212から読み出され,セレクタ235aで選択されたブロッ
クデータをDAW220にセットする。そして,DAW220,222に
セットされたデータをそれぞれDA210,212の該当アドレ
ス位置に書き込む。
The cache control circuit 200b instructs the AA 110, 112 and DA 210, 212 to replace the block data with the key address at the corresponding address position. That is, the selectors 130 and 132 are controlled for the AA 110 and 112, the key address read from the AA 110 is set in the AAW 122, and the key address read from the AA 112 and selected by the selector 135 is set in the AAW 120. Then, the data set in the AAWs 120 and 122 are written to the corresponding address positions of the AA 110 and 112, respectively. D
DA210 is controlled by controlling selectors 230 and 232 for A210 and 212.
Set the block data read from the DAW222 to D
The block data read from A212 and selected by the selector 235a is set in the DAW220. Then, the data set in the DAWs 220 and 222 are written in the corresponding address positions of the DAs 210 and 212, respectively.

これで,レベル0とレベル2のキャッシュメモリのアド
レス・データ対の置換処理が終了する。この置換処理
は,アドレスアレイ,データアレイ共に同時並列に実行
される。
This completes the replacement processing of the address / data pairs in the level 0 and level 2 cache memories. This replacement process is simultaneously executed in parallel for both the address array and the data array.

置換処理が終了すると,再び第1のキャッシュメモリか
らの索引が行なわれる。要求データは第1のキャッシュ
メモリのDA210に存在するため,前述の説明と同様に,
要求データはDAR250にセットされ,FF201はDAR250の内容
が有効であることを表示する論理“1"にセットされてそ
れぞれ要求元へ送出される。
When the replacement process is completed, the index from the first cache memory is performed again. Since the requested data exists in DA210 of the first cache memory, similar to the above description,
The requested data is set in the DAR250, and the FF201 is set to a logical "1" indicating that the contents of the DAR250 are valid and sent to the requesting sources.

また要求データがレベル1及びレベル3のキャッシュメ
モリに存在する場合も,全く同様に第1のキャッシュメ
モリから順に要求データが見つかるまで索引され,要求
データが見つかった時点で第1のキャッシュメモリであ
るレベル0のアドレス・データ対との間で置換処理を実
施した後で,第1のキャッシュメモリから要求データが
固定的に供給される。
Further, even when the requested data is present in the level 1 and level 3 cache memories, it is indexed in the same way from the first cache memory until the requested data is found, and when the requested data is found, it is the first cache memory. After performing the replacement process with the level-0 address / data pair, the requested data is fixedly supplied from the first cache memory.

第4図を参照すると,本発明の第4の実施例によるキャ
ッシュメモリ装置は,セレクタ130〜133及びセレクタ23
0〜233が削除され,AAW120〜123の代わりにAAW120aが,DA
W220〜223の代わりにDAW220aが設けられていることを除
いて,第3図に示されたものと同様の構成を有する。
Referring to FIG. 4, a cache memory device according to a fourth embodiment of the present invention includes selectors 130-133 and a selector 23.
0-233 is deleted, AAW120a is replaced by DAA120-123 instead of DA
It has the same configuration as that shown in FIG. 3 except that a DAW 220a is provided instead of W220-223.

AAW120aはAA110〜113への書き込みレジスタである。DAW
220aはDA210〜213への書き込みレジスタである。
AAW120a is a write register for AA110-113. DAW
220a is a write register to DA210-213.

次に,第4図を参照して,本発明の第3の実施例の動作
について詳細に説明する。
Next, the operation of the third embodiment of the present invention will be described in detail with reference to FIG.

今,第1のキャッシュメモリに要求データが存在すると
仮定しよう。
Now suppose that the requested data exists in the first cache memory.

即ち,CMP140aが論理“1"を出力してDA210に要求データ
が存在することを検出する。この時,キャッシュ制御回
路200cはFF201に論理“1"をセットして,現在索引を行
っているキャッシュメモリに要求データが存在すること
を表示する。この時同時に,DA210からは要求データを含
むブロックデータが読み出されており,キャッシュ制御
回路200cの指示によってセレクタ235aで選択されて,セ
レクタ240bに送出される。セレクタ240bではPAR100のブ
ロック内アドレスのうちの8バイトデータ指定アドレス
部分によって8バイトの要求データが選択されてDAR250
にセットされる。DAR250にセットされた要求データは,D
AR250の内容が有効であることを表示するFF201の信号と
共に要求元に送出される。
That is, the CMP 140a outputs a logical "1" and detects that the requested data exists in the DA 210. At this time, the cache control circuit 200c sets a logical "1" in the FF 201 to indicate that the requested data exists in the cache memory currently indexing. At this time, at the same time, the block data including the requested data is read from the DA 210, selected by the selector 235a according to the instruction from the cache control circuit 200c, and sent to the selector 240b. In the selector 240b, the 8-byte request data is selected by the 8-byte data designation address portion of the address in the block of PAR100, and the DAR250
Is set to. The requested data set in DAR250 is D
It is sent to the request source together with the signal of FF201 indicating that the contents of AR250 are valid.

次に,第1のキャッシュメモリに要求データが存在せ
ず,例えばレベル2のキャッシュメモリに要求データが
存在するとする。この場合,CMP140aは論理“0"を出力し
てDA210に要求データが存在しないことを検出する。そ
のため,キャッシュ制御回路200cは,FF201に論理“0"を
セットして,第1のキャッシュメモリに要求データが存
在しないことを表示する。このFF201の出力により,DAR2
50にセットされるデータは無効データであることが要求
元へ通知される。
Next, it is assumed that the requested data does not exist in the first cache memory and the requested data exists in the level 2 cache memory, for example. In this case, the CMP 140a outputs logic "0" and detects that the requested data does not exist in the DA 210. Therefore, the cache control circuit 200c sets a logical "0" in the FF 201 to indicate that the requested data does not exist in the first cache memory. By the output of this FF201, DAR2
The requester is notified that the data set in 50 is invalid data.

と同時にキャッシュ制御回路200cはセレクタ135及び235
aがAA111,DA211を選択するように指示する。そして再び
CMP140aでPAR100の出力とAA111の出力とが比較され,CMP
140aは論理“0"を出力し,DA211に要求データが存在しな
いことを検出する。
At the same time, the cache control circuit 200c operates the selectors 135 and 235.
Instruct a to select AA111, DA211. And again
The CMP140a compares the output of PAR100 with the output of AA111,
140a outputs logic "0" and detects that the requested data does not exist in DA211.

キャッシュ制御回路200bはCMP140aが論理“1"を出力し
て,要求データが存在するキャッシュメモリを検出する
まで,セレクタ135,235aの出力を切り替えて順に索引を
繰り返す。
The cache control circuit 200b switches the outputs of the selectors 135 and 235a and repeats the index in order until the CMP 140a outputs a logical "1" and detects the cache memory in which the requested data exists.

そして,セレクタ135,235aがそれぞれAA112,DA212を選
択すると,CMP140aは論理“1"を出力してDA212に要求デ
ータが存在することを検出して,その旨をキャッシュ制
御回路200cに通知する。キャッシュ制御回路200cは,FF2
01を論理“1"にセットして,同時にセレクタ235aによっ
て選択されたDA212からの出力データ中の要求データをD
AR250にセットして要求元へ送出する。
When the selectors 135 and 235a select AA112 and DA212, respectively, the CMP 140a outputs a logic "1", detects that the requested data exists in the DA212, and notifies the cache control circuit 200c to that effect. The cache control circuit 200c is FF2
01 is set to logic "1", and at the same time, the requested data in the output data from DA212 selected by the selector 235a is set to D
Set it in AR250 and send it to the request source.

また要求データがレベル1及びレベル3のキャッシュメ
モリに存在する場合も全く同様に,第1のキャッシュメ
モリから順に要求データが見つかるまで索引し,要求デ
ータが存在するキャッシュメモリから要求データを供給
する。
Further, even when the requested data exists in the cache memories of the level 1 and the level 3, the index data is indexed in order from the first cache memory until the requested data is found, and the requested data is supplied from the cache memory in which the requested data exists.

第5図を参照すると,本発明の第5の実施例によるキャ
ッシュメモリ装置は,セレクタ131〜133及びセレクタ23
1〜233が削除されていることを除いて,第1図に示され
たものと同様の構成を有する。
Referring to FIG. 5, the cache memory device according to the fifth embodiment of the present invention includes selectors 131 to 133 and a selector 23.
It has a configuration similar to that shown in FIG. 1 except that 1-233 have been deleted.

次に第5図を参照して,本発明の第5の実施例の動作に
ついて説明する。
Next, the operation of the fifth embodiment of the present invention will be described with reference to FIG.

第1の優先順位を有するキャッシュメモリ即ち,レベル
0のキャッシュメモリに要求データが存在する場合の動
作は,上述した第1図を参照して説明したものと同様な
ので,この説明を省略する。
The operation when the requested data exists in the cache memory having the first priority, that is, the level 0 cache memory is the same as that described with reference to FIG.

次に,第1の優先順位を有するキャッシュメモリ即ち,
レベル0のキャッシュメモリに要求データが存在せず,
例えばレベル2のキャッシュメモリに要求データが存在
すると仮定しよう。
Next, the cache memory having the first priority, that is,
The requested data does not exist in the level 0 cache memory,
For example, assume that the requested data exists in the level 2 cache memory.

この場合,CMP142が論理“1"を出力してDA212に要求デー
タが存在することを検出する。そのため,キャッシュ制
御回路200dは,FF201に論理“0"をセットして,第1の優
先順位を有するキャッシュメモリに要求データが存在し
ないことを表示する。このFF201の出力により,DAR250に
セットされるデータは無効データであることが要求元へ
通知される。
In this case, the CMP 142 outputs a logic "1" and detects that the requested data exists in the DA 212. Therefore, the cache control circuit 200d sets a logical "0" in the FF 201 to indicate that the requested data does not exist in the cache memory having the first priority. The output of this FF201 notifies the request source that the data set in the DAR250 is invalid data.

この時,キャッシュ制御回路200dは,AA112及びDA212の
該当するアドレス位置のキーアドレス及びブロックデー
タ(レベル2のキャッシュメモリのアドレス・データ
対)が,AA110及びDA210の該当するアドレス位置に(レ
ベル0のキャッシュメモリのアドレス・データ対とし
て)それぞれ置換されるように下記の制御を行なう。
At this time, the cache control circuit 200d determines that the key address and block data (address / data pair of the level 2 cache memory) at the corresponding address positions of AA112 and DA212 are at the corresponding address positions of AA110 and DA210 (level 0). The following control is performed so that they are respectively replaced (as address / data pairs in the cache memory).

即ち,第1の優先順位を持つレベル0のキャッシュメモ
リから要求データが存在するレベル2のキャッシュメモ
リまでの間の優先順位を有する全てのキャッシュメモ
リ,つまり,第1の優先順位を持つレベル0のキャッシ
ュメモリ(AA110,DA210),第2の優先順位を持つレベ
ル1のキャッシュメモリ(AA111,DA211),第3の優先
順位を持つレベル2のキャッシュメモリ(AA112,DA21
2)の同一索引アドレス上のアドレス・データ対(キー
アドレスとブロックデータ)をこの優先順位に従って置
換する。
That is, all cache memories having priority levels from the level 0 cache memory having the first priority to the level 2 cache memory in which the requested data exists, that is, the level 0 cache memory having the first priority Cache memory (AA110, DA210), Level 1 cache memory with second priority (AA111, DA211), Level 2 cache memory with third priority (AA112, DA21)
The address data pairs (key address and block data) on the same index address in 2) are replaced according to this priority.

先ず,レベル0〜2までのアドレス・データ対が同時に
読み出され,要求データを含むAA112のキーアドレス及
びDA212のブロックデータが新たな第1の優先順位を持
つアドレス・データ対としてセレクタ130及びセレクタ2
30を通してそれぞれAAW120及びDAW220にセットされる。
AA110のキーアドレス及びDA210のブロックデータはそれ
ぞれAAW121及びDAW221に,AA111のキーアドレス及びDA21
1のブロックデータはそれぞれAAW122及びDAW222にセッ
トされる。そして,AAW120〜122及びDAW220〜222の内容
をAA110〜112及びDA210〜212の該当するアドレス位置に
それぞれ書き込むことによって,レベル0〜レベル2の
間のキャッシュメモリの置換処理が終了する。
First, address data pairs of levels 0 to 2 are simultaneously read out, and the key address of AA112 and the block data of DA212 including the requested data are newly selected as the address data pair having the first priority and the selector 130 and the selector. 2
It is set to AAW120 and DAW220 through 30 respectively.
The key address of AA110 and the block data of DA210 are stored in AAW121 and DAW221, respectively, and the key address of AA111 and DA21.
The block data of 1 is set in AAW122 and DAW222, respectively. Then, the contents of the AAWs 120 to 122 and DAWs 220 to 222 are written in the corresponding address positions of the AA 110 to 112 and DA 210 to 212, respectively, and the replacement process of the cache memory between level 0 and level 2 is completed.

この置換処理によって要求データがレベル0のキャッシ
ュメモリに登録されたことになり,再びキャッシュ索引
を行なうことにより,要求データがDAR250に読み出され
て,DAR250に有効データが存在することを表示するFF201
のフラグと共に要求元に送出される。
By this replacement processing, the requested data has been registered in the level 0 cache memory, and the cache index is performed again, so that the requested data is read out to the DAR250, and it is displayed that there is valid data in the DAR250.
It is sent to the request source together with the flag.

また,第1の優先順位を持つレベル0のキャッシュメモ
リに要求データが存在せず,レベル1若しくはレベル3
のキャッシュメモリに要求データが存在する場合も全く
同様に,レベル0のキャッシュメモリからレベル1のキ
ャッシュメモリ若しくはレベル3のキャッシュメモリま
での間の全キャッシュメモリ間で優先順位に従った置換
処理を実施した後,レベル0のキャッシュメモリのDA21
0から要求データが固定的に供給される。
Further, the requested data does not exist in the level 0 cache memory having the first priority, and the level 1 or level 3
In the same way, even if the requested data exists in the cache memory of, the replacement processing according to the priority order is performed among all the cache memories from the level 0 cache memory to the level 1 cache memory or the level 3 cache memory. After that, DA21 of the level 0 cache memory
Request data is fixedly supplied from 0.

このようにして,要求データがどのキャッシュメモリに
登録されているかを判定した後で,要求データが登録さ
れているキャッシュメモリを選択して要求データを得る
という処理を不要にしている。
In this way, it is not necessary to select the cache memory in which the request data is registered and then select the cache memory in which the request data is registered to obtain the request data.

又,本実施例でのレベル0〜レベル3のキャッシュメモ
リの間の優先順位に従った置換アルゴリズムは,ちょう
どLRUアルゴリズムに一致しており,第1の優先順位を
有するレベル0のキャッシュメモリから第4の優先順位
を有するレベル3のキャッシュメモリまでに登録されて
いるアドレス・データ対は常に最も最近使用されたアド
レス・データ対から最も長い間使用されなかったアドレ
ス・データ対の順番で登録されるように保たれる。
Further, the replacement algorithm according to the priorities among the level 0 to level 3 cache memories in this embodiment exactly matches the LRU algorithm, and the level 0 cache memory having the first priority is replaced by the level 0 cache memory. Address data pairs registered up to the level 3 cache memory having the priority of 4 are always registered in the order of the most recently used address data pair to the least recently used address data pair. To be kept as.

従って,レベル0〜レベル3の全てのキャッシュメモリ
に要求データを含むアドレス・データ対が存在せず,レ
ベル0〜レベル3のキャッシュメモリのいずれかのアド
レス・データ対の書き換えの必要が生じた場合には,LRU
アルゴリズム等を用いたリプレースメントアルゴリズム
回路による書き換えレベルの選択が必要となり,常に最
も優先順位の低いレベル3のキャッシュメモリ,即ちAA
113,DA213のアドレス・データ対が書き換え対象として
自動的に決定できる。
Therefore, when there is no address / data pair including the requested data in all the level 0 to level 3 cache memories and it is necessary to rewrite any address / data pair of the level 0 to level 3 cache memories. In the LRU
It is necessary to select the rewrite level by the replacement algorithm circuit that uses an algorithm, etc., and the cache memory of level 3, which has the lowest priority, is always AA.
Address / data pairs of 113 and DA213 can be automatically determined as the rewrite target.

この時は,PAR100に保持されている実アドレスによって
主メモリに対してブロックデータの転送要求が出され
る。そして主メモリから取り出されたブロックデータの
登録時に,優先順位に従った置換処理が行なわれる。
At this time, a block data transfer request is issued to the main memory by the real address held in PAR100. Then, when the block data fetched from the main memory is registered, the replacement process according to the priority order is performed.

先ず,主メモリに対してブロックデータの転送要求を行
なったPAR100上の実アドレスのキーアドレスに相当する
ブロック外アドレスの上位部が新たな第1の優先順位を
持つキーアドレスとしてAAW120にセットされ,同時にAA
110〜112から読み出されたキーアドレスがそれぞれAAW1
21〜123にセットされる。一方,主メモリから取り出さ
れたブロックデータが新たな第1の優先順位を持つブロ
ックデータとしてDAW220にセットされ,同時にDA210〜2
12から読み出されたブロックデータがそれぞれDAW221〜
223にセットされる。そして,AAW120〜123及びDAW220〜2
23のアドレス・データ対がそれぞれ,AA110〜113及びDA2
10〜213の該当するアドレス位置に書き込まれ,要求デ
ータがDA210よりDAR250に読み出されて要求元へ送出さ
れる。
First, the upper part of the out-of-block address corresponding to the key address of the real address on PAR100 that issued the block data transfer request to the main memory is set in AAW120 as the key address with the new first priority, AA at the same time
The key address read from 110 to 112 is AAW1
Set to 21-123. On the other hand, the block data retrieved from the main memory is set in the DAW220 as block data having a new first priority, and at the same time DA210 to DA2
The block data read from 12 are DAW221 ~
Set to 223. And AAW120 ~ 123 and DAW220 ~ 2
23 address / data pairs are AA110-113 and DA2 respectively
The data is written in the corresponding address position of 10 to 213, the requested data is read from the DA210 to the DAR250, and sent to the request source.

以上の処理により,レベル3のキャッシュメモリAA113,
DA213に登録されていた最も優先順位の低いアドレス・
データ対が自動的に書き換えられたことになる。
By the above processing, the level 3 cache memory AA113,
The lowest priority address registered in DA213
The data pair is automatically rewritten.

[発明の効果] 以上説明したように本発明は,要求データがどのデータ
アレイに登録されているかを,アドレスアレイを索引し
て判定してその結果に従ってデータアレイを選択して要
求データを得るという処理を不要にし,マシンサイクル
を決定するキャッシュメモリからの要求データ索引パス
を単純化したことにより,ゲート遅延を大幅に削減し,
システムのマシンサイクルを短縮できる効果がある。
又,本発明の第2の態様では,命令アドレス索引とオペ
ランドアドレス索引に対して,それぞれ個別にキャッシ
ュメモリに優先順位を割当てることによって,命令語と
オペランドを各々独立に第1の優先順位を持つキャッシ
ュメモリ上に集中して登録でき,それぞれ第1の優先順
位を持つキャッシュメモリより要求データを高速に供給
できる効果もある。更に,本発明の第5の態様では,キ
ャッシュメモリの置換アルゴリズム回路を不要としたこ
とにより,ハードウェア量を大幅に削減し,システムを
小型化できる効果もある。
[Effects of the Invention] As described above, according to the present invention, it is determined in which data array the requested data is registered by indexing the address array and selecting the data array according to the result to obtain the requested data. By eliminating the processing and simplifying the requested data index path from the cache memory that determines the machine cycle, the gate delay is greatly reduced,
This has the effect of shortening the machine cycle of the system.
According to the second aspect of the present invention, the instruction word index and the operand address index are independently assigned to the cache memory, so that the instruction word and the operand independently have the first priority. There is also an effect that the data can be centrally registered in the cache memory and the requested data can be supplied faster than the cache memory having the first priority. Further, in the fifth aspect of the present invention, since the replacement algorithm circuit of the cache memory is not required, the amount of hardware can be significantly reduced and the system can be downsized.

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

第1図は本発明の第1の実施例によるキャッシュメモリ
装置を示すブロック図,第2図は本発明の第2の実施例
によるキャッシュメモリ装置を示すブロック図,第3図
は本発明の第3の実施例によるキャッシュメモリ装置を
示すブロック図,第4図は本発明の第4の実施例による
キャッシュメモリ装置を示すブロック図,第5図は本発
明の第5の実施例によるキャッシュメモリ装置を示すブ
ロック図である。 100…実アドレスレジスタ(PAR),101…I/Oフラグレジ
スタ(I/O),110〜113…アドレスアレイ(AA),120〜12
3,120a…AA書き込みレジスタ(AAW),130〜133…選択
器,135…選択器,140〜143,140a…比較器(CMP),200,20
0a,200b,200c,200d…キャッシュ制御回路,201…フリッ
プフロップ(FF),210〜213…データアレイ(DA),220
〜223,220a…DA書き込みレジスタ(DAW),235,235a…選
択器,240,240a,240b…選択器,250…データアレイ読み出
しレジスタ(DAR)。
FIG. 1 is a block diagram showing a cache memory device according to a first embodiment of the present invention, FIG. 2 is a block diagram showing a cache memory device according to a second embodiment of the present invention, and FIG. 3 is a block diagram showing the present invention. 3 is a block diagram showing a cache memory device according to a third embodiment, FIG. 4 is a block diagram showing a cache memory device according to a fourth embodiment of the present invention, and FIG. 5 is a cache memory device according to a fifth embodiment of the present invention. It is a block diagram showing. 100 ... Real address register (PAR), 101 ... I / O flag register (I / O), 110-113 ... Address array (AA), 120-12
3,120a… AA write register (AAW), 130 to 133… selector, 135… selector, 140 to 143,140a… comparator (CMP), 200,20
0a, 200b, 200c, 200d ... Cache control circuit, 201 ... Flip-flop (FF), 210-213 ... Data array (DA), 220
223, 220a ... DA write register (DAW), 235, 235a ... Selector, 240, 240a, 240b ... Selector, 250 ... Data array read register (DAR).

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】各々がアドレスと該アドレスに対応するメ
モリデータから成るアドレス・データ対を複数個保持
し,第1乃至第N(N≧2)の優先順位が与えられた第
1乃至第Nのキャッシュメモリと, 該第1乃至第Nのキャッシュメモリを同時に索引する手
段と, 前記第1のキャッシュメモリに要求データが存在しない
ときは,該第1のキャッシュメモリ以外の他のキャッシ
ュメモリに存在するアドレス・データ対と前記第1のキ
ャッシュメモリのアドレス・データ対とを置換し,常に
第1のキャッシュメモリから要求データを得る手段とを
有することを特徴とするキャッシュメモリ装置。
1. A first to an N-th, each of which holds a plurality of address-data pairs each of which comprises an address and memory data corresponding to the address, and which is given a first to N-th (N ≧ 2) priority order. Cache memory, means for simultaneously indexing the first to Nth cache memories, and if the requested data does not exist in the first cache memory, it exists in a cache memory other than the first cache memory. And a means for replacing the address / data pair to be replaced with the address / data pair of the first cache memory so as to always obtain the requested data from the first cache memory.
【請求項2】各々がアドレスと該アドレスに対応するメ
モリデータから成るアドレス・データ対を複数個保持
し,命令アドレス索引に対する第1乃至第N(N≧2)
の優先順位とオペランドアドレス索引に対する第1乃至
第Nの優先順位とが個別に割当てられたN個のキャッシ
ュメモリと, 該N個のキャッシュメモリを同時に索引する手段と, 第1の優先順位をもつキャッシュメモリに要求データが
存在しないときは,該第1の優先順位をもつキャッシュ
メモリ以外の他のキャッシュメモリに存在するアドレス
・データ対と前記第1の優先順位をもつキャッシュメモ
リのアドレス・データ対とを置換し,常に命令アドレス
又はオペランドアドレス索引毎に,個別に割当てられた
第1の優先順位をもつ第1のキャッシュメモリから要求
データを得る手段とを有することを特徴とするキャッシ
ュメモリ装置。
2. The first to Nth (N ≧ 2) to the instruction address index, each holding a plurality of address / data pairs each consisting of an address and memory data corresponding to the address.
Number of cache memories to which the first priority order and the first to Nth priority orders for the operand address index are individually assigned, a means for indexing the N cache memories at the same time, and a first priority order When the requested data does not exist in the cache memory, the address / data pair existing in another cache memory other than the cache memory having the first priority and the address / data pair of the cache memory having the first priority. And a means for obtaining request data from a first cache memory having a first priority assigned individually for each instruction address or operand address index.
【請求項3】各々がアドレスと該アドレスに対応するメ
モリデータから成るアドレス・データ対を複数個保持す
る第1乃至第N(N≧2)のキャッシュメモリと, 要求データが存在するまで前記第1のキャッシュメモリ
から前記第Nのキャッシュメモリまで連続に索引する手
段と, 前記第1のキャッシュメモリに要求データが存在しない
ときは,該第1のキャッシュメモリ以外の他のキャッシ
ュメモリに存在するアドレス・データ対と前記第1のキ
ャッシュメモリのアドレス・データ対とを置換し,常に
第1のキャッシュメモリから要求データを得る手段とを
有することを特徴とするキャッシュメモリ装置。
3. First to Nth (N ≧ 2) cache memories each holding a plurality of address / data pairs each consisting of an address and memory data corresponding to the address, and the first until the requested data exists. Means for continuously indexing from one cache memory to the Nth cache memory, and an address existing in a cache memory other than the first cache memory when requested data does not exist in the first cache memory A cache memory device having means for replacing a data pair with an address / data pair of the first cache memory and always obtaining request data from the first cache memory.
【請求項4】各々がアドレスと該アドレスに対応するメ
モリデータから成るアドレス・データ対を複数個保持す
る第1乃至第N(N≧2)のキャッシュメモリと, 要求データが存在するまで前記第1のキャッシュメモリ
から前記第Nのキャッシュメモリまで連続に索引する手
段と, 要求データが存在するキャッシュメモリから要求データ
を得る手段とを有することを特徴とするキャッシュメモ
リ装置。
4. First to Nth (N ≧ 2) cache memories each holding a plurality of address / data pairs each consisting of an address and memory data corresponding to the address, and the first until the request data exists. A cache memory device comprising: means for continuously indexing from the first cache memory to the Nth cache memory; and means for obtaining request data from a cache memory in which request data exists.
【請求項5】各々がアドレスと該アドレスに対応するメ
モリデータから成るアドレス・データ対を複数個保持
し,第1乃至第N(N≧2)の優先順位が与えられた第
1乃至第Nのキャッシュメモリと, 前記第1のキャッシュメモリに要求データが存在せず,
該第1のキャッシュメモリ以外の他のキャッシュメモリ
に要求データが存在する場合は,当該要求データを含む
アドレス・データ対が前記第1のキャッシュメモリに置
換されるように,前記第1のキャッシュメモリから当該
要求データを含むアドレス・データ対が存在するキャッ
シュメモリまでの間の優先順位を有する全てのキャッシ
ュメモリのアドレス・データ対を前記優先順位に従って
置換し,常に第1のキャッシュメモリから要求データを
得る手段と, 全てのキャッシュメモリに要求データが存在しない場合
には,最も優先順位の低いキャッシュメモリのアドレス
・データ対を置換対象として選択する手段とを有するこ
とを特徴とするキャッシュメモリ装置。
5. A first to an N-th, each of which holds a plurality of address-data pairs, each of which comprises an address and memory data corresponding to the address, and which is given a first to N-th (N ≧ 2) priority order. No request data exists in the cache memory and the first cache memory,
When request data exists in a cache memory other than the first cache memory, the first cache memory is configured so that the address / data pair including the request data is replaced by the first cache memory. To the cache memory in which the address / data pair including the requested data exists, the address / data pairs of all the cache memories having the priority order are replaced according to the priority order, and the requested data is always sent from the first cache memory. A cache memory device comprising means for obtaining and a means for selecting an address / data pair of a cache memory having the lowest priority as a replacement target when requested data does not exist in all the cache memories.
JP1112191A 1989-05-02 1989-05-02 Cache memory device Expired - Lifetime JPH07117919B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1112191A JPH07117919B2 (en) 1989-05-02 1989-05-02 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1112191A JPH07117919B2 (en) 1989-05-02 1989-05-02 Cache memory device

Publications (2)

Publication Number Publication Date
JPH02292646A JPH02292646A (en) 1990-12-04
JPH07117919B2 true JPH07117919B2 (en) 1995-12-18

Family

ID=14580540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1112191A Expired - Lifetime JPH07117919B2 (en) 1989-05-02 1989-05-02 Cache memory device

Country Status (1)

Country Link
JP (1) JPH07117919B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4635063B2 (en) * 2008-03-11 2011-02-16 株式会社東芝 Cache memory control circuit and processor

Also Published As

Publication number Publication date
JPH02292646A (en) 1990-12-04

Similar Documents

Publication Publication Date Title
US6138209A (en) Data processing system and multi-way set associative cache utilizing class predict data structure and method thereof
US6038647A (en) Cache memory device and method for providing concurrent independent multiple accesses to different subsets within the device
US8793433B2 (en) Digital data processing apparatus having multi-level register file
US5095424A (en) Computer system architecture implementing split instruction and operand cache line-pair-state management
US6216206B1 (en) Trace victim cache
US5091851A (en) Fast multiple-word accesses from a multi-way set-associative cache memory
JP3542021B2 (en) Method and apparatus for reducing set associative cache delay by set prediction
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
US5353426A (en) Cache miss buffer adapted to satisfy read requests to portions of a cache fill in progress without waiting for the cache fill to complete
US4928239A (en) Cache memory with variable fetch and replacement schemes
JP3239218B2 (en) Cache management system
KR100335672B1 (en) Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments
US5493669A (en) Data processor for simultaneously searching two fields of the rename buffer having first and second most recently allogated bits
US5423048A (en) Branch target tagging
JP3718302B2 (en) Instruction fetch method and apparatus
JP2001184263A (en) Device for invalidating and removing old cache line
JPH02206837A (en) Method and apparatus for solving various numbers of potential memory access inconsistencies in pipeline computer system
US6438655B1 (en) Method and memory cache for cache locking on bank-by-bank basis
US5893146A (en) Cache structure having a reduced tag comparison to enable data transfer from said cache
US5539892A (en) Address translation lookaside buffer replacement apparatus and method with user override
US6560676B1 (en) Cache memory system having a replace way limitation circuit and a processor
US5550995A (en) Memory cache with automatic alliased entry invalidation and method of operation
US5197145A (en) Buffer storage system using parallel buffer storage units and move-out buffer registers
CA1279731C (en) Cache memory with variable fetch and replacement schemes
US5905999A (en) Cache sub-array arbitration