JPH06180670A - Cache storage device - Google Patents

Cache storage device

Info

Publication number
JPH06180670A
JPH06180670A JP4353649A JP35364992A JPH06180670A JP H06180670 A JPH06180670 A JP H06180670A JP 4353649 A JP4353649 A JP 4353649A JP 35364992 A JP35364992 A JP 35364992A JP H06180670 A JPH06180670 A JP H06180670A
Authority
JP
Japan
Prior art keywords
cache
entry
storage device
section
data
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
JP4353649A
Other languages
Japanese (ja)
Inventor
Yukihisa Tamura
恭久 田村
Toshiaki Kawamura
俊明 河村
Toshiyuki Kinoshita
俊之 木下
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 JP4353649A priority Critical patent/JPH06180670A/en
Publication of JPH06180670A publication Critical patent/JPH06180670A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the performance of a cache by reducing a proportion of data, which is the object of an area clear instruction, occupied in the cache to improve the use efficiency of the whole of the cache. CONSTITUTION:A signal indicating a memory access request is sent to the cache when a processor issues the memory access request accompanied with execution of the area clear instruction to the cache, and each entry of a retrieval part 31 is provided with an X part 314 where a flag is set at the time when this entry corresponds to the area of a main storage device accessed by the area clear instruction. When the memory access request accompanied with execution of the area clear instruction is issued to the cache and the entry retrieved by the retrieval part 31 mishits the cache and the retrieved entry has the flag set in the X part 314, a means provided in a replace control part 33 selects the entry and designates the storage area of a data part corresponding to the entry as a replace area.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、電子計算機システムに
おけるキャッシュ記憶装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache storage device in an electronic computer system.

【0002】[0002]

【従来の技術】[Prior art]

(1)キャッシュ記憶装置の機能 電子計算機ハードウェアにおけるキャッシュ記憶装置
は、高速に動作するIPと低速な主記憶装置の間に位置
する。キャッシュ記憶装置は、主記憶装置の持つデータ
の部分を保持しており、IPから要求されるデータを高
速に読みだし、命令プロセッサIPに転送する。すなわ
ち、IPと主記憶装置の間の速度差を埋める緩衝装置と
して動作する。キャッシュ記憶装置の基本的な構造は、
A.Smith, Cache Memories,
ACM Computing Surveys, Vo
l.14 No.3 (Sept. 1982) に体
系的に紹介されている。
(1) Function of cache storage device The cache storage device in the computer hardware is located between the IP that operates at high speed and the main storage that operates at low speed. The cache storage device holds the data portion of the main storage device, reads the data requested from the IP at high speed, and transfers it to the instruction processor IP. That is, it operates as a buffer device for filling the speed difference between the IP and the main storage device. The basic structure of a cache storage device is
A. Smith, Cache Memories,
ACM Computing Surveys, Vo
l. 14 No. 3 (Sept. 1982) systematically.

【0003】キャッシュ記憶を構成するメモリ素子は主
記憶を構成する素子より高速に動作し、ALUなどの処
理のメモリアクセスによる遅延を最小にとどめるように
設計される。しかし、高速な素子であるが故に高価であ
り、また実装上の制約もあるので、主記憶容量よりはる
かに小さな容量しか実装されない。例えば、M−880
ではMSが最大2GB実装可能であるのに対し、IP専
用のキャッシュであるBS(Buffer Stora
ge)は256KB、複数のBSに接続するWS(Wo
rk Storage)はSC(System Con
trol)あたり4MB実装される。
The memory element forming the cache memory operates at a higher speed than the element forming the main memory, and is designed so as to minimize the delay due to the memory access of the processing such as ALU. However, since it is a high-speed element, it is expensive, and there are restrictions on mounting. Therefore, only a capacity much smaller than the main memory capacity is mounted. For example, M-880
In MS, up to 2 GB can be installed, whereas in BS (Buffer Store) which is a cache dedicated to IP.
ge) is 256 KB, and WS (Wo connected to multiple BSs
rk Storage) is SC (System Con)
4 MB is implemented per troll).

【0004】ALUで発生したメモリアクセス要求のデ
−タがBSに存在しない場合、WSよりブロック(Bl
ock:128B)と呼ぶ単位で当該デ−タをBSへ転
送し、登録する。この動作をBT(Block Tra
nsfer)と呼ぶ。BSからWSに対して要求された
デ−タがWSに存在しない場合、MSよりライン(Li
ne: 256B)と呼ぶ単位で当該デ−タをWSへ転
送し、登録する。この動作をLT(Line Tran
sfer)と呼ぶ。キャッシュの一致制御を行なうた
め、デ−タ部であるWSに対し、検索部を設けている。
これは、デ−タのアドレスを示すAdr部、デ−タの有
効/無効を示すV部、リプレ−ス順位を示すR部から構
成される。これにより、WSのライン単位に登録アドレ
スなどを登録し、またWSキャッシュのリプレースを制
御する。
When the data of the memory access request generated by the ALU does not exist in the BS, the block (Bl
The data is transferred to the BS and registered in units called ock: 128B). This operation is performed by BT (Block Tra
nsfer). If the data requested from BS to WS does not exist in WS, the line (Li
The data is transferred to the WS and registered in a unit called ne: 256B). This operation is called LT (Line Tran)
sfer). In order to perform cache coincidence control, a search unit is provided for the data unit WS.
This is composed of an Adr section indicating the data address, a V section indicating the validity / invalidity of the data, and an R section indicating the replay order. As a result, a registration address or the like is registered in WS line units, and replacement of the WS cache is controlled.

【0005】Adr(Address)部は、WSに登
録されるラインのアドレスを記録する。IPから要求の
あったアドレスと、当該Adr部の登録アドレスを比較
し、当該要求がキャッシュヒットであったかキャッシュ
ミスであったかを判定する。V(Valid)部は、A
dr部のアドレスが有効か否かを示す。キャッシュのリ
プレ−スなどによりWSのラインが無効になった場合、
当該ラインに対応するV部に無効フラグを立てる。R
(Replace)部はキャッシュのリプレースを制御
する。Mシリーズ機のBSやWSは4セット構成を取
り、同一の部分アドレスを持つデータを4ブロック又は
4ライン登録できる。4セットすべてにデータが登録さ
れているときに、同一部分アドレスの5つ目のデータを
登録する必要がある場合、いずれのセットに当該データ
を登録するかをLRU(Least Recently
Used)アルゴリズムにより決定する。このアルゴ
リズムは、現在まででアクセスされていない時間が最も
長いセットを記録するものであり、同一部分アドレスの
4セットに対し、アクセスがある毎にこの記録を更新す
る。
The Adr (Address) section records the address of the line registered in the WS. The address requested by the IP is compared with the registered address of the Adr section to determine whether the request is a cache hit or a cache miss. V (Valid) part is A
Indicates whether the address of the dr part is valid. If the WS line becomes invalid due to cache replay, etc.,
An invalid flag is set in the V portion corresponding to the line. R
The (Replace) unit controls replacement of the cache. The BS or WS of the M series machine has a 4-set configuration, and data having the same partial address can be registered in 4 blocks or 4 lines. When data is registered in all four sets, if it is necessary to register the fifth data having the same partial address, which set is to be registered with LRU (Least Recent).
Used) algorithm. This algorithm records the set that has not been accessed for the longest time to date, and updates this record every time access is made to four sets of the same partial address.

【0006】(2)キャッシュ記憶装置のリプレ−ス制
御 キャッシュ記憶装置は、接続する主記憶装置と比較して
少量の記憶容量しか持たないのが通常である。このた
め、IPがアクセスするメモリの範囲を変化させると、
キャッシュはそれに追随するため過去に登録したブロッ
クを捨て、新しいブロックを登録する。このようなブロ
ックの置き換えをキャッシュのリプレ−スと呼ぶ。主記
憶のアクセスや主記憶からキャッシュ記憶までの転送
は、キャッシュ記憶自体のアクセスと比較して遅くなる
ため、一旦登録したデ−タはなるべく再利用し、キャッ
シュ記憶のヒット率を高めたい。このため、リプレ−ス
時にはFIFOやLRUと呼ばれる制御を用いる。
(2) Replay control of cache storage device The cache storage device usually has a small storage capacity as compared with the main storage device to which it is connected. Therefore, if the range of the memory accessed by the IP is changed,
Since the cache follows it, it discards the block registered in the past and registers a new block. Such block replacement is called cache refresh. The access to the main memory and the transfer from the main memory to the cache memory are slower than the access to the cache memory itself, so it is desirable to reuse the registered data as much as possible to increase the hit rate of the cache memory. Therefore, during replay, controls called FIFO and LRU are used.

【0007】FIFOはFirst In First
Outの略で、最も古い過去に登録されたブロックを
リプレ−スするという制御である。FIFOはキャッシ
ュに登録されたブロックが一様にアクセスされる場合に
は平等な制御である。しかし、古く登録されたブロック
は現在不要になっているかというと、その限りではな
い。すなわち、頻繁にアクセスされるデ−タが古くから
登録されている可能性がある。この場合、頻繁にアクセ
スするデ−タをキャッシュ記憶から追い出してしまい、
キャッシュヒット率を下げてしまう危険性がある。LR
UはLeast Recently Usedの略で、
最も古くアクセスされたデ−タのリプレ−ス順位を最高
にする制御である。LRUを用いることにより、頻繁に
アクセスされるデ−タは追い出されず、キャッシュ記憶
に残留する。この結果、LRUは前述のFIFOより高
いキャッシュヒット率を期待できる。
FIFO is First In First
Abbreviation of Out, which is control to replay the oldest block registered in the past. The FIFO is an equal control when the blocks registered in the cache are uniformly accessed. However, it is not the case that old blocks are no longer needed. That is, there is a possibility that frequently accessed data has been registered for a long time. In this case, the frequently accessed data is expelled from the cache memory,
There is a risk of reducing the cache hit rate. LR
U is the abbreviation for Least Recently Used,
This is a control for maximizing the replay order of the oldest accessed data. By using the LRU, frequently accessed data is not evicted and remains in the cache memory. As a result, the LRU can expect a higher cache hit rate than the above-mentioned FIFO.

【0008】特開平2−35544号公報には、キャッ
シュ内の平均滞在時間が平均アクセス時間より短くなる
デ−タが、キャッシュ記憶から追い出されてしまうのを
防ぐ技術が開示されている。本公知例の対象となるデ−
タは、タイマ割り込みなどで周期的にアクセスされるデ
−タである。このため、特定のアドレスに対するアクセ
スの周期性を検知し、当該デ−タのリプレ−ス順位を下
げてやることで(すなわち、上げるとリプレースされ易
く、下げるとリプレースされ難い)、当該デ−タのキャ
ッシュヒット率をあげてやることができる。
Japanese Patent Laid-Open No. 2-35544 discloses a technique for preventing data whose average stay time in the cache is shorter than the average access time from being expelled from the cache storage. Data subject to this publicly known example
The data is data that is periodically accessed by a timer interrupt or the like. Therefore, by detecting the periodicity of access to a specific address and lowering the repeat order of the data (that is, if it is raised, it is easy to replace it, if it is lowered, it is difficult to replace it), You can increase the cache hit rate of.

【0009】[0009]

【発明が解決しようとする課題】従来のキャッシュ記憶
装置の制御方法では、MVC命令など10キロバイト単
位の領域クリア命令がIPで実行された場合に問題があ
った。領域クリア命令は、主記憶装置の或る領域を、例
えば、ワーク領域として使用したい場合に実行されるも
のである。すなわち、ワーク領域として使用したい領域
には不用なデータが記憶されている場合が多く、この不
用なデータをクリアする必要がある。そこで主記憶装置
に事前に用意されたクリアされた領域のデータをワーク
領域にコピーしている。このようなコピーを行なう場合
に領域クリア命令が実行される。領域クリア命令が従来
のキャッシュ記憶装置を備えるシステムで実行されると
き、主記憶装置上の事前に用意されたクリアされた領域
のデータ(オール“0”のデータ)をキャッシュ記憶装
置に記憶しておき、次いで、ワーク領域を主記憶装置か
らキャッシュ記憶装置に格納し、キャッシュ記憶装置に
格納されているオール“0”のデータをキャッシュ記憶
装置上のワーク領域にコピーしている。それにより以前
に当該キャッシュ記憶装置に登録されていたデ−タを、
その種類に関係なくキャッシュより追い出してしまう。
追い出された対象のデ−タが、IPで再び使用される命
令列やデ−タである場合、これらのデ−タを使用時にも
う一回キャッシュに登録し直す必要がある。ところが、
領域クリア命令の対象となるデ−タ、すなわち、前記ワ
ーク領域のデータは、一旦キャッシュに登録されても、
再度キャッシュ内で使用される可能性が、他のデ−タと
比較して低い。よって、領域クリア命令の対象デ−タが
キャッシュ内の多くの部分を占めると、結果としてキャ
ッシュ記憶装置の再利用性が低下し、キャッシュ性能の
悪化を招く。
The conventional cache memory control method has a problem when an area clear instruction in units of 10 kilobytes such as an MVC instruction is executed by IP. The area clear command is executed when a certain area of the main storage device is desired to be used as a work area, for example. That is, in many cases, unnecessary data is stored in the area desired to be used as the work area, and it is necessary to clear this unnecessary data. Therefore, the data in the cleared area prepared in advance in the main memory is copied to the work area. An area clear instruction is executed when such copying is performed. When the area clear instruction is executed in the system including the conventional cache storage device, the data (all “0” data) of the cleared area prepared in the main storage device is stored in the cache storage device. Next, the work area is stored in the cache storage device from the main storage device, and all "0" data stored in the cache storage device is copied to the work area on the cache storage device. As a result, the data previously registered in the cache storage device is
Regardless of its type, it will be evicted from the cache.
If the target data that has been evicted is an instruction sequence or data that will be used again in IP, it is necessary to register these data again in the cache when using them. However,
The data that is the target of the area clear command, that is, the data in the work area, is registered in the cache once,
It is unlikely to be used again in the cache as compared with other data. Therefore, if the target data of the area clear instruction occupies a large part in the cache, the reusability of the cache storage device is reduced as a result, and the cache performance is deteriorated.

【0010】本発明の目的は、領域クリア命令の対象と
なるデ−タがキャッシュ内に占める割合を低く抑えるこ
とにより、キャッシュ全体の利用効率を高め、キャッシ
ュの性能向上を図ることにある。
An object of the present invention is to increase the utilization efficiency of the entire cache and improve the performance of the cache by suppressing the ratio of the data targeted by the area clear instruction in the cache to a low level.

【0011】[0011]

【課題を解決するための手段】上記目的達成のため、キ
ャッシュ記憶装置は、V部、Adr部、R部を有する複
数のエントリを備える検索部と、ヒット判定部と、リプ
レース制御部と、データ部を備え、そして、命令プロセ
ッサがキャッシュ記憶装置に対してメモリアクセス要求
を発行する際、当該要求が領域クリア命令の実行に伴う
メモリアクセス要求であることを示す信号をキャッシュ
記憶装置に送出する領域クリア要求インターフェースを
命令プロセッサとキャッシュ記憶装置の間に設け、ま
た、前記検索部のエントリに、該エントリが領域クリア
命令によりアクセスされた主記憶装置の領域に対応する
エントリであるときフラグがセットされるX部を設け、
さらに、命令プロセッサからキャッシュ記憶装置に対し
てメモリアクセス要求がされ、かつ当該要求が領域クリ
ア命令の実行に伴うメモリアクセス要求であり、検索部
で検索されたエントリがキャッシュミスであるとき、該
検索されたエントリにX部にフラグがセットされたエン
トリがあるとき、該エントリを選択し、該エントリに対
応する前記データ部の記憶領域をリプレース領域として
指定する手段を前記リプレース制御部に設けている。ま
た、前記検索部のエントリにX部を設けずに、命令プロ
セッサからキャッシュ記憶装置に対してメモリアクセス
要求がされ、検索部で検索されたエントリがキャッシュ
ミスであるとき、リプレース対象となるエントリを選択
する手段と、前記メモリアクセス要求が領域クリア命令
の実行に伴うものであるときには、前記選択されたエン
トリのR部のリプレース順位が最高になるように前記検
索されたエントリのR部のリプレース順位を指定し、前
記メモリアクセス要求が領域クリア命令の実行に伴うも
のでないときには、前記選択されたエントリのR部のリ
プレース順位が最低になるように前記検索されたエント
リのR部のリプレース順位を指定する手段とを前記リプ
レース制御部に設けている。また、キャッシュ記憶装置
において、前記データ部を複数のセットに分割すると共
に検索部のエントリを複数のセットに分割するようにし
ている。
To achieve the above object, a cache storage device includes a search unit having a plurality of entries having a V section, an Adr section, and an R section, a hit determination section, a replacement control section, and a data section. An area for sending a signal indicating that the request is a memory access request accompanying execution of an area clear instruction to the cache storage device when the instruction processor issues a memory access request to the cache storage device. A clear request interface is provided between the instruction processor and the cache storage device, and a flag is set in the entry of the search unit when the entry is an entry corresponding to the area of the main storage device accessed by the area clear instruction. X section
Further, when a memory access request is issued from the instruction processor to the cache storage device and the request is a memory access request accompanying the execution of the area clear instruction, and the entry searched by the search unit is a cache miss, the search is performed. When there is an entry in which the flag is set in the X section in the specified entry, the replacement control section is provided with means for selecting the entry and designating the storage area of the data section corresponding to the entry as the replacement area. . Further, when the memory access request is issued from the instruction processor to the cache storage device without providing the X section for the entry of the search section and the entry searched by the search section is a cache miss, the entry to be replaced is selected. When the means for selecting and the memory access request are accompanied by the execution of the area clear instruction, the replacement order of the R part of the searched entry is maximized so that the replacement order of the R part of the selected entry becomes the highest. When the memory access request is not accompanied by the execution of the area clear instruction, the replacement order of the R part of the searched entry is specified so that the replacement order of the R part of the selected entry becomes the lowest. And a means for doing so are provided in the replacement control section. Further, in the cache storage device, the data section is divided into a plurality of sets, and the entry of the search section is divided into a plurality of sets.

【0012】[0012]

【作用】命令プロセッサがキャッシュ記憶装置に対して
メモリアクセス要求を発行してキャッシュミスになった
場合、以前に行なわれた領域クリア命令によりアクセス
された主記憶装置の領域に対応するエントリがキャッシ
ュ記憶装置に存在すれば、該エントリに対応するキャッ
シュ記憶装置内の記憶領域に、今回アクセスされた主記
憶装置上のデータを格納するようにしている。このた
め、当該デ−タの登録により他の必要なデ−タがキャッ
シュ記憶から追い出されることが従来と比較して少なく
できる。また、命令プロセッサがキャッシュ記憶装置に
対してメモリアクセス要求を発行してキャッシュミスに
なった場合、リプレース対象となるエントリを選択し
て、前記メモリアクセス要求が領域クリア命令の実行に
伴うものであるときには、選択されたエントリのリプレ
ース順位が最高になり、前記メモリアクセス要求が領域
クリア命令の実行に伴うものでないときには、選択され
たエントリのリプレース順位が最低になる。このため、
領域クリア用のデ−タのリプレ−ス順位をつねに最高と
しておくことで、当該デ−タのキャッシュに占める割合
を極小化することができる。
When the instruction processor issues a memory access request to the cache storage device and a cache miss occurs, the entry corresponding to the area of the main storage device accessed by the area clear instruction previously executed is stored in the cache storage. If it exists in the device, the data in the main memory device accessed this time is stored in the memory area in the cache memory device corresponding to the entry. Therefore, it is possible to reduce other necessary data from being ejected from the cache memory by registering the data, as compared with the related art. Further, when the instruction processor issues a memory access request to the cache storage device and a cache miss occurs, the entry to be replaced is selected, and the memory access request is accompanied by the execution of the area clear instruction. Sometimes, the replacement order of the selected entry becomes the highest, and when the memory access request is not accompanied by the execution of the area clear instruction, the replacement order of the selected entry becomes the lowest. For this reason,
By keeping the replay order of the data for area clear always at the highest level, the ratio of the data in the cache can be minimized.

【0013】[0013]

【実施例】以下、図に示す実施例により本発明を更に詳
細に説明する。 (1)第1の実施例:全体の構成 図1は本発明の実施例の全体構成を示す。この図の構成
要素は、大きくALU(1)、キャッシュ記憶装置
(3)、主記憶装置(5)から構成される。前述の従来
の技術の説明との関係で実施例の構成をみると、ALU
(1)は命令プロセッサIPとバッファストリッジBS
を備え、キャッシュ記憶装置(3)はワークストリッジ
WSにあたる。ALU(1)とキャッシュ記憶装置
(3)の間には、通常のメモリアクセスインタフェ−ス
(21)の他に、領域クリア要求インタフェ−ス(2
2)を備える。
EXAMPLES The present invention will be described in more detail with reference to the examples shown in the drawings. (1) First Embodiment: Overall Configuration FIG. 1 shows the overall configuration of an embodiment of the present invention. The components of this figure are roughly composed of an ALU (1), a cache storage device (3), and a main storage device (5). Looking at the configuration of the embodiment in relation to the above description of the prior art, the ALU
(1) is the instruction processor IP and the buffer storage BS
And the cache storage device (3) corresponds to the work storage WS. Between the ALU (1) and the cache storage device (3), in addition to the normal memory access interface (21), the area clear request interface (2
2) is provided.

【0014】キャッシュ記憶装置(3)の内部は、さら
に検索部(31)、ヒット判定部(32)、リプレ−ス
制御部(33)、デ−タ部(34)に分割される。本実
施例による検索部(31)は、デ−タ部(34)の分割
に従って4個のセットに分割される。セット0にある1
エントリは、V(Valid)部(311)、Adr
(Address)部(312)、R(Replac
e)部(313)、X(Exclusive)部(31
4)から構成される。V部(311)は当該エントリの
有効/無効を判定するフラグを持つ。Adr部(31
2)は当該エントリに登録されているデ−タのアドレス
を保存する。R部(313)は当該エントリがリプレ−
スされる順位が登録される。X部(314)は本発明の
特徴であり、当該エントリが領域クリア要求による登録
デ−タ(主記憶装置上の領域クリアしたい領域(例え
ば、ワーク領域)のデータ)であることを示す。ここ
で、アドレス情報は、例えば、32ビットからなり、A
dr部12ビット、カラム部12ビット、ディスプレー
スメント8ビットに分割される。そして、検索部(3
1)の各セットのエントリの数はカラム数、すなわち、
この例の場合2の12乗個、だけあり、各エントリはカ
ラム部の値、すなわち、カラム値で指定される。
The inside of the cache storage device (3) is further divided into a search unit (31), a hit determination unit (32), a replay control unit (33), and a data unit (34). The search unit (31) according to this embodiment is divided into four sets according to the division of the data unit (34). 1 in set 0
The entries are V (Valid) part (311) and Adr.
(Address) unit (312), R (Replac)
e) section (313), X (Exclusive) section (31)
4). The V section (311) has a flag for determining validity / invalidity of the entry. Adr section (31
2) saves the address of the data registered in the entry. The R section (313) replays the entry.
The ranking to be registered is registered. The X portion (314) is a feature of the present invention, and indicates that the entry is registration data (data of an area (for example, work area) to be cleared in the main storage device) by the area clear request. Here, the address information consists of, for example, 32 bits and is A
It is divided into a dr section of 12 bits, a column section of 12 bits, and a displacement of 8 bits. Then, the search unit (3
The number of entries in each set in 1) is the number of columns, that is,
In this example, there are only 2 to the 12th power, and each entry is designated by the value of the column portion, that is, the column value.

【0015】検索部31は、ALUが発行したメモリア
クセス要求のアドレス情報を受け、その内のカラム部に
より各セット共通のエントリを検索して、検索結果をヒ
ット判定部(32)に出力する。ヒット判定部(32)
は、ALUが発行したメモリアクセス要求により検索部
(31)からの検索結果のAdr部とメモリアクセス要
求アドレスのAdr部とを比較し、当該要求がキャッシ
ュヒットしており、キャッシュ記憶装置(3)内で処理
できるものか、あるいは当該要求がキャッシュミスして
おり主記憶装置(5)にアクセスするものかを判定す
る。主記憶装置へアクセスする場合には、リプレ−ス制
御部(33)へ制御を渡し、キャッシュヒットの場合に
はデ−タ部(34)へ制御を渡す。
The search section 31 receives the address information of the memory access request issued by the ALU, searches the entry common to each set by the column section therein, and outputs the search result to the hit determination section (32). Hit determination unit (32)
Compares the Adr part of the search result from the search part (31) with the Adr part of the memory access request address by the memory access request issued by the ALU, and the request hits the cache, and the cache storage device (3) It is determined whether the request can be processed in the memory or whether the request has a cache miss and accesses the main storage device (5). When accessing the main memory, control is passed to the repeat control unit (33), and in the case of a cache hit, control is passed to the data unit (34).

【0016】リプレ−ス制御部(33)は、ALUが発
行したメモリアクセス要求がキャッシュミスした場合に
ヒット判定部(32)より制御を受け、主記憶装置
(5)へデ−タ転送リクエストを発行する。また、主記
憶装置から転送されたデ−タを、キャッシュ記憶装置の
デ−タ部(34)のどこに格納するかを決定する。この
詳細は後述する。デ−タ部(34)はキャッシュ記憶装
置(3)におけるデ−タを格納している。セットとカラ
ムの構造は検索部(31)と同一である。ALUからの
デ−タ書き込み要求によりデ−タを更新し、またデ−タ
読みだし要求により当該デ−タをALUに転送する。A
LUからのアクセス要求があったデ−タがキャッシュ記
憶装置内にない場合は主記憶装置から転送するが、この
転送デ−タを格納する働きももつ。図1の検索部(3
1)、ヒット判定部(32)の詳細構成を図2に、リプ
レ−ス制御部(33)の詳細構成を図3に示す。各々の
詳細な説明は後述する。
When the memory access request issued by the ALU causes a cache miss, the replay control section (33) receives control from the hit determination section (32) and sends a data transfer request to the main storage device (5). Issue. Further, it is determined where the data transferred from the main memory device is stored in the data unit (34) of the cache memory device. The details will be described later. The data unit (34) stores the data in the cache storage device (3). The structure of sets and columns is the same as that of the search unit (31). The data is updated in response to a data write request from the ALU, and the data is transferred to the ALU in response to a data read request. A
If the data requested by the LU is not stored in the cache storage device, it is transferred from the main storage device, and it also has a function of storing this transfer data. Search unit (3
1), the detailed configuration of the hit determination unit (32) is shown in FIG. 2, and the detailed configuration of the replay control unit (33) is shown in FIG. A detailed description of each will be given later.

【0017】(2)第1の実施例:動作の詳細 MVC命令などの領域クリア命令により、主記憶装置上
の領域クリアしたい領域(例えば、ワーク領域)のデー
タがキャッシュ記憶装置に登録される。この登録がされ
たキャッシュ記憶装置上の登録場所をクリア領域登録場
所と呼ぶ。クリア領域登録場所の再利用手段は、以下の
ように実現できる。いまALU(1)がMVC命令を実
行し、それに伴いメモリアクセス要求が発生したとす
る。すると、インタフェ−ス(21)には、当該メモリ
アクセスのアドレスが現われ、また領域クリア要求イン
タフェ−ス(22)には、当該メモリアクセスに同期し
てMVC命令であることを示す信号areaClear
(23)の信号が現われる。この時、キャッシュへのデ
−タ登録状況により、以下の場合に分けて判断を行な
う。
(2) First Embodiment: Details of Operation A region clear command such as an MVC command registers data in a region (for example, a work region) on the main memory device desired to be cleared in the cache memory device. The registration location on the cache storage device in which this registration is made is called a clear area registration location. The means for reusing the clear area registration place can be realized as follows. It is assumed that ALU (1) executes the MVC instruction and a memory access request is generated accordingly. Then, the address of the memory access appears in the interface (21), and the area clear request interface (22) shows a signal areaClear indicating that it is an MVC instruction in synchronization with the memory access.
The signal (23) appears. At this time, the judgment is made according to the following cases depending on the data registration status in the cache.

【0018】(A)当該要求がキャッシュヒットした場
合 当該要求のデ−タが既にキャッシュ記憶装置に登録され
ていた場合には、ヒット判定部(32)でキャッシュヒ
ット判定がくだる。すなわち、当該要求のアドレスによ
り、検索される検索部(31)のカラムが決定される。
そして、当該カラムの全4エントリに対し、当該要求の
アドレスと検索部のAdr部(312)に登録されてい
るアドレスが比較される。また、各々のデ−タが有効か
否かも、V部(311)の検索により判定される。これ
らの結果、いづれかのエントリで、要求デ−タのアドレ
スとAdr部登録アドレスが等しく、かつ同一エントリ
のV部が1であれば、当該デ−タはキャッシュヒットと
判定される。その結果、当該要求はデ−タ部(34)へ
流れ、要求のとおり、デ−タ部(34)により、デ−タ
の読みだし/書き込みが実行される。
(A) When the request has a cache hit When the data of the request has already been registered in the cache storage device, the hit determination unit (32) makes a cache hit determination. That is, the column of the search unit (31) to be searched is determined by the address of the request.
Then, for all four entries in the column, the address of the request is compared with the address registered in the Adr unit (312) of the search unit. Whether or not each data is valid is also determined by searching the V section (311). As a result, if the address of the requested data and the registered address of the Adr part are the same in any of the entries and the V part of the same entry is 1, the data is judged to be a cache hit. As a result, the request flows to the data unit (34), and the data unit (34) reads / writes the data as requested.

【0019】以下の(B)(C)(D)ケ−スは全て上
記(A)に反して、当該要求のデ−タがキャッシュミス
した場合である。当該要求が検索部(31)で検索され
た結果、当該カラムの4エントリの全てについて、V部
=1でかつAdr部が当該要求のデ−タと一致するエン
トリがなければ、キャッシュヒットでないことがヒット
判定部(32)において判明する。この結果リプレ−ス
制御部(33)に制御が渡り、主記憶装置(5)に対し
てデ−タ転送要求を発行する。
The following cases (B), (C) and (D) are all cases where the data of the request is cache miss, contrary to the above (A). As a result of the request being searched by the search unit (31), if there is no entry in which the V part = 1 and the Adr part matches the data of the request for all four entries of the column, it is not a cache hit. Is found in the hit determination section (32). As a result, control is passed to the repeat control unit (33), and a data transfer request is issued to the main storage device (5).

【0020】(B)エントリのいずれかがX=1であっ
た場合 領域クリア要求に対応するカラムの4エントリのうち、
あるエントリのXが1であった場合、他のエントリのV
が1であるか否かに関わらず、X=1であるエントリを
一旦無効化して、領域クリア要求のデ−タ(主記憶装置
上の領域クリアしたい領域(例えば、ワーク領域)のデ
ータ)をそこに登録する。 (C)無効のエントリが存在し、他のエントリがX=0
であった場合 検索部(31)を検索した結果、当該カラムの4エント
リの少なくとも1つがV=0、すなわちいずれかのエン
トリが空いており、かつ他の全てのエントリのXが0、
すなわちいずれのエントリも領域クリア要求によるデ−
タを格納していない場合は、V=0のエントリ(複数あ
る場合はそれらのうちいずれか)に、当該領域クリア要
求のデ−タを格納する。この結果を反映して、検索部
(31)の当該エントリには、V部=1、Adr部に当
該要求のアドレス、X部=1のように登録される。 (D)全て有効だが、領域クリア向けのデ−タ登録がな
い場合 検索部(31)の相当するカラムのセット0〜3の全て
がX=0、すなわち領域クリア向けでないデ−タが格納
されており、しかもセット0〜3の全てがV=1、すな
わち有効なデ−タであった場合には、セット0〜3のう
ち最もリプレ−ス順位が高いもの、すなわちRが大きい
セットに、当該デ−タが格納される。この結果を反映し
て、(C)の場合と同様に、検索部(31)の当該エン
トリには、V部=1、Adr部に当該要求のアドレス、
X部=1のように登録される。
(B) When any of the entries is X = 1 Of the four entries in the column corresponding to the area clear request,
If X of one entry is 1, then V of another entry
Irrespective of whether or not is 1, the entry with X = 1 is invalidated once, and the data of the area clear request (data of the area (for example, work area) to be cleared in the main memory) is deleted. Register there. (C) An invalid entry exists, and other entries have X = 0.
When it is, as a result of searching the search unit (31), at least one of the four entries in the column is V = 0, that is, one of the entries is empty, and X of all other entries is 0,
In other words, all entries are
When the data is not stored, the data of the area clear request is stored in the entry of V = 0 (in case of a plurality, one of them). Reflecting this result, in the entry of the search unit (31), V part = 1, the address of the request in the Adr part, and X part = 1 are registered. (D) All are valid, but there is no data registration for area clear. All of the corresponding column sets 0 to 3 of the retrieval unit (31) are X = 0, that is, data that is not for area clear is stored. Further, if all of the sets 0 to 3 are V = 1, that is, valid data, the one having the highest replay order among the sets 0 to 3, that is, the set having a large R, The data is stored. Reflecting this result, as in the case of (C), in the entry of the search unit (31), V part = 1, the address of the request in the Adr part,
X part = 1 is registered.

【0021】この動作により、1カラムのうち領域クリ
ア要求に使用されるエントリは、たかだか1つであり、
これ以上増えることはない。4セット構成のキャッシュ
記憶装置の場合には、領域クリア要求に占有されるキャ
ッシュはたかだか全体の25%である。
With this operation, the number of entries used for the area clear request in one column is at most one,
It doesn't increase any more. In the case of a cache memory device having a four-set configuration, the cache occupied by the area clear request is at most 25%.

【0022】図2に、図1の検索部(31)とヒット判
定部(32)の詳細を一緒に示した検索・ヒット判定部
(300)のブロック図を示す。図1においてALU
(1)からリクエストが発行され、そのアドレスはイン
タフェ−ス(21)によりキャッシュ記憶装置(3)に
伝達される。領域クリア要求インタフェ−ス(22)に
は、当該メモリアクセスに同期してMVC命令であるこ
とを示す信号areaClear(23)の信号が現わ
れる。当該アドレスは検索部(31)を検索する際にエ
ントリアドレスとカラムアドレスに分割されるが、図2
に示すようにアドレス(10)のうちカラムアドレスは
検索部分のカラム位置を特定するために使用される。こ
こで、検索部分はV部(311)、Adr部(31
2)、R部(313)、X部(314)の結果を出力す
る。Adr部(312)の検索結果はリクエストのエン
トリアドレスと比較器(320)で比較される。更に、
当該比較結果とV部(311)の検索結果をAND回路
(360)で論理積をとる。V部(311)はAdr部
(312)に示されるアドレスのキャッシュ内デ−タが
有効か否かを示す。アドレス比較とV部(32)の論理
積出力(410)により、キャッシュに登録されている
デ−タがリクエストアドレスのものと同一か否かが判定
される。同様に、V部(311)、R部(313)、X
部(314)の検索結果(420)、(430)、(4
40)も出力する。本実施例のキャッシュ記憶装置は4
セット構成なので、図2に示すように上記の検索・ヒッ
ト判定装置は4面構造になっており、その出力も4本単
位の束線となっている。
FIG. 2 is a block diagram of the search / hit determination unit (300) showing the details of the search unit (31) and the hit determination unit (32) in FIG. ALU in FIG.
A request is issued from (1), and its address is transmitted to the cache storage device (3) by the interface (21). In the area clear request interface (22), a signal areaClear (23) indicating the MVC instruction appears in synchronization with the memory access. The address is divided into an entry address and a column address when searching the search unit (31).
As shown in, the column address of the address (10) is used to specify the column position of the search portion. Here, the search part is the V part (311) and the Adr part (31
2), the results of the R section (313) and the X section (314) are output. The search result of the Adr unit (312) is compared with the entry address of the request by the comparator (320). Furthermore,
An AND circuit (360) performs a logical product of the comparison result and the search result of the V section (311). The V section (311) indicates whether or not the in-cache data of the address shown in the Adr section (312) is valid. The address comparison and the logical product output (410) of the V unit (32) determine whether the data registered in the cache is the same as the request address. Similarly, V portion (311), R portion (313), X
Part (314) search results (420), (430), (4
40) is also output. The cache storage device of this embodiment has four
Since it is a set configuration, as shown in FIG. 2, the search / hit determination device described above has a four-sided structure, and the output thereof is also a bundled line in units of four.

【0023】図3に、図1のリプレ−ス制御部(33)
のリプレ−ス対象決定回路(100)の詳細構成を示
す。この構成は、図2の検索結果を入力とし、リプレ−
スのセットの決定をし、リプレ−ス対象セット信号(7
00)として出力する。キャッシュミス時のリプレ−ス
を対象としているため、キャッシュヒットの場合には本
論理は作動しない。なお、図には論理回路図を省略して
いるが、キャッシュミスの場合のみ、すなわち、リプレ
−ス対象決定回路の出力はゲートされ、出力される。
FIG. 3 shows a replay control unit (33) shown in FIG.
2 shows a detailed configuration of the replay target determining circuit (100). With this configuration, the search result of FIG.
Of the replay target set signal (7
00) is output. This logic does not operate in the case of a cache hit because it is intended for the replay at the time of a cache miss. Although a logic circuit diagram is omitted in the figure, only in the case of a cache miss, that is, the output of the replay target determining circuit is gated and output.

【0024】以下、前記の説明における(B)、
(C)、(D)の場合について順に説明する。 (B)エントリのいずれかがX=1であった場合 入力X<0−3>のいづれかが1となるので、ORゲ−
ト(201)が成立し、MVC命令であることを示す信
号areaClear(23)が“1”のとき、AND
ゲート200が成立し、信号isSetForClea
r(105)が“1”となる。信号areaClear
(23)が“1”でなければ、 また、4本の束線fo
rClearSet(104)のいづれかが“1”とな
る。よって、AND回路(601)、(604)、(6
07)、(610)のいづれかが成立する。また、この
時、信号isSetForClear(105)の否定
を入力とするAND回路(204)、(205)はいず
れも成立しない。よって、信号isMissed(10
7)、replaced(108)は両方とも“0”で
ある。これより、AND回路(602)、(603)、
(605)、(606)、(608)、(609)、
(611)、(612)は全て成立しない。この結果、
AND回路(601〜612)のうちだた1個のみが成
立し、それはX=1を出力したセットである。これらの
AND回路をまとめたOR回路(71〜74)は、当該
セットが“1”となり、リプレ−ス対象セットはX=1
のセットであるという結果になる。なお、信号area
Clear(23)が“1”でなければ、上記の動作は
行なわれない。
Hereinafter, (B) in the above description,
Cases (C) and (D) will be described in order. (B) When any one of the entries has X = 1, one of the inputs X <0-3> becomes 1, so the OR gate
AND (201) is satisfied and the signal areaClear (23) indicating the MVC instruction is “1”, AND
The gate 200 is established, and the signal isSetForClear
r (105) becomes "1". Signal areaClear
If (23) is not "1", then four bundled lines fo
Either one of rClearSet (104) becomes "1". Therefore, AND circuits (601), (604), (6
Either of 07) and (610) is established. Further, at this time, neither of the AND circuits (204) and (205) which receives the negation of the signal isSetForClear (105) as input. Therefore, the signal isMissed (10
7) and replaced (108) are both "0". From this, AND circuits (602), (603),
(605), (606), (608), (609),
All of (611) and (612) are not established. As a result,
Only one of the AND circuits (601 to 612) is established, which is the set that outputs X = 1. In the OR circuit (71 to 74) which is a combination of these AND circuits, the set is “1”, and the replay target set is X = 1
Will result in a set of. Note that the signal area
If Clear (23) is not "1", the above operation is not performed.

【0025】(C)無効のエントリが存在し、他のエン
トリがX=0であるか、あるいは他のエントリがX≠0
であっても信号areaClear(23)が“0”で
あった場合 全てのセットについてX=0であるか、あるいは他のエ
ントリがX≠0であっても信号areaClear(2
3)が“0”であれば、信号isSetForClea
r(105)は“0”となる。また、V<0−3>(1
02)の否定を入力とするORゲ−ト(202)は、V
<0−3>(102)のいづれかが“0”であった場合
に成立し、isSetForClear(105)の
“0”と併せてANDゲ−ト(204)が成立し、信号
isMissed(107)が成立する。無効のエント
リが複数あった場合には、Lowest#Select
or(203)により、最小ナンバ−のセットが選ば
れ、当該セットには束信号missedSet(10
6)が“1”となる。またこのとき、信号replac
ed(108)はORゲ−ト(202)の否定出力が
“0”なので、“0”のままである。信号isSetF
orClear(105)も“0”である。よって、A
ND回路(601〜612)のうち成立しうるのは(6
02)、(605)、(608)、(611)のいづれ
かである。これは、全てのX=0でかつV=0のセット
が存在した場合、当該セットをリプレ−ス対象とするこ
との実現である(複数のセットが該当する場合には、最
小ナンバ−のセット)。
(C) An invalid entry exists and other entries have X = 0, or other entries have X ≠ 0.
Even if the signal areaClear (23) is “0”, X = 0 for all the sets, or the signal areaClear (2
If 3) is “0”, the signal isSetForClear
r (105) becomes “0”. In addition, V <0-3> (1
The OR gate (202) which inputs the negation of 02) is V
If any of <0-3> (102) is "0", the AND gate (204) is established together with "0" of isSetForClear (105), and the signal isMissed (107) is output. To establish. If there are multiple invalid entries, Lowest # Select
or (203) selects the minimum number set, and the bundle signal missedSet (10
6) becomes "1". At this time, the signal replac
Since the negative output of the OR gate (202) is "0", the ed (108) remains "0". Signal isSetF
The orClear (105) is also “0”. Therefore, A
Of the ND circuits (601 to 612), the one that can be satisfied is (6
02), (605), (608), or (611). This is a realization of targeting the set as a replay target when all the sets of X = 0 and V = 0 exist (in the case of a plurality of sets, the set of the minimum number is set). ).

【0026】(D)無効のエントリが存在せず、他のエ
ントリがX=0であるか、あるいは他のエントリがX≠
0であっても信号areaClear(23)が“0”
であった場合 信号isSetForClear(105)と信号is
Missed(107)は両方とも“0”であり、それ
らの否定である信号replaced(108)は
“1”である。この場合、リプレ−ス順位の最も高いセ
ットが選ばれる。各々のセットのリプレ−ス順位はR<
0−3>(103)に示されているので、これをHig
hest#Selector(208)で解析し、リプ
レ−ス対象セットをsetToBeReplaced
(109)として出力する。ここで、成立するAND回
路は(603)、(606)、(609)、(612)
のいづれかであり、他のAND回路が成立することはな
い。よって、通常のリプレ−ス制御により指定されたセ
ットがリプレ−ス対象セットに選ばれる。
(D) There are no invalid entries and X = 0 for other entries, or X ≠ for other entries.
Even if it is 0, the signal areaClear (23) is "0".
If it is signal isSetForClear (105) and signal is
Missed (107) are both "0" and their negated signal replaced (108) is "1". In this case, the set with the highest replay order is selected. The replay rank of each set is R <
0-3> (103).
Analyzed with the best # Selector (208) and set the replay target set to setToBeReplaced.
Output as (109). Here, the AND circuits that are satisfied are (603), (606), (609), and (612).
Whichever is the case, and no other AND circuit is established. Therefore, the set designated by the normal replay control is selected as the replay target set.

【0027】以上述べたように、前述のクリア領域登録
ブロックの再利用手段が実現される。
As described above, the above-mentioned means for reusing the clear area registration block is realized.

【0028】(3)第2の実施例 第2の実施例は、クリア領域の最速リプレ−ス手段を実
現する。以下図4に従って説明する。図4は、図1とほ
ぼ同じ構成を示す。図1との相違は、検索部(31)に
領域クリア用のフラグ部であるX部を設けないことと、
リプレ−ス制御部(33)の制御アルゴリズムが異なる
ことである。クリア領域を格納するブロックを最も早く
リプレ−スするためには、当該ブロックを含む全セット
のうち、タ−ゲットブロックのリプレ−ス順位を最高に
すれば良い。このため、クリア領域のブロックを登録す
る際には、通常のブロックの登録とリプレ−ス順位の付
け方を変える。
(3) Second Embodiment The second embodiment realizes the fastest replenishing means in the clear area. This will be described below with reference to FIG. FIG. 4 shows almost the same configuration as FIG. The difference from FIG. 1 is that the search section (31) is not provided with the X section which is a flag section for area clearing.
The difference is that the control algorithm of the replay control unit (33) is different. In order to replay the block storing the clear area earliest, the replay order of the target block among all the sets including the block may be set to the highest. Therefore, when registering a block in the clear area, the normal block registration and the method of assigning the replay order are changed.

【0029】図5に第2の実施例における検索・ヒット
判定部のブロック図を示す。図2と同一部分には同一符
号を付してある。ALUからはリクエストアドレスと領
域クリア要求インタフェ−ス(22)を介して信号ar
eaClear(23)が送出される。信号areaC
lear(23)は、ALUがMVC命令による領域ク
リアに伴うメモリアクセスであることを判定して“1”
とする。そうでない場合は“0”である。当該アドレス
は検索部(31)を検索する際にエントリアドレスとカ
ラムアドレスに分割されるが、図2に示したようにアド
レス(10)のうちカラムアドレスは検索部分のカラム
位置を特定するために使用される。ここで、検索部分は
V部(311)、Adr部(312)、R部(313)
の結果を出力する。Adr部(312)の検索結果はリ
クエストのエントリアドレス(21)と比較器(32
0)で比較される。更に、当該比較結果とV部(31
1)の検索結果の論理積をとる(360)。V部(31
1)はAdr部(312)に示されるアドレスのキャッ
シュ内デ−タが有効か否かを示す。アドレス比較とV部
(311)の論理和出力(410)により、キャッシュ
に登録されているデ−タがリクエストアドレスのものと
同一か否かが判定される。同様に、V部(311)、R
部(313)の検索結果(420)、(430)も出力
する。
FIG. 5 shows a block diagram of the search / hit determination unit in the second embodiment. The same parts as those in FIG. 2 are designated by the same reference numerals. A signal ar is sent from the ALU via the request address and the area clear request interface (22).
eaClear (23) is transmitted. Signal areaC
“Lear (23)” determines that the ALU is a memory access accompanying the area clear by the MVC instruction and “1”.
And Otherwise, it is "0". The address is divided into an entry address and a column address when the search unit (31) is searched. As shown in FIG. 2, the column address of the address (10) is used to specify the column position of the search portion. used. Here, the search portion is the V portion (311), the Adr portion (312), and the R portion (313).
The result of is output. The search result of the Adr unit (312) is the request entry address (21) and the comparator (32
0) is compared. Furthermore, the comparison result and the V part (31
The logical product of the search results of 1) is calculated (360). V part (31
1) indicates whether or not the in-cache data of the address shown in the Adr section (312) is valid. The address comparison and the logical sum output (410) of the V unit (311) determine whether the data registered in the cache is the same as the request address. Similarly, V part (311), R
The search results (420) and (430) of the copy (313) are also output.

【0030】図6に、図4のリプレ−ス制御部(33)
のリプレ−ス対象決定回路(60)の詳細構成を示す。
この構成は、図5の検索結果を入力とし、リプレ−スの
セットの決定をし、リプレ−ス対象セット信号(70
0)として出力する。キャッシュミス時のリプレ−スを
対象としているため、キャッシュヒットの場合には本論
理は作動しない。なお、図には論理回路図を省略してい
るが、キャッシュミスの場合のみ、すなわち、リプレ−
ス対象決定回路の出力はゲートされ、出力される。ま
た、図3と同一部分には同一符号を付してある。 (E)無効のエントリが存在する場合 また、V<0−3>(102)の否定を入力とするOR
ゲ−ト(202)は、V<0−3>(102)のいづれ
かが“0”であった場合に成立し、これにより、信号i
sMissed(107)が成立する。無効のエントリ
が複数あった場合には、Lowest#Selecto
r(203)により、最小ナンバ−のセットが選ばれ、
当該セットには束信号missedSet(106)が
“1”となる。またこのとき、信号replaced
(108)はORゲ−ト(202)の否定出力が“0”
なので、“0”のままである。よって、AND回路(6
01〜612)のうち成立しうるのは(602)、(6
05)、(608)、(611)のいづれかである。こ
れは、V=0のセットが存在した場合、当該セットをリ
プレ−ス対象とすることの実現である(複数のセットが
該当する場合には、最小ナンバ−のセット)。
FIG. 6 shows a replay control unit (33) shown in FIG.
The detailed configuration of the replay target determining circuit (60) is shown.
In this configuration, the search result of FIG. 5 is input, the set of the replay is determined, and the replay target set signal (70
0) is output. This logic does not operate in the case of a cache hit because it is intended for the replay at the time of a cache miss. Although the logic circuit diagram is omitted in the figure, only in the case of a cache miss, that is, the replay
The output of the target determination circuit is gated and output. The same parts as those in FIG. 3 are designated by the same reference numerals. (E) When an invalid entry exists Also, the OR of which the negative of V <0-3> (102) is input
The gate (202) is established when any of V <0-3> (102) is "0", whereby the signal i
sMissed (107) is established. If there are multiple invalid entries, Lowest # Selecto
The minimum number set is selected by r (203),
The bundle signal missedSet (106) becomes "1" in the set. At this time, the signal replaced
In (108), the negative output of the OR gate (202) is "0".
Therefore, it remains “0”. Therefore, the AND circuit (6
(602) and (6)
05), (608), or (611). This is a realization that, when a set of V = 0 exists, the set is set as a replay target (in the case where a plurality of sets are applicable, a set of minimum numbers).

【0031】(F)全てのエントリが有効である場合 信号isMissed(107)が“0”であり、その
否定である信号replaced(108)は“1”で
ある場合、リプレ−ス順位の最も高いセットが選ばれ
る。各々のセットのリプレ−ス順位はR<0−3>(1
03)に示されているので、これをHighest#S
elector(208)で解析し、リプレ−ス対象セ
ットをsetToBeReplaced(109)とし
て出力する。ここで、成立するAND回路は(60
3)、(606)、(609)、(612)のいづれか
であり、他のAND回路が成立することはない。よっ
て、通常のリプレ−ス制御により指定されたセットがリ
プレ−ス対象セットに選ばれ、リプレ−ス対象セット信
号(700)として出力される。
(F) When all entries are valid When the signal isMissed (107) is "0" and its negated signal replaced (108) is "1", the replay order is the highest. The set is selected. The replay rank of each set is R <0-3> (1
03), so change this to Highest # S
It is analyzed by the elector (208), and the replay target set is output as setToBeReplaced (109). Here, the established AND circuit is (60
3), (606), (609), or (612), and no other AND circuit is established. Therefore, the set designated by the normal replay control is selected as the replay target set, and is output as the replay target set signal (700).

【0032】次に、リプレ−ス制御部(33)における
リプレース順位を変更するためのリプレース順位変更選
択回路(70)の一例を第7図に示す。第1のリプレー
ス順位変更回路であるR−change(1)(70
1)は、通常の場合のリプレース順位変更回路であり、
新たに登録されるセットは最も最近アクセスされたとい
うことで、該セットのリプレース順位が最低になるよう
に各セットのリプレース順位を変更するものである。第
2のリプレース順位変更回路であるR−change
(2)(702)は、信号areaClear(23)
が成立している場合のリプレース順位変更回路であり、
新たに登録されるセットを早く追い出したいので、該セ
ットのリプレース順位が最高になるように各セットのリ
プレース順位を変更するものである。
Next, FIG. 7 shows an example of the replacement order change selection circuit (70) for changing the replacement order in the replacement control unit (33). The first replacement order changing circuit R-change (1) (70
1) is a replacement order changing circuit in a normal case,
Since the newly registered set has been accessed most recently, the replacement order of each set is changed so that the replacement order of the set becomes the lowest. R-change which is a second replacement order changing circuit
(2) (702) is the signal areaClear (23)
It is a replacement order change circuit when
Since it is desired to expel a newly registered set earlier, the replacement order of each set is changed so that the replacement order of the set becomes the highest.

【0033】R−change(1)(701)とR−
change(2)(702)は、R部(313)の検
査結果(430)とリプレ−ス対象決定回路(60)の
出力であるリプレ−ス対象セット信号(700)をそれ
ぞれ入力し、リプレース順位を変更してリプレース順位
信号をそれぞれ出力する。アンドゲート(711)〜
(714)のそれぞれにはR−change(1)(7
01)からのリプレース順位信号が入力されると共に信
号areaClear(23)の否定信号が入力され、
アンドゲート(715)〜(718)のそれぞれにはR
−change(2)(702)からのリプレース順位
信号が入力されると共に信号areaClear(2
3)が入力される。これにより、信号areaClea
r(23)が“0”のとき、すなわち、領域クリアに伴
うメモリアクセスではないときには、アンドゲート(7
11)〜(714)からR−change(1)(70
1)からのリプレース順位信号が出力され、アンドゲー
ト(715)〜(718)からはR−change
(2)(702)からのリプレース順位信号は出力され
ない。逆に、信号areaClear(23)が“1”
のとき、すなわち、領域クリアに伴うメモリアクセスで
あるときには、アンドゲート(711)〜(714)か
らはR−change(1)(701)からのリプレー
ス順位信号は出力されず、アンドゲート(715)〜
(718)からR−change(2)(702)から
のリプレース順位信号が出力される。そして、アンドゲ
ート(711)〜(714)からの出力と、アンドゲー
ト(715)〜(718)からの出力がオアゲート(7
21)〜(724)に入力され、オアゲート(721)
〜(724)から選択された登録用リプレース順位信号
(730)が出力される。
R-change (1) (701) and R-
The change (2) (702) inputs the inspection result (430) of the R section (313) and the replay target set signal (700) which is the output of the replay target determination circuit (60), respectively, and replaces them. And replace order signals are output. AND GATE (711) 〜
R-change (1) (7
01), and the negative signal of the signal areaClear (23) is input.
R for each of AND gates (715) to (718)
-The replacement order signal from the change (2) (702) is input and the signal areaClear (2
3) is input. This causes the signal areaClea
When r (23) is "0", that is, when the memory access is not accompanied by the area clear, the AND gate (7
11) to (714) to R-change (1) (70
The replacement order signal from 1) is output, and the R-change is output from AND gates (715) to (718).
(2) The replacement order signal from (702) is not output. Conversely, the signal areaClear (23) is "1".
When the memory access is due to area clear, the AND gates (711) to (714) do not output the replacement order signal from the R-change (1) (701) and the AND gate (715). ~
From (718), the replacement order signal from R-change (2) (702) is output. The outputs from the AND gates (711) to (714) and the outputs from the AND gates (715) to (718) are the OR gate (7
21) to (724), and the OR gate (721)
The replacement order signal for registration (730) selected from (-) to (724) is output.

【0034】この登録用リプレ−ス順位信号(730)
と、もとのリクエストアドレス信号(62)を、併せて
検索部に再登録し、キャッシュのリプレ−スを行なう。
このようにして、信号areaClear(23)の成
立を伴うリクエストによりキャッシュに当該デ−タが登
録される時には、常にリプレ−ス順位が最高となるよう
にすることができる。
This registration sequence signal for registration (730)
Then, the original request address signal (62) is also re-registered in the search unit, and the cache is replayed.
In this way, when the relevant data is registered in the cache by the request accompanied by the establishment of the signal areaClear (23), the replay rank can always be the highest.

【0035】[0035]

【発明の効果】本発明では、既に領域クリア用のデ−タ
がキャッシュ記憶に登録されていた場合、新たな領域ク
リア用のデ−タの登録は、既存のクリア用デ−タをリプ
レ−スする形で行なわれるので、当該デ−タの登録によ
り他の必要なデ−タがキャッシュ記憶から追い出される
ことが従来と比較して少なくできるという効果が得られ
る。また、領域クリア用のデ−タのリプレ−ス順位をつ
ねに最高としておくことで、当該デ−タのキャッシュに
占める割合を極小化することができるという効果が得ら
れる。
According to the present invention, when the data for clearing the area has already been registered in the cache memory, the registration of the new data for clearing the area recreates the existing clearing data. Since the data is registered in the same manner, it is possible to obtain an effect that other necessary data can be removed from the cache memory by registering the data as compared with the conventional case. Further, by always setting the replay order of the data for area clearing to the highest level, it is possible to minimize the ratio of the data in the cache.

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

【図1】本発明の実施例の全体構成を示す図である。FIG. 1 is a diagram showing an overall configuration of an embodiment of the present invention.

【図2】検索・ヒット判定部の構成を示すブロック図で
ある。
FIG. 2 is a block diagram showing a configuration of a search / hit determination unit.

【図3】リプレ−ス対象決定回路の詳細構成を示す図で
ある。
FIG. 3 is a diagram showing a detailed configuration of a replay target determining circuit.

【図4】本発明の第2実施例の全体構成を示す図であ
る。
FIG. 4 is a diagram showing an overall configuration of a second embodiment of the present invention.

【図5】本発明の第2の実施例における検索・ヒット判
定部の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a search / hit determination unit according to a second embodiment of the present invention.

【図6】本発明の第2実施例におけるリプレ−ス対象決
定回路の詳細構成を示す図である。
FIG. 6 is a diagram showing a detailed configuration of a replay target determining circuit in a second embodiment of the present invention.

【図7】本発明の第2実施例におけるリプレース順位変
更選択回路の構成を示す図である。
FIG. 7 is a diagram showing a configuration of a replacement order change selection circuit according to a second exemplary embodiment of the present invention.

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

1 ALU 3 キャッシュ記憶装置 5 主記憶装置 31 検索部 32 ヒット判定部 33 リプレース制御部 34 データ部 1 ALU 3 cache storage device 5 main storage device 31 search unit 32 hit determination unit 33 replacement control unit 34 data unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 命令プロセッサと主記憶装置との間に接
続され、V部、Adr部、R部を有する複数のエントリ
を備える検索部と、ヒット判定部と、リプレース制御部
と、データ部を備えるキャッシュ記憶装置において、 前記命令プロセッサが前記キャッシュ記憶装置に対して
メモリアクセス要求を発行する際、当該要求が領域クリ
ア命令の実行に伴うメモリアクセス要求であることを示
す信号を前記キャッシュ記憶装置に送出する領域クリア
要求インターフェースを前記命令プロセッサと前記キャ
ッシュ記憶装置の間に設けると共に、前記検索部のエン
トリに、該エントリが領域クリア命令によりアクセスさ
れた主記憶装置の領域に対応するエントリであるときフ
ラグがセットされるX部を設け、 前記命令プロセッサから前記キャッシュ記憶装置に対し
てメモリアクセス要求がされ、かつ当該要求が領域クリ
ア命令の実行に伴うメモリアクセス要求であり、検索部
で検索されたエントリがキャッシュミスであるとき、該
検索されたエントリにX部にフラグがセットされたエン
トリがあるとき、該エントリを選択し、該エントリに対
応する前記データ部の記憶領域をリプレース領域として
指定する手段を前記リプレース制御部に設けたことを特
徴とするキャッシュ記憶装置。
1. A search unit, which is connected between an instruction processor and a main memory, has a plurality of entries having a V section, an Adr section, and an R section, a hit determination section, a replacement control section, and a data section. In a cache storage device provided with, when the instruction processor issues a memory access request to the cache storage device, a signal indicating that the request is a memory access request accompanying execution of a region clear instruction is sent to the cache storage device. An area clear request interface for sending is provided between the instruction processor and the cache storage device, and the entry of the search unit is an entry corresponding to the area of the main storage device accessed by the area clear instruction. An X section in which a flag is set is provided, and the instruction processor stores the cache data. When a memory access request is issued to the device, the request is a memory access request accompanying the execution of a region clear instruction, and the entry searched by the search unit is a cache miss, the X entry is added to the searched entry. When there is an entry with a flag set, the replacement control unit is provided with means for selecting the entry and designating a storage area of the data section corresponding to the entry as a replacement area. .
【請求項2】 請求項1記載のキャッシュ記憶装置にお
いて、前記データ部を複数のセットに分割すると共に検
索部のエントリを複数のセットに分割したことを特徴と
するキャッシュ記憶装置。
2. The cache storage device according to claim 1, wherein the data section is divided into a plurality of sets and the entries of the search section are divided into a plurality of sets.
【請求項3】 命令プロセッサと主記憶装置との間に接
続され、V部、Adr部、R部を有する複数のエントリ
を備える検索部と、ヒット判定部と、リプレース制御部
と、データ部を備えるキャッシュ記憶装置において、 前記命令プロセッサが前記キャッシュ記憶装置に対して
メモリアクセス要求を発行する際、当該要求が領域クリ
ア命令の実行に伴うメモリアクセス要求であることを示
す信号を前記キャッシュ記憶装置に送出する領域クリア
要求インターフェースを前記命令プロセッサと前記キャ
ッシュ記憶装置の間に設け、 前記命令プロセッサから前記キャッシュ記憶装置に対し
てメモリアクセス要求がされ、検索部で検索されたエン
トリがキャッシュミスであるとき、リプレース対象とな
るエントリを選択する手段と、前記メモリアクセス要求
が領域クリア命令の実行に伴うものであるときには、前
記選択されたエントリのR部のリプレース順位が最高に
なるように前記検索されたエントリのR部のリプレース
順位を指定し、前記メモリアクセス要求が領域クリア命
令の実行に伴うものでないときには、前記選択されたエ
ントリのR部のリプレース順位が最低になるように前記
検索されたエントリのR部のリプレース順位を指定する
手段とを前記リプレース制御部に設けたことを特徴とす
るキャッシュ記憶装置。
3. A search unit, which is connected between an instruction processor and a main memory, has a plurality of entries having a V section, an Adr section, and an R section, a hit determination section, a replacement control section, and a data section. In a cache storage device provided with, when the instruction processor issues a memory access request to the cache storage device, a signal indicating that the request is a memory access request accompanying execution of a region clear instruction is sent to the cache storage device. An area clear request interface for transmission is provided between the instruction processor and the cache storage device, and when the instruction processor issues a memory access request to the cache storage device and the entry searched by the search unit is a cache miss. , Means for selecting an entry to be replaced, and the memory access When the memory request is associated with the execution of the area clear instruction, the replacement order of the R part of the searched entry is specified so that the replacement order of the R part of the selected entry becomes the highest, and the memory access is performed. When the request is not accompanied by the execution of the area clear instruction, the means for designating the replacement order of the R part of the searched entry so that the replacement order of the R part of the selected entry becomes the lowest. A cache storage device provided in a section.
【請求項4】 請求項3記載のキャッシュ記憶装置にお
いて、前記データ部を複数のセットに分割すると共に検
索部のエントリを複数のセットに分割したことを特徴と
するキャッシュ記憶装置。
4. The cache storage device according to claim 3, wherein the data section is divided into a plurality of sets, and the entries of the search section are divided into a plurality of sets.
JP4353649A 1992-12-14 1992-12-14 Cache storage device Pending JPH06180670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4353649A JPH06180670A (en) 1992-12-14 1992-12-14 Cache storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4353649A JPH06180670A (en) 1992-12-14 1992-12-14 Cache storage device

Publications (1)

Publication Number Publication Date
JPH06180670A true JPH06180670A (en) 1994-06-28

Family

ID=18432280

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4353649A Pending JPH06180670A (en) 1992-12-14 1992-12-14 Cache storage device

Country Status (1)

Country Link
JP (1) JPH06180670A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110402434A (en) * 2017-03-07 2019-11-01 国际商业机器公司 Cache miss thread balance

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110402434A (en) * 2017-03-07 2019-11-01 国际商业机器公司 Cache miss thread balance

Similar Documents

Publication Publication Date Title
US5584013A (en) Hierarchical cache arrangement wherein the replacement of an LRU entry in a second level cache is prevented when the cache entry is the only inclusive entry in the first level cache
US5530829A (en) Track and record mode caching scheme for a storage system employing a scatter index table with pointer and a track directory
US5717893A (en) Method for managing a cache hierarchy having a least recently used (LRU) global cache and a plurality of LRU destaging local caches containing counterpart datatype partitions
US7711902B2 (en) Area effective cache with pseudo associative memory
US6038644A (en) Multiprocessor system with partial broadcast capability of a cache coherent processing request
US6078992A (en) Dirty line cache
US7194586B2 (en) Method and apparatus for implementing cache state as history of read/write shared data
JPH05324471A (en) Cache controller
JPH09190382A (en) Contention cache for computer memory system
JPH0962572A (en) Device and method for stream filter
US5214766A (en) Data prefetching based on store information in multi-processor caches
US5809526A (en) Data processing system and method for selective invalidation of outdated lines in a second level memory in response to a memory request initiated by a store operation
US7093075B2 (en) Location-based placement algorithms for set associative cache memory
US6792498B2 (en) Memory system with mechanism for assisting a cache memory
EP0173893B1 (en) Computing system and method providing working set prefetch for level two caches
JPH10301850A (en) Method and system for providing pseudo fine inclusion system in sectored cache memory so as to maintain cache coherency inside data processing system
JPH06180670A (en) Cache storage device
JPH05216765A (en) Hierarchical buffer storage device
JP3078303B2 (en) Cache memory control circuit
JPH11143774A (en) Cache control mechanism
JP2000047942A (en) Device and method for controlling cache memory
JPH0612331A (en) Cache memory controller
JPH08263374A (en) Cache control method and multiprocessor system using this method
JPH05342101A (en) Hierarchical cache memory
JP2852247B2 (en) Shared memory multiprocessor system