JPH10133948A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH10133948A
JPH10133948A JP8288866A JP28886696A JPH10133948A JP H10133948 A JPH10133948 A JP H10133948A JP 8288866 A JP8288866 A JP 8288866A JP 28886696 A JP28886696 A JP 28886696A JP H10133948 A JPH10133948 A JP H10133948A
Authority
JP
Japan
Prior art keywords
cache
data
write
state
address
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
JP8288866A
Other languages
Japanese (ja)
Inventor
Takashi Nagumo
隆司 南雲
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.)
NEC Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP8288866A priority Critical patent/JPH10133948A/en
Publication of JPH10133948A publication Critical patent/JPH10133948A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve throughput by reducing access time to a main storage device. SOLUTION: A processor 10 is provided with a locking instruction control part 12 instructing a locked state prohibiting the rewriting of a cache link of a cache memory 30 and a free instruction control part 13 for releasing the locked state. A locked bit area 40 for setting the locked or free state of the cache line is provided in the cache directory 37 of the cache memory 30. At the time of cache hit, access to the cache line of the cache memory 30 is executed. At the time of cache mis-hit, the cache memory 30 is bypassed to access the main storage device when the cache line is in the locked state, but read replacing or write allocate is executed when the cache line is in the free state.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データ処理システ
ムなどにおいて、プロセッサと主記憶装置との間に位置
するキャッシュメモリ装置に関するものである。
The present invention relates to a cache memory device located between a processor and a main storage device in a data processing system or the like.

【0002】[0002]

【従来の技術】例えば、コンピュータシステムのような
データ処理システムにおいては、主記憶装置とプロセッ
サとの間に、主記憶装置よりも高速動作が可能なキャッ
シュメモリを設け、このキャッシュメモリによってプロ
セッサが頻繁にアクセスするデータを一時的に保持する
ことで、プロセッサの処理速度の向上を図る構成が広く
採用されている。
2. Description of the Related Art For example, in a data processing system such as a computer system, a cache memory capable of operating at a higher speed than a main storage device is provided between a main storage device and a processor. In order to improve the processing speed of a processor by temporarily storing data to be accessed, a configuration is widely adopted.

【0003】このキャッシュメモリを用いた装置(キャ
ッシュメモリ装置)としては、ライトバック方式(ライ
トバックキャッシュ)と称されるものが従来より用いら
れている。このライトバック方式では、プロセッサによ
るデータの書き込みの際にはキャッシュメモリ上のデー
タだけが更新され、主記憶装置は更新されない。そし
て、キャッシュメモリ上で更新されたデータは、例えば
キャッシュメモリのディレクトリ更新の際に、キャッシ
ュメモリから主記憶装置に書き戻し(ライトバック)さ
れる。
As a device (cache memory device) using this cache memory, a device called a write-back method (write-back cache) has been used. In the write-back method, when data is written by the processor, only the data in the cache memory is updated, and the main storage device is not updated. Then, the data updated in the cache memory is written back (written back) from the cache memory to the main storage device, for example, when the directory of the cache memory is updated.

【0004】上記のようなライトバック方式を用いたキ
ャッシュメモリ装置の一例を以下に説明する。図10に
おいて、プロセッサ60は、アドレス制御部11、割り
込み制御部15、命令デコーダ61、リード/ライト制
御部16などを有している。キャッシュメモリ70は、
リード/ライト指示部36、キャッシュ・ディレクトリ
71、比較器42、データ・キャッシュ46などから構
成される。さらに、プロセッサ60とキャッシュメモリ
70とは、アドレス線21、データ線24、並びにリー
ド/ライト線26などで接続されている。
An example of a cache memory device using the above-described write-back method will be described below. 10, the processor 60 includes an address control unit 11, an interrupt control unit 15, an instruction decoder 61, a read / write control unit 16, and the like. The cache memory 70
It comprises a read / write instruction unit 36, a cache directory 71, a comparator 42, a data cache 46 and the like. Further, the processor 60 and the cache memory 70 are connected by an address line 21, a data line 24, a read / write line 26, and the like.

【0005】プロセッサ60を構成するアドレス制御部
11は、命令に従って処理を実行するためのアドレス2
1を出力する。リード/ライト制御部16は、処理を実
行する動作がリードかライトかをリード/ライト線26
を通じて出力する。命令デコーダ61は、データ24に
よる命令を解析し、この結果に基づいて、アドレス制御
部11とリード/ライト制御部16の動作を制御する。
また、特別な動作として、割り込み制御部15は、割り
込み25が要求されると、アドレス制御部11およびリ
ード/ライト制御部16の割り込み制御を行う。また、
キャッシュメモリ70においては、プロセッサ60のア
ドレス制御部11からのアドレス21は、アドレス31
のように、タグ・アドレス32とセット・アドレス33
とに分割され、それぞれキャッシュ・ディレクトリ71
あるいは比較器42に送られる。
[0005] The address control unit 11 constituting the processor 60 has an address 2 for executing processing in accordance with an instruction.
Outputs 1. The read / write control unit 16 determines whether the operation for executing the process is a read or write operation by the read / write line 26.
Output through The instruction decoder 61 analyzes an instruction based on the data 24 and controls the operations of the address control unit 11 and the read / write control unit 16 based on the result.
As a special operation, when the interrupt 25 is requested, the interrupt control unit 15 controls the interrupt of the address control unit 11 and the read / write control unit 16. Also,
In the cache memory 70, the address 21 from the address control unit 11 of the processor 60 is the address 31
, The tag address 32 and the set address 33
And the cache directory 71
Alternatively, it is sent to the comparator 42.

【0006】ここで、タグ・アドレス32は、キャッシ
ュ・ディレクトリ71に登録されたタグ・データ72と
の比較のために用いられる。また、セット・アドレス3
3は、キャッシュ・ディレクトリ71のライン・アドレ
ス(ライン番号)を指定するために用いられる。
Here, the tag address 32 is used for comparison with tag data 72 registered in the cache directory 71. Also, set address 3
Reference numeral 3 is used to specify a line address (line number) of the cache directory 71.

【0007】また、キャッシュ・ディレクトリ71は、
セット・アドレス33の分だけの深さを持ち、タグ・デ
ータ72、バリッド・ビット73およびダーティ・ビッ
ト74を有する。また、タグ・データ72は、キャッシ
ュ・リード・リプレースまたはキャッシュ・ライト・ア
ロケートによりキャッシュ・ディレクトリ71に登録さ
れるタグ・アドレス32の値である。バリッド・ビット
73は、セット・アドレス33により示されるキャッシ
ュ・ラインの有効(valid)/無効(invali
d)を示す。さらに、ダーティ・ビット74は、ライト
バック方式に特有のビットであり、キャッシュメモリ7
0と主記憶装置50とのデータが一致している場合には
クリーン(clean)を、一致していない場合にはダ
ーティ(dirty)を、それぞれ示す。
The cache directory 71 is
It has a depth corresponding to the set address 33, and has tag data 72, a valid bit 73 and a dirty bit 74. The tag data 72 is the value of the tag address 32 registered in the cache directory 71 by cache read replace or cache write allocate. The valid bit 73 indicates whether the cache line indicated by the set address 33 is valid / invalid.
d) is shown. Further, the dirty bit 74 is a bit unique to the write-back method, and
If the data of 0 and the main storage device 50 match, this indicates clean, and if they do not match, it indicates dirty.

【0008】比較器42は、キャッシュ・ディレクトリ
71のタグ・データ72とプロセッサ60により要求さ
れるタグ・アドレス32とを比較する。そして、これら
が一致している場合、つまり、キャッシュメモリ70上
に要求するブロックが存在する場合には、キャッシュ・
ヒット(論理値「1」)であり、データ・キャッシュ4
6に対してアクセス動作が行われる。なお、データ・キ
ャッシュ46は、プロセッサ60からのデータ・アクセ
ス情報を保持するメモリである。また、タグ・データ7
2とタグ・アドレス32と一致していない場合には、キ
ャッシュ・ミス・ヒット(論理値「0」)であり、リー
ド・リプレース動作あるいはライト・アロケート動作が
行われる。このとき、入れ替え対象のキャッシュ・ディ
レクトリ71のラインがダーティである場合には、キャ
ッシュメモリ70と主記憶装置50との一貫性を保つた
め、主記憶装置50にデータの書き戻しが行われる。
[0008] The comparator 42 compares the tag data 72 of the cache directory 71 with the tag address 32 requested by the processor 60. If they match, that is, if the requested block exists in the cache memory 70, the cache
Hit (logical value "1"), data cache 4
6 is accessed. The data cache 46 is a memory for holding data access information from the processor 60. Also, tag data 7
If 2 does not match the tag address 32, it is a cache miss hit (logical value "0"), and a read replace operation or a write allocate operation is performed. At this time, if the line of the cache directory 71 to be replaced is dirty, data is written back to the main storage device 50 in order to maintain consistency between the cache memory 70 and the main storage device 50.

【0009】次に、図11〜図13を参照して、この従
来例の動作を説明する。なお、以下の説明では、便宜
上、バス幅とキャッシュ・ラインのサイズとは等しいも
のとする。つまり、例えば、バス幅が8ビットの場合に
はキャッシュ・ラインのサイズは1byteであり、バ
ス幅が32ビットの場合には同じく4byte(1wo
rd)であるとする。
Next, the operation of this conventional example will be described with reference to FIGS. In the following description, for convenience, the bus width and the size of the cache line are assumed to be equal. That is, for example, when the bus width is 8 bits, the size of the cache line is 1 byte, and when the bus width is 32 bits, the size of the cache line is also 4 bytes (1 WOW).
rd).

【0010】図11は、あるキャッシュ・ラインに対し
てプロセッサ60からリードまたはライトの要求が出さ
れたとき、キャッシュメモリ70の状態により、どのよ
うな動作ないし処理が実行されるかを示したものであ
る。この図11で示す各実行動作のうち、ライト要求の
際の動作を図12を用いて、またリード要求の際の動作
を図11を用いて、それぞれ以下に説明する。
FIG. 11 shows what operation or processing is executed depending on the state of the cache memory 70 when a read or write request is issued from a processor 60 to a certain cache line. It is. Of the execution operations shown in FIG. 11, the operation at the time of a write request will be described with reference to FIG. 12, and the operation at the time of a read request will be described with reference to FIG.

【0011】まず、図12を参照して、ライト動作は次
の(1)〜(3)のように行われる。 (1)キャッシュ・ヒット この場合には、プロセッサ60により要求されたアドレ
ス21がキャッシュメモリ70に登録されていることか
ら、キャッシュメモリ70にデータが直接書き込まれる
(キャッシュ・データ・ライト動作)。なお、この場
合、キャッシュメモリ70と主記憶装置50とに不一致
が生じるので、以前のキャッシュ・ラインの状態にかか
わらず、ダーティ・ビット74はダーティになる(図1
2(a))。
First, referring to FIG. 12, a write operation is performed as in the following (1) to (3). (1) Cache hit In this case, since the address 21 requested by the processor 60 is registered in the cache memory 70, data is directly written to the cache memory 70 (cache data write operation). In this case, since a mismatch occurs between the cache memory 70 and the main storage device 50, the dirty bit 74 becomes dirty regardless of the state of the previous cache line (FIG. 1).
2 (a)).

【0012】(2)キャッシュ・ミス・ヒット(キャッ
シュ・ラインがクリーン) この場合には、プロセッサ60により要求されたアドレ
スがキャッシュメモリ70に登録されていないので、現
在登録されているキャッシュ・ディレクトリ71を置き
換える必要がある。このとき、現在登録されているキャ
ッシュ・ディレクトリ71内のキャッシュ・ラインの状
態がクリーン/ダーティの何れかによって動作が異な
る。そして、キャッシュ・ラインがクリーンの場合に
は、キャッシュメモリ70と主記憶装置50とのデータ
が一致しているので、キャッシュメモリ70にデータが
直接書き込まれるのと同時に、キャッシュ・ディレクト
リ71が再登録される(キャッシュ・ライト・アロケー
ト動作)。このとき、書き込まれたキャッシュ・ライン
はダーティとなる(図12(b))。なお、キャッシュ
・ラインがダーティの場合の動作は以下の(3)で説明
する。
(2) Cache miss hit (cache line is clean) In this case, since the address requested by the processor 60 is not registered in the cache memory 70, the currently registered cache directory 71 Need to be replaced. At this time, the operation differs depending on whether the state of the cache line in the currently registered cache directory 71 is clean or dirty. When the cache line is clean, since the data in the cache memory 70 and the data in the main storage device 50 match, the data is directly written into the cache memory 70 and the cache directory 71 is re-registered at the same time. (Cache write allocate operation). At this time, the written cache line becomes dirty (FIG. 12B). The operation when the cache line is dirty will be described in the following (3).

【0013】(3)キャッシュ・ミス・ヒット(キャッ
シュ・ラインがダーティ) この場合、キャッシュメモリ70と主記憶装置50との
データが不一致であるので、キャッシュ・ディレクトリ
71のアドレスを置き換える前に、現在登録されている
キャッシュ・ラインのデータが主記憶装置50に書き戻
される(ライト・バック動作;図12(c)のサイクル
0)。次に、キャッシュメモリ70にデータを直接書き
込むと同時に、キャッシュ・ディレクトリ71が再登録
される(キャッシュ・ライト・アロケート動作)。この
場合には、キャッシュ・ラインはダーティとなる(図1
2(c)のサイクル1)。
(3) Cache miss hit (cache line is dirty) In this case, since the data in the cache memory 70 and the data in the main storage device 50 do not match, before replacing the address of the cache directory 71, The data of the registered cache line is written back to the main storage device 50 (write-back operation; cycle 0 in FIG. 12C). Next, the data is directly written into the cache memory 70, and at the same time, the cache directory 71 is re-registered (cache write allocate operation). In this case, the cache line becomes dirty (FIG. 1).
2 (c) cycle 1).

【0014】次に、図13を参照して、リード動作は次
の(11)〜(13)のように行われる。 (11)キャッシュ・ヒット この場合、要求されたアドレスがキャッシュメモリ70
に登録されているので、キャッシュメモリ70からデー
タを直接読み出す(キャッシュ・データ・リード動
作)。このとき、キャッシュ・ラインの状態は、クリー
ン/ダーティの何れか従前の状態を保持する(図13
(a))。
Next, referring to FIG. 13, the read operation is performed as in the following (11) to (13). (11) Cache hit In this case, the requested address is stored in the cache memory 70
, The data is directly read from the cache memory 70 (cache data read operation). At this time, the state of the cache line retains the previous state of either clean or dirty (FIG. 13).
(A)).

【0015】(12)キャッシュ・ミス・ヒット(キャ
ッシュ・ライン状態はクリーン) この場合には、要求されたアドレスがキャッシュメモリ
70に登録されていないので、現在登録されているキャ
ッシュ・ディレクトリ71に代えて、アドレスを置き換
えることが必要になる。このとき、現在登録されている
キャッシュ・ディレクトリ71内のキャッシュ・ライン
の状態がクリーンかダーティかによって動作が異なる。
そして、キャッシュ・ラインの状態がクリーンであれ
ば、キャッシュメモリ70と主記憶装置50とのデータ
が一致しているので、要求されたアドレスのデータを主
記憶装置50から読み出すと同時に、キャッシュメモリ
70にも書き込み、かつキャッシュ・ディレクトリ71
の再登録を行う(キャッシュ・リード・リプレース動
作)。この場合、キャッシュ・ライン状態はクリーンと
なる(図13(b))。
(12) Cache miss hit (cache line state is clean) In this case, since the requested address is not registered in the cache memory 70, the cache directory 71 is replaced with the currently registered cache directory 71. Need to replace the address. At this time, the operation differs depending on whether the state of the cache line in the currently registered cache directory 71 is clean or dirty.
If the state of the cache line is clean, the data in the cache memory 70 and the data in the main storage device 50 match, so that the data at the requested address is read from the main storage device 50 and , And the cache directory 71
Is re-registered (cache read replace operation). In this case, the cache line state becomes clean (FIG. 13B).

【0016】(13)キャッシュ・ミス・ヒット(キャ
ッシュ・ライン状態はダーティ) この場合、キャッシュメモリ70と主記憶装置50のデ
ータが不一致であるので、キャッシュ・ディレクトリ7
1の再登録前に、現在登録されているキャッシュ・ライ
ンのデータを主記憶装置50に書き戻す(ライト・バッ
ク動作;図13(c)のサイクル0)。次に、要求され
たアドレスのデータを主記憶装置50から読み出すと同
時に、キャッシュメモリ70書き込み、かつキャッシュ
・ディレクトリの再登録を行う(キャッシュ・リード・
リプレース動作)。このとき、キャッシュ・ライン状態
は、クリーンになる(図13(c)のサイクル1)。
(13) Cache miss hit (cache line state is dirty) In this case, since the data in the cache memory 70 and the data in the main storage device 50 do not match, the cache directory 7
Before the re-registration of 1, the data of the currently registered cache line is written back to the main storage device 50 (write-back operation; cycle 0 in FIG. 13C). Next, the data at the requested address is read from the main storage device 50, and at the same time, the cache memory 70 is written and the cache directory is re-registered (cache read / write).
Replace operation). At this time, the cache line state becomes clean (cycle 1 in FIG. 13C).

【0017】また、図10のキャッシュメモリにおい
て、スタック積み上げと引き出しの動作との間に、別ア
ドレスによる同一キャッシュ・ラインに対するライト・
アクセスが実行された場合の動作を説明する。図14を
参照して、この場合の動作は次の(21)〜(23)の
ようになる。 (21)スタックへの積み上げ(キャッシュ・ヒットと
仮定する) キャッシュ・ヒットであるので、直接キャッシュメモリ
上にスタック・データを積み上げる。このとき、キャッ
シュ・ラインの状態はダーティである(図14
(a))。
In the cache memory shown in FIG. 10, between the stack stacking operation and the pulling-out operation, a write / write operation to the same cache line by another address is performed.
The operation when the access is performed will be described. Referring to FIG. 14, the operation in this case is as follows (21) to (23). (21) Stacking on the stack (assuming a cache hit) Since this is a cache hit, stack data is directly stacked on the cache memory. At this time, the state of the cache line is dirty (FIG. 14).
(A)).

【0018】(22)別アドレスによる同一キャッシュ
・ラインに対するライト アクセスがキャッシュ・ミス・ヒットとなるので、まず
現在登録されているキャッシュ・ラインのデータを主記
憶装置50に書き戻す(図14(b)のサイクル0)。
次に、ライト・アクセスを行い、キャッシュメモリ70
にデータを書き込み、かつキャッシュ・ディレクトリに
再登録する。このとき、キャッシュ・ラインの状態はダ
ーティである(図14(b)のサイクル1)。
(22) Since a write access to the same cache line by another address results in a cache miss hit, the data of the currently registered cache line is first written back to the main storage device 50 (FIG. 14 (b) ) Cycle 0).
Next, a write access is performed, and the cache memory 70
And re-register it in the cache directory. At this time, the state of the cache line is dirty (cycle 1 in FIG. 14B).

【0019】(23)スタックからの引き出し このアクセスもキャッシュ・ミス・ヒットとなるので、
まず現在登録されているキャッシュ・ラインのデータを
主記憶装置50に書き戻す(図14(c)のサイクル
0)。次に、本来のリード・アクセスを行い、主記憶装
置50からデータを読み出す。同時に、キャッシュメモ
リにもデータを書き込み、かつキャッシュ・ディレクト
リを再登録する。このとき、キャッシュ・ラインの状態
はクリーンである(図14(c)のサイクル1)。
(23) Extraction from the stack This access also results in a cache miss hit.
First, the data of the currently registered cache line is written back to the main storage device 50 (cycle 0 in FIG. 14C). Next, original read access is performed, and data is read from the main storage device 50. At the same time, data is written to the cache memory and the cache directory is re-registered. At this time, the state of the cache line is clean (cycle 1 in FIG. 14C).

【0020】ここで、上記のキャッシュメモリでは、プ
ロセッサの処理能力に大きく関わるアクセス時間の比率
が、キャッシュ・ヒット対キャッシュ・ミス・ヒット
(主記憶装置へのアクセス)で1対5以上にもなってし
まう。また、この比率は、キャッシュ・ラインのサイズ
が大きくなる程増大する。そして、上記のように主記憶
装置に書き込みを行わずにキャッシュメモリだけに書き
込むというライトバック方式を採ることで、主記憶装置
へのアクセスを極力減らして処理能力の向上を図ること
ができる。
Here, in the above cache memory, the ratio of the access time largely related to the processing capability of the processor is 1 to 5 or more in the ratio of cache hit to cache miss (access to the main storage device). Would. This ratio also increases as the size of the cache line increases. Then, as described above, by adopting the write-back method of writing only to the cache memory without writing to the main storage device, access to the main storage device can be reduced as much as possible to improve processing performance.

【0021】[0021]

【発明が解決しようとする課題】しかしながら、上記の
ようなライトバック方式のキャッシュメモリには、次の
ような問題がある。つまり、ライトバック方式では、キ
ャッシュメモリ内のキャッシュ・ディレクトリが置き換
えられた場合、先に登録されているデータを主記憶に書
き戻すことが必要となり、更に、この書き戻されたデー
タに再びアクセスがあった場合には、主記憶装置にアク
セスしなければならない。
However, the above-described write-back cache memory has the following problems. That is, in the write-back method, when the cache directory in the cache memory is replaced, it is necessary to write back the previously registered data to the main memory, and further, the written back data is accessed again. If so, the main storage must be accessed.

【0022】そして、スタックの積み上げ/引き出し、
テーブルの更新/参照の様に頻繁に利用されアクセスさ
れるデータに対して、例えば、スタックの積み上げやテ
ーブル更新の後に、他の処理でのアクセスによってキャ
ッシュ・ラインが更新されキャッシュ・ディレクトリが
置き換えられることで上記の様な状況が発生した場合、
キャッシュメモリの置き換えによる主記憶へのアクセス
回数が増えることから、アクセス時間が増大し、処理能
力の低下を招いてしまう。また、この場合、キャッシュ
・ラインの更新によってキャッシュ・ヒット数も低下し
てしまう。さらに、ライトバック方式であるために、主
記憶装置に書き戻すという余分なオーバヘッドも生じ
て、アクセス時間がさらに長くなってしまう。このこと
は、特に、セットアドレスが1面(way)しかないダ
イレクトマッピング方式(1wayセット・アソシエィ
ティブ・マッピング方式)において影響が特に大きく、
処理能力を低下させる要因となる。また、この場合、ラ
イト・アロケート動作が、主記憶装置からキャッシュ・
ライン単位でロードした後にキャッシュメモリにデータ
を書き込むことになるので、オーバヘッドがさらに増し
てしまう。
And stacking / drawing stacks,
For data that is frequently used and accessed like updating / referencing a table, for example, after stacking or updating the table, the cache line is updated and the cache directory is replaced by access in another process. If the above situation occurs,
Since the number of accesses to the main memory due to the replacement of the cache memory increases, the access time increases and the processing performance decreases. Also, in this case, the number of cache hits is reduced by updating the cache line. Furthermore, since the write-back method is used, an extra overhead of writing back to the main storage device occurs, and the access time is further increased. This is particularly significant in a direct mapping system in which the set address has only one way (one way set associative mapping system).
This is a factor that lowers the processing capacity. Further, in this case, the write allocate operation is performed by the cache memory from the main storage device.
Since data is written to the cache memory after loading in line units, the overhead is further increased.

【0023】例えば、キャッシュ・ヒット対ライン当た
りの主記憶装置へのアクセス時間比を1クロック対5ク
ロックとした場合、上記で説明した例では、17(1+
(5+1)+(5+5))クロックとなる。そして、主
記憶装置へのアクセスは15クロックとなる。また、こ
のうち、ミス・ヒット時において一貫性を保つために主
記憶装置へ書き戻すアクセスのために10クロックの時
間がとられる。
For example, if the ratio of cache hit to access time to the main memory per line is 1 clock to 5 clocks, in the example described above, 17 (1+
(5 + 1) + (5 + 5)) clocks. The access to the main storage device takes 15 clocks. Also, of these, 10 clocks are required for access to write back to the main storage device in order to maintain consistency at the time of a miss hit.

【0024】なお、上記で例示したキャッシュメモリで
は、バス幅(ビット数)とキャッシュ・ラインサイズを
等しくしたために主記憶装置へのアクセス時間が比較的
小さかったが、キャッシュ・ライン・サイズがバス幅の
2n 倍になると主記憶へのアクセス、特に、主記憶への
書き戻す動作の比重が高くなり、アクセス時間が増大す
る。さらに、この場合、ライト・アローケート動作が、
主記憶装置からキャッシュ・ライン単位でロードした後
に、キャッシュメモリにデータを書き込むことになるの
で、さらにオーバーヘッドが増大してしまう。
In the cache memory exemplified above, the access time to the main storage device is relatively short because the bus width (the number of bits) and the cache line size are equal, but the cache line size is different from the bus width. 2n times, the access to the main memory, in particular, the operation of writing back to the main memory becomes high, and the access time increases. Furthermore, in this case, the write-allocate operation
After the data is loaded from the main storage device in units of cache lines, the data is written to the cache memory, so that the overhead is further increased.

【0025】また、キャッシュ・ミス・ヒット時のライ
トアローケート動作は、バス幅に対して、キャッシュ・
ラインのサイズが大きい場合、キャッシュ・ライトする
以前に、主記憶からキャッシュ・ライン単位のロードを
行う必要があり、これにより主記憶装置へのアクセスが
増えてアクセス時間が増大する原因となる。ここで、上
記の欠点は、頻繁に利用されアクセスされるデータがキ
ャッシュメモリから追い出され、他のデータに置き換え
られてしまうことにより発生する問題である。
The write-allocate operation at the time of a cache miss / hit is performed with respect to the bus width.
If the size of the line is large, it is necessary to load the cache memory from the main memory in units of cache lines before performing a cache write. This causes an increase in access to the main storage device and an increase in access time. Here, the above drawback is a problem that occurs when frequently used and accessed data is evicted from the cache memory and replaced with other data.

【0026】本発明は、キャッシュ・ヒット率を向上さ
せ、主記憶装置へのアクセス回数を減らして処理能力の
向上を図ることができる、キャッシュメモリ装置を提供
することを課題としている。
An object of the present invention is to provide a cache memory device capable of improving the cache hit rate, reducing the number of accesses to the main storage device, and improving the processing performance.

【0027】[0027]

【課題を解決するための手段】本発明のキャッシュメモ
リ装置は、プロセッサと主記憶装置との間に設けられた
ライトバック方式のキャッシュメモリ装置において、前
記プロセッサから前記主記憶装置に対してリード/ライ
トされるデータを一時的に保持する少なくとも1つのア
ドレスを有するメモリ部と、前記メモリ部の各アドレス
におけるデータのリード/ライトを制御するメモリ管理
部と、前記メモリ部の各アドレスをデータ置き換えがで
きないロック状態とデータ置き換えが可能なフリー状態
のいずれにか設定するロック制御部とを有し、前記メモ
リ管理部は、前記メモリ部の特定のアドレスがロック状
態のときにおいて、このアドレスに前記プロセッサから
リード/ライトのアクセスがされた際、このアクセスに
対応するデータが前記アドレスに存在しないキャッシュ
・ミス・ヒットの場合には、前記アクセスを前記主記憶
装置にバイパスさせることを特徴とする。
According to the present invention, there is provided a cache memory device of a write-back system provided between a processor and a main storage device, wherein the processor reads / writes data from / to the main storage device. A memory unit having at least one address for temporarily holding data to be written, a memory management unit for controlling reading / writing of data at each address of the memory unit, and data replacement for each address of the memory unit. A lock control unit that sets either a lock state in which data cannot be replaced or a free state in which data can be replaced, and the memory management unit stores the processor address in a specific address of the memory unit when the memory unit is in a locked state. When a read / write access is made from the In the case of a cache miss hit that does not exist in the serial address, characterized in that to bypass the access to the main storage device.

【0028】本発明において、前記ロック制御部は、前
記プロセッサからの指示により、前記メモリ部の各アド
レスを、フリー状態からロック状態に、あるいはロック
状態からフリー状態にそれぞれ移行させる。また、例え
ば、メモリ部の特定のメモリのフリー状態からロック状
態への移行は、そのアドレスに対するプロセッサからの
ライトの際に行われる。さらに、メモリ部の特定のアド
レスのロック状態からフリー状態への移行は、プロセッ
サからのリード/ライトのアクセスに対応するデータが
このアドレスに存在するキャッシュ・ヒットの際におい
て、プロセッサからのリードの際に行われる。
In the present invention, the lock control section shifts each address of the memory section from the free state to the locked state or from the locked state to the free state in accordance with an instruction from the processor. Also, for example, the transition from the free state to the locked state of a specific memory in the memory unit is performed when the processor writes to that address. Further, the transition from the locked state to the free state of a specific address in the memory unit is performed when a cache hit where data corresponding to read / write access from the processor exists at this address, or when reading from the processor. Done in

【0029】さらに、上記のようなフリー状態からロッ
ク状態への移行のためのロック指示、あるいはロック状
態からフリー状態への移行のためのフリー指示は、例え
ば、スタックの積み上げや引き出しの時において頻繁に
使用されるアクセス頻度の高いデータに対して行われ
る。
Further, the lock instruction for shifting from the free state to the locked state or the free instruction for shifting from the locked state to the free state is frequently issued, for example, when stacking or pulling out a stack. This is performed for frequently accessed data used for

【0030】[0030]

【発明の実施の形態】以下に、本発明のキャッシュメモ
リ装置の実施の形態を説明する。図1に示した実施形態
のキャッシュメモリ装置は、プロセッサ10、キャッシ
ュメモリ30、およびこれらプロセッサ10とキャッシ
ュメモリ30との間のアドレス線21、ロック指示線2
2、フリー指示線23、データ線24、割り込み線2
5、リード/ライト線26、などから構成されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a cache memory device according to the present invention will be described below. The cache memory device according to the embodiment shown in FIG. 1 includes a processor 10, a cache memory 30, and an address line 21 and a lock instruction line 2 between the processor 10 and the cache memory 30.
2. Free instruction line 23, data line 24, interrupt line 2
5, read / write lines 26, and the like.

【0031】プロセッサ10は、アドレス制御部11、
ロック指示制御部12、フリー指示制御部13、命令デ
コーダ14、割り込み制御部15、リード/ライト制御
部16、などから構成される。キャッシュメモリ30
は、ロック指示部34、フリー指示部35、リードライ
ト指示部36、キャッシュ・ディレクトリ37、比較器
42、バイパス判定器43、ディレクトリ置き換え判定
器44、ロック・ビット制御部45、データ・キャッシ
ュ46などから構成される。
The processor 10 includes an address control unit 11,
It comprises a lock instruction control unit 12, a free instruction control unit 13, an instruction decoder 14, an interrupt control unit 15, a read / write control unit 16, and the like. Cache memory 30
Are a lock instruction unit 34, a free instruction unit 35, a read / write instruction unit 36, a cache directory 37, a comparator 42, a bypass determination unit 43, a directory replacement determination unit 44, a lock bit control unit 45, a data cache 46, and the like. Consists of

【0032】ここで、プロセッサ10は、データ線24
を通じて読み込まれた命令を命令デコーダ14により解
析する。この解析の結果、通常のアクセスであれば、ア
ドレス制御部11およびリードライト制御部16にそれ
ぞれ通知する。また、解析の結果、例えば、スタックへ
のストアおよびロック指示付きストア命令などのスタッ
クへのライト動作であれば、ロック指示制御部12に通
知する(ロック指示付きライト動作)。さらに、解析の
結果、例えば、スタックからのロードおよびフリー指示
付きロード命令などのリード動作であれば、フリー指示
制御部13に通知する(フリー指示付きリード動作)。
アドレス制御部11は、次に実行するアドレス21を出
力する。
Here, the processor 10 is connected to the data line 24
The instruction read through the instruction is analyzed by the instruction decoder 14. As a result of this analysis, if it is a normal access, it notifies the address control unit 11 and the read / write control unit 16 respectively. Further, as a result of the analysis, for example, if the operation is a write operation to the stack such as a store instruction to the stack and a store instruction with a lock instruction, the lock instruction control unit 12 is notified (write operation with a lock instruction). Further, as a result of the analysis, for example, in the case of a read operation such as a load instruction from the stack or a load instruction with a free instruction, the read instruction control unit 13 is notified (read operation with a free instruction).
The address control unit 11 outputs an address 21 to be executed next.

【0033】リード/ライト制御部16は、次に実行す
る処理がリード動作かライト動作かをリードライト線2
6を通じて出力する。ロック指示制御部12は、ロック
指示付きライト動作時において、ロック指示線22を通
じてステータスを出力する。フリー指示制御部13は、
フリー指示付きライト動作時にステータスをフリー指示
線23を通じて出力する。また、特別な動作として、割
り込み線25を通じて割り込みが要求されると、割り込
み制御部15が動作し、アドレス制御部11、リード/
ライト制御部16およびロック指示制御部12に通知す
る(ロック指示付きライト動作)。
The read / write control unit 16 determines whether the process to be executed next is a read operation or a write operation by the read / write line 2.
Output through 6. The lock instruction control unit 12 outputs a status through the lock instruction line 22 during a write operation with a lock instruction. The free instruction control unit 13
The status is output through the free instruction line 23 at the time of the write operation with the free instruction. As a special operation, when an interrupt is requested through the interrupt line 25, the interrupt control unit 15 operates and the address control unit 11, the read /
It notifies the write control unit 16 and the lock instruction control unit 12 (write operation with lock instruction).

【0034】キャッシュメモリ30は、プロセッサ10
からアドレス線21を通じて送られたアドレスをタグ・
アドレス32とセット・アドレス33に分割し、これら
をキャッシュ・ディレクトリ37と比較器42にそれぞ
れ送る。なお、図10の場合と同様に、タグ・アドレス
32はキャッシュ・ディレクトリ37に登録されたタグ
・データ38と比較するために、またセット・アドレス
33はキャッシュ・ディレクトリ37のライン・アドレ
ス(ライン番号)を指定するためにそれぞれ用いられ
る。
The cache memory 30 is
From the address line 21 via the address line 21
The address is divided into an address 32 and a set address 33, and these are sent to the cache directory 37 and the comparator 42, respectively. 10, the tag address 32 is compared with the tag data 38 registered in the cache directory 37, and the set address 33 is the line address (line number) of the cache directory 37. ) Is used to specify each.

【0035】キャッシュ・ディレクトリ37は、セット
・アドレス33分の深さを持ち、またタグ・データ3
8、バリッド・ビット39、ロック・ビット40および
ダーティ・ビット41を有する。タグ・データ38は、
キャッシュ・リード・リプレースまたはキャッシュ・ラ
イト・アロケートによりキャッシュ・ディレクトリ37
に登録されるタグ・アドレス32の値である。
The cache directory 37 has a depth equal to the set address 33 and has the tag data 3
8, valid bit 39, lock bit 40 and dirty bit 41. Tag data 38 is
Cache directory 37 by cache read replace or cache write allocate
Is the value of the tag address 32 registered in.

【0036】バリッド・ビット39は、セット・アドレ
ス33により示されるキャッシュ・ラインの有効(va
lid)/無効(invalid)を示す。ロック・ビ
ット40は、キャッシュ・ラインのロック/フリー状態
を示す。ダーティ・ビット41は、キャッシュ・ライン
と主記憶装置50とのデータが一致(クリーン)/不一
致(ダーティ)を示す。比較器42は、キャッシュ・デ
ィレクトリ37のタグ・データ38とプロセッサ10に
より要求されたタグ・アドレス32とを比較して、キャ
ッシュ・ヒット/ミス・ヒットの判定を行い、ヒットの
場合にはHIT信号を出力する。また、キャッシュ・ミ
ス・ヒットの場合、ロック・ビット40の状態が次のよ
うに確認される。
The valid bit 39 indicates whether the valid (va) of the cache line indicated by the set address 33 is valid.
lid) / invalid. Lock bit 40 indicates the locked / free state of the cache line. The dirty bit 41 indicates that data between the cache line and the main storage device 50 match (clean) / mismatch (dirty). The comparator 42 compares the tag data 38 in the cache directory 37 with the tag address 32 requested by the processor 10 to determine a cache hit / miss hit. Is output. In the case of a cache miss hit, the state of the lock bit 40 is confirmed as follows.

【0037】すなわち、ロック・ビット40がロック状
態であれば、バイパス判定器43は、キャッシュ・バイ
パスであると判定し、論理値「1」をBYPASS信号
として出力する。また、フリー状態であれば、キャッシ
ュ・ディレクトリの置き換えであるから、ディレクトリ
置き換え判定器44はキャッシュ・リード・リプレース
またはキャッシュ・ライト・アロケートであると判定
し、論理値「1」をREPLACE信号として出力す
る。
That is, if the lock bit 40 is in the locked state, the bypass determiner 43 determines that the cache is a bypass, and outputs a logical value “1” as a BYPASS signal. If it is in the free state, the cache directory is to be replaced. Therefore, the directory replacement determining unit 44 determines that the cache read / replace or cache write allocate is performed, and outputs a logical value “1” as a REPLACE signal. I do.

【0038】さらに、ロック・ビット制御部45は、プ
ロセッサ10からロック指示部34、フリー指示部3
5、リードライト指示部36および比較器42、バイパ
ス判定器43、ディレクトリ置き換え判定器44を介し
て出力される情報により、キャッシュ・ラインのロック
・ビットの状態を制御し、ロックであれば論理値「1」
を、またフリーであれば論理値「0」をそれぞれ出力す
る。なお、上記のように、データ・キャッシュ46は、
プロセッサ10からのデータ・アクセス情報を保持する
メモリである。
Further, the lock / bit control unit 45 sends the lock instruction unit 34 and the free instruction unit 3 from the processor 10.
5. The state of the lock bit of the cache line is controlled by the information output through the read / write instruction unit 36 and the comparator 42, the bypass determiner 43, and the directory replacement determiner 44. "1"
, And if free, outputs a logical value “0”. Note that, as described above, the data cache 46
This is a memory that holds data access information from the processor 10.

【0039】この実施の形態のキャッシュメモリにおけ
るロック・ビットの制御を図2と図3により説明する。
まず、図2を参照して、スタックの積み上げ(ストア)
/引き出し時のロック・ビット制御を示す。 (31)スタックの積み上げの場合、スタックに対する
ライト動作時に、プロセッサ10は自動的にロック指示
を要求する。この時、セットアドレス33により示され
るキャッシュ・ラインの状態がフリーであれば、スタッ
クに対するライト動作終了時にロック・ビット40をロ
ック状態に変更する(図2(a))。
The control of the lock bit in the cache memory of this embodiment will be described with reference to FIGS.
First, referring to FIG. 2, stacking (store) of a stack
/ Lock bit control at the time of pull-out. (31) In the case of stacking, the processor 10 automatically requests a lock instruction during a write operation on the stack. At this time, if the state of the cache line indicated by the set address 33 is free, the lock bit 40 is changed to the locked state at the end of the write operation on the stack (FIG. 2A).

【0040】(32)スタックの引き出しの場合、スタ
ックに対するリード動作時に、プロセッサ10は自動的
にフリー指示を要求する。この時、セットアドレス33
で示されたキャッシュ・ラインがキャッシュ・ヒットで
かつロック状態であれば、スタックに対するリード動作
終了時にロック・ビット40をフリー状態に変更する
(図2(b))。
(32) In the case of pulling out a stack, the processor 10 automatically requests a free instruction during a read operation on the stack. At this time, the set address 33
If the cache line indicated by is a cache hit and is in the locked state, the lock bit 40 is changed to the free state at the end of the read operation on the stack (FIG. 2B).

【0041】また、ロック指示付きストア(ロック指示
付きライト命令)/フリー指示付きロード(フリー指示
付きリード命令)の実行時におけるロック・ビット制御
における動作は、上記のロック・ビット制御と同様に、
図2(a)あるいは図2(b)のように行われる。な
お、これらのロック指示付きストア命令、フリー指示付
きロード命令は、本発明においてプロセッサ10に新た
に追加された命令であり、プログラマブルに行うことが
できる点が、上記のロック・ビット制御とは異なる。
The operation of the lock bit control at the time of executing the store with lock instruction (write instruction with lock instruction) / load with free instruction (read instruction with free instruction) is similar to the above-described lock bit control.
This is performed as shown in FIG. 2A or 2B. The store instruction with a lock instruction and the load instruction with a free instruction are instructions newly added to the processor 10 in the present invention, and are different from the lock bit control described above in that they can be performed programmably. .

【0042】図3に、ロック・ビット40の状態遷移を
示した。すなわち、ロック・ビット40は、次の(4
1)〜(44)のようにその状態が遷移する。 (41)フリー状態からロック状態への移行 フリー状態S2のキャッシュ・ラインに対して、ロック
指示付きライト動作が実行されることで、ロック状態S
1へ移行する(S3)。なお、プロセッサ10がスタッ
クの積み上げまたはロック指示付きストア命令を実行す
ると、キャッシュメモリ30はヒットかミス・ヒットか
を判定する。そして、ヒットであれば、キャッシュメモ
リ30にデータを書き込むと同時に、キャッシュ・ディ
レクトリ37をロック状態にする。また、ミス・ヒット
であれば、そのキャッシュ・ディレクトリ37がフリー
状態であることを確認し、ライトアロケート動作を行う
と同時にロック状態にする。
FIG. 3 shows the state transition of the lock bit 40. That is, the lock bit 40 becomes the next (4)
The state transitions as shown in 1) to (44). (41) Transition from Free State to Locked State A write operation with a lock instruction is performed on the cache line in the free state S2, and the locked state S
1 (S3). Note that when the processor 10 executes a stack stack or a store instruction with a lock instruction, the cache memory 30 determines whether it is a hit or a miss hit. If a hit occurs, data is written to the cache memory 30 and the cache directory 37 is locked at the same time. In the case of a miss hit, it is confirmed that the cache directory 37 is in a free state, and a write allocate operation is performed, and at the same time, a lock state is set.

【0043】(42)ロック状態 ロック状態S1のキャッシュ・ラインに対して、ロック
指示付きライト動作、通常のリード/ライト、およびミ
ス・ヒットの際のフリー指示付きリード動作が実行され
る場合には、ロック状態S1を保持する(S5)。な
お、プロセッサ10からのアクセス要求に対して、キャ
ッシュメモリ30はヒットかミス・ヒットかを判定す
る。また、フリー指示付きリード以外のヒットであれ
ば、キャッシュメモリ30にアクセスする。この時、キ
ャッシュ・ディレクトリ37はロック状態のままであ
る。また、ミス・ヒットであれば、キャッシュ・ディレ
クトリ37がロック状態であることを確認し、キャッシ
ュをバイパスし、主記憶装置50にアクセスする。この
時、キャッシュ・ディレクトリ37はロック状態のまま
である。
(42) Lock State In the case where a write operation with a lock instruction, a normal read / write operation, and a read operation with a free instruction in the case of a miss hit are performed on the cache line in the lock state S1, Then, the locked state S1 is held (S5). Note that, in response to an access request from the processor 10, the cache memory 30 determines whether it is a hit or a miss hit. If the hit is other than a read with a free instruction, the cache memory 30 is accessed. At this time, the cache directory 37 remains locked. In the case of a miss hit, it is confirmed that the cache directory 37 is locked, the cache is bypassed, and the main storage device 50 is accessed. At this time, the cache directory 37 remains locked.

【0044】(43)ロック状態からフリー状態への移
行 ロック状態S1のキャッシュ・ラインに対して、キャッ
シュ・ヒットの際のフリー指示付きリード動作が実行さ
れることで、フリー状態S2に移行する(S4)。な
お、プロセッサ10がスタックの引き出しまたはフリー
指示付きロード命令を実行すると、キャッシュメモリ3
0はヒットかミス・ヒットを判定する。そして、ミス・
ヒットであれば、ロック状態は解除されない(キャッシ
ュバイパス動作を行う)。また、ヒットであれば、キャ
ッシュメモリ30からデータを読み出すと同時に、キャ
ッシュ・ディレクトリ37をフリー状態にする。
(43) Transition from the Locked State to the Free State The cache line in the locked state S1 is shifted to the free state S2 by executing a read operation with a free instruction at the time of a cache hit (see FIG. 4). S4). When the processor 10 executes the stack instruction or the load instruction with the free instruction, the cache memory 3
0 determines a hit or a miss hit. And miss
If it is a hit, the locked state is not released (cache bypass operation is performed). In the case of a hit, data is read from the cache memory 30 and the cache directory 37 is set in the free state at the same time.

【0045】(44)フリー状態 フリー状態S2のキャッシュ・ラインに対して、フリー
指示付きリード、および通常のリード/ライト動作が実
行される場合には、フリー状態S2を保持する(S
6)。なお、プロセッサ10からのアクセス要求に対し
て、キャッシュメモリ30はヒットかミス・ヒットかを
判定する。そして、ロック指示付きライト以外のヒット
であれば、キャッシュメモリ30にアクセスする。この
時、キャッシュ・ディレクトリ37はフリー状態のまま
である。また、ロック指示付きライト以外のミス・ヒッ
トであれば、リードリプレースまたはライトアロケート
動作を行う。この時、キャッシュ・ディレクトリ37は
フリー状態のままである。
(44) Free State When a read with a free instruction and a normal read / write operation are performed on the cache line in the free state S2, the free state S2 is held (S
6). Note that, in response to an access request from the processor 10, the cache memory 30 determines whether it is a hit or a miss hit. If the hit is other than a write with a lock instruction, the cache memory 30 is accessed. At this time, the cache directory 37 remains free. In the case of a miss hit other than a write with a lock instruction, a read replace or write allocate operation is performed. At this time, the cache directory 37 remains free.

【0046】次に、図4〜図8を参照して、実施の形態
のキャッシュメモリの具体的な動作を説明する。なお、
以下の説明では、便宜上、バス幅とキャッシュ・ライン
のサイズとは等しいものとする。
Next, the specific operation of the cache memory according to the embodiment will be described with reference to FIGS. In addition,
In the following description, for convenience, it is assumed that the bus width is equal to the size of the cache line.

【0047】図4は、キャッシュ・ラインに対して、プ
ロセッサ10からの通常ライト、通常リード、ロック指
示付きライト、フリー指示付きリードなどの各アクセス
が実行されたときに、キャッシュメモリ30のキャッシ
ュメモリの状態により、どのような実行動作になるかを
示したものである。また、図4における各実行動作を、
以下に、図5〜図8により詳細に説明する。
FIG. 4 shows the cache memory of the cache memory 30 when each access such as a normal write, a normal read, a write with a lock instruction, and a read with a free instruction is executed from the processor 10 to a cache line. Indicates what kind of execution operation will be performed depending on the state. Further, each execution operation in FIG.
The details will be described below with reference to FIGS.

【0048】まず、通常のライト動作は、図5を参照し
て、次の(51)〜(54)のように行われる。 (51)キャッシュ・ヒット この場合、キャッシュメモリ30にデータが直接書き込
まれる(キャッシュ・データ・ライト動作)。このと
き、ロック・ビット40は実行以前のままであり、ダー
ティ・ビット41はダーティ状態となる(図5
(a))。
First, a normal write operation is performed as shown in the following (51) to (54) with reference to FIG. (51) Cache hit In this case, data is directly written to the cache memory 30 (cache data write operation). At this time, the lock bit 40 remains as it was before execution, and the dirty bit 41 enters a dirty state (FIG. 5).
(A)).

【0049】(52)キャッシュ・ミス・ヒット(ロッ
ク・ビットがロック状態) この場合、ロック・ビット40の状態により、キャッシ
ュ・バイパス・ライトであるか、キャッシュ・ライト・
アロケートであるかが決定される。そして、ロック状態
では、キャッシュメモリ30をバイパスして主記憶装置
50にデータが直接書き込まれる(図5(b))。この
とき、ロック・ビット40はロック状態、ダーティ・ビ
ット41の状態は実行以前のままである(キャッシュ・
バイパス・ライト動作)。
(52) Cache miss hit (lock bit is locked) In this case, depending on the state of the lock bit 40, a cache bypass write or a cache write
An allocation is determined. Then, in the locked state, data is written directly to the main storage device 50, bypassing the cache memory 30 (FIG. 5B). At this time, the lock bit 40 remains in the locked state, and the state of the dirty bit 41 remains as it was before execution (cache
Bypass write operation).

【0050】(53)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはクリーン
状態) この場合、ロック・ビットがフリー状態であるので、キ
ャッシュ・ディレクトリ37の置き換えが行なわれる
が、ダーティ・ビット41の状態により動作が異なる。
そして、クリーン状態であれば、キャッシュメモリ30
に直接データを書き込むと同時に、キャッシュ・ディレ
クトリ37を再登録する(図5(c))。このとき、ロ
ック・ビット40はフリー状態、ダーティ・ビット41
はダーティ状態となる(キャッシュ・ライト・アロケー
ト動作)。
(53) Cache miss hit (lock bit is free, dirty bit is clean) In this case, since the lock bit is free, the cache directory 37 is replaced. The operation differs depending on the state of the dirty bit 41.
If it is in the clean state, the cache memory 30
At the same time as writing data directly to the cache directory 37 (FIG. 5C). At this time, the lock bit 40 is in the free state and the dirty bit 41 is
Becomes dirty (cache write allocate operation).

【0051】(54)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはダーティ
状態) この場合、ダーティ・ビット41がダーティ状態である
ので、キャッシュ・ディレクトリ37を置き換える前
に、現在登録されているキャッシュ・ラインのデータを
主記憶装置50に書き戻す(ライトバック動作)。次
に、キャッシュメモリ30に直接データを書き込むと同
時にキャッシュ・ディレクトリ37を再登録する(キャ
ッシュ・ライト・アロケート動作)。このとき、ロック
・ビット40はフリー状態、ダーティ・ビット41はダ
ーティ状態となる(図5(d))。
(54) Cache miss hit (lock bit is in free state, dirty bit is in dirty state) In this case, since the dirty bit 41 is in a dirty state, before replacing the cache directory 37, The data of the registered cache line is written back to the main storage device 50 (write-back operation). Next, data is directly written into the cache memory 30 and the cache directory 37 is re-registered at the same time (cache write allocate operation). At this time, the lock bit 40 is in the free state, and the dirty bit 41 is in the dirty state (FIG. 5D).

【0052】次に、通常のリード動作について図6によ
り説明する。この場合の動作は、次の(61)〜(6
4)である。 (61)キャッシュ・ヒット この場合には、キャッシュメモリ30から直接データの
読み出しが行われる(キャッシュ・データ・リード動
作)。このとき、ロック・ビット40とダーティ・ビッ
ト41はそれぞれ実行以前のままである(図6
(a))。
Next, a normal read operation will be described with reference to FIG. The operation in this case includes the following (61) to (6)
4). (61) Cache Hit In this case, data is directly read from the cache memory 30 (cache data read operation). At this time, the lock bit 40 and the dirty bit 41 remain the same as before execution (FIG. 6).
(A)).

【0053】(62)キャッシュ・ミス・ヒット(ロッ
ク・ビットはロック状態) この場合、ロック・ビット40の状態により、キャッシ
ュ・バイパス・リードあるいはキャッシュ・リード・リ
プレースが決定される。そして、ロック・ビット40が
ロック状態のときには、キャッシュ・バイパス・リード
動作が行われ、キャッシュメモリ30をバイパスして主
記憶装置50からデータの読み出が行われる(図6
(b))。このとき、ロック・ビット40はロック状
態、ダーティ・ビット41は以前のままの状態である。
(62) Cache Miss Hit (Lock Bit is Locked) In this case, cache bypass read or cache read replacement is determined by the state of lock bit 40. When the lock bit 40 is in the locked state, a cache bypass read operation is performed, and data is read from the main storage device 50 by bypassing the cache memory 30 (FIG. 6).
(B)). At this time, the lock bit 40 is in the locked state, and the dirty bit 41 is in the same state as before.

【0054】(63)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはクリーン
状態) この場合、キャッシュ・ディレクトリ37の置き換えが
行なわれるが、ダーティ・ビット41の状態により動作
が異なる。そして、ダーティ・ビット41がクリーン状
態であれば、主記憶装置50からデータを読み出すと同
時にキャッシュメモリ30にも書き込むとともに、キャ
ッシュ・ディレクトリ37を再登録する(キャッシュ・
リード・リプレース動作)。このとき、ロック・ビット
40はフリー状態、ダーティ・ビット41はクリーン状
態である(図6(c))。
(63) Cache miss hit (lock bit is free, dirty bit is clean) In this case, the cache directory 37 is replaced, but the operation differs depending on the state of the dirty bit 41. . If the dirty bit 41 is in a clean state, the data is read from the main storage device 50 and simultaneously written into the cache memory 30, and the cache directory 37 is re-registered (cache directory).
Read replace operation). At this time, the lock bit 40 is in a free state, and the dirty bit 41 is in a clean state (FIG. 6C).

【0055】(64)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはダーティ
状態) この場合、キャッシュ・ディレクトリ37を置き換える
前に、現在登録されているキャッシュ・ラインのデータ
が主記憶装置50に書き戻される(ライトバック動
作)。次に、主記憶装置50からデータが読み出される
と同時に、キャッシュメモリ30にも書き込みが行わ
れ、さらに、キャッシュ・ディレクトリ37を再登録す
る(キャッシュ・リード・リプレース動作)。このと
き、ロック・ビット40はフリー状態、ダーティ・ビッ
ト41はクリーン状態となる(図6(d))。
(64) Cache miss hit (lock bit is free, dirty bit is dirty) In this case, before replacing the cache directory 37, the data of the currently registered cache line is mainly The data is written back to the storage device 50 (write-back operation). Next, at the same time that data is read from the main storage device 50, writing is performed in the cache memory 30, and the cache directory 37 is re-registered (cache read / replace operation). At this time, the lock bit 40 is in the free state and the dirty bit 41 is in the clean state (FIG. 6D).

【0056】次に、ロック指示付きライト動作につい
て、図7により説明する。この場合の動作は、次の(7
1)〜(75)である。 (71)キャッシュ・ヒット(ロック・ビットはロック
状態) この場合、キャッシュメモリ30に直接データが書き込
まれる(キャッシュ・データ・ライト動作)。このと
き、ロック・ビット41はロック状態のままであり、ダ
ーティ・ビット41はダーティ状態となる(図7
(a))。
Next, a write operation with a lock instruction will be described with reference to FIG. The operation in this case is as follows (7)
1) to (75). (71) Cache hit (lock bit is locked) In this case, data is directly written to the cache memory 30 (cache data write operation). At this time, the lock bit 41 remains in the locked state, and the dirty bit 41 enters the dirty state (FIG. 7).
(A)).

【0057】(72)キャッシュ・ヒット(ロック・ビ
ットはフリー状態) この場合、キャッシュメモリ30に直接データが書き込
まれる(キャッシュ・データ・ライト動作)。このと
き、ロック・ビット41はロック状態に変化し、ダーテ
ィ・ビット41はダーティ状態となる(図7(b))。
(72) Cache hit (lock bit is in a free state) In this case, data is written directly to the cache memory 30 (cache data write operation). At this time, the lock bit 41 changes to the lock state, and the dirty bit 41 enters the dirty state (FIG. 7B).

【0058】(73)キャッシュ・ミス・ヒット(ロッ
ク・ビットはロック状態) この場合、ロック・ビットの状態により、キャッシュ・
バイパス・ライトかキャッシュ・ライト・アロケートか
が決定される。そして、ロック状態なので、キャッシュ
メモリ30をバイパスして主記憶装置50に直接書き込
まれる(キャッシュ・バイパス・ライト動作)。このと
き、ロック・ビット40はロック状態のままであり、ダ
ーティ・ビット41は以前のままとなる(図7
(c))。
(73) Cache miss hit (lock bit is locked) In this case, depending on the state of the lock bit, the cache
It is determined whether bypass write or cache write allocate is performed. Since the data is in the locked state, the data is written directly to the main storage device 50 bypassing the cache memory 30 (cache bypass write operation). At this time, the lock bit 40 remains locked and the dirty bit 41 remains as before (FIG. 7).
(C)).

【0059】(74)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはクリーン
状態) この場合、キャッシュ・ディレクトリ37の置き換えが
行なわれるが、ダーティ・ビット41の状態により動作
が異なる。そして、クリーン状態であれば、キャッシュ
メモリ30に直接データが書き込まれると同時にキャッ
シュ・ディレクトリ37が再登録される(図7
(d))。このとき、ロック・ビット40はロック状態
に変化し、ダーティ・ビット41はダーティ状態となる
(キャッシュ・ライト・アロケート動作)。
(74) Cache miss hit (lock bit is free, dirty bit is clean) In this case, the cache directory 37 is replaced, but the operation differs depending on the state of the dirty bit 41. . In the clean state, data is written directly to the cache memory 30 and the cache directory 37 is re-registered at the same time (FIG. 7).
(D)). At this time, the lock bit 40 changes to the lock state, and the dirty bit 41 enters the dirty state (cache write allocate operation).

【0060】(75)キャッシュ・ミス・ヒット(ロッ
ク・ビットはフリー状態、ダーティ・ビットはダーティ
状態) この場合、キャッシュ・ディレクトリ37を置き換える
前に、現在登録されているキャッシュ・ラインのデータ
が主記憶装置50に書き戻される(ライトバック動
作)。次に、キャッシュメモリ30にデータが直接書き
込まれると同時に、キャッシュ・ディレクトリ37が再
登録される(図7(e))。このとき、ロック・ビット
40はロック状態に変化し、ダーティ・ビット41はダ
ーティ状態となる(キャッシュ・ライト・アロケート動
作)。
(75) Cache miss hit (lock bit is free, dirty bit is dirty) In this case, before replacing the cache directory 37, the data of the currently registered cache line is mainly The data is written back to the storage device 50 (write-back operation). Next, at the same time as the data is directly written to the cache memory 30, the cache directory 37 is re-registered (FIG. 7E). At this time, the lock bit 40 changes to the lock state, and the dirty bit 41 enters the dirty state (cache write allocate operation).

【0061】次に、フリー指示付きリード動作を図8を
参照して、次の(81)〜(85)に説明する。 (81)キャッシュ・ヒット(ロック・ビットはロック
状態) この場合、キャッシュメモリ30からデータが直接読み
出される(キャッシュ・データ・リード動作)。このと
き、ロック・ビット40はフリー状態に変化し、ダーテ
ィ・ビット41は実行以前のままである(図8
(a))。
Next, a read operation with a free instruction will be described in the following (81) to (85) with reference to FIG. (81) Cache hit (lock bit is locked) In this case, data is directly read from the cache memory 30 (cache data read operation). At this time, the lock bit 40 changes to the free state, and the dirty bit 41 remains as it was before execution (FIG. 8).
(A)).

【0062】(82)キャッシュ・ヒット(ロック・ビ
ットはフリー状態) この場合、キャッシュメモリ30からデータが直接読み
出される(キャッシュ・データ・リード動作)。このと
き、ロック・ビット40はフリー状態、ダーティ・ビッ
ト41は実行以前のままである(図8(b))。
(82) Cache hit (lock bit is free) In this case, data is directly read from the cache memory 30 (cache data read operation). At this time, the lock bit 40 remains in the free state, and the dirty bit 41 remains as it was before execution (FIG. 8B).

【0063】(83)キャッシュ・ミス・ヒット(ロッ
ク・ビットはロック状態) この場合、ロック・ビット40の状態により、キャッシ
ュバイパス・リード/キャッシュ・リード・リプレース
かが決定される。この場合、ロック状態であるから、キ
ャッシュメモリ30をバイパスして主記憶装置50から
データを読み出す(図8(c))。このとき、ロック・
ビット40はロック状態、ダーティ・ビット41は実行
以前のままである(キャッシュ・バイパス・リード動
作)。
(83) Cache Miss Hit (Lock Bit is Locked) In this case, the state of lock bit 40 determines cache bypass read / cache read replace. In this case, since it is in the locked state, the data is read from the main storage device 50 bypassing the cache memory 30 (FIG. 8C). At this time,
Bit 40 is locked and dirty bit 41 remains as it was before execution (cache bypass read operation).

【0064】(84)キャッシュ・ミス・ヒット(ロッ
ク・ビットはロック状態、ダーティ・ビットはクリーン
状態) この場合、キャッシュ・ディレクトリ37の置き換えが
行なわれるが、ダーティ・ビット41の状態により動作
が異なる。クリーン状態であれば、主記憶装置50から
データが読み出されると同時に、キャッシュメモリ30
にも書き込みが行われ、かつ、キャッシュ・ディレクト
リ37が再登録される(キャッシュ・リード・リプレー
ス動作)。このとき、ロック・ビット40はフリー状
態、ダーティ・ビット41はクリーン状態である(図8
(d))。
(84) Cache miss hit (lock bit is locked, dirty bit is clean) In this case, the cache directory 37 is replaced, but the operation differs depending on the state of the dirty bit 41. . In the clean state, data is read from the main storage device 50 and the cache memory 30
And the cache directory 37 is re-registered (cache read / replace operation). At this time, the lock bit 40 is in the free state, and the dirty bit 41 is in the clean state (FIG. 8).
(D)).

【0065】(85)キャッシュ・ミス・ヒット(ロッ
ク・ビットはロック状態、ダーティ・ビットはダーティ
状態) この場合、キャッシュ・ディレクトリ37を置き換える
前に、現在登録されているキャッシュ・ラインのデータ
が主記憶装置50に書き戻される(ライトバック動
作)。次に、主記憶装置50からデータが読み出される
と同時に、キャッシュメモリ30にも書き込まれ、か
つ、キャッシュ・ディレクトリ37が再登録される(キ
ャッシュ・リード・リプレース動作)。このとき、ロッ
ク・ビット40はフリー状態であり、ダーティ・ビット
41はクリーン状態である(図8(e))。
(85) Cache Miss Hit (Lock Bit is Locked, Dirty Bit is Dirty) In this case, before replacing the cache directory 37, the data of the currently registered cache line is mainly The data is written back to the storage device 50 (write-back operation). Next, at the same time as the data is read from the main storage device 50, the data is also written to the cache memory 30 and the cache directory 37 is re-registered (cache read / replace operation). At this time, the lock bit 40 is in a free state, and the dirty bit 41 is in a clean state (FIG. 8E).

【0066】また、スタックの積み上げと引き出しとの
間に、別アドレスによる同一キャッシュ・ラインに対す
るライト・アクセスが実行された場合の動作を、図9を
参照して、次の(91)〜(93)に説明する。 (91)スタックの積み上げ(キャッシュ・ヒットと仮
定) この場合、直接キャッシュメモリ上にスタックを積み上
げる(キャッシュ・データ・ライト)。このとき、ロッ
ク指示付きライトが行われるので、ロック・ビットはロ
ック状態となり、ダーティ・ビットはダーティ状態とな
る(図9(a))。
Referring to FIG. 9, the operation in the case where a write access to the same cache line by another address is executed between the stacking and drawing of the stack will be described with reference to the following (91) to (93). ). (91) Stacking (assuming a cache hit) In this case, the stack is directly stacked on the cache memory (cache data write). At this time, since the write with the lock instruction is performed, the lock bit is locked and the dirty bit is dirty (FIG. 9A).

【0067】(92)別アドレスによる同一キャッシュ
・ラインに対するライト この場合、このアクセスは、キャッシュ・ミス・ヒット
となるが、ロック状態なので、キャッシュ・ディレクト
リの置き換えは禁止され、キャッシュメモリをバイパス
して直接主記憶装置50に書き込まれる(キャッシュ・
バイパス・ライト)。このとき、ロック・ビット/ダー
ティ・ビットともに実行以前のままである(図9
(b))。
(92) Write to the same cache line by another address In this case, this access is a cache miss hit, but since it is in a locked state, replacement of the cache directory is prohibited, and the cache memory is bypassed. The data is written directly to the main storage device 50 (cache
Bypass light). At this time, both the lock bit and the dirty bit remain as they were before execution (FIG. 9).
(B)).

【0068】(93)スタックからの引き出し この場合、キャッシュ・ディレクトリがロック状態によ
り保護されているので、このアクセスはキャッシュ・ヒ
ットとなる。直接キャッシュメモリからスタック・デー
タが引き出される(キャッシュ・データ・リード)。こ
のとき、フリー指示付きリードが行われるので、ロック
・ビットはフリー状態に変化し、キャッシュ・ディレク
トリを置き換え可能とする。ダーティ・ビットはダーテ
ィ状態のままである(図9(c))。
(93) Extraction from Stack In this case, since the cache directory is protected by the lock state, this access becomes a cache hit. Stack data is directly extracted from the cache memory (cache data read). At this time, since the read with the free instruction is performed, the lock bit changes to the free state, and the cache directory can be replaced. The dirty bit remains in the dirty state (FIG. 9C).

【0069】以上のように構成される本実施の形態にお
いては、図14に示したような従来の二重のライトバッ
ク動作を行わないことから、その分、主記憶装置に書き
戻す動作が減少し、プロセッサの主記憶装置へのアクセ
ス数が少なくなる結果、プロセッサの平均アクセス時間
が短縮される。また、このため、プロセッサの処理能力
が向上し、キャッシュ・ヒット率が向上する。なお、例
えば、キャッシュ・ヒット対キャッシュ・ライン当たり
のアクセス時間比を1クロック対5クロックとすると、
従来は17クロックであったものが7クロック(1+5
+1)となる。
In the present embodiment configured as described above, since the conventional double write-back operation as shown in FIG. 14 is not performed, the operation of writing back to the main storage device is reduced accordingly. However, as a result of the number of accesses to the main storage device of the processor being reduced, the average access time of the processor is reduced. In addition, the processing capability of the processor is improved, and the cache hit ratio is improved. For example, if the ratio of cache hit to access time per cache line is 1 clock to 5 clocks,
In the past, 17 clocks were used instead of 7 clocks (1 + 5
+1).

【0070】また、図9(b)のバイパス・アクセスは
バス幅分のアクセスを1回行うだけであり、キャッシュ
・ラインのサイズが大きくても一定時間で終了するの
で、キャッシュ・ラインサイズが大きいと場合には特に
有効であり、アクセス時間の減少の効果が大きい。
In the bypass access shown in FIG. 9B, the access for the bus width is performed only once, and the access is completed in a fixed time even if the cache line size is large. Therefore, the cache line size is large. Is particularly effective in this case, and the effect of reducing the access time is great.

【0071】さらに、スタックは積み上げられたら短時
間内に必ず引き出される。そして、上記のように積み上
げ時にはロック指示付きライトを行い、また引き出し時
にはフリー指示付きリードを行うようにすれば、引き出
されるまではスタックがキャッシュメモリから追い出さ
れることが防止され、引き出し後においてはフリー状態
となる結果、キャッシュメモリの使用効率が高まる。
Further, when the stacks are stacked, they are always pulled out within a short time. As described above, when the stacking is performed, the writing with the lock instruction is performed, and when the drawing is performed, the reading with the free instruction is performed. As a result, the use efficiency of the cache memory increases.

【0072】また、頻繁にアクセスされるデータに対し
ては、ロック指示付きのライト命令によってそのデータ
がキャッシュメモリから追い出されることが防止できる
とともに、そのデータがキャッシュメモリに常に存在す
るため、主記憶装置へのアクセス回数が減る。これによ
り、不必要なキャッシュ・ディレクトリの置き換えが防
止され、主記憶装置への書き戻し動作の回数を減らすこ
とができる。
Further, with respect to frequently accessed data, it is possible to prevent the data from being evicted from the cache memory by a write instruction with a lock instruction, and since the data always exists in the cache memory, the main memory The number of accesses to the device is reduced. As a result, unnecessary replacement of the cache directory is prevented, and the number of write-back operations to the main storage device can be reduced.

【0073】[0073]

【発明の効果】本発明によれば、キャッシュ・ヒット率
を向上させ、主記憶装置へのアクセス回数を減らし処理
能力の向上を図ることが可能なキャッシュメモリ装置を
提供することができる。
According to the present invention, it is possible to provide a cache memory device capable of improving the cache hit rate, reducing the number of accesses to the main storage device, and improving the processing performance.

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

【図1】本発明の実施の形態のキャッシュメモリ装置の
説明図である。
FIG. 1 is an explanatory diagram of a cache memory device according to an embodiment of the present invention.

【図2】(a)は図1のキャッシュメモリ装置における
スタック積み上げ時の処理の説明図、(b)は同じくス
タック引き出し時の処理の説明図である。
2A is an explanatory diagram of a process when stacking is performed in the cache memory device of FIG. 1, and FIG. 2B is an explanatory diagram of a process when a stack is pulled out;

【図3】図1のキャッシュメモリ装置におけるロック・
ビットの状態の遷移の説明図である。
FIG. 3 is a block diagram of a lock memory in the cache memory device of FIG.
FIG. 7 is an explanatory diagram of bit state transitions.

【図4】図1のキャッシュメモリ装置の動作を説明した
図表である。
FIG. 4 is a table illustrating an operation of the cache memory device of FIG. 1;

【図5】(a)〜(d)はそれぞれ、図1のキャッシュ
メモリ装置における通常のライト動作時の各処理の説明
図である。
5 (a) to 5 (d) are explanatory diagrams of respective processes during a normal write operation in the cache memory device of FIG. 1;

【図6】(a)〜(d)はそれぞれ、図1のキャッシュ
メモリ装置における通常のリード動作時の各処理の説明
図である。
6 (a) to 6 (d) are explanatory diagrams of respective processes during a normal read operation in the cache memory device of FIG. 1;

【図7】(a)〜(e)はそれぞれ、図1のキャッシュ
メモリ装置におけるロック指示付きライト動作時の各処
理の説明図である。
FIGS. 7A to 7E are explanatory diagrams of respective processes during a write operation with a lock instruction in the cache memory device of FIG. 1;

【図8】(a)〜(e)はそれぞれ、図1のキャッシュ
メモリ装置におけるフリー指示付きリード動作時の各処
理の説明図である。
8 (a) to 8 (e) are explanatory diagrams of respective processes at the time of a read operation with a free instruction in the cache memory device of FIG. 1;

【図9】(a)〜(c)はそれぞれ、図1のキャッシュ
メモリ装置におけるスタックの積み上げ時から引き出し
時の間にライト・アクセスが実行された場合の各処理の
説明図である。
9 (a) to 9 (c) are explanatory diagrams of respective processes when a write access is executed between the time of stacking and the time of pulling out of the stack in the cache memory device of FIG. 1;

【図10】従来のキャッシュメモリ装置の説明図であ
る。
FIG. 10 is an explanatory diagram of a conventional cache memory device.

【図11】図10のキャッシュメモリ装置の動作を説明
した図表である。
FIG. 11 is a chart for explaining the operation of the cache memory device of FIG. 10;

【図12】(a)〜(c)はそれぞれ、図10のキャッ
シュメモリにおけるライト動作時の各処理の説明図であ
る。
12 (a) to 12 (c) are explanatory diagrams of each processing at the time of a write operation in the cache memory of FIG. 10;

【図13】(a)〜(c)はそれぞれ、図10のキャッ
シュメモリ装置におけるリード動作時の各処理の説明図
である。
FIGS. 13A to 13C are explanatory diagrams of each processing at the time of a read operation in the cache memory device of FIG. 10;

【図14】(a)〜(c)はそれぞれ、図10のキャッ
シュメモリ装置におけるスタックの積み上げ時から引き
出し時の間にキャッシュ・ライト・アクセスが実行され
た場合の各処理の説明図である。
14 (a) to (c) are explanatory diagrams of respective processes when cache write access is executed between the time of stacking and the time of pulling out of a stack in the cache memory device of FIG. 10;

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

10 プロセッサ 11 アドレス制御部 12 ロック指示制御部 13 フリー指示制御部 16 リード/ライト制御部 30 キャッシュメモリ 37 キャッシュ・ディレクトリ 38 タグ・データ 39 バリッド・ビット 40 ロック・ビット 41 ダーティ・ビット 50 主記憶装置 DESCRIPTION OF SYMBOLS 10 Processor 11 Address control part 12 Lock instruction control part 13 Free instruction control part 16 Read / write control part 30 Cache memory 37 Cache directory 38 Tag data 39 Valid bit 40 Lock bit 41 Dirty bit 50 Main storage device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサと主記憶装置との間に設けら
れたライトバック方式のキャッシュメモリ装置におい
て、 前記プロセッサから前記主記憶装置に対してリード/ラ
イトされるデータを一時的に保持する少なくとも1つの
アドレスを有するメモリ部と、 前記メモリ部の各アドレスにおけるデータのリード/ラ
イトを制御するメモリ管理部と、 前記メモリ部の各アドレスをデータ置き換えができない
ロック状態とデータ置き換えが可能なフリー状態のいず
れにかに設定するロック制御部とを有し、 前記メモリ管理部は、前記メモリ部の特定のアドレスが
ロック状態のときにおいて、このアドレスに前記プロセ
ッサからリード/ライトのアクセスがされた際、このア
クセスに対応するデータが前記アドレスに存在しないキ
ャッシュ・ミス・ヒットの場合には、前記アクセスを前
記主記憶装置にバイパスさせることを特徴とするキャッ
シュメモリ装置。
1. A cache memory device of a write-back system provided between a processor and a main storage device, wherein at least one cache memory temporarily stores data read / written from the processor to the main storage device. A memory unit having two addresses; a memory management unit controlling read / write of data at each address of the memory unit; a locked state where data cannot be replaced at each address of the memory unit; and a free state where data can be replaced. A lock control unit to be set to any of the above, wherein the memory management unit, when a specific address of the memory unit is in a locked state, when the read / write access to this address from the processor, A cache miss where the data corresponding to this access does not exist at the address In the case of Tsu bets, the cache memory device, characterized in that to bypass the access to the main storage device.
【請求項2】 前記ロック制御部は、前記プロセッサか
らの指示により、前記メモリ部の各アドレスを、フリー
状態からロック状態に、あるいはロック状態からフリー
状態にそれぞれ移行させることを特徴とする請求項1記
載のキャッシュメモリ装置。
2. The apparatus according to claim 1, wherein the lock control section shifts each address of the memory section from a free state to a locked state or from a locked state to a free state in accordance with an instruction from the processor. 2. The cache memory device according to 1.
【請求項3】 前記メモリ部の特定のアドレスのフリー
状態からロック状態への移行が、そのアドレスに対する
前記プロセッサからのライトの際に行われることを特徴
とする請求項2記載のキャッシュメモリ装置。
3. The cache memory device according to claim 2, wherein a transition from a free state to a locked state of a specific address of said memory unit is performed when said address is written by said processor.
【請求項4】 前記メモリ部の特定のアドレスのロック
状態からフリー状態への移行が、そのメモリに対する前
記プロセッサからのリードのアクセスに対応するデータ
がこのアドレスに存在するキャッシュ・ヒットの際にお
いて、前記プロセッサからのリードの際に行われること
を特徴とする請求項2記載のキャッシュメモリ装置。
4. A transition from a locked state to a free state of a specific address of the memory section is performed when a cache hit in which data corresponding to a read access from the processor to the memory exists at this address. 3. The cache memory device according to claim 2, wherein said read operation is performed at the time of reading from said processor.
JP8288866A 1996-10-30 1996-10-30 Cache memory device Pending JPH10133948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8288866A JPH10133948A (en) 1996-10-30 1996-10-30 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8288866A JPH10133948A (en) 1996-10-30 1996-10-30 Cache memory device

Publications (1)

Publication Number Publication Date
JPH10133948A true JPH10133948A (en) 1998-05-22

Family

ID=17735776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8288866A Pending JPH10133948A (en) 1996-10-30 1996-10-30 Cache memory device

Country Status (1)

Country Link
JP (1) JPH10133948A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082249A1 (en) * 2012-09-19 2014-03-20 Hewlett-Packard Development Company Request sent to storage device based on moving average

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082249A1 (en) * 2012-09-19 2014-03-20 Hewlett-Packard Development Company Request sent to storage device based on moving average
US8972645B2 (en) * 2012-09-19 2015-03-03 Hewlett-Packard Development Company, L.P. Request sent to storage device based on moving average

Similar Documents

Publication Publication Date Title
US6948033B2 (en) Control method of the cache hierarchy
US6523102B1 (en) Parallel compression/decompression system and method for implementation of in-memory compressed cache improving storage density and access speed for industry standard memory subsystems and in-line memory modules
JP4298800B2 (en) Prefetch management in cache memory
KR100372293B1 (en) Cacheable Properties for Virtual Addresses in Virtual and Physical Index Caches
JPS58102381A (en) Buffer memory
JP2000242558A (en) Cache system and its operating method
JP2009032252A (en) Memory allocation for crash dump
JP3236287B2 (en) Multiprocessor system
KR101472967B1 (en) Cache memory and method capable of write-back operation, and system having the same
US5471602A (en) System and method of scoreboarding individual cache line segments
US20100146214A1 (en) Method and system for efficient cache locking mechanism
JP2001134486A (en) Microprocessor and storage device
JPH10133948A (en) Cache memory device
JP4792065B2 (en) Data storage method
JP2002041358A (en) Processor system
JPS6325747A (en) Virtual memory managing system
JPH0883215A (en) Memory controller
JPH07152650A (en) Cache control unit
JPH1055308A (en) Cache memory
JPS61127050A (en) Memory control system
JP2000293437A (en) Cache memory device and cache memory control method
JPH0793215A (en) Semiconductor memory
JPH07210463A (en) Cache memory system and data processor
KR20040005275A (en) Optimum Method for Reference of Cache Memory
JPH04239944A (en) Cache lock system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040302