JPH0498339A - Buffer invalidation control system - Google Patents

Buffer invalidation control system

Info

Publication number
JPH0498339A
JPH0498339A JP2210511A JP21051190A JPH0498339A JP H0498339 A JPH0498339 A JP H0498339A JP 2210511 A JP2210511 A JP 2210511A JP 21051190 A JP21051190 A JP 21051190A JP H0498339 A JPH0498339 A JP H0498339A
Authority
JP
Japan
Prior art keywords
cache memory
buffer invalidation
address
request command
write
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
JP2210511A
Other languages
Japanese (ja)
Inventor
Takeshi Kitahara
北原 毅
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2210511A priority Critical patent/JPH0498339A/en
Priority to EP19910113197 priority patent/EP0470574A3/en
Priority to KR1019910013593A priority patent/KR940005769B1/en
Publication of JPH0498339A publication Critical patent/JPH0498339A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To make the maximum use of high speed so as to improve the performance of a whole system by canceling the transmission waiting state of a buffer invalidation request command and storing the content of a register means in a common memory. CONSTITUTION:When write requests are generated for the same areas of two cache memories (M1 and M2) and the writing of data in the cache memory (M1) is faster than that of the cache memory (M2), the buffer invalidation request command from the cache memory M1 is transmitted on a system bus and the cache memory M2 cancels the holding buffer invalidation request command and stores data stored in the register means P0 in the common memory(CM)3. When the issuing of the buffer invalidation request command from the self memory is terminated, a cache memory 1A receives the write request from corresponding CPU and returns the termination response. Thus, high speed being the merit of a copy back system is made the maximum use of and the efficiency of the system can be improved.

Description

【発明の詳細な説明】 〔概要〕 複数のコピー・バック方式のキャンシュメモリ間におい
てバッファ無効化処理を制御する技術に関し、 キャッシュメモリ内で書き換えたデータを消失させるこ
となく、コピー・バック方式の利点である高速性を最大
限に活かし、ひいてはシステム全体の性能向上に寄与す
ることを目的とし、各キャッシュメモリは、内部のそれ
ぞれのエントリにアドレス部、データ部、有効指示フラ
グおよび変更済指示フラグを有し、且つ、対応するCP
Uからの書き込み要求によるデータとアドレスを格納す
るレジスタ手段と、対応するCPUからのデータの書き
込み要求があった場合に、その対象領域が当該キャッシ
ュメモリ内に登録されていて且つ変更済指示フラグがオ
フの時は該書き込み要求による書き込みデータを当該対
象エントリおよび前記レジスタ手段に格納し、該変更済
指示フラグをオンにすると共に、当該書き込みアドレス
の少なくとも一部を含むバッファ無効化要求コマンドを
前記システムバスに送出する手段と、該システムバス上
のコマンドを監視し、そのコマンドに含まれるアドレス
と前記書き込みアドレスを比較する手段とを有し、前記
バッファ無効化要求コマンドの送出待ち状態において前
記監視したシステムバス上のコマンドが他のキャッシュ
メモリからのバッファ無効化要求コマンドであって且つ
含まれるアドレスが同一領域を指示していた場合に、該
バッファ無効化要求コマンドの送出待ち状態をキャンセ
ルすると共に、前記レジスタ手段の内容をストア・スル
一方式で前記共有メモリへ格納するように構成する。
[Detailed Description of the Invention] [Summary] Regarding a technology for controlling buffer invalidation processing between multiple copy-back type cache memories, the present invention provides advantages of the copy-back type without erasing data rewritten in the cache memory. In order to take full advantage of the high speed of has and corresponds to CP
A register means for storing data and an address according to a write request from U, and when there is a data write request from the corresponding CPU, the target area is registered in the cache memory and the changed indication flag is set. When off, the write data according to the write request is stored in the target entry and the register means, the changed instruction flag is turned on, and a buffer invalidation request command containing at least a part of the write address is sent to the system. and a means for monitoring a command on the system bus and comparing an address included in the command with the write address, and in a state of waiting for sending of the buffer invalidation request command. If the command on the system bus is a buffer invalidation request command from another cache memory and the included address indicates the same area, cancel the sending wait state of the buffer invalidation request command, and The contents of the register means are configured to be stored in the shared memory in a store-through manner.

〔産業上の利用分野〕[Industrial application field]

本発明は、複数のコピー・ハック方式のキャッシュメモ
リと少なくとも1つの共有メモリがシステムバスを介し
て接続されているマルチプロセッサシステムに係わり、
特に、各キャッシュメモリ内の同一領域に対して同時に
書き込み要求が発生した場合に他のキャッシュメモリ内
の同一領域を無効化するためのバッファ無効化処理を制
御する技術に関する。
The present invention relates to a multiprocessor system in which a plurality of copy/hack type cache memories and at least one shared memory are connected via a system bus,
In particular, the present invention relates to a technique for controlling buffer invalidation processing for invalidating the same area in other cache memories when write requests occur simultaneously to the same area in each cache memory.

〔従来の技術〕[Conventional technology]

第6図に従来のキャンシュメモリ制御形態の一例が示さ
れる。
FIG. 6 shows an example of a conventional cache memory control mode.

図示の例では、キャッシュメモリA、Bは共にコピー・
バック方式のキャッシュメモリであるものとする。また
、■はアクセスアドレスで指示される領域が自キャッシ
ュメモリ内に存在するが否かを指示する有効指示フラグ
、Mはデータが書き換えられたか否かを指示する変更済
指示フラグを示している。
In the illustrated example, both cache memories A and B are
It is assumed that this is a back-type cache memory. Further, ■ indicates a valid instruction flag indicating whether or not the area specified by the access address exists in the local cache memory, and M indicates a changed instruction flag indicating whether or not data has been rewritten.

キャッシュメモリA、Bはそれぞれ、対応するCPUか
らのデータ書き込み(ライト)要求が有った場合に、そ
の対象領域が自メモリ内に登録されていて(V=1)且
つ変更済指示フラグMがオフCM=0)の時にその書き
込みデータを当該対象領域(エントリ)に書き込み、変
更済指示フラグMをオン(M= 1 )にする。キャッ
シュメモリA(またはB)は、未変更領域にデータを書
き込むと、バッファ無効化要求コマンドBICMDをシ
ステムバスに送出しくライトワンス動作)、それによっ
て他のキャッシュメモリB(またはA)内の同一領域を
クリア(無効化)する。
For cache memories A and B, when there is a data write request from the corresponding CPU, the target area is registered in its own memory (V = 1) and the changed instruction flag M is set. When CM=0), the write data is written to the target area (entry), and the changed instruction flag M is turned on (M=1). When cache memory A (or B) writes data to an unmodified area, it sends a buffer invalidation request command BICMD to the system bus (write-once operation), thereby writing data to the same area in another cache memory B (or A). Clear (invalidate).

従来の方式では、キャッシュメモリA、Bは共に、いっ
たんライトワンス動作を開始するとバッファ無効化要求
コマンドの発行が終了するまでCPUヘライト終了応答
を返さなかった。
In the conventional system, once the write-once operation of both cache memories A and B started, they did not return a CPU write end response until the issuance of the buffer invalidation request command was completed.

また、外部アクセスアドレスが内部の変更済のエントリ
のアドレスと一致した場合には、当該キャッシュメモリ
は、その外部アクセスを行ったキャッシュメモリに対し
て該アクセスの一時中断を要求するインタセプト信号を
送出し、その1工ントリ分をスワップアウト(コピー・
バック)していた。
Additionally, if the external access address matches the address of an internal modified entry, the cache memory sends an intercept signal to the cache memory that performed the external access, requesting that the access be temporarily suspended. , swap out (copy/
back).

また、ライトワンス動作の実行中に外部からインタセプ
ト信号を受信した場合には、当該キャッシュメモリは、
そのインタセプト信号を出力したデバイス(他のキャッ
シュメモリ)のアクセスが終了した後、再度ライトワン
ス(バ・ンファ無効化要求コマンドの送出)を実行して
いた。
Additionally, if an intercept signal is received from the outside while a write-once operation is being executed, the cache memory will
After the access of the device (other cache memory) that outputs the intercept signal is completed, the write-once (sending of the buffer invalidation request command) is executed again.

なお、第7図には第6図におけるキャッシュメモリの状
態遷移の様子が示される。
Note that FIG. 7 shows the state transition of the cache memory in FIG. 6.

図中、■は無効状態(V=0)、Uは有効かつ未変更状
11(V−1かつM=0)、Mは有効かつ変更済状態(
■=1かつM= 1 ) 、(1)は読み出しくリード
)動作による新規登録、(2)は未変更領域への書き込
みおよびバッファ無効化要求コマンドの発行、(3)は
リプレースのためのコピー・バック、(4)はリプレー
スのためのクリア、そして(5)は書き込み(ライト)
動作による新規登録を示す。なお、状態Uから状態Iへ
の遷移(4)および状態Mから状態Iへの遷移(3)は
、他のキャッシュメモリからのバッファ無効化要求コマ
ンドに基づくクリア動作によって行われる。
In the figure, ■ is an invalid state (V=0), U is a valid and unmodified state 11 (V-1 and M=0), and M is a valid and modified state (
■ = 1 and M = 1), (1) is new registration by read operation, (2) is writing to an unchanged area and issuing a buffer invalidation request command, (3) is copying for replacement.・Back, (4) clear for replacement, and (5) write
Indicates new registration by action. Note that the transition (4) from state U to state I and the transition (3) from state M to state I are performed by a clearing operation based on a buffer invalidation request command from another cache memory.

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

上述した従来の制御方式において、ライトワンス動作が
中断されることなく終了するまでCPUへ応答を返さな
い場合は、コピー・ハック方式が備えている利点(バス
・アクセスの頻度を減らし、処理の高速化を図る)を最
大限に活かすことができず、そのため、システム全体の
性能が低下するという問題が生じる。
In the conventional control method described above, when a response is not returned to the CPU until the write-once operation is completed without interruption, the advantages of the copy-hack method (reducing the frequency of bus access and high-speed processing) Therefore, the problem arises that the performance of the entire system deteriorates.

また、1工ントリ分をスワップアウトする方法では、当
該キャッシュメモリと共有メモリとの間の通信に時間が
かかるという欠点がある。
Furthermore, the method of swapping out one memory has the disadvantage that communication between the cache memory and the shared memory takes time.

また、再度ライトワンスを実行する方法では、どちらの
キャッシュメモリもライトワンスが必要となる上記の例
の場合、互いにライトワンスおよびインタセプト動作を
繰り返し、場合によっては無限ループに陥ってしまう可
能性があり、そのために高速処理を実現できないという
問題がある。
In addition, in the method of executing write-once again, in the above example where write-once is required for both cache memories, write-once and intercept operations may be repeated for each other, possibly resulting in an infinite loop. Therefore, there is a problem that high-speed processing cannot be achieved.

さらに、複数のキャッシュメモリ(第6図の例示では2
つのキャッシュメモリ)において・それぞれ同時にデー
タ書き込みが発生した時、タイミングが完全に一致する
と両者からバッファ無効化要求コマンドがシステムバス
上に送出され、それによって双方のキャッシュメモリ内
の書き込みデータが消失するという不都合がある。
Furthermore, a plurality of cache memories (in the example shown in FIG. 6, two
When data writes occur at the same time in two cache memories, if the timings perfectly match, a buffer invalidation request command is sent from both sides onto the system bus, and the data written in both cache memories is thereby lost. There is an inconvenience.

この不都合を回避するため、ソフトウェア制御により共
有領域の書き換えは1つのCPUにのみ許可する(コピ
ー・オン・ライト力式)、等の対策が考えられるが、こ
れは、制御が極めて複雑であるため、実用的とは言えな
い。
In order to avoid this inconvenience, countermeasures can be considered, such as allowing only one CPU to rewrite the shared area through software control (copy-on-write method), but this is extremely complicated to control. , cannot be called practical.

本発明は、かかる従来技術における課題に鑑み創作され
たもので、キャンシュメモリ内で書き換えたデータを消
失させることなく、コピー・バック方式の利点である高
速性を最大限に活かし、ひいてはシステム全体の性能向
上に寄与することができるバッファ無効化制御方式を提
供することを目的としている。
The present invention was created in view of the problems in the conventional technology, and it takes full advantage of the high speed that is the advantage of the copy-back method without erasing the data rewritten in the cache memory, thereby improving the efficiency of the entire system. The purpose of this invention is to provide a buffer invalidation control method that can contribute to improved performance.

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

第1図(a) 、 (b)の原理図に示されるように、
本発明のバッファ無効化制御方式は、複数のコピー・バ
ック方式のキャッシュメモリ旧〜Mnと少なくとも1つ
の共有メモリCMがシステムバスを介して接続されてい
るマルチプロセッサシステムにおいて、 各キャッシュメモリ旧は、内部のそれぞれのエントリに
アドレス部A1データ部D1アクセスアドレスで示され
る領域が自己のキャッシュメモリ内に存在するか否かを
指示する有効指示フラグV、およびデータが書き換えら
れたか否かを指示する変更済指示フラグMを有し、且つ
、 対応するCPUC1からの書き込み要求によるデータと
アドレスを格納するレジスタ手段POと、対応するCP
Uからのデータの書き込み要求があった場合に、その対
象領域が当該キャッシュメモリ内に登録されていて且つ
変更済指示フラグがオフの時は該書き込み要求による書
き込みデータを当該対象エントリおよび前記レジスタ手
段に格納し、該変更済指示フラグをオンにすると共に、
当該書き込みアドレスの少なくとも一部を含むバッファ
無効化要求コマンドを前記システムバスに送出する手段
PIと、該システムバス上のコマンドを監視し、そのコ
マンドに含まれるアドレスと前記書き込みアドレスを比
較する手段P2とを有し、前記バッファ無効化要求コマ
ンドの送出待ち状態において前記監視したシステムバス
上のコマンドが他のキャッシュメモリからのバッファ無
効化要求コマンドであって且つ含まれるアドレスが同一
領域を指示していた場合に、該バッファ無効化要求コマ
ンドの送出待ち状態をキャンセルすると共に、前記レジ
スタ手段の内容をストア・スルー方式で前記共有メモリ
へ格納する(P3)ようにしたことを特徴とする。
As shown in the principle diagrams in Figures 1(a) and (b),
The buffer invalidation control method of the present invention is applicable to a multiprocessor system in which a plurality of copy-back type cache memories old to Mn and at least one shared memory CM are connected via a system bus. In each internal entry, a valid indication flag V indicating whether the area indicated by the address section A1 data section D1 access address exists in its own cache memory, and a change indicating whether the data has been rewritten or not. A register means PO which has a completed instruction flag M and stores data and addresses according to a write request from the corresponding CPUC1, and a corresponding CPUC.
When there is a data write request from U, if the target area is registered in the cache memory and the changed instruction flag is off, the data written by the write request is sent to the target entry and the register means. and turn on the changed instruction flag,
means PI for sending a buffer invalidation request command including at least a part of the write address to the system bus; and means P2 for monitoring commands on the system bus and comparing the address included in the command with the write address. and when the command on the monitored system bus is a buffer invalidation request command from another cache memory while waiting for transmission of the buffer invalidation request command, and the included address points to the same area. In this case, the buffer invalidation request command is canceled and the content of the register means is stored in the shared memory in a store-through manner (P3).

〔作用〕[Effect]

説明の簡単化のため、例えば2つのキャッシュメモリ(
M+9Mzとする)内の同一領域に対して同時に書き込
み要求が発生し、一方のキャッシュメモリ(M+)の方
が他方のキャッシュメモリ(M2)よりもデータ書き込
みが早かったものとする。
To simplify the explanation, for example, two cache memories (
Assume that write requests occur simultaneously to the same area in the cache memory (M+9Mz), and data is written faster in one cache memory (M+) than in the other cache memory (M2).

この場合、キャッシュメモリー、からのバッファ無効化
要求コマンドがシステムバス上に送出され、それによっ
てキャッシュメモリ阿2は、保留中(送出待ち状態)の
バッファ無効化要求コマンドをキャンセルし、レジスタ
手段に格納されているデータを共有メモリCMへ格納す
る(書き込みデータの消失防止)。
In this case, a buffer invalidation request command from the cache memory is sent onto the system bus, and the cache memory A2 cancels the buffer invalidation request command that is pending (waiting to be sent) and stores it in the register means. The written data is stored in the shared memory CM (preventing loss of written data).

一方、キャッシュメモリIAは、自メモリからのバッフ
ァ無効化要求コマンドの発行が終了すると対応するCP
Uからのライト要求を受は付け、その終了応答を返すこ
とができる。また、キャッシュメモリIBからのバッフ
ァ無効化要求コマンドの送出がキャンセルされたため、
キャッシュメモリIAでは対象領域のデータが消失する
ことはない。
On the other hand, when the cache memory IA finishes issuing the buffer invalidation request command from its own memory, the cache memory IA
It can accept a write request from U and return a completion response. Also, since the sending of the buffer invalidation request command from the cache memory IB was canceled,
In the cache memory IA, data in the target area will not be lost.

このように、複数のキャッシュメモリにおいてそれぞれ
同時に内部の同一領域への書き込み要求が発生した場合
に、各キャッシュメモリは、バッファ無効化要求コマン
ドを発行することができた時は自己のライドリンス動作
の終了後に内部の該当エントリの更新およびCPUへの
ライト終了応答を返すことができ、一方、バッファ無効
化要求コマンドを受信した時はレジスタ手段の内容をス
トア・スル一方式で共有メモリへ反映させることができ
る。これによって、書き換えたデータを消失させずに、
他のキャッシュメモリ内の同一領域を無効化し、さらに
はコピー・バック方式の利点である高速性を最大限に活
かし、システム効率の向上に寄与することが可能となる
In this way, when a write request to the same internal area occurs in multiple cache memories at the same time, when each cache memory is able to issue a buffer invalidation request command, it performs its own write-rinse operation. After completion, it is possible to update the corresponding internal entry and return a write completion response to the CPU, and on the other hand, when a buffer invalidation request command is received, the contents of the register means can be reflected in the shared memory in a store-through manner. I can do it. This allows you to avoid losing rewritten data.
It becomes possible to invalidate the same area in another cache memory, and furthermore, to take full advantage of the high speed that is an advantage of the copy-back method, contributing to improving system efficiency.

なお、本発明の他の構成上の特徴および作用の詳細につ
いては、添付図面を参照しつつ以下に記述される実施例
を用いて説明する。
Note that other structural features and details of the operation of the present invention will be explained using the embodiments described below with reference to the accompanying drawings.

〔実施例〕〔Example〕

第2図には本発明のバッファ無効化制御方式が適用され
る密結合マルチプロセッサシステムの構成が示される。
FIG. 2 shows the configuration of a tightly coupled multiprocessor system to which the buffer invalidation control method of the present invention is applied.

本システムでは、複数のコピー・バック方式のキャッシ
ュメモリIA、IB(本実施例では図示の簡単化のため
2個のみ図示)がシステムバス4を介して少なくとも1
つの共有メモリ3(同様に簡単化のため1個のみ図示)
に接続されている。また、各キャッシュメモリIA、I
Bには、それぞれ対応するキャッシュメモリへのアドレ
ス情報の供給やデータ読み出しおよび書き込み等の制御
を行う中央処理袋! (CP U) 2A、2Bが接続
されている。
In this system, a plurality of copy-back type cache memories IA and IB (in this embodiment, only two are shown for simplicity of illustration) are connected to at least one cache memory via a system bus 4.
shared memory 3 (also only one is shown for simplicity)
It is connected to the. In addition, each cache memory IA, I
B is a central processing bag that supplies address information to the corresponding cache memory and controls data reading and writing. (CPU) 2A and 2B are connected.

第3図(a) 、 (b)には第2図におけるキャンシ
ュメモリの内部構成が示される。
FIGS. 3(a) and 3(b) show the internal structure of the cache memory in FIG. 2.

第3図(a)において、31はタグ部(タグメモ1月で
あって、アクセスデータの物理アドレスを記憶するアド
レス部と、アクセスアドレスで指示される領域が自キャ
ッシュメモリ内に存在するか否かを指示する有効指示フ
ラグ■と、データが書き換えられたか否かを指示する変
更済指示フラグMを有している。なお、各フラグ■、M
は、それぞれの条件が肯定された時に「オン」すなわち
「1」を呈し、否定された時に「オフ」すなわち「0」
を呈する。
In FIG. 3(a), 31 is a tag part (tag memo), which includes an address part that stores the physical address of the access data, and whether or not the area specified by the access address exists in the local cache memory. It has a valid indication flag ■ which indicates that the data has been rewritten, and a changed indication flag M which indicates whether or not the data has been rewritten.
indicates "on" or "1" when each condition is affirmed, and "off" or "0" when each condition is denied.
exhibits.

32は対応するCPUからのアドレスADDIを解読す
るデコーダ(DEC)、33はタグ部31に登録されて
いるアドレスとCPUからのアドレスADDIとフラグ
Vのビットに応答する比較回路、34はCPUからの読
み出し/書き込み制御信号R/−に応答するインバータ
、35はフラグMのビットに応答するインバータ、36
は比較回路33の出力とインバータ34の出力(CPU
書き込み信号CWRT )に応答してフラグMのビット
をセット状態(信号MSET )にするアンドゲート、
37は比較回路33の出力とインバータ34の出力CW
RTとインバータ35の出力に応答するアンドゲート、
38は対応するCPUからのアドレスADDIを格納す
るストアバッファ、そして39はバッファ無効化制御回
路であって、ストアバッファ38から供給される無効化
アドレスIADとアンドゲート37の出力−Uとキャン
セル信号CNL (後述)に応答し、バッファ無効化要
求コマンドの作成およびシステムバス4への送出、該コ
マンドの送出キャンセル、ならびに該コマンドの発行終
了を指示する信号CIENDを出力する機能を有してい
る。
32 is a decoder (DEC) that decodes the address ADDI from the corresponding CPU; 33 is a comparison circuit that responds to the address registered in the tag section 31, the address ADDI from the CPU, and the flag V bit; 34 is a decoder (DEC) that decodes the address ADDI from the CPU; An inverter 35 responds to the read/write control signal R/-, an inverter 36 responds to the flag M bit.
is the output of the comparison circuit 33 and the output of the inverter 34 (CPU
an AND gate that sets the bit of flag M (signal MSET) in response to write signal CWRT);
37 is the output of the comparison circuit 33 and the output CW of the inverter 34
an AND gate responsive to RT and the output of inverter 35;
38 is a store buffer that stores the address ADDI from the corresponding CPU, and 39 is a buffer invalidation control circuit that outputs the invalidation address IAD supplied from the store buffer 38, the output -U of the AND gate 37, and the cancel signal CNL. (described later), it has a function of creating a buffer invalidation request command, sending it to the system bus 4, canceling the sending of the command, and outputting a signal CIEND instructing the end of issuing the command.

同様に、40はシステムバス4上のアドレスADD2を
解読するデコーダ(DEC)、41はタグ部31に登録
されているアドレスとシステムバス4上のアドレスAD
D2とフラグ■のビットに応答する比較回路、42はス
トアバッファ38から供給される無効化アドレスIAD
(3Qビツト)とシステムバス4上のアドレスADD2
 (この場合、他のキャッシュメモリからのバッファ無
効化要求コマンドのアドレスBIAD)に応答する比較
回路、43は対応するCPUからの書き込みデーターD
Tを格納するストアバッファ、そして44はストア動作
制御回路であって、ストアバッファ38から供給される
ストアアドレスSA (32ビツト)とストアバッファ
43から供給されるストアデータSDと比較回路42か
ら出力されるストアコマンド起動信号SC5(後述)に
応答し、ストアコマンドの作成およびシステムバス4へ
の送出、ならびに該ストア動作の終了を指示する信号5
ENDを出力する機能を有している。
Similarly, 40 is a decoder (DEC) that decodes the address ADD2 on the system bus 4, and 41 is the address registered in the tag unit 31 and the address AD on the system bus 4.
Comparison circuit responsive to bit D2 and flag ■; 42 is invalidation address IAD supplied from store buffer 38;
(3Q bit) and address ADD2 on system bus 4
(In this case, the comparison circuit responds to the address BIAD of the buffer invalidation request command from another cache memory), and 43 is the write data D from the corresponding CPU.
44 is a store operation control circuit which stores the store address SA (32 bits) supplied from the store buffer 38, the store data SD supplied from the store buffer 43, and the output from the comparison circuit 42. In response to a store command activation signal SC5 (described later), a signal 5 instructs to create a store command, send it to the system bus 4, and terminate the store operation.
It has a function to output END.

なお、比較回路33は、有効指示フラグ■がオン(V=
1)の状態でタグ部31のアドレスとCPUアドレスA
DDIが一致した時にその出力を“ドとし、それによっ
て対応するアンドゲート36を「有効Jにする。この状
態(比較回路33の出力が“l”)で変更済指示フラグ
Mがオフ(M=0)であれば、インバータ35の出力が
“ビとなり、アンドゲート37が「有効」となる。一方
、比較回路41は、有効指示フラグVがオン(V= 1
 )の状態でタグ部31のアドレスとシステムバス4上
のアドレスADD2が一致した時に、フラグ■のビット
をクリア(信号VCLR)する。また、比較回路42は
、システムバス4上の他のキャンシュメモリからのバッ
ファ無効化要求コマンドのアドレスBIADとストアバ
ッファ38からの無効化アドレスIADが一致した時に
、バッファ無効化制御回路39に対して上記キャンセル
信号CNLを供給すると共に、ストア動作制御回路44
に対して上記ストアコマンド起動信号SC8を供給する
Note that in the comparison circuit 33, the valid instruction flag ■ is on (V=
In the state of 1), the address of the tag section 31 and the CPU address A
When DDI matches, the output is set to "do", thereby making the corresponding AND gate 36 "enabled". In this state (the output of the comparison circuit 33 is "l"), the changed instruction flag M is turned off (M= 0), the output of the inverter 35 becomes "Bi" and the AND gate 37 becomes "valid". On the other hand, the comparison circuit 41 detects that the valid instruction flag V is on (V=1
), when the address of the tag section 31 and the address ADD2 on the system bus 4 match, the bit of the flag (2) is cleared (signal VCLR). Further, when the address BIAD of the buffer invalidation request command from another cache memory on the system bus 4 and the invalidation address IAD from the store buffer 38 match, the comparison circuit 42 sends a message to the buffer invalidation control circuit 39. In addition to supplying the cancel signal CNL, the store operation control circuit 44
The above store command activation signal SC8 is supplied to.

第3図(b)に示される回路は、バッファ無効化要求コ
マンドの発行終了指示信号CIENDとストア動作終了
指示信号5ENDに応答するオアゲー)51と、CPU
書き込み信号CWRT、オアゲート51の出力および外
部クロックφをそれぞれJ端子、K端子およびクロック
端子CLKに受けてQ出力端子にストアバッファ・ビジ
ィ信号SBBを出力するJ−に型フリップフロップ52
と、ストアバッファ38からの無効化アドレスIADと
CPUからのアドレスADDIの一致/不一致を検出す
る比較回路53と、該比較回路の出力とCPU書き込み
信号CWRTに応答するアンドゲート54と、該アンド
ゲートの出力とストアバッファ・ビジィ信号SBBに応
答するアンドゲート55と、アンドゲート37(第3図
(a)参照)の出力−Uとストアバッファ・ビジィ信号
SBHに応答するアンドゲート56と、該アンドゲート
55および56の出力に応答してCPUウェイト信号C
WTを生成するオアゲート56とから構成されている。
The circuit shown in FIG. 3(b) includes an OR game (OR game) 51 that responds to a buffer invalidation request command issuance end instruction signal CIEND and a store operation end instruction signal 5END, and a CPU.
A J-type flip-flop 52 receives the write signal CWRT, the output of the OR gate 51, and the external clock φ at the J terminal, K terminal, and clock terminal CLK, respectively, and outputs the store buffer busy signal SBB to the Q output terminal.
, a comparison circuit 53 that detects the match/mismatch between the invalidation address IAD from the store buffer 38 and the address ADDI from the CPU, an AND gate 54 that responds to the output of the comparison circuit and the CPU write signal CWRT, and the AND gate. and an AND gate 55 responsive to the output of the AND gate 37 (see FIG. 3(a)) and the store buffer busy signal SBB; CPU wait signal C in response to the outputs of gates 55 and 56
and an OR gate 56 that generates WT.

次に、第4図(a) 、 (b)を参照しながらバッフ
ァ無効化制御方法について説明する。
Next, a buffer invalidation control method will be explained with reference to FIGS. 4(a) and 4(b).

(第4図(a)参照) ■ キャッシュメモリIA、 IBは、自メモリ内に登
録されていて(V= 1 )且つ変更済指示フラグがオ
フ(M=0)となっている領域に対して対応するC P
 U2A、2Bからのライト要求が有ると、該ライト要
求によるデータとアドレスを当該対象エントリおよびス
トアバッファ43.38に保持し、対応するCPUヘラ
イト終了応答を返す、この時、書き換え対象エントリが
未変更状態から変更済状態に移行するため、キャッシュ
メモ1月A、1Bはそれぞれ変更済指示フラグMをオン
(M= 1 )にする。
(See Figure 4 (a)) ■ Cache memories IA and IB are used for areas registered in their own memory (V = 1) and where the changed instruction flag is off (M = 0). Corresponding C P
When there is a write request from U2A or 2B, the data and address from the write request are held in the target entry and the store buffer 43.38, and a corresponding CPU write completion response is returned. At this time, the rewrite target entry remains unchanged. In order to transition from the state to the changed state, each of the cash memos January A and 1B turns on the changed indication flag M (M=1).

■ キャッシュメモリIAは、バッファ無効化要求コマ
ンドをシステムバス4に送出する(ライトワンス動作)
■ Cache memory IA sends a buffer invalidation request command to system bus 4 (write-once operation)
.

■ キャッシュメモリIBは、キャッシュメモリIAと
同様にしてバッファ無効化要求コマンドを送出(発行)
しようとしているが、たまたまキャッシュメモリIAの
動作の方が早かったためにシステムバスの使用権を獲得
できず、バッファ無効化要求コマンドの送出(発行)待
ち状態となる。
■ Cache memory IB sends (issues) a buffer invalidation request command in the same way as cache memory IA.
However, because the cache memory IA happened to operate faster, the right to use the system bus could not be acquired, and the buffer invalidation request command was sent (issued) in a waiting state.

(第4図(b)参照) ■ キャッシュメモリIBは、キャッシュメモリIAか
らのバッファ無効化要求コマンドにより、同一領域の登
録を抹消する。
(See FIG. 4(b)) ① The cache memory IB cancels the registration of the same area in response to the buffer invalidation request command from the cache memory IA.

なお、キャッシュメモ1月Bは、バッファ無効化要求コ
マンドの発行待ち状態では、同一領域に対するCPU2
Bからの新たなライト要求は終了させない。
In addition, in the cache memo January B, when the buffer invalidation request command is being issued, the CPU 2 for the same area is
A new write request from B is not terminated.

■ キャッシュメモIJIAは、自メモリからのバッフ
ァ無効化要求コマンドの発行が終了したため、対応する
CPU2Aからのライト要求を受は付け、ライト終了応
答を返す。
- Since the cache memory IJIA has finished issuing the buffer invalidation request command from its own memory, it accepts the write request from the corresponding CPU 2A and returns a write completion response.

■ キャッシュメモ1月Bは、発行待ち状態であったバ
ッファ無効化要求コマンドと同一の領域に対してキャッ
シュメモリIAからバッファ無効化要求コマンドが発行
されたため、該発行待ち状態をキャンセルすると共に、
■のステップで保持したストアバッファの内容をライト
コマンドによりストア・スル一方式で共有メモリ3へ格
納する(V=1→0)。これによって、書き込みデータ
の消失を防止することができる。
■ Cache memo January B has issued a buffer invalidation request command from the cache memory IA to the same area as the buffer invalidation request command that was in the issuance waiting state, so it cancels the issuance waiting state and
The contents of the store buffer held in step (2) are stored in the shared memory 3 in a store-through manner by a write command (V=1→0). This can prevent write data from disappearing.

第5図は第2図におけるキャッシュメモリの状態遷移の
様子を示している。
FIG. 5 shows how the state of the cache memory in FIG. 2 changes.

図中、I、U、M、(1) 、 (3) 、 (4)お
よび(5)については第7図と同様であるので、その説
明は省略する。STは共有メモリへのストア待ち状態、
Blはバッファ無効化要求コマンドの発行待ち状態を示
す。また、(2a)は未変更領域への書き込み、(2b
)はバッファ無効化要求コマンドの発行、(6)はバッ
ファ無効化要求コマンドの発行待ち、(7)は同一領域
に対するバッファ無効化要求コマンドの検出、(8)は
ストア待ち、そして(9)はストア完了を示す。
In the figure, I, U, M, (1), (3), (4), and (5) are the same as those in FIG. 7, so their explanation will be omitted. ST is waiting to store to shared memory,
Bl indicates a state of waiting for the issuance of a buffer invalidation request command. Also, (2a) writes to the unmodified area, (2b
) is issuing a buffer invalidation request command, (6) is waiting for a buffer invalidating request command to be issued, (7) is detecting a buffer invalidating request command for the same area, (8) is waiting for a store, and (9) is waiting for a buffer invalidating request command to be issued. Indicates store completion.

以上説明したように本実施例の制御方式によれば、キャ
ンシュメモリIA、 IBにおいて同時に内部の同一領
域への書き込み要求が発生した場合に、一方のキャッシ
ュメモリLA(IB)は、バッファ無効化要求コマンド
を発行し、そのライドリンス動作の終了後に該当エント
リの書き換えを行い、CPUヘライト終了応答を返すこ
とができる。これに対し他方のキャッシュメモリIB(
1^)は、自メモリにおけるバッファ無効化要求コマン
ドの送出待ち状態をキャンセルすると共に、他のキャッ
シュメモ1月A(IB)からのバッファ無効化要求コマ
ンドを受けてストアバッファ38.43の内容をストア
・スル一方式で共有メモリ3へ書き込む。
As explained above, according to the control method of this embodiment, when write requests to the same internal area occur simultaneously in cache memories IA and IB, one cache memory LA (IB) responds to the buffer invalidation request. It is possible to issue a command, rewrite the corresponding entry after the write-rinse operation is completed, and return a CPU write completion response. In contrast, the other cache memory IB (
1^) cancels the state in which it is waiting to send a buffer invalidation request command in its own memory, and upon receiving the buffer invalidation request command from another cache memo A (IB), writes the contents of the store buffer 38.43. Write to the shared memory 3 using one method of store and through.

これによって、書き換えたデータを消失させることなく
、他のキャッシュメモリ内の同一領域を無効化すること
ができ、さらにはコピー・バック方式の利点(高速処理
)を活かしてシステムの性能向上を図ることが可能とな
る。
This makes it possible to invalidate the same area in other cache memories without losing rewritten data, and also to improve system performance by taking advantage of the copy-back method (high-speed processing). becomes possible.

なお、本実施例では2つのキャッシュメモリ間でのバッ
ファ無効化制御方法について説明したが、3つ以上のキ
ャッシュメモリ (コピー・バック方式)間においても
上記制御方式が同様に適用され得ることは当業者には明
らかであろう。
Although this embodiment has described a buffer invalidation control method between two cache memories, it is natural that the above control method can be similarly applied between three or more cache memories (copy-back method). It will be obvious to business owners.

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

以上説明したように本発明によれば、複数のコピー・バ
ック方式のキャッシュメモリのそれぞれの同一領域に対
して同時に書き込み要求が発生した場合に、キャッシュ
メモリ内で書き換えたデータを消失させることなく、コ
ピー・バック方式の利点である高速性を最大限に活かし
てバッファ無効化処理を実現することができ、それによ
ってシステム全体の性能向上を図ることが可能となる。
As explained above, according to the present invention, when write requests are made simultaneously to the same area of each of a plurality of copy-back type cache memories, data rewritten in the cache memory is not lost. Buffer invalidation processing can be realized by taking full advantage of the high speed that is an advantage of the copy-back method, thereby making it possible to improve the performance of the entire system.

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

第1図(a)および(b)は本発明によるバッファ無効
化制御方式の原理図、 第2図は本発明のバッファ無効化制御方式が適用される
密結合マルチプロセッサシステムの構成を示すブロック
図、 第3図(a)および(b)は第2図におけるキャッシュ
メモリの内部構成を示す回路図、 第4図(a)および(b)は第2図のシステムにおける
キャッシュメモリ制御形態を時系列的に示した図、 第5図は第2図におけるキャッシュメモリの状態遷移図
、 第6図は従来のキャッシュメモリ制御方式の問題点を説
明するための図、 第7図は第6図におけるキャッシュメモリの状態遷移図
、 である。 (符号の説明) 阿、〜Mn・・・コピー・バック方式のキャッシュメモ
リ、 Cト・・共有メモリ、 A・・・アドレス部、 D・・・データ部、 ■・・・有効指示フラグ、 M・・・変更済指示フラグ、 Ci・・・対応するCPU、 po・・・レジスタ手段、 Pl・・・データを対象エントリおよびレジスタ手段に
格納しJバッファ無効化要求コマンドを送出する手段(
処理)、 P2・・・システムハス上のコマンドのアドレスと書き
込みアドレスを比較する手段(処理)、P3・・・バッ
ファ無効化要求コマンドの送出待ち状態をキャンセルし
、レジスタ手段の内容を共有メモリへ格納する処理。 第2 図 第47 第2図(こおけらキャッシュメモリの状態遷移図引回 [・・・無効状態 U・・・有効かつ未変更状態 M・・・有効かつ変更済状態 BI・・・バッファ無効化要求 コマンドの発行待ち状態 ST・・・ストア待ち状態
FIGS. 1(a) and (b) are principle diagrams of the buffer invalidation control method according to the present invention, and FIG. 2 is a block diagram showing the configuration of a tightly coupled multiprocessor system to which the buffer invalidation control method of the present invention is applied. , Figures 3(a) and (b) are circuit diagrams showing the internal configuration of the cache memory in Figure 2, and Figures 4(a) and (b) are chronological diagrams of the cache memory control form in the system in Figure 2 5 is a state transition diagram of the cache memory in FIG. 2, FIG. 6 is a diagram for explaining the problems of the conventional cache memory control method, and FIG. 7 is a state transition diagram of the cache memory in FIG. 6. This is a memory state transition diagram. (Explanation of symbols) A, ~Mn...Copy-back cache memory, C...Shared memory, A...Address section, D...Data section, ■...Validity instruction flag, M ...changed instruction flag, Ci...corresponding CPU, po...register means, Pl...means for storing data in the target entry and register means and sending out a J buffer invalidation request command (
P2...Means for comparing the address of the command on the system bus and the write address (processing), P3...Cancels the sending waiting state of the buffer invalidation request command, and stores the contents of the register means in the shared memory. Process to store. Figure 2 Figure 47 Figure 2 (Cache memory state transition diagram [...Invalid state U...Valid and unchanged state M...Valid and changed state BI...Buffer invalidation Request command issuance wait state ST: store wait state

Claims (1)

【特許請求の範囲】 1、複数のコピー・バック方式のキャッシュメモリ(M
_1〜Mn)と少なくとも1つの共有メモリ(CM)が
システムバスを介して接続されているマルチプロセッサ
システムにおいて、 各キャッシュメモリ(Mi)は、内部のそれぞれのエン
トリにアドレス部(A)、データ部(D)、アクセスア
ドレスで示される領域が自己のキャッシュメモリ内に存
在するか否かを指示する有効指示フラグ(V)、および
データが書き換えられたか否かを指示する変更済指示フ
ラグ(M)を有し、且つ、対応するCPU(Ci)から
の書き込み要求によるデータとアドレスを格納するレジ
スタ手段(P0)と、対応するCPUからのデータの書
き込み要求があった場合に、その対象領域が当該キャッ
シュメモリ内に登録されていて且つ変更済指示フラグが
オフの時は該書き込み要求による書き込みデータを当該
対象エントリおよび前記レジスタ手段に格納し、該変更
済指示フラグをオンにすると共に、当該書き込みアドレ
スの少なくとも一部を含むバッファ無効化要求コマンド
を前記システムバスに送出する手段(P1)と、 該システムバス上のコマンドを監視し、そのコマンドに
含まれるアドレスと前記書き込みアドレスを比較する手
段(P2)とを有し、 前記バッファ無効化要求コマンドの送出待ち状態におい
て前記監視したシステムバス上のコマンドが他のキャッ
シュメモリからのバッファ無効化要求コマンドであって
且つ含まれるアドレスが同一領域を指示していた場合に
、該バッファ無効化要求コマンドの送出待ち状態をキャ
ンセルすると共に、前記レジスタ手段の内容をストア・
スルー方式で前記共有メモリへ格納する(P3)ように
したことを特徴とするバッファ無効化制御方式。 2、前記キャッシュメモリは、前記バッファ無効化要求
コマンドの送出が終了した時に前記レジスタ手段を開放
状態にすることを特徴とする請求項1に記載のバッファ
無効化制御方式。 3、前記キャッシュメモリは、前記システムバス上の他
のキャッシュメモリからのバッファ無効化要求コマンド
を監視し、そのコマンドに含まれるアドレス領域を自キ
ャッシュメモリ内から消去することを特徴とする請求項
1に記載のバッファ無効化制御方式。 4、前記キャッシュメモリは、前記バッファ無効化要求
コマンドの送出前に対応するCPUからの書き込み要求
に対して終了応答を返すことを特徴とする請求項1に記
載のバッファ無効化制御方式。 5、前記キャッシュメモリは、対応するCPUからの新
たな書き込み要求によるアドレスと前記レジスタ手段に
おけるアドレスの一部を比較する手段を有し、バッファ
無効化の対象となった領域に対する新たな書き込み要求
に対して該レジスタ手段が開放状態となるまで終了応答
を返さないことを特徴とする請求項2に記載のバッファ
無効化制御方式。 6、前記キャッシュメモリは、前記有効指示フラグがオ
ンであって且つ前記変更済指示フラグがオフの領域に対
し対応するCPUからの新たな書き込み要求が有った場
合に、前記レジスタ手段が開放状態となるまで該書き込
み要求に対して終了応答を返さないことを特徴とする請
求項2に記載のバッファ無効化制御方式。
[Claims] 1. Multiple copy-back cache memories (M
In a multiprocessor system in which _1 to Mn) and at least one shared memory (CM) are connected via a system bus, each cache memory (Mi) has an address part (A) and a data part in each internal entry. (D), a valid indication flag (V) which indicates whether the area indicated by the access address exists in its own cache memory, and a changed indication flag (M) which indicates whether the data has been rewritten or not. and register means (P0) for storing data and addresses in response to a write request from the corresponding CPU (Ci), and when there is a data write request from the corresponding CPU, the target area is If it is registered in the cache memory and the changed instruction flag is off, the write data according to the write request is stored in the target entry and the register means, the changed instruction flag is turned on, and the write address is means (P1) for sending a buffer invalidation request command containing at least a part of the buffer invalidation request command to the system bus; and means (P2) for monitoring a command on the system bus and comparing the address included in the command with the write address. ), and in the buffer invalidation request command sending waiting state, the monitored command on the system bus is a buffer invalidation request command from another cache memory, and the contained address points to the same area. If the buffer invalidation request command has been sent, the buffer invalidation request command is canceled and the contents of the register means are stored.
A buffer invalidation control method characterized in that storage is performed in the shared memory in a through method (P3). 2. The buffer invalidation control method according to claim 1, wherein the cache memory opens the register means when sending of the buffer invalidation request command is completed. 3. The cache memory monitors a buffer invalidation request command from another cache memory on the system bus, and erases an address area included in the command from within its own cache memory. Buffer invalidation control method described in . 4. The buffer invalidation control method according to claim 1, wherein the cache memory returns a completion response to a write request from the corresponding CPU before sending the buffer invalidation request command. 5. The cache memory has means for comparing a part of the address in the register means with an address according to a new write request from the corresponding CPU, and the cache memory is configured to compare a part of the address in the register means with an address according to a new write request from the corresponding CPU, and according to a new write request to the area targeted for buffer invalidation. 3. The buffer invalidation control method according to claim 2, wherein an end response is not returned until the register means is in an open state. 6. In the cache memory, when there is a new write request from the corresponding CPU to an area where the valid instruction flag is on and the changed instruction flag is off, the register means is in an open state. 3. The buffer invalidation control method according to claim 2, wherein an end response is not returned to the write request until .
JP2210511A 1990-08-06 1990-08-10 Buffer invalidation control system Pending JPH0498339A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2210511A JPH0498339A (en) 1990-08-10 1990-08-10 Buffer invalidation control system
EP19910113197 EP0470574A3 (en) 1990-08-06 1991-08-05 Multiprocessor system including cache memories and method of controlling cache memories to maintain coherence of data therebetween
KR1019910013593A KR940005769B1 (en) 1990-08-06 1991-08-06 Multi-process system with cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2210511A JPH0498339A (en) 1990-08-10 1990-08-10 Buffer invalidation control system

Publications (1)

Publication Number Publication Date
JPH0498339A true JPH0498339A (en) 1992-03-31

Family

ID=16590584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2210511A Pending JPH0498339A (en) 1990-08-06 1990-08-10 Buffer invalidation control system

Country Status (1)

Country Link
JP (1) JPH0498339A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274415A (en) * 1993-03-17 1994-09-30 Nec Corp Shared memory system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274415A (en) * 1993-03-17 1994-09-30 Nec Corp Shared memory system

Similar Documents

Publication Publication Date Title
JP4057114B2 (en) Data processing system with cache and method therefor
KR100267029B1 (en) Memory update history storing apparatus and method
JP3086779B2 (en) Memory state restoration device
US5148526A (en) Data processing system with an enhanced cache memory control
US8209490B2 (en) Protocol for maintaining cache coherency in a CMP
US5737568A (en) Method and apparatus to control cache memory in multiprocessor system utilizing a shared memory
KR100505695B1 (en) Cache memory device having dynamically-allocated or deallocated buffers, digital data processing system comprising it and method thereof
US6976130B2 (en) Cache controller unit architecture and applied method
WO1997004392A1 (en) Shared cache memory device
KR100380674B1 (en) Method and system for maintaining cache coherency for write-through store operations in a multiprocessor system
JPH0498339A (en) Buffer invalidation control system
JPH01213732A (en) Extended storage system
JP4091171B2 (en) Cache flush method and apparatus
JPH03230238A (en) Cache memory control system
EP0470574A2 (en) Multiprocessor system including cache memories and method of controlling cache memories to maintain coherence of data therebetween
JPH0816390A (en) Microprocessor
JPH0498352A (en) Buffer invalidation control system
JPH0492937A (en) Cache memory control system
JP2001043204A (en) Cache memory controller
JP2923273B2 (en) Data processing system
JPH03172943A (en) Cache memory control system
JP3757768B2 (en) Issuing control system for scalar memory access instruction during vector memory access
JP2791319B2 (en) Data processing device
JPH04123151A (en) System bus
JP2000181790A (en) Memory update history preservation device