JPH0677240B2 - Cache memory control circuit - Google Patents

Cache memory control circuit

Info

Publication number
JPH0677240B2
JPH0677240B2 JP62148218A JP14821887A JPH0677240B2 JP H0677240 B2 JPH0677240 B2 JP H0677240B2 JP 62148218 A JP62148218 A JP 62148218A JP 14821887 A JP14821887 A JP 14821887A JP H0677240 B2 JPH0677240 B2 JP H0677240B2
Authority
JP
Japan
Prior art keywords
data
write data
cache memory
register
move
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
JP62148218A
Other languages
Japanese (ja)
Other versions
JPS63311548A (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.)
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

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術と発明が解決しようとする問題点 問題点を解決するための手段 作用 実施例 発明の効果 〔概要〕 スワップ方式で制御されるキャッシュメモリ装置におい
て、ライトデータを保持するバッファレジスタと,該ラ
イトデータバッファレジスタの内容と主記憶装置(MS)
からのムーブインデータとを選択する回路とを設ける
か、或いは、該ライトデータバッファレジスタの他に、
バイトマークレジスタと、上記ライトデータバッファレ
ジスタと、主記憶装置(MS)からのムーブインデータを
蓄積したレジスタとを、該バイトマークレジスタの内容
で、バイト単位に選択する回路とを設けて、キャッシュ
ミス時に、ムーブイン登録動作の後に、該ライトデータ
バッファレジスタの内容をキャッシュメモリにライトす
るか、該登録動作中にライトデータと,ムーブインデー
タとを、バイトマークの内容に基づいて、バイト単位で
合成した結果をキャッシュメモリにライトするようにし
たものである。
DETAILED DESCRIPTION [Table of Contents] Outline Industrial field of application Conventional techniques and problems to be solved by the invention Means for solving problems Problems Working Example Example of the invention [Summary] Controlled by swap method A cache memory device for storing write data, contents of the write data buffer register and main memory device (MS)
And a circuit for selecting the move-in data from, or in addition to the write data buffer register,
A cache is provided by providing a byte mark register, the write data buffer register, and a register for accumulating move-in data from the main storage device (MS) on a byte-by-byte basis based on the contents of the byte mark register. 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 the move-in data are written in byte units based on the contents of the byte mark. The synthesized result is written in the cache memory.

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

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

従来からデータ処理システムの処理能力を向上させる手
段と1つとして、キャッシュメモリ方式が採られてい
る。
Conventionally, a cache memory system has been adopted as one means for improving the processing capacity of a data processing system.

これは命令処理装置が実行するプログラムのアドレス分
布の局所性に基づいて、該局所性が見られるアドレスの
範囲を1ブロックとして、主記憶装置(MS)から該ブロ
ック単位のコピーを、主記憶装置(MS)に比較して記憶
容量は小さいが高速のキャッシュメモリに保持してお
き、命令処理装置からのメモリ要求に対して、該キャッ
シュメモリに該当データが存在する場合には、該キャッ
シュメモリが応答することで、主記憶装置(MS)に対す
る見掛け上のアクセスタイムを短縮させることで、当該
データ処理システムの処理能力を向上させるものであ
る。
This is based on the locality of the address distribution of the program executed by the instruction processing unit, and the range of addresses where the locality is seen is set as one block, and a copy in block units from the main memory unit (MS) is performed. The storage capacity is smaller than that of (MS) but is held in a high-speed cache memory, and when the corresponding data exists in the cache memory in response to a memory request from the instruction processing device, the cache memory is By responding, the apparent access time to the main memory (MS) is shortened, and the processing capacity of the data processing system is improved.

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

〔従来の技術と発明が解決しようとする問題点〕[Problems to be solved by conventional technology and invention]

第5図は、従来のキャッシュメモリ制御方式を説明する
図である。
FIG. 5 is a diagram for explaining a conventional cache memory control method.

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

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

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

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

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

上記リード,ライト時のキャッシュミス時のムーブイン
動作において、キャッシュメモリに空きブロックが存在
しない時には、公知のLRU機構によって追い出しブロッ
クを検索し、該当ブロックの内容が主記憶装置(MS)3
の該当ブロックと不一致であれば、該ブロックを主記憶
装置(MS)3にムーブアウトし、そこにムーブインする
が、一致しているときには上書きの形でムーブインす
る。
In the move-in operation at the time of a cache miss at the time of reading or writing, when there is no free block in the cache memory, the eviction block is searched by the well-known LRU mechanism, and the content of the corresponding block is the main storage device (MS) 3
If the block does not match the corresponding block, the block is moved out to the main storage device (MS) 3 and moved in there. If they match, the block is moved in by overwriting.

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

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

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

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

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

本発明においては、 (1) スワップ方式で制御されるキャッシュメモリ装
置において、命令処理装置1からのライトデータを保持
するライトデータバッファレジスタ21と,該ライトデー
タバッファレジスタ21と、主記憶装置(MS)3からのム
ーブインデータを保持するムーブインデータレジスタ24
のデータを選択するライトデータ選択回路22と、該ライ
トデータ選択回路22の出力をキャッシュメモリ20にライ
トするデータパス22aとを備え、上記命令処理装置1か
らのライトデータを、上記ライトデータバッファレジス
タ21に保持すると、上記命令処理装置1のストアアクセ
ス動作を完了させ、該ストアアクセス動作に対応して生
起したキャッシュミスに応答した上記ムーブインデータ
のキャッシュメモリ20への登録動作の後に、上記ライト
データバッファレジスタ21の内容を、自律的に、キャッ
シュメモリ20にライトするように構成する。
In the present invention, (1) in a cache memory device controlled by a swap method, a write data buffer register 21 that holds write data from the instruction processing device 1, the write data buffer register 21, and a main memory device (MS ) Move-in data register 24 that holds move-in data from 3
Write data selection circuit 22 for selecting the data of the write data selection circuit 22 and a data path 22a for writing the output of the write data selection circuit 22 to the cache memory 20. The write data from the instruction processing device 1 is transferred to the write data buffer register. When it is held in 21, the write access is completed after the store access operation of the instruction processing device 1 is completed and the move-in data is registered in the cache memory 20 in response to the cache miss generated in response to the store access operation. The contents of the data buffer register 21 are autonomously written to the cache memory 20.

(2) 上記キャッシュミス時に、ライトデータバッフ
ァレジスタ21の内容をキャッシュメモリ20にライトする
のに、 該ライトデータを保持するライトデータバッファレジス
タ21の他に、 主記憶装置(MS)3からの転送データを保持するムーブ
インデータレジスタ24と、 該ライトデータの有効/無効をバイト単位に示すバイト
マークを保持するバイトマークレジスタ23と、 該バイトマークレジスタ23の内容に呼応して、上記ライ
トデータバッファレジスタ21と,ムーブインデータレジ
スタ24の内容を、バイト単位に選択する回路22′と、 該バイト選択回路22′の出力をキャッシュメモリ20にラ
イトするデータパス22aとを備え、 上記命令処理装置1からのライトデータを上記ライトデ
ータバッファレジスタ21に、又バイトマークをバイトマ
ークレジスタ23に保持すると、上記命令処理装置1のス
トアアクセス動作を完了させ、該ストアアクセス動作に
対応して生起したキャッシュミスに応答した上記ムーブ
インデータのキャッシュメモリ20への登録動作中に、自
律的に、上記ライトデータバッファレジスタ21と,ムー
ブインデータレジスタ24の内容を上記バイト選択回路2
2′でバイト単位に選択,合成してキャッシュメモリ20
にライトするように構成する。
(2) 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 memory (MS) 3 A move-in data register 24 for holding data, a byte mark register 23 for holding a byte mark indicating valid / invalid of the write data in byte units, and the write data buffer in response to the contents of the byte mark register 23. The instruction processing device 1 comprises a register 21, a circuit 22 'for selecting the contents of the move-in data register 24 in byte units, and a data path 22a for writing the output of the byte selection circuit 22' to the cache memory 20. Write data to the write data buffer register 21 and byte marks to the byte mark register. When held in 23, the store access operation of the instruction processing device 1 is completed, and the move-in data is autonomously registered in the cache memory 20 in response to the cache miss generated in response to the store access operation. The contents of the write data buffer register 21 and the move-in data register 24 are stored in the byte selection circuit 2
2'Select byte by byte, synthesize and cache memory 20
It is configured to write to.

〔作用〕[Action]

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

〔実施例〕〔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′,バイトマークレジス
タ23が、本発明を実施するのに必要な手段である。尚、
全図を通して、同じ符号は同じ対象物を示している。
FIG. 1 described above is a diagram showing a configuration example of the cache memory control circuit of the present invention, (a) shows a case where write data is stored in the cache memory after move-in registration, and (b) shows during move-in registration. FIG. 2 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. FIG. 4 is a diagram showing an embodiment of the present invention in a time chart, where (a) and (b) respectively correspond to (a) and (b) of FIG. 1, and FIG. 4 shows write data. FIG. 3 is a diagram showing an embodiment of a synthesizing circuit, in which the write data buffer register 21, the move-in register 24, the write data selecting circuit 22, or the byte selecting circuit 22 'and the byte mark register 23 of FIG. Carry out It is a necessary means for still,
Throughout the drawings, the same reference numerals denote the same objects.

以下、第1図〜第4図によって、本発明の、突き放し方
式によるキャッシュメモリ制御回路を説明する。
The cache memory control circuit according to the present invention will be described below with reference to FIGS. 1 to 4.

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

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

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

その結果、該データブロックが登録されている場合(キ
ャッシュヒット)、該キャッシュメモリ20にキャッシュ
アドレスを出力し、ライトイネーブルを“オン”にし
て、上記データ線(1)に出力されているライトデータ
を、バイトマーク線のバイトマークに基づいて、バイト
単位でストアする。
As a result, when the data block is registered (cache hit), the cache 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 byte units based on the byte mark of 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), the memory request signal is output to the main memory device (MS) 3 and the main memory address is output to the address line (2) to output the data. The write data output to the line (1) is set in the write data buffer register 21 shown in FIG.
Completes the store access and moves to the processing of the next instruction,
The so-called "push-through method" is adopted. After that, the cache controller 2 autonomously performs the following operations.

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

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

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

上記の動作をタイムチヤートで示したものが、第3図
(a)である。
FIG. 3 (a) shows the above operation in a time chart.

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

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

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

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

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

一般には、該データ線(1)に対する優先権は、キャッ
シュ制御装置2の方が高く、競合状態となった場合、命
令処理装置1は待ち状態となり、性能の低下の原因とな
る。
In general, the cache controller 2 has a higher priority on the data line (1), and when a contention occurs, the instruction processor 1 enters a waiting state, which causes a deterioration in performance.

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

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

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

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

又、該キャッシュメモリ20へのムーブインデータは、前
述のように、32バイト/64バイト等を1ブロックとする
ブロックの単位で構成されているが、上記ライト動作
は、上記1ブロックの内の、例えば、8バイトに対して
行われる。
Further, the move-in data to the cache memory 20 is configured in the unit of block having 32 bytes / 64 bytes etc. as one block as described above. , For example, for 8 bytes.

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

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

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

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

その結果、データが登録されている場合には、キャッシ
ュメモリ20にキャッシュアドレスを出力し、ライトイネ
ーブルを“オン”にして、データ線1に出力されている
データを、上記バイトマークに従って、バイト単位でラ
イトする。
As a result, when 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 converted into byte units according to the above byte mark. To write.

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

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

次に、第4図にその実施例を示したバイト選択回路22′
は、バイトマークレジスタ23の値に従って、ライトデー
タバッファレジスタ21と,ムーブインデータレジスタ24
の何れかをバイト単位に選択(例えば、バイトマークが
“1"であればライトデータバッファレジスタ21を選択
し、バイトマークが“0"であれば、ムーブインデータレ
ジスタ24を選択する)して、合成されたライトデータ
(8バイト)を、データパス22aを介してデータ線
(1)に出力し、キャッシュメモリ20にライトする。
Next, the byte selection circuit 22 'whose embodiment is shown in FIG.
According to the value of the byte mark register 23, the write data buffer register 21 and the move-in data register 24
Either of them is selected in byte unit (for example, if the byte mark is “1”, the write data buffer register 21 is selected, and if the byte mark is “0”, the move-in data register 24 is selected). The combined write data (8 bytes) is output to the data line (1) via the data path 22a and written to the cache memory 20.

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

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

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

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

前述のように、ムーブインデータが主記憶装置(MS)3
に送出されるライトアドレスに関わらず、該ライトアド
レスを含むブロックの境界の先頭語(8バイト)から順
に送られてくる場合には、該ライトアドレスの下位ビッ
トを用いて、該ムーブインデータの合成対象の語(8バ
イト)を選択し、該選択された語(8バイト)に、バイ
トマークの値に従ってバイト単位で、ライトデータバッ
ファレジスタ21か,ムーブインデータレジスタ24からの
何れかを選択してライトデータを合成するように機能さ
せる必要がある。
As described above, the move-in data is stored in the main storage device (MS) 3
Irrespective of the write address sent to the first write address, when the data is sent in order from the first word (8 bytes) at the boundary of the block including the write address, the lower bits of the write address are used to write the move-in data. Select a word to be combined (8 bytes) and select either the write data buffer register 21 or the move-in data register 24 for the selected word (8 bytes) in byte units according to the value of the byte mark. Then, it is necessary to function so as to synthesize the write data.

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

〔発明の効果〕〔The invention's effect〕

以上、詳細に説明したように、本発明のキャッシュメモ
リ制御回路は、スワップ方式で制御されるキャッシュメ
モリ装置において、ライトデータを保持するバッファレ
ジスタと,該ライトデータバッファレジスタの内容と主
記憶装置(MS)からのムーブインデータとを選択する回
路とを設けるか、或いは、該ライトデータバッファレジ
スタの他に、バイトマークレジスタと、上記ライトデー
タバッファレジスタと、主記憶装置(MS)からのムーブ
インデータを蓄積したレジスタとを、該バイトマークレ
ジスタの内容で、バイト単位に選択する回路とを設け
て、ストアアクセスでのキャッシュミス時に、ムーブイ
ン登録動作の後に、該ライトデータバッファレジスタの
内容をキャッシュメモリにライトするか、該登録動作中
にライトデータと,ムーブインデータとを、バイトマー
クの内容に基づいて、バイト単位で合成した結果をキャ
ッシュメモリにライトするようにしたものであるので、
命令処理装置は、キャッシュミスが発生しても、ライト
データをキャッシュメモリ装置内のライトデータバッフ
ァにゼットすることで、該ストアアクセスを完了させ
る、所謂突き放し制御ができるので、データ処理システ
ムの性能を大幅に向上させることができる効果がある。
As described above in detail, in the cache memory control circuit of the present invention, in the cache memory device controlled by the swap method, the buffer register for holding the write data, the contents of the write data buffer register, and the main storage device ( Or a move-in data from the main memory device (MS), or a byte mark register, the write data buffer register, and a move-in data from the main storage device (MS) in addition to the write data buffer register. A register for accumulating data and a circuit for selecting the contents of the byte mark register in units of bytes are provided so that the contents of the write data buffer register are cached after the move-in registration operation at the time of a cache miss in store access. Write to the memory or write data during the registration operation The result of combining the save-in data and the byte mark based on the content of the byte mark is written to the cache memory.
Even if a cache miss occurs, the instruction processing device can perform so-called push-off control, which completes the store access by setting the write data in the write data buffer in the cache memory device, thus improving the performance of the data processing system. There is an effect that can be greatly improved.

【図面の簡単な説明】 第1図は本発明のキャッシュメモリ制御回路の構成例を
示した図 第2図はデータ処理システムの全体構成の例を示した
図, 第3図は本発明を実施例をタイムチヤートで示した図, 第4図はライトデータの合成回路の一実施例を示した
図, 第5図は従来のキャッシュメモリ制御方式を説明する
図, である。 図面において、 1は命令処理装置,2はキャッシュ制御装置, 20はキャッシュメモリ, 21はライトデータバッファレジスタ, 22はライトデータ選択回路, 22′はバイト選択回路, 24はムーブインデータレジスタ, 3は主記憶装置(MS), をそれぞれ示す。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram showing a configuration example of a cache memory control circuit of the present invention, FIG. 2 is a diagram showing an example of the overall configuration of a data processing system, and FIG. 3 is an embodiment of the present invention. FIG. 4 is a diagram showing an example in a time chart, FIG. 4 is a diagram showing an embodiment of a write data synthesizing circuit, and FIG. 5 is a diagram explaining a conventional cache memory control system. In the drawings, 1 is an instruction processor, 2 is a cache controller, 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, 24 is a move-in data register, and 3 is Main memory (MS), respectively.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】スワップ方式で制御されるキャッシュメモ
リ装置において、 命令処理装置(1)からのライトデータを保持するライ
トデータバッファレジスタ(21)と, 該ライトデータバッファレジスタ(21)と、主記憶装置
(MS)(3)からのムーブインデータを保持するムーブ
インデータレジスタ(24)のデータとを選択するライト
データ選択回路(22)と、 該ライトデータ選択回路(22)の出力をキャッシュメモ
リ(20)にライトするデータパス(22a)とを備え、 上記命令処理装置(1)からのライトデータを、上記ラ
イトデータバッファレジスタ(21)に保持すると、上記
命令処理装置1のストアアクセス動作を完了させ、該ス
トアアクセス動作に対応して生起したキャッシュミスに
応答した上記ムーブインデータのキャッシュメモリ(2
0)への登録動作の後に、上記ライトデータバッファレ
ジスタ(21)の内容を、自律的に、キャッシュメモリ
(20)にライトすることを特徴とするキャッシュメモリ
制御回路。
1. A cache memory device controlled by a swap method, a write data buffer register (21) for holding write data from an instruction processing device (1), the write data buffer register (21), and a main memory. A write data selection circuit (22) for selecting the data of the move-in data register (24) holding the move-in data from the device (MS) (3), and the output of the write data selection circuit (22) is a cache memory. When the write data from the instruction processing device (1) is held in the write data buffer register (21), a store access operation of the instruction processing device 1 is performed. The move-in data cache memory (2) which is completed and responds to the cache miss generated in response to the store access operation.
A cache memory control circuit characterized by autonomously writing the contents of the write data buffer register (21) to the cache memory (20) after a registration operation to 0).
【請求項2】上記キャッシュミス時に、ライトデータバ
ッファレジスタ(21)の内容をキャッシュメモリ(20)
にライトするのに、 該ライトデータを保持するライトデータバッファレジス
タ(21)の他に、 主記憶装置(MS)(3)からのムーブインデータを保持
するムーブインデータレジスタ(24)と、 該ライトデータの有効/無効をバイト単位に示すバイト
マークを保持するバイトマークレジスタ(23)と、 該バイトマークレジスタ(23)の内容に呼応して、上記
ライトデータバッファレジスタ(21)と,ムーブインデ
ータレジスタ(24)の内容を、バイト単位に選択する回
路(22′)と、 該バイト選択回路(22′)の出力をキャッシュメモリ
(20)にライトするデータパス(22a)とを備え、 上記命令処理装置(1)からのライトデータを上記ライ
トデータバッファレジスタ(21)に、又、バイトマーク
をバイトマークレジスタ(23)に保持すると、上記命令
処理装置(1)のストアアクセス動作を完了させ、該ス
トアアクセス動作に対応して生起したキャッシュミスに
応答した上記ムーブインデータのキャッシュメモリ(2
0)への登録動作中に、自律的に、上記ライトデータバ
ッファレジスタ(21)と,ムーブインデータレジスタ
(24)の内容を上記バイト選択回路(22′)でバイト単
位に選択,合成してキャッシュメモリ(20)にライトす
ることを特徴とする特許請求の範囲第1項に記載のキャ
ッシュメモリ制御回路。
2. The content of the write data buffer register (21) is cached in the cache memory (20) when the cache miss occurs.
A write data buffer register (21) for holding the write data, a move-in data register (24) for holding the move-in data from the main storage device (MS) (3), and A byte mark register (23) that holds a byte mark that indicates the validity / invalidity of write data in byte units, and the write data buffer register (21) and move-in corresponding to the contents of the byte mark register (23). A data path (22a) for writing the output of the byte selection circuit (22 ') into the cache memory (20), and a circuit (22') for selecting the contents of the data register (24) in byte units. When the write data from the instruction processing unit (1) is held in the write data buffer register (21) and the byte mark is held in the byte mark register (23), To complete the store access operation decrees processing apparatus (1), the cache memory of the move-in data in response to a cache miss has occurred in response to the store access operation (2
During the registration operation to 0), the contents of the write data buffer register (21) and the move-in data register (24) are autonomously selected and combined in byte units by the byte selection circuit (22 '). The cache memory control circuit according to claim 1, wherein writing is performed in the cache memory (20).
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 JPS63311548A (en) 1988-12-20
JPH0677240B2 true 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)

Families Citing this family (2)

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

Also Published As

Publication number Publication date
JPS63311548A (en) 1988-12-20

Similar Documents

Publication Publication Date Title
CA1124888A (en) Integrated multilevel storage hierarchy for a data processing system with improved channel to memory write capability
US5283886A (en) Multiprocessor cache system having three states for generating invalidating signals upon write accesses
US5353426A (en) Cache miss buffer adapted to satisfy read requests to portions of a cache fill in progress without waiting for the cache fill to complete
EP0019358B1 (en) Hierarchical data storage system
JPH0863393A (en) Write method of new word segment due to generation of cache mistake at inside of multilevel cache
US5530833A (en) Apparatus and method for updating LRU pointer in a controller for two-way set associative cache
US4774687A (en) Advanced store-in system for a hierarchy memory device
EP0173909B1 (en) Look-aside buffer least recently used marker controller
JPH04336641A (en) Data cache and method for use in processing system
JPH0677240B2 (en) Cache memory control circuit
JP2580263B2 (en) Buffer storage device
JPH05282208A (en) Cache memory control system
JPH06243037A (en) Data look-ahead device
JPS61208153A (en) Page history memory device
JP3190661B2 (en) Information processing system
EP0400851A2 (en) Efficient cache utilizing a store buffer
JPH02259945A (en) Storing processing system
KR970004520B1 (en) High speed memory control method and apparatus
JPS5818710B2 (en) memory system
JPH09128296A (en) Data processor
JP2636564B2 (en) Move-in control method for cache memory
JPH0526216B2 (en)
JPH0332821B2 (en)
JPH0728701A (en) Computer system
JPH0535589A (en) Cache memory device

Legal Events

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