JPH05120140A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH05120140A
JPH05120140A JP3282806A JP28280691A JPH05120140A JP H05120140 A JPH05120140 A JP H05120140A JP 3282806 A JP3282806 A JP 3282806A JP 28280691 A JP28280691 A JP 28280691A JP H05120140 A JPH05120140 A JP H05120140A
Authority
JP
Japan
Prior art keywords
cache
data
cache memory
stack level
memory
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.)
Withdrawn
Application number
JP3282806A
Other languages
Japanese (ja)
Inventor
Tomokazu Abe
智和 阿部
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.)
Toshiba Corp
Toshiba Computer Engineering Corp
Original Assignee
Toshiba Corp
Toshiba Computer Engineering Corp
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 Toshiba Corp, Toshiba Computer Engineering Corp filed Critical Toshiba Corp
Priority to JP3282806A priority Critical patent/JPH05120140A/en
Publication of JPH05120140A publication Critical patent/JPH05120140A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To improve the cache hit rate by eliminating such a defective case where the pest useful cache date are driven out of a cache memory as a program runs. CONSTITUTION:The cache memories CM0, CM1 and CM2 are provided with the gates 15, 25 and 35 which the input of the control signals to the directory parts 12, 22 end 32 and the valid bit parts 13, 23 and 33 from the cache control parts 11, 21 and 31 respectively. A stack level control part 16 controls the stack level in response to the subroutine call/return instructions of a program and then outputs the signals 151, 251 and 351 to the gates 15, 25 and 35 corresponding to the controlled stack levels. Thus the part 16 selects the memories CM0, CM1 and CM2 to attain the read mishit processing.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、情報処理装置において
用いられるキャッシュメモリ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device used in an information processing device.

【0002】[0002]

【従来の技術】従来から、キャッシュメモリは、平均メ
モリアクセス時間の短縮化等コンピュータアークテクチ
ャにおける大幅な性能向上を目的として有効に用いられ
ている。 図4はキャッシュメモリの基本的な構成を示
すブロック図である。同図において、1はキャッシュ制
御部、2は主メモリアドレスの上位(MAU)をタグデ
ータとして保持するRAM(ディレクトリ部)、3はバ
リッドビットを保持するRAM(バリッドビット部)、
4はメモリデータを保持するRAM(データ部)であ
る。また101は主メモリアドレスの下位データ(C
A)、102は主メモリアドレスの上位データ(MA
U)、103はキャッシュ制御部1とバリッドビット部
3との間で転送されるバリッドビット、104はキャッ
シュ制御部1とディレクトリ部2との間で転送されるタ
グデータである。さらに105はキャッシュ制御部1か
らディレクトリ部2およびバリッドビット部3に送られ
る制御信号であり、ディレクトリ部2およびバリッドビ
ット部3に書込みを行うときアクティブとなる。106
はキャッシュ制御部1からデータ部4に送られる制御信
号であり、データ部4に書込みを行うときアクティブと
なる。そして107はバスデータである。
2. Description of the Related Art Conventionally, cache memory has been effectively used for the purpose of greatly improving the performance in computer architecture such as shortening the average memory access time. FIG. 4 is a block diagram showing the basic configuration of the cache memory. In the figure, 1 is a cache control unit, 2 is a RAM (directory unit) that holds the upper (MAU) of the main memory address as tag data, and 3 is a RAM (valid bit unit) that holds valid bits,
Reference numeral 4 denotes a RAM (data section) that holds memory data. Further, 101 is lower data (C
A) and 102 are upper data (MA) of the main memory address.
U), 103 are valid bits transferred between the cache control unit 1 and the valid bit unit 3, and 104 is tag data transferred between the cache control unit 1 and the directory unit 2. Further, 105 is a control signal sent from the cache control unit 1 to the directory unit 2 and the valid bit unit 3, which becomes active when writing to the directory unit 2 and the valid bit unit 3. 106
Is a control signal sent from the cache control unit 1 to the data unit 4, and becomes active when writing to the data unit 4. 107 is bus data.

【0003】ここでディレクトリ部2は、信号105が
インアクティブ時、主メモリアドレスの下位データ10
1によって指定されたタグデータ104をキャッシュ制
御部1に出力し、信号105がアクティブ時、キャッシ
ュ制御部1より与えられた主メモリアドレスの上位デー
タ102を入力してCA番地に書き込むと共にCA番地
のバリッドビットをセットする。さらにデータ部4は信
号106がアクティブのときバスデータ107をCA番
地に書き込む。
Here, the directory portion 2 is arranged such that when the signal 105 is inactive, the lower data 10 of the main memory address
The tag data 104 designated by 1 is output to the cache control unit 1, and when the signal 105 is active, the high-order data 102 of the main memory address given by the cache control unit 1 is input and written in the CA address, and at the same time, in the CA address. Set the valid bit. Further, the data section 4 writes the bus data 107 in the CA address when the signal 106 is active.

【0004】図5は主メモリアドレスとキャッシュロウ
アドレスとの関係を示す図である。同図に示すように、
主メモリアドレスMAにおける0ビットからmビットま
でがキャッシュロウアドレスCAとなり、m+1ビット
からnビットまでがタグデータとして扱われる。なお、
mはキャッショ容量により決定される。
FIG. 5 is a diagram showing the relationship between the main memory address and the cache row address. As shown in the figure,
Bits 0 to m in the main memory address MA are the cache row address CA, and bits m + 1 to n are treated as tag data. In addition,
m is determined by the cachet capacity.

【0005】次にこのキャッシュメモリの動作を説明す
る。
Next, the operation of this cache memory will be described.

【0006】まずメモリリードの動作を図6を用いて説
明する。同図において、(1) はリードミスヒット時のデ
ータの流れ、(2) はリードヒット時のデータの流れであ
る。中央処理装置CPが主メモリMMの主メモリアドレ
スMAによりメモリリードを開始すると、キャッシュメ
モリCMのキャッシュ制御部1は、主メモリアドレスM
AのキャッシュロウアドレスCAを基にディレクトリ部
2およびバリッドビット部3からタグデータおよびバリ
ッドビッドを読出し、このタグデータと主メモリアドレ
スMAの上位(MAU)とを比較する。この結果、リー
ドミスヒットつまり不一致または一致したとしてもディ
レクトリ部2から読出されたバリッドビットがリセット
状態であれば、中央処理装置CPからのリード要求によ
って主メモリMMのMA番地のデータ“AAAA”が1
語読出されて、中央処理装置CP内のリードバッファR
BとキャッシュメモリCMのデータ部4のCA番地にセ
ットされる。同時にディリクトリ部2のCA番地にはタ
グデータとして主メモリアドレスの上位(MAU)がセ
ットされると共にバリッドビット部3のCA番地にバリ
ッドビットがセットされる。
First, the memory read operation will be described with reference to FIG. In the figure, (1) is the data flow at the time of a read miss, and (2) is the data flow at the time of a read hit. When the central processing unit CP starts a memory read at the main memory address MA of the main memory MM, the cache control unit 1 of the cache memory CM causes the main memory address M to be read.
Based on the cache row address CA of A, the tag data and the valid bit are read from the directory section 2 and the valid bit section 3, and this tag data is compared with the high order (MAU) of the main memory address MA. As a result, if the read mishit, that is, the mismatch or the valid bit read from the directory unit 2 is in the reset state even if the data match, the data "AAAA" at the address MA in the main memory MM is set to 1 by the read request from the central processing unit CP.
The word is read and the read buffer R in the central processing unit CP is read.
B is set to the CA address of the data portion 4 of the cache memory CM. At the same time, the higher address (MAU) of the main memory address is set as the tag data in the CA address of the directory unit 2 and the valid bit is set in the CA address of the valid bit unit 3.

【0007】またリードヒットつまりキャッシュメモリ
CMから読出されたタグデータと主メモリアドレスの上
位(MAU)とが一致しかつバリッドビットがセット状
態の場合、キャッシュ制御部1はデータ部4のCA番地
からデータ“AAAA”を読出し、これを中央処理装置
CP内のリードバッファRBにセットする。
If the read hit, that is, the tag data read from the cache memory CM and the upper (MAU) of the main memory address match and the valid bit is set, the cache control unit 1 starts from the CA address of the data unit 4. The data "AAAAA" is read and set in the read buffer RB in the central processing unit CP.

【0008】次にメモリライトの動作を図7を用いて説
明する。同図において、(1) はライトミスヒット時のデ
ータの流れ、(2) はライトヒット時のデータの流れであ
る。中央処理装置CPが主メモリMMの主メモリアドレ
スMAによりメモリライトを開始すると、キャッシュメ
モリCMのキャッシュ制御部1は、前記と同様にディレ
クトリ部2から読出されたタグデータと主メモリアドレ
スMAの上位(MAU)とを比較する。この結果、ライ
トミスヒットの場合は、中央処理装置CPからのライト
要求によりライトバッファWBのデータ“BBBB”を
主メモリMMのMA番地に書き込む。
Next, the memory write operation will be described with reference to FIG. In the figure, (1) is the data flow at the time of a write miss hit, and (2) is the data flow at the time of a write hit. When the central processing unit CP starts the memory write at the main memory address MA of the main memory MM, the cache control unit 1 of the cache memory CM causes the tag data read from the directory unit 2 and the higher order of the main memory address MA as described above. Compare with (MAU). As a result, in the case of a write miss hit, the data "BBBB" in the write buffer WB is written to the address MA of the main memory MM in response to a write request from the central processing unit CP.

【0009】またライトヒットの場合は、中央処理装置
CP内のライトバッファWBのデータ“CCCC”をキ
ャッシュメモリCMのデータ部4のCA番地に書き込む
と共にディレクトリ部2のCA番地に主メモリアドレス
の上位(MAU)を書き込む。また主メモリMMに対し
てもMA番地にライトバッファWRのデータ“CCC
C”が書き込まれる。
In the case of a write hit, the data "CCCC" of the write buffer WB in the central processing unit CP is written in the CA address of the data section 4 of the cache memory CM, and the high order of the main memory address is set in the CA address of the directory section 2. Write (MAU). Also, for the main memory MM, the data "CCC" of the write buffer WR is placed at the address MA
C ″ is written.

【0010】なお、この例では簡単のため1レベルを例
にしたが、実際には2レベル/4レベル方式が一般的だ
と思われる。また仮にマルチレベル方式にした場合、個
々のキャッシュメモリをマルチレベル方式と想定するこ
ともできる。
In this example, one level is taken as an example for the sake of simplicity, but it seems that the two level / 4 level system is actually common. Further, if the multi-level system is used, each cache memory can be assumed to be the multi-level system.

【0011】しかしながら、このようなキャッシュメモ
リでは、例えばプログラムにおいてAモジュールがBモ
ジュールを呼び出し、Bモジュールで大量にメモリデー
タを使用したとすると、Aモジュールでロードしたキャ
ッシュデータの一部若しくは全てがキャッシュメモリか
ら追い出されてしまい、Aモジュールに処理が戻ったと
きキャッシュヒット率が著しく落ちてしまうと言う問題
があった。
However, in such a cache memory, if, for example, the A module calls the B module in a program and the B module uses a large amount of memory data, some or all of the cache data loaded by the A module is cached. There is a problem that the cache hit rate drops significantly when the process is returned to the A module because it has been evicted from the memory.

【0012】[0012]

【発明が解決しようとする課題】本発明はこのような課
題を解決するためのもので、プログラムが進むごとに過
去の有益なキャッシュデータがキャッシュメモリから追
い出されることをなくし、キャッシュヒット率の向上を
図ることのできるキャッシュメモリ装置の提供を目的と
している。
SUMMARY OF THE INVENTION The present invention is intended to solve such a problem and prevents the useful cached data of the past from being expelled from the cache memory each time the program progresses, thus improving the cache hit rate. It is an object of the present invention to provide a cache memory device capable of achieving the above.

【0013】[0013]

【課題を解決するための手段】本発明のキャッシュメモ
リ装置は上記した目的を達成するために、スタックレベ
ルに対応する複数のキャッシュメモリと、プログラムの
サブルーチンコール/リターン命令に応じてスタックレ
ベルを増減管理し、このスタックレベルに対応する前記
キャッシュメモリのみリードミスヒット処理可能状態と
なるよう制御を行うスタックレベル制御手段とを具備し
ている。
In order to achieve the above object, the cache memory device of the present invention increases or decreases the stack level according to a plurality of cache memories corresponding to the stack level and a subroutine call / return instruction of the program. A stack level control means for managing and controlling so that only the cache memory corresponding to this stack level is in a read mishit processable state.

【0014】[0014]

【作用】本発明のキャッシュメモリ装置では、スタック
レベル制御手段が、プログラムのサブルーチンコール/
リターン命令に応じてスタックレベルを増減管理し、現
在のスタックレベルに対応するキャッシュメモリのみリ
ードミスヒット処理可能状態となるよう制御を行うこと
により、各スタックレベルのキャッシュデータを別々の
キャッシュメモリに書込む。これにより、あるスタック
レベルのプログラムのメモリアクセスによって他のスタ
ックレベルのキャッシュデータがキャッシュメモリから
追い出されることがなくなり、キャッシュヒット率の向
上を図ることができる。
In the cache memory device of the present invention, the stack level control means is a subroutine call / program
The stack level is increased or decreased according to the return instruction, and the cache data corresponding to the current stack level is controlled to be in the read mishit processable state, so that the cache data of each stack level is written in a separate cache memory. .. This prevents the cache data of another stack level from being expelled from the cache memory by the memory access of the program of a certain stack level, and the cache hit rate can be improved.

【0015】[0015]

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

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

【0017】同図において、11、21、31はキャッ
シュ制御部、12、22、32は主メモリアドレスの上
位(MAU)をタグデータとして保持するRAM(ディ
レクトリ部)、13、23、33はバリッドビットを保
持するRAM(バリッドビット部)、14、24、34
はメモリデータを保持するRAM(データ部)である。
また15、25、35はキャッシュ制御部11、21、
31からディレクトリ部12、22、32およびバリッ
ドビット部13、23、33への制御信号の入力を切り
替えるゲート、16はプログラムのサブルーチンコール
/リターン命令に応じてスタックレベルを増減管理し、
スタックレベルに対応するゲート15、25、35に信
号151、251、351を出力するスタックレベル制
御部である。このように、本実施例のキャッシュメモリ
装置は、複数のキャッシュメモリセット(この例では第
1〜第3のキャッシュメモリCM0、CM1、CM2)
を有して構成されている。
In the figure, 11, 21, and 31 are cache control units, 12, 22, and 32 are RAMs (directory units) that hold upper (MAU) of main memory addresses as tag data, and 13, 23, and 33 are valid. RAM for holding bits (valid bit part), 14, 24, 34
Is a RAM (data section) that holds memory data.
Further, reference numerals 15, 25, and 35 are cache control units 11 and 21,
A gate for switching the input of the control signal from 31 to the directory units 12, 22, 32 and the valid bit units 13, 23, 33, 16 increases and decreases the stack level according to the subroutine call / return instruction of the program,
The stack level control unit outputs signals 151, 251, 351 to the gates 15, 25, 35 corresponding to the stack level. As described above, the cache memory device of this embodiment includes a plurality of cache memory sets (in this example, the first to third cache memories CM0, CM1, and CM2).
Is configured.

【0018】また、111は主メモリアドレスの下位デ
ータ(CA)、112は主メモリアドレスの上位データ
(MAU)、113はキャッシュ制御部11、21、3
1とバリッドビット部13、23、33との間で転送さ
れるバリッドビット、114はキャッシュ制御部11、
21、31とディレクトリ部12、22、32との間で
転送されるタグデータである。また115はキャッシュ
制御部11、21、31からディレクトリ部12、2
2、32およびバリッドビット部13、23、33に送
られる前記の制御信号であり、リードミスヒット処理時
等ディレクトリ部12、22、32およびバリッドビッ
ト部13、23、33に書込みを行うときアクティブと
なる。さらに116はキャッシュ制御部11、21、3
1からデータ部14、24、34に出力される制御信号
であり、データ部14、24、34に書込みを行うとき
アクティブとなる。そして117はバスデータである。
Further, 111 is the lower data (CA) of the main memory address, 112 is the upper data (MAU) of the main memory address, and 113 is the cache control units 11, 21, and 3.
1 is a valid bit transferred between 1 and the valid bit units 13, 23 and 33, 114 is the cache control unit 11,
It is the tag data transferred between 21, 31 and the directory sections 12, 22, 32. Further, 115 is from the cache control units 11, 21, 31 to the directory units 12, 2
2 and 32 and the above-mentioned control signals sent to the valid bit units 13, 23 and 33, which are active when writing to the directory units 12, 22, 32 and the valid bit units 13, 23 and 33 during read mishit processing. Become. Further, 116 is the cache control units 11, 21, and 3.
1 is a control signal output to the data units 14, 24 and 34, and becomes active when writing to the data units 14, 24 and 34. And 117 is bus data.

【0019】次にこのキャッシュメモリ装置の動作を図
2および図3を用いて説明する。なお、図2はプログラ
ムの流れとスタックレベルとの関係を示す図である。同
図に示すように、スタックレベルは、スタックレベル制
御部16の管理下で、メインモジュールの実行に際し
“0”、メインモジュールからコールされるサブモジュ
ール1の実行に際し“1”、サブモジュール1からコー
ルされるサブモジュール2の実行の際し“2”にそれぞ
れ設定される。また図3は図2に示したプログラムの流
れに沿う各キャッシュメモリCM0、CM1、CM2の
状態の変化を示している。
Next, the operation of the cache memory device will be described with reference to FIGS. 2 is a diagram showing the relationship between the flow of the program and the stack level. As shown in the figure, the stack level is controlled by the stack level control unit 16 to be “0” when the main module is executed, “1” when the sub module 1 called from the main module is executed, and the sub module 1 from the sub module 1. When the called sub-module 2 is executed, it is set to "2" respectively. FIG. 3 shows changes in the states of the cache memories CM0, CM1, and CM2 along the program flow shown in FIG.

【0020】まず中央処理装置(図示せず)にて図2に
示したメインモジュールを処理する場合、スタックレベ
ル制御部16にてスタックレベルは“0”に設定され
る。するとスタックレベル制御部16から第1のキャッ
シュメモリCM0のゲート15への信号151がアクテ
ィブとなってゲート15が閉じ、キャッシュ制御部11
の制御信号115がディレクトリ部12およびバリッド
ビット部13に入力される。これにより、第1のキャッ
シュメモリCM0におけるリードミスヒット処理が可能
な状態になる。またこの間、他のキャッシュメモリCM
1、CM2のゲート25、35は開いた状態のままとな
っており、これらのキャッシュメモリCM1、CM2に
おいてリードミスヒット処理は行われることはない。そ
の後、第1のキャッシュメモリCM0においてリードミ
スヒット処理が行われることにより、第1のキャッシュ
メモリCM0にメインメモリ(図示せず)のA領域のデ
ータがロードされる(図3−a)。
First, when the central processing unit (not shown) processes the main module shown in FIG. 2, the stack level control unit 16 sets the stack level to "0". Then, the signal 151 from the stack level control unit 16 to the gate 15 of the first cache memory CM0 becomes active, the gate 15 is closed, and the cache control unit 11
Control signal 115 is input to the directory unit 12 and the valid bit unit 13. As a result, the read mishit processing in the first cache memory CM0 becomes possible. During this period, another cache memory CM
The gates 25 and 35 of 1 and CM2 are still in the open state, and the read mishit processing is not performed in these cache memories CM1 and CM2. Thereafter, the read mishit processing is performed in the first cache memory CM0, so that the data in the area A of the main memory (not shown) is loaded into the first cache memory CM0 (FIG. 3-a).

【0021】次に、メインモジュールからのサブルーチ
ンコール命令によりサブモジュール1が呼び出される
と、スタックレベル制御部16はスタックレベルをカウ
ントアップして“1”にする。するとスタックレベル制
御部16から第2のキャッシュメモリCM1のゲート2
5への信号251がアクティブとなってゲート25が閉
じ、第2のキャッシュメモリCM1のリードミスヒット
処理が可能な状態となる。その後、同様にリードミスヒ
ット処理が行われると、第2のキャッシュメモリCM1
にメインメモリのB領域のデータがロードされる(図3
−b)。
Next, when the sub module 1 is called by the subroutine call instruction from the main module, the stack level control unit 16 counts up the stack level to "1". Then, from the stack level control unit 16 to the gate 2 of the second cache memory CM1.
The signal 251 to 5 becomes active, the gate 25 is closed, and the read mishit process of the second cache memory CM1 becomes possible. After that, when the read mishit processing is performed in the same manner, the second cache memory CM1
The data in area B of the main memory is loaded into (Fig. 3
-B).

【0022】次にサブモジュール1からサブモジュール
2が呼び出されるとスタックレベルは“2”にカウント
アップされ、同様に信号351がアクティブになって第
3のキャッシュメモリCM2がリードミスヒット処理可
能状態になる。そしてリードミスヒット処理が行われる
ことによって、第3のキャッシュメモリCM2にメイン
メモリのC領域のデータがロードされる(図3−c)。
Next, when the submodule 1 is called from the submodule 1, the stack level is counted up to "2", the signal 351 is similarly activated, and the third cache memory CM2 becomes in the read mishit processable state. .. Then, by performing the read mishit processing, the data in the area C of the main memory is loaded into the third cache memory CM2 (FIG. 3C).

【0023】この後、リターン命令によってサブモジュ
ール1に戻ると、スタックレベルはカウントダウンされ
て“1”になり、再び第2のキャッシュメモリCM1が
リードミスヒット処理可能状態となる。但し、図3−d
に示すように、このときサブモジュール1で使用するB
領域のデータは第2のキャッシュメモリCM1に残って
いることから、メインメモリから再び同じデータをロー
ドしなければならないような事態は回避することができ
る。
After that, when returning to the sub-module 1 by the return instruction, the stack level is counted down to "1", and the second cache memory CM1 becomes ready for read mishit processing again. However, FIG.
As shown in, B used in submodule 1 at this time
Since the data in the area remains in the second cache memory CM1, it is possible to avoid the situation where the same data must be loaded again from the main memory.

【0024】その後のリターン命令でメインモジュール
に戻った時も同様に、図3−eに示すように、第1のキ
ャッシュメモリCM0にメインモジュールで使用するA
領域のデータが残っていることから、同じデータをロー
ドする必要はない。
Similarly, when returning to the main module by a subsequent return instruction, as shown in FIG. 3-e, the A used in the main module for the first cache memory CM0 is also used.
It is not necessary to load the same data because the area data remains.

【0025】以上リードミスヒット時の動作を説明した
が、その他のリードヒット時およびライト時の制御はス
タックレベル制御部16とは無関係であり、すべてのキ
ャッシュメモリCM0、CM1、CM2が機能して処理
が行われる。
Although the operation at the time of read miss hit has been described above, other control at the time of read hit and write is not related to the stack level control unit 16, and all the cache memories CM0, CM1 and CM2 function and perform processing. Is done.

【0026】かくしてこの実施例のキャッシュメモリ装
置によれば、プログラムのサブルーチンコール/リター
ン命令に応じてスタックレベルを増減管理して、スタッ
クレベルに対応するキャッシュメモリのみリードミスヒ
ット処理可能状態とし、各スタックレベルのキャッシュ
データを別々のキャッシュメモリCM0、CM1、CM
2に書込むようにすることで、あるスタックレベルのプ
ログラムのメモリアクセスによって他のスタックレベル
のキャッシュデータが追い出されるような事態を回避で
き、キャッシュヒット率の向上を図ることができる。
Thus, according to the cache memory device of this embodiment, the stack level is increased / decreased in accordance with the subroutine call / return instruction of the program, and only the cache memory corresponding to the stack level is set to the read mishit processable state, and each stack is processed. Level cache data is stored in separate cache memories CM0, CM1, CM
By writing to 2, it is possible to avoid the situation where the memory access of the program of a certain stack level causes the cache data of another stack level to be expelled, and the cache hit rate can be improved.

【0027】なお、この実施例では、キャッシュメモリ
のレベル(スタックレベルとは異なる。)を“1”とし
たが、個々のキャッシュメモリはマルチレベル(FIFO/L
RU方式等の置換アルゴリズムによる制御)であってもよ
い。すなわち、本発明は、個々のキャッシュメモリの方
式に限定を要するものではなく、回路構成の自由度が高
いというメリットを有する。
Although the cache memory level (different from the stack level) is set to "1" in this embodiment, each cache memory has a multi-level (FIFO / L) level.
Control by a replacement algorithm such as the RU method). That is, the present invention does not need to limit the method of each cache memory, and has an advantage that the degree of freedom of the circuit configuration is high.

【0028】またLRU 方式等によるレベル制御において
はレベル数の増加に伴い制御ロジックが大幅に増大する
難点があるが、本発明は制御が単純なので制御ロジック
の増大を招かずにレベル数を増やせると言う効果も奏す
る。したがって、キャッシュヒット率を上げる手段とし
てマルチレベル方式のみでレベル数を増やす方法より、
マルチレベル方式のキャッシュメモリを本発明による方
式で組み合わせることによってレベル数を増やす方法の
方がコストパフォーマンスの点で効果的である。 さら
に、この実施例では、プログラムのサブルーチンコール
/リターン命令に応じてスタックレベルを増減管理する
方式を採ったが、プログラムにおける特定の区切り(例
えばタスク、モジュール)でスタックレベルを増減管理
するようにしてもよい。
Further, in the level control by the LRU method or the like, there is a problem that the control logic greatly increases as the number of levels increases, but since the control is simple in the present invention, the number of levels can be increased without increasing the control logic. It also has the effect of saying. Therefore, as a means of increasing the cache hit rate, rather than increasing the number of levels only with the multi-level method,
The method of increasing the number of levels by combining the cache memory of the multi-level method with the method according to the present invention is more effective in terms of cost performance. Further, in this embodiment, the stack level is increased / decreased according to the subroutine call / return instruction of the program, but the stack level is increased / decreased at a specific break (for example, task or module) in the program. Good.

【0029】[0029]

【発明の効果】以上説明したように本発明のキャッシュ
メモリ装置によれば、スタックレベルに対応するキャッ
シュメモリのみリードミスヒット処理可能状態とするこ
とによって、あるスタックレベルのプログラムのメモリ
アクセスによって他のスタックレベルのキャッシュデー
タがキャッシュメモリから追い出されるような事態を回
避することができ、この結果、キャッシュヒット率の向
上を図ることができる。
As described above, according to the cache memory device of the present invention, only the cache memory corresponding to the stack level is set in the read mishit processable state, so that a memory access of a program at a certain stack level causes another stack to be processed. It is possible to avoid the situation where the cache data of the level is evicted from the cache memory, and as a result, the cache hit rate can be improved.

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

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

【図2】プログラムの流れとスタックレベルとの関係を
示す図である。
FIG. 2 is a diagram showing a relationship between a program flow and a stack level.

【図3】図2に示したプログラムの流れに沿った各キャ
ッシュメモリの状態の変化を示す図である。
3 is a diagram showing changes in the state of each cache memory along the flow of the program shown in FIG.

【図4】キャッシュメモリの基本的な構成を示すブロッ
ク図である。
FIG. 4 is a block diagram showing a basic configuration of a cache memory.

【図5】主メモリアドレスとキャッシュロウアドレスと
の関係を示す図である。
FIG. 5 is a diagram showing a relationship between a main memory address and a cache row address.

【図6】従来のキャッシュメモリにおけるメモリリード
の動作を説明するための図である。
FIG. 6 is a diagram for explaining a memory read operation in a conventional cache memory.

【図7】従来のキャッシュメモリにおけるメモリライト
の動作を説明するための図である。
FIG. 7 is a diagram for explaining a memory write operation in a conventional cache memory.

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

11、21、31…キャッシュ制御部、12、22、3
2…ディレクトリ部、13、23、33…バリッドビッ
ト部、14、24、34…データ部、15、25、35
…ゲート、16…スタックレベル制御部、CM0、CM
1、CM2…キャッシュメモリ。
11, 21, 31 ... Cache control unit, 12, 22, 3
2 ... Directory part, 13, 23, 33 ... Valid bit part, 14, 24, 34 ... Data part, 15, 25, 35
... gate, 16 ... stack level control unit, CM0, CM
1, CM2 ... Cache memory.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 スタックレベルに対応する複数のキャッ
シュメモリと、 プログラムのサブルーチンコール/リターン命令に応じ
てスタックレベルを増減管理し、このスタックレベルに
対応する前記キャッシュメモリのみリードミスヒット処
理可能状態となるよう制御を行うスタックレベル制御手
段とを具備することを特徴とするキャッシュメモリ装
置。
1. A plurality of cache memories corresponding to a stack level, and a stack level is increased / decreased and managed according to a subroutine call / return instruction of a program, and only the cache memory corresponding to the stack level becomes a read mishit processable state. And a stack level control means for performing such control.
JP3282806A 1991-10-29 1991-10-29 Cache memory device Withdrawn JPH05120140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3282806A JPH05120140A (en) 1991-10-29 1991-10-29 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3282806A JPH05120140A (en) 1991-10-29 1991-10-29 Cache memory device

Publications (1)

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

Family

ID=17657330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3282806A Withdrawn JPH05120140A (en) 1991-10-29 1991-10-29 Cache memory device

Country Status (1)

Country Link
JP (1) JPH05120140A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202621A (en) * 1995-01-27 1996-08-09 Nec Ibaraki Ltd Cache controller
JP2015060376A (en) * 2013-09-18 2015-03-30 富士通株式会社 Cache memory control program, processor including cache memory, and cache memory control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202621A (en) * 1995-01-27 1996-08-09 Nec Ibaraki Ltd Cache controller
JP2015060376A (en) * 2013-09-18 2015-03-30 富士通株式会社 Cache memory control program, processor including cache memory, and cache memory control method

Similar Documents

Publication Publication Date Title
US5343437A (en) Memory having nonvolatile and volatile memory banks
US6404691B1 (en) Semiconductor memory device for simple cache system
JP2714944B2 (en) Semiconductor storage device
US5019971A (en) High availability cache organization
US6141287A (en) Memory architecture with multilevel hierarchy
US7185141B1 (en) Apparatus and method for associating information values with portions of a content addressable memory (CAM) device
US5045996A (en) Multiprocessor cache memory housekeeping
US5313602A (en) Multiprocessor system and method of control over order of transfer of data between buffer storages
US6078532A (en) Method and apparatus for improving performance of DRAM subsystems with SRAM overlays
JPH0616272B2 (en) Memory access control method
US6314494B1 (en) Dynamically size configurable data buffer for data cache and prefetch cache memory
US5130947A (en) Memory system for reliably writing addresses with reduced power consumption
JPH05120140A (en) Cache memory device
KR100224775B1 (en) Pre-fetching method and its application in memory device
JP4176719B2 (en) Multi-port memory cell
US20010034808A1 (en) Cache memory device and information processing system
US9430379B1 (en) Dynamic random access memory controller
US6279082B1 (en) System and method for efficient use of cache to improve access to memory of page type
JPH04369061A (en) Control system for cache memory
JP3360902B2 (en) Semiconductor storage device
JPH1055308A (en) Cache memory
JPH0291744A (en) Cache memory system
JPS61214039A (en) Cache memory
JP2531822B2 (en) Instruction read-ahead device
JPH0239339A (en) Cache memory device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990107