JPH05120139A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH05120139A
JPH05120139A JP3277481A JP27748191A JPH05120139A JP H05120139 A JPH05120139 A JP H05120139A JP 3277481 A JP3277481 A JP 3277481A JP 27748191 A JP27748191 A JP 27748191A JP H05120139 A JPH05120139 A JP H05120139A
Authority
JP
Japan
Prior art keywords
entry
memory
data
invalid
lru
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3277481A
Other languages
Japanese (ja)
Inventor
Michio Okubo
教夫 大久保
Makoto Suzuki
鈴木  誠
Masaru Tachibana
大 橘
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3277481A priority Critical patent/JPH05120139A/en
Publication of JPH05120139A publication Critical patent/JPH05120139A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To provide a method in order to preferentially select an invalid entry in a permuting operation and also to permute the invalid entry at a high speed. CONSTITUTION:An LRU write control circuit is especially provided to write the information which defines an invalidated entry as the entry that is most previously referred to into an LRU memory 104 with use of an invalid signal 11. Thus the invalid entry is always selected with a permuting request since the preceding information is already written in the memory 104. Then the permuting operation is carried out at a high speed without using a control circuit which preferentially selects an entry where the invalid data is stored.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、キャッシュメモリ装置
に係り、特に、情報処理装置のキャッシュメモリ装置に
格納したデータを高速に置換する制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device, and more particularly to a control system for replacing data stored in a cache memory device of an information processing device at high speed.

【0002】[0002]

【従来の技術】大型計算機、マイクロプロセッサ等の計
算機システムの分野では、キャッシュメモリは小容量か
つ高速なメモリで構成され、大容量かつ低速な主記憶装
置にあるデータの一部を一時的に保持することで、計算
機システムの動作速度を向上させている。大容量の主記
憶装置は中央処理装置の速度に対し十分に速くはなく、
そのため小容量ではあるが高速なキャッシュメモリを中
央処理装置の近傍に置き、データの一部をキャッシュメ
モリに記憶することで、中央処理装置の速度を落さずに
動作させる方法がとられている。
2. Description of the Related Art In the field of computer systems such as large-scale computers and microprocessors, a cache memory is composed of a small-capacity and high-speed memory, and temporarily holds a part of data in a large-capacity and low-speed main memory. By doing so, the operating speed of the computer system is improved. The large main memory is not fast enough for the central processor,
Therefore, a method has been adopted in which a small-capacity but high-speed cache memory is placed in the vicinity of the central processing unit and a part of the data is stored in the cache memory, so that the central processing unit operates without slowing down. ..

【0003】キャッシュメモリは複数のエントリを持つ
複数のウエイから構成されているが、例えばプロセッサ
からキャッシュへのリード・アクセスがミスとなった
時、主記憶装置からの読み出しデータはキャッシュ内の
空きエントリーに格納される。しかし、キャッシュが一
杯であり空きエントリーが無い場合は、例えば複数のエ
ントリーのいずれかひとつのエントリーのデータを主記
憶装置へ戻すことによってこのエントリーを空きエント
リーとした後、この空きエントリーに上述の主記憶装置
からの読み出しデータを格納すると言うエントリーの置
換が必要となる。主記憶装置からの読み出しデータを格
納するエントリーとして最も以前に参照されたデータを
格納したエントリーを選択すると言うエントリー置換の
方法、すなわちLRU(Least Recently Used)法が通常
行われ、キャッシュメモリの使用効率向上を図ってい
る。
The cache memory is composed of a plurality of ways having a plurality of entries. For example, when a read access from the processor to the cache is missed, the read data from the main storage device is an empty entry in the cache. Stored in. However, if the cache is full and there is no free entry, the data of one of the plurality of entries is returned to the main storage device to make this entry a free entry, and then the above-mentioned main entry is added to this free entry. It is necessary to replace the entry that stores the read data from the storage device. The entry replacement method of selecting the entry that stores the data most recently referred to as the entry that stores the read data from the main memory, that is, the LRU (Least Recently Used) method is usually performed, and the cache memory usage efficiency is increased. We are trying to improve.

【0004】一方、特開平1−125641号公報に記
載のように、置換すべきエントリをLRU法により選択
するとともに、主記憶装置のデータとの一致性が取れな
くなった無効なデータを格納したキャッシュのエントリ
を優先して置換する制御回路を持つものが知られてい
る。
On the other hand, as described in Japanese Unexamined Patent Publication No. 1-125641, a cache which stores an invalid data which is not compatible with the data in the main memory while the entry to be replaced is selected by the LRU method. It is known to have a control circuit that preferentially replaces the entry of.

【0005】[0005]

【発明が解決しようとする課題】ところで、キャッシュ
メモリが動作を開始した時点では全てのエントリが無効
である。一方、また複数のプロセッサと各プロセッサ毎
にキャッシュメモリとを持つプライベートキャッシュの
マルチプロセッサ方式の計算機システムにおいて、通常
動作時でも共有したデータの一致性を保つために無効な
エントリが生じる。従って、無効となったエントリを優
先して置換することで、使用頻度の高いエントリが置換
される可能性を低くし、性能を向上させることができ
る。
By the way, all entries are invalid at the time when the cache memory starts to operate. On the other hand, in a private cache multiprocessor computer system having a plurality of processors and a cache memory for each processor, an invalid entry occurs in order to maintain the consistency of shared data even during normal operation. Therefore, by replacing an invalid entry with priority, it is possible to reduce the possibility that a frequently used entry will be replaced and improve the performance.

【0006】一方、従来のキャッシュメモリは、前述の
ように無効なエントリを優先して置換する制御回路を持
っていたため、置換すべきエントリを高速に選択する点
について十分な配慮がなされておらず、書換えのあった
エントリが置換される際に主記憶装置に書き戻すコピー
バック動作を遅らせるという問題点があった。
On the other hand, since the conventional cache memory has the control circuit for preferentially replacing an invalid entry as described above, sufficient consideration is not given to selecting an entry to be replaced at high speed. However, there is a problem that the copy back operation for writing back to the main memory is delayed when the rewritten entry is replaced.

【0007】本発明は、置換するエントリを高速に選択
する方法を得ることを目的とし、置換エントリ選択時に
無効なエントリを優先すると共に複雑な制御を必要とし
ないキャッシュメモリ装置を提供することを目的とす
る。
An object of the present invention is to provide a method for selecting an entry to be replaced at high speed, and to provide a cache memory device which gives priority to an invalid entry when selecting a replacement entry and does not require complicated control. And

【0008】[0008]

【課題を解決するための手段】上記目的は、エントリー
に格納されたデータの有効または無効を示すバリッド信
号を出力するバリッド記憶手段と、LRU信号を出力す
るLRU記憶手段と、外部からのエントリ無効化信号が
入力された時にこのエントリを最も以前に参照されたエ
ントリとしする如く対応する情報をLRU記憶手段に書
き込む制御手段を設けることにより達成される。
The above-mentioned object is to provide a valid storage means for outputting a valid signal indicating validity or invalidity of data stored in an entry, an LRU storage means for outputting an LRU signal, and an invalid entry from the outside. This is achieved by providing a control means for writing the corresponding information into the LRU storage means so that when the activation signal is input, this entry is regarded as the most recently referenced entry.

【0009】[0009]

【作用】無効となったデータを格納しているエントリは
該当するLRU記憶手段に最も以前に参照されたことを
示す情報が書き込まれているため、置換要求が起きた時
点で優先的に置換されるように動作する。これは、無効
なエントリが複数ある場合でも不都合は生じず、最も最
近に無効となったエントリから置換される。
Since the entry storing the invalid data is written in the corresponding LRU storage means with the information indicating that it has been referred to most recently, it is preferentially replaced when the replacement request is made. Works like. This does not cause any inconvenience even if there are a plurality of invalid entries, and replaces the entry that has become invalid most recently.

【0010】本発明におけるキャッシュメモリ制御方式
は、無効なエントリを優先して選択する制御回路を持た
ないため、高速に置換ウエイ選択信号を出力することが
可能となり、主記憶装置へ書き戻すコピーバック動作を
高速にすることができる。一方、外部からのエントリ無
効化信号によるLRU記憶手段への書き込み動作は、エ
ントリが無効となった事を示すインバリッド信号をバリ
ッド記憶手段に書き込む動作と並行して行うことで速度
は低下しない。
Since the cache memory control method according to the present invention does not have a control circuit for preferentially selecting an invalid entry, it is possible to output a replacement way selection signal at high speed and copy back to the main storage device. The operation can be performed at high speed. On the other hand, the write operation to the LRU storage means by the entry invalidation signal from the outside is performed in parallel with the operation of writing the invalid signal indicating that the entry is invalid into the valid storage means, so that the speed is not lowered.

【0011】[0011]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。
Embodiments of the present invention will be described in detail below with reference to the drawings.

【0012】図1は、本発明に一実施例による4ウエイ
セットアソシアティブのキャッシュメモリ装置を示すブ
ロック図である。図1において、101は検索アドレス
に従って該当するエントリを選択するための行デコー
ダ、102は該データに対応しそのアドレスの一部を記
憶するタグメモリ、103は該データが有効か無効かを
記憶するバリッドメモリ、104は該エントリの置換情
報を保持するLRU用メモリ、105はデータを記憶す
るデータメモリ、106は前記タグメモリ107に記憶
されたアドレスと外部から入力された検索アドレスとの
一致を判定する比較回路、107は前記比較回路106
により一致が検出されたウエイのエントリを出力する選
択回路、108はエントリの中から所望のデータを選択
する列デコーダ、110は前記LRU用メモリ104に
参照履歴を書き込む制御回路、11は外部からエントリ
を無効化するインバリッド信号、12は外部から入力さ
れた検索アドレスが前記タグメモリに記憶されているこ
とを示すキャッシュ・ヒット信号を示している。
FIG. 1 is a block diagram showing a 4-way set associative cache memory device according to an embodiment of the present invention. In FIG. 1, 101 is a row decoder for selecting a corresponding entry according to a search address, 102 is a tag memory which stores a part of the address corresponding to the data, and 103 stores whether the data is valid or invalid. Valid memory, 104 is an LRU memory that holds the replacement information of the entry, 105 is a data memory that stores data, and 106 is a match between the address stored in the tag memory 107 and a search address input from the outside. Comparing circuit 107, 107 is the comparing circuit 106
, A selection circuit for outputting the entry of the way in which the match is detected, 108 is a column decoder for selecting desired data from the entries, 110 is a control circuit for writing the reference history in the LRU memory 104, and 11 is an entry from the outside. Is an invalid signal, 12 is a cache hit signal indicating that the search address input from the outside is stored in the tag memory.

【0013】本実施例によるキャッシュメモリ装置は外
部から入力されるインバリッド信号11がLRU書き込
み制御回路110に入力され、エントリの無効化時に該
エントリを最も以前に参照されたエントリとする如き情
報をLRU用メモリ104に書き込むことに特徴があ
る。図2は4ウエイのLRU書き込み制御回路110の
動作説明図であり、これを参照しながら動作を説明す
る。尚、図1に示すように、タグメモリ102、バリッ
トビットメモリ103、データメモリ105がそれぞれ
4面有することにより、4ウエイセットアソシアティブ
のキャッシュメモリ装置が実現されている。
In the cache memory device according to this embodiment, the invalid signal 11 inputted from the outside is inputted to the LRU write control circuit 110, and when the entry is invalidated, the information that makes the entry the entry referred to most recently is LRU. The feature is that the data is written in the memory for use 104. FIG. 2 is an operation explanatory diagram of the 4-way LRU write control circuit 110, and the operation will be described with reference to this. As shown in FIG. 1, the tag memory 102, the valid bit memory 103, and the data memory 105 each have four sides, thereby realizing a 4-way set associative cache memory device.

【0014】LRU用メモリ104には、例えば、図2
(a)に示すようにウエイの参照履歴を図中の矢印の向
きで表し、矢印が向けられた方のエントリが以前に参照
されたと定義し、図2(a)の矢印の向きを1と定義し
た6ビットの情報a、b、c、d、e、fが記憶され
る。置換要求が起きた場合には、全ての矢印が向けられ
たウエイを選択する。
In the LRU memory 104, for example, FIG.
As shown in (a), the way reference history is represented by the direction of the arrow in the figure, and it is defined that the entry to which the arrow is directed has been referred to before, and the direction of the arrow in FIG. The defined 6-bit information a, b, c, d, e, f is stored. When a replacement request is made, the way to which all arrows are directed is selected.

【0015】いま、タグメモリ102に記憶されたアド
レスと中央処理装置から入力された検索アドレスとが一
致して比較回路106からヒット信号12が送られた場
合を考える。図2(a)では、ヒットに該当するウエイ
に向けられた矢印の向きを全て反転することで最も最近
参照されたウエイであることが示され、LRU用メモリ
104には、図2(b)のインバリッド信号無の該当す
る情報、例えばウエイ0がヒットの場合a=b=d=0
を書き込む。
Now, consider a case where the address stored in the tag memory 102 and the search address input from the central processing unit match and the hit signal 12 is sent from the comparison circuit 106. FIG. 2A shows that the way is the most recently referenced way by reversing all the directions of the arrows directed to the ways corresponding to the hits, and the way for the LRU memory 104 is shown in FIG. Corresponding information without an invalid signal, for example, if way 0 is a hit, a = b = d = 0
Write.

【0016】一方、外部よりエントリを無効にするイン
バリッド信号11が送られた場合を考える。図2(a)
では、該当するウエイから出ていく矢印の向きを全て反
転することで最も以前に参照されたウエイであることが
示され、LRU用メモリ104には、図2(b)のイン
バリッド信号有の該当する情報、例えばウエイ0が無効
化する場合にはa=b=d=1を書き込むとともに、バ
リッドメモリ103に無効なデータが格納されているエ
ントリであることを示す情報を書き込む。
On the other hand, consider a case where an invalid signal 11 for invalidating an entry is sent from the outside. Figure 2 (a)
2 indicates that the way is the earliest referenced way by reversing all the directions of the arrows going out of the corresponding way, and the LRU memory 104 has the invalid signal shown in FIG. Information to be written, for example, when way 0 is invalidated, a = b = d = 1 is written, and at the same time, information indicating that the valid memory 103 is an entry storing invalid data is written.

【0017】以上の動作により、エントリの置換時に
は、LRU法により最も以前に参照されたエントリが置
換されるとともに、無効エントリが存在する場合には該
エントリが優先して置換されることとなり、キャッシュ
メモリの使用効率を高めることができる。
As a result of the above operation, when an entry is replaced, the entry most recently referred to by the LRU method is replaced, and if an invalid entry exists, the entry is replaced with priority, and the cache is cached. The use efficiency of the memory can be improved.

【0018】図3はLRU書き込み制御回路110の具
体例を示す回路図である。図3において、110はLR
U書き込み制御回路、104はLRU用メモリを示し、
図1における番号と対応している。また、111、11
2はタグメモリ102に記憶されたアドレスと外部から
入力された検索アドレスの一致をそれぞれ示すウエイ0
信号、ウエイ1信号、113はインバリッド信号が無い
場合の書き込み信号1、114はインバリッド信号が有
る場合の書き込み信号2を示す。図3では、6ビットあ
るLRU情報のうちaビットのLRU書き込み制御回路
およびLRU用メモリを示すが、他のビットもウエイ信
号の入力が異なるが同じ回路で構成される。
FIG. 3 is a circuit diagram showing a specific example of the LRU write control circuit 110. In FIG. 3, 110 is an LR
U write control circuit, 104 indicates a memory for LRU,
It corresponds to the numbers in FIG. Also, 111, 11
Reference numeral 2 indicates a way 0 indicating the match between the address stored in the tag memory 102 and the search address input from the outside.
A signal, a way 1 signal, 113 is a write signal 1 when there is no invalid signal, and 114 is a write signal 2 when there is an invalid signal. Although FIG. 3 shows the a-bit LRU write control circuit and the LRU memory out of the 6-bit LRU information, the other bits are also configured by the same circuit although the way signal input is different.

【0019】ヒット信号12によるLRU用メモリ10
4に書き込むビット位置と、インバリッド信号11によ
るLRU用メモリ104に書き込むビット位置は等し
く、また、各値は否定の関係にあるため、LRU書き込
み制御回路110は図3のように簡単な回路構成にする
ことができる。
LRU memory 10 by hit signal 12
4 and the bit position written to the LRU memory 104 by the invalid signal 11 are equal, and each value has a negative relationship, the LRU write control circuit 110 has a simple circuit configuration as shown in FIG. can do.

【0020】[0020]

【発明の効果】本発明によれば、エントリ無効化時に該
エントリを最も以前に参照されたエントリとする情報を
LRU記憶手段へ書き込むことで、無効なエントリを優
先して置換することが可能であり、置換すべきエントリ
を選択する際に、無効となったデータを格納したエント
リを優先して選択する制御回路を必要とせず、LRU法
でのみ選択信号を出力することができ、置換動作をより
高速に実行できるキャッシュメモリ装置がもたらせる。
According to the present invention, it is possible to replace an invalid entry with priority by writing to the LRU storage means information that makes the entry the entry that was referred to the earliest when the entry is invalidated. When selecting an entry to be replaced, it is possible to output a selection signal only by the LRU method without requiring a control circuit that preferentially selects an entry in which invalid data is stored. A cache memory device that can be executed faster can be provided.

【0021】さらに、LRU記憶手段に書き込む、最も
以前に参照されたエントリとする情報は、従来行われて
いるデータを参照した時に書き込む、最も最近参照され
たことを示す情報と否定の関係にあり、その書き込み制
御回路は簡単にすることができるという効果もある。
Further, the information which is written in the LRU storage means and which is the most recently referenced entry is in a negative relationship with the information which is written when the conventionally used data is referenced and which indicates the most recently referenced data. Another advantage is that the write control circuit can be simplified.

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

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

【図2】図1のキャッシュメモリ装置で参照履歴を説明
するとともに参照履歴を書き替える動作を説明する図で
ある。
FIG. 2 is a diagram for explaining a reference history and an operation for rewriting the reference history in the cache memory device of FIG.

【図3】図1のキャッシュメモリ装置のLRU書き込み
制御回路110の具体例を示す回路図である。
3 is a circuit diagram showing a specific example of an LRU write control circuit 110 of the cache memory device of FIG.

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

101…行デコーダ、102…タグメモリ、103…バ
リッドメモリ、104…LRU用メモリ、105…デー
タメモリ、106…比較回路、107…選択回路、10
8…列デコーダ、110…LRU書き込み制御回路、1
1…インバリッド信号、12…ヒット信号、111…ウ
エイ0信号、112…ウエイ1信号、113…書き込み
信号1、114…書き込み信号2。
101 ... Row decoder, 102 ... Tag memory, 103 ... Valid memory, 104 ... LRU memory, 105 ... Data memory, 106 ... Comparison circuit, 107 ... Selection circuit, 10
8 ... Column decoder, 110 ... LRU write control circuit, 1
1 ... invalid signal, 12 ... hit signal, 111 ... way 0 signal, 112 ... way 1 signal, 113 ... write signal 1, 114 ... write signal 2.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】データを記憶する複数のエントリからなる
データメモリと、該データメモリの記憶データに対応し
そのアドレスの一部を記憶する複数のエントリからなる
タグメモリと、上記データメモリの記憶データに対応し
そのデータが有効であることを記憶するバリッドメモリ
と、上記データメモリの記憶データに対応しそのデータ
の参照情報を記憶する複数のエントリからなるLRU用
メモリとを具備してなり、上記LRUメモリ法の参照情
報によりデータを置換するキャッシュメモリ装置であっ
て、 上記データメモリの記憶データが無効となることを指示
するインバリッド信号に従ってLRU用メモリの参照情
報を書き換える制御手段をさらに具備してなることを特
徴とするキャッシュメモリ装置。
1. A data memory comprising a plurality of entries for storing data, a tag memory comprising a plurality of entries corresponding to the storage data in the data memory and storing a part of the address, and the storage data in the data memory. And a valid memory for storing that the data is valid, and an LRU memory comprising a plurality of entries corresponding to the stored data of the data memory and storing reference information of the data. A cache memory device for replacing data by reference information of the LRU memory method, further comprising a control means for rewriting the reference information of the LRU memory in accordance with an invalid signal indicating that the data stored in the data memory becomes invalid. And a cache memory device.
JP3277481A 1991-10-24 1991-10-24 Cache memory device Pending JPH05120139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3277481A JPH05120139A (en) 1991-10-24 1991-10-24 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3277481A JPH05120139A (en) 1991-10-24 1991-10-24 Cache memory device

Publications (1)

Publication Number Publication Date
JPH05120139A true JPH05120139A (en) 1993-05-18

Family

ID=17584198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3277481A Pending JPH05120139A (en) 1991-10-24 1991-10-24 Cache memory device

Country Status (1)

Country Link
JP (1) JPH05120139A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5175487A (en) * 1988-04-22 1992-12-29 Fanuc Limited Output circuit
WO2012124034A1 (en) * 2011-03-11 2012-09-20 富士通株式会社 Computation processing device and computation processing device control method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5175487A (en) * 1988-04-22 1992-12-29 Fanuc Limited Output circuit
WO2012124034A1 (en) * 2011-03-11 2012-09-20 富士通株式会社 Computation processing device and computation processing device control method
JP5574039B2 (en) * 2011-03-11 2014-08-20 富士通株式会社 Arithmetic processing device and control method of arithmetic processing device
US9430397B2 (en) 2011-03-11 2016-08-30 Fujitsu Limited Processor and control method thereof

Similar Documents

Publication Publication Date Title
US7266647B2 (en) List based method and apparatus for selective and rapid cache flushes
US5091851A (en) Fast multiple-word accesses from a multi-way set-associative cache memory
JPS6135584B2 (en)
JPS61156346A (en) Apparatus for forestalling memory hierarchy
KR20010101693A (en) Techniques for improving memory access in a virtual memory system
JP4041402B2 (en) Method and apparatus for supporting multiple cache line invalidations per cycle
US7865691B2 (en) Virtual address cache and method for sharing data using a unique task identifier
CA1228171A (en) Working set prefetch for level two caches
GB2307319A (en) Dual-directory virtual cache
JPH05120139A (en) Cache memory device
US5636365A (en) Hierarchical buffer memories for selectively controlling data coherence including coherence control request means
JPS644214B2 (en)
JP3078303B2 (en) Cache memory control circuit
JPS60701B2 (en) data processing equipment
JPH03232034A (en) Cache controller
JPH05342101A (en) Hierarchical cache memory
JP2963257B2 (en) Processing equipment
JPH0573415A (en) Hierarchized cache system
JPH06250926A (en) Data processing system provided with cache memory of plural hierarchies
JPS5818710B2 (en) memory system
JPS61229142A (en) Array managing device for controlling replacement in buffer memory system having hierarchical constitution
JPH04148256A (en) Cache controller
JPH06195263A (en) Cache memory system
JPH1055309A (en) Hierarchical cache memory device
JPH04242431A (en) Information processor