Movatterモバイル変換


[0]ホーム

URL:


JPH0573415A - Hierarchized cache system - Google Patents

Hierarchized cache system

Info

Publication number
JPH0573415A
JPH0573415AJP3265322AJP26532291AJPH0573415AJP H0573415 AJPH0573415 AJP H0573415AJP 3265322 AJP3265322 AJP 3265322AJP 26532291 AJP26532291 AJP 26532291AJP H0573415 AJPH0573415 AJP H0573415A
Authority
JP
Japan
Prior art keywords
cache
data
address
processor
primary
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
JP3265322A
Other languages
Japanese (ja)
Inventor
Koichi Takatsuka
浩一 高▲塚▼
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co LtdfiledCriticalOki Electric Industry Co Ltd
Priority to JP3265322ApriorityCriticalpatent/JPH0573415A/en
Publication of JPH0573415ApublicationCriticalpatent/JPH0573415A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

PURPOSE:To improve the processing capability of a system by utilizing effectively a secondary cache. CONSTITUTION:First of all, whether data corresponding to an address requested by a processor 11 is present on a primary cache 12 or not is discriminated. When the data is not present on the primary cache 12, whether the data is present on a secondary cache 13 or not is discriminated. Subsequently, when the data is present on the secondary cache 13, the data on the secondary cache 13 is transcribed to the primary cache 12, and by this transcription, the data sent out of the primary cache 12 is transcribed to the secondary cache 13. In such a manner, the data present on the primary cache 12 is transferred to the secondary cache 13 and stored by which the secondary cache 13 can be effectively utilized.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、階層化キャッシュにお
ける1次キャッシュから2次キャッシュへのデータ転送
を行なう方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for transferring data from a primary cache to a secondary cache in a hierarchical cache.

【0002】[0002]

【従来の技術】図2は、従来の階層化キャッシュシステ
ムの概略図である。図示のシステムは、バス45に接続
された、プロセッサ41と、1次キャッシュ42と、2
次キャッシュ43と、主メモリ44とから成る。プロセ
ッサ41は、主メモリ44に格納されたプログラムに従
って各種のデータ処理や制御を行なう。1次キャッシュ
42は、主メモリ44よりも高速でアクセス可能なメモ
リから成り、主メモリの一部を転記する。
2. Description of the Related Art FIG. 2 is a schematic diagram of a conventional hierarchical cache system. The system shown includes a processor 41, a primary cache 42, and 2 connected to a bus 45.
It consists of a secondary cache 43 and a main memory 44. The processor 41 performs various kinds of data processing and control according to a program stored in the main memory 44. The primary cache 42 is composed of a memory that can be accessed at a higher speed than the main memory 44, and transfers a part of the main memory.

【0003】2次キャッシュ43は、1次キャッシュ4
2と同様に、主メモリ44よりも高速でアクセス可能な
メモリから成り、1次キャッシュ42に転記されたデー
タと同じデータを転記する。主メモリ44は、各種のデ
ータやプログラムを格納している。バス45は、プロセ
ッサ1の要求アドレスや、データ、ステータス等を転送
する。
The secondary cache 43 is the primary cache 4
Similar to 2, it is composed of a memory that can be accessed at a higher speed than the main memory 44, and transfers the same data as the data transferred to the primary cache 42. The main memory 44 stores various data and programs. The bus 45 transfers the request address of the processor 1, data, status, and the like.

【0004】また、プロセッサ41から1次キャッシュ
42へは、プロセッサスタート信号46が出力される。
1次キャッシュ42から2次キャッシュ43へは、キャ
ッシュ1スタート信号47が出力される。そして、2次
キャッシュ43から主メモリ44へは、キャッシュ2ス
タート信号48が出力される。次に、上述したシステム
の動作を説明する。 (1)1次キャッシュ42がヒットした場合 プロセッサ41が主メモリ44のリード動作を行なう
と、プロセッサ41は、プロセッサ41のアドレスとス
テータスをバス45を通じて出力し、プロセッサスター
ト信号46を有効とする。このアドレスが1次キャッシ
ュ42内に存在すると、1次キャッシュ42はデータを
バス45を通してプロセッサ41に出力する。このと
き、2次キャッシュ43及び主メモリ44は起動しな
い。
A processor start signal 46 is output from the processor 41 to the primary cache 42.
A cache 1 start signal 47 is output from the primary cache 42 to the secondary cache 43. Then, the cache 2 start signal 48 is output from the secondary cache 43 to the main memory 44. Next, the operation of the above system will be described. (1) When the primary cache 42 is hit When the processor 41 performs the read operation of the main memory 44, the processor 41 outputs the address and status of the processor 41 through the bus 45 and validates the processor start signal 46. When this address exists in the primary cache 42, the primary cache 42 outputs the data to the processor 41 via the bus 45. At this time, the secondary cache 43 and the main memory 44 are not activated.

【0005】(2)1次キャッシュ42がミスヒットし、
2次キャッシュ43がヒットした場合 プロセッサ41から出力されたアドレスが1次キャッシ
ュ42内に存在しないと、1次キャッシュ42はキャッ
シュ1スタート信号47を有効とし、2次キャッシュ4
3を起動する。プロセッサ41から出力されたアドレス
が2次キャッシュ43内に存在すると、2次キャッシュ
43はデータをバス45を通してプロセッサ41と1次
キャッシュ42に出力する。1次キャッシュ42は、こ
のデータを取り込む。また、このとき、主メモリ44は
起動しない。
(2) The primary cache 42 has a mishit,
When the secondary cache 43 hits If the address output from the processor 41 does not exist in the primary cache 42, the primary cache 42 validates the cache 1 start signal 47 and the secondary cache 4
Start 3. When the address output from the processor 41 exists in the secondary cache 43, the secondary cache 43 outputs the data to the processor 41 and the primary cache 42 via the bus 45. The primary cache 42 fetches this data. At this time, the main memory 44 is not activated.

【0006】(3)1次キャッシュ42がミスヒットし、
2次キャッシュ43もミスヒットした場合 プロセッサ41から出力されたアドレスが2次キャッシ
ュ43内に存在しないと、2次キャッシュ43はキャッ
シュスタート信号48を有効とし、主メモリ44を起動
する。主メモリ44はデータをバス45を通してプロセ
ッサ41と1次キャッシュ42と2次キャッシュ43と
に出力する。1次キャッシュ42と2次キャッシュ43
はそれぞれこのデータを取り込む。
(3) The primary cache 42 misses,
When the secondary cache 43 also miss-hits If the address output from the processor 41 does not exist in the secondary cache 43, the secondary cache 43 validates the cache start signal 48 and activates the main memory 44. The main memory 44 outputs the data to the processor 41, the primary cache 42, and the secondary cache 43 via the bus 45. Primary cache 42 and secondary cache 43
Respectively captures this data.

【0007】(4)ライトの場合 プロセッサ41が主メモリ44へのライトを行なうと、
プロセッサ41はプロセッサのアドレスとデータをバス
45を通して出力し、プロセッサスタート信号46を有
効とする。また、1次キャッシュ42はキャッシュ1ス
タート信号47を有効とし、2次キャッシュ43はキャ
ッシュ2スタート信号48を有効とする。プロセッサ4
1から出力されたアドレスが1次キャッシュ42、2次
キャッシュ43のそれぞれに存在すれば、それぞれのキ
ャッシュのデータを更新する。また、主メモリ44に
は、プロセッサ41から出力されたデータが書き込まれ
る。
(4) In the case of writing When the processor 41 writes to the main memory 44,
The processor 41 outputs the address and data of the processor through the bus 45 and validates the processor start signal 46. The primary cache 42 validates the cache 1 start signal 47, and the secondary cache 43 validates the cache 2 start signal 48. Processor 4
If the address output from 1 exists in each of the primary cache 42 and the secondary cache 43, the data in each cache is updated. In addition, the data output from the processor 41 is written in the main memory 44.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上述し
た従来のシステムには、次のような問題があった。即
ち、1次キャッシュに取り込まれたデータが2次キャッ
シュ中にも存在するので、2次キャッシュの容量が1次
キャッシュに比べて小さい場合、2次キャッシュは有効
に動作しないという問題があった。本発明は以上の点に
着目してなされたもので、2次キャッシュの動作が有効
に行なわれるようにし、システムの処理能力の向上を図
った階層化キャッシュ制御方式を提供することを目的と
するものである。
However, the above-mentioned conventional system has the following problems. That is, since the data taken into the primary cache exists also in the secondary cache, there is a problem that the secondary cache does not operate effectively when the capacity of the secondary cache is smaller than that of the primary cache. The present invention has been made in view of the above points, and it is an object of the present invention to provide a hierarchical cache control method which enables effective operation of the secondary cache and improves the processing capacity of the system. It is a thing.

【0009】[0009]

【課題を解決するための手段】本発明の階層化キャッシ
ュ制御方式は、主メモリのデータを転記する1次キャッ
シュ及び2次キャッシュを備え、プロセッサが要求する
アドレスに対応するデータが前記1次キャッシュに存在
するか否かを判別し、当該1次キャッシュに存在しない
ときは、前記2次キャッシュに存在するか否かを判別
し、当該2次キャッシュに存在するときは、当該データ
を前記1次キャッシュに転記し、当該転記により当該1
次キャッシュから追い出されたデータを前記2次キャッ
シュに転記することを特徴とするものである。
A hierarchical cache control system of the present invention comprises a primary cache and a secondary cache for transferring data in a main memory, and data corresponding to an address requested by a processor is the primary cache. Is present in the primary cache, if it is not in the primary cache, it is determined whether it is in the secondary cache. If it is in the secondary cache, the data is stored in the primary cache. Post to the cache and
It is characterized in that the data expelled from the secondary cache is transferred to the secondary cache.

【0010】[0010]

【作用】本発明の階層化キャッシュ制御方式において
は、まず、プロセッサが要求するアドレスに対応するデ
ータが1次キャッシュに存在するか否かを判別する。当
該データが1次キャッシュに存在しないときは、2次キ
ャッシュに存在するか否かを判別する。そして、当該2
次キャッシュに存在するときは、当該2次キャッシュ上
のデータを1次キャッシュに転記し、この転記により1
次キャッシュから追い出されたデータを2次キャッシュ
に転記する。このようにして、1次キャッシュにあった
データは、2次キャッシュに転送して格納され、これに
より、2次キャッシュを有効に利用することが可能とな
る。
In the hierarchical cache control system of the present invention, it is first determined whether or not the data corresponding to the address requested by the processor exists in the primary cache. If the data does not exist in the primary cache, it is determined whether or not it exists in the secondary cache. And the 2
If it exists in the secondary cache, the data in the secondary cache is transferred to the primary cache and this transfer causes 1
The data evicted from the secondary cache is transferred to the secondary cache. In this way, the data in the primary cache is transferred to and stored in the secondary cache, which makes it possible to effectively use the secondary cache.

【0011】[0011]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明の階層化キャッシュシステ
ムの概略図である。図示のシステムは、バス15に接続
された、プロセッサ11と、1次キャッシュ12と、2
次キャッシュ13と、主メモリ14とから成る。プロセ
ッサ11は、主メモリ14に格納されたプログラムに従
って各種のデータ処理や制御を行なう。1次キャッシュ
12は、主メモリ14よりも高速でアクセス可能なメモ
リから成り、主メモリの一部を転記する。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a schematic diagram of the hierarchical cache system of the present invention. The system shown in the figure includes a processor 11, a primary cache 12 and a bus 2 connected to a bus 15.
It consists of a secondary cache 13 and a main memory 14. The processor 11 performs various kinds of data processing and control according to a program stored in the main memory 14. The primary cache 12 is composed of a memory that can be accessed at a higher speed than the main memory 14, and transfers a part of the main memory.

【0012】2次キャッシュ13は、1次キャッシュ1
2と同様に、主メモリ14よりも高速でアクセス可能な
メモリから成り、1次キャッシュ12に転記されたデー
タと同じデータを転記する。主メモリ14は、各種のデ
ータやプログラムを格納している。バス15は、プロセ
ッサ11の要求アドレスや、データ、ステータス等を転
送する。
The secondary cache 13 is the primary cache 1
Similar to 2, it is composed of a memory that can be accessed at a higher speed than the main memory 14, and transfers the same data as the data transferred to the primary cache 12. The main memory 14 stores various data and programs. The bus 15 transfers the request address of the processor 11, data, status, and the like.

【0013】また、プロセッサ11から1次キャッシュ
12へは、プロセッサスタート信号16が出力される。
1次キャッシュ12から2次キャッシュ13へは、キャ
ッシュ1スタート信号17、オーバフロー信号19及び
1次キャッシュアドレス20が出力される。そして、2
次キャッシュ13から主メモリ14へは、キャッシュ2
スタート信号18が出力される。
A processor start signal 16 is output from the processor 11 to the primary cache 12.
A cache 1 start signal 17, an overflow signal 19 and a primary cache address 20 are output from the primary cache 12 to the secondary cache 13. And 2
From the next cache 13 to the main memory 14, the cache 2
The start signal 18 is output.

【0014】図3は、本発明の方式の1次キャッシュの
詳細な構成を示すブロック図である。図示のキャッシュ
は、メモリアレイ121 と、比較器122 と、制御回路123
と、データバッファ124 と、アドレスラッチ126 により
構成されている。メモリアレイ121 は、アドレス部211
と、Vビット部212 と、データ部213 とに分割される。
アドレス部211 は、プロセッサ11が主メモリ14をア
クセスする際のアドレスに相当するものである。Vビッ
ト部212 は、データ部213 が有効か無効かを示すビット
である。データ部213 は、主メモリ14のデータを転記
したものである。
FIG. 3 is a block diagram showing the detailed structure of the primary cache according to the method of the present invention. The cache shown includes a memory array 121, a comparator 122, and a control circuit 123.
And a data buffer 124 and an address latch 126. The memory array 121 has an address section 211.
, And a V bit section 212 and a data section 213.
The address section 211 corresponds to an address when the processor 11 accesses the main memory 14. The V bit part 212 is a bit indicating whether the data part 213 is valid or invalid. The data section 213 is a copy of the data in the main memory 14.

【0015】また、メモリアレイ121 は、n個のライン
214 に分割される。これらのライン214 には、主メモリ
14の異なった部分のデータが転記できる。比較器122
は、アドレス151 の上位とアドレス部211 とを比較す
る。即ち、アドレス151 の上位は、アドレス部211 と比
較器122 とに接続され、アドレス151の下位はメモリア
レイ121 に接続されている。また、アドレス部211 は、
比較器122 とアドレスラッチ126 に接続されている。こ
こに、アドレスラッチ126 は、1次キャッシュアドレス
20をラッチする回路である。一方、比較器122 は、ア
ドレス151 の上位とアドレス部211 との比較結果を出力
信号125 として出力する。
Further, the memory array 121 has n lines.
Divided into 214. The data of different parts of the main memory 14 can be transcribed to these lines 214. Comparator 122
Compares the upper part of the address 151 with the address part 211. That is, the upper part of the address 151 is connected to the address part 211 and the comparator 122, and the lower part of the address 151 is connected to the memory array 121. Also, the address part 211 is
It is connected to the comparator 122 and the address latch 126. The address latch 126 is a circuit that latches the primary cache address 20. On the other hand, the comparator 122 outputs, as an output signal 125, the comparison result of the higher order of the address 151 and the address part 211.

【0016】制御回路123 は、Vビット部212 と比較器
122 の出力信号125 とを入力するとともに、プロセッサ
スタート信号16とキャッシュ2スタート信号18とス
テータス153 とを入力している。プロセッサスタート信
号16は、プロセッサ11から入力される指示信号であ
る。キャッシュ2スタート信号18は、2次キャッシュ
13から入力される指示信号である。ステータス153
は、プロセッサ11からバス15を介して入力される。
そして、制御回路123 は、OE信号31とDIR信号3
2とLATD信号35とキャッシュ1スタート信号17
とオーバフロー信号19とLATE信号36とを出力し
ている。
The control circuit 123 includes a V bit unit 212 and a comparator.
The output signal 125 of 122 and the processor start signal 16, the cache 2 start signal 18, and the status 153 are input. The processor start signal 16 is an instruction signal input from the processor 11. The cache 2 start signal 18 is an instruction signal input from the secondary cache 13. Status 153
Is input from the processor 11 via the bus 15.
Then, the control circuit 123 controls the OE signal 31 and the DIR signal 3
2, LATD signal 35, and cache 1 start signal 17
The overflow signal 19 and the LATE signal 36 are output.

【0017】OE信号31は、プロセッサ11によるデ
ータ部213 の読み取りを許可するための信号である。D
IR信号32は、データ152 の転送方向を制御するため
の信号である。LATD信号35は、データバッファ12
4 内のデータをラッチするための指示信号である。キャ
ッシュ1スタート信号17は、1次キャッシュ12から
2次キャッシュ13への動作指示信号である。オーバフ
ロー信号19は、1次キャッシュ12がオーバフローし
たときに出力される信号である。LATA信号36は、
アドレスラッチ126 を制御する信号である。データバッ
ファ124 は、プロセッサ11からバス15を介してデー
タ部214 に入出力されるデータ152 を制御する。
The OE signal 31 is a signal for permitting the processor 11 to read the data portion 213. D
The IR signal 32 is a signal for controlling the transfer direction of the data 152. The LATD signal 35 is supplied to the data buffer 12
This is an instruction signal for latching the data in 4. The cache 1 start signal 17 is an operation instruction signal from the primary cache 12 to the secondary cache 13. The overflow signal 19 is a signal output when the primary cache 12 overflows. The LATA signal 36 is
This is a signal for controlling the address latch 126. The data buffer 124 controls the data 152 input / output to / from the data section 214 from the processor 11 via the bus 15.

【0018】図4は、本発明の方式の2次キャッシュの
詳細な構成を示すブロック図である。図示のキャッシュ
は、メモリアレイ131 と、比較器132 と、制御回路133
と、データバッファ134 により構成されている。メモリ
アレイ131 は、アドレス部311 と、Vビット部312 と、
データ部313 とに分割される。アドレス部311は、プロ
セッサ11が主メモリ14をアクセスする際のアドレス
に相当するものである。Vビット部312 は、データ部31
3 が有効か無効かを示すビットである。データ部313
は、主メモリ14のデータを転記したものである。
FIG. 4 is a block diagram showing the detailed structure of the secondary cache according to the method of the present invention. The illustrated cache includes a memory array 131, a comparator 132, and a control circuit 133.
And a data buffer 134. The memory array 131 includes an address section 311, a V bit section 312,
It is divided into a data part 313. The address section 311 corresponds to an address when the processor 11 accesses the main memory 14. The V-bit part 312 has a data part 31
This bit indicates whether 3 is valid or invalid. Data section 313
Is a copy of the data in the main memory 14.

【0019】また、メモリアレイ131 は、m個のライン
314 に分割される。これらのライン314 には、主メモリ
14の異なった部分のデータが転記できる。比較器132
は、アドレス151 の上位とアドレス部311 とを比較す
る。即ち、アドレス151 の上位は、アドレス部311 と比
較器132 とに接続され、アドレス151の下位はメモリア
レイ131 に接続されている。また、アドレス部311 は、
比較器132 と1次キャッシュアドレス20に接続されて
いる。そして、この比較器132は、アドレス151 の上位
とアドレス部311 との比較結果を出力信号135 として出
力する。制御回路133 は、Vビット部312 と比較器132
の出力信号135 とを入力するとともに、キャッシュ1ス
タート信号17とステータス153 とを入力している。
Further, the memory array 131 has m lines.
Divided into 314. The data of different parts of the main memory 14 can be transcribed to these lines 314. Comparator 132
Compares the upper part of the address 151 with the address part 311. That is, the upper part of the address 151 is connected to the address part 311 and the comparator 132, and the lower part of the address 151 is connected to the memory array 131. Also, the address part 311 is
It is connected to the comparator 132 and the primary cache address 20. Then, the comparator 132 outputs, as an output signal 135, the comparison result of the higher order of the address 151 and the address part 311. The control circuit 133 includes a V bit unit 312 and a comparator 132.
Output signal 135 and the cache 1 start signal 17 and the status 153 are input.

【0020】キャッシュ1スタート信号17は、1次キ
ャッシュ12から入力される指示信号である。ステータ
ス153 は、プロセッサ11からバス15を介して入力さ
れる。一方、制御回路133 は、OE信号33とDIR信
号34とキャッシュ2スタート信号18とを出力してい
る。OE信号33は、プロセッサ11によるデータ部31
3 の読み取りを許可するための信号である。DIR信号
34は、データ152 の転送方向を制御するための信号で
ある。キャッシュ1スタート信号17は、1次キャッシ
ュ12から2次キャッシュ13への動作指示信号であ
る。
The cache 1 start signal 17 is an instruction signal input from the primary cache 12. The status 153 is input from the processor 11 via the bus 15. On the other hand, the control circuit 133 outputs the OE signal 33, the DIR signal 34, and the cache 2 start signal 18. The OE signal 33 is the data portion 31 of the processor 11.
It is a signal for permitting reading of 3. The DIR signal 34 is a signal for controlling the transfer direction of the data 152. The cache 1 start signal 17 is an operation instruction signal from the primary cache 12 to the secondary cache 13.

【0021】データバッファ134 は、プロセッサ11か
らバス15を介してデータ部314 に入出力されるデータ
152 を制御する。次に、上述したシステムの動作を説明
する。 (1)1次キャッシュ12がヒットした場合 プロセッサ11が主メモリ14のリード動作を行なう
と、プロセッサ11は、プロセッサ11のアドレスとス
テータスをバス15を通じて出力し、プロセッサスター
ト信号16を有効とする。1次キャッシュ12では、ア
ドレス151 の下位によりn個のライン214 の1つを選択
し、アドレス部211 を比較器122 に、Vビット部212 を
制御回路123 に出力する。
The data buffer 134 is used for data input / output from the processor 11 to the data section 314 via the bus 15.
Control the 152. Next, the operation of the above system will be described. (1) When the primary cache 12 hits When the processor 11 performs the read operation of the main memory 14, the processor 11 outputs the address and status of the processor 11 through the bus 15 and validates the processor start signal 16. The primary cache 12 selects one of the n lines 214 depending on the lower order of the address 151, and outputs the address section 211 to the comparator 122 and the V bit section 212 to the control circuit 123.

【0022】比較器122 は、アドレス151 の上位とアド
レス部211 とを比較し、これらが一致していれば、出力
信号125 を有効とする。このとき、出力信号125 が有効
且つVビット部212 が有効(1次キャッシュがヒット)
であると、1次キャッシュ12がデータ部213 の内容を
データバッファ124 を通してプロセッサ11に出力し、
2次キャッシュ13及び主メモリ14は起動しない。即
ち、図3において、DIR信号32の方向をデータ部21
3 からプロセッサ11への方向とし、OE信号31を有
効とし、データ部213 からの出力を許可する。
The comparator 122 compares the upper part of the address 151 with the address part 211, and if they match, validates the output signal 125. At this time, the output signal 125 is valid and the V bit part 212 is valid (the primary cache is hit).
Then, the primary cache 12 outputs the contents of the data portion 213 to the processor 11 through the data buffer 124,
The secondary cache 13 and main memory 14 are not activated. That is, the direction of the DIR signal 32 in FIG.
The direction is from 3 to the processor 11, the OE signal 31 is enabled, and the output from the data section 213 is permitted.

【0023】(2)1次キャッシュ12がミスヒットし、
2次キャッシュ13がヒットした場合 図3において、出力信号125 が無効あるいはVビット21
2 が無効(1次キャッシュがミスヒット)であると、1
次キャッシュ12はキャッシュ1スタート信号17を有
効とし、2次キャッシュ13を起動する。2次キャッシ
ュ13では、このアドレス151 の下位によりm個のライ
ン314 の1個を選択し、アドレス部311 を比較器132
に、Vビット312 を制御回路133 に出力する。
(2) The primary cache 12 has a mishit,
When the secondary cache 13 is hit In FIG. 3, the output signal 125 is invalid or V bit 21
1 if 2 is invalid (1st cache is a miss)
The secondary cache 12 validates the cache 1 start signal 17 and activates the secondary cache 13. In the secondary cache 13, one of the m lines 314 is selected according to the lower order of the address 151, and the address unit 311 is compared with the comparator 132.
Then, the V bit 312 is output to the control circuit 133.

【0024】比較器132 は、アドレス151 の上位とアド
レス部311 とを比較し、一致していれば、出力信号135
を有効とする。もし、出力信号135 が有効且つVビット
312が有効(2次キャッシュがヒット)であると、2次
キャッシュ13がデータ部313 の内容をデータバッファ
134 を通じてプロセッサ11と1次キャッシュ12に出
力し、主メモリ14は起動しない。2次キャッシュ13
は、このライン314 のVビット部312 を無効とする。1
次キャッシュ12では、アドレス151 の下位で選択され
ているライン214 のVビット212 が有効であると、オー
バフロー信号19を有効とし、アドレス部211 をアドレ
スラッチ126 にラッチし、データ部213 をデータバッフ
ァ124 にラッチする。
The comparator 132 compares the upper part of the address 151 with the address part 311. If they match, the output signal 135
Is valid. If the output signal 135 is valid and V bit
If 312 is valid (secondary cache hit), the second cache 13 stores the contents of the data section 313 in the data buffer.
The data is output to the processor 11 and the primary cache 12 through 134, and the main memory 14 is not activated. Secondary cache 13
Invalidates the V bit portion 312 of this line 314. 1
In the next cache 12, if the V bit 212 of the line 214 selected at the lower order of the address 151 is valid, the overflow signal 19 is validated, the address part 211 is latched in the address latch 126, and the data part 213 is buffered. Latch to 124.

【0025】次に、1次キャッシュ12は、プロセッサ
アドレス151 の下位で選択されているライン214 のアド
レス部211 にアドレス151 の上位を書き込み、データ部
213に2次キャッシュ13から出力されるデータ152 を
データバッファ124 を通じて書き込み、Vビット部212
を有効とする。次に、データバッファ124 は、ラッチし
たデータをデータ152 に出力し、アドレスラッチ126
は、ラッチしたアドレスを1次キャッシュアドレス20
に出力する。最後に、2次キャッシュ13は、オーバフ
ロー信号が有効であると、1次キャッシュアドレス20
を選択されているライン314 のアドレス部311 に書き込
み、データ152 をデータバッファ134 を通じてデータ部
313 に書き込み、Vビット部312 を有効とする。
Next, the primary cache 12 writes the upper part of the address 151 to the address part 211 of the line 214 selected in the lower part of the processor address 151, and writes the upper part of the address 151.
Data 152 output from the secondary cache 13 is written to 213 via the data buffer 124, and the V bit unit 212
Is valid. Next, the data buffer 124 outputs the latched data to the data 152, and the address latch 126
Uses the latched address as the primary cache address 20
Output to. Finally, the secondary cache 13 receives the primary cache address 20 when the overflow signal is valid.
Is written to the address part 311 of the selected line 314 and the data 152 is transferred to the data part through the data buffer 134.
Write to 313 to enable the V bit part 312.

【0026】(3)1次キャッシュ12がミスヒットし、
2次キャッシュ13もミスヒットした場合 上述した (2)において、2次キャッシュ13の出力信号
135 が無効あるいはVビット312 が無効(2次キャッシ
ュがミス)であると、2次キャッシュ13はキャッシュ
2スタート信号18を有効とし、主メモリ14を起動す
る。
(3) The primary cache 12 misses,
When the secondary cache 13 also has a mishit In the above (2), the output signal of the secondary cache 13
If 135 is invalid or V bit 312 is invalid (secondary cache miss), the secondary cache 13 validates the cache 2 start signal 18 and activates the main memory 14.

【0027】次に、2次キャッシュ12は、アドレス15
1 の上位を選択されているライン314 のアドレス部311
に書き込み、主メモリ14から出力されるデータ152 を
データバッファ134 を通じてデータ部313 に書き込み、
Vビット312 を有効とする。同様に、1次キャッシュ1
2は、アドレス151 の上位を選択されているライン214
のアドレス部211 に書き込み、主メモリ14から出力さ
れるデータ152 をデータバッファ124 を通じてデータ部
213に書き込み、Vビット212 を有効とする。
Next, the secondary cache 12 has the address 15
Address portion 311 of line 314 with the high order of 1 selected
Data 152 output from the main memory 14 to the data section 313 via the data buffer 134,
The V bit 312 is valid. Similarly, primary cache 1
2 is the line 214 that selects the upper part of the address 151
Of the data 152 output from the main memory 14 through the data buffer 124.
Write to 213 and validate the V bit 212.

【0028】(4)ライトの場合 プロセッサ11がメモリ14のライト動作を行なうと、
バス15のアドレス151 とデータ152 とステータス153
とプロセッサスタート信号16とを有効とする。1次キ
ャッシュ12は、キャッシュ1スタート信号17を有効
とし、2次キャッシュ13はキャッシュ2スタート信号
18を有効とする。主メモリ14はこのデータ152 をア
ドレス151 で示されるアドレスに書き込む。1次キャッ
シュ12と2次キャッシュ13は、それぞれアドレス15
2 の上位と選択されたライン214又は314 の比較をリー
ド時と同様に行なう。そして、もし、両者が一致してお
り、且つVビット部212 又は312 が有効であれば、デー
タ152 をデータ部213 又は313 に書き込む。
(4) In the case of writing When the processor 11 performs the write operation of the memory 14,
Bus 151 address 151, data 152, status 153
And the processor start signal 16 are validated. The primary cache 12 validates the cache 1 start signal 17 and the secondary cache 13 validates the cache 2 start signal 18. The main memory 14 writes this data 152 at the address indicated by the address 151. The primary cache 12 and the secondary cache 13 have addresses 15 respectively.
The comparison between the upper 2 and the selected line 214 or 314 is performed in the same manner as in reading. Then, if they match and the V bit part 212 or 312 is valid, the data 152 is written in the data part 213 or 313.

【0029】[0029]

【発明の効果】以上説明したように、本発明の階層化キ
ャッシュメモリによれば、1次キャッシュのリードミス
後の2次キャッシュのリードヒットの発生時に2次キャ
ッシュの該当ラインを無効とし、1次キャッシュから追
い出されたデータを2次キャッシュが取り込むようにし
たので、2次キャッシュの容量が1次キャッシュよりも
小さい場合でも、2次キャッシュは有効に動作すること
ができる。更に、2次キャッシュの容量が1次キャッシ
ュよりも大きい場合でも2次キャッシュは従来の方式よ
り効率よく動作することができる。即ち、キャッシュメ
モリのヒット率の向上を図り、プロセッサの処理速度の
向上を図ることができる。
As described above, according to the hierarchical cache memory of the present invention, when the read hit of the secondary cache occurs after the read miss of the primary cache, the relevant line of the secondary cache is invalidated. Since the secondary cache fetches the data evicted from the cache, the secondary cache can operate effectively even when the capacity of the secondary cache is smaller than that of the primary cache. Further, even if the capacity of the secondary cache is larger than that of the primary cache, the secondary cache can operate more efficiently than the conventional method. That is, the hit rate of the cache memory can be improved, and the processing speed of the processor can be improved.

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

【図1】本発明の方式の階層化キャッシュシステムの概
略図である。
FIG. 1 is a schematic diagram of a hierarchical cache system according to the present invention.

【図2】従来の方式の階層化キャッシュシステムの概略
図である。
FIG. 2 is a schematic diagram of a conventional hierarchical cache system.

【図3】本発明の方式の1次キャッシュの構成を示すブ
ロック図である。
FIG. 3 is a block diagram showing a configuration of a primary cache according to the method of the present invention.

【図4】本発明の方式の2次キャッシュの構成を示すブ
ロック図である。
FIG. 4 is a block diagram showing the configuration of a secondary cache according to the method of the present invention.

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

11 プロセッサ 12 1次キャッシュ 13 2次キャッシュ 14 主メモリ 15 バス 121 、131 メモリアレイ 122 、132 比較器 123 、133 制御回路 124 、134 データバッファ 126 アドレスラッチ 11 processor 12 primary cache 13 secondary cache 14 main memory 15 bus 121, 131 memory array 122, 132 comparator 123, 133 control circuit 124, 134 data buffer 126 address latch

Claims (1)

Translated fromJapanese
【特許請求の範囲】[Claims]【請求項1】 主メモリのデータを転記する1次キャッ
シュ及び2次キャッシュを備え、 プロセッサが要求するアドレスに対応するデータが前記
1次キャッシュに存在するか否かを判別し、 当該1次キャッシュに存在しないときは、前記2次キャ
ッシュに存在するか否かを判別し、 当該2次キャッシュに存在するときは、当該データを前
記1次キャッシュに転記し、 当該転記により当該1次キャッシュから追い出されたデ
ータを前記2次キャッシュに転記することを特徴とする
階層化キャッシュ方式。
1. A primary cache and a secondary cache for transferring data in a main memory, wherein whether or not data corresponding to an address requested by a processor exists in the primary cache is determined, and the primary cache is provided. If it does not exist in the L2 cache, it is determined whether it exists in the L2 cache. If it exists in the L2 cache, the data is transferred to the L1 cache, and the data is removed from the L1 cache by the transfer. The cached data is transferred to the secondary cache.
JP3265322A1991-09-171991-09-17Hierarchized cache systemPendingJPH0573415A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
JP3265322AJPH0573415A (en)1991-09-171991-09-17Hierarchized cache system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
JP3265322AJPH0573415A (en)1991-09-171991-09-17Hierarchized cache system

Publications (1)

Publication NumberPublication Date
JPH0573415Atrue JPH0573415A (en)1993-03-26

Family

ID=17415584

Family Applications (1)

Application NumberTitlePriority DateFiling Date
JP3265322APendingJPH0573415A (en)1991-09-171991-09-17Hierarchized cache system

Country Status (1)

CountryLink
JP (1)JPH0573415A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6256708B1 (en)1996-08-282001-07-03Nec CorporationAuxiliary buffer for direct map cache
US6385697B1 (en)1998-12-152002-05-07Nec CorporationSystem and method for cache process
KR100479589B1 (en)*2002-10-012005-04-06엘지전자 주식회사Apparatus for Composing Content Addressable Memory

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6256708B1 (en)1996-08-282001-07-03Nec CorporationAuxiliary buffer for direct map cache
US6385697B1 (en)1998-12-152002-05-07Nec CorporationSystem and method for cache process
KR100479589B1 (en)*2002-10-012005-04-06엘지전자 주식회사Apparatus for Composing Content Addressable Memory

Similar Documents

PublicationPublication DateTitle
US5903911A (en)Cache-based computer system employing memory control circuit and method for write allocation and data prefetch
US5283886A (en)Multiprocessor cache system having three states for generating invalidating signals upon write accesses
KR100278328B1 (en) Cache miss buffer
US5119485A (en)Method for data bus snooping in a data processing system by selective concurrent read and invalidate cache operation
US5157774A (en)System for fast selection of non-cacheable address ranges using programmed array logic
US7032074B2 (en)Method and mechanism to use a cache to translate from a virtual bus to a physical bus
US5802559A (en)Mechanism for writing back selected doublewords of cached dirty data in an integrated processor
US6453388B1 (en)Computer system having a bus interface unit for prefetching data from system memory
JPH0659976A (en)Method for reloading delayed push into copy back data cache
US8621152B1 (en)Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access
US5678025A (en)Cache coherency maintenance of non-cache supporting buses
US5367659A (en)Tag initialization in a controller for two-way set associative cache
US6976130B2 (en)Cache controller unit architecture and applied method
US5619673A (en)Virtual access cache protection bits handling method and apparatus
US5950227A (en)CPU write-back cache coherency mechanism that transfers data from a cache memory to a main memory after access of the main memory by an alternative bus master
JPH0573415A (en)Hierarchized cache system
JPH07121443A (en)Information process system and its operating method
JPH08110874A (en)Computer system with look-aside cache system
KR20040047398A (en)Method for data access using cache memory
JP2976980B2 (en) Cache control method
JPH0449445A (en)Hierarchical cache system
JPH05342101A (en) Hierarchical cache memory
JPH04353948A (en)Cache memory and cache memory system
JPH01226056A (en)Address converter
JPH10207773A (en)Bus connecting device

[8]ページ先頭

©2009-2025 Movatter.jp