JP3145479B2 - Multiprocessor system and cache memory control method and apparatus therefor - Google Patents

Multiprocessor system and cache memory control method and apparatus therefor

Info

Publication number
JP3145479B2
JP3145479B2 JP13514592A JP13514592A JP3145479B2 JP 3145479 B2 JP3145479 B2 JP 3145479B2 JP 13514592 A JP13514592 A JP 13514592A JP 13514592 A JP13514592 A JP 13514592A JP 3145479 B2 JP3145479 B2 JP 3145479B2
Authority
JP
Japan
Prior art keywords
cache memory
memory
access
copy
bus interface
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.)
Expired - Fee Related
Application number
JP13514592A
Other languages
Japanese (ja)
Other versions
JPH05324470A (en
Inventor
伸一朗 山口
信康 金川
広昭 福丸
雅行 丹治
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP13514592A priority Critical patent/JP3145479B2/en
Publication of JPH05324470A publication Critical patent/JPH05324470A/en
Application granted granted Critical
Publication of JP3145479B2 publication Critical patent/JP3145479B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は密結合型マルチプロセッ
サにおけるキャッシュメモリ制御方法及びその装置に係
り、特に、各キャッシュメモリの内容の一貫性を保つの
に好適なキャッシュメモリ制御方法及びその装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for controlling a cache memory in a tightly-coupled multiprocessor, and more particularly to a method and an apparatus for controlling a cache memory suitable for keeping the contents of cache memories consistent. .

【0002】[0002]

【従来の技術】近年の高性能計算機には、メモリアクセ
ス速度の向上を目的として、キャッシュメモリが広く用
いられている。このキャシュメモリは、単一プロセッサ
よりなる計算機において、顕著な性能向上を実現できる
技術であるが、複数個のプロセッサがメモリを共有する
密結合型マルチプロセッサシステムでは、ボトルネック
となるシステムバスやメモリへのアクセスを低減するた
めにより重要な効果を産み出す。そこで、制御が複雑に
なるものの、性能面で優れていると言われているコピー
バック型キャッシュメモリが多く使われつつある。
2. Description of the Related Art Cache memories are widely used in recent high-performance computers in order to improve the memory access speed. This cache memory is a technology that can achieve remarkable performance improvement in a computer consisting of a single processor.However, in a tightly coupled multiprocessor system in which a plurality of processors share memory, a system bus or memory which becomes a bottleneck is used. Produce more important effects to reduce access to the Therefore, although the control is complicated, a copy-back type cache memory, which is said to be excellent in performance, is increasingly used.

【0003】マルチプロセッサシステムでのコピーバッ
ク型キャッシュメモリにおいては、データの一致化制御
(一貫性制御、あるいはコヒーレンス制御と呼ばれ
る。)が重要な技術課題となる。この一致化制御は、各
プロセッサに接続されたキャッシュメモリの内容を常に
矛盾(不一致)しないように制御する方法であり、文献
(James Archibald etal : Cache Coherence Protocols
; Evaluation Using a Multiprocessor Simulation Mo
del, ACM Transaction on Computer System, Vol.14,N
o.4,Nov. 1986, pp273-298)「キャッシュ コヒーレン
シ プロトコル:ユージング マルチプロセッサ シミ
ュレーション モデル」にいくつかの方式が紹介されて
いる。
[0003] In a copy-back type cache memory in a multiprocessor system, data matching control (referred to as coherence control or coherence control) is an important technical problem. This matching control is a method of controlling the contents of a cache memory connected to each processor so as not to always contradict (mismatch).
(James Archibald etal: Cache Coherence Protocols
; Evaluation Using a Multiprocessor Simulation Mo
del, ACM Transaction on Computer System, Vol. 14, N
o.4, Nov. 1986, pp273-298) Several methods are introduced in "Cache Coherency Protocol: Using Multiprocessor Simulation Model".

【0004】[0004]

【発明が解決しようとする課題】そして、これらのプロ
トコルを実装するときに問題となるのが、排他的書き込
み状態実現方法である。即ち、同じラインに複数のプロ
セッサが同時に書き込みを行なわないように、書き込み
が実行される前にハードウエアによって排他制御を行な
わなければならない。この課題を解決する方法は、特開
平3ー40047「キャッシュラインストア方法」に記
載されている。しかしながら、この従来技術では、大量
かつ特殊なハードウエアを必要とし、安価なマルチプロ
セッサシステムには適さない。
What is problematic when implementing these protocols is the exclusive write state realizing method. That is, exclusive control must be performed by hardware before writing is performed so that a plurality of processors do not write simultaneously on the same line. A method for solving this problem is described in JP-A-3-40047 "Cache line store method". However, this conventional technique requires a large amount of special hardware and is not suitable for an inexpensive multiprocessor system.

【0005】本発明の目的は、汎用マイクロプロセッサ
を用いたマルチプロセッサシステムにおいて、マイクロ
プロセッサの基本機能を用いて少ないハードウエアで排
他的書き込みを実現するキャッシュメモリ制御方法及び
その装置を提供することにある。
An object of the present invention is to provide a cache memory control method and an apparatus for realizing exclusive writing with a small amount of hardware using basic functions of a microprocessor in a multiprocessor system using a general-purpose microprocessor. is there.

【0006】[0006]

【課題を解決するための手段】上記目的は、命令実行部
と、該命令実行部に接続され主メモリの内容の一部をシ
ステムバスを介して読み出し格納するコピーバック型キ
ャッシュメモリと、該コピーバック型キャッシュメモリ
に接続され前記主メモリとのインターフェイスを取るバ
スインターフェイスと、前記コピーバック型キャッシュ
メモリに接続されシステムバスを介して行なわれるメモ
リアクセスを監視するバス監視装置とを備えてなりアク
セスのリトライ機能を備える処理装置複数を有するマル
チプロセッサシステムにおいて、前記バス監視装置が、
自処理装置以外の処理装置が自コピーバック型キャッシ
ュメモリの保持するラインを更新するアクセスを行なっ
たことを検出したとき、バスインターフェイスに対して
バスインターフェイスに保持されているメモリアクセス
要求をキャンセルさせ、バスインターフェイスがこのキ
ャンセル要求に呼応して、前記コピーバック型キャッシ
ュメモリ内に保持しているバスインターフェイスへのア
クセスをキャンセルさせ、前記命令実行部に対して前記
コピーバック型キャッシュメモリへのアクセスをキャン
セルさせ、その後に前記リトライを行うことで、達成さ
れる。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an instruction execution unit, a copy-back type cache memory connected to the instruction execution unit, for reading and storing a part of the contents of a main memory via a system bus. A bus interface connected to the back-type cache memory and interfacing with the main memory; and a bus monitoring device connected to the copy-back type cache memory and monitoring memory access performed via a system bus. In a multiprocessor system having a plurality of processing devices having a retry function, the bus monitoring device may include:
When detecting that a processing device other than the own processing device has performed an access for updating a line held in the own copy-back type cache memory, the bus interface cancels a memory access request held in the bus interface, In response to the cancel request, the bus interface cancels access to the bus interface held in the copy-back cache memory, and cancels access to the copy-back cache memory to the instruction execution unit. This is achieved by performing the retry after that.

【0007】[0007]

【作用】ある処理装置の命令部からの外部アクセスが書
き込みアクセスであり、これによってキャッシュメモリ
のラインが初めて更新されるときには、キャッシュメモ
リはシステムバスに排他的書き込み状態要求アクセスを
出す。そして、他の処理装置は、この排他的書き込み状
態要求アクセスを検出すると、各自のバスインタフェイ
ス部とキャッシュメモリにアクセスキャンセル要求を出
し、さらに命令部には、外部アクセスのリトライ機能要
求を出す。そして、キャッシュメモリは、命令部がリト
ライを開始するまでに、排他的書き込み状態要求の対象
となっているラインを無効化する。
The external access from the instruction section of a certain processing unit is a write access, and when a cache memory line is updated for the first time, the cache memory issues an exclusive write state request access to the system bus. Upon detecting this exclusive write state request access, the other processing device issues an access cancel request to its own bus interface unit and cache memory, and further issues an external access retry function request to the command unit. Then, the cache memory invalidates the line targeted for the exclusive write state request before the instruction unit starts retry.

【0008】[0008]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。図2は、本発明の一実施例に係る密結合型マル
チプロセッサシステムの全体構成図である。1(1―a
〜1―n)は、夫々処理装置(以下、BPUという。)
であり、システムバス4を介してメモリ2をアクセス
し、データを処理する。3は、周辺装置(IO)であ
り、ディスク装置等を含む。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is an overall configuration diagram of a tightly-coupled multiprocessor system according to one embodiment of the present invention. 1 (1-a
To 1-n) are processing devices (hereinafter, referred to as BPUs).
And accesses the memory 2 via the system bus 4 to process data. Reference numeral 3 denotes a peripheral device (IO), including a disk device and the like.

【0009】図1は、BPU1の内部構成図である。2
01は、例えば米国モトローラ社の32ビットMC68
040の様なマイクロプロセッサ(以下、MPUとい
う。)であるが、MC68040に限らず汎用マイクロ
プロセッサを使用することができる。202は、外部キ
ャシュメモリ(EC)である。203は、システムバス
インターフェイスユニットであり、キャッシュメモリか
らのアクセスを一旦保持して、システムバス権を獲得
後、システムバス4を介してメモリ2あるいは周辺装置
3をアクセスする。204は、他のBPUあるいは周辺
装置から出されるアクセスを監視するバスモニタ(一般
にスヌーパと呼ぶ:SNP)である。そして、システム
バス4上に同じアドレスが現われたときには、そのとき
のファンクション(例えばリード/ライト)に応じて、
無効化アドレス及び無効化情報をFIFO(First
in First out)バッファ209に格納す
る。
FIG. 1 is a diagram showing the internal configuration of the BPU 1. 2
01 is, for example, Motorola's 32-bit MC68
Although it is a microprocessor (hereinafter, referred to as MPU) like 040, a general-purpose microprocessor can be used without being limited to MC68040. Reference numeral 202 denotes an external cache memory (EC). Reference numeral 203 denotes a system bus interface unit which temporarily holds access from the cache memory and acquires the system bus right, and then accesses the memory 2 or the peripheral device 3 via the system bus 4. Reference numeral 204 denotes a bus monitor (generally called a snooper: SNP) that monitors accesses issued from other BPUs or peripheral devices. Then, when the same address appears on the system bus 4, according to the function (for example, read / write) at that time,
The invalidation address and the invalidation information are stored in a FIFO (First)
in First out) buffer 209.

【0010】205,206は、それぞれアドレス,デ
ータ信号である。207は、バスモニタ204からバス
インターフェイス203へアクセスキャンセル要求を伝
える信号線である。208は、バスインターフェイスユ
ニット203からMPU201及びキャッシュメモリ2
02へアクセスキャンセル要求を伝える信号線である。
211は、FIFO209から無効化要求情報をキャッ
シュメモリ202へ伝える信号線であり、212はキャ
ッシュメモリ202からバスインターフェイス203に
アクセス信号を伝える信号線である。
Reference numerals 205 and 206 denote address and data signals, respectively. Reference numeral 207 denotes a signal line for transmitting an access cancel request from the bus monitor 204 to the bus interface 203. Reference numeral 208 denotes a bus interface unit 203 from the MPU 201 and the cache memory 2
02 is a signal line for transmitting an access cancel request.
211 is a signal line for transmitting invalidation request information from the FIFO 209 to the cache memory 202, and 212 is a signal line for transmitting an access signal from the cache memory 202 to the bus interface 203.

【0011】図3は、キャッシュメモリ202の内部構
成図である。301は、データを保持するデータ部であ
り、302は、データのアドレス及び状態を保持するタ
グ部である。303は、BPU201内のアドレス線2
05上のアドレスと、タグ部302のアドレスを比較す
る比較器である。304は、キャッシュメモリ202全
体を制御する制御回路である。
FIG. 3 is a diagram showing the internal configuration of the cache memory 202. Reference numeral 301 denotes a data unit that holds data, and 302 denotes a tag unit that holds the address and status of data. 303 is an address line 2 in the BPU 201
This is a comparator that compares the address on the tag 05 with the address on the tag unit 302. Reference numeral 304 denotes a control circuit that controls the entire cache memory 202.

【0012】図6は、データ部301の詳細構成図であ
り、図7はタグ部302の詳細構成図である。データ部
は、図6に示す様に、16バイト(8ロングワード)で
1ラインを構成し、各バイト毎にパリティを持ってい
る。タグ部302は、図7に示す様に、ラインの物理ア
ドレスを格納する領域(17ビット目〜5ビット目)と
ラインの状態(STATUS)を格納する領域を持って
いる。このキャッシュメモリ202は、MPU201か
ら外部アクセスがあると、タグ部302を検索して、該
当するアクセスに必要なラインが存在する(ヒット)
か、あるいは存在しないか(ミスヒット)を判定し、ラ
インの状態にしたがってMPU201からのアクセス
を、図8に示す状態遷移に従って、処理する。
FIG. 6 is a detailed configuration diagram of the data unit 301, and FIG. 7 is a detailed configuration diagram of the tag unit 302. As shown in FIG. 6, the data section forms one line with 16 bytes (8 long words), and has a parity for each byte. As shown in FIG. 7, the tag unit 302 has an area for storing the physical address of the line (17th to 5th bits) and an area for storing the state of the line (STATUS). When there is an external access from the MPU 201, the cache memory 202 searches the tag unit 302 and finds a line necessary for the access (hit).
It is determined whether the MPU 201 does not exist (miss hit) or not (miss hit), and the access from the MPU 201 is processed according to the state transition shown in FIG.

【0013】即ち、リードアクセスでヒットした場合
(801―a,b)には、MPU201にデータ部30
1のデータを供給し、リードミスヒットに時(802)
には、バスインターフェイスユニット203に対して、
主メモリ2(図2)から必要なラインを読みだすように
要求する。このとき読み出したデータをキャッシュメモ
リ202内に格納するために、置換される既存のライン
が『更新あり状態』(主メモリ2と内容不一致状態:以
下、MOD状態という。)ならば、このラインを主メモ
リ2に書き戻し(コピーバック)してから、ライン読み
出しの要求を行なう。
That is, when a hit occurs in the read access (801-a, b), the data unit 30 is sent to the MPU 201.
1 data is supplied and a read miss occurs (802)
, The bus interface unit 203
A request is made to read a required line from the main memory 2 (FIG. 2). In order to store the data read at this time in the cache memory 202, if the existing line to be replaced is an "updated state" (a content mismatch state with the main memory 2; hereinafter, referred to as a MOD state), this line is replaced. After writing back (copy back) to the main memory 2, a line read request is made.

【0014】ライトアクセスでヒットした場合(80
3,804)には、当該ラインがすでに更新されている
(MOD)か否か(『更新なし状態』(主メモリと内容
一致状態:以下、UMD状態という。)によって動作が
異なる。MODの時(803)には、そのまま書き込ん
で処理を終了する。UMDの時(804)には、排他的
書き込み(他のプロセッサのキャッシュメモリに対する
無効化)状態要求をバスインターフェイスユニット20
3経由でシステムバス4に出力し、他のプロセッサのキ
ャッシュメモリが無効化された後、書き込んで処理を終
了する。
When a hit occurs in a write access (80
3, 804), the operation differs depending on whether the line has already been updated (MOD) or not ("no update state" (contents match state with main memory: hereinafter referred to as UMD state). At (803), the process is terminated without any change, and at the time of UMD (804), an exclusive write (invalidation of cache memory of another processor) state request is sent to the bus interface unit 20.
The data is output to the system bus 4 via 3 and the cache memory of the other processor is invalidated, and then the data is written and the processing is terminated.

【0015】また、ライトミスヒットの場合(805)
には、バスインターフェイスユニット203に対して無
効化要求付きのラインの読み出しを要求する。このと
き、読み出したデータをキャッシュメモリ202に格納
するために、置換される既存のラインがMOD状態なら
ば、このラインをコピーバックしてから無効化要求付き
のラインの読み出しを行なった後、ラインの更新を行な
う。
In the case of a write miss (805)
Request the bus interface unit 203 to read the line with the invalidation request. At this time, in order to store the read data in the cache memory 202, if the existing line to be replaced is in the MOD state, this line is copied back, and then the line with the invalidation request is read. Update of.

【0016】図4は、バスモニタ204の詳細構成図で
ある。402は、キャッシュメモリ202と同一内容の
タグ部である。403は、システムバスアドレス線4上
のアドレスとタグ部402のアドレスを比較する比較器
である。404は、バスモニタ204全体を制御する制
御回路である。バスモニタ204は、システムバス4上
のアクセスをモニタして、他のBPUからのアクセスに
対応するラインが存在する(ヒット)か否か(ミスヒッ
ト)を、タグを検索して判定する。そして、ラインの状
態にしたがって、他のBPUからのアクセスを、図9に
示す状態遷移に従って処理する。
FIG. 4 is a detailed block diagram of the bus monitor 204. Reference numeral 402 denotes a tag unit having the same contents as the cache memory 202. A comparator 403 compares the address on the system bus address line 4 with the address of the tag unit 402. A control circuit 404 controls the entire bus monitor 204. The bus monitor 204 monitors accesses on the system bus 4 and determines whether a line corresponding to an access from another BPU exists (hit) or not (miss hit) by searching for a tag. Then, according to the state of the line, access from another BPU is processed according to the state transition shown in FIG.

【0017】即ち、単純ラインリードアクセスがヒット
し、当該ラインがすでに更新されている(MOD状態)
場合(901)には、データ部のデータを主メモリ2に
書き戻して(コピーバック)、ステータスをUMD状態
に移すように、FIFO209を介して、キャッシュメ
モリ202に要求する。単純ラインリードアクセスがヒ
ットし、当該ラインが更新されていない(UMD状態)
場合(902)には、何も行なわない。他のBPUの無
効化要求アクセスでヒットしたときには、当該ラインが
すでに更新されている(MOD状態)か否か(UMD状
態)によって動作が異なる。ここで無効化要求アクセス
とは、単純な無効化要求アクセス、無効化要求付きライ
ンリード、ラインサイズ(16バイト以下)のリード/
ライトアクセスを含む。MODのとき(903)には、
データ部のデータを供給する(コピーバック)ように、
キャッシュメモリ202に要求すると共に、当該ライン
を無効化するように要求し、更に、バスインターフェイ
スユニット203に対してキャンセル信号207を出力
し、処理を終了する。但し、ラインライトの時には、コ
ピーバックしてもライン全体が書き替えらてしまいコピ
ーバックの意味がない為、無効化要求だけを出力する。
UMDのとき(905)には、キャッシュメモリ202
に当該ラインを無効化するように要求し、更に、バスイ
ンターフェイスユニット203に対してキャンセル信号
207を出力し、処理を終了する。
That is, the simple line read access hits and the line has already been updated (MOD state).
In the case (901), a request is made to the cache memory 202 via the FIFO 209 to write back the data in the data portion to the main memory 2 (copy back) and shift the status to the UMD state. Simple line read access hits and the line is not updated (UMD state)
In the case (902), nothing is performed. When a hit occurs due to an invalidation request access of another BPU, the operation differs depending on whether the line has already been updated (MOD state) or not (UMD state). Here, invalidation request access means simple invalidation request access, line read with invalidation request, and read / write of line size (16 bytes or less).
Includes write access. In the case of MOD (903),
To supply the data in the data section (copy back)
A request is made to the cache memory 202, a request is made to invalidate the line, and a cancel signal 207 is output to the bus interface unit 203, thus ending the processing. However, in the case of line write, even if copy-back is performed, the entire line is rewritten and there is no meaning in copy-back, so only an invalidation request is output.
In the case of UMD (905), the cache memory 202
Requesting that the line be invalidated, and further output a cancel signal 207 to the bus interface unit 203 to end the processing.

【0018】図5は、バスモニタ204がFIFO20
9に格納してキャッシュメモリに伝える要求のフォーマ
ット図である。ADR501は、ラインを示すためのア
ドレスであり、PTY502はアドレスのパリティであ
り、STATUS503は、次のキャッシュメモリのタ
グステータスであり、FUNC504は、要求の内容を
示すファンクションである。FUNCとして無効化要求
とコピーバック要求がある。
FIG. 5 shows that the bus monitor 204 is
FIG. 9 is a format diagram of a request stored in a cache memory and transmitted to a cache memory. ADR 501 is an address for indicating a line, PTY 502 is an address parity, STATUS 503 is a tag status of the next cache memory, and FUNC 504 is a function indicating the content of the request. FUNC includes an invalidation request and a copy back request.

【0019】図10は、上述したマルチプロセッサシス
テムにおけるキャッシュメモリ制御方法の動作説明図で
あり、排他的書き込み状態を実現する方法を具体的に説
明する。図10は、各BPU内及びシステムバスでの動
きを時系列的に示したものである。BPU#1,#2の
各キャッシュメモリ(EC)は、同じアドレスのUMD
状態のラインを持っていた状況下で、MPU#1とMP
U#2が同じアドレスのUMD状態のラインに対して、
ライトアクセスを行なった(1001,1002)とす
る(但しも、MPU#1の方がMPU#2よりわずかに
早くアクセスしたとする。)。
FIG. 10 is a diagram for explaining the operation of the cache memory control method in the above-described multiprocessor system, and specifically describes a method for realizing the exclusive write state. FIG. 10 shows the movement in each BPU and in the system bus in a time-series manner. Each cache memory (EC) of the BPUs # 1 and # 2 has a UMD of the same address.
MPU # 1 and MP
U # 2 is for the UMD state line of the same address,
It is assumed that write access was performed (1001, 1002) (assuming that MPU # 1 accessed slightly earlier than MPU # 2).

【0020】このとき、EC#1は、ライトアクセスで
ヒットし、当該ラインがUMDであるので排他的書き込
み(他のプロセッサのキャッシュメモリに対する無効
化)状態要求をバスインターフェイスユニット(BI
U)#1経由でシステムバスに出力し(1003)、他
のプロセッサ(BPU#2など)のキャッシュメモリ
(EC)が無効化されのを待つ(1005)。
At this time, the EC # 1 hits by a write access, and since the line is a UMD, an exclusive write (invalidation of the cache memory of another processor) state request is sent to the bus interface unit (BI).
U) Output to the system bus via # 1 (1003), and wait until the cache memory (EC) of another processor (such as BPU # 2) is invalidated (1005).

【0021】一方、BPU2のキャッシュメモリ(E
C)#2も同様に、ライトアクセスでヒットし、当該ラ
インがUMDであるので、排他的書き込み(他のプロセ
ッサのキャッシュメモリに対する無効化)状態要求をバ
スインターフェイスユニット(BIU)#2経由でシス
テムバスに出力し(1004)、他のプロセッサのキャ
ッシュメモリが無効化されのを待つ動作を行なおうとす
るが、システムバスがBPU#1によって既に使用され
ているので、バスインターフェイスユニット(BIU)
#2のところでバス権待ち状態になる(1006)。
On the other hand, the cache memory (E
C) Similarly, # 2 is hit by a write access, and the line is UMD. Therefore, an exclusive write (invalidation of the cache memory of another processor) state request is sent to the system via the bus interface unit (BIU) # 2. Output to the bus (1004) and attempt to wait for the cache memory of another processor to be invalidated. However, since the system bus is already used by BPU # 1, the bus interface unit (BIU)
At # 2, a bus right waiting state is set (1006).

【0022】この間に、BPU#2のバスモニタ(SN
P)#2は、BPU#1からの無効化要求アクセスを検
出して、自バスインターフェイスユニット(BIU)#
2に対してキャンセルを発行する(1007:図1のキ
ャンセル207)。このバスモニタ(SNP)#2から
のキャンセル信号によって、バスインターフェイスユニ
ット#2は、バス権待ちをキャンセルすると共に、自キ
ャッシュメモリ#2と自MPU#2に対してキャンセル
を発行する(1008:図1のキャンセル208)。こ
のキャンセル信号を受けたキャッシュメモリ#2は、前
記の1004で要求していた「無効化要求」をキャンセ
ルし、MPU#2は、外部アクセスを一旦取り止めて、
ライトアクセスのリトライ準備にはいる(1011)。
MPUへのキャンセルは、MC68040プロセッサの
場合、転送終了信号とバスエラー信号を同時に返すこと
によって容易に実現できる。また、バスモニタ#2は、
FIFO209経由で、当該ラインの無効化を要求する
データをキャッシュメモリ#2へ発行する(100
9)。この要求により、キャッシュメモリ#2は、これ
に従って当該ラインのステータスを無効状態にする。
During this time, the bus monitor (SN) of BPU # 2
P) # 2 detects the invalidation request access from BPU # 1, and the own bus interface unit (BIU) #
Then, a cancel is issued to No. 2 (1007: Cancel 207 in FIG. 1). In response to the cancel signal from the bus monitor (SNP) # 2, the bus interface unit # 2 cancels the waiting for the bus right and issues a cancel to its own cache memory # 2 and its own MPU # 2 (1008: FIG. 1 cancel 208). The cache memory # 2 that has received the cancel signal cancels the “invalidation request” requested in the above 1004, and the MPU # 2 temporarily stops the external access,
Preparation for retry of write access is started (1011).
In the case of the MC68040 processor, the cancellation to the MPU can be easily realized by simultaneously returning the transfer end signal and the bus error signal. Also, bus monitor # 2 is
Via the FIFO 209, data requesting invalidation of the line is issued to the cache memory # 2 (100
9). In response to this request, the cache memory # 2 changes the status of the line to an invalid state accordingly.

【0023】一方、BPU#1側では、バスモニタ#2
がBPU#1からの無効化アクセスを検出した事を示す
信号を受ける事によって排他的書き込み状態が成立した
と認識してから後、自キャッシュメモリ#1のデータを
更新し、処理を終了する(1010)。
On the other hand, on the BPU # 1 side, the bus monitor # 2
Receives the signal indicating that the invalidation access has been detected from the BPU # 1, recognizes that the exclusive write state has been established, updates the data in its own cache memory # 1, and ends the processing ( 1010).

【0024】BPU#2では、MPU#2が前記101
1で準備したリトライを実行する(1012)。この
時、当該ラインは無効状態になっているので、バスイン
ターフェイスユニット#2に対して無効化要求付きのラ
インを読み出しを要求して(1013)、BPU#1か
らコピーバックされた最新データをキャッシュメモリ#
2に読み込んだ後(1014)、当該ラインを更新す
る。
In BPU # 2, MPU # 2
The retry prepared in step 1 is executed (1012). At this time, since the line is in an invalid state, a request is made to the bus interface unit # 2 to read the line with the invalidation request (1013), and the latest data copied back from the BPU # 1 is cached. memory#
After that, the line is updated (1014).

【0025】本実施例では、MC68040プロセッサ
と、外部回路として構成したキャッシュメモリ/バスイ
ンターフェイスユニット/バスモニタを用いたが、MC
68040の替わりに外部アクセスのリトライ機能を有
する他の種類のプロセッサを用いることは可能であり、
更にキャッシュメモリ/バスインターフェイスユニット
/バスモニタを1つのチップに集積したプロセッサでも
適用可能であることは明らかである。
In this embodiment, an MC68040 processor and a cache memory / bus interface unit / bus monitor configured as an external circuit are used.
It is possible to use another type of processor having an external access retry function instead of the 68040,
Further, it is apparent that a processor in which the cache memory / bus interface unit / bus monitor is integrated on one chip is also applicable.

【0026】[0026]

【発明の効果】本発明によれば、同時刻に複数の処理装
置が同じラインの更新を行なおうとしても、システムバ
ス権を先に取った処理装置が排他的にラインを更新でき
るので、データが不整合になる心配がない。また、この
ような排他的書き込み状態をマイクロプロセッサの外部
アクセスリトライ機能を用いることにより、簡便なハー
ドウエアで実現することができるという効果がある。
According to the present invention, even if a plurality of processing units try to update the same line at the same time, the processing unit that has acquired the system bus right can exclusively update the line. There is no need to worry about inconsistent data. Further, by using the external access retry function of the microprocessor, such an exclusive write state can be realized with simple hardware.

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

【図1】本発明の一実施例に係るマルチプロセッサシス
テムを構成する処理装置の構成図である。
FIG. 1 is a configuration diagram of a processing device configuring a multiprocessor system according to an embodiment of the present invention.

【図2】マルチプロセッサシステムの全体構成図であ
る。
FIG. 2 is an overall configuration diagram of a multiprocessor system.

【図3】図1に示すキャッシュメモリの構成図である。FIG. 3 is a configuration diagram of a cache memory shown in FIG. 1;

【図4】図1に示すバスモニタの構成図である。FIG. 4 is a configuration diagram of a bus monitor shown in FIG. 1;

【図5】キャッシュメモリへの要求フォーマットであ
る。
FIG. 5 shows a format required for a cache memory.

【図6】キャッシュメモリのデータ部の構成図である。FIG. 6 is a configuration diagram of a data section of a cache memory.

【図7】キャッシュメモリのタグ部の構成図である。FIG. 7 is a configuration diagram of a tag unit of the cache memory.

【図8】キャッシュメモリのタグ状態遷移図である。FIG. 8 is a transition diagram of a tag state of the cache memory.

【図9】バスモニタのタグ状態遷移図である。FIG. 9 is a diagram illustrating a tag state transition diagram of the bus monitor.

【図10】排他的書き込み状態要求時の動作説明図であ
る。
FIG. 10 is an explanatory diagram of an operation when an exclusive write state request is made.

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

1…BPU、2…メモリ、3…周辺装置、4…システム
バス、201…プロセッサ、202…キャッシュメモ
リ、203…バスインタフェイスユニット、204…ス
ヌーパ(バスモニタ)、209…FIFO、207,2
08…アクセスキャンセル信号。
DESCRIPTION OF SYMBOLS 1 ... BPU, 2 ... memory, 3 ... peripheral devices, 4 ... system bus, 201 ... processor, 202 ... cache memory, 203 ... bus interface unit, 204 ... snooper (bus monitor), 209 ... FIFO, 207, 2
08: Access cancel signal.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 丹治 雅行 茨城県日立市大みか町五丁目2番1号 株式会社 日立製作所 大みか工場内 (56)参考文献 特開 平2−287740(JP,A) 特開 平2−184944(JP,A) 特開 平4−95152(JP,A) 特開 平4−251350(JP,A) 特開 平3−25541(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/08 ──────────────────────────────────────────────────続 き Continuation of front page (72) Inventor Masayuki Tanji 5-2-1 Omika-cho, Hitachi City, Ibaraki Prefecture Hitachi, Ltd. Omika Plant (56) References JP-A-2-287740 (JP, A) JP-A-2-184944 (JP, A) JP-A-4-95152 (JP, A) JP-A-4-251350 (JP, A) JP-A-3-25541 (JP, A) (58) Int.Cl. 7 , DB name) G06F 12/08

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 命令及びデータを格納するメモリと、該
メモリにシステムバスを介して接続され該メモリ内の命
令に従ってデータを処理する複数の処理装置を備え、各
処理装置が、命令実行部と、該命令実行部に接続され前
記メモリの内容の一部を格納するコピーバック型キャッ
シュメモリと、該コピーバック型キャッシュメモリに接
続され前記メモリとのインターフェイスを取るバスイン
ターフェイスと、前記コピーバック型キャッシュメモリ
に接続されシステムバスを介して行なわれるメモリアク
セスを監視するバス監視装置とを備える装置のキャッシ
ュメモリ制御方法において、前記バス監視装置、前記
コピーバック型キャッシュメモリと同一内容のタグ情報
を持ち、メモリアクセスを監視して自処理装置以外の処
理装置が自コピーバック型キャッシュメモリの保持する
ラインを更新するアクセスを行なった場合に、これを検
出し、バスインターフェイスに対してバスインターフェ
イスに保持されているメモリアクセス要求をキャンセル
させ、バスインターフェイスがこのキャンセル要求に呼
応して前記コピーバック型キャッシュメモリ内に保持し
ているバスインターフェイスへのアクセスをキャンセル
させると共に、前記命令実行部に対しても前記コピーバ
ック型キャッシュメモリへのアクセスをキャンセルさせ
ることを特徴とするキャッシュメモリ制御方法。
1. A memory for storing instructions and data, and a plurality of processing units connected to the memory via a system bus and processing data in accordance with the instructions in the memory, wherein each processing unit includes an instruction execution unit A copy-back cache memory connected to the instruction execution unit and storing a part of the contents of the memory; a bus interface connected to the copy-back cache memory and interfacing with the memory; cache of a device and a bus monitoring device for monitoring memory accesses are performed via a system bus connected to the memory
In the memory control method , the bus monitoring device has tag information having the same content as that of the copy-back type cache memory , monitors the memory access, and allows a processing device other than its own processing device to hold a line held by its own copy-back type cache memory. When an access for updating is performed, the access is detected, and the bus interface cancels the memory access request held in the bus interface. The bus interface responds to the cancel request, and the bus interface responds to the cancel request. A cache memory control method for canceling access to the bus interface held in the cache memory and canceling access to the copy-back type cache memory also to the instruction execution unit.
【請求項2】 請求項1において、バスインターフェイ
のキャンセルはバスインターフェイスに保持されてい
るメモリアクセス要求を廃棄することでキャンセル
、コピーバック型キャッシュメモリのキャンセルはア
クセスを廃棄することでキャンセルさせ、命令実行部
キャンセルはアクセスを再試行することでキャンセル
ることを特徴とするキャッシュメモリ制御方法。
2. The bus interface according to claim 1, wherein the cancel of the bus interface is canceled by discarding a memory access request held in the bus interface.
So, cancel the copy-back type cache memory is canceled by discarding access, the instruction execution unit
Cancellation is canceled by retrying access
Cache memory control method comprising Rukoto allowed.
【請求項3】 命令及びデータを格納するメモリと、該
メモリにシステムバスを介して接続され該メモリ内の命
令に従ってデータを処理する複数の処理装置を備え、各
処理装置が、命令実行部と、該命令実行部に接続され前
記メモリの内容の一部を格納するコピーバック型キャッ
シュメモリと、該コピーバック型キャッシュメモリに接
続され前記メモリとのインターフェイスを取るバスイン
ターフェイスと、前記コピーバック型キャッシュメモリ
に接続されシステムバスを介して行なわれるメモリアク
セスを監視するバス監視装置とを備えるキャッシュメモ
リ制御装置において、前記バス監視装置は、前記コピー
バック型キャッシュメモリと同一内容のタグ情報格納領
域と、前記システムバスを監視して自処理装置以外の処
理装置が自コピーバック型キャッシュメモリの保持する
ラインを更新するアクセスを行なうか否か検出する検出
手段と、自バスインターフェイスに対して自バスインタ
ーフェイスが保持しているメモリアクセス要求をキャン
セルさせるキャンセル要求手段とを備え、前記バスイン
ターフェイスは、前記キャンセル要求に呼応して前記コ
ピーバック型キャッシュメモリ内に保持しているバスイ
ンターフェイスへのアクセスをキャンセルさせると共に
前記命令実行部に対しても前記コピーバック型キャッシ
ュメモリへのアクセスをキャンセルさせる手段を備えた
ことを特徴とするキャッシュメモリ制御装置。
3. A memory for storing instructions and data, and a plurality of processing units connected to the memory via a system bus for processing data in accordance with the instructions in the memory, wherein each processing unit includes an instruction execution unit and A copy-back cache memory connected to the instruction execution unit and storing a part of the contents of the memory; a bus interface connected to the copy-back cache memory and interfacing with the memory; A cache memory control device including a bus monitoring device connected to a memory and monitoring a memory access performed via a system bus, wherein the bus monitoring device includes a tag information storage area having the same content as the copy-back cache memory, By monitoring the system bus, a processing device other than the own processing device Means for detecting whether or not to make an access to update a line held by a backup type cache memory, and a cancel request for canceling a memory access request held by the own bus interface with respect to the own bus interface and means, the bus interface, said copy-back against the instruction execution unit causes cancel the access to the bus interface that the in response to a cancellation request held in the copy-back type cache memory A cache memory control device comprising means for canceling access to a cache memory.
【請求項4】 請求項3において、上記バスインターフ
ェイスはバスインターフェイスに保持されているメモリ
アクセス要求を廃棄することでキャンセルする手段を備
え、コピーバック型キャッシュメモリはアクセスを廃棄
するこでキャンセルする手段を備え、命令実行部はアク
セスを再試行することでキャンセルする手段を備え
とを特徴とするキャッシュメモリ制御装置。
4. The bus interface according to claim 3, wherein said bus interface includes means for canceling by discarding a memory access request held in said bus interface, and said copy-back type cache memory cancels by discarding access. the provided, the instruction execution unit cache memory control device comprising a call <br/> with means for canceling by retrying the access.
【請求項5】 請求項3において、上記処理装置はシン
グルチップで構成されたことを特徴とするキャッシュメ
モリ制御装置。
5. The cache memory control device according to claim 3, wherein said processing device is constituted by a single chip.
【請求項6】 命令実行部と、該命令実行部に接続され
主メモリの内容の一部をシステムを介して読み出し格納
するコピーバック型キャッシュメモリと、該コピーバッ
ク型キャッシュメモリに接続され前記主メモリとのイン
ターフェイスを取るバスインターフェイスと、前記コピ
ーバック型キャッシュメモリに接続されシステムバスを
介して行なわれるメモリアクセスを監視するバス監視装
置とを備えてなりアクセスのリトライ機能を備える処理
装置複数を有するマルチプロセッサシステムのキャッシ
ュメモリ制御方法において、前記バス監視装置が、メモ
リアクセスを監視して自処理装置以外の処理装置が自コ
ピーバック型キャッシュメモリの保持するラインを更新
するアクセスを行なったことを検出したとき、バスイン
ターフェイスに対してバスインターフェイスに保持され
ているメモリアクセス要求をキャンセルさせ、バスイン
ターフェイスがこのキャンセル要求に呼応して前記コピ
ーバック型キャッシュメモリ内に保持しているバスイン
ターフェイスへのアクセスをキャンセルさせると共に
前記命令実行部に対して前記コピーバック型キャッシュ
メモリへのアクセスをキャンセルさせ、その後前記命令
実行部が前記キャンセルに呼応した前記ライトアクセス
リトライを行うことを特徴とするキャッシュメモリ制
御方法。
6. An instruction execution unit, a copy-back type cache memory connected to the instruction execution unit for reading and storing a part of the contents of a main memory via a system, and a copy-back type cache memory connected to the copy-back type cache memory. A plurality of processing units including a bus interface for interfacing with a memory, and a bus monitoring device connected to the copy-back type cache memory and monitoring a memory access performed via a system bus and having an access retry function; Multiprocessor system cache
In the memory control method , the bus monitoring device may store
The memory held in the bus interface with respect to the bus interface when monitoring the re-access and detecting that a processing device other than the own processing device has made an access for updating the line held in the own copy-back type cache memory. to cancel the access request, the bus interface cancel access to the bus interface holding in response to the cancellation request to the copy-back type cache memory Rutotomoni,
The cancel access to the copy-back type cache memory to said instruction execution unit, then the command
The write access in response to the cancellation by the execution unit
A cache memory control method characterized by retrying the following.
【請求項7】 命令実行部と、該命令実行部に接続され
主メモリの内容の一部をシステムバスを介して読み出し
格納するコピーバック型キャッシュメモリと、該コピー
バック型キャッシュメモリに接続され前記主メモリとの
インターフェイスを取るバスインターフェイスと、前記
コピーバック型キャッシュメモリに接続されシステムバ
スを介して行なわれるメモリアクセスを監視するバス監
視装置とを備えてなりアクセスのリトライ機能を備え
処理装置複数を有するマルチプロセッサシステムにおい
て、前記バス監視装置、自処理装置以外の処理装置が
自コピーバック型キャッシュメモリの保持するラインを
更新するアクセスを行なったことを検出する手段と、バ
スインターフェイスに対してバスインターフェイスに保
持されているメモリアクセス要求をキャンセルさせる
ャンセル要求手段とを備え、前記バスインターフェイス
は、前記キャンセル要求に呼応して前記コピーバック型
キャッシュメモリ内に保持しているバスインターフェイ
スへのアクセスをキャンセルさせる手段と、前記命令実
行部に対して前記コピーバック型キャッシュメモリへの
アクセスをキャンセルさせる手段とを備え、前記命令実
行部は、前記キャンセルに呼応した前記ライトアクセス
リトライを行わせる手段を備えことを特徴とするマ
ルチプロセッサシステム。
7. An instruction execution unit, a copy-back type cache memory connected to the instruction execution unit, for reading and storing a part of the contents of a main memory via a system bus, and connected to the copy-back type cache memory. a bus interface for interfacing with the main memory, Ru with a retry function of the access becomes a bus monitoring device for monitoring memory accesses are performed via a system bus connected to said copy-back cache memory <br / In a multiprocessor system having a plurality of processing devices, the bus monitoring device includes means for detecting that a processing device other than its own processing device has made an access to update a line held by its own copy-back type cache memory; For the interface, the message held in the bus interface Key to cancel the re-access request
A Yanseru requesting unit, said bus interface
Includes means for canceling the access to the bus interface in response to the cancel request held in the copy-back type cache memory, canceling the access to the copy-back type cache memory to the instruction execution unit and means for, the instruction execution
The line section is for the write access in response to the cancel.
Multiprocessor system characterized by comprising means for causing a retry.
JP13514592A 1992-05-27 1992-05-27 Multiprocessor system and cache memory control method and apparatus therefor Expired - Fee Related JP3145479B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13514592A JP3145479B2 (en) 1992-05-27 1992-05-27 Multiprocessor system and cache memory control method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13514592A JP3145479B2 (en) 1992-05-27 1992-05-27 Multiprocessor system and cache memory control method and apparatus therefor

Publications (2)

Publication Number Publication Date
JPH05324470A JPH05324470A (en) 1993-12-07
JP3145479B2 true JP3145479B2 (en) 2001-03-12

Family

ID=15144865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13514592A Expired - Fee Related JP3145479B2 (en) 1992-05-27 1992-05-27 Multiprocessor system and cache memory control method and apparatus therefor

Country Status (1)

Country Link
JP (1) JP3145479B2 (en)

Also Published As

Publication number Publication date
JPH05324470A (en) 1993-12-07

Similar Documents

Publication Publication Date Title
US5652859A (en) Method and apparatus for handling snoops in multiprocessor caches having internal buffer queues
US5557769A (en) Mechanism and protocol for maintaining cache coherency within an integrated processor
US5682516A (en) Computer system that maintains system wide cache coherency during deferred communication transactions
JP3067112B2 (en) How to reload lazy push into copy back data cache
JP3317329B2 (en) Method and system for maintaining cache coherency using sequential coded snoop response
KR0154533B1 (en) Data processor
US6272602B1 (en) Multiprocessing system employing pending tags to maintain cache coherence
JPH07253928A (en) Duplex cache snoop mechanism
JPH1031625A (en) Write back buffer for improved copy back performance in multiprocessor system
US5263144A (en) Method and apparatus for sharing data between processors in a computer system
US5920891A (en) Architecture and method for controlling a cache memory
US7464227B2 (en) Method and apparatus for supporting opportunistic sharing in coherent multiprocessors
US5701422A (en) Method for ensuring cycle ordering requirements within a hierarchical bus system including split-transaction buses
WO1997004392A1 (en) Shared cache memory device
JP3202943B2 (en) Processing apparatus and improved apparatus and method for snooping a lookaside cache
JP4490585B2 (en) Processor or core logic unit with internal registers for peripheral status
US8166226B2 (en) Apparatus and related method for maintaining read caching data of south bridge with north bridge
KR100380674B1 (en) Method and system for maintaining cache coherency for write-through store operations in a multiprocessor system
JP3145479B2 (en) Multiprocessor system and cache memory control method and apparatus therefor
JP3083786B2 (en) Memory update history storage device and memory update history storage method
JP3187446B2 (en) Cache memory controller
KR940005769B1 (en) Multi-process system with cache memory
JPH03230238A (en) Cache memory control system
JPH0744459A (en) Cache control method and cache controller
JP3887036B2 (en) Method of invalidating data blocks stored in an external cache of a computer system and its processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees