JPH01191959A - Cache memory control system - Google Patents
Cache memory control systemInfo
- Publication number
- JPH01191959A JPH01191959A JP63014637A JP1463788A JPH01191959A JP H01191959 A JPH01191959 A JP H01191959A JP 63014637 A JP63014637 A JP 63014637A JP 1463788 A JP1463788 A JP 1463788A JP H01191959 A JPH01191959 A JP H01191959A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- data
- replacement
- cache memory
- tag information
- 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
Links
- 238000000034 method Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 3
- 229930091051 Arenine Natural products 0.000 description 1
- 241001544778 Chapmannia floridana Species 0.000 description 1
- 241000370985 Parides Species 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 229940015212 parid Drugs 0.000 description 1
- AVRVZRUEXIEGMP-UHFFFAOYSA-N piperazine;hexahydrate Chemical compound O.O.O.O.O.O.C1CNCCN1 AVRVZRUEXIEGMP-UHFFFAOYSA-N 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) 本発明はキャッシュメモリ制御方式に関する。[Detailed description of the invention] [Purpose of the invention] (Industrial application field) The present invention relates to a cache memory control method.
(従来の技術)
キャッシュメモリを制御する方法を大別すると以下の2
つに区分される。1つはダイレクトマクピング方式でア
ク、他の1つはセットアリシアティプ方式でbる。前者
を第2図に、後者を第3図に示す。(Conventional technology) The methods for controlling cache memory can be roughly divided into the following two types.
It is divided into One is the direct mapping method, and the other is the set alicia tip method. The former is shown in FIG. 2, and the latter is shown in FIG.
図において21.31は主メモリ、22.32はキャッ
シュメモリ、23.33はディレクトリイメモリである
。ディレクトリイメモリ23.33にはキャッシュメモ
リ22.32に記憶されるデータと主メモリ21.31
内のr−夕とのアドレスの対応関係を示すタグ情報(T
AG )と各タグ情報に対応するデータが有効か否かを
示すバリッド情報(VALtD )が格納される。24
.34はvlJ埋アドレス金示す。In the figure, 21.31 is a main memory, 22.32 is a cache memory, and 23.33 is a directory memory. The directory memory 23.33 contains data stored in the cache memory 22.32 and the main memory 21.31.
Tag information (T
AG) and valid information (VALtD) indicating whether data corresponding to each tag information is valid or not are stored. 24
.. 34 indicates the vlJ buried address money.
第2図では下位32にバイトのアドレスエリアに対して
1つのキャッシーエントリイが存在する。In FIG. 2, there is one cache entry for a byte address area in the lower 32.
どのエリアがキャッ7&エントリイに存在するかは上位
アドレスをタグ部に記憶しておくことによりわかる。キ
ャッシュアクセス時は下位アドレス(A5〜A14)の
谷セットに対するタグ部と上位アドレスが比較され、こ
こで一致し、且つ谷パリッドピットが真のときのみキャ
ッジ−ヒツトとなり、データのリード/ライトがキャッ
シュメモリ22との間で行なわれる。ミスヒツト時は主
メモリ2ノとの間でアクセスが行なわれ、更にキャッシ
ュメモリ22にもストアされる。つまりメモリr−夕の
入替えが発生したわけで69、ここでタグ部をfき替え
、バリッドピットを真にする。Which area exists in the cache 7 & entry area can be known by storing the upper address in the tag section. When accessing the cache, the tag part for the valley set of lower addresses (A5 to A14) is compared with the upper address, and only when they match and the valley parid pit is true is a cache hit, and data read/write is performed in the cache memory. It will be held between 22. When there is a miss, access is made to the main memory 2, and the data is also stored in the cache memory 22. In other words, an exchange of memory r and memory has occurred (69), and here the tag part is exchanged and the valid pit is made true.
第3図は、2ウエイの例が示されており、ダイレクトマ
ツプが2つめると思えば良い。つまり下位16にバイト
のアドレスエリアに対して2つのキャッジ、エントリイ
が存在する。キャッジ、アクセス時は2つのタグ部と上
位アドレスが比較される。どちらかと一致すれば後の動
作はダイレクトマツプ方式と同じでめる。一致しなかり
た場合は入替えを行うわけでめるが、このときどちらの
パンクと行うかは優先j@位判定回路(通常LRU方式
)により決定される。FIG. 3 shows a 2-way example, and you can think of it as a second direct map. In other words, there are two caches and entries for the lower 16 byte address areas. At the time of cache and access, the two tag parts and the upper address are compared. If either matches, the subsequent operation will be the same as the direct map method. If they do not match, they are replaced, but which puncture to use is determined by a priority determination circuit (usually LRU system).
(発明が解決しようとする問題点)
ところで、第2図で示すダイレクトマツプ方式ではキャ
ツシュヒツト率が悪(,43図に示すセットアリシアテ
ィプ方式によれば回路が複雑になりコスト高になるとい
う欠点を持つ。(Problems to be Solved by the Invention) By the way, the direct map method shown in Fig. 2 has a poor cash hit rate (and the set arithmetic method shown in Fig. 43 has the disadvantage that the circuit is complicated and the cost is high. have
本発明はダイレクトマッグ方式に従がうキャッジ&デー
タの入替えにポイントをおいて低価格で効率の良いキャ
ッシュメモリ制御方式を提供するものである。The present invention provides a low-cost and efficient cache memory control method that focuses on cache and data replacement according to the direct mag method.
[発明の構成]
(問題点を解決するための手段)
本発明は、キャッシュメモリに記憶されたデータと主記
憶内のデータとのアドレス対応関係をタグ情報として有
し、これ全参照することによりヒツト/ミスヒントの判
定を行ないキャッシュメモリのデータの入替えを行なう
キャッシュメモリ制御装置においてこのキャッシュメモ
リ制御装置をタグ情報参照時、キャッシュミスヒツトが
判定されたとき以前のアクセス条件を記憶しておき。[Structure of the Invention] (Means for Solving the Problems) The present invention has an address correspondence relationship between data stored in a cache memory and data in a main memory as tag information, and by referring to all of this, In a cache memory control device that judges hit/miss hints and replaces data in a cache memory, the previous access conditions are stored when a cache miss is judged when referring to tag information.
るる条件のときのみキャッジ、エントリイのデータの入
替えを行なう構成とし、一過性のデータアクセスでキャ
ッジ&データの入替え発生の頻発を防ぎヒツト率の向上
をはかったものである。The configuration is such that the cache and entry data are exchanged only under certain conditions, and the hit rate is improved by preventing frequent occurrence of cache and data exchange through temporary data access.
(作 用)
ダイレクトマツプ方式ではキャッジ、ミスヒツトが発生
すると無条件にキャッジ、データの入替えが発生してい
たが、上記構成を採ることにより連続し九リード動作が
あったことを条件に入替えを許可するものである。この
ことにより、一過性のリード動作からキャッジ、エント
リイの入替え頻発が防止出来、低価格で効率の良いキャ
ッシュ制御装置を提供出来る。(Function) In the direct map method, when a cache or mishit occurs, a cache or data swap occurs unconditionally, but by adopting the above configuration, swapping is allowed on the condition that there are nine consecutive lead operations. It is something to do. This makes it possible to prevent frequent replacement of caches and entries due to temporary read operations, and to provide a low-cost and efficient cache control device.
(実施例) 以、下1本発明災施例について詳細に説明する。(Example) Hereinafter, the following first embodiment of the present invention will be explained in detail.
第1図は本発明の実施例を示す図であり、ディレクトリ
イメモリの各二ントリイを構成するピットフィールドを
示す。図中、11はタグ部でありキャッシーエントリイ
の上位アドレスを示す、12はバリッドピットであり、
そのキャッシーエントリイが有効か無効かを示す。13
はネックストタグ部でおり、次にキャッジ、にエントリ
イする上位アドレスを示す。14はリードフラグでめり
。FIG. 1 is a diagram illustrating an embodiment of the present invention, showing pit fields constituting each binary of a directory memory. In the figure, 11 is a tag part indicating the upper address of the cashier entry, 12 is a valid pit,
Indicates whether the cashier entry is valid or invalid. 13
is the next tag part, which indicates the upper address to enter into the next cache. 14 goes by the lead flag.
次のキャッシュエントリイに対する有効/無効の情報を
示す。上述したIJ〜14で谷セットが構成される。Indicates validity/invalidity information for the next cache entry. The above-mentioned IJ to 14 constitute a valley set.
以下、本発明実施例の動作について詳細に説明する。キ
ャッジ−ミス判定時の動作を説明すると以下の通りにな
る。キャッシュミスヒツト時は主メモリとの間でデータ
のリード/ライト金行うのは当然であるが、このときキ
ャッ7ユエントリイの入替を行うかどうかの判断は第1
図に示すネクストタグ情報13とリードフラグ14を見
て行う。Hereinafter, the operation of the embodiment of the present invention will be explained in detail. The operation at the time of caddy-miss determination will be explained as follows. When a cache miss occurs, it is natural to read/write data from/to the main memory, but the first step is to decide whether or not to replace the cache entry at this time.
This is done by looking at the next tag information 13 and read flag 14 shown in the figure.
入替えはこのネタストタグ情報13と上位アドレスが一
致し、リードフラグ14が真であるときのみ行う。また
、入替えが発生したときはリードフラグをクリアしてお
く。入替えの条件がとれなかり九場合はネクストタグに
上位アドレス金ストアし、リードフラグをセット(リー
ド動作で真)する。つまり、これで次の同じエリアのリ
ード動作では条件がとれることになる。七の他の動作に
おいては一般のキャッジ、コントローラと同じであるた
め説明は省略する。Replacement is performed only when the netast tag information 13 and the upper address match and the read flag 14 is true. Also, when replacement occurs, the read flag is cleared. If the exchange conditions cannot be met, store the upper address money in the next tag and set the read flag (true for read operation). In other words, the conditions are now met for the next read operation in the same area. The other operations described in section 7 are the same as those of a general carriage and controller, so explanations will be omitted.
尚、本発明は同様の手法にて7”イスクキャッシ為シス
テムにも応用出来るものである。Incidentally, the present invention can also be applied to a 7" disk cash system using a similar method.
[発明の効果コ
以上説明の様に本発明に従えば一過性のリード動作から
キャッジ、エントリイのデータ入替えを防ぐことが出来
、キャッシュシステムの効率向上を低価格にて冥現出来
る。[Effects of the Invention] As explained above, according to the present invention, it is possible to prevent cache and entry data from being replaced due to temporary read operations, and it is possible to improve the efficiency of the cache system at a low cost.
第1図は本発明実施例を示す図、第2図はダイレクトマ
ツプによるキャッシュシステムの構成例を示す図、@3
図はセットアソシアティブによるキャッジ、ユメモリ7
ステムの構成例を示す図である。
ii、1s・・・タグ情報、JJ・・・バリッドビット
。
14・・・リードフラグ。
出願人代理人 升埋士 鈴 江 武 彦第1r]
第2図
第 3 図Fig. 1 is a diagram showing an embodiment of the present invention, Fig. 2 is a diagram showing an example of the configuration of a cache system using a direct map, @3
The figure shows a cache with set associative, Umemory 7
It is a figure showing an example of composition of a stem. ii, 1s...tag information, JJ...valid bit. 14...Lead flag. Applicant's agent Suzue Takehiko 1r] Figure 2 Figure 3
Claims (1)
タとのアドレス対応関係をタグ情報として有し、これを
参照することによりヒット/ミスヒットの判定を行ない
、キャッシュメモリの判定を行なうキャッシュメモリ制
御装置において、上記タグ情報参照時キャッシュミスヒ
ットが判定されたとき、以前のアクセス条件を記憶して
おきある条件のときのみキャッシュエントリイのデータ
入替えを行なうことを特徴とするキャッシュメモリ制御
方式。A cache memory control device that has address correspondence between data stored in the cache memory and data in the main memory as tag information, and makes a hit/miss hit determination by referring to this tag information, thereby making a cache memory determination. A cache memory control method characterized in that when a cache miss is determined when referring to the tag information, the previous access condition is stored and the data in the cache entry is replaced only when a certain condition is met.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63014637A JPH01191959A (en) | 1988-01-27 | 1988-01-27 | Cache memory control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63014637A JPH01191959A (en) | 1988-01-27 | 1988-01-27 | Cache memory control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01191959A true JPH01191959A (en) | 1989-08-02 |
Family
ID=11866710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63014637A Pending JPH01191959A (en) | 1988-01-27 | 1988-01-27 | Cache memory control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH01191959A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6470425B1 (en) | 1999-05-26 | 2002-10-22 | Nec Corporation | Cache line replacement threshold based on sequential hits or misses |
-
1988
- 1988-01-27 JP JP63014637A patent/JPH01191959A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6470425B1 (en) | 1999-05-26 | 2002-10-22 | Nec Corporation | Cache line replacement threshold based on sequential hits or misses |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0668735B2 (en) | Cache memory | |
CN107818052A (en) | Memory pool access method and device | |
TW200805061A (en) | Patrol snooping for higher level cache eviction candidate identification | |
JP2818415B2 (en) | Buffer storage device | |
US6240489B1 (en) | Method for implementing a pseudo least recent used (LRU) mechanism in a four-way cache memory within a data processing system | |
JP3929872B2 (en) | Cache memory, processor and cache control method | |
US6000017A (en) | Hybrid tag architecture for a cache memory | |
JP4047281B2 (en) | How to synchronize cache memory with main memory | |
JPH01191959A (en) | Cache memory control system | |
JP2659007B2 (en) | Information processing method and apparatus | |
JP3469042B2 (en) | Cache memory | |
JPH06175923A (en) | Control method for disk cache device | |
JPS63318654A (en) | Intermediate buffer replacement determining system | |
JPH02188849A (en) | Cache memory system | |
JP2000047942A (en) | Device and method for controlling cache memory | |
JPH04205449A (en) | Cache device | |
JP2613258B2 (en) | Information processing method and apparatus | |
JPS60221855A (en) | Replacement control device | |
JPH06250926A (en) | Data processing system provided with cache memory of plural hierarchies | |
JPH04288647A (en) | Substitution controller for cache memory | |
JPH02257234A (en) | Cache control system | |
JPH03232036A (en) | Cache controller | |
JPH0512109A (en) | Cache memory system | |
JPH0756812A (en) | Memory device | |
JPH071490B2 (en) | Data write-back method |