[go: up one dir, main page]

JPH0683707A - Cache memory control device - Google Patents

Cache memory control device

Info

Publication number
JPH0683707A
JPH0683707A JP4128424A JP12842492A JPH0683707A JP H0683707 A JPH0683707 A JP H0683707A JP 4128424 A JP4128424 A JP 4128424A JP 12842492 A JP12842492 A JP 12842492A JP H0683707 A JPH0683707 A JP H0683707A
Authority
JP
Japan
Prior art keywords
address
data
way
sweep
cache memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4128424A
Other languages
Japanese (ja)
Inventor
Kazuya Matsumoto
和也 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP4128424A priority Critical patent/JPH0683707A/en
Publication of JPH0683707A publication Critical patent/JPH0683707A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To omit the index of address arrays at the time of sweeping from a storing buffer to a cache memory and to improve the performance of this cache memory control device. CONSTITUTION:A column address comparing part 1 and a tag address comparing part 2 respectively compare a column address part and a tag address part in block loading data with a column address part and a tag address part in a storing buffer to compare the coincidence of respective parts, and at the time of registering an address in the storing buffer, the compared result of column addresses and that of tag addresses in a corresponding entry are forcedly treated as coincidence. A writing way comparing part 3 compares the writing way of block loading data to the cache memory with the each sweeping way stored in a sweeping way in the storing buffer to check their coincidence. In accordance with the compared result, a sweeping way control means 4 updates a sweeping way from the storing buffer to the cache memory.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、計算機システムのキャ
ッシュメモリ制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory control device for a computer system.

【0002】[0002]

【従来の技術】キャッシュメモリを備えてパイプライン
処理を採用した計算機システムの従来のキャッシュメモ
リ制御装置は、ストア命令の実行の際に、命令の実行前
にストアアドレスが求められるのに対し、命令の実行後
にストアデータが求められる。したがって、ストア命令
のストアアドレスが求められるときに、アドレスアレイ
によりキャッシュメモリのどのウェイにストアデータを
書き込むかを索引したのでは、アドレスアレイの索引と
ストアデータのキャッシュメモリへの書き込みとの間に
時間的なずれが生じ、その間に行われた他のプロセッサ
から主記憶への書き込みによるフラッシュ処理及びブロ
ックロードにより、上記の索引結果が誤って採用されて
しまうことがある。すなわち、この場合には、アドレス
アレイの索引によりヒットしたウェイのデータが、その
後のフラッシュ処理により無効化された後に、ブロック
ロードにより他のウェイに読み込まれたり、あるいは、
ブロックロードにより追い出され、他のタグアドレスを
持つデータにリプレースされて、矛盾が生じてしまう。
2. Description of the Related Art In a conventional cache memory control device of a computer system having a cache memory and adopting pipeline processing, when a store instruction is executed, a store address is obtained before the instruction is executed, Store data is requested after execution of. Therefore, when the store address of the store instruction is calculated, the way in the cache memory where the store data is written is indexed by the address array. There is a time lag, and the above-mentioned index result may be erroneously adopted due to a flush process and a block load by writing from another processor to the main memory during that time. That is, in this case, the data of the way hit by the index of the address array is invalidated by the subsequent flash processing and then read into another way by block load, or
It will be evicted by block load and replaced with data with another tag address, resulting in inconsistency.

【0003】従って、従来のキャッシュメモリ制御装置
は、ストアバッファからキャッシュメモリへのデータ掃
き出し時に、アドレスアレイを索引していた。
Therefore, the conventional cache memory control device indexes the address array at the time of sweeping out data from the store buffer to the cache memory.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のキャッ
シュメモリ制御装置は、ストアバッファからキャッシュ
メモリへのデータ掃き出し時にアドレスアレイを索引し
ていたが、リクエスト送出部からのリード要求によるア
ドレスアレイの索引と、ストアバッファからの掃き出し
によるアドレスアレイの索引とが競合するために、リー
ド要求の来ていないときにストアバッファからの掃き出
しを行っていた。
In the conventional cache memory control device described above, the address array was indexed when the data was flushed from the store buffer to the cache memory. However, the address array indexed by the read request from the request sending unit. And the index of the address array due to the sweep from the store buffer conflicts, the sweep from the store buffer was performed when the read request did not come.

【0005】しかし、オペランドキャッシュ側は、リク
エスト送出部からライト要求が来るために、ストアバッ
ファからの掃き出しを行うタイミングを確保する事がで
きるが、命令キャッシュ側は、ライト要求が来ないで、
命令フェッチの要求が連続してだされるために、通常状
態では、リード要求によるアドレスアレイのアクセスが
行われないタイミングがほとんど生じない。したがっ
て、ストアバッファにストアリクエストがすぐにたまっ
てしまい、命令フェッチが止まるまで、オペランド側の
リクエストが止まってしまうために、性能が低下すると
いう問題点があった。
However, since the write request comes from the request sending unit on the operand cache side, the timing for flushing from the store buffer can be secured, but the instruction cache side does not receive the write request.
In the normal state, there is almost no timing at which the address array is not accessed by the read request because the instruction fetch requests are issued successively. Therefore, there is a problem that the store request is accumulated in the store buffer immediately, and the request on the operand side is stopped until the instruction fetch is stopped, so that the performance is deteriorated.

【0006】この解決策として、ストアバッファへのア
ドレスの登録時に、同時にアドレスアレイの索引結果を
記憶しておき、ブロックロードを起動する際に、読みだ
しデータのカラムアドレス部,タグアドレス部,掃き出
しウェイのそれぞれを、ストアバッファ内に格納されて
いる各アドレスのカラムアドレス部,タグアドレス部,
掃き出しウェイに比較し、それぞれの比較結果に応じ
て、ストアバッファ内の掃き出しウェイを更新すること
により、ストアバッファからキャッシュメモリへの掃き
出し時に、アドレスアレイの索引を行わないようにする
方法が提案されているが、キャッシュミスを起こしたリ
クエストがRead&Writeコマンドであった場合
に、キャッシュミス判明時に、まだ、ストアバッファに
そのリクエストのアドレスが格納されていないために、
このタイミングでは、アドレスの比較を行う事ができな
いので、この方法を実現するためには、アドレス比較の
タイミングを遅らせるための多くのハードウェアを追加
しなければならないとともに遅延時間が増大して実現が
困難であるという問題点があった。
As a solution to this, at the time of registering the address in the store buffer, the index result of the address array is stored at the same time, and when the block load is activated, the column address part, the tag address part, and the sweep out of the read data are executed. Each way is assigned a column address part, a tag address part, and an address stored in the store buffer.
A method has been proposed in which the address array is not indexed when the store buffer is flushed to the cache memory by comparing it to the sweep way and updating the sweep way in the store buffer according to each comparison result. However, if the request that caused the cache miss was a Read & Write command, the address of the request was not yet stored in the store buffer when the cache miss was found,
Since it is not possible to compare addresses at this timing, in order to implement this method, it is necessary to add a lot of hardware for delaying the timing of address comparison, and at the same time, the delay time increases. There was a problem that it was difficult.

【0007】[0007]

【課題を解決するための手段】第1の発明のキャッシュ
メモリ制御装置は、主記憶をアドレスの下位部であるカ
ラムアドレスにより、いくつかのカラムに分け、各カラ
ムアドレスごとに最大n個(n≧1)のデータのコピー
を格納するnウェイセットアソシアティブ方式のキャッ
シュメモリ内のデータアレイと、データ要求部が必要と
するデータが前記データアレイ上にあるか否かを調べる
ために、前記データアレイ上に存在するデータのカラム
アドレスに対応してアドレス上位部であるタグアドレス
および該タグアドレスが有効か否かを示すためのバリッ
ドビットの対を格納する前記キャッシュメモリ内のアド
レスアレイと、演算実行部から前記主記憶への掃き出し
データおよび掃き出しアドレス並びに前記キャッシュメ
モリへの掃き出しウェイの組を複数個保持するストアバ
ッファとを備えるキャッシュメモリ制御装置において、
前記データ要求部から要求された読みだしデータが前記
キャッシュメモリに存在せず、前記主記憶からのブロッ
クロードを起動する際に、該読みだしデータのカラムア
ドレス部および前記ストアバッファの各カラムアドレス
部が一致するか否かを比較し、前記ストアバッファへの
アドレス登録時に、対応するエントリーのカラムアドレ
スの比較結果を強制的に一致扱いにするカラムアドレス
比較手段と、該読みだしデータのタグアドレス部および
前記ストアバッファの各タグアドレス部が一致するか否
かを比較し、前記ストアバッファへのアドレス登録時
に、対応するエントリーのタグアドレスの比較結果を強
制的に一致扱いにするタグアドレス比較手段と、該読み
だしデータの前記キャッシュエモリへの書き込みウェイ
および前記ストアバッファの掃き出しウェイ部に格納さ
れている各掃き出しウェイが一致するか否かを比較する
書き込みウェイ比較手段と、前記カラムアドレス比較手
段および前記タグアドレス比較手段の双方の比較結果が
一致を示す掃き出しデータが検出された場合には、対応
する掃き出しウェイを該読みだしデータの前記キャッシ
ュメモリへの書き込みウェイに変更し、前記カラムアド
レス比較手段および前記書き込みウェイ比較手段の比較
結果が共に一致を示し、前記タグアドレス比較手段の比
較結果が不一致を示す掃き出しデータが検出された場合
には、該掃き出しデータの前記キャッシュメモリへの掃
き出しを無効にする掃き出しウェイ制御手段と、を有し
て構成されている。
According to a first aspect of the present invention, a cache memory control device divides a main memory into several columns according to a column address which is a lower part of an address, and a maximum of n (n ≧ 1) a data array in an n-way set associative cache memory for storing a copy of the data, and the data array for checking whether or not the data required by the data request unit is on the data array. An address array in the cache memory for storing a tag address which is an upper address part corresponding to a column address of data existing above and a pair of valid bits for indicating whether the tag address is valid, and an operation execution Data to the main memory and the sweep address and sweep to the cache memory In the cache memory control device and a store buffer for a plurality holding a set of E i,
When the read data requested by the data request unit does not exist in the cache memory and the block load from the main memory is activated, the column address part of the read data and each column address part of the store buffer Column address comparing means for forcibly treating the comparison result of the column address of the corresponding entry as a match when the address is registered in the store buffer, and the tag address portion of the read data. And a tag address comparing means for comparing whether or not the respective tag address portions of the store buffer match, and forcibly treating the comparison result of the tag addresses of the corresponding entries when the addresses are registered in the store buffer. A write way of the read data to the cache memory and a store way. Sweep data indicating that the comparison results of both the write way comparison means and the column address comparison means and the tag address comparison means for comparing whether the respective sweep ways stored in the sweep way part of the memory match or not Is detected, the corresponding sweep way is changed to a write way for writing the read data into the cache memory, and the comparison results of the column address comparing means and the write way comparing means both indicate a match, and When sweep-out data indicating that the comparison result of the tag address comparing means does not match is detected, sweep-out way control means for invalidating the sweep-out of the sweep-out data to the cache memory is provided.

【0008】また、第2の発明のキャッシュメモリ制御
装置は、主記憶をアドレスの下位部であるカラムアドレ
スにより、いくつかのカラムに分け、各カラムアドレス
ごとに最大n個(n≧1)のデータのコピーを格納する
nウェイセットアソシアティブ方式のキャッシュメモリ
内のデータアレイと、データ要求部が必要とするデータ
が前記データアレイ上にあるか否かを調べるために、前
記データアレイ上に存在するデータのカラムアドレスに
対応してアドレス上位部であるタグアドレスおよび該タ
グアドレスが有効か否かを示すためのバリッドビットの
対を格納する前記キャッシュメモリ内のアドレスアレイ
と、演算実行部から前記主記憶への掃き出しデータおよ
び掃き出しアドレス並びに前記キャッシュメモリへの掃
き出しウェイの組を複数個保持するストアバッファとを
備えるキャッシュメモリ制御装置において、前記データ
要求部から要求された読みだしデータが前記キャッシュ
メモリに存在せず、前記主記憶からのブロックロードを
起動する際に、該読みだしデータのカラムアドレス部お
よび前記ストアバッファの各カラムアドレス部が一致す
るか否かを比較するカラムアドレス比較手段と、該読み
だしデータのタグアドレス部および前記ストアバッファ
の各タグアドレス部が一致するか否かを比較するタグア
ドレス比較手段と、該読みだしデータの前記キャッシュ
メモリへの書き込みウェイおよび前記ストアバッファの
掃き出しウェイ部に格納されている各掃き出しウェイが
一致するか否かを比較する書き込みウェイ比較手段と、
キャッシュミスを起こしたリクエストがRead&Wr
iteコマンドであることを示すフラグを格納するスト
アコマンド保持手段と、前記ストアコマンド保持手段が
Read&Writeコマンドであることを示している
場合には、対応する掃き出しウェイを該読みだしデータ
の前記キャッシュメモリへの書き込みウェイに変更し、
Read&Writeコマンドでないことを示している
場合には、前記カラムアドレス比較手段および前記タグ
アドレス比較手段の双方の比較結果が一致を示す掃き出
しデータが検出された場合に、対応する掃き出しウェイ
を該読みだしデータの前記キャッシュメモリへの書き込
みウェイに変更し、前記カラムアドレス比較手段および
前記書き込みウェイ比較手段の比較結果が共に一致を示
し、前記タグアドレス比較手段の比較結果が不一致を示
す掃き出しデータが検出された場合に、該掃き出しデー
タの前記キャッシュメモリへの掃き出しを無効にする掃
き出しウェイ制御手段と、を備えて構成されている。
In the cache memory control device of the second invention, the main memory is divided into several columns according to the column address which is the lower part of the address, and a maximum of n (n ≧ 1) for each column address. A data array in an n-way set associative cache memory that stores a copy of the data, and a data array that exists on the data array to check whether the data required by the data request unit is on the data array. An address array in the cache memory for storing a tag address which is an upper address part corresponding to a column address of data and a pair of valid bits for indicating whether the tag address is valid, Set of sweep data and sweep address to memory and flush way to the cache memory In a cache memory control device including a plurality of store buffers, the read data requested by the data request unit does not exist in the cache memory, and when the block load from the main memory is activated, the read data is read. The column address comparison means for comparing whether the column address part of the read data and each column address part of the store buffer match, and the tag address part of the read data and each tag address part of the store buffer match. Tag address comparing means for comparing whether or not the writing way of the read data to the cache memory and writing for comparing whether or not each sweeping way stored in the sweeping way section of the store buffer matches Way comparison means,
The request that caused the cache miss is Read & Wr
store command holding means for storing a flag indicating that the read command is a read command, and if the store command holding means indicates a read & write command, the corresponding sweep way is stored in the cache memory of the read data. Change to the writing way of
When it is indicated that the command is not a Read & Write command, when sweep data indicating that the comparison results of both the column address comparison unit and the tag address comparison unit match is detected, the corresponding sweep way is read out. The write way to the cache memory is changed to, and the sweep-out data indicating that the comparison results of the column address comparison means and the write way comparison means both match and the comparison result of the tag address comparison means does not match are detected. In this case, a sweep way control means for invalidating sweeping of the sweep data to the cache memory is provided.

【0009】[0009]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。図1は、第1の発明のキャッシュメモリ制
御装置の一実施例を示すブロック図である。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a cache memory control device of the first invention.

【0010】図1のキャッシュメモリ制御装置は、アド
レスの下位部であるカラムアドレスにより、主記憶をい
くつかのカラムに分け、各カラムアドレスごとに最大n
個(n≧1)のデータのコピーを格納するnウェイセッ
トアソシアティブ方式のキャッシュメモリ内のデータア
レイと、データ要求部が必要とするデータが該データア
レイ上にあるか否かを調べるために、該データアレイ上
に存在するデータのカラムアドレスに対応してアドレス
上位部であるタグアドレスおよび該タグアドレスが有効
か否かを示すためのバリッドビットの対を格納する該キ
ャッシュメモリ内のアドレスアレイと、演算実行部から
主記憶への掃き出しデータおよび掃き出しアドレス並び
に該キャッシュメモリ内のアドレスアレイと、演算実行
部から主記憶への掃き出しデータおよび掃き出しアドレ
ス並びに該キャッシュメモリへの掃き出しウェイの組を
複数個保持するストアバッファとを備えた計算機システ
ムを制御している。
The cache memory control device of FIG. 1 divides the main memory into a number of columns according to the column address which is the lower part of the address, and the maximum n for each column address.
In order to check whether or not the data array in the n-way set associative cache memory that stores a copy of (n ≧ 1) pieces of data, and whether the data required by the data request unit is on the data array, An address array in the cache memory for storing a tag address which is an address upper part corresponding to a column address of data existing on the data array and a pair of valid bits for indicating whether or not the tag address is valid; , A plurality of sets of sweep data and sweep addresses from the execution unit to the main memory and an address array in the cache memory, and sweep data and sweep addresses from the execution unit to the main memory and sweep ways to the cache memory Controls a computer system with a store buffer to hold

【0011】図1のキャッシュ制御装置は、カラムアド
レス比較部1,タグアドレス比較部2,書き込みウェイ
比較部3,掃き出しウェイ制御部4を有している。
The cache control device of FIG. 1 has a column address comparison unit 1, a tag address comparison unit 2, a write way comparison unit 3, and a sweep way control unit 4.

【0012】カラムアドレス比較部1は、アドレスレジ
スタ5とストアアドレスレジスタ6,7とのカラムアド
レス部をそれぞれキャッシュアクセスステージで比較し
て一致が検出された場合に、または、ストアアドレスレ
ジスタ6,7にストアアドレスが格納される場合に、対
応するF/F(フリップフロップ)に「1」を立て、掃
き出しウェイ制御部4に対して、どちらのストアアドレ
スレジスタでカラムアドレスの一致が検出されたかを報
告する。
The column address comparing section 1 compares the column address sections of the address register 5 and the store address registers 6 and 7 at the cache access stages, respectively, and when a match is detected, or the store address registers 6 and 7 are detected. When the store address is stored in, the corresponding F / F (flip-flop) is set to “1” and the sweep way control unit 4 is instructed which store address register has detected the column address match. To report.

【0013】タグアドレス比較部2は、アドレスレジス
タ5とストアアドレスレジスタ6,7とのタグアドレス
部をそれぞれキャッシュアクセスステージで比較して一
致が検出された場合に、または、ストアアドレスレジス
タ6,7にストアアドレスが格納される場合に、対応す
るF/F(フリップフロップ)に「1」を立て、掃き出
しウェイ制御部4に対して、どちらのストアアドレスレ
ジスタでタグアドレスの一致が検出されたかを報告す
る。
The tag address comparing section 2 compares the tag address sections of the address register 5 and the store address registers 6 and 7 at the cache access stages, respectively, and when a match is detected, or when the store address registers 6 and 7 are detected. When the store address is stored in, the corresponding F / F (flip-flop) is set to “1” and the sweep way control unit 4 is instructed which store address register has detected the match of the tag address. To report.

【0014】アドレスレジスタ5は、アドレス送出部か
ら送られるアドレスの受けレジスタであり、このアドレ
スレジスタ5の内容がストアアドレスレジスタ6,7の
内、アドレスライトポインタ8により、指示された側に
書き込まれ、アドレスリードポインタ9により、指示さ
れた側の内容がセレクタ10により選択されて、キャッ
シュメモリと主記憶とに送られる。
The address register 5 is a register for receiving the address sent from the address sending unit, and the content of the address register 5 is written to the side designated by the address write pointer 8 among the store address registers 6 and 7. The content on the designated side is selected by the selector 10 by the address read pointer 9 and sent to the cache memory and the main memory.

【0015】書き込みウェイ比較部3は、リプレース情
報作成回路23からおくられる情報と、ストアウェイレ
ジスタ16,17に格納されている内容とをそれぞれ比
較し、掃き出しウェイ制御部4に対してどちらのストア
ウェイレジスタ16あるいは17で一致が検出されたか
を報告する。
The write way comparing section 3 compares the information sent from the replace information creating circuit 23 with the contents stored in the store way registers 16 and 17, respectively, and the store way register 4 and the store way register section 3 are compared. Report whether a match was detected in way register 16 or 17.

【0016】ストアデータレジスタ11,12は、デー
タ送出部から送られてくるデータを格納するレジスタで
あり、データライトポインタ13により選択された側に
データ早出部からデータを書き込まれ、データリードポ
インタ14により指示された側の内容がセレクタ15に
より選択されて、キャッシュメモリと主記憶とへ送出さ
れる。
The store data registers 11 and 12 are registers for storing the data sent from the data sending unit, and the data read pointer 14 writes the data to the side selected by the data write pointer 13 from the data early output unit. The contents on the side instructed by are selected by the selector 15 and sent to the cache memory and the main memory.

【0017】ストアウェイレジスタ16,17は、セレ
クタ15により選択されたデータをキャッシュメモリの
どのウェイに書き込むかの情報を格納するレジスタであ
り、書き込みウェイに対応するビットに「1」が立てら
れ、それぞれクリア信号26,27によりクリアされ
る。又、アドレスライトポインタ8による書き込み指示
と掃き出しウェイ制御部4による書き込み指示とのオア
ゲート24,25によるオア出力により、セレクタ28
の出力をどちらのストアウェイレジスタ16あるいは1
7に書き込むかが指示され、アドレスリードポイタ9に
より指示される側の内容がセレクタ18により選択され
てキャッシュメモリに送出される。
The storeway registers 16 and 17 are registers for storing information on which way of the cache memory the data selected by the selector 15 should be written, and "1" is set to the bit corresponding to the write way. It is cleared by clear signals 26 and 27, respectively. In addition, the OR gate 24 or 25 outputs the OR instruction of the write instruction by the address write pointer 8 and the write instruction by the sweep way control unit 4, and the selector 28
Output of either storeway register 16 or 1
It is instructed whether or not to write to 7, and the contents on the side instructed by the address read pointer 9 are selected by the selector 18 and sent to the cache memory.

【0018】LRU21は、カラムアドレスごとに、キ
ャッシュメモリのどのウェイのデータが最近まで最もア
クセスされなかったかの情報を記憶しており、キャッシ
ュミスにより、ブロックロードをする際に、そのカラム
アドレスに対応するLRU21の内容がLRUリードレ
ジスタ22に読み出され、リプレース情報作成回路23
により、ブロックロードされたデータをキャッシュメモ
リのどのウェイに書き込むかの情報が作成される。セレ
クタ19は、キャッシュメモリにヒットした場合には、
ヒットウェイ送出部から送られる情報を、キャッシュミ
スの場合には、リプレース情報作成回路23から送られ
る情報を選択する。更新回路20は、このセレクタ19
により選択された情報から、LRU21の更新情報を作
成し、この情報により、LRU21が更新される。
The LRU 21 stores, for each column address, information as to which way data in the cache memory has not been accessed until recently, and corresponds to the column address when a block is loaded due to a cache miss. The contents of the LRU 21 are read into the LRU read register 22, and the replacement information creation circuit 23
This creates information on which way of the cache memory the block-loaded data should be written. When the selector 19 hits the cache memory,
The information sent from the hit way sending section is selected, and in the case of a cache miss, the information sent from the replacement information creating circuit 23 is selected. The update circuit 20 uses the selector 19
Update information of the LRU 21 is created from the information selected by, and the LRU 21 is updated by this information.

【0019】図2は、ブロックロード時に、カラムアド
レス比較部1,タグアドレス比較部2,書き込みウェイ
比較部3の各比較結果により、掃き出しウェイ制御部4
がどのように動作するかの一例を示す図である。
FIG. 2 shows a sweep way control unit 4 according to the comparison results of the column address comparison unit 1, the tag address comparison unit 2, and the write way comparison unit 3 at the time of block loading.
It is a figure which shows an example of how it operates.

【0020】図2に示すように、ケース(1)は、デー
タ要求部からライト要求が出された時には、図示せぬア
ドレスアレイでキャッシュミスとなったが、その後に、
データ要求部から同じブロックに対してリード要求がだ
されてブロックロードが行われた場合に、あるいは、ラ
イト要求が出された時には、図示せぬアドレスアレイで
キャッシュヒットしたが、フラッシュされてしまい、そ
の後に、同じブロックがブロックロードされた場合にお
こる。この場合には、掃き出しウェイ制御部4は、セレ
クタ28を、リプレース情報作成回路23に切り替え
て、その内容をカラムアドレス比較部1およびタグアド
レス比較部2の双方で一致が検出された掃き出しアドレ
スに対応するストアウェイレジスタ16あるいは17に
書き込む。
As shown in FIG. 2, in the case (1), when a write request is issued from the data request unit, a cache miss occurs in an address array (not shown).
When a block request is made by issuing a read request to the same block from the data request section, or when a write request is issued, a cache hit occurs in an address array (not shown), but it is flushed. After that, when the same block is block-loaded, this happens. In this case, the sweep-out way control unit 4 switches the selector 28 to the replacement information creation circuit 23, and sets the contents to the sweep-out address for which a match is detected by both the column address comparison unit 1 and the tag address comparison unit 2. Write to the corresponding storeway register 16 or 17.

【0021】ケース(2)は、データ要求部からライト
要求が出された時には、図示せぬアドレスアレイでキャ
ッシュヒットしたが、その後のブロックロードによりリ
プレースされた場合におこる。この場合には、カラムア
ドレス比較部1と、書き込みウェイ比較部3とで一致が
検出され、タグアドレス比較部2により不一致が検出さ
れた掃き出しアドレスと掃き出しウェイとの組に対応す
るストアウェイレジスタ16あるいは17の内容がクリ
アされる。
Case (2) occurs when a write request is issued from the data request unit, a cache hit occurs in an address array (not shown), but the block is replaced by a subsequent block load. In this case, the store way register 16 corresponding to the combination of the sweep-out address and the sweep-out way in which the column address comparison unit 1 and the write way comparison unit 3 detect a match and the tag address comparison unit 2 detects a mismatch. Alternatively, the contents of 17 are cleared.

【0022】ケース(3)は、ストアバッファからキャ
ッシュメモリへの掃き出しウェイと、ブロックロードさ
れたデータのキャッシュメモリへの書き込みウェイとが
異なるので、掃き出しウェイ制御部4は、何も行わな
い。
In case (3), the sweep way from the store buffer to the cache memory and the write way of the block-loaded data to the cache memory are different, so the sweep way control unit 4 does nothing.

【0023】又、ケース(4)は、ストアパッファから
キャッシュメモリへの掃き出しカラムと、ブロックロー
ドされたデータのキャッシュメモリへの書き込みカラム
とが異なるので、この場合にも、掃き出しウェイ制御部
4は、何も行わない。
In case (4), the sweep column from the store buffer to the cache memory and the write column of the block-loaded data to the cache memory are different. , Do nothing.

【0024】図3は、第2の発明のキャッシュメモリ制
御装置の一実施例を示すブロック図である。
FIG. 3 is a block diagram showing an embodiment of the cache memory control device of the second invention.

【0025】図3のキャッシュメモリ制御装置は、カラ
ムアドレス比較部31,タグアドレス比較部32,スト
アコマンド保持部33,書き込みウェイ比較部3,掃き
出しウェイ制御部34を有している。
The cache memory control device of FIG. 3 has a column address comparison unit 31, a tag address comparison unit 32, a store command holding unit 33, a write way comparison unit 3, and a flush way control unit 34.

【0026】カラムアドレス比較部31は、アドレスレ
ジスタ5とストアアドレスレジスタ6,7とのカラムア
ドレス部をそれぞれキャッシュアクセスステージで比較
して一致が検出された場合に、対応するF/F(フリッ
プフロップ)に「1」を立て、掃き出しウェイ制御部3
4に対してどちらのストアアドレスレジスタ16あるい
は17でカラムアドレスの一致が検出されたかを報告す
る。
The column address comparing section 31 compares the column address sections of the address register 5 and the store address registers 6 and 7 at the cache access stages, and when a match is detected, the corresponding F / F (flip-flop) is set. ) Is set to “1”, and the sweep way control unit 3
4 which of the store address registers 16 or 17 has detected the column address match.

【0027】タグアドレス比較部32は、アドレスレジ
スタ5とストアアドレスレジスタ6,7とのタグアドレ
ス部をそれぞれキャッシュアクセスステージで比較して
一致が検出された場合に、F/F(フリップフロップ)
に「1」を立て、掃き出しウェイ制御部34に対してど
ちらのストアアドレスレジスタでタグアドレスの一致が
検出されたかを報告する。
The tag address comparing section 32 compares the tag address sections of the address register 5 and the store address registers 6 and 7 at the cache access stages, respectively, and when a match is detected, an F / F (flip-flop) is used.
Is set to "1" and the sweep way control unit 34 is notified to which store address register the match of the tag address is detected.

【0028】ストアコマンド保持部33は、ストアアド
レスレジスタ6,7へのストアアドレスの登録時に、R
ead&Writeコマンドでキャッシュミスが起きた
なら、対応するF/F(フリップフロップ)に「1」を
立て、掃き出しウェイ制御部34に報告し、ストアウェ
イ更新時にリセットされる。
The store command holding unit 33 stores the R address when registering the store address in the store address registers 6 and 7.
If a cache miss occurs in the ead & Write command, "1" is set to the corresponding F / F (flip-flop), the flush way control unit 34 is notified, and the store way is reset.

【0029】図4は、ブロックロード時に、カラムアド
レス比較部31,タグアドレス比較部32,ストアコマ
ンド保持部33,書き込みウェイ比較部3の各比較結果
により、掃き出しウェイ制御部34がどのように動作す
るのかの一例を示す図である。
FIG. 4 shows how the sweep way control unit 34 operates according to the comparison results of the column address comparison unit 31, the tag address comparison unit 32, the store command holding unit 33, and the write way comparison unit 3 at the time of block loading. It is a figure which shows an example of what to do.

【0030】図4に示すように、ケース(1),〜ケー
ス(4)は、図2の場合と同様の動作をする。そして、
ケース(5)は、Read&Writeコマンドでキャ
ッシュミスが起きた場合であり、ストアコマンド保持部
33に「1」が立っているストアが、キャッシュミスを
起こしたリクエストと同一のリクエストであるので、セ
レクタ28を、リプレース情報作成回路23に切り替え
て、その内容を、対応するストアウェイレジスタ16あ
るいは17に書き込む。
As shown in FIG. 4, the cases (1) to (4) operate similarly to the case of FIG. And
Case (5) is a case where a cache miss has occurred in the Read & Write command, and the store for which "1" is set in the store command holding unit 33 is the same request as the request that caused the cache miss, so the selector 28 To the replacement information creating circuit 23, and the contents are written in the corresponding storeway register 16 or 17.

【0031】[0031]

【発明の効果】以上説明したように、本発明のキャッシ
ュメモリ制御装置は、ブロックロードするデータのカラ
ムアドレス部,タグアドレス部,キャッシュメモリへの
書き込みウェイをそれぞれストアバッファのカラムアド
レス部,タグアドレス部,掃き出しウェイ部と比較し、
一致を検出して、この結果を使ってストアバッファの掃
き出しウェイ部を更新する機能に、Read&Writ
eコマンドでキャッシュミスをした場合に、対応するス
トアウェイレジスタの内容をブロックロードレベルに更
新する機能を追加する事により、ハードウェアや遅延時
間を増大させること無く、ストアバッファからキャッシ
ュメモリへの掃き出し時におけるアドレスアレイの索引
を省略する事ができ、性能を上げることができるという
効果を有している。
As described above, according to the cache memory control device of the present invention, the column address part of the data to be block-loaded, the tag address part, and the write way to the cache memory are stored in the column address part of the store buffer and the tag address, respectively. Section, compared to the sweep way section,
The function to detect a match and use this result to update the flush way part of the store buffer
When a cache miss occurs with the e command, the function to update the contents of the corresponding storeway register to the block load level is added, so that the store buffer can be flushed to the cache memory without increasing the hardware or delay time. It is possible to omit the index of the address array at the time, and it is possible to improve the performance.

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

【図1】第1の発明のキャッシュメモリ制御装置の一実
施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a cache memory control device of the first invention.

【図2】ブロックロード時における掃き出しウェイ制御
部4の動作の一例を示す図である。
FIG. 2 is a diagram showing an example of an operation of a sweep way control unit 4 at the time of block loading.

【図3】第2の発明のキャッシュメモリ制御装置の一実
施例を示すブロック図である。
FIG. 3 is a block diagram showing an embodiment of a cache memory control device of the second invention.

【図4】ブロックロード時における掃き出しウェイ制御
部34の動作の一例を示す図である。
FIG. 4 is a diagram showing an example of an operation of a sweep way control unit 34 at the time of block loading.

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

1,31 カラムアドレス比較部 2,32 タグアドレス比較部 3 書き込みウェイ比較部 4,34 掃き出しウェイ制御部 5 アドレスレジスタ 6,7 ストアアドレスレジスタ 8 アドレスライトポインタ 9 アドレスリードポインタ 10,15,18,19,28 セレクタ 11,12 ストアデータレジスタ 13 データライトポインタ 14 データリードポインタ 16,17 ストアウェイレジスタ 20 更新回路 21 LRU 22 LRUリードレジスタ 23 リプレース情報作成回路 24,25 オアゲート 26,27 クリア信号 33 ストアコマンド保持部 1,31 Column address comparison unit 2,32 Tag address comparison unit 3 Write way comparison unit 4,34 Sweep way control unit 5 Address register 6,7 Store address register 8 Address write pointer 9 Address read pointer 10, 15, 18, 19, , 28 Selector 11, 12 Store data register 13 Data write pointer 14 Data read pointer 16, 17 Store way register 20 Update circuit 21 LRU 22 LRU read register 23 Replace information creation circuit 24, 25 OR gate 26, 27 Clear signal 33 Store command hold Department

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 主記憶をアドレスの下位部であるカラム
アドレスにより、いくつかのカラムに分け、各カラムア
ドレスごとに最大n個(n≧1)のデータのコピーを格
納するnウェイセットアソシアティブ方式のキャッシュ
メモリ内のデータアレイと、 データ要求部が必要とするデータが前記データアレイ上
にあるか否かを調べるために、前記データアレイ上に存
在するデータのカラムアドレスに対応してアドレス上位
部であるタグアドレスおよび該タグアドレスが有効か否
かを示すためのバリッドビットの対を格納する前記キャ
ッシュメモリ内のアドレスアレイと、 演算実行部から前記主記憶への掃き出しデータおよび掃
き出しアドレス並びに前記キャッシュメモリへの掃き出
しウェイの組を複数個保持するストアバッファとを備え
るキャッシュメモリ制御装置において、 前記データ要求部から要求された読みだしデータが前記
キャッシュメモリに存在せず、前記主記憶からのブロッ
クロードを起動する際に、該読みだしデータのカラムア
ドレス部および前記ストアバッファの各カラムアドレス
部が一致するか否かを比較し、前記ストアバッファへの
アドレス登録時に、対応するエントリーのカラムアドレ
スの比較結果を強制的に一致扱いにするカラムアドレス
比較手段と、 該読みだしデータのタグアドレス部および前記ストアバ
ッファの各タグアドレス部が一致するか否かを比較し、
前記ストアバッファへのアドレス登録時に、対応するエ
ントリーのタグアドレスの比較結果を強制的に一致扱い
にするタグアドレス比較手段と、 該読みだしデータの前記キャッシュエモリへの書き込み
ウェイおよび前記ストアバッファの掃き出しウェイ部に
格納されている各掃き出しウェイが一致するか否かを比
較する書き込みウェイ比較手段と、 前記カラムアドレス比較手段および前記タグアドレス比
較手段の双方の比較結果が一致を示す掃き出しデータが
検出された場合には、対応する掃き出しウェイを該読み
だしデータの前記キャッシュメモリへの書き込みウェイ
に変更し、前記カラムアドレス比較手段および前記書き
込みウェイ比較手段の比較結果が共に一致を示し、前記
タグアドレス比較手段の比較結果が不一致を示す掃き出
しデータが検出された場合には、該掃き出しデータの前
記キャッシュメモリへの掃き出しを無効にする掃き出し
ウェイ制御手段と、 を有することを特徴とするキャッシュメモリ制御装置。
1. An n-way set associative system in which a main memory is divided into several columns by a column address which is a lower part of an address, and a maximum of n (n ≧ 1) copies of data are stored for each column address. In order to check whether the data array in the cache memory and the data required by the data requesting unit are on the data array, the address upper part corresponding to the column address of the data existing on the data array. An address array in the cache memory for storing a tag address and a pair of valid bits for indicating whether or not the tag address is valid, and sweep data and a sweep address from the operation executing unit to the main memory, and the cache. A cache having a store buffer that holds a plurality of sets of sweep ways to the memory. In the cache memory control device, when the read data requested by the data request unit does not exist in the cache memory and the block load from the main memory is activated, the column address part of the read data and the store buffer Column address comparing means for forcibly treating the comparison result of the column address of the corresponding entry as a match when registering the address in the store buffer. Comparing whether the tag address part of the data and each tag address part of the store buffer match,
Tag address comparison means for forcibly treating the comparison result of the tag address of the corresponding entry as a match when the address is registered in the store buffer, a write way of the read data to the cache memory, and a sweep of the store buffer Sweep data indicating that the comparison results of both the write address comparison means and the column address comparison means and the tag address comparison means for comparing whether or not the respective sweep ways stored in the way section match are detected. In the case of the above, the corresponding sweep way is changed to a write way for writing the read data into the cache memory, and the comparison results of the column address comparing means and the write way comparing means both indicate a match, and the tag address comparison is performed. Sweeping out that the comparison results of the means show inconsistency If the over data is detected, the cache memory control apparatus characterized by having a way control means sweeping Disable sweep to the cache memory of the sweep data.
【請求項2】 主記憶をアドレスの下位部であるカラム
アドレスにより、いくつかのカラムに分け、各カラムア
ドレスごとに最大n個(n≧1)のデータのコピーを格
納するnウェイセットアソシアティブ方式のキャッシュ
メモリ内のデータアレイと、 データ要求部が必要とするデータが前記データアレイ上
にあるか否かを調べるために、前記データアレイ上に存
在するデータのカラムアドレスに対応してアドレス上位
部であるタグアドレスおよび該タグアドレスが有効か否
かを示すためのバリッドビットの対を格納する前記キャ
ッシュメモリ内のアドレスアレイと、 演算実行部から前記主記憶への掃き出しデータおよび掃
き出しアドレス並びに前記キャッシュメモリへの掃き出
しウェイの組を複数個保持するストアバッファとを備え
るキャッシュメモリ制御装置において、 前記データ要求部から要求された読みだしデータが前記
キャッシュメモリに存在せず、前記主記憶からのブロッ
クロードを起動する際に、該読みだしデータのカラムア
ドレス部および前記ストアバッファの各カラムアドレス
部が一致するか否かを比較するカラムアドレス比較手段
と、 該読みだしデータのタグアドレス部および前記ストアバ
ッファの各タグアドレス部が一致するか否かを比較する
タグアドレス比較手段と、 該読みだしデータの前記キャッシュメモリへの書き込み
ウェイおよび前記ストアバッファの掃き出しウェイ部に
格納されている各掃き出しウェイが一致するか否かを比
較する書き込みウェイ比較手段と、 キャッシュミスを起こしたリクエストがRead&Wr
iteコマンドであることを示すフラグを格納するスト
アコマンド保持手段と、 前記ストアコマンド保持手段がRead&Writeコ
マンドであることを示している場合には、対応する掃き
出しウェイを該読みだしデータの前記キャッシュメモリ
への書き込みウェイに変更し、Read&Writeコ
マンドでないことを示している場合には、前記カラムア
ドレス比較手段および前記タグアドレス比較手段の双方
の比較結果が一致を示す掃き出しデータが検出された場
合に、対応する掃き出しウェイを該読みだしデータの前
記キャッシュメモリへの書き込みウェイに変更し、前記
カラムアドレス比較手段および前記書き込みウェイ比較
手段の比較結果が共に一致を示し、前記タグアドレス比
較手段の比較結果が不一致を示す掃き出しデータが検出
された場合に、該掃き出しデータの前記キャッシュメモ
リへの掃き出しを無効にする掃き出しウェイ制御手段
と、 を有することを特徴とするキャッシュメモリ制御装置。
2. An n-way set associative system in which a main memory is divided into several columns according to a column address which is a lower part of the address, and a maximum of n (n ≧ 1) copies of data are stored for each column address. In order to check whether the data array in the cache memory and the data required by the data requesting unit are on the data array, the address upper part corresponding to the column address of the data existing on the data array. An address array in the cache memory for storing a tag address and a pair of valid bits for indicating whether or not the tag address is valid, and sweep data and a sweep address from the operation executing unit to the main memory, and the cache. A cache having a store buffer that holds a plurality of sets of sweep ways to the memory. In the cache memory control device, when the read data requested by the data request unit does not exist in the cache memory and the block load from the main memory is activated, the column address part of the read data and the store buffer Column address comparing means for comparing whether or not each column address portion of the read data matches, and tag address comparing means for comparing whether or not the tag address portion of the read data and each tag address portion of the store buffer match And a write way comparing means for comparing whether or not the write way of the read data to the cache memory and the respective sweep ways stored in the sweep way section of the store buffer match, and a cache miss is caused. Request is Read & Wr
store command holding means for storing a flag indicating that the read command is a read & write command, and if the store command holding means indicates a read & write command, the corresponding sweep way is stored in the cache memory of the read data. The write way is changed to indicate that it is not a Read & Write command, which corresponds to the case where sweep data indicating that the comparison results of both the column address comparison means and the tag address comparison means are coincident is detected. The sweeping way is changed to a writing way of the read data to the cache memory, the comparison results of the column address comparing means and the writing way comparing means both show a match, and the comparison result of the tag address comparing means shows a mismatch. Sweep data shown And a sweep way control means for invalidating sweeping of the sweep data to the cache memory, is detected.
JP4128424A 1992-05-21 1992-05-21 Cache memory control device Pending JPH0683707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4128424A JPH0683707A (en) 1992-05-21 1992-05-21 Cache memory control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4128424A JPH0683707A (en) 1992-05-21 1992-05-21 Cache memory control device

Publications (1)

Publication Number Publication Date
JPH0683707A true JPH0683707A (en) 1994-03-25

Family

ID=14984419

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4128424A Pending JPH0683707A (en) 1992-05-21 1992-05-21 Cache memory control device

Country Status (1)

Country Link
JP (1) JPH0683707A (en)

Similar Documents

Publication Publication Date Title
US6772316B2 (en) Method and apparatus for updating and invalidating store data
US6047357A (en) High speed method for maintaining cache coherency in a multi-level, set associative cache hierarchy
US20170109289A1 (en) Apparatus and method for operating a virtually indexed physically tagged cache
US5146603A (en) Copy-back cache system having a plurality of context tags and setting all the context tags to a predetermined value for flushing operation thereof
US8499123B1 (en) Multi-stage pipeline for cache access
US5715427A (en) Semi-associative cache with MRU/LRU replacement
JPS6135584B2 (en)
US10545879B2 (en) Apparatus and method for handling access requests
KR100335672B1 (en) Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments
JPH0668735B2 (en) Cache memory
JPH07295886A (en) Computer system with hierarchical memory and hierachical memory and hierarchical memory management method
US7620779B1 (en) System and method for handling direct memory accesses
US5471602A (en) System and method of scoreboarding individual cache line segments
US6510506B2 (en) Error detection in cache tag array using valid vector
US20090292857A1 (en) Cache memory unit
EP0173909B1 (en) Look-aside buffer least recently used marker controller
US5619673A (en) Virtual access cache protection bits handling method and apparatus
KR100380674B1 (en) Method and system for maintaining cache coherency for write-through store operations in a multiprocessor system
JPH0683707A (en) Cache memory control device
JPH07234819A (en) Cache memory
JP6451475B2 (en) Arithmetic processing device, information processing device, and control method of arithmetic processing device
JP3729832B2 (en) Cache memory device
JPH04148256A (en) Cache controller
JPH1185613A (en) Cache memory
JP3761890B2 (en) Cache memory device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000111