JPH06100982B2 - Hierarchical cache memory device - Google Patents
Hierarchical cache memory deviceInfo
- Publication number
- JPH06100982B2 JPH06100982B2 JP4151272A JP15127292A JPH06100982B2 JP H06100982 B2 JPH06100982 B2 JP H06100982B2 JP 4151272 A JP4151272 A JP 4151272A JP 15127292 A JP15127292 A JP 15127292A JP H06100982 B2 JPH06100982 B2 JP H06100982B2
- Authority
- JP
- Japan
- Prior art keywords
- cache
- data
- entry
- memory
- bus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 230000015654 memory Effects 0.000 claims description 200
- 238000013500 data storage Methods 0.000 claims description 16
- 238000013479 data entry Methods 0.000 description 49
- 238000010586 diagram Methods 0.000 description 30
- 230000004044 response Effects 0.000 description 30
- 238000000034 method Methods 0.000 description 18
- 230000007704 transition Effects 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 8
- 238000007726 management method Methods 0.000 description 6
- 239000002699 waste material Substances 0.000 description 2
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、少なくとも1台のプロ
セッサとメイン・メモリ装置の間に階層的に設けられた
階層キャッシュ・メモリ装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a hierarchical cache memory device hierarchically provided between at least one processor and a main memory device.
【0002】[0002]
【従来の技術】バス共有型の密結合マルチプロセッサ
は、他のマルチプロセッサ・アーキテクチャと比べて、
実現が容易であるとともに、実行するプログラムのプロ
グラミングが容易であることから商用並列計算機に多く
採用されている。2. Description of the Related Art A bus-sharing tightly coupled multiprocessor, compared to other multiprocessor architectures,
It is often used in commercial parallel computers because it is easy to implement and the programming of the program to be executed is easy.
【0003】しかし、このようなアーキテクチャでは、
プロセッサ台数がある程度多くなると、いわゆるバス・
ボトルネックの問題が生ずる。However, in such an architecture,
When the number of processors increases to some extent, the so-called bus
A bottleneck problem arises.
【0004】この問題を解決するため従来では、複数の
プロセッサとメイン・メモリの間にキャッシュ・メモリ
を設け、メイン・メモリへのアクセス頻度を実効的に減
少させ、より多くのプロセッサをバスに接続させる方式
が採用されている。In order to solve this problem, conventionally, a cache memory is provided between a plurality of processors and the main memory to effectively reduce the frequency of access to the main memory and connect more processors to the bus. The method of letting is adopted.
【0005】ところで、このようなアーキテクチャで
は、キャッシュ・メモリ間およびキャッシュ・メモリと
メイン・メモリ間のデータの一貫性に関する問題、いわ
ゆる、キャッシュ・コンシステンシ問題がある。By the way, in such an architecture, there is a problem regarding data consistency between the cache memories and between the cache memory and the main memory, that is, a so-called cache consistency problem.
【0006】データの一貫性を保証する方法として、ソ
フトウェアにより一貫性を保証する方法とハードウェア
で一貫性を保証する方法が考えられている。ここで、ハ
ードウェアによる方法として、スヌーピング・キャッシ
ュによる方法と、ディレクトリ・ベースの方法が知られ
ている。As a method of guaranteeing the consistency of data, a method of guaranteeing the consistency by software and a method of guaranteeing the consistency by hardware are considered. Here, as a method using hardware, a method using a snooping cache and a directory-based method are known.
【0007】以下では、スヌーピング・キャッシュによ
る方法について説明する。The method using the snooping cache will be described below.
【0008】スヌーピング・キャッシュでは、キャッシ
ュ・メモリ内のデータはプロセッサ側からのみならず、
バス側からもアクセスすることができる。そして、デー
タの一貫性を保証するためキャッシュはプロセッサ側や
バス側からの要求に応じてデータの値とアドレスの他に
その状態と呼ばれる情報を参照・更新する。このような
プロセッサやバスからの要求に対するキャッシュの応答
の規則をキャッシュ・コンシステンシ・プロトコルと呼
び、既に数多くの提案がされている(PerStens
trom,”Survey of Cache Coh
erenceSchemes for Multipr
ocessors,”IEEE Computer 2
3,6(1990),12−24)。In the snooping cache, the data in the cache memory is not only sent from the processor side,
It can also be accessed from the bus side. Then, in order to guarantee the consistency of data, the cache refers to / updates information called its state in addition to the data value and address in response to a request from the processor side or the bus side. Such a rule of cache response to a request from a processor or a bus is called a cache consistency protocol, and many proposals have already been made (PerStens).
trom, "Survey of Cache Coh"
erenceSchemes for Multipr
processors, "IEEE Computer 2"
3, 6 (1990), 12-24).
【0009】ところが、キャッシュ・メモリを持つバス
結合マルチプロセッサにおいても、ある程度プロセッサ
台数が増えると、再び、バス・ボトルネックが問題とな
る。これは、プロセッサからのアクセスのためのバス・
トランザクションの頻度の増加に加え、キャッシュ・メ
モリとメイン・メモリの間、あるいはキャッシュ・メモ
リ相互間でのデータの一貫性を保つためのバス・トラン
ザクションの頻度が増加するためである。However, even in a bus-coupled multiprocessor having a cache memory, if the number of processors increases to some extent, a bus bottleneck becomes a problem again. This is a bus for access from the processor.
This is because, in addition to the increase in transaction frequency, the frequency of bus transactions for maintaining data consistency between the cache memory and the main memory or between the cache memories also increases.
【0010】この問題に対してはキャッシュ・メモリと
メイン・メモリの間に新たなキャッシュ・メモリの階層
を設けることによりバスの負荷を分散・軽減する階層キ
ャッシュ・メモリ方式が提案されている(Andrew
W.Wilson,Jr.,”Hierarchic
al Cache/Bus Architecture
for Shared Memory Multip
rocessors,”Proc. 14th Int
´l Symp. on ComputerArchi
tecture(1987),244−252.)。To solve this problem, a hierarchical cache memory system has been proposed in which a new cache memory hierarchy is provided between the cache memory and the main memory to distribute and reduce the load on the bus (Andrew).
W. Wilson, Jr. , "Hierarchic
al Cache / Bus Architecture
for Shared Memory Multip
processors, "Proc. 14th Int
'L Symp. on ComputerArchi
Tecture (1987), 244-252. ).
【0011】このような階層キャッシュ・メモリ装置
は、プライベート・キャッシュ(以下ではファースト・
キャッシュと呼ぶ)を所有する複数のプロセッサをバス
(以下ではキャッシュ・バスと呼ぶ)で新たなキャッシ
ュ(以下ではセカンド・キャッシュと呼ぶ)に接続して
ひとつのクラスタを構成し、これら複数のクラスタを新
たなバス(以下ではメモリ・バスと呼ぶ)によりメイン
・メモリに接続して構成される。Such a hierarchical cache memory device comprises a private cache (first
A plurality of processors that own a cache) are connected to a new cache (hereinafter referred to as a second cache) by a bus (hereinafter referred to as a cache bus) to form one cluster, and the plurality of clusters are connected to each other. It is configured by connecting to a main memory by a new bus (hereinafter referred to as a memory bus).
【0012】そして、階層キャッシュ・メモリ装置のキ
ャッシュ・コンシステンシ・プロトコルとしては、ライ
ト・スルー方式のように制御が比較的単純で実現の容易
なものが採用されることが多いが、バス・トラフィック
をさらに軽減するために、従来の1階層のキャッシュ・
コンシステンシ・プロトコルを拡張したプロトコルも提
案されている(浅野滋博、”2階層並列キャッシュコン
システンシプロトコル、”情報処理学会計算機アーキテ
クチャ研究会報告80−3(1990),17−2
7)。As the cache consistency protocol of the hierarchical cache memory device, a relatively simple control such as a write-through system and easy to implement is often adopted. In order to further reduce the
A protocol which is an extension of the consistency protocol has also been proposed (Shigehiro Asano, “Two-layer parallel cache consistency protocol,” IPSJ Computer Architecture Research Group Report 80-3 (1990), 17-2.
7).
【0013】また、階層キャッシュ・メモリ装置におい
ては、しばしば、データの一貫性のための制御を容易に
するためにマルチレベル包含性(MLI)と呼ばれる制
約が課される。MLIは、ファースト・キャッシュ(子
キャッシュ・メモリ)にあるデータは必ずそのクラスタ
のセカンド・キャッシュにも存在するということであ
る。Hierarchical cache memory devices also often impose a constraint called multi-level inclusion (MLI) to facilitate control for data consistency. The MLI is that the data in the first cache (child cache memory) always exists in the second cache of the cluster.
【0014】MLIが保証されているシステムではセカ
ンド・キャッシュの容量は少なくとも子キャッシュ・メ
モリの容量の和以上でなければならない。つまり、ファ
ースト・キャッシュの容量をCf 、セカンド・キャッシ
ュの容量をCs 、セカンド・キャッシュ当りの子キャッ
シュ・メモリ数をNとすると、CS >N・Cf でなけれ
ばならない。In a system in which MLI is guaranteed, the capacity of the second cache must be at least the sum of the capacities of the child cache memories. In other words, if the capacity of the first cache is C f , the capacity of the second cache is C s , and the number of child cache memories per second cache is N, then C S > N · C f .
【0015】また、複数の子キャッシュ・メモリで共有
されているデータに対しては、セカンド・キャッシュは
1つのエントリを確保するのみでMLIは保証される。
よって、子キャッシュ・メモリに存在するデータのうち
(100×s)%が共有データであるとすると、セカン
ド・キャッシュの容量のうち子キャッシュ・メモリが持
たないデータを格納することができる容量Ceff は、C
eff =Cs −[N・(1−s)+s]・Cf で与えられ
る。For data shared by a plurality of child cache memories, the second cache secures only one entry, and the MLI is guaranteed.
Therefore, assuming that (100 × s)% of the data existing in the child cache memory is shared data, the capacity C eff that can store the data that the child cache memory does not have in the capacity of the second cache. Is C
It is given by [N · (1-s) + s] · C f - eff = C s.
【0016】子キャッシュ・メモリに存在しないデータ
をセカンド・キャッシュが格納している場合には、その
データへのアクセスは子キャッシュ・メモリにおいては
キャッシュ・ミスするが、セカンド・キャッシュにおい
てはキャッシュ・ヒットするので、メイン・メモリや他
のクラスタにアクセスせずに済む。When the second cache stores data that does not exist in the child cache memory, an access to the data causes a cache miss in the child cache memory, but a cache hit in the second cache. Access to main memory and other clusters.
【0017】このセカンド・キャッシュにおけるヒット
率を高めるには、Ceff が大きい方が好ましい。Ceff
を大きくするには、Cs を大きくするか、sを大きくす
ることが考えられる。Cs が十分大きくできる場合には
問題はないが、ボードやチップ面積の制約により十分大
きなCs を確保できないことが多い。In order to increase the hit rate in this second cache, it is preferable that C eff is large. C eff
In order to increase, it is conceivable to increase C s or increase s . No problem if C s is sufficiently large, it is often not possible to secure a sufficiently large C s constraints of board or chip area.
【0018】sはプログラムの性質に依存しているが、
プログラマの恣意により大きくすることは難しい。一般
に、バス結合型密結合マルチプロセッサにおいて、プロ
セッサ間のデータ共有が多い場合(つまりsが大きい場
合)には、データの一貫性保証のためのバス・トランザ
クションの頻度が増える。これでは、バス・ボトルネッ
クの問題が生じてしまいマルチプロセッサの有効な利用
法とは言い難い。Although s depends on the nature of the program,
It is difficult to make it larger depending on the programmer's will. Generally, in a bus-coupled tightly-coupled multiprocessor, when data sharing between processors is large (that is, when s is large), the frequency of bus transactions for guaranteeing data consistency increases. In this case, the problem of bus bottleneck occurs, and it cannot be said that the multiprocessor is effectively used.
【0019】[0019]
【発明が解決しようとする課題】このように従来のML
Iが成り立つ階層キャッシュ・メモリ装置においては、
セカンド・キャッシュの容量を十分大きくとれない場
合、セカンド・キャッシュを導入する効果があまり期待
できず、このために、セカンド・キャッシュに十分大き
な容量を持たせなければならなかったが、このことも種
々の制約により十分に大きなセカンド・キャッシュの容
量が確保できないことがあった。As described above, the conventional ML is used.
In the hierarchical cache memory device where I holds,
If the capacity of the second cache cannot be made large enough, the effect of introducing the second cache cannot be expected so much, and therefore, the second cache had to have a sufficiently large capacity, but this also varies. There was a case that a sufficiently large second cache capacity could not be secured due to the restriction of.
【0020】本発明は、上記事情に鑑みてなされたもの
で、セカンド・キャッシュの容量を有効に利用でき、セ
カンド・キャッシュを導入した効果を実現することがで
きる階層キャッシュ・メモリ装置を提供することを目的
とする。The present invention has been made in view of the above circumstances, and provides a hierarchical cache memory device capable of effectively utilizing the capacity of the second cache and realizing the effect of introducing the second cache. With the goal.
【0021】[0021]
【課題を解決するための手段】本発明は、少なくとも1
台のプロセッサに対して少なくとも1台の第1のキャッ
シュを接続し、この第1のキャッシュを第1のバスに接
続するとともに、少なくとも1台の第2のキャッシュを
接続してクラスタを構成し、このクラスタを複数組み第
2のバスを介してメイン・メモリに接続するようにした
階層キャッシュ・メモリ装置であって、第2のキャッシ
ュは、該第2のキャッシュと直接に第1のバスを介して
接続されている第1のキャッシュに記憶されているデー
タに関するタグを記憶するタグ記憶手段、第1のキャッ
シュに格納されているデータのコピーを格納するデータ
記憶手段、タグ記憶手段のエントリに対応するデータが
前記データ記憶手段にエントリを確保しているか否かに
関する情報を記憶する存在記憶手段、データ記憶手段内
のエントリと存在記憶手段内のエントリの対応関係に関
する情報を記憶する対応記憶手段を具備し、第2のバス
からの要求に対し要求アドレスに対応するエントリが前
記タグ記憶手段に存在すると前記存在記憶手段により前
記第2のキャッシュ内にデータが存在するかを判定し該
データが存在すると前記対応記憶手段によりデータ記憶
手段のエントリを選択しそのデータを要求元に返すよう
に制御するようにしている。SUMMARY OF THE INVENTION The present invention comprises at least one
Connect at least one first cache to each processor, connect the first cache to the first bus, and connect at least one second cache to form a cluster, A hierarchical cache memory device in which a plurality of clusters are connected to a main memory via a second bus, wherein the second cache directly connects to the second cache via the first bus. Corresponding to an entry of tag storage means for storing a tag relating to the data stored in the first cache connected thereto, a data storage means for storing a copy of the data stored in the first cache, and an entry of the tag storage means Existence storage means for storing information regarding whether or not the data to be stored secures an entry in the data storage means, the entry and the existence in the data storage means Corresponding storage means for storing information on the correspondence relationship of the entries in the storage means is provided, and when the entry corresponding to the request address in response to the request from the second bus exists in the tag storage means, the existence storage means provides the first storage means. It is determined whether or not the data exists in the cache No. 2, and if the data exists, the corresponding storage means selects an entry in the data storage means and returns the data to the request source.
【0022】また、第2のバスからの無効化要求に対し
要求アドレスに対応するエントリがタグ記憶手段に存在
すると第1のキャッシュに無効化要求を発するとともに
前記タグ記憶手段のエントリを無効化するようにしてい
る。When an entry corresponding to the request address for the invalidation request from the second bus exists in the tag storage means, the invalidation request is issued to the first cache and the entry in the tag storage means is invalidated. I am trying.
【0023】また、第1のバスからの要求に対して存在
記憶手段により第2のキャッシュ内にデータがあるかを
判定しデータがあれば該データのリード・ライトを行う
ようにしている。Further, in response to a request from the first bus, the existence storage means determines whether or not there is data in the second cache, and if there is data, the data is read / written.
【0024】さらに、第1のバスからのコピーバック要
求に対して要求アドレスに対応するエントリが存在記憶
手段内に存在すると、対応記憶手段によってデータ記憶
手段内のエントリを選択しデータ更新を行い、エントリ
が存在しないとデータの一貫性を保証する置き換えアル
ゴリズムにより、データ記憶手段内のエントリを確保し
てからコピー・バックを行うか、あるいは、第2のバス
にまでコピー・バック要求を発するようにしている。Further, when an entry corresponding to the request address for the copy back request from the first bus exists in the existing storage means, the corresponding storage means selects the entry in the data storage means to update the data, A replacement algorithm that guarantees data consistency when no entry exists secures an entry in the data storage means before performing copy back, or issues a copy back request up to the second bus. ing.
【0025】[0025]
【作用】この結果、本発明によれば、第2のバスを介し
リード・シェアドまたはリード・モディファイド要求が
来た際には、要求されたアドレスに対応するエントリが
タグ記憶手段内に存在するか否かを判定する。タグが存
在する場合、存在記憶手段により第2のキャッシュ内に
データが存在するか否かを判定する。データが存在する
場合、対応記憶手段によりデータ記憶手段内のエントリ
を選択し、そのデータを要求元に返す。リード・モディ
ファイドでは、必要ならば第1のバスに無効化要求を発
する。データが存在しない場合、第1のバスに、リード
・シェアド要求を発する。一方、タグが存在しない場合
には、データは返さない。As a result, according to the present invention, when a read shared or read modified request is received via the second bus, is there an entry corresponding to the requested address in the tag storage means? Determine whether or not. When the tag exists, the existence storage unit determines whether or not the data exists in the second cache. If the data exists, the corresponding storage means selects an entry in the data storage means and returns the data to the request source. In read modified, an invalidation request is issued to the first bus if necessary. If there is no data, issue a read shared request to the first bus. On the other hand, if the tag does not exist, no data is returned.
【0026】また、第2のバスを介し無効化要求が来た
際には、要求されたアドレスに対応するエントリがタグ
記憶手段内に存在するか否かを判定する。タグが存在す
る場合、状態に応じて必要ならば第1のキャッシュに無
効化要求を発するとともに、タグ記憶手段のエントリも
無効化する。タグが存在しない場合には、プロセッサへ
の要求もタグ記憶手段のエントリの無効化も行わない。Further, when an invalidation request is received via the second bus, it is determined whether or not the entry corresponding to the requested address exists in the tag storage means. When the tag exists, the invalidation request is issued to the first cache and the entry of the tag storage means is also invalidated if necessary according to the state. If the tag does not exist, neither the request to the processor nor the invalidation of the entry in the tag storage means is performed.
【0027】さらに第1のバスを介しリード・シェアド
またはリード・モディファイド要求が来た際には、存在
記憶手段により第2のキャッシュ内にデータが存在する
か否かを判定する。データが存在する場合、データのリ
ードまたはライトを行う。リード・モディファイドで
は、必要ならば第2のバスに無効化要求を発する。デー
タが存在しない場合、データの一貫性を保証するアルゴ
リズムによりデータ記憶手段内にエントリを確保できる
と判定された場合にはエントリを確保するとともに、第
2のバスにリード・シェアドまたはリード・モディファ
イド要求を発する。Furthermore, when a read shared or read modified request is received via the first bus, the existence storage means determines whether or not data exists in the second cache. When the data exists, the data is read or written. In read modified, an invalidation request is issued to the second bus if necessary. If there is no data, and if it is determined by the algorithm that guarantees the consistency of the data that the entry can be secured in the data storage means, the entry is secured and the read shared or read modified request is made to the second bus. Emit.
【0028】さらに第1のバスを介しコピー・バック要
求が来た際には、要求されたアドレスに対応するエント
リが存在記憶手段内に存在するか否かを判定する。存在
する場合、対応記憶手段によってデータ記憶手段内のエ
ントリを選択し、データの更新を行う。一方、エントリ
が存在しない場合、データの一貫性を保証する置き換え
アルゴリズムに従い、データ記憶手段内のエントリを確
保してからコピー・バックを行うか、あるいは、第2の
バスにまでコピー・バック要求を発する。Further, when a copy back request is received via the first bus, it is determined whether or not the entry corresponding to the requested address exists in the existence storage means. If it exists, the corresponding storage means selects an entry in the data storage means to update the data. On the other hand, if there is no entry, a copy back request is made after the entry in the data storage means is secured before a copy back is made, or a copy back request is made to the second bus in accordance with a replacement algorithm that guarantees data consistency. Emit.
【0029】これらのことからセカンド・キャッシュの
メモリ容量を有効に利用することが可能となり、セカン
ド・キャッシュの容量が十分に確保できない場合でも、
セカンド・キャッシュを導入した効果を実現できるよう
になる。From these facts, the memory capacity of the second cache can be effectively used, and even when the capacity of the second cache cannot be secured sufficiently,
You will be able to realize the effect of introducing the second cache.
【0030】[0030]
【実施例】以下、本発明の一実施例を図面に従い説明す
る。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.
【0031】図1は同実施例に係わる階層キャッシュ・
メモリ装置の概略構成を示すものである。この場合、複
数のプロセッサ1にそれぞれファースト・キャッシュ2
を接続し、これらファースト・キャッシュ2をキャッシ
ュ・バス3に接続するとともに、新たなキャッシュとし
てセカンド・キャッシュ4を接続して一つのクラスタ5
を構成し、これらラスタ5を複数組み、新たなバスとし
てメモリ・バス6によりメイン・メモリ7に接続するよ
うに構成される。FIG. 1 shows a hierarchical cache according to the embodiment.
1 shows a schematic configuration of a memory device. In this case, each of the plurality of processors 1 has a first cache 2
And the first cache 2 is connected to the cache bus 3, and the second cache 4 is connected as a new cache to form one cluster 5
And a plurality of rasters 5 are combined and connected to the main memory 7 by a memory bus 6 as a new bus.
【0032】次に、図2はセカンド・キャッシュ4の概
略構成を示すものである。この場合、11はタグ・メモ
リ、12はデータ・メモリ、13は存在メモリ、14は
対応メモリ、15はキャッシュ・バス側のインタフェー
ス部、16はメモリ・バス側のインタフェース部、17
はキャッシュ・バス・コントローラ、18はメモリ・バ
ス・コントローラを示している。Next, FIG. 2 shows a schematic structure of the second cache 4. In this case, 11 is a tag memory, 12 is a data memory, 13 is an existing memory, 14 is a corresponding memory, 15 is an interface unit on the cache bus side, 16 is an interface unit on the memory bus side, 17
Is a cache bus controller, and 18 is a memory bus controller.
【0033】ここで、キャッシュ・バス・コントローラ
17はインタフェース部15のキャッシュ・バスからの
要求に対して応答するための制御と、キャッシュ・バス
に要求を発するための制御を行う。また、メモリ・バス
・コントローラ18は、インタフェース部16のメモリ
・バスからの要求に対して応答するための制御と、メモ
リ・バスに要求を発するための制御を行う。また、これ
らキャッシュ・バス・コントローラ17とメモリ・バス
・コントローラ18は、制御を行うためにタグ・メモリ
11や存在メモリ13、対応メモリ14にそれぞれ格納
されている情報を利用するようにしている。Here, the cache bus controller 17 performs control for responding to a request from the cache bus of the interface section 15 and control for issuing a request to the cache bus. The memory bus controller 18 also performs control for responding to a request from the memory bus of the interface unit 16 and control for issuing a request to the memory bus. Further, the cache bus controller 17 and the memory bus controller 18 use the information stored in the tag memory 11, the existing memory 13, and the corresponding memory 14 for control.
【0034】タグ・メモリ11は、メモリ・アドレスの
タグ部が格納され、そのエントリがどのアドレスのデー
タに対応するものであるかを表すようにしている。キャ
ッシュ・ヒット/ミスの判定は、このエントリの値と要
求に伴って送られてきたメモリ・アドレスのタグ部を比
較し、それらが一致するか否かにより行われる。The tag memory 11 stores a tag portion of a memory address and indicates which address the entry corresponds to. The determination of cache hit / miss is made by comparing the value of this entry with the tag portion of the memory address sent in response to the request, and checking if they match.
【0035】また、タグ・メモリ11は、そのキャッシ
ュ・ブロックの状態を表している。キャッシュ・ブロッ
クの状態の種類や数は、どのようなキャッシュ・プロト
コルを採用するかにより異なるが、一般にそのキャッシ
ュ・ブロックのデータが有効であるか否か、他のキャッ
シュ・メモリとデータを共有しているか否か等の情報を
表現している。本実施例で採用するキャッシュ・プロト
コルについては、後ほど詳述する。The tag memory 11 also represents the state of the cache block. The type and number of cache block states vary depending on the cache protocol used, but in general, whether the data in that cache block is valid or not is shared with other cache memory. It represents information such as whether it is present or not. The cache protocol used in this embodiment will be described later in detail.
【0036】さらに、タグ・メモリ11は、いずれの子
キャッシュ・メモリにこのキャッシュ・ブロックのデー
タが存在するかを表す情報(Uビット)を格納してい
る。セカンド・キャッシュがファースト・キャッシュの
状態に関する情報の一部を格納することによりキャッシ
ュ・バスのバス・トランザクションを軽減することを目
的としている。本実施例では、Uビットはエントリ当た
りNビットの領域を成し(Nはセカンド・キャッシュ当
たりの子キャッシュ・メモリ数)、各ビットはそれぞれ
子キャッシュ・メモリに対応している。例えば、セカン
ド・キャッシュ当たりの子キャッシュ・メモリ数N=4
(本発明の以下の説明ではN=4を例とする)で、ある
エントリのUビットの値が0101の場合、1桁目と3
桁目のビットに対応するファースト・キャッシュにこの
キャッシュ・ブロックのデータのコピーが存在するとい
う意味である。Further, the tag memory 11 stores information (U bit) indicating in which child cache memory the data of this cache block exists. The second cache is intended to mitigate bus transactions on the cache bus by storing some of the information about the state of the first cache. In this embodiment, the U bits form an area of N bits per entry (N is the number of child cache memories per second cache), and each bit corresponds to a child cache memory. For example, the number of child cache memories per second cache N = 4
(In the following description of the present invention, N = 4 is taken as an example), and if the value of the U bit of a certain entry is 0101, the first digit and 3
This means that there is a copy of the data of this cache block in the first cache corresponding to the bit of the digit.
【0037】存在メモリ13は、各エントリがタグ・メ
モリ11のエントリと固定的に1対1に対応している。
そのキャッシュ・ブロックがデータ・メモリ12内にエ
ントリを確保しているか否かに関する情報を格納してい
る。存在メモリ13のエントリが1ならば、そのキャッ
シュ・ブロックは次に述べる対応メモリ14のエントリ
の値によって指定されるデータ・メモリ内のエントリに
データのコピーを格納している。一方、存在メモリ13
のエントリの値が0ならば、そのキャッシュ・ブロック
はデータ・メモリ12内にエントリを確保していない。
本実施例では、セカンド・キャッシュにおける有効なキ
ャッシュ・ブロックには2通りあって、一つはアドレ
ス、・タグや状態とともにデータのコピーも格納されて
いるキャッシュ・ブロック、もう一つはアドレス・タグ
や状態は格納されているが、データのコピーが格納され
ていないキャッシュ・ブロックである。In the existing memory 13, each entry has a fixed one-to-one correspondence with the entry in the tag memory 11.
It stores information regarding whether or not the cache block reserves an entry in the data memory 12. If the entry in the resident memory 13 is one, the cache block stores a copy of the data in the entry in the data memory specified by the value of the entry in the corresponding memory 14 described below. On the other hand, the existence memory 13
If the value of the entry is 0, the cache block has not reserved the entry in the data memory 12.
In this embodiment, there are two valid cache blocks in the second cache, one is an address, a cache block in which a copy of data is stored together with a tag and a state, and the other is an address tag. A cache block in which a copy of the data is not stored, although the cache and the state are stored.
【0038】対応メモリ14は、各エントリがタグ・メ
モリ11のエントリと固定的に対応している。タグ・メ
モリ11のエントリがデータ・メモリ12内のどのエン
トリに対応するかに関する情報を格納している。ただ
し、先に述べた存在メモリ13のエントリの値が0の時
には、対応メモリ14のエントリの値は意味がない。In the correspondence memory 14, each entry fixedly corresponds to the entry in the tag memory 11. It stores information about which entry in the data memory 12 an entry in the tag memory 11 corresponds to. However, when the value of the entry of the existing memory 13 is 0, the value of the entry of the corresponding memory 14 is meaningless.
【0039】データ・メモリ12は従来のセカンド・キ
ャッシュにも存在したが、その場合タグ・メモリ11の
エントリとデータ・メモリ12のエントリは固定的には
1対1の対応があった。従って、このような対応メモリ
14に対応するものは必要がなかった。本実施例の特徴
は、タグ・メモリ11と存在メモリ13のエントリとデ
ータ・メモリ12のエントリが1対1には対応しておら
ず、しかも対応が固定的ではなく、後述するキャッシュ
・プロトコルに従い、動的に対応が変化するという点で
ある。The data memory 12 also existed in the conventional second cache, but in that case, the entry of the tag memory 11 and the entry of the data memory 12 had a fixed one-to-one correspondence. Therefore, there is no need for a memory corresponding to such a memory 14. The feature of the present embodiment is that the entries of the tag memory 11, the existing memory 13 and the entries of the data memory 12 do not correspond one-to-one, and the correspondence is not fixed, and according to the cache protocol described later. The point is that the correspondence changes dynamically.
【0040】対応メモリ14の実現方法としては、タグ
・メモリ11内の各エントリがデータ・メモリ12内の
いずれのエントリと対応を指定できるように実現しても
よいが、一般に、データ・メモリ12のエントリ数は多
いので、エントリの指定に必要な情報量も大きくなる。
よって、対応メモリ14はかなり大きな領域を必要とす
る。The corresponding memory 14 may be realized so that each entry in the tag memory 11 can specify a correspondence with any entry in the data memory 12, but generally, the data memory 12 is used. Since the number of entries in is large, the amount of information required to specify the entry is large.
Therefore, the corresponding memory 14 requires a considerably large area.
【0041】そこで、本実施例では、対応メモリ14の
エントリは、データ・メモリ12内のエントリの一部の
みを指定できるように実現する。セット・アソシアティ
ブ方式によるセカンド・キャッシュの実現を例にして説
明を行う。Therefore, in this embodiment, the entries in the corresponding memory 14 are realized so that only a part of the entries in the data memory 12 can be designated. The realization of the second cache by the set associative method will be described as an example.
【0042】図3は、タグ・メモリ11、データ・メモ
リ12、存在メモリ13、対応メモリ14の各エントリ
の対応を示すものである。この場合、タグ・メモリ1
1、存在メモリ13、対応メモリ14は8ウェイ・セッ
トアソシアティブ方式、データ・メモリ12は4ウェイ
・セットアソシアティブ方式を用い、ライン数はタグ・
メモリ11、存在メモリ13、対応メモリ14も同じと
した(図3に示されているのは1ライン分のエントリで
ある)。そして、セカンド・キャッシュにより、あるア
ドレスに対するアクセスが行われると、タグ・メモリ1
1、存在メモリ13、対応メモリ14は1ライン(8つ
のエントリ)が同時に読み出され、キャッシュ・ヒット
/ミスの判定は、要求対象アドレスのアドレス・タグ部
とタグ・メモリ11内に格納されているアドレス・タグ
の比較により行う。FIG. 3 shows the correspondence of each entry of the tag memory 11, the data memory 12, the existing memory 13, and the corresponding memory 14. In this case, tag memory 1
1, the existing memory 13 and the corresponding memory 14 use the 8-way set associative method, the data memory 12 uses the 4-way set associative method, and the number of lines is the tag
The same applies to the memory 11, the existing memory 13, and the corresponding memory 14 (the entry for one line is shown in FIG. 3). Then, when an address is accessed by the second cache, the tag memory 1
1, the existing memory 13, and the corresponding memory 14 read one line (8 entries) at the same time, and the cache hit / miss determination is stored in the address tag portion of the request target address and the tag memory 11. This is done by comparing the address tags that exist.
【0043】例えば、図3において、上から4番目のエ
ントリは、キャッシュ・ブロックがNONいう状態で、
Uビットが0101なので、1が立っているビットに対
応するファースト・キャッシュにデータのコピーが存在
する。さらに、このキャッシュ・ブロックは存在メモリ
13のエントリの値が1なので、セカンド・キャッュに
もデータを持っており、対応メモリ14のエントリによ
り指定されているデータ・メモリ12内のエントリにデ
ータが存在している。また、1番上のエントリは、キャ
ッシュ・ブロックがEXCという状態で、Uビットメモ
リのエントリの値0100は、あるひとつのファースト
・キャッシュにのみデータが存在することを表してい
る。存在メモリ13のエントリの値が0なのでこのデー
タはセカンド・キャッシュには存在しない。For example, in FIG. 3, the fourth entry from the top indicates that the cache block is NON,
Since the U bit is 0101, there is a copy of the data in the first cache corresponding to the bit for which 1 is set. Further, since the value of the entry in the existing memory 13 is 1 in this cache block, the cache block also has data, and the data exists in the entry in the data memory 12 designated by the entry in the corresponding memory 14. is doing. The entry at the top indicates that the cache block is EXC and the value 0100 of the entry of the U-bit memory indicates that data exists only in one certain first cache. Since the value of the entry in the existing memory 13 is 0, this data does not exist in the second cache.
【0044】以上に述べたように本実施例では、タグ・
メモリ11のエントリとデータ・メモリ12のエントリ
の対応が1対1ではないことで、しかも、従来例におい
てその対応が固定していたのに対して、本実施例では、
固定されておらず、その対応は、まず、存在メモリのエ
ントリの値によりデータ・メモリ12のいずれかのエン
トリに対応するか否かが決定され、その結果、対応する
場合には対応メモリ14のエントリの値により、データ
・メモリ12のどのエントリに対応するのかが決定され
る。As described above, in this embodiment, the tag
Since the correspondence between the entries of the memory 11 and the entries of the data memory 12 is not one-to-one, and the correspondence is fixed in the conventional example, in the present embodiment,
The correspondence is not fixed. First, the value of the entry of the existing memory determines whether or not it corresponds to any one of the entries in the data memory 12, and as a result, if it does, the correspondence memory 14 The value of the entry determines which entry in the data memory 12 it corresponds to.
【0045】次に、データの一貫性を保証するキャッシ
ュ・コンシステンシ・プロトコルについて説明する。Next, a cache consistency protocol that guarantees data consistency will be described.
【0046】この場合、比較のため、最初にBerke
ley方式の拡張によって得られる従来の階層キャッシ
ュプロトコルについて説明する。In this case, for comparison, Berke first
A conventional hierarchical cache protocol obtained by extending the ley method will be described.
【0047】図4は、ファースト・キャッシュのキャッ
シュ・ブロックの状態遷移図を示している。図面中のノ
ードはファースト・キャッシュにおけるキャッシュ・ブ
ロックの状態、エッジはファースト・キャッシュへの要
求を表している。また、要求の添字は、Pがプロセッサ
からの要求、Cがキャッシュ・バスの要求を表してい
る。各状態の意味は次の通りである。: INV:invalid、UNO:valid & u
nowned & shared、NON:valid
& owned & shared、EXC:val
id & owned & exclusive、ファ
ースト・キャッシュのキャッシュ・ブロックは、3種類
の属性を持っている。validity:そのキャッシ
ュ・ブロックのデータが有効であるか(valid)否
か(invalid)、exclusiveness:
他のキャッシュとデータを共有しているか(share
d)否か(exclusive)、ownershi
p:そのデータのオーナーシップを持つか(owne
d)否か(unowned)(P.A.Sweazey
and A.J.Smith,”A Class o
f Compatible Consistency
Protocols and Support by
the IEEE Futurebus,”Proc.
13th Int´l Symp.on Comput
er Architecture(1989),414
−423)。FIG. 4 shows a state transition diagram of the cache block of the first cache. The nodes in the drawing represent the states of cache blocks in the first cache, and the edges represent requests to the first cache. As for the subscript of the request, P represents a request from the processor and C represents a request of the cache bus. The meaning of each state is as follows. : INV: invalid, UNO: valid & u
known & shared, NON: valid
& Owned & shared, EXC: val
The cache blocks of id & owned & exclusive and the first cache have three types of attributes. validity: Whether the data of the cache block is valid (valid) or not (invalid), explicitness:
Is data shared with other caches (share
d) Whether or not (exclusive), ownershi
p: Do you have ownership of the data (owne
d) unowned (PA Swazey)
and A. J. Smith, "A Class o
f Compatible Consistency
Protocols and Support by
the IEEE Futurebus, "Proc.
13th Int'l Symp. on Comput
er Architecture (1989), 414.
-423).
【0048】ここで、ファースト・キャッシュのキャッ
シュ・ブロックがデータを共有しているとは、他のファ
ースト・キャッシュとデータを共有するか、あるいは、
他クラスタのセカンド・キャッシュとデータを共有する
ことを意味する。オーナーシップとは、そのキャッシュ
・ブロックが追い出される時、コピー・バックを行なう
必要があるか否かに関する属性で、オーナーシップを持
つキャッシュ・ブロックは追い出されるとコピー・バッ
クされなければならない。Here, the fact that the cache block of the first cache shares the data means that the data is shared with another first cache, or
It means sharing data with the second cache of another cluster. Ownership is an attribute relating to whether or not copy back needs to be performed when the cache block is evicted, and a cache block having ownership must be copied back when evicted.
【0049】ファースト・キャッシュは、プロセッサと
キャッシュ・バスの両方から要求を受ける。プロセッサ
からの要求は、リード(Readp )とライト(Wri
tep )がある(もちろん、一般には、これ以外の要求
やリードやライトにも複数の種類があるが、本発明の主
旨に影響を与えるものではないので、省略する)。ま
た、キャッシュ・バスの要求としては: REO:ファースト・キャッシュからのリード・モディ
ファイド要求。 RSH:ファースト・キャッシュからのリード・シェア
ド要求。 FAI:セカンド・キャッシュからのリード・モディフ
ァイド要求。 FWI:セカンド・キャッシュからのリード・シェアド
要求。 WFI:無効化要求。 WWI:コピー・バック要求。 がある。The fast cache receives requests from both the processor and the cache bus. Requests from the processor are read (Read p ) and write (Wri).
te p ) (Of course, in general, there are a plurality of types of requests, reads, and writes other than these, but since they do not affect the gist of the present invention, they are omitted). The cache bus requests are: REO: Read modified request from the first cache. RSH: Read shared request from first cache. FAI: Read modified request from second cache. FWI: Read shared request from second cache. WFI: Invalidation request. WWI: Copy back request. There is.
【0050】次に、図5は、セカンド、キャッシュのキ
ャッシュ・ブロックの状態遷移図を示している。図面中
のノードは、セカンド・キャッシュにおけるキャッシュ
・ブロックの状態、エッジはセカンド・キャッシュへの
要求を表している。また、要求の添字は、Cがキャッシ
ュ・バスの要求、Mがメモリ・バスの要求を表してい
る。各状態の意味は次の通りである: INV:invalid、UNO:valid & c
−unowned & c−shared、NON:v
alid & c−owned & c−share
d、EXC:vaild & c−owned & c
−exclusive、ここで、状態を区別するために
用いている属性は、validity、c−exclu
siveness、c−ownershipの3つであ
る。validityはそのデータが有効であるか(v
alid)否か(invalid)、c−exclus
ivenessは、そのクラスタがそのデータを他のク
ラスタと共有しているか(c−shared)否か(c
−exclusive)、c−ownershipはク
ラスタ内のファースト・キャッシュのいずれかが最新の
データを持っており、コピー・バックの必要があるか
(c−unowned)否か(c−owned)である
(村谷博文、”拡張MOESIモデルと並列階層キャッ
シュ・プロトコル、”情報処理学会計算機アーキテクチ
ャ研究会報告89−23(1991),169−17
6.)。Next, FIG. 5 shows a state transition diagram of cache blocks of the second and cache. The nodes in the drawing represent the states of cache blocks in the second cache, and the edges represent requests to the second cache. As for the subscript of the request, C represents the request for the cache bus and M represents the request for the memory bus. The meaning of each state is as follows: INV: invalid, UNO: valid & c.
-Unowned & c-shared, NON: v
alid & c-owned & c-share
d, EXC: vaild & c-owned & c
-Exclusive, where the attributes used to distinguish the states are validity and c-exclu
There are three types: seveness and c-ownership. Whether the data is valid is valid (v
alid) Whether or not (invalid), c-exclus
The event is whether the cluster shares the data with other clusters (c-shared) or not (c
-Exclusive) and c-ownership indicate whether any of the first caches in the cluster has the latest data and whether copy back is necessary (c-owned) or not (c-owned) (Muratani). Hirofumi, "Extended MOESI Model and Parallel Hierarchical Cache Protocol," IPSJ Computer Architecture Research Group Report 89-23 (1991), 169-17
6. ).
【0051】セカンド・キャッシュは、キャッシュ・バ
スとメモリ・バスの両方から要求を受ける。キャッシュ
・バスからの要求はファースト・キャッシュの場合と同
じである。メモリ・バスからの要求としては: REO:リード・モディファイド要求。 RSH:リード・シェアド要求。 WFI:無効化要求。 WWI:コピー・バック要求。 がある。そして、これらの要求に対するセカンド・キャ
ッシュの応答は、図6および図7に示すようになる。
(以下、図中では、キャッシュ・バス、メモリ・バスを
それぞれCB、MBと略記する。また、ubit、eb
itはそれぞれUビットの値、存在メモリのエントリ値
を表す。)一方、本実施例おけるコンシステンシ・プロ
トコルでは、キャッシュ・ブロックの状態、バス要求の
種類は従来例と同じで、バス要求に対するセカンド・キ
ャッシュの応答が異なる。The second cache receives requests from both the cache bus and the memory bus. The request from the cache bus is the same as for the first cache. Requests from the memory bus are: REO: Read Modified Request. RSH: Read / Shared request. WFI: Invalidation request. WWI: Copy back request. There is. Then, the responses of the second cache to these requests are as shown in FIGS. 6 and 7.
(Hereinafter, the cache bus and the memory bus are abbreviated as CB and MB respectively in the drawings. Also, ubit and eb
It represents the value of the U bit and the entry value of the existing memory. On the other hand, in the consistency protocol according to the present embodiment, the state of the cache block and the type of bus request are the same as in the conventional example, but the response of the second cache to the bus request is different.
【0052】図8と図9および図10と図11に、それ
ぞれキャッシュ・バス、メモリ・バスからの要求に対す
る応答を示している。FIGS. 8 and 9 and FIGS. 10 and 11 show responses to requests from the cache bus and memory bus, respectively.
【0053】そして、上述した従来例における応答を示
す図6および図7と比較すると、メモリ・バスからの要
求に対する応答には同じであるが、キャッシュ・バスか
らの要求に対する応答にはいくつかの差異があり、具体
的には以下述べるような場合である。Comparing with FIGS. 6 and 7 showing the response in the above-mentioned conventional example, the response to the request from the memory bus is the same, but there are some responses to the request from the cache bus. There are differences, and more specifically, the cases described below.
【0054】・RSHc がUNOにヒットした場合。When RSH c hits UNO.
【0055】・WWIc がEXCにヒットした場合。When WWI c hits EXC.
【0056】いずれの場合も存在ビットの値を判定し
て、その判定結果により異なる応答を行なうようにな
る。In any case, the value of the existing bit is judged and a different response is made depending on the judgment result.
【0057】ここで、データ・エントリを確保していな
いキャッシュ・ブロックに対する制約として、従来例の
キャッシュ・プロトコルでは、キャッシュ・ブロックが
データ・エントリを持っていなくとも、子キャッシュ・
メモリのいずれかにそのデータが存在すればよいと考え
られる場合がある: (1)メモリ・バスの要求に応じ、キャッシュ・バスに
要求を出さなければならない。Here, as a restriction on a cache block that does not reserve a data entry, in the conventional cache protocol, even if the cache block does not have a data entry, the child cache
It may be considered that the data may reside in any of the memories: (1) In response to a request of the memory bus, a request must be issued to the cache bus.
【0058】(2)キャッシュ・バスの要求に応じ、メ
モリ・バスに要求を出さなければならない。(2) A request must be issued to the memory bus in response to a request from the cache bus.
【0059】これらの状況では、セカンド・キャッシュ
はそのタグ・メモリのエントリの値により要求の送出を
行うか否か判定行なうのであって、データ・メモリを参
照する必要はない。In these situations, the second cache determines whether or not to send the request according to the value of the entry of the tag memory, and it is not necessary to refer to the data memory.
【0060】また、NON状態のキャッシュブロックが
データエントリを持っている方が良い理由は、どのよう
な状態に対してもデータ・エントリを持たないキャッシ
ュ・ブロックを許すキャッシュ・プロトコルも実現可能
であるが、プロトコルが複雑になるとともに、キャッシ
ュ・ブロックの置き換えアルゴリズムも複雑になり、コ
ピー・バック時のバス・トランザクションが著しく増加
する可能性があるからである。The reason why it is better for the cache block in the NON state to have a data entry is that a cache protocol that allows a cache block having no data entry in any state can be realized. However, as the protocol becomes more complicated, the cache block replacement algorithm becomes more complicated, and bus transactions during copy back may increase significantly.
【0061】本実施例では、データ・エントリを持たな
いキャッシュ・ブロックとして許される状態に制約を課
している。また、NON状態のキャッシュ・ブロックの
データは、追い出されるとコピー・バックされなければ
ならない。NON状態のキャッシュ・ブロックは、Uビ
ットが0000の場合、データ・エントリを持っていな
ければならない。一方、Uビットが0000でない場
合、データ・エントリが存在する必要性はない。子キャ
ッシュ・メモリのいずれかにデータが存在するからであ
る。In this embodiment, restrictions are imposed on the state permitted as a cache block having no data entry. Also, the data in a cache block in the NON state must be copied back when it is evicted. A cache block in the NON state must have a data entry if the U bit is 0000. On the other hand, if the U bit is not 0000, then there is no need for a data entry to exist. This is because the data exists in any of the child cache memories.
【0062】そして、図12に示すような状態遷移則に
従うセカンド・キャッシュにより一貫性は保証できるよ
うに見えるが、次のような状況でデータを失ってしまい
一貫性の保証が難しくなる。図12中でキャッシュ・ブ
ロックの状態を表す記号の意味は、例えばUNOを
(0,1)とはUNO状態でUビットは0000、存在
ビットは1を表している。Then, it seems that the consistency can be guaranteed by the second cache according to the state transition rule as shown in FIG. 12, but the data is lost in the following situations and it becomes difficult to guarantee the consistency. In FIG. 12, the meaning of the symbol indicating the state of the cache block is, for example, that UNO is (0, 1) in the UNO state, the U bit is 0000, and the existence bit is 1.
【0063】Uビットが0010で、データ・エントリ
を持たないキャッシュ・ブロックが存在したとする。こ
のキャッシュ・ブロックのデータが子キャッシュ・メモ
リでキャッシュ・ミスにより追い出されるとする。その
子キャッシュ・メモリにおけるキャッシュ・ブロックの
状態はUNOであるので、コピー・バックは行われな
い。従って、Uビットは0000で、クラスタ内には、
子キャッシュ・メモリにもセカンド・キャッシュにもデ
ータは存在しない。It is assumed that the U bit is 0010 and there is a cache block having no data entry. It is assumed that the data in this cache block is evicted in the child cache memory due to a cache miss. No copy back is performed because the cache block state in its child cache memory is UNO. Therefore, the U bit is 0000, and in the cluster,
There is no data in the child cache memory or the second cache.
【0064】これを回避するには、ファースト・キャッ
シュにおいてUNO状態のキャッシュ・ブロックが追い
出される場合、必ずコピーバックを行うか、あるいは、
他の子キャッシュ・メモリ内にデータ内にデータのコピ
ーが存在するか否かを判定し、データのコピーが存在し
ない場合にコピーバックを行うことが考えられる。いず
れもバス・トランザクションの頻度を増加させる恐れが
あり好ましくない。In order to avoid this, when the cache block in the UNO state is evicted in the first cache, the copy back is always performed, or
It is conceivable to judge whether or not there is a copy of the data in the data in another child cache memory, and to copy back if the copy of the data does not exist. Both are not preferable because they may increase the frequency of bus transactions.
【0065】同様の検討を他の状態に対しても行う。図
13は、状態、Uビット、存在ビットの組み合わせで問
題が生じる可能性のあるものを表している。Similar examination is performed for other states. FIG. 13 shows combinations of states, U bits, and presence bits that may cause problems.
【0066】UNO状態でUビット=0000、存在ビ
ット=0の場合、クラスタ内にはデータが存在しない
が、タグ・メモリのエントリは存在する。データの一貫
性を保つ上で問題はないが、タグ・エントリを無駄に使
用している。無駄なトランザクションを生じさせる可能
性もある。When the U bit is 0000 and the existence bit is 0 in the UNO state, there is no data in the cluster, but the tag memory entry exists. It's okay to keep the data consistent, but it wastes tag entries. It can also result in wasted transactions.
【0067】NON状態でUビット=0000、存在ビ
ット=0の場合、コピー・バックすべきデータを喪失す
ることになるので、この状態は禁止されるべきである。If the U bit = 0000 and the existence bit = 0 in the NON state, the data to be copied back will be lost, so this state should be prohibited.
【0068】EXC状態でUビット=0000、存在ビ
ット=0の場合、コピー・バックすべきデータが喪失す
るので禁止されるべきである。EXC状態でUビット=
0000、存在ビット=0の場合には、ファースト・キ
ャッシュからセカンド・キャッシュへコピー・バックす
べきデータが喪失したことになるので禁止されるべきで
ある。When the U bit is 0000 and the existence bit is 0 in the EXC state, the data to be copied back is lost and should be prohibited. U bit in EXC state =
If 0000 and the existence bit = 0, it means that the data to be copied back from the first cache to the second cache has been lost and should be prohibited.
【0069】本実施例では、以上の考察により、NON
状態のキャッシュ・ブロックは必ずデータ・エントリを
持つように制約を課す。この制約を実現する2つの方法
がある: (1)EXCからのNONに遷移する時、データ・エン
トリを確保する。In the present embodiment, based on the above consideration, NON
State cache blocks are constrained to always have a data entry. There are two ways to implement this constraint: (1) Reserve a data entry when transitioning from EXC to NON.
【0070】(2)EXCに遷移する時、データ・エン
トリを確保する。(2) Reserve a data entry when transitioning to EXC.
【0071】ここで、(C1)は“キャッシュ・ブロッ
クはNON状態ならば、データ・エントリを持つ”とい
う意味である。一方、(C2)は“キャッシュ・ブロッ
クはオーナーシップを持つならば、データ・エントリを
持つ”という意味である。プロトコルの複雑さを厭わな
ければ、これら以外の制約も可能である。 (キャッシュ・ブロックの置き換えアルゴリズム)セカ
ンド・キャッシュにおいてキャッシュ・ブロックの置き
換えが必要な場合は、: (A)置き換えの候補となるタグ・メモリのエントリが
すべて使われているとき、(B)置き換えの候補となる
データ・メモリのエントリがすべて使われている。 タ
グ・メモリのエントリに関してはMLIが成り立つ。タ
グ・メモリのエントリでUビットが0000でないエン
トリの数は、最大、子キャッシュ・メモリ内のセカンド
・キャッシュの同一ラインにマップされるエントリ数で
あるが、セカンド・キャッシュは1ライン内にその数以
上のタグ・エントリを持つことが保証されている。従っ
て、(A)の状況では、タグ・メモリのエントリの置き
換えは従来例のキャッシュ・ブロックの置き換えアルゴ
リズムに従って行えばよい。例えば、(1)INV状態
のエントリの中から選択する。(2)INV状態のエン
トリが存在しなければ、Uビットが0000のエントリ
を選択する。(3)Uビットが0000のエントリが存
在しなければ、要求元のファースト・キャッシュが使用
しているエントリを選択する。Here, (C1) means "if the cache block is in the NON state, it has a data entry". On the other hand, (C2) means "if the cache block has ownership, it has a data entry". Other restrictions are possible as long as the protocol complexity is acceptable. (Cache block replacement algorithm) When a cache block needs to be replaced in the second cache: (A) When all tag memory entries that are candidates for replacement are used, (B) All candidate data memory entries have been used. MLI holds for tag memory entries. The number of entries in the tag memory whose U bit is not 0000 is the maximum number of entries that are mapped to the same line of the second cache in the child cache memory, but the number of entries in the second cache is in one line. It is guaranteed to have the above tag entries. Therefore, in the situation of (A), the replacement of the tag memory entry may be performed according to the conventional cache block replacement algorithm. For example, (1) selecting from the entries in the INV state. (2) If there is no entry in the INV state, select the entry whose U bit is 0000. (3) If there is no entry in which the U bit is 0000, the entry used by the requesting first cache is selected.
【0072】(B)の状況では、既に使用されているデ
ータ・エントリの一つを選択し、データ・エントリの確
保を行わなければならない。データ・エントリ置き換え
アルゴズムは先に述べたふたつの制約の(C1)と(C
2)のいずれを採用するかで異なってくる。制約(C
1)を採用する場合には、次のエントリを選択する。In the situation of (B), one of the already used data entries must be selected to secure the data entry. The data entry replacement algorithm is based on the two constraints (C1) and (C
It depends on which of 2) is adopted. Constraint (C
When 1) is adopted, the next entry is selected.
【0073】(1)どのタグ・エントリからも確保され
ていないデータ・エントリ、(2)UNO状態のタグ・
エントリから確保されているデータ・エントリ、(3)
EXC状態のタグ・エントリから確保されているデータ
・エントリ。(1) Data entry not secured from any tag entry, (2) Tag in the UNO state
Data entry reserved from entry, (3)
A data entry reserved from a tag entry in the EXC state.
【0074】データ・エントリの置き換えアルゴリズム
によりデータ・エントリを奪われるキャッシュ・ブロッ
クは存在ビットを0にする。A cache block whose data entry is robbed by the data entry replacement algorithm sets the existence bit to 0.
【0075】以上で必ずデータ・エントリが確保できる
ことが保証されているわけではない。例えば、データ・
エントリがすべてNON状態のタグ・エントリにより確
保されている場合には上のアルゴリズムではデータ・エ
ントリのみの置き換えでは済まず、タグ・メモリのエン
トリの置き換えを行う。As described above, it is not always guaranteed that the data entry can be secured. For example, data
When all the entries are secured by the tag entries in the NON state, the above algorithm does not need to replace only the data entry, but the entry in the tag memory is replaced.
【0076】制約(C2)を採用する場合には、上の
(3)のデータ・エントリは選択されない。データ・エ
ントリのすべてがNON状態あるいはEXC状態のタグ
・エントリにより確保されている場合にはタグ・メモリ
のエントリの置き換えが必要になる。When the constraint (C2) is adopted, the data entry of (3) above is not selected. When all the data entries are secured by the tag entries in the NON state or the EXC state, the entry in the tag memory needs to be replaced.
【0077】先に示した図8と図9のキャッシュ・プロ
トコルは制約(C1)によるものである。図14はセカ
ンド・キャッシュのキャッシュ・ブロックの状態遷移図
である。本実施例では、NON状態のキャッシュ・ブロ
ックは必ずデータ・エントリを持つことが保証されてい
る。従来例との違いは、次の点である: (1)RSHC がUNOにヒットした場合、存在メモリ
のエントリを判定し、0ならばRFOM を発して、他の
セカンド・キャッシュあるいはメイン・メモリからデー
タを持ってくる。The cache protocols of FIGS. 8 and 9 shown above are due to the constraint (C1). FIG. 14 is a state transition diagram of cache blocks in the second cache. In this embodiment, a cache block in the NON state is guaranteed to always have a data entry. The difference from the conventional example in the following points: (1) If the RSH C hits the UNO, to determine the presence memory entry, emit 0, RFO M, or main other second cache Get data from memory.
【0078】(2)WWIC がEXCにヒットした場
合、存在メモリのエントリを判定し、0ならば上の置き
換えアルゴリズムに従ってデータ・エントリを確保し、
そこへコピー・バックされたデータを格納する。データ
・エントリの確保をせずに、コピー・バックされたデー
タをそのままメイン・メモリまでコピー・バックする方
法も可能である。(2) When WWI C hits EXC, the entry in the existing memory is determined, and if 0, the data entry is secured according to the above replacement algorithm,
Store the copied back data there. It is also possible to copy back the copied data to the main memory as it is without securing the data entry.
【0079】(3)RSHM がEXCにヒットした場
合、存在メモリのエントリの値を判定し、0ならばデー
タ・エントリを確保してそこにファースト・キャッシュ
からの最新のデータを格納する。1ならば既に確保して
いるデータ・エントリに最新データを格納する。(3) When RSH M hits EXC, the value of the entry in the existing memory is determined, and if 0, the data entry is secured and the latest data from the first cache is stored therein. If 1, the latest data is stored in the already secured data entry.
【0080】(4)RSHM あるいはRFOM がミスし
た場合、他のクラスタあるいはメイン・メモリからデー
タのコピーを得た後、データ・エントリに空きがあるな
らばデータ・エントリを確保しデータを格納してから、
ファースト・キャッシュにデータを返す。(もし、デー
タ・エントリが確保できないならば置き換えアルゴリズ
ムに従い、必ずデータ・エントリを確保する方法も可能
である。) (5)存在ビット=1のEXCあるいはUNOのキャッ
シュ・ブロックは、置き換えアルゴリズムによって選択
されると、そのデータ・エントリを解放し、存在ビット
=0に遷移する。(4) When RSH M or RFO M misses, after obtaining a copy of data from another cluster or main memory, if there is a free data entry, secure the data entry and store the data. after,
Returns data to first cache. (If the data entry cannot be secured, it is possible to always secure the data entry according to the replacement algorithm.) (5) The EXC or UNO cache block with the existence bit = 1 is selected by the replacement algorithm. Then, the data entry is released and the existence bit = 0 is set.
【0081】(6)存在ビット=0のUNOのキャッシ
ュ・ブロックは、そのクラスタ内のすべてのファースト
・キャッシュから追い出されると(Uビット=0に遷移
する際には)、INVに遷移する。(6) The cache block of the UNO having the existence bit = 0 transits to INV when it is evicted from all the first caches in the cluster (when transiting to U bit = 0).
【0082】次に、(C2)の方法によるキャッシュ・
プロトコルについて説明する。セカンド・キャッシュの
要求に対する応答を図10と図11に示す。図10は、
キャッシュ・バスの要求に対する応答を表す図である。
図11は、メモリ・バスからの要求に対する応答を表す
図である。Next, the cache by the method (C2)
Describe the protocol. The response to the second cache request is shown in FIGS. Figure 10
FIG. 6 is a diagram showing a response to a request of a cache bus.
FIG. 11 is a diagram showing a response to a request from the memory bus.
【0083】また、図15はセカンド・キャッシュのキ
ャッシュ・ブロックの状態遷移図である。本実施例で
は、NON状態とEXC状態のキャッシュ・ブロックは
必ずデータ・エントリを持つことが保証されている。従
来例との違いは次の点である: (1)RSHC がUNOにヒットした場合、存在メモリ
のエントリを判定し、0ならばRFOM を発して、他の
セカンド・キャッシュあるいはメイン・メモリからデー
タを持ってくる。FIG. 15 is a state transition diagram of cache blocks in the second cache. In this embodiment, the cache blocks in the NON state and the EXC state are guaranteed to have data entries. The difference between the conventional example in the following points: (1) If the RSH C hits the UNO, to determine the presence memory entry, emit 0, RFO M, other second cache or main memory Bring data from.
【0084】(2)RFOC またはWFIC がUNOに
ヒットした場合、他のクラスタあるいはメイン・メモリ
からデータを得た後、存在メモリのエントリを判定し、
0ならば上の置き換えアルゴリズムに従ってデータ・エ
ントリを確保しそこへデータを格納するとともにファー
スト・キャッシュにデータを返す。(2) When RFO C or WFI C hits UNO, after obtaining data from another cluster or main memory, the entry in the existing memory is determined,
If it is 0, the data entry is secured according to the above replacement algorithm, the data is stored therein, and the data is returned to the first cache.
【0085】(3)RSHM がミスした場合、他のクラ
スタあるいはメイン・メモリからデータのコピーを得た
後、データ・エントリに空きがあるならばデータ・エン
トリを確保しデータを格納してから、ファースト・キャ
ッシュにデータを返す。(もし、データ・エントリが確
保できないならば置き換えアルゴリズムに従い、必ずデ
ータ・エントリを確保する方法も可能である。) (4)存在ビット=1のUNOのキャッシュ・ブロック
は置き換えアルゴリズムによって選択されると、そのデ
ータ・エントリを解放し、存在ビット=0に遷移する。(3) If RSH M misses, after obtaining a copy of data from another cluster or main memory, if there is a free data entry, secure the data entry and store the data , Return data to first cache. (If a data entry cannot be secured, a method of always securing a data entry according to the replacement algorithm is also possible.) (4) When a cache block of UNO having an existence bit = 1 is selected by the replacement algorithm , Release the data entry and transition to presence bit = 0.
【0086】(5)存在ビット=0のUNOキャッシュ
・ブロックは、そのクラスタ内のすべてのファースト・
キャッシュから追い出されると(Uビット=0に遷移す
る際には)、INVに遷移する。(5) A UNO cache block whose existence bit = 0 is set to all first caches in the cluster.
When it is evicted from the cache (when transitioning to U bit = 0), it transits to INV.
【0087】次に、本発明のセカンド・キャッシュによ
り期待される効果を説明する。Next, the effect expected by the second cache of the present invention will be described.
【0088】図16、図17は、従来例においてセカン
ド・キャッシュの容量が十分でないとき、メモリ・バス
に頻発するトランザクションの例を表している。アドレ
スA1とA2は同じキャッシュ・ラインにマップされる
とする。FIG. 16 and FIG. 17 show examples of transactions frequently occurring in the memory bus when the capacity of the second cache is not sufficient in the conventional example. Addresses A1 and A2 are assumed to map to the same cache line.
【0089】図16(a):プロセッサP1からファー
スト・キャッシュF1へアドレスA1へのリードを行い
キャッシュ・ミスし、必要ならばアドレスA2のデータ
のコピー・バックの後、セカンド・キャッシュS1へR
SHが発せられた。FIG. 16A: A read from the processor P1 to the first cache F1 to the address A1 is performed, a cache miss occurs, and if necessary, after copying back the data of the address A2, the R is transferred to the second cache S1.
SH was emitted.
【0090】図16(b):セカンド・キャッシュS1
において要求されたアドレスに対応するラインのエント
リはすべて他のアドレスのデータで占められており、キ
ャッシュ・ミスした。セカンド・キャッシュS1は、子
キャッシュ・メモリにデータが存在しないアドレスA2
のキャッシュ・ブロックを選び、必要ならばそのデータ
をメイン・メモリにコピー・バックした後、アドレスA
1へのRSH要求をメモリ・バスに発する。FIG. 16B: Second cache S1
The entry of the line corresponding to the requested address is occupied by the data of other addresses, and a cache miss occurs. The second cache S1 has an address A2 where data does not exist in the child cache memory.
Select the cache block of the memory, copy the data back to the main memory if necessary, and then
Issue an RSH request to 1 on the memory bus.
【0091】図16(c):返されたデータを選んだキ
ャッシュ・ブロックに格納するとともにファースト・キ
ャッシュF1にデータを返している。FIG. 16C: The returned data is stored in the selected cache block and the data is returned to the first cache F1.
【0092】図16(d):ファースト・キャッシュF
1は返されたデータを格納するとともにデータをプロセ
ッサに返す。FIG. 16D: First cache F
1 stores the returned data and returns the data to the processor.
【0093】図16(e):再び、アドレスA2へのア
クセスが発生し、ファースト・キャッシュでキャッシュ
・ミスする。FIG. 16 (e): The address A2 is accessed again, and a cache miss occurs in the first cache.
【0094】図16(f):すでにセカンド・キャッシ
ュにはアドレスA2のデータを格納するキャッシュ・ブ
ロックが存在しない。FIG. 16 (f): The second cache does not already have a cache block for storing the data of the address A2.
【0095】図17(a):メモリ・バスにまでデータ
のリード要求を発しなければならない。これは、セカン
ド・キャッシュの容量が十分でないために、アドレスA
1とアドレスA2のデータのコピーの両方を格納できな
かったためである。FIG. 17A: A data read request must be issued to the memory bus. This is because the second cache does not have enough capacity, so address A
This is because both 1 and the copy of the data at the address A2 could not be stored.
【0096】図17(b):セカンド・キャッシュS1
は返されたアドレスA2のデータを格納するとともに、
ファースト・キャッシュF1にデータを返す。FIG. 17B: Second cache S1
Stores the returned data of address A2 and
The data is returned to the first cache F1.
【0097】図17(c):ファースト・キャッシュF
1は、返されたデータ格納しプロセッサP1にデータを
返す。FIG. 17C: First cache F
1 stores the returned data and returns the data to the processor P1.
【0098】MLIが成り立たない階層キャッシュ・メ
モリによりセカンド・キャッシュのメモリ容量を有効に
利用することが考えられる。次の例では、MLIが成り
立たない場合の方が有利に思える。It is conceivable to effectively use the memory capacity of the second cache by the hierarchical cache memory in which the MLI does not hold. In the following example, it seems more advantageous if the MLI does not hold.
【0099】図18(a):プロセッサP1がアドレス
A1のデータに対してアクセスを行い、ファースト・キ
ャッシュF1でキャッシュ・ミスし、セカンド・キャッ
シュS1までリード要求が発せられた。ところが、セカ
ンド・キャッシュS1にはアドレスA1のデータが存在
せず、しかも、どのエントリもすでに他のアドレスのデ
ータで占められていた。FIG. 18A: The processor P1 accesses the data at the address A1, a cache miss occurs in the first cache F1, and a read request is issued up to the second cache S1. However, the data of the address A1 does not exist in the second cache S1, and each entry is already occupied by the data of another address.
【0100】図18(b):セカンド・キャッシュS1
はアドレスA3のデータが格納されているエントリにア
ドレスA1のデータを格納する決定をして、メモリ・バ
スに対してアドレスA1のデータのリードを要求する要
求を発した。FIG. 18B: Second cache S1
Decides to store the data of address A1 in the entry in which the data of address A3 is stored, and issues a request to the memory bus to read the data of address A1.
【0101】図18(c):セカンド・キャッシュS1
はアドレスA1のデータを格納するとともにファースト
・キャッシュF1にデータを返している。FIG. 18C: Second cache S1
Stores the data at address A1 and returns the data to the first cache F1.
【0102】図18(d):データを返されたがファー
スト・キャッシュF1はデータを格納するとともにプロ
セッサP1にデータを返している。FIG. 18D: Although the data is returned, the first cache F1 stores the data and returns the data to the processor P1.
【0103】しかし、MLIが成り立たない場合には、
次のような状況でトランザクションを増加させシステム
性能を低下させ望む効果は得られない。However, when MLI does not hold,
In the following situations, transactions are increased and system performance is degraded, and desired effects cannot be obtained.
【0104】図19(a):他のセカンド・キャッシュ
からメモリ・バスを介して、あるセカンド・キャッシュ
S1に対してあるアドレスA0のデータの無効化の要求
が発せられ、セカンド・キャッシュS1にはそのデータ
のキャッシュ・ブロックが存在しなかった。FIG. 19 (a): Another second cache issues a request to invalidate the data at the address A0 to the second cache S1 via the memory bus, and the second cache S1 issues a request to the second cache S1. There was no cache block for that data.
【0105】図19(b):MLIが成り立たないの
で、セカンド・キャッシュS1は、無効化の対象となっ
ているデータがクラスタ内のファースト・キャッシュに
存在する否かに関する情報を持たないので、キャッシュ
・バスに無効化の要求を発した。FIG. 19B: Since the MLI is not established, the second cache S1 does not have information on whether or not the data to be invalidated exists in the first cache in the cluster. -A request for invalidation was issued to the bus.
【0106】図19(c):いずれの子キャッシュ・メ
モリもアドレスA0のデータを格納しておらず、そのま
ま応答がセカンド・キャッシュS1に対して返される。FIG. 19C: None of the child cache memories stores the data of address A0, and the response is returned to the second cache S1 as it is.
【0107】図19(d):すべての子キャッシュ・メ
モリから応答を受け取ったセカンド・キャッシュS1は
メモリ・バスに対して応答を送出する。FIG. 19 (d): The second cache S1 which has received the responses from all the child cache memories sends the responses to the memory bus.
【0108】このように、どの子キャッシュ・メモリも
データを持っていない場合、トランザクションは無駄に
なる。無効化だけではなくリード・モディファイド要求
の場合にも同様の状況が発生する。MLIが成り立つ場
合にはこの無駄トランザクションは発生しなかった。Thus, if no child cache memory has data, the transaction is wasted. A similar situation occurs not only for invalidation but also for read modified requests. This waste transaction did not occur when the MLI holds.
【0109】MLIが成り立たない場合、コピー・バッ
クの際にも無駄なトランザクションが発生するが、これ
は次のような例が該当する。When the MLI does not hold, useless transactions occur during copy back, but the following examples correspond to this.
【0110】図20(a):プロセッサP1からファー
スト・キャッシュF1へリードまたはライトのアクセス
を行った際に、ファースト・キャッシュF1はアクセス
の対象となっているアドレスのデータを持たずキャッシ
ュ・ミスを発生し、しかもアドレスA0のデータをコピ
ー・バックする必要が生じた。FIG. 20A: When a read or write access is made from the processor P1 to the first cache F1, the first cache F1 does not have the data of the address to be accessed and a cache miss occurs. However, the data at the address A0 needs to be copied back.
【0111】図20(b):ファースト・キャッシュF
1からセカンド・キャッシュS1へアドレスA0のデー
タがコピー・バックされたところ、セカンド・キャッシ
ュS1には、そのデータを格納するキャッシュ・ブロッ
クが存在しなかった。FIG. 20 (b): First cache F
When the data at the address A0 was copied back from 1 to the second cache S1, the cache block for storing the data did not exist in the second cache S1.
【0112】図20(c):セカンド・キャッシュS1
は、コピー・バックされたアドレスA0のデータをその
ままメイン・メモリにコピー・バックするためにメモリ
・バスに要求を発したところを表している。FIG. 20C: Second cache S1
Indicates that a request is issued to the memory bus in order to copy back the copied back data of the address A0 to the main memory as it is.
【0113】図20(d):メイン・メモリへのコピー
・バックが終了してセカンド・キャッシュS1に応答が
返されたところを表している。FIG. 20D shows a case where the copy back to the main memory is completed and a response is returned to the second cache S1.
【0114】図20(e):セカンド・キャッシュS1
からファースト・キャッシュF1へコピー・バックの完
了を知らせる応答が返され、ファースト・キャッシュは
本来のメモリ・リードまたはライトのための動作を開始
する。FIG. 20E: Second cache S1
Returns a response from the first cache F1 indicating the completion of the copy back, and the first cache starts the operation for the original memory read or write.
【0115】以上のべたメイン・メモリへのコピー・バ
ックはMLIが成り立たないために発生するトランザク
ションである。The above copy back to the main memory is a transaction that occurs because the MLI does not hold.
【0116】次に、MLIが成り立つ従来の例において
問題であった図16の状況において本実施例のセカンド
・キャッシュに期待される効果を説明する。Next, the effect expected from the second cache of this embodiment in the situation of FIG. 16 which is a problem in the conventional example in which the MLI is established will be described.
【0117】図21(a):プロセッサP1からファー
スト・キャッシュF1へアドレスA1へのリードのアク
セスを行いキャッシュ・ミスし、必要ならばアドレスA
2のデータのコピー・バックの後、セカンド・キャッシ
ュS1へRSH要求が発せられる。FIG. 21A: The processor P1 makes a read access to the address A1 from the first cache F1 to cause a cache miss, and if necessary, the address A.
After copying back the data of 2, the RSH request is issued to the second cache S1.
【0118】図21(b):セカンド・キャッシュS1
において、対応するラインのエントリにはアドレスA1
のタグ・エントリが存在せず、キャッシュ・ミスした。
そこでセカンド・キャッシュS1はアドレスA1のタグ
・状態を格納するためのエントリを選び、RSH要求を
メモリ・バスに発する。FIG. 21B: Second cache S1
, The corresponding line entry has the address A1
There is no tag entry for and there was a cache miss.
Then, the second cache S1 selects an entry for storing the tag / state of the address A1 and issues an RSH request to the memory bus.
【0119】図21(c):データ・エントリには空き
がないため、データ・エントリにデータを格納せずその
ままファースト・キャッシュF1にデータを返してい
る。FIG. 21C: Since there is no space in the data entry, the data is not stored in the data entry and the data is returned to the first cache F1 as it is.
【0120】図21(d):ファースト・キャシュF1
は返されたデータを格納するとともにデータをプロセッ
サP1に返している。FIG. 21D: First cash F1
Stores the returned data and returns the data to the processor P1.
【0121】図22(a):アドレスA2へのアクセス
が発生し、ファースト・キャッシュF1ではやはりキャ
ッシュ・ミスを起こした。FIG. 22A: An access to the address A2 occurs, and a cache miss still occurs in the first cache F1.
【0122】図22(b):セカンド・キャッシュS1
にはアドレスA2のデータが残っているので、メモリ・
バスにまでデータ要求することなくデータをファースト
・キャッシュF1に返している。FIG. 22B: Second cache S1
Since the data of address A2 remains in the memory,
Data is returned to the first cache F1 without requesting data to the bus.
【0123】図22(c):ファースト・キャッシュF
1は返されたアドレスA2のデータを格納するとともに
プロセッサP1に対してデータを返している。FIG. 22C: First cache F
1 stores the returned data of the address A2 and returns the data to the processor P1.
【0124】この例のように、従来例においてセカンド
・キャッシュの容量が十分でないためにセカンド・キャ
ッシュから追い出されたデータに再びアクセスすること
により生ずるキャッシュ・ミスの中には、タグ・メモリ
のエントリ数を十分用意することにより発生を防げるも
のが存在する。これにより、メモリ・バスのトランザク
ション頻度が減少しシステム性能が向上する。As in this example, in the cache miss caused by re-accessing the data evicted from the second cache due to the insufficient capacity of the second cache in the conventional example, the entry of the tag memory is included in the cache miss. There are some that can be prevented from occurring by preparing enough numbers. This reduces the transaction frequency of the memory bus and improves system performance.
【0125】また、MLIが成り立たない従来例におい
て問題であった図19の状況について説明する。The situation of FIG. 19 which is a problem in the conventional example in which the MLI is not established will be described.
【0126】図23(a):他のセカンド・キャッシュ
からメモリ・バスを介して、あるセカンド・キャッシュ
S1に対してあるアドレスA0のデータの無効化要求が
発せられた。タグ・メモリに関しては、MLIが成り立
っているので、セカンド・キャッシュS1のタグ・メモ
リ内にアドレスA0のエントリが存在しないならば、そ
のクラスタ内にはアドレスA0のデータは存在しないこ
とが分かる。FIG. 23 (a): A request for invalidating the data at the address A0 is issued to the second cache S1 from another second cache via the memory bus. Regarding the tag memory, since the MLI is established, if the entry of address A0 does not exist in the tag memory of the second cache S1, it is known that the data of address A0 does not exist in the cluster.
【0127】図23(b):セカンド・キャッシュS1
はキャッシュ・バスに要求を発することなく応答を返し
ている。FIG. 23B: Second cache S1
Is returning a response without making a request to the cache bus.
【0128】この例のようにMLIが成り立たないため
に発生する無駄なトランザクションを防ぐことができ
る。It is possible to prevent a wasteful transaction that occurs because the MLI does not hold as in this example.
【0129】さらに、図19の状況についても無駄なト
ランザクションを防ぐことができる場合があることを説
明する。Further, it will be explained that in the situation shown in FIG. 19, useless transactions can be prevented in some cases.
【0130】図24(a):プロセッサP1からファー
スト・キャッシュF1へリードまたはライトのアクセス
を行った際に、ファースト・キャッシュF1はアクセス
の対象となっているアドレスのデータを持たずキャッシ
ュ・ミスを発生し、しかもアドレスA0のデータをコピ
ー・バックする必要が生じた。FIG. 24A: When a read or write access is made from the processor P1 to the first cache F1, the first cache F1 does not have the data of the address to be accessed and a cache miss occurs. However, the data at the address A0 needs to be copied back.
【0131】図24(b):コピー・バックされたデー
タを格納するデータ・エントリが空いていないので、デ
ータ・エントリの置き換えアルゴリズムに従って追い出
すことができるデータ・エントリが存在するか否かを判
定し、存在する場合にはそこにコピー・バックされたデ
ータを格納する。FIG. 24B: Since the data entry for storing the copied back data is not empty, it is judged whether or not there is a data entry which can be ejected according to the data entry replacement algorithm. , If it exists, the data copied back is stored in it.
【0132】図24(c):アドレスA4のデータが格
納されていたデータ・エントリが選択されそこにコピー
・バックされたデータを格納し、ファースト・キャッシ
ュF1にコピー・バックの終了を知らせる応答を返して
いる。FIG. 24 (c): The data entry in which the data of the address A4 was stored is selected, the copied back data is stored in the selected data entry, and a response notifying the end of the copy back is sent to the first cache F1. I'm returning.
【0133】なお、本発明は上記実施例にのみ限定され
ず、要旨を変更しない範囲で適宜変形して実施できる。The present invention is not limited to the above-mentioned embodiments, and can be carried out by appropriately modifying it without changing the gist.
【0134】本実施例では、write−invali
dation方式のキャッシュ・プロトコルについて説
明したが、他のタイプ(たとえば、write−bro
adcast方式、read−broadcast方
式、competitive−snooping方式、
および、これらの混成の方式)のキャッシュ・プロトコ
ルに対しても適用できる。In this embodiment, write-invali is used.
Although a date-based cache protocol has been described, other types (eg, write-bro) are used.
adcast method, read-broadcast method, competitive-snooping method,
Also, it can be applied to a cache protocol of these mixed methods).
【0135】本実施例では、存在メモリ及び対応メモリ
を二つの相異なる手段として説明したが、両者の格納す
べき情報をタグ・メモリとデータ・メモリのエントリの
対応を表す情報を格納する一つの手段により実現するこ
とも可能である。In the present embodiment, the existing memory and the corresponding memory have been described as two different means. However, the information to be stored by both means is one that stores the information indicating the correspondence between the entries in the tag memory and the data memory. It can also be realized by means.
【0136】本実施例は2階層のキャッシュ・メモリ装
置についてのみ説明したが、さらに階層数の多いキャッ
シュ・メモリ装置に対しても適用できる。従来は、ML
Iのため、メイン・メモリに近いレベルのキャッシュ・
メモリの容量は膨大になり実現が困難であった。本発明
により必要なメモリの容量を減ずることができ実現が容
易となる。Although the present embodiment has been described only for the cache memory device having two layers, it can be applied to a cache memory device having a larger number of layers. Conventionally, ML
Because of I, the cache of a level close to the main memory
It was difficult to realize because the memory capacity became huge. According to the present invention, the required memory capacity can be reduced and the implementation becomes easy.
【0137】本発明は、キャッシュ・メモリ装置に限ら
ず、情報を分散して保管するシステムにおいて、システ
ムが、複数の記憶体と、記憶体中の情報にアクセスする
能動体と、これら能動体と記憶体および記憶体間を接続
する情報伝達手段を含む構成に対し、本実施例のプロセ
ッサ、キャッシュ・メモリ、バスをそれぞれ能動体、記
憶体、情報伝達手段と置き換えることにより適用でき
る。タグ・メモリのエントリの内容は、あるアドレス
(データのID)を持つデータに対する要求がある記憶
体に伝わって来た時、その記憶体に直接に情報伝達手段
で接続された隣接の記憶体に対して要求を伝達する必要
があると否かを判定するための情報(要求伝達管理情
報)を格納しているエントリとみなせる。The present invention is not limited to a cache memory device, but in a system for storing information in a distributed manner, the system includes a plurality of storage bodies, active bodies that access information in the storage bodies, and active bodies. The present invention can be applied to the configuration including the memory and the information transmitting means for connecting the memory by replacing the processor, the cache memory, and the bus of this embodiment with the active body, the memory, and the information transmitting means, respectively. When a request for data having a certain address (data ID) is transmitted to a storage body having a request for data having a certain address (data ID), the contents of the entry of the tag memory are directly stored in an adjacent storage body connected by an information transmission means. On the other hand, it can be regarded as an entry storing information (request transmission management information) for determining whether or not the request needs to be transmitted.
【0138】本実施例では、木構造のトポロジーを持つ
システムについてのみ説明したが、任意の構造のシステ
ムに拡張できる。例えば、図25に示すようなシステム
の場合、MLIは次のような意味を持つ:『ある記憶体
に対してあるIDの情報に対する要求が伝わってきた際
に、そのIDを持つ情報がその記憶体に存在しなけれ
ば、その記憶体と情報伝達手段により直接に接続される
隣接の(要求元以外の)記憶体に要求を伝達する必要は
ない。』ここで、要求とはデータのリード、ライト、無
効化、ブロードキャスト、コピーバックのようなアクセ
スである。この性質は同じIDの情報を持つ記憶体の集
合の要素は情報伝達手段により直接に他のいずれかに接
続されていて「連結である」ことを保証している。この
性質の効果は、要求を本来伝える必要の無い記憶体にま
で無駄に伝達してしまうこと防ぐことにより情報へのア
クセス時間を短くすることができるということである。
つまり、各記憶体が情報を格納する目的は単に情報の記
憶のみが目的ではなく、情報に対する要求をどの記憶体
にまで伝達する必要があるかという管理情報としての目
的も持っている。In this embodiment, only the system having the tree structure topology has been described, but the system can be extended to an arbitrary structure. For example, in the case of the system as shown in FIG. 25, the MLI has the following meaning: "When a request for information of a certain ID is transmitted to a certain memory, the information having that ID is stored in the memory. If it does not exist in the body, it is not necessary to transmit the request to an adjacent storage body (other than the request source) directly connected to the storage body by the information transmission means. Here, the request is an access such as data read, write, invalidation, broadcast, or copyback. This property guarantees that the elements of the set of storage bodies having the information of the same ID are “connected” because they are directly connected to any other by the information transmission means. The effect of this property is that the access time to the information can be shortened by preventing the request from being unnecessarily transmitted to the storage body which originally does not need to be transmitted.
In other words, the purpose of storing information in each storage body is not merely the purpose of storing information, but also the purpose as management information indicating to which storage body a request for information needs to be transmitted.
【0139】要求をどの記憶体にまで伝達する必要があ
るかという管理情報として必要なのは、そのデータが共
有されているか否かとか、隣接する記憶体にもそのデー
タが存在するか否かといった情報(要求伝達管理情報)
であって、データの内容自身ではない。そこで、本発明
は、次のような意味を持つ“ヘテロティックなMLI”
の一例と見なすことができる:『ある記憶体に対してあ
るIDを持つデータに対する要求が伝わってきた際に、
そのIDを持つ要求伝達管理情報がその記憶体に存在し
なければ、その記憶体と情報伝達手段により直接に接続
される隣接の(要求元以外の)記憶体に要求を伝達する
必要はない。』つまり、要求伝達管理情報に関してはM
LIが成立するが、データの内容自身についてはMLI
が成立する必要はない。これにより各記憶体が格納すべ
き情報量を減らし、かつ、無駄な要求の伝達を防ぐこと
ができる。The management information indicating to which storage body the request needs to be transmitted is information such as whether or not the data is shared and whether or not the data exists in the adjacent storage body. (Request transmission management information)
However, it is not the content of the data itself. Therefore, the present invention is a "heterotic MLI" having the following meaning.
It can be considered as an example of: “When a request for data having a certain ID is transmitted to a certain storage body,
If the request transmission management information having the ID does not exist in the storage body, it is not necessary to transmit the request to the adjacent storage body (other than the request source) directly connected to the storage body by the information transmission means. ] That is, regarding the request transmission management information, M
LI is established, but the contents of the data itself is MLI.
Does not have to hold. As a result, the amount of information to be stored in each storage unit can be reduced, and useless transmission of requests can be prevented.
【0140】[0140]
【発明の効果】以上に述べたように本発明によれば、セ
カンド・キャッシュのメモリ容量を有効に利用すること
が可能となり、セカンド・キャッシュの容量が十分に確
保できない場合でも、セカンド・キャッシュを導入した
効果を実現できるとともに、キャッシュ・ヒット率の向
上によりシステム性能の向上を図ることができる。As described above, according to the present invention, the memory capacity of the second cache can be effectively used, and even if the second cache capacity cannot be secured sufficiently, the second cache can be The introduced effect can be realized and the system performance can be improved by improving the cache hit rate.
【0141】また、2階層を越える場合にも、MLIの
ためメイン・メモリ側の階層のキャッシュ・メモリの容
量を十分に大きくとる必要があり、実現に著しく困難が
あったが、タグ・メモリのエントリの容量のみを十分に
確保すればよいので実現が容易になる。このことは、バ
ス結合により1,000台程度のマルチプロセッサを実
現することも可能になる。Further, even when the number of layers exceeds two layers, the capacity of the cache memory of the layer on the main memory side needs to be sufficiently large because of the MLI, which is extremely difficult to realize. Realization becomes easy because it is sufficient to secure only the capacity of the entry. This makes it possible to realize about 1,000 multiprocessors by bus connection.
【図1】本発明の一実施例に係わる階層キャッシュ・メ
モリ装置の概念図。FIG. 1 is a conceptual diagram of a hierarchical cache memory device according to an embodiment of the present invention.
【図2】実施例におけるセカンド・キャッシュの概略構
成図。FIG. 2 is a schematic configuration diagram of a second cache in the embodiment.
【図3】各メモリのエントリの対応を表す図。FIG. 3 is a diagram showing the correspondence of entries in each memory.
【図4】従来例を説明するためのファースト・キャッシ
ュの状態遷移図。FIG. 4 is a state transition diagram of a first cache for explaining a conventional example.
【図5】従来例を説明するためのセカンド・キャッシュ
の状態遷移図。FIG. 5 is a state transition diagram of a second cache for explaining a conventional example.
【図6】従来例におけるセカンド・キャッシュの要求に
対する応答を表す図。FIG. 6 is a diagram showing a response to a request from a second cache in a conventional example.
【図7】従来例におけるセカンド・キャッシュの要求に
対する応答を表す図。FIG. 7 is a diagram showing a response to a second cache request in a conventional example.
【図8】実施例におけるセカンド・キャッシュの要求に
対する応答を表す図。FIG. 8 is a diagram showing a response to a request of the second cache in the embodiment.
【図9】本実施例におけるセカンド・キャッシュの要求
に対する応答を表す図。FIG. 9 is a diagram showing a response to a request from the second cache according to the present embodiment.
【図10】本実施例におけるセカンド・キャッシュの要
求に対する応答を表す図。FIG. 10 is a diagram showing a response to a request from the second cache according to the present embodiment.
【図11】本実施例におけるセカンド・キャッシュの要
求に対する応答を表す図。FIG. 11 is a diagram showing a response to a request from the second cache according to the present embodiment.
【図12】本実施例のセカンド・キャッシュの状態遷移
図。FIG. 12 is a state transition diagram of the second cache according to the present embodiment.
【図13】問題が生ずるキャッシュ・ブロックの状態・
Uビット・存在ビットの組み合わせを表す図。FIG. 13: State of cache block causing problems
The figure showing the combination of U bit and existence bit.
【図14】本実施例のセカンド・キャッシュの状態遷移
図。FIG. 14 is a state transition diagram of the second cache according to the present embodiment.
【図15】本実施例のセカンド・キャッシュの状態遷移
図。FIG. 15 is a state transition diagram of the second cache according to the present embodiment.
【図16】MLIが成り立つ従来例において無駄なバス
・トラフィックが発生する状況を表す図。FIG. 16 is a diagram showing a situation in which useless bus traffic occurs in a conventional example in which MLI is established.
【図17】MLIが成り立つ従来例において無駄なバス
・トラフィックが発生する状況を表す図。FIG. 17 is a diagram showing a situation in which useless bus traffic occurs in a conventional example in which MLI is established.
【図18】MLIが成り立たない従来例において無駄な
バス・トラフィックが防がれる状況を表す図。FIG. 18 is a diagram showing a situation in which useless bus traffic is prevented in a conventional example in which MLI does not hold.
【図19】MLIが成り立たない従来例において無駄な
バス・トラフィックが発生する状況を表す図。FIG. 19 is a diagram showing a situation where useless bus traffic occurs in a conventional example in which MLI does not hold.
【図20】MLIが成り立たない従来例において無駄な
バス・トラフィックが発生する状況を表す図。FIG. 20 is a diagram showing a situation where useless bus traffic occurs in a conventional example in which MLI does not hold.
【図21】本実施例において無駄なバス・トランザクシ
ョンが防がれる状況を表す図。FIG. 21 is a diagram showing a situation in which useless bus transactions are prevented in this embodiment.
【図22】本実施例において無駄なバス・トランザクシ
ョンが防がれる状況を表す図。FIG. 22 is a diagram showing a situation in which useless bus transactions are prevented in this embodiment.
【図23】本実施例において無駄なバス・トランザクシ
ョンが防がれる状況を表す図。FIG. 23 is a diagram showing a situation in which useless bus transactions are prevented in this embodiment.
【図24】本実施例において無駄なバス・トランザクシ
ョンが防がれる状況を表す図。FIG. 24 is a diagram showing a situation in which useless bus transactions are prevented in this embodiment.
【図25】ヘテロティックなMLIが有効なシステムの
概念図。FIG. 25 is a conceptual diagram of a system in which heterotic MLI is effective.
1…プロセッサ、2…ファースト・キャッシュ、3…キ
ャッシュ・バス、4…セカンド・キャッシュ、5…クラ
スタ、6…メモリ・バス、7…メイン・メモリ、11…
タグ・メモリ、12…データ・メモリ、13…存在メモ
リ、14…対応メモリ、15…キャッシュ・バス・イン
タフェース部、16…メモリ・バス・インタフェース
部、17…キャッシュ・バス・コントローラ、18…メ
モリ・バス・コントローラ。1 ... Processor, 2 ... First cache, 3 ... Cache bus, 4 ... Second cache, 5 ... Cluster, 6 ... Memory bus, 7 ... Main memory, 11 ...
Tag memory, 12 ... Data memory, 13 ... Existing memory, 14 ... Corresponding memory, 15 ... Cache bus interface unit, 16 ... Memory bus interface unit, 17 ... Cache bus controller, 18 ... Memory, Bus controller.
Claims (2)
なくとも1台の第1のキャッシュを接続し、該第1のキ
ャッシュを第1のバスに接続するとともに、少なくとも
1台の第2のキャッシュを接続してクラスタを構成し、
このクラスタを複数組み第2のバスを介してメイン・メ
モリに接続するようにした階層キャッシュ・メモリ装置
において、 前記第2のキャッシュは、 該第2のキャッシュと直接に第1のバスを介して接続さ
れている第1のキャッシュに記憶されているデータに関
するタグを記憶するタグ記憶手段と、 第1のキャッシュに格納されているデータのコピーを格
納するデータ記憶手段と、 前記タグ記憶手段のエントリに対応するデータが前記デ
ータ記憶手段にエントリを確保しているか否かに関する
情報を記憶する存在記憶手段と、 前記データ記憶手段内のエントリと存在記憶手段内のエ
ントリの対応関係に関する情報を記憶する対応記憶手段
と、 を具備し、 前記第2のバスからの要求に対し要求アドレスに対応す
るエントリが前記タグ記憶手段に存在すると前記存在記
憶手段により前記第2のキャッシュ内にデータが存在す
るかを判定し該データが存在すると前記対応記憶手段に
よりデータ記憶手段のエントリを選択しそのデータを要
求元に返すように制御することを特徴とする階層キャッ
シュ・メモリ装置。1. At least one first cache is connected to at least one processor, the first cache is connected to a first bus, and at least one second cache is connected. To configure the cluster,
In a hierarchical cache memory device in which a plurality of clusters are connected to a main memory via a second bus, the second cache is directly connected to the second cache via the first bus. Tag storage means for storing a tag relating to data stored in the connected first cache, data storage means for storing a copy of the data stored in the first cache, and an entry of the tag storage means An existence storage unit that stores information regarding whether or not the data corresponding to the entry secures an entry in the data storage unit; and stores information regarding a correspondence relationship between the entry in the data storage unit and the entry in the existence storage unit. A corresponding storage means, wherein the entry corresponding to the request address for the request from the second bus is the tag storage If the data exists in the stage, the existence storage means determines whether data exists in the second cache, and if the data exists, the corresponding storage means selects an entry of the data storage means and returns the data to the request source. A hierarchical cache memory device, characterized in that
して要求アドレスに対応するエントリが存在記憶手段内
に存在すると、対応記憶手段によってデータ記憶手段内
のエントリを選択しデータ更新を行い、エントリが存在
しないとデータの一貫性を保証する置き換えアルゴリズ
ムによりデータ記憶手段内のエントリを確保してからコ
ピー・バックを行うか、あるいは、第2のバスにまでコ
ピー・バック要求を発するように制御することを特徴と
する請求項1記載の階層キャッシュ・メモリ装置。2. When an entry corresponding to the request address for the copy back request from the first bus exists in the existing storage means, the corresponding storage means selects the entry in the data storage means to update the data, When an entry does not exist, a copy algorithm is performed after securing an entry in the data storage means by a replacement algorithm that guarantees data consistency, or a copy back request is issued up to the second bus. The hierarchical cache memory device of claim 1, wherein the hierarchical cache memory device comprises:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4151272A JPH06100982B2 (en) | 1992-05-20 | 1992-05-20 | Hierarchical cache memory device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4151272A JPH06100982B2 (en) | 1992-05-20 | 1992-05-20 | Hierarchical cache memory device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05324466A JPH05324466A (en) | 1993-12-07 |
| JPH06100982B2 true JPH06100982B2 (en) | 1994-12-12 |
Family
ID=15515048
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4151272A Expired - Lifetime JPH06100982B2 (en) | 1992-05-20 | 1992-05-20 | Hierarchical cache memory device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06100982B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1111511B1 (en) * | 1999-12-06 | 2017-09-27 | Texas Instruments France | Cache with multiple fill modes |
| JP3498673B2 (en) | 2000-04-05 | 2004-02-16 | 日本電気株式会社 | Storage device |
| KR100395768B1 (en) * | 2001-06-16 | 2003-08-21 | 삼성전자주식회사 | Multi-level cache system |
| US7552283B2 (en) * | 2006-01-20 | 2009-06-23 | Qualcomm Incorporated | Efficient memory hierarchy management |
-
1992
- 1992-05-20 JP JP4151272A patent/JPH06100982B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH05324466A (en) | 1993-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7698508B2 (en) | System and method for reducing unnecessary cache operations | |
| CN100428195C (en) | Data processing system and method | |
| US6901495B2 (en) | Cache memory system allowing concurrent reads and writes to cache lines to increase snoop bandwith | |
| JP5116418B2 (en) | Method for processing data in a multiprocessor data processing system, processing unit for multiprocessor data processing system, and data processing system | |
| US7779292B2 (en) | Efficient storage of metadata in a system memory | |
| US5535116A (en) | Flat cache-only multi-processor architectures | |
| US7783841B2 (en) | Efficient coherency communication utilizing an IG coherency state | |
| US7480772B2 (en) | Data processing system and method for efficient communication utilizing an Tn and Ten coherency states | |
| US6405290B1 (en) | Multiprocessor system bus protocol for O state memory-consistent data | |
| US6345341B1 (en) | Method of cache management for dynamically disabling O state memory-consistent data | |
| US6560681B1 (en) | Split sparse directory for a distributed shared memory multiprocessor system | |
| JP3661764B2 (en) | Method and system for providing an eviction protocol in a non-uniform memory access computer system | |
| US7774555B2 (en) | Data processing system and method for efficient coherency communication utilizing coherency domain indicators | |
| JP4162493B2 (en) | Reverse directory to facilitate access, including lower level cache | |
| US7469322B2 (en) | Data processing system and method for handling castout collisions | |
| US8214600B2 (en) | Data processing system and method for efficient coherency communication utilizing coherency domains | |
| US6397303B1 (en) | Data processing system, cache, and method of cache management including an O state for memory-consistent cache lines | |
| US7669013B2 (en) | Directory for multi-node coherent bus | |
| US6356982B1 (en) | Dynamic mechanism to upgrade o state memory-consistent cache lines | |
| JPH06100982B2 (en) | Hierarchical cache memory device | |
| US6349368B1 (en) | High performance mechanism to support O state horizontal cache-to-cache transfers | |
| JPH052534A (en) | Hierarchical cache memory device | |
| JPH10198603A (en) | Information processing system, control method thereof, and information processing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |