JPH0363851A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH0363851A
JPH0363851A JP1201670A JP20167089A JPH0363851A JP H0363851 A JPH0363851 A JP H0363851A JP 1201670 A JP1201670 A JP 1201670A JP 20167089 A JP20167089 A JP 20167089A JP H0363851 A JPH0363851 A JP H0363851A
Authority
JP
Japan
Prior art keywords
data
processor
invalidation
cache
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
JP1201670A
Other languages
Japanese (ja)
Inventor
Katsunori Uchida
内田 克典
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1201670A priority Critical patent/JPH0363851A/en
Publication of JPH0363851A publication Critical patent/JPH0363851A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To prevent excessive access to a main memory performed by providing an address register which holds an invalidation history bit and a flashing targeted address tag, and a comparator which compares the address register with an address tag in a cache. CONSTITUTION:The comparator 10 compares the address register 9 with a cache tag 4 in access from a processor 2, and delivers a comparison result 101 to an invalidation control circuit 12. The invalidation control circuit 12 monitors rewrite to another processor, and resets an effective bit 5 corresponding to data in which its own data is rewritten when holding the data, and cuts the invalidation history bit 6. Also, the invalidation history hit(IH) 6 is referred when the address tag 4 hits on the access from the processor 2 and also the effective bit 5 is reset, and when no (IH) 6 is reset and also noncoincidence in the comparison result 101 of the comparator 10 is obtained, the effective bit 5 is set and the data in the cache is delivered to the processor. Thereby, excessive access to the main memory is evaded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュメモリに関し、特に主記憶との一致
性制御における無効化手段を有するメモリに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory, and more particularly to a memory having an invalidating means for controlling consistency with a main memory.

〔従来の技術〕[Conventional technology]

従来のキャッジ、:Lメモリは、第1の無効化手段によ
って無効化された場合も第2の無効化手段によって無効
化された場合も無効化対象のデータの有効ビットをリセ
ットするだけであった。
The conventional cache, :L memory only resets the valid bit of the data to be invalidated, whether it is invalidated by the first invalidation means or the second invalidation means. .

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のキャッシュメモリは、実際には主記憶と
のデータの不一致は起きていないにもかかわらず、無効
化される場合があり、そのデータに対しプロセサからの
アクセスがあった場合、データ自身は保持しているのに
有効ビットがリセットされていることによりミスとなり
、主記憶へのアクセスが生じプロセスのスリープツトを
低下させてしまうという欠点がある。
The conventional cache memory mentioned above may be invalidated even though there is no actual data mismatch with the main memory, and if the data is accessed by the processor, the data itself may be invalidated. is held but the valid bit is reset, resulting in a miss, resulting in an access to the main memory, which has the disadvantage of slowing down the process' sleep.

本発明の目的は、フラッシング命令による全データの無
効化がなされた場合でもフラッシングの対象ではないデ
ータに対してのプロセサからのアクセスに対しては有効
とみなし過度のメインメモリへのアクセスを防ぐことの
できるキャッシュメモリを提供することにある。
An object of the present invention is to prevent excessive access to main memory by treating data that is not subject to flushing as valid for access from a processor even if all data is invalidated by a flushing command. The objective is to provide a cache memory that can

〔課題を解決するための手段〕[Means to solve the problem]

本発明の構成は、他のプロセサの主記憶の書換えを監視
し、この書換えの行われたデータを保持していた場合に
このデータの有効ビットをリセットすることでデータの
無効化を行なう第1の無効化手段と、プロセサからフラ
ッシング命令によりキャッシュ内の全データの有効ビッ
トをリセットすることによりキャッシュ内の全データを
無効化する第2の無効化手段とを有するキャッシュメモ
リにおいて、前記第1の無効化手段によって無効化され
たことを示す無効化履歴ビットと前記プロセスからのフ
ラッシング対象アドレスタグとを保持するアドレスレジ
スタと、このアドレスレジスタと前記キャッシュ内のア
ドレスタグとを比較する比較器とを備え、前記プロセサ
からのアクセスに対しアドレスタグがヒ、ツトしかつ有
効ビットがリセットの場合、前記無効化履歴ビットを参
照してこと無効化履歴ビットがセットされていなければ
アドレスタグと前記アドレスレジスタの内容との比較し
、一致していない場合は有効ビットをセットしキャッシ
ュ内のデータをプロセサへ渡すように制御することを特
徴とする。
The configuration of the present invention is such that the first processor monitors the rewriting of the main memory of another processor and, if the rewritten data is held, invalidates the data by resetting the valid bit of this data. and a second invalidation means for invalidating all data in the cache by resetting valid bits of all data in the cache by a flushing instruction from a processor, wherein the first an address register that holds an invalidation history bit indicating that it has been invalidated by the invalidating means and an address tag to be flushed from the process; and a comparator that compares this address register with the address tag in the cache. If the address tag is hit and the valid bit is reset in response to an access from the processor, the invalidation history bit is referenced and if the invalidation history bit is not set, the address tag and the address register are If they do not match, a valid bit is set and the data in the cache is controlled to be passed to the processor.

〔実施例〕〔Example〕

次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例をブロック図である0本実施
例のキャッシュメモリ1を介してプロセッサ2がアドレ
スバス102、データバス103とに接続される。プロ
セサ2はキャッシュメモリ1に対しアドレス201の出
力、データ202の入出力を行なう他、フラッシング命
令203とフラッシング対象アドレス204を出力する
。キャッシュディレクトリ3は、アドレスタグ4、有効
ビット(V)S、無効化履歴ビット(IH)6の3つの
フィールドに分割されており、データ7はキャッシュの
データを保持している。全データ無効化回路8は、プロ
セサ2からのフラッシング命令203によりキャッシュ
ディレクトリ3の全有効ビット5をリセットする。
FIG. 1 is a block diagram of an embodiment of the present invention. A processor 2 is connected to an address bus 102 and a data bus 103 via a cache memory 1 of this embodiment. The processor 2 outputs an address 201 and inputs/outputs data 202 to the cache memory 1, and also outputs a flushing instruction 203 and a flushing target address 204. The cache directory 3 is divided into three fields: an address tag 4, a valid bit (V)S, and an invalidation history bit (IH) 6, and data 7 holds cache data. The all data invalidation circuit 8 resets all valid bits 5 of the cache directory 3 in response to a flushing instruction 203 from the processor 2.

アドレスレジスタ9はプロセサ2からのフラッシング対
象アドレス204を保持する。比較器10はプロセサ2
からのアクセス時にアドレスレジスタ9とキャッシュタ
・グ4とを比較し、比較結果101を無効化制御回路1
2へ渡す、無効化制御回路12は他のプロセサの主記憶
に書換えを監視し、自分が書換えられたデータを保持し
ている場合はそのデータに対応する有効ビット5をリセ
ットするとともに無効化履歴ビット6をカットする。ま
た、プロセサ2からアクセスに対しアドレスタグ4がヒ
ツトし、かつ有効ビット5がリセットされているとき無
効化履歴ビットIHを参照し、無効化履歴ビットがセッ
トされておらずかつ比較器10を比較結果101が不一
致の場合は有効ビット5をセットする。
Address register 9 holds a flushing target address 204 from processor 2 . Comparator 10 is processor 2
Compares address register 9 and cache tag 4 when accessing from
2, the invalidation control circuit 12 monitors the rewriting to the main memory of other processors, and if it holds the rewritten data, resets the valid bit 5 corresponding to that data and records the invalidation history. Cut bit 6. Also, when the address tag 4 is hit in response to an access from the processor 2 and the valid bit 5 is reset, the invalidation history bit IH is referenced and the invalidation history bit is not set and the comparator 10 is compared. If the result 101 is a mismatch, valid bit 5 is set.

次にこの回路の動作について説明する。Next, the operation of this circuit will be explained.

キャッシュディレクトリ3、データ7か、第1表(a)
の様になっていたとする。このとき他のプロセサによっ
て主記憶が書換えられ、そのときデータがBであった場
合、無効化制御回路12はデータBに対応する有効ビッ
ト5をリセットするとともに、無効化履歴ビット6をセ
ットする第1表(a) 第2表 第1表(b) 次にプロセサよりフラッシング命令203が発せられそ
のときのフラッシング対象タグアドレスがCの場合、全
データ無効化回路8は全有効ビット5をリセットしアド
レスレジスタ9にCを保持この状態でプロセサよりデー
タAに対するアクセスがあった場合、アドレスタグ4は
一致するが有効ビット5がリセットされているため無効
化履歴ビット6を参照する。このとき無効化履歴ビット
6はセットされていないので、次にアドレスタグ4の内
容とアドレスレジスタ9の内容が比較器10で比較され
る。この場合アドレスタグ4の内容はaでありアドレス
レジスタ9の内容はCであるので不一致となり無効化制
御回路12はデータAに対応する有効ビット5をセット
しプロセサにデータAをプロセサにデータAを渡す(第
3表)。
Cache directory 3, data 7, Table 1 (a)
Suppose it were like this. At this time, if the main memory is rewritten by another processor and the data is B at that time, the invalidation control circuit 12 resets the valid bit 5 corresponding to data B and sets the invalidation history bit 6. Table 1 (a) Table 2 Table 1 (b) Next, when a flushing command 203 is issued by the processor and the tag address to be flushed at that time is C, the all data invalidation circuit 8 resets all valid bits 5. C is held in the address register 9. If the processor accesses data A in this state, the address tag 4 matches but the valid bit 5 has been reset, so the invalidation history bit 6 is referred to. Since the invalidation history bit 6 is not set at this time, the contents of the address tag 4 and the contents of the address register 9 are then compared by the comparator 10. In this case, the content of the address tag 4 is a and the content of the address register 9 is C, so there is a mismatch, and the invalidation control circuit 12 sets the valid bit 5 corresponding to data A and sends data A to the processor. (Table 3).

第3表 プロセサからデータDに対するアクセスがあった場合も
同様の処理となる。
Similar processing occurs when data D is accessed from the Table 3 processor.

プロセサからのアクセスがデータB、データCに対する
アクセスの場合は、前者は無効化履歴ビット6がセット
されているため、後者はアドレスレジスタ9とアドレス
タグ4の比較結果が一致しているためミスの扱いとなる
If the access from the processor is to data B or data C, the former has the invalidation history bit 6 set, and the latter has the same comparison result between the address register 9 and the address tag 4, so there is no mistake. It will be treated as such.

第2図は本発明の第2の実施例のブロック図である無効
化制御回路106は、無効化制御回路12からのフラッ
シング命令であり、他のプロセサからの主記憶の書換が
連続して起きた場合に発せられる。このとき無効化制御
回路12は、アドレスバス線102上のアドレスを無効
化制御回路12に出力し、アドレスレジスタ9に無効化
制御信号107に従って保持する。
FIG. 2 is a block diagram of a second embodiment of the present invention. The invalidation control circuit 106 is a flushing command from the invalidation control circuit 12, and the main memory is continuously rewritten by other processors. Issued when At this time, the invalidation control circuit 12 outputs the address on the address bus line 102 to the invalidation control circuit 12, and holds it in the address register 9 according to the invalidation control signal 107.

この実施例では、プロセサ2からのフラッシング命令だ
けでなく、他のプロセサの主記憶の書換えが連続した場
合のキャッシュメモリのフラッシングに対しても無駄な
無効化を防げるという利点がある。
This embodiment has the advantage that unnecessary invalidation can be prevented not only by flushing commands from the processor 2 but also by flushing the cache memory when the main memory of other processors is continuously rewritten.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、無効化履歴ビットとフラ
ッシング対象アドレスタグを保持するアドレスレジスタ
とこのアドレスレジスタとキャッシュ内のアドレスタグ
とを比較する比較器とを有することにより、主記憶との
不一致が生じてないデータまで無効化された場合でも、
プロセサからのプロセサに対しヒツトの扱いをして過度
のメインメモリアクセスを防ぎプロセサのスループット
を向上することができるという効果がある。
As explained above, the present invention has an address register that holds an invalidation history bit and an address tag to be flushed, and a comparator that compares this address register with an address tag in the cache. Even if data that has not occurred is invalidated,
This has the effect that it is possible to prevent excessive main memory access from one processor to another and improve processor throughput.

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

第1図は本発明の第1の実施例のブロック図、ヱ 第〆図は本発明の第2の実施例のブロック図である。 1・・・キャッシュメモリ、2・・・プロセサ、3・・
・キャッシュディレクトリ、4・・・アドレスタグ、5
・・・有効ビット、6・・・無効化履歴ビット、7・・
・キャッシュデータ、8・・・全データ無効化回路、9
・・・アドレスレジスタ、10・・・比較器、12・・
・無効化制御回路、101・・・比較器出力線、102
・・・アドレスバス、1.03・・・データバス、10
4・・・有効ピットセット/リセット信号線、105・
・・無効化履歴ピットセット/リード線、106・・・
無効化制御回路フラッシング命令線、107・・・アド
レスレジスタ制御線、108・・・無効化制御回路アド
レス線、201・・・プロセサアドレス線、202・・
・プロセサデータ線、203・・・フラッシング命令線
、204・・・フラッシング対象アドレスタグ線、30
1・・・アドレスタグ出力線、801・・・線データ無
効化信号線、802・・・アドレスレジスタ制御線、9
01・・・アドレスレジスタ出力線。 1゛(理人弁理士内原  晋
FIG. 1 is a block diagram of a first embodiment of the present invention, and the last figure is a block diagram of a second embodiment of the present invention. 1... Cache memory, 2... Processor, 3...
・Cache directory, 4...Address tag, 5
... Valid bit, 6... Invalidation history bit, 7...
・Cache data, 8... All data invalidation circuit, 9
...Address register, 10...Comparator, 12...
- Invalidation control circuit, 101... Comparator output line, 102
... Address bus, 1.03 ... Data bus, 10
4... Valid pit set/reset signal line, 105.
...Invalidation history pit set/lead line, 106...
Disabling control circuit flushing command line, 107... Address register control line, 108... Disabling control circuit address line, 201... Processor address line, 202...
- Processor data line, 203... Flushing command line, 204... Flushing target address tag line, 30
1... Address tag output line, 801... Line data invalidation signal line, 802... Address register control line, 9
01...Address register output line. 1゛ (Patent Attorney Susumu Uchihara

Claims (1)

【特許請求の範囲】[Claims]  他のプロセサの主記憶の書換えを監視し、この書換え
の行われたデータを保持していた場合にこのデータの有
効ビットをリセットすることでデータの無効化を行なう
第1の無効化手段と、プロセサからフラッシング命令に
よりキャッシュ内の全データの有効ビットをリセットす
ることによりキャッシュ内の全データを無効化する第2
の無効化手段とを有するキャッシュメモリにおいて、前
記第1の無効化手段によつて無効化されたことを示す無
効化履歴ビットと前記プロセスからのフラッシング対象
アドレスタグとを保持するアドレスレジスタと、このア
ドレスレジスタと前記キャッシュ内のアドレスタグとを
比較する比較器とを備え、前記プロセサからのアクセス
に対しアドレスタグがヒットしかつ有効ビットがリセッ
トの場合、前記無効化履歴ビットを参照してこと無効化
履歴ビットがセットされていなければアドレスタグと前
記アドレスレジスタの内容との比較し、一致していない
場合は有効ビットをセットしキャッシュ内のデータをプ
ロセサへ渡すように制御することを特徴とするキャッシ
ュメモリ。
a first invalidating means that monitors rewriting of the main memory of another processor, and invalidates the data by resetting a valid bit of the data if the rewritten data is retained; The second step is to invalidate all data in the cache by resetting the valid bits of all data in the cache using a flushing instruction from the processor.
an address register that holds an invalidation history bit indicating that the cache memory has been invalidated by the first invalidating means and an address tag to be flushed from the process; a comparator that compares an address register with an address tag in the cache, and when the address tag is hit in response to an access from the processor and the valid bit is reset, the invalidation history bit is referenced and the invalidation is performed. If the change history bit is not set, the address tag is compared with the contents of the address register, and if they do not match, a valid bit is set and the data in the cache is controlled to be passed to the processor. cache memory.
JP1201670A 1989-08-02 1989-08-02 Cache memory Pending JPH0363851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1201670A JPH0363851A (en) 1989-08-02 1989-08-02 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1201670A JPH0363851A (en) 1989-08-02 1989-08-02 Cache memory

Publications (1)

Publication Number Publication Date
JPH0363851A true JPH0363851A (en) 1991-03-19

Family

ID=16444953

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1201670A Pending JPH0363851A (en) 1989-08-02 1989-08-02 Cache memory

Country Status (1)

Country Link
JP (1) JPH0363851A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5535361A (en) * 1992-05-22 1996-07-09 Matsushita Electric Industrial Co., Ltd. Cache block replacement scheme based on directory control bit set/reset and hit/miss basis in a multiheading multiprocessor environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5535361A (en) * 1992-05-22 1996-07-09 Matsushita Electric Industrial Co., Ltd. Cache block replacement scheme based on directory control bit set/reset and hit/miss basis in a multiheading multiprocessor environment

Similar Documents

Publication Publication Date Title
US4445174A (en) Multiprocessing system including a shared cache
JPS58118083A (en) Cash control mechanism for multiple processing system
JPS6134178B2 (en)
JPH03225542A (en) Memory of data and processing circuit for bit encode data
JP2583525B2 (en) Data processing device
JPH0363851A (en) Cache memory
US5749092A (en) Method and apparatus for using a direct memory access unit and a data cache unit in a microprocessor
JPH0721781B2 (en) Multiprocessor system
JP2659007B2 (en) Information processing method and apparatus
US20040143711A1 (en) Mechanism to maintain data coherency for a read-ahead cache
JPH03230238A (en) Cache memory control system
JPH01228035A (en) Data processor
JP2507544B2 (en) Storage controller
JP2845754B2 (en) Multiprocessor system
JPH01128156A (en) Cache control system for multi-processor system
JPS5927994B2 (en) computer system
KR0140952B1 (en) A single cache sharing device in a multiprocessor system and data writing / reading method using the device
JPH0237446A (en) Cache control system
JPH0628258A (en) Microprocessor
JPH03220645A (en) information processing equipment
JPH0690684B2 (en) Data processing system
JPH0748189B2 (en) Data processing device
JPH03228151A (en) Invalidation controller for cache memory
JPH0528043A (en) Invalidation control method for instruction cache memory
JP2923273B2 (en) Data processing system