JPS63311548A - Cache memory controlling system - Google Patents

Cache memory controlling system

Info

Publication number
JPS63311548A
JPS63311548A JP62148218A JP14821887A JPS63311548A JP S63311548 A JPS63311548 A JP S63311548A JP 62148218 A JP62148218 A JP 62148218A JP 14821887 A JP14821887 A JP 14821887A JP S63311548 A JPS63311548 A JP S63311548A
Authority
JP
Japan
Prior art keywords
write data
cache memory
data
cache
register
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.)
Granted
Application number
JP62148218A
Other languages
Japanese (ja)
Other versions
JPH0677240B2 (en
Inventor
Masayuki Okada
誠之 岡田
Tsuyoshi Mori
森 強
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 JP62148218A priority Critical patent/JPH0677240B2/en
Publication of JPS63311548A publication Critical patent/JPS63311548A/en
Publication of JPH0677240B2 publication Critical patent/JPH0677240B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To sharply improve the performance of a data processing system, by setting write data in a write data buffer in a cache memory device even when a cache error occurs. CONSTITUTION:When a cache error occurs in the course of storing access, the content of a write data buffer register 21 is written in a cache memory 20 after a move-in registering operation is made or the combined result of write data and move-in data in the unit of byte in accordance with the content of a byte mark is written in the cache memory 20 while the registering operation is carried on. Therefore, even if a cache error occurs, an instruction processor 1 can make so called throwing-off control which causes storing access to be completed by setting the write data in the write data buffer register 21 in a cache memory device. Thus the performance of this system can be improved sharply.

Description

【発明の詳細な説明】 〔目 次〕 (既要 産業上の利用分野 従来の技術と発明が解決しようとする問題点問題点を解
決するための手段 作用 実施例 発明の効果 〔概要〕 スワップ方式で制御されるキャッシュメモリ装置におい
て、ライトデータを保持するバッファレジスタと、該ラ
イトデータバッファレジスタの内容と主記憶装置(MS
)からのムーブインデータとを選択する回路とを設ける
か、或いは、該ライトデータバッファレジスタの他に、
バイトマークレジスタと、上記ライトデータバッファレ
ジスタと、主記憶装置(MS)からのムーブインデータ
を蓄積したレジスタとを、該バイトマークレジスタの内
容で、バイト単位に選択する回路とを設けて、キャッシ
ュミス時に、ムーブイン登録動作の後に、該ライトデー
タバッファレジスタの内容をキャッシュメモリにライト
するか、該登録動作中にライトデータと、ムーブインデ
ータとを、バイトマークの内容に基づいて、バイト単位
で合成した結果をキャッシュメモリにライトするように
したものである。
[Detailed Description of the Invention] [Table of Contents] (Existing industrial fields of application, Prior art and problems to be solved by the invention, Means for solving the problems, Actions, Examples, Effects of the invention [Summary]) Swap method In a cache memory device controlled by
), or in addition to the write data buffer register,
A byte mark register, a circuit for selecting the write data buffer register and a register storing move-in data from the main memory (MS) in units of bytes based on the contents of the byte mark register are provided. At the time of a miss, after the move-in registration operation, the contents of the write data buffer register are written to the cache memory, or during the registration operation, the write data and move-in data are written in byte units based on the contents of the byte mark. The combined result is written to the cache memory.

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

本発明は、スワップ方式で制御されるキャッシュメモリ
装置において、キャッシュミス時のライトデータをキャ
ッシュメモリにライトするときの制御方式に関する。
The present invention relates to a control method for writing write data to a cache memory at the time of a cache miss in a cache memory device controlled by a swap method.

従来からデータ処理システムの処理能力を向上させる手
段と1つとして、キャッシュメモリ方式%式% これは命令処理装置が実行するプログラムのアドレス分
布の局所性に基づいて、該局所性が見られるアドレスの
範囲を1ブロツクとして、主記憶装置(MS)から該ブ
ロック単位のコピーを、主記憶装置(MS)に比較して
記憶容量は小さいが高速のキャッシュメモリに保持して
おき、命令処理装置からのメモリ要求に対して、該キャ
ッシュメモリに該当データが存在する場合には、該キャ
ッシュメモリが応答することで、主記憶装置(MS)に
対する見掛は上のアクセスタイムを短縮させることで、
当該データ処理システムの処理能力を向上させるもので
ある。
Conventionally, one of the means to improve the processing performance of data processing systems is the cache memory method.This method is based on the locality of the address distribution of the program executed by the instruction processing unit. A block-by-block copy from the main memory (MS) is stored in a cache memory that has a smaller storage capacity than the main memory (MS) but is faster than the main memory (MS). In response to a memory request, if the corresponding data exists in the cache memory, the cache memory responds to the memory request, thereby shortening the apparent access time to the main memory (MS).
This improves the processing capacity of the data processing system.

然して、該キャッシュメモリに、アクセスするデータを
含むブロックが存在しないとき、主記憶装置(MS)か
ら当コ亥フ゛ロックをキャッシュメモリにムーブインす
る必要があり、その間命令処理装置は処理待ちの状態と
なる為、該キャッシュミスに起因する処理能力の低下が
無視できないのが現状であり、該キャッシュミス時の処
理能力の低下を少なくするキャッシュメモリ制御方式が
必要とされる。
However, when the block containing the data to be accessed does not exist in the cache memory, it is necessary to move the block from the main memory (MS) into the cache memory, and during this time the instruction processing unit is in a waiting state for processing. Therefore, the current situation is that the reduction in processing performance caused by the cache miss cannot be ignored, and a cache memory control method is required that reduces the reduction in processing performance at the time of the cache miss.

〔従来の技術と発明が解決しようとする問題点〕第5図
は、従来のキャッシュメモリ制御方式を説明する図であ
る。
[Prior art and problems to be solved by the invention] FIG. 5 is a diagram illustrating a conventional cache memory control system.

本図においては、説明の便宜上、ムーブインを行う為の
データ線を主体にして表しである。
In this figure, for convenience of explanation, data lines for performing move-in are mainly shown.

キャッシュメモリ制御方式の1つとして、スワップ方式
がある。
One of the cache memory control methods is a swap method.

該スワップ方式においては、 (1)  リード時において、命令処理装置1の要求す
るデータブロックが、該キャッシュメモリ 2゜にあれ
ば、即キャッシュメモリ2oがらリードするが、キャッ
シュミスを起こした時には、主記憶装置(MS) 3か
ら該当ブロックを空きブロックにムーブインした後、該
当ブロックをリードする。
In this swap method, (1) At the time of reading, if the data block requested by the instruction processing device 1 is in the cache memory 2o, it is read immediately from the cache memory 2o, but if a cache miss occurs, the main After moving the corresponding block from storage device (MS) 3 into an empty block, the corresponding block is read.

(2)  ライト時においては、命令処理装置1の要求
するデータブロックが、該キャッシュメモリ20にあれ
ば、ライト可能かどうか(例えば、マルチプロセッサシ
ステムでは、他のプロセッサが富亥当ブロックを書き替
えいる場合があり、この場合にはライト不可能となる)
みて、可能であれば、そのブロックにライトするが、不
可能であれば、ライト権を獲得する為に、他のプロセッ
サのキャッシュメモリに該当ブロックに対する無効化を
通知した後にライトする。
(2) At the time of writing, if the data block requested by the instruction processing device 1 is in the cache memory 20, is it possible to write it (for example, in a multiprocessor system, another processor rewrites the block in question)? (In this case, it becomes impossible to write)
If it is possible, write to that block, but if it is not possible, write after notifying the cache memory of another processor that the block is invalidated in order to acquire the write right.

然し、キャッシュミスを起こした時には、主記憶装置(
MS) 3から該当ブロックを空きブロックにムーブイ
ンしてそこにライトする。
However, when a cache miss occurs, the main memory (
MS) From step 3, move the corresponding block into an empty block and write it there.

上記リード、ライト時のキャッシュミス時のムーブイン
動作において、キャッシュメモリに空きブロックが存在
しない時には、公知のLRII機構によって追い出しブ
ロックを検索し、該当ブロックの内容が主記憶装置(M
S) 3の該当ブロックと不一致であれば、該ブロック
を主記憶装置(MS) 3にムーブアウトし、そこにム
ーブインするが、一致しているときには上書きの形でム
ーブインする。
In the move-in operation at the time of a cache miss during read or write, if there is no free block in the cache memory, the block to be evicted is searched for using the well-known LRII mechanism, and the contents of the block are transferred to the main memory (M
S) If the block does not match the corresponding block in 3, the block is moved out to the main storage device (MS) 3 and moved in there; however, if it matches, the block is moved in as an overwrite.

このようなスワップ方式のキャッシュメモリ20に対し
て命令処理装置1がストアアクセスを実行しようとして
、キャッシュミスが発生した場合、該命令処理装置1は
、ストアデータを保持した侭、上記ムーブイン動作によ
って、主記憶装置(MS) 3からのムーブインデータ
がキャッシュメモリ20上に登録されるのを待ち、該登
録動作が完了してから、=亥キャッシュメモリ 20に
対してストア(具体的には、バイトマークの内容に従っ
て、該バイトマークが1゛のバイトに対してのみストア
)していた。
When the instruction processing device 1 attempts to perform a store access to such a swap type cache memory 20 and a cache miss occurs, the instruction processing device 1 retains the store data and performs the move-in operation as described above. Wait for the move-in data from the main storage device (MS) 3 to be registered on the cache memory 20, and after the registration operation is completed, store it to the cache memory 20 (specifically, byte According to the contents of the mark, the byte mark was stored only for the 1 byte.

一般に、データ処理におけるストアアクセスは、例えば
、数命令に1回程度の頻度で発生ずる為、該ストアアク
セス時のキャッシュミスによる性能の低下は過大なもの
があると云う問題があった。
In general, store accesses in data processing occur at a frequency of, for example, once every few instructions, so there is a problem in that performance degradation due to cache misses during store accesses may be excessive.

本発明は上記従来の欠点に鑑み、スワップ方式で制御さ
れるキャッシュメモリを備えたデータ処理システムにお
いて、ストアアクセス時のキャッシュミスによる性能の
低下を軽減する方法を提供することを目的とするもので
ある。
SUMMARY OF THE INVENTION In view of the above-mentioned conventional drawbacks, it is an object of the present invention to provide a method for reducing performance degradation due to cache misses during store access in a data processing system equipped with a cache memory controlled by a swap method. be.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は本発明のキャッシュメモリ制御方式の構成例を
示した図である。
FIG. 1 is a diagram showing an example of the configuration of a cache memory control method according to the present invention.

本発明においては、 (1)スワップ方式で制御されるキャッシュメモリ装置
において、 ライトデータを保持するバッファレジスタ21と。
In the present invention, (1) In a cache memory device controlled by a swap method, a buffer register 21 that holds write data;

該ライトデータバッファレジスタ21と、主記憶装置(
MS) 3からのデータとを選択するライトデータ選択
回路22と、 該ライトデータ選択回路22の出力をキャッシュメモリ
20にライトするデータバス22aとを備え、 上記ライトデータを上記ライトデータバッファレジスタ
21に保持し、キャッシュミスに応答したキャッシュ登
録動作の後に、上記ライトデータバッファレジスタ21
の内容をキャッシュメモリ20にライトするように構成
する。
The write data buffer register 21 and the main memory (
MS) 3, and a data bus 22a that writes the output of the write data selection circuit 22 to the cache memory 20, and sends the write data to the write data buffer register 21. After the cache registration operation in response to a cache miss, the write data buffer register 21
The configuration is such that the contents of are written to the cache memory 20.

(2)上記キャッシュミス時に、ライトデータバッファ
レジスタ21の内容をキャッシュメモリ20にライトす
るのに、 該ライトデータを保持するライトデータバッファレジス
タ21の他に、 主記憶装置(MS) 3からの転送データを保持するム
ーブインデータレジスタ24と、 該ライトデータの有効/無効をバイト単位に示すバイト
マークを保持するバイトマークレジスタ23 と、 該バイトマークレジスタ23の内容に呼応して、上記ラ
イトデータバッファレジスタ21 と、ムーブインデー
タレジスタ24の内容を、バイト単位に選択する回路2
2゛と、 該バイト選択回路22゛の出力をキャッシュメモリ 2
0にライトするデータバス22aとを備え、ライトデー
タを上記ライトデータバッファレジスタ21に、又、バ
イトマークをバイトマークレジスタ23に保持し、 キャッシュミスに応答したキャッシュ登録動作中に、上
記レジスタ21と、レジスタ24の内容を上記選択回路
22゛でバイト単位に選択1合成してキャッシュメモリ
 20にライトするように構成する。
(2) In order to write the contents of the write data buffer register 21 to the cache memory 20 at the time of the above cache miss, in addition to the write data buffer register 21 that holds the write data, transfer from the main storage device (MS) 3 is required. a move-in data register 24 that holds data; a byte mark register 23 that holds a byte mark indicating the validity/invalidity of the write data in units of bytes; A circuit 2 that selects the contents of the register 21 and the move-in data register 24 in byte units.
2 and the output of the byte selection circuit 22 is stored in the cache memory 2.
0, the write data is held in the write data buffer register 21, the byte mark is held in the byte mark register 23, and during the cache registration operation in response to a cache miss, the register 21 and , the contents of the register 24 are selected and synthesized in byte units by the selection circuit 22' and written into the cache memory 20.

〔作用〕[Effect]

即ち、本発明によれば、スワップ方式で制御されるキャ
ッシュメモリ装置において、ライトデータを保持するバ
ッファレジスタと、該ライトデータバッファレジスタの
内容と主記憶装f (MS)からのムーブインデータと
を選択する回路とを設けるか、或いは、該ライトデータ
バッファレジスタの他に、バイトマークレジスタと、上
記ライトデータバッファレジスタと、主記憶装置(MS
)からのムーブインデータを蓄積したレジスタとを、該
バイトマークレジスタの内容で、バイト単位に選択する
回路とを設けて、ストアアクセスでのキャッシュミス時
に、ムーブイン登録動作の後に、該ライトデータバッフ
ァレジスタの内容をキャッシュメモリにライトするか、
該登録動作中にライトデータと、ムーブインデ〜りとを
、バイトマークの内容に基づいて、バイト単位で合成し
た結果をキャッシュメモリにライトするようにしたもの
であるので、命令処理装置は、キャッシュミスが発生し
ても、ライトデータをキャッシュメモリ装置内のライト
データバッファレジスタにセットすることで、該ストア
アクセスを完了させる、所謂突き放し制御ができ、デー
タ処理システムの性能を大幅に向上させることができる
効果がある。
That is, according to the present invention, in a cache memory device controlled by a swap method, a buffer register that holds write data, and the contents of the write data buffer register and move-in data from the main memory f (MS) are stored. Alternatively, in addition to the write data buffer register, a byte mark register, the write data buffer register, and a main memory (MS) may be provided.
) and a circuit that selects the register storing move-in data from the byte mark register in byte units according to the contents of the byte mark register, and when a cache miss occurs in a store access, the write data buffer is selected after the move-in registration operation. Write the contents of the register to cache memory, or
During the registration operation, the write data and move index are combined in byte units based on the contents of the byte mark, and the result is written to the cache memory, so the instruction processing device can avoid cache misses. Even if a write access occurs, by setting the write data to the write data buffer register in the cache memory device, the store access can be completed, so-called push-out control, and the performance of the data processing system can be greatly improved. effective.

〔実施例〕〔Example〕

以下本発明の実施例を図面によって詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

前述の第1図が本発明のキャッシュメモリ制御方式の構
成例を示した図であり、(a)はムーブイン登録後にラ
イトデータをキャッシュメモリにストアする場合を示し
、(b)はムーブイン登録中にライトデータとムーブイ
ンデータとを合成して、該合成データをキャッシュメモ
リにストアする場合を示しており、第2図はデータ処理
システムの全体構成の例を示した図であり、第3図は本
発明を実施例をタイムチャートで示した図であり、それ
ぞれの(a) 、 (b)は、第1図の(a) 、 (
b)に対応しており、第4図はライトデータの合成回路
の一実施例を示した図であって、第1図のライトデータ
バッファレジスタ21.ムーブインレジスタ24.ライ
トデータ選択回路22.又はバイト選択回路22゛。
The above-mentioned FIG. 1 is a diagram showing an example of the configuration of the cache memory control method of the present invention, where (a) shows the case where write data is stored in the cache memory after move-in registration, and (b) shows the case where write data is stored in the cache memory during move-in registration. This shows a case where write data and move-in data are combined and the combined data is stored in a cache memory. Fig. 2 is a diagram showing an example of the overall configuration of a data processing system, and Fig. 3 is a diagram showing an example of the overall configuration of a data processing system. 1 is a diagram showing an example of the present invention in the form of a time chart, and (a) and (b) respectively correspond to (a) and (b) in FIG.
FIG. 4 is a diagram showing an embodiment of a write data synthesis circuit, and corresponds to write data buffer register 21.b) in FIG. Move-in register 24. Write data selection circuit 22. Or byte selection circuit 22''.

バイトマークレジスタ23が、本発明を実施するのに必
要な手段でをある。尚、全図を通して、同じ符号は同じ
対象物を示している。
Byte mark register 23 is the necessary means to implement the invention. Note that the same reference numerals indicate the same objects throughout the figures.

以下、第1図〜第4図によって、本発明の、突き放し方
式によるキャッシュメモリ制御方式を説明する。
Hereinafter, the cache memory control method using the push-out method according to the present invention will be explained with reference to FIGS. 1 to 4.

先ず、第1図〜第3図の(a)によって、上記突き放し
方式によるキャッシュメモリ制御の基本動作を説明する
First, the basic operation of cache memory control using the above-mentioned push-out method will be explained with reference to FIGS. 1 to 3(a).

第2図(a)において、命令処理装置1がメモリストア
を行う場合、キャッシュ要求信号を“オンゝにして、同
時にアドレス線(1)にメモリアドレスを出力し、デー
タ線(1)にライトデータを出力すると共に、バイトマ
ーク線にバイトマークを出力する。
In FIG. 2(a), when the instruction processing device 1 performs a memory store, it turns on the cache request signal, simultaneously outputs a memory address to the address line (1), and writes write data to the data line (1). At the same time, a bite mark is output on the bite mark line.

キャッシュ制御装置2は、上記メモリアドレスを受は取
ると、図示されていないタグメモリを検索し、キャッシ
ュメモリ20にアクセス対象のデータブロックが登録さ
れているか否かを調べる。
Upon receiving the memory address, the cache control device 2 searches a tag memory (not shown) to determine whether the data block to be accessed is registered in the cache memory 20.

その結果、該データブロックが登録されている場合(キ
ャツシュヒツト)、該キャッシュメモリ20にキャッジ
エアドレスを出力し、ライトイネーブルを°オン°にし
て、上記データ線(1)に出力されているライトデータ
を、バイトマーク線のバイトマークに基づいて、バイト
単位でストアする。
As a result, if the data block is registered (cache hit), the cache air address is output to the cache memory 20, the write enable is turned on, and the write data output to the data line (1) is output. is stored in bytes based on the byte marks on the byte mark line.

若し、該キャッシュメモリ20に、該データブロックが
登録されていない場合(キャッシュミス)、主記憶装置
(MS) 3にメモリ要求信号と、アドレス線(2)に
主記憶アドレスを出力し、データ線(1)に出力されて
いるライトデータを、第1図(a)に示しであるライト
データバッファレジスタ21にセットして、該命令処理
装置1は該ストアアクセスを完了し、次の命令の処理に
移る、所謂「突き放し方式」をとる。以後、キャッシュ
制御装置2において、以下の動作を自律的に行う。
If the data block is not registered in the cache memory 20 (cache miss), a memory request signal is output to the main memory device (MS) 3 and a main memory address is output to the address line (2), and the data The instruction processing device 1 completes the store access by setting the write data output on line (1) in the write data buffer register 21 shown in FIG. The so-called "pull-off method" is used to move on to processing. Thereafter, the cache control device 2 autonomously performs the following operations.

即ち、主記憶装置(MS) 3より、上記要求したデー
タブロックが、該主記憶装置(MS) 3のアクセスタ
イム後において、データ線(2)に出力され、ムージイ
ンデータレジスタ2牙にセットされる。
That is, the requested data block is output from the main memory device (MS) 3 to the data line (2) after the access time of the main memory device (MS) 3, and is set in the mooge-in data register 2. Ru.

次に、ライトデータ選択回路22は、該ムーブインデー
タレジスタ2ざを選択し、上記要求データブロックがデ
ータ線(1)に出力され、キャッシュメモリ 20にラ
イトされる。
Next, the write data selection circuit 22 selects the move-in data register 2, and the requested data block is output to the data line (1) and written to the cache memory 20.

該主記憶装置(MS) 3からのデータ転送が終了した
後においては、上記ライトデータ選択回路22は、ライ
トデータバッファレジスタ21を選択し、ライトデータ
がデータ線(1)に出力され、キャッシュメモリ20に
、上記バイトマーク情報に基づいて、バイト単位で上書
きされる。
After the data transfer from the main storage device (MS) 3 is completed, the write data selection circuit 22 selects the write data buffer register 21, and the write data is output to the data line (1) and transferred to the cache memory. 20, it is overwritten in byte units based on the above-mentioned byte mark information.

上記の動作をタイムチャートで示したものが、第3図(
a)である。
A time chart showing the above operation is shown in Figure 3 (
a).

サイクル1において、命令処理装置1からキャッシュ要
求信号と、アドレス線(1)にメモリアドレスが、デー
タ線(1)にライトデータが出力され、該ライトデータ
はライトデータバッファレジスタ21にセットされる。
In cycle 1, the instruction processing device 1 outputs a cache request signal, a memory address to the address line (1), and write data to the data line (1), and the write data is set in the write data buffer register 21.

そして、アクセスタイム後のサイクルn+1と。And cycle n+1 after the access time.

サイクルn+2において、主記憶装置(MS) 3から
の要求データが、データバス幅(例えば、8バイト幅)
を単位として送出され、ムーブインデータレジスタ24
にセットされ、サイクルn+2と、サイクルn+3にお
いて、それぞれ、キャッシュメモリ20の該当ブロック
に転送される。
In cycle n+2, the requested data from main memory (MS) 3 has a data bus width (for example, 8 bytes wide).
is sent in units of move-in data register 24.
and is transferred to the corresponding block of the cache memory 20 in cycle n+2 and cycle n+3, respectively.

尚、一般には、キャッシュメモリ20は数十バイト程度
の固定長ブロックに分割されており、主記憶装置(MS
) 3からのデータ線(2)のバス幅が、前述のように
、8バイトと、上記キャッシュメモリ20のブロック長
より短い場合には、数回に渡ってデータ転送が行われる
。本例においては2回に渡ってデータ転送が行われたこ
とを示している。
Generally, the cache memory 20 is divided into fixed-length blocks of about several tens of bytes, and the cache memory 20 is divided into fixed-length blocks of about several dozen bytes.
) If the bus width of the data line (2) from 3 is 8 bytes, which is shorter than the block length of the cache memory 20, as described above, data transfer is performed several times. This example shows that data transfer was performed twice.

そして、サイクルn+3において、該データ転送が終了
し1次のサイクルn+4で、上記ライトデータバッファ
レジスタ21の内容が、上記バイトマーりの情報に基づ
いて、バイト単位でキャッシュメモリ 20の該当域に
ライトされる。
Then, in cycle n+3, the data transfer is completed, and in the first cycle n+4, the contents of the write data buffer register 21 are written in byte units to the corresponding area of the cache memory 20 based on the byte-margin information. Ru.

上記ストアの°突き放し方式゛では、前述のように、命
令処理装置1はライトデータをライトデータバッファレ
ジスタ21にセットした時点で解放される為、キャッシ
ュミス時のムーブイン動作に伴う性能の低下を回避する
ことができるが、主記憶装置(MS) 3から要求デー
タをムーブインして、キャッシュメモリ20に登録し、
又、ライトデータバッファレジスタの内容をキャッシュ
メモリ20にライトするとき、キャッシュメモリ20へ
のデータ線(1)を使用する為、命令処理装置の状態に
よっては、該データ線(1)を取り合う競合状態を発生
することがある。
In the store push-out method described above, as described above, the instruction processing unit 1 is released when write data is set in the write data buffer register 21, thereby avoiding performance degradation associated with move-in operations in the event of a cache miss. However, the requested data can be moved in from the main storage device (MS) 3 and registered in the cache memory 20,
In addition, when writing the contents of the write data buffer register to the cache memory 20, the data line (1) to the cache memory 20 is used, so depending on the state of the instruction processing device, there may be a competition for the data line (1). may occur.

一般には、該データ線(1)に対する優先権は、キャッ
シュ制御装置2の方が高く、競合状態となった場合、命
令処理装置1は待ち状態となり、性能の低下の原因とな
る。
Generally, the cache control device 2 has a higher priority over the data line (1), and in the event of a conflict, the instruction processing device 1 enters a waiting state, causing a decrease in performance.

第1図〜第3図(a)で説明した「突き放し方式」では
、主記憶装置(MS) 3からのムーブインデータをキ
ャッシュメモリ20に登録した後、ライトデータを該キ
ャッシュメモリ20にライトしているが、結果として、
該ムーブインデータ中の一部のデータは、該ライトデー
タによって上書きされるデータであることに着目し、上
記ムーブインデータの上書きされないバイトと、ライト
データとを合成して、同時にキャッシュメモリ20にラ
イトすることによって、前述のムーブイン後のライトデ
ータをライトしていたサイクルを省略することができる
In the "push-out method" explained in FIGS. 1 to 3(a), move-in data from the main storage device (MS) 3 is registered in the cache memory 20, and then write data is written to the cache memory 20. However, as a result,
Focusing on the fact that some data in the move-in data is data that will be overwritten by the write data, the bytes of the move-in data that will not be overwritten and the write data are combined and stored in the cache memory 20 at the same time. By writing, it is possible to omit the cycle of writing the write data after the move-in described above.

第1図〜第3図(b)は、上記「突き放し方式」を上記
主旨に基づいて改良したものである。以下、該第1図〜
第3図(b)、及び、第4図によって、該改良されたキ
ャッシュメモリ制御方式を説明する。
FIGS. 1 to 3(b) show improvements to the above-mentioned "push-out method" based on the above-mentioned principle. Below, the corresponding figure 1 ~
The improved cache memory control method will be explained with reference to FIG. 3(b) and FIG. 4.

一般に、キャッシュメモリは、高速動作を行わせる為に
、一度に数バイト (例えば、8バイト)程度の単位で
リード/ライトすることができる。
In general, cache memory can be read/written in units of several bytes (for example, 8 bytes) at a time in order to perform high-speed operations.

一方、命令処理装置lはバイト単位に処理を行う為、キ
ャッシュメモリ20ヘライトデータを転送する場合、該
ライトデータと合わせて、バイトマークと呼ばれる制御
情報を出力し、キャッシュメモリ20は、ライトデータ
のバイトマークで示されるバイトのみをライトする構成
となっている。
On the other hand, since the instruction processing device l performs processing in byte units, when transferring write data to the cache memory 20, control information called a byte mark is output together with the write data, and the cache memory 20 transfers the write data It is configured to write only the byte indicated by the byte mark.

又、1亥キヤツシユメモリ20へのムーブインデータは
、前述のように、32バイト/64バイト等を1ブロツ
クとするブロックの単位で構成されているが、上記ライ
ト動作は、上記1ブロツクの内の、例えば、8バイトに
対して行われる。
Furthermore, as mentioned above, the move-in data to the cache memory 20 is composed of blocks of 32 bytes/64 bytes, etc., but the write operation described above This is performed on, for example, 8 bytes.

そして、通常、ライトアドレスに対応して、該ライトす
べき語(8バイト)が先頭にくるように編集されてムー
ブインデータが構成される場合と、主記憶装置(MS)
によっては、上記ブロックの境界の先頭の8バイトから
順次ムーブインされる場合とがある。
Usually, the move-in data is edited so that the word (8 bytes) to be written is at the beginning according to the write address, and the main memory (MS)
In some cases, the data may be moved in sequentially from the first 8 bytes of the block boundary.

このようなキャッシュメモリに対して、第1図〜第3図
(b)によって、上記突き放し方式による改良されたキ
ャッシュメモリ制御の動作を、以下に説明する。
With respect to such a cache memory, the improved cache memory control operation using the above-mentioned push-out method will be explained below with reference to FIGS. 1 to 3(b).

第2図(b)において、命令処理装置!!1がメモリス
トアを行う場合、キャッシュ要求信号を °オン゛にし
て、同時にアドレス線(1)にメモリアドレスを出力し
、データ線(1)にライトデータを出力し、バイトマー
ク線にバイトマークを出力する。
In FIG. 2(b), the instruction processing device! ! When 1 performs a memory store, it turns on the cache request signal, simultaneously outputs a memory address to the address line (1), outputs write data to the data line (1), and writes a byte mark to the byte mark line. Output.

キャッシュ制御装置2は該メモリアドレスを受は取ると
、図示されていないタグメモリと呼ばれる記憶回路を検
索し、キャッシュメモリ20上にデータが登録されてい
るか否かを調べる。
When the cache control device 2 receives the memory address, it searches a storage circuit called a tag memory (not shown) and checks whether data is registered in the cache memory 20.

その結果、データが登録されている場合には、キャッシ
ュメモリ20にキャッシュアドレスを出力し、ライトイ
ネーブルを ゛オン゛にして、データ線lに出力されて
いるデータを、上記バイトマークに従って、バイト単位
でライトする。
As a result, if the data is registered, the cache address is output to the cache memory 20, the write enable is turned on, and the data output to the data line 1 is written in byte units according to the above-mentioned byte mark. Write with .

又、キャッシュメモリ20にデータが登録されていない
場合(即ち、キャッシュミス時)には、主記憶装置(M
S) 3にメモリ要求信号と、アドレス線(2)から主
記憶アドレスを出力し、データ線(1)に出力されてい
るライトデ〜りを、第1図(b)に示されているライト
データバッファレジスタ21にセットし、バイトマーク
線のバイトマークをバイトマークレジスタ23にセット
する。
Furthermore, when data is not registered in the cache memory 20 (that is, at the time of a cache miss), the main memory (M
S) Output the memory request signal to 3 and the main memory address from the address line (2), and convert the write data output to the data line (1) into the write data shown in FIG. 1(b). The buffer register 21 is set, and the byte mark of the byte mark line is set in the byte mark register 23.

その後、主記憶装置(MS) 3よりムーブインデータ
が、データ線(2)に出力されムーブインデータレジス
タ24にセットされる。
Thereafter, move-in data is output from the main memory (MS) 3 to the data line (2) and set in the move-in data register 24.

次に、第4図にその実施例を示したバイト選択回路22
′は、バイトマークレジスタ23の値に従って、ライト
データバッファレジスタ、21と。
Next, the byte selection circuit 22 whose embodiment is shown in FIG.
' is the write data buffer register 21 according to the value of the byte mark register 23.

ムーブインデータレジスタ24の何れかをバイト単位に
選択(例えば、バイトマークが°1°であればライトデ
ータバッファレジスタ21を選択し、バイトマークが°
0゛であれば、ムーブインデータレジスタ24を選択す
る)して、合成されたライトデータ (8バイト)を、
データバス22aを介してデータ線(1)に出力し、キ
ャッシュメモリ20にライトする。
Select one of the move-in data registers 24 in byte units (for example, if the byte mark is °1°, select the write data buffer register 21;
If it is 0, select the move-in data register 24) and write the combined write data (8 bytes),
It is output to the data line (1) via the data bus 22a and written to the cache memory 20.

第3図(b)は、キャッシュメモリ20にデータが登録
されていない場合で、且つムーブインデータの先頭に、
該ライトアドレスに対応するデータが取り出されている
場合のタイムチャートである。
FIG. 3(b) shows a case where no data is registered in the cache memory 20, and at the beginning of the move-in data,
14 is a time chart when data corresponding to the write address is being retrieved.

本図において、サイクル1において、命令処理装置1よ
りキャッシュ要求信号と、ライトアドレスと、ライトデ
ータと、バイトマークが出力され、ライトデータはライ
トデータバッファレジスタ21にセットされる。
In this figure, in cycle 1, a cache request signal, a write address, write data, and a byte mark are output from the instruction processing device 1, and the write data is set in the write data buffer register 21.

そして、サイクルn+1において、主記憶装置!(1’
IS) 3からムーブインデータが送られ、ムーブイン
データレジスタ24にセットされ、サイクルn+2にお
いて、ライトデータバッファレジスタ21の内容と、ム
ーブインデータレジスタ24の内容とがバイトマークレ
ジスタ23の値に従って、バイト選択回路22゛におい
て、バイト単位で合成され、キャッシュメモリ20にラ
イトされる。
Then, in cycle n+1, the main memory! (1'
Move-in data is sent from IS) 3 and set in the move-in data register 24, and in cycle n+2, the contents of the write data buffer register 21 and the contents of the move-in data register 24 are changed according to the value of the byte mark register 23. The byte selection circuit 22' synthesizes the data in byte units and writes it into the cache memory 20.

上記ムーブインデータの残りが、サイクルn+2におい
て、ムーブインデータレジスタ24にセットされ、サイ
クルn+3において、キャッシュメモリ 20にライト
される。
The remainder of the move-in data is set in the move-in data register 24 in cycle n+2, and written to the cache memory 20 in cycle n+3.

前述のように、ムーブインデータが主記憶装置(MS)
 3に送出されるライトアドレスに関わらず、該ライト
アドレスを含むブロックの境界の先頭語(8バイト)か
ら順に送られてくる場合には、該ライトアドレスの下位
ビットを用いて、該ムーブインデータの合成対象の語(
8バイト)を選択し、該選択された語(8バイト)に、
バイトマークのかの何れかを選択してライトデータを合
成するように機能させる必要がある。
As mentioned above, move-in data is stored in the main memory (MS)
Regardless of the write address sent in step 3, if the write address is sent in order from the first word (8 bytes) at the boundary of the block that includes the write address, the lower bits of the write address are used to write the move-in data. The word to be composed of (
8 bytes) and enter the selected word (8 bytes) as
It is necessary to select one of the bite marks and make it function to synthesize write data.

このように、本発明は、スワップ方式で制御されるキャ
ッシュメモリ装置において、キャッシュ制御装置内に、
ライトデータを保持するライトデータバッファレジスタ
を設け、命令処理装置はメモリストアの時のキャッシュ
ミスの時には、該ライトデータバッファレジスタにライ
トデータをセットして、該ライトアクセスの完了と見做
し、次の処理に移る、所謂「突き放し方式」とし、以降
はキャッシュ制御装置内で、自律的に主記憶装置(MS
)にメモリ要求を送出し、該主記憶装置(MS)から送
られてくるムーブインデータをキャッシュメモリに登録
した後、ライトデータをライトするか、或いは、該登録
動作中に、ムーブインデータとライトデータとを合成し
てキャッシュメモリにライトするようにした所に特徴が
ある。
As described above, the present invention provides a cache memory device controlled by the swap method, in which the cache control device includes:
A write data buffer register is provided to hold write data, and when a cache miss occurs during memory store, the instruction processing device sets the write data in the write data buffer register, assumes that the write access is completed, and then Then, the main memory (MS) is autonomously stored within the cache control device.
), and after registering the move-in data sent from the main memory (MS) in the cache memory, write the write data, or write the move-in data during the registration operation. The feature is that it is combined with the write data and written to the cache memory.

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

以上、詳細に説明したように、本発明のキャッシュメモ
リ制御方式は、スワップ方式で制′41■されるキャッ
シュメモリ装置において、ライトデータを保持するバッ
ファレジスタと、該ライトデータバッファレジスタの内
容と主記憶装置(MS)がらのムーブインデータとを選
択する回路とを設けるが、或いは、該ライトデータバッ
ファレジスタの他に、バイトマークレジスタと、上記ラ
イトデータバッファレジスタと、主記憶装置(MS)が
らのムーブインデータを蓄積したレジスタとを、該バイ
トマークレジスタの内容で、バイト単位に選択する回路
とを設けて、ストアアクセスでのキャッシュミス時に、
ムーブイン登録動作の後に、該ライトデータバッファレ
ジスタの内容をキャッシュメモリにライトするか、該登
録動作中にライトデータと。
As described above in detail, the cache memory control method of the present invention is applicable to a cache memory device controlled by the swap method, which includes a buffer register that holds write data, and a main function that controls the contents of the write data buffer register. A circuit for selecting move-in data from the storage device (MS) is provided, or, in addition to the write data buffer register, a byte mark register, the write data buffer register, and a circuit for selecting move-in data from the main storage device (MS) are provided. A circuit is provided that selects a register storing move-in data in byte units based on the contents of the byte mark register, so that when a cache miss occurs in a store access,
After the move-in registration operation, the contents of the write data buffer register are written to the cache memory, or the contents of the write data buffer register are written to the cache memory during the move-in registration operation.

ムーブインデータとを、バイトマークの内容に基づいて
、バイト単位で合成した結果をキャッシュメモリにライ
トするようにしたものであるので、命令処理装置は、キ
ャッシュミスが発生しても、ライトデータをキャッシュ
メモリ装置内のライトデータバッファにセットすること
で、該ストアアクセスを完了させる、所謂突き放し制御
ができるので、データ処理システムの性能を大幅に向上
させることができる効果がある。
The move-in data is combined with the move-in data in bytes based on the contents of the byte mark, and the result is written to the cache memory. Therefore, even if a cache miss occurs, the instruction processing unit will not be able to write the write data. By setting it in the write data buffer in the cache memory device, it is possible to complete the store access, so-called push-out control, which has the effect of significantly improving the performance of the data processing system.

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

第1図は本発明のキャッシュメモリ制御方式の構成例を
示した図。 第2図はデータ処理システムの全体構成の例を示した図
。 第3図は本発明を実施例をタイムチャートで示した図。 第4図はライトデータの合成回路の一実施例を示した図
。 第5図は従来のキャッシュメモリ制御方式を説明する図
。 である。 図面において、 1は命令処理装置、  2はキャッシュ制御装置。 20はキャッシュメモリ。 21はライトデータバッファレジスタ。 22はライトデータ選択回路。 22゛ はバイト選択回路。 請はムーブインデータレジスタ。 3は主記憶装置(MS) 。 をそれぞれ示す。 、木、igのヤヤ・ルエくモリh・1奇Vかへのキメ1
成イダ°]ε示、Lt【ト4事1 園 <b) 第2 目 第2区
FIG. 1 is a diagram showing an example of the configuration of a cache memory control method according to the present invention. FIG. 2 is a diagram showing an example of the overall configuration of a data processing system. FIG. 3 is a time chart showing an embodiment of the present invention. FIG. 4 is a diagram showing an embodiment of a write data synthesis circuit. FIG. 5 is a diagram explaining a conventional cache memory control method. It is. In the drawings, 1 is an instruction processing device, and 2 is a cache control device. 20 is a cache memory. 21 is a write data buffer register. 22 is a write data selection circuit. 22゛ is a byte selection circuit. This is a move-in data register. 3 is the main memory (MS). are shown respectively. , Thu, ig's Yaya Rue Kumori h・1 odd V Kahe no Kime 1
Seiida °] ε Show, Lt [To4 things 1 Garden <b) 2nd item 2nd ward

Claims (2)

【特許請求の範囲】[Claims] (1)スワップ方式で制御されるキャッシュメモリ装置
において、 ライトデータを保持するバッファレジスタ(21)と、 該ライトデータバッファレジスタ(21)と、主記憶装
置(MS)(3)からのデータとを選択するライトデー
タ選択回路(22)と、 該ライトデータ選択回路(22)の出力をキャッシュメ
モリ(20)にライトするデータバス(22a)とを備
え、 上記ライトデータを上記ライトデータバッファレジスタ
(21)に保持し、キャッシュミスに応答したキャッシ
ュ登録動作の後に、上記ライトデータバッファレジスタ
(21)の内容をキャッシュメモリ(20)にライトす
ることを特徴とするキャッシュメモリ制御方式
(1) In a cache memory device controlled by the swap method, a buffer register (21) that holds write data, the write data buffer register (21), and data from the main memory (MS) (3) are It includes a write data selection circuit (22) to select, and a data bus (22a) to write the output of the write data selection circuit (22) to the cache memory (20), and the write data is transferred to the write data buffer register (21). ), and after a cache registration operation in response to a cache miss, the contents of the write data buffer register (21) are written to the cache memory (20).
(2)上記キャッシュミス時に、ライトデータバッファ
レジスタ(21)の内容をキャッシュメモリ(20)に
ライトするのに、 該ライトデータを保持するライトデータバッファレジス
タ(21)の他に、 主記憶装置(MS)(3)からの転送データを保持する
ムーブインデータレジスタ(24)と、 該ライトデータの有効/無効をバイト単位に示すバイト
マークを保持するバイトマークレジスタ(23)と、 該バイトマークレジスタ(23)の内容に呼応して、上
記ライトデータバッファレジスタ(21)と、ムーブイ
ンデータレジスタ(24)の内容を、バイト単位に選択
する回路(22′)と、 該バイト選択回路(22′)の出力をキャッシュメモリ
(20)にライトするデータバス(22a)とを備え、
ライトデータを上記ライトデータバッファレジスタ(2
1)に、又、バイトマークをバイトマークレジスタ(2
3)に保持し、 キャッシュミスに応答したキャッシュ登録動作中に、上
記レジスタ(21)と、レジスタ(24)の内容を上記
選択回路(22′)でバイト単位に選択、合成してキャ
ッシュメモリ(20)にライトすることを特徴とする特
許請求の範囲第1項に記載のキャッシュメモリ制御方式
(2) In order to write the contents of the write data buffer register (21) to the cache memory (20) at the time of the cache miss, in addition to the write data buffer register (21) that holds the write data, the main storage ( A move-in data register (24) that holds the transfer data from MS) (3), a byte mark register (23) that holds a byte mark that indicates the validity/invalidity of the write data in bytes, and the byte mark register. (23), a circuit (22') that selects the contents of the write data buffer register (21) and the move-in data register (24) in units of bytes; and the byte selection circuit (22'). ) and a data bus (22a) for writing the output of the cache memory (20),
Write data to the above write data buffer register (2
1), and the byte mark register (2).
3), and during the cache registration operation in response to a cache miss, the contents of the register (21) and register (24) are selected and combined in byte units by the selection circuit (22') and stored in the cache memory ( 20). The cache memory control method according to claim 1, wherein the cache memory control method writes to the cache memory.
JP62148218A 1987-06-15 1987-06-15 Cache memory control circuit Expired - Fee Related JPH0677240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62148218A JPH0677240B2 (en) 1987-06-15 1987-06-15 Cache memory control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62148218A JPH0677240B2 (en) 1987-06-15 1987-06-15 Cache memory control circuit

Publications (2)

Publication Number Publication Date
JPS63311548A true JPS63311548A (en) 1988-12-20
JPH0677240B2 JPH0677240B2 (en) 1994-09-28

Family

ID=15447919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62148218A Expired - Fee Related JPH0677240B2 (en) 1987-06-15 1987-06-15 Cache memory control circuit

Country Status (1)

Country Link
JP (1) JPH0677240B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327101B2 (en) 2008-02-01 2012-12-04 International Business Machines Corporation Cache management during asynchronous memory move operations
US8356151B2 (en) 2008-02-01 2013-01-15 International Business Machines Corporation Reporting of partially performed memory move

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327101B2 (en) 2008-02-01 2012-12-04 International Business Machines Corporation Cache management during asynchronous memory move operations
US8356151B2 (en) 2008-02-01 2013-01-15 International Business Machines Corporation Reporting of partially performed memory move

Also Published As

Publication number Publication date
JPH0677240B2 (en) 1994-09-28

Similar Documents

Publication Publication Date Title
US5283886A (en) Multiprocessor cache system having three states for generating invalidating signals upon write accesses
KR100278328B1 (en) Cache miss buffer
CA1124888A (en) Integrated multilevel storage hierarchy for a data processing system with improved channel to memory write capability
US5095424A (en) Computer system architecture implementing split instruction and operand cache line-pair-state management
JP3259969B2 (en) Cache memory controller
EP0167089B1 (en) Memory access control system and method for an information processing apparatus
JPH03225542A (en) Memory of data and processing circuit for bit encode data
EP0173909B1 (en) Look-aside buffer least recently used marker controller
JPS63311548A (en) Cache memory controlling system
US4737908A (en) Buffer memory control system
EP0271187B1 (en) Split instruction and operand cache management
JPH02259945A (en) Storing processing system
JP3260566B2 (en) Storage control method and storage control device in information processing system
JP2703255B2 (en) Cache memory writing device
JPH06301600A (en) Storage device
EP0400851A2 (en) Efficient cache utilizing a store buffer
JPH0526216B2 (en)
JPH0332820B2 (en)
JPS6319856Y2 (en)
JPS6319857Y2 (en)
JPH04348441A (en) Cache memory control system
JPH01279342A (en) Cache control system
JPS61211752A (en) Page hysteresis memory device
JPH04363738A (en) Cache memory device
JPS6135583B2 (en)

Legal Events

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