JPH0769861B2 - Control method of bypass buffer in cache memory controller - Google Patents

Control method of bypass buffer in cache memory controller

Info

Publication number
JPH0769861B2
JPH0769861B2 JP61233925A JP23392586A JPH0769861B2 JP H0769861 B2 JPH0769861 B2 JP H0769861B2 JP 61233925 A JP61233925 A JP 61233925A JP 23392586 A JP23392586 A JP 23392586A JP H0769861 B2 JPH0769861 B2 JP H0769861B2
Authority
JP
Japan
Prior art keywords
store
address
buffer
data
request
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 - Lifetime
Application number
JP61233925A
Other languages
Japanese (ja)
Other versions
JPS6388658A (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.)
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 JP61233925A priority Critical patent/JPH0769861B2/en
Publication of JPS6388658A publication Critical patent/JPS6388658A/en
Publication of JPH0769861B2 publication Critical patent/JPH0769861B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は主記憶装置のアドレスの写しを記憶するアドレ
スアレイと主記憶装置のデータの写しを記憶するデータ
アレイと主記憶装置からのブロックリードデータをデー
タアレイに格納する前に一時的に格納するバイパスバッ
ファとを備えたキャッシュメモリ制御装置の改良に関す
るものであり、更に詳細にはバイパスバッファの制御方
式に関するものである。
The present invention relates to an address array for storing a copy of addresses in a main memory, a data array for storing a copy of data in a main memory, and a block read from the main memory. The present invention relates to an improvement in a cache memory control device provided with a bypass buffer for temporarily storing data before storing it in a data array, and more particularly to a control method for the bypass buffer.

〔従来の技術〕[Conventional technology]

キャッシュメモリ制御装置の一方式として、主記憶装置
のアドレスの写しを記憶するアドレスアレイと主記憶装
置のデータの写しを記憶するデータアレイの他に1ブロ
ック(例えば64バイト)分のデータを記憶できる容量を
有するバイパスバッファを設け、ミスヒット時のブロッ
クリード要求に応じて主記憶装置から返送されてくるブ
ロックリードデータを一時的にバイパスバッファに格納
しておき、以降のブロックリード要求時に於ける空き時
間等を利用してバイパスバッファに格納されているブロ
ックリードデータをデータアレイに転送することによ
り、処理の高速化を可能にした方式が知られている。
As one method of the cache memory control device, one block (for example, 64 bytes) of data can be stored in addition to an address array that stores a copy of the address of the main memory and a data array that stores a copy of the data of the main memory. By providing a bypass buffer having a capacity, the block read data returned from the main storage device in response to a block read request at the time of a miss is temporarily stored in the bypass buffer, and there is a free space for subsequent block read requests. A method is known in which the block read data stored in the bypass buffer is transferred to the data array by utilizing time or the like, thereby making it possible to speed up the processing.

ところで、バイパスバッファを備えた従来のキャッシュ
メモリ制御装置は、データの更新を指示するストア要求
のブロックアドレスとバイパスバッファに格納されてい
るデータのブロックアドレスとを比較する比較回路とを
有し、ストア要求時、比較回路で両者の一致が検出され
た場合、バイパスバッファに格納されているデータをデ
ータアレイに全て移送した後、データアレイに於いてス
トア処理を行なうようにしている。尚、データアレイの
更新は演算装置とキャッシュメモリとの間の処理データ
幅単位である例えば8バイト単位でデータの更新が行な
われる。また、データアレイの更新は更新を指示するス
トア要求があった時に直ちに行なわれるのではなく、ア
ドレスアレイの更新情報となるストアアドレスをストア
アドレスバッファに格納しておき、後に更新データが送
られるとそれをストアデータバッファに格納し、この格
納したストアデータとストアアドレスとを用いてデータ
アレイの更新が行なわれる。即ち、バイパスバッファに
格納されているデータの更新を指示するストア要求があ
った場合、バイパスバッファに格納されているデータが
データアレイに転送され、ストアアドレスバッファ,ス
トアデータバッファにストアアドレス,ストアデータが
格納された後、データアレイに於いてデータが更新され
ることになる。
By the way, a conventional cache memory control device provided with a bypass buffer has a comparison circuit for comparing a block address of a store request for instructing an update of data with a block address of data stored in the bypass buffer. When the comparison circuit detects a match between the two at the time of request, after transferring all the data stored in the bypass buffer to the data array, the store processing is performed in the data array. The data array is updated in units of processing data width between the arithmetic unit and the cache memory, for example, in units of 8 bytes. Further, the update of the data array is not performed immediately when a store request instructing the update is made, but the store address which is the update information of the address array is stored in the store address buffer and the update data is sent later. The data is stored in the store data buffer, and the data array is updated using the stored store data and store address. That is, when there is a store request to update the data stored in the bypass buffer, the data stored in the bypass buffer is transferred to the data array, and the store address and store data are stored in the store address buffer and the store data buffer. After is stored, the data will be updated in the data array.

また、従来のキャッシュメモリ制御装置は、ストアアド
レスを一時的に格納するストアアドレスバッファの出力
の内のブロックアドレスと後続のリード要求のブロック
アドレスとを比較する比較回路を有しており、この比較
回路で両者の一致を検出した場合、即ちリード要求の対
象となるアドレスを含むブロックがストア処理中である
場合、リード要求の対象となっているアドレスを含むブ
ロックに対するストア処理が終了するまで、リード処理
を待たせるようにしている。
Further, the conventional cache memory control device has a comparison circuit for comparing the block address in the output of the store address buffer for temporarily storing the store address with the block address of the subsequent read request. If the circuit detects a match between the two, that is, if the block containing the read request target address is undergoing store processing, the read operation is performed until the store processing for the block containing the read request target address ends. I'm trying to make the process wait.

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

従って、上述した従来のキャッシュメモリ制御装置に於
いては、ストア要求の対象となるアドレスを含むブロッ
クがバイパスバッファに格納されている場合、バイパス
バッファに格納されているデータをデータアレイに移送
するまで、ストア処理を待たせなければならない問題が
あった。また、更に、上述した従来例に於いては、バイ
パスバッファに格納されているデータに対するストア要
求があり、このストア要求によりストア処理を行なって
いる間にストア要求の対象となっているアドレスを含む
ブロックに対するリード要求があった場合、リード要求
の対象となっているアドレスがストア処理中であるか否
かに拘わらず、バイパスバッファからデータアレイにデ
ータが転送され、更にストア処理が終了するまで、リー
ド要求を待たせなければならない問題もあった。
Therefore, in the above-described conventional cache memory control device, when the block including the address to be the store request is stored in the bypass buffer, the data stored in the bypass buffer is transferred to the data array. , There was a problem that had to wait for store processing. Further, in the above-mentioned conventional example, there is a store request for the data stored in the bypass buffer, and the address which is the target of the store request is included during the store processing by this store request. When there is a read request for a block, data is transferred from the bypass buffer to the data array, regardless of whether or not the address targeted for the read request is in the process of storing, and until the store process ends, There was also the problem of having to wait for a read request.

本発明は前述の如き問題点を解決したものであり、その
目的はストア処理の高速化を図ると共に、ストア処理中
のデータを含むブロック内のあるアドレスに対するリー
ド要求があった場合の処理を高速化できるようにするこ
とにある。
The present invention solves the above-mentioned problems, and an object of the present invention is to speed up the store processing and to speed up the processing when a read request is made to an address in a block including data being stored. It is to be able to realize.

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

本発明は前述の如き問題点を解決するため、 主記憶装置のデータの写しを記憶するデータアレイと、 前記主記憶装置からのブロックリードデータを前記デー
タアレイに格納する前に一時的に格納するバイパスバッ
ファとを具備したキャッシュメモリ制御装置に於いて、 リード要求時或いはストア要求時、該リード要求或いは
ストア要求の対象となるアドレスを含むブロックが前記
バイパスバッファに格納されているか否かを検出する検
出手段と、 該検出手段でストア要求の対象となるアドレスを含むブ
ロックが前記バイパスバッファに格納されていることが
検出された場合は前記バイパスバッファに対してストア
処理を行ない、検出されなかった場合は前記データアレ
イに対してストア処理を行なうストア処理手段と、 前記バイパスバッファの各エントリ対応のエントリを有
し、各エントリに前記各バイパスバッファの各エントリ
に格納されているデータがストア処理であるか否かを示
すバイパスバッファストア待ちフラグが格納されるバイ
パス制御バッファとを設け、 前記検出手段でリード要求が前記バイパスバッファに対
するものであることが検出されることにより、該リード
要求のアドレスに対応する前記バイパス制御バッファの
エントリに格納されているバイパスバッファストア待ち
フラグを参照し、バイパスバッファストア待ちフラグが
オフであれば前記バイパスバッファからデータを読出し
てリード要求の要求元へ返送し、オンであれば前記バイ
パスバッファに対するストア処理が完了するまでリード
要求を待たせるようにしたものである。
In order to solve the above-mentioned problems, the present invention stores a data array for storing a copy of data in a main storage device, and temporarily stores block read data from the main storage device before storing it in the data array. In a cache memory control device including a bypass buffer, at the time of a read request or a store request, it is detected whether or not a block including an address to be the target of the read request or the store request is stored in the bypass buffer. When the detecting unit detects that the block including the target address of the store request is stored in the bypass buffer, the storing process is performed to the bypass buffer, and the detecting process is not performed. Is a store processing means for performing store processing on the data array, and the bypass buffer. A bypass control buffer having an entry corresponding to each entry of the bypass buffer, and each entry stores a bypass buffer store wait flag indicating whether or not the data stored in each entry of the bypass buffer is store processing; And the detection means detects that the read request is directed to the bypass buffer, thereby setting the bypass buffer store wait flag stored in the entry of the bypass control buffer corresponding to the address of the read request. If the bypass buffer store wait flag is OFF, the data is read from the bypass buffer and returned to the request source of the read request, and if it is ON, the read request is made to wait until the store processing for the bypass buffer is completed. It is the one.

〔作 用〕[Work]

バイパス制御バッファの各エントリにはバイパスバッフ
ァの対応するエントリのデータがストア処理中であるか
否かを示すバイパスバッファストア待ちフラグが格納さ
れる。また、バイパスバッファに格納されているデータ
に対するリード要求時、該リード要求のアドレスと対応
するバイパス制御バッファのエントリに格納されている
バイパスバッファストア待ちフラグがオンの場合はリー
ド要求は待たされ、オフの場合はバイパスバッファから
データが読出されてリード要求の要求元へ返送される。
従って、ストア処理中のアドレスを含むブロックとリー
ド要求の対象となるアドレスを含むブロックとが同一で
あっても、アドレス自体が異なれば、直ちにリード処理
が実行されることになる。また、ストア要求が対象とな
るアドレスを含むブロックがバイパスバッファに格納さ
れている場合は、ストア処理手段によってバイパスバッ
ファに対してストア処理が直接行なわれる。
In each entry of the bypass control buffer, a bypass buffer store wait flag indicating whether or not the data of the corresponding entry of the bypass buffer is being stored is stored. Further, when a read request is made for the data stored in the bypass buffer, if the bypass buffer store wait flag stored in the entry of the bypass control buffer corresponding to the address of the read request is on, the read request is kept waiting and turned off. In this case, the data is read from the bypass buffer and returned to the request source of the read request.
Therefore, even if the block including the address being stored is the same as the block including the address that is the target of the read request, the read process is immediately executed if the address itself is different. Further, when the block including the address for which the store request is made is stored in the bypass buffer, the store processing means directly performs the store processing on the bypass buffer.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の実施例のブロック図である。同図にお
いて、リクエストレジスタ10は、アクセス要求の種別,
指示内容,有効性を含むリクエストコード部と、アクセ
ス要求のアドレス部とから構成されるアドレス情報を保
持するレジスタである。アドレス情報のアドレス部は、
更にキーアドレスとセットアドレスとブロック内アドレ
スとに区分され、またキーアドレスとセットアドレスと
でブロックアドレスが構成され、セットアドレスとブロ
ック内アドレスとでデータアレイアドレスが構成され
る。リクエストレジスタ10に保持されたアドレス情報の
うち、リクエストコード部は結線107により制御回路70
に入力され、制御回路70はそのリクエストコードを解読
して各部に必要な制御信号を生成して分配する。また、
アドレス情報の内のアドレス部は、結線103により切替
回路65に入力され、主記憶要求アドレスとなる。更に、
アドレス部のうちのキーアドレスは結線102によりアド
レスアレイ20と検出回路21に入力され、セットアドレス
は結線101によりアドレスアレイ20の参照アドレスとし
て入力され、ブロック内アドレスは結線105によりスト
アアドレスバッフア31と検出回路35とバイパスバッファ
51とバイパスバッファ51の制御情報を保持する制御バッ
ファ50とに入力され、ブロックアドレスは結線106によ
りストアアドレスバッファ31と検出回路34,35とレジス
タ52と検出回路53とに入力され、データアレイアドレス
は結線104,切替回路66,結線661によりデータアレイ40に
入力される。
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, the request register 10 indicates the type of access request,
It is a register that holds address information composed of a request code part including instruction contents and validity, and an address part of an access request. The address part of the address information is
Further, it is divided into a key address, a set address, and an in-block address, a block address is composed of the key address and the set address, and a data array address is composed of the set address and the in-block address. The request code portion of the address information held in the request register 10 is connected to the control circuit 70 by the connection 107.
The control circuit 70 decodes the request code, generates a control signal necessary for each unit, and distributes the control signal. Also,
The address portion of the address information is input to the switching circuit 65 by the connection 103 and becomes the main storage request address. Furthermore,
The key address in the address part is input to the address array 20 and the detection circuit 21 via a connection 102, the set address is input as a reference address of the address array 20 via a connection 101, and the in-block address is connected to a store address buffer 31 via a connection 105. And detection circuit 35 and bypass buffer
51 and the control buffer 50 holding the control information of the bypass buffer 51, the block address is input to the store address buffer 31, the detection circuits 34 and 35, the register 52 and the detection circuit 53 by the connection 106, and the data array address. Is input to the data array 40 through the connection 104, the switching circuit 66, and the connection 661.

図示しない主記憶装置のアドレスの写しとそのアドレス
の写しが有効であるか否かを示す有効性表示ビットとを
記憶するアドレスアレイ20は、結線101のセットアドレ
スで読出され、結線202に読出された有効性表示ビット
が有効で且つアドレスアレイ20から結線201に読出され
たアドレスとリクエストレジスタ10のキーアドレスとが
一致したとき、ファウンドブロックと呼び、検出回路21
は結線211上のファンドブロック信号(以下FDB信号と称
す)をオンして制御回路70へ目的のデータがキャッシュ
メモリ制御装置内に存在することを通知する。
An address array 20 storing a copy of an address of a main memory (not shown) and a validity indicating bit indicating whether or not the copy of the address is valid is read at a set address of connection 101 and read to connection 202. When the validity indication bit is valid and the address read from the address array 20 to the connection 201 and the key address of the request register 10 match, the detection circuit 21 is called a found block.
Turns on a fund block signal (hereinafter referred to as an FDB signal) on the connection 211 to notify the control circuit 70 that the target data exists in the cache memory control device.

リクエストレジスタ10のキーアドレスとセットアドレス
を合わせたブロックアドレスは、結線106により検出回
路53に入力され、ここで、バイパスバッファ51に格納さ
れているデータのブロックアドレスを保持するレジスタ
52の出力との一致と、バイパス制御バッファ50内にエン
トリ単位に保持されているバイパスバッファ51のエント
リ有効ビット(以下BEVビットと称す)がオンであるか
否かが調べられ、BEVビットがオンで且つ上記ブロック
アドレスの一致が検出された場合、結線531上のバイパ
スバッファ一致信号(以下BBM信号と称す)をオンにし
て制御回路70へ通知する。
The block address obtained by combining the key address and the set address of the request register 10 is input to the detection circuit 53 by the connection 106, and the register that holds the block address of the data stored in the bypass buffer 51 here.
The match between the output of 52 and the entry valid bit of the bypass buffer 51 (hereinafter referred to as the BEV bit) held in the bypass control buffer 50 for each entry is checked to see if the BEV bit is turned on. When the block address match is detected, the bypass buffer match signal (hereinafter referred to as the BBM signal) on the connection 531 is turned on to notify the control circuit 70.

リクエストレジスタ10でリード要求が受け付けられる
と、制御回路70は上記FDB信号とBBM信号を調べ、基本的
には以下の処理を実行する。
When the request register 10 accepts the read request, the control circuit 70 checks the FDB signal and the BBM signal, and basically executes the following processing.

FDB信号がオフの場合、当該リードリクエストに対応す
るデータがキャッシュメモリ制御装置内に存在しないこ
とから、制御回路70は主記憶要求コードとしてブロック
リード要求を送出すると共に、切替回路65からリクエス
トレジスタ10のアドレス部の内容を主記憶要求アドレス
として主記憶装置に送出する。一方、主記憶リードデー
タが返送されるまでの間、リクエストレジスタ10の内容
をそのまま保持すると共に、アドレスアレイ20のエント
リとレジスタ52へ各々リクエストレジスタ11のキーアド
レスとブロックアドレスをそれぞれ結線102,106を介し
て登録し、またバイパスバッファ51に有効なデータが存
在するときは、レジスタ52の出力を切替回路66で選択さ
せると共に主記憶装置のデータの写しを記憶するデータ
アレイ40へ切替回路64,結線641,切替回路61を介してバ
イパスバッファ51のデータを移送する。このデータアレ
イ40へのデータの移送は、1回目の主記憶リードデータ
が返送されるまでの間を利用して実行される。ブロック
リードは、主記憶装置の1ブロックの転送要求であり、
本実施例では64バイトの大きさを持ち、主記憶装置との
データ転送幅は8バイトであるため、合計8回の主記憶
リードデータが返送される。そして、1回目の主記憶リ
ードデータは切替回路63を介してバイパスバッファ51に
登録されると同時に切替回路64,切替回路62を介して要
求元へリプライデータとして返送され、2回目以降のリ
ードデータはバイパスバッファ51にのみ格納される。
When the FDB signal is off, since the data corresponding to the read request does not exist in the cache memory control device, the control circuit 70 sends the block read request as the main memory request code and the switching circuit 65 requests the request register 10 The contents of the address part of the above are sent to the main storage device as the main storage request address. On the other hand, until the main memory read data is returned, the contents of the request register 10 are held as they are, and the key address and block address of the request register 11 are respectively supplied to the entry of the address array 20 and the register 52 via the connection lines 102 and 106. If there is valid data in the bypass buffer 51, the output of the register 52 is selected by the switching circuit 66, and the switching circuit 64 and the connection 641 are connected to the data array 40 that stores a copy of the data in the main memory. Then, the data in the bypass buffer 51 is transferred via the switching circuit 61. The data transfer to the data array 40 is executed by using the period until the first main storage read data is returned. The block read is a transfer request for one block of the main memory,
In the present embodiment, the size is 64 bytes, and the data transfer width with the main memory is 8 bytes, so a total of 8 main memory read data are returned. The first main memory read data is registered in the bypass buffer 51 via the switching circuit 63, and at the same time returned to the request source as reply data via the switching circuit 64 and the switching circuit 62. Are stored only in the bypass buffer 51.

次に、FDB信号がオンの場合、リクエストレジスタ10に
受け付けられたリードリクエストに対応するデータがキ
ャッシュメモリ制御装置内に存在することを示してい
る。この場合、制御回路70はBBM信号を参照し、BBM信号
がオフの場合には結線104によるデータアレイアドレス
によってデータアレイ40から読出されたデータが切替回
路62を介して要求元に返送され、BBM信号がオンの場合
は、ブロックロードによって得たデータが未だデータア
レイ40になくバイパスバッファ51に留まっていることか
ら、結線105によるブロック内アドレスによってバイパ
スバッファ51から読出されたデータが切替回路64,62を
介して要求元に返送される。
Next, when the FDB signal is on, it indicates that the data corresponding to the read request accepted by the request register 10 exists in the cache memory control device. In this case, the control circuit 70 refers to the BBM signal, and when the BBM signal is off, the data read from the data array 40 by the data array address on the connection 104 is returned to the request source via the switching circuit 62, and the BBM signal is sent. When the signal is on, since the data obtained by the block load is not in the data array 40 and remains in the bypass buffer 51, the data read from the bypass buffer 51 by the address in the block by the connection 105 is the switching circuit 64, Returned to the requestor via 62.

リード要求処理の概略は以上の通りであるが、更に、ス
トア要求の処理途中にリードリクエストが発生した場合
の処理は上記と異なり多少複雑になる。以下これについ
て説明する。
The outline of the read request processing is as described above, and further, the processing when a read request occurs during the processing of the store request is slightly complicated unlike the above. This will be described below.

リクエストレジスタ10にストア要求が受け付けられる
と、結線105,106によりブロックアドレスとブロック内
アドレスがストアアドレスバッファ31に格納され、制御
回路70はリクエストコード部を解読して得たストア形態
情報とストアバッファのエントリの有効を示す有効性ビ
ット(以下SAVビットと称す)を結線301を介してストア
制御バッファ30に登録する。このとき、SAVビットはオ
ンとして登録され、以下に示すストア要求処理が終了し
た時点でオフにされる。
When the store request is accepted by the request register 10, the block address and the in-block address are stored in the store address buffer 31 by the connections 105 and 106, and the control circuit 70 stores the store form information obtained by decoding the request code section and the store buffer entry. The validity bit (hereinafter referred to as the SAV bit) indicating the validity of is stored in the store control buffer 30 via the connection 301. At this time, the SAV bit is registered as ON, and is turned OFF when the store request processing described below is completed.

上記ストア要求のアドレスのストアアドレスバッファ31
への登録に遅れて演算実行部で準備されたストアデータ
(8バイト)とバイト単位のストア実行の可/否を示す
ストアマスクとが送られてくると、それらは各々ストア
データバッファ33とストアマスクバッファ32に登録され
る。そして、その後上記ストア制御バッファ30,ストア
アドレスバッフア31,ストアマスクバッファ32,ストアデ
ータバッファ33が同時に読出され、ストア制御バッファ
30の読出しデータは主記憶装置へ主記憶要求コードとし
て送出され、ストアアドレスバッファ31の出力は結線31
3,切替回路65を介して主記憶要求アドレスとして送出さ
れ、ストアマスクバッファ32の出力は主記憶ストアマス
クとして送出され、ストアデータバッファ33の出力は主
記憶ストアデータとして送出される。また、上記ストア
要求時に検出回路21のFDB信号がオンで検出回路53のBBM
信号がオフのとき、即ちストア要求のあったアドレスが
データアレイ40内に存在するブロック内の1つのアドレ
スであった場合、データアレイ40に格納されたデータの
ストアデータによる更新が実行される。また、上記スト
ア要求時に検出回路21のFDB信号がオンで検出回路53のB
BM信号がオンのとき、即ちストア要求のあったアドレス
がバイパスバッファ51内に存在するブロック内の1つの
アドレスであった場合、結線314に出力されているデー
タアレイアドレスに従って、バイパスバッファ51に格納
されたデータのストアデータによる更新が実行される。
Store address buffer 31 for the address of the above store request
When the store data (8 bytes) prepared by the operation executing unit and the store mask indicating whether or not the byte unit store can be executed are sent after the registration to the store data buffer 33 and the store data buffer 33, respectively. It is registered in the mask buffer 32. Then, after that, the store control buffer 30, the store address buffer 31, the store mask buffer 32, and the store data buffer 33 are simultaneously read out, and the store control buffer
The read data of 30 is sent to the main memory as a main memory request code, and the output of the store address buffer 31 is the connection 31
3, sent as the main memory request address via the switching circuit 65, the output of the store mask buffer 32 is sent as the main memory store mask, and the output of the store data buffer 33 is sent as the main memory store data. Also, when the store request is made and the FDB signal of the detection circuit 21 is turned on, the BBM of the detection circuit 53 is
When the signal is off, that is, when the requested store address is one address in the block existing in the data array 40, the update of the data stored in the data array 40 with the store data is executed. Further, when the store request is made and the FDB signal of the detection circuit 21 is turned on, B of the detection circuit 53 is
When the BM signal is on, that is, when the store-requested address is one address in the block existing in the bypass buffer 51, it is stored in the bypass buffer 51 according to the data array address output to the connection line 314. The stored data is updated with the stored data.

一方、検出回路34は、結線311を介してストアアドレス
バッファ31中のブロックアドレスをも入力とし、リード
リクエストがあった場合、リードリクエストされたアド
レスが含まれるブロックと同じブロックがストア要求処
理中であるか否かを検出する回路であり、検出回路35
は、ストアアドレスバッファ31から結線311を介してブ
ロックアドレスを、結線312を介してブロック内アドレ
スをそれぞれ入力とし、リードリクエストがあった場
合、リードリクエストされたアドレスと同じアドレスが
ストア要求処理中であるか否かを検出する回路である。
本実施例では検出回路35によりリードリクエストの対象
アドレスがストアアドレスバッファ31に格納されている
か否かの検出を行なっているので、後述するようにより
適切なストア処理中リードリクエスト処理が可能とな
る。
On the other hand, the detection circuit 34 also receives the block address in the store address buffer 31 via the connection 311, and when there is a read request, the same block as the block including the read-requested address is undergoing store request processing. A circuit that detects whether or not there is a detection circuit 35
The block address is input from the store address buffer 31 via the connection 311 and the in-block address is input via the connection 312, and when there is a read request, the same address as the read-requested address is being stored. It is a circuit that detects whether or not there is.
In the present embodiment, the detection circuit 35 detects whether or not the target address of the read request is stored in the store address buffer 31, so that appropriate read request processing during store processing becomes possible as described later.

さて、前述の如くストア要求の処理が即時に終了できな
いことにより、後続するリードリクエストの処理におい
ては、同一アドレスに対して処理中のストア要求が残っ
ているか否かを判定し、その判定結果に応じた制御が必
要となる。本実施例においては、前述した通りデータの
処理幅は8バイト単位、1ブロックは64バイトである。
即ち、ストアデータバッファ33,データアレイ40,バイパ
スバッファ51の各エントリは8バイト長であり、バイパ
スバッファ51は8エントリから構成される。
As described above, since the processing of the store request cannot be completed immediately, in the processing of the subsequent read request, it is determined whether or not there is a store request that is being processed for the same address. Therefore, appropriate control is required. In the present embodiment, as described above, the data processing width is in units of 8 bytes, and one block is 64 bytes.
That is, each entry of the store data buffer 33, the data array 40, and the bypass buffer 51 has a length of 8 bytes, and the bypass buffer 51 is composed of 8 entries.

リクエストレジスタ10内のリクエストコード部には、8
バイト境界に対し8バイト全書込みであることを示す全
書込みフラグが含まれており、ストア要求処理時、前記
SAVビットと同時に本フラグがストア制御バッファ30に
登録される。この全書込みフラグがオンのときは、演算
実行部より送られた8バイトのストアデータが最終的に
全てデータアレイ40に格納され、全書込みフラグがオフ
のときはリクエストコード部で指定された特定のバイト
のみのストアデータがデータアレイ40に部分書込みされ
る。また、後述するリードリクエストに対し、ストアア
ドレスバッファ31の各エントリ単位に、同一ブロックに
対するストア要求が処理中であるか否かが検出回路34で
検出され、同一8バイトに対するストア要求が処理中で
あるか否かが検出回路35により検出される。
The request code in the request register 10 contains 8
The all-write flag indicating that all 8 bytes have been written to the byte boundary is included.
This flag is registered in the store control buffer 30 at the same time as the SAV bit. When this full write flag is on, all 8 bytes of store data sent from the operation execution unit are finally stored in the data array 40, and when the full write flag is off, the specified data specified by the request code unit is specified. Of bytes of store data are partially written to the data array 40. In addition, in response to a read request to be described later, the detection circuit 34 detects whether a store request for the same block is being processed for each entry of the store address buffer 31, and a store request for the same 8 bytes is being processed. Whether or not there is is detected by the detection circuit 35.

検出回路34では各エントリ単位でのアドレス一致とSAV
ビットを判定し、結線341により各エントリ単位に制御
回路70へ結果を送出し、制御回路70では各エントリ単位
の一致の論理和を作成する。この論理和をストアブロッ
クアドレスマッチ信号(以下BAM信号と称す)と呼び、
このBAM信号がオンの場合、リードリクエストされたア
ドレスが含まれるブロックのあるアドレスがストア処理
中であることを示す。同様に、検出回路35から検出さ
れ、結線351で通知される結果の論理和をストアデータ
アレイアドレスマッチ信号(以下CAM信号と称す)と呼
び、このCAM信号がオンの場合、リードリクエストされ
たアドレス自体がストア処理中であることを示す。
In the detection circuit 34, address matching and SAV
The bit is judged, and the result is sent to the control circuit 70 for each entry by the connection 341, and the control circuit 70 creates a logical sum of the coincidence for each entry. This logical sum is called a store block address match signal (hereinafter referred to as BAM signal),
When this BAM signal is on, it indicates that an address with a block including the read-requested address is being stored. Similarly, the logical sum of the results detected by the detection circuit 35 and notified by the connection 351 is called a store data array address match signal (hereinafter referred to as the CAM signal), and when this CAM signal is on, the read-requested address Indicates that it is in the process of storing itself.

一方、ストア要求の処理の際、検出回路53によりバイパ
スバッファ51に格納されているブロックに対するストア
要求であることが信号BBMのオンで通知された場合、制
御回路70は、そのブロック内アドレスに対応するバイパ
ス制御バッファ50のエントリ内に含まれるバイパスバッ
ファストア待ちフラグ(以下BSWフラグと称す)をオン
として登録する。このBSWフラグはリードリクエストの
処理で結線501を介して参照され、BBM信号がオンの時、
BSWフラグがオンならバイパスバッファ51の読出しは待
たされ、BSWフラグがオフなら即座にバイパスバッファ5
1が読出される。上記処理は、前述のBAM信号,CAM信号お
よびFDB信号により更に詳細に制御される。以下、各信
号によりリードリクエストをいかに処理するかを説明す
る。
On the other hand, when processing the store request, when the detection circuit 53 notifies the store request to the block stored in the bypass buffer 51 by turning on the signal BBM, the control circuit 70 responds to the address in the block. The bypass buffer store wait flag (hereinafter referred to as the BSW flag) included in the entry of the bypass control buffer 50 is registered as ON. This BSW flag is referenced via the connection 501 in the processing of the read request, and when the BBM signal is on,
If the BSW flag is on, the reading of the bypass buffer 51 is delayed, and if the BSW flag is off, the bypass buffer 5 is immediately returned.
1 is read. The above processing is controlled in more detail by the above-mentioned BAM signal, CAM signal and FDB signal. Hereinafter, how to process the read request by each signal will be described.

(1)FDB信号がオフの場合(即ち、リードリクエスト
されたアドレスがキャッシュメモリ制御装置上に存在し
ない場合。この場合、構造上BBM信号およびBSWフラグは
必ずオフである。) BAM信号がオフの場合(即ち、リードリクエストされ
たアドレスがストアアドレスバッファ31中にもない場
合) この場合、前述の手順により制御回路70は主記憶装置へ
ブロックリード要求を送出し、主記憶装置から返送され
たデータのうちリードリクエストに対応するアドレスの
データを切替回路63,64,62を介して要求元へ返送する。
(1) When the FDB signal is off (that is, when the read-requested address does not exist in the cache memory controller. In this case, the BBM signal and the BSW flag are always off due to the structure). The BAM signal is off. In the case (that is, when the read-requested address does not exist in the store address buffer 31), in this case, the control circuit 70 sends a block read request to the main memory device according to the procedure described above, and the data returned from the main memory device Data of the address corresponding to the read request is returned to the request source via the switching circuits 63, 64, 62.

BAM信号がオンの場合(即ち、リードリクエストされ
たアドレスが含まれるブロックのあるアドレスがストア
アドレスバッファ31に格納されている場合) この場合は、CAM信号のオン,オフにより更に次の二通
りに分けられる。
When the BAM signal is on (that is, when an address with a block including the read-requested address is stored in the store address buffer 31) In this case, the CAM signal is turned on and off to perform the following two methods. Be divided.

(i)CAM信号がオンでその要因となったエントリのス
トア制御バッファ30内の全書込みフラグがオンの場合、
制御回路70は、ストアデータをストアデータバッファ33
に受け付けた後、主記憶装置へストア要求を送出すると
同時に切替回路62を介して要求元へストアデータバッフ
ァ33に受け付けたストアデータを返送する。このとき、
主記憶装置へのブロックリード要求は行なわれず、デー
タも高速に返送することが可能である。
(I) When the CAM signal is on and the all write flag in the store control buffer 30 of the entry that caused it is on,
The control circuit 70 stores the store data in the store data buffer 33.
Then, the store request is sent to the main storage device, and at the same time, the store data received in the store data buffer 33 is returned to the request source via the switching circuit 62. At this time,
The block read request to the main memory is not made, and the data can be returned at high speed.

(ii)CAM信号がオフの場合は、リードリクエストされ
たアドレスが含まれるブロックの別のアドレスがストア
アドレスバッファ31に格納されている場合であるから、
制御回路70はストアデータをストアデータバッファ33に
受け付け、主記憶装置へストア要求を送出し、更に主記
憶装置へブロックリード要求を送出して返送された主記
憶リードデータ中からリードリクエストに対応するアド
レスのデータを切替回路63,64,62を介して要求元へ返送
する。
(Ii) When the CAM signal is off, it means that another address of the block including the read-requested address is stored in the store address buffer 31.
The control circuit 70 receives the store data in the store data buffer 33, sends a store request to the main memory device, further sends a block read request to the main memory device, and responds to the read request from the returned main memory read data. The address data is returned to the request source via the switching circuits 63, 64, 62.

(2)FDB信号がオンの場合(即ち、リードリクエスト
されたアドレスのブロックがキャッシュメモリ制御装置
上に存在する場合) BAM信号がオフの場合(即ち、アドレスアレイ20に格
納されたブロックのうちリードリクエストの対象となる
ブロックについてストア処理されていない場合。この場
合、BSWフラグがオンのエントリは構造上存在しない) この場合、BBM信号がオンなら、つまりリードリクエス
トされたブロックがバイパスバッファ51中に留まってい
るときは、バイパスバッファ51から読出されたデータが
切替回路64,62を介して要求元に返送される。また、BBM
信号がオフなら、データアレイ40からデータが読出され
て切替回路62を介して要求元に返送される。
(2) When the FDB signal is on (that is, when the block of the read-requested address exists in the cache memory control device) When the BAM signal is off (that is, the read of the blocks stored in the address array 20) If the block that is the target of the request is not stored (in this case, there is no entry with the BSW flag on by structure) In this case, if the BBM signal is on, that is, the block requested to be read is stored in the bypass buffer 51. When it remains, the data read from the bypass buffer 51 is returned to the request source via the switching circuits 64 and 62. Also, BBM
If the signal is off, the data is read from the data array 40 and returned to the request source via the switching circuit 62.

BAM信号がオンの場合(即ち、アドレスアレイ20に格
納されたブロックのうちリードリクエストの対象となる
ブロックがストア処理中である場合) (i)BBM信号がオンで且つSBWフラグがオフのとき(即
ち、リードリクエストされたアドレスが含まれるブロッ
クがバイパスバッファ51中にあるが、リードリクエスト
されたアドレスそのものはストア要求処理の対象でない
とき)、バイパスバッファ51からブロック内アドレスに
よって読出されたデータを切替回路64,62を介して要求
元へ返送する。
When the BAM signal is on (that is, when the block that is the target of the read request among the blocks stored in the address array 20 is undergoing store processing) (i) When the BBM signal is on and the SBW flag is off ( That is, when the block including the read-requested address is in the bypass buffer 51, but the read-requested address itself is not the target of the store request processing), the data read from the bypass buffer 51 by the in-block address is switched. Return to the requester via the circuits 64 and 62.

(ii)BBM信号,BSWフラグ共にオンのとき(即ち、リー
ドリクエストされたアドレスが含まれるブロックがバイ
パスバッファ51中にあり、且つリードリクエストされた
アドレスそのものがストア要求処理の対象となっている
とき)、対応するストアデータがストアデータバッファ
33へ登録されるまでリードリクエスト処理は待たされ
る。そして、対応するストア制御バッファ30内の全書込
みフラグが調べられ、全書込みフラグがオンなら、スト
アデータバッファ33から対応するストアデータを読出し
切替回路63を介してバイパスバッファ51へ書込む際に切
替回路62を介して要求元へ上記ストアデータを返送す
る。また、全書込みフラグがオフなら、ストアデータバ
ッファ33のストアデータを切替回路63を介してバイパス
バッファ51へ部分書込みした後、バイパスバッファ51か
ら読出したデータを要求元へ返送する。
(Ii) When the BBM signal and the BSW flag are both on (that is, when the block including the read-requested address is in the bypass buffer 51 and the read-requested address itself is the target of the store request processing) ), The corresponding store data is the store data buffer
The read request process is kept waiting until it is registered in 33. Then, all write flags in the corresponding store control buffer 30 are checked, and if all write flags are on, switching is performed when the corresponding store data is written from the store data buffer 33 to the bypass buffer 51 via the read switching circuit 63. The store data is returned to the request source via the circuit 62. If the all write flag is off, the store data in the store data buffer 33 is partially written to the bypass buffer 51 via the switching circuit 63, and then the data read from the bypass buffer 51 is returned to the request source.

(iii)BBM信号がオフの場合(即ち、リードリクエスト
されたアドレスがバイパスバッファ51中にない場合)、
CAM信号がオフならデータアレイ40よりデータを読出し
即座に要求元へ返送する。また、CAM信号がオンなら、
その要因のエントリの全書込みフラグがオンの場合、ス
トアデータバッファ33にストアデータを受け付けた後、
ストアデータバッファ33の出力を結線331,切替回路61を
介してデータアレイ40へ書込むと同時に切替回路62を介
して要求元へストアデータを返送し、上記全書込みフラ
グがオフならストアデータバッファ33の出力をデータア
レイ40に部分書込みした後、データアレイ40を読出し要
求元へ返送する。
(Iii) When the BBM signal is off (that is, when the read-requested address is not in the bypass buffer 51),
If the CAM signal is off, the data is read from the data array 40 and immediately returned to the request source. If the CAM signal is on,
If the all write flag of the entry of the cause is on, after accepting store data in the store data buffer 33,
The output of the store data buffer 33 is written to the data array 40 via the connection 331 and the switching circuit 61, and at the same time the store data is returned to the request source via the switching circuit 62. If the all write flag is off, the store data buffer 33 After partially writing the output of the above into the data array 40, the data array 40 is returned to the read request source.

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

以上説明したように、本発明は、ストア要求時、該スト
ア要求の対象となるアドレスを含むブロックがバイパス
バッファに格納されている場合はバイパスバッファに対
してストア処理を行なうようにしたものであるから、バ
イパスバッファに格納されているデータをデータアレイ
に移送していた従来例に比較してストア処理を高速化で
きる利点がある。また、更に、本発明は、バイパスバッ
ファの各エントリ対応のエントリを有し、各エントリに
バイパスバッファストア待ちフラグが格納されるバイパ
ス制御バッファを設け、バイパスバッファに格納されて
いるデータに対するリード要求時、バイパスバッファス
トア待ちフラグがオンの場合はリード処理を持たせ、オ
フの場合は直ちにバイパスバッファからデータを読出し
てリード要求の要求元へ返送するようにしたものであ
り、ストア処理中のアドレスを含むブロックとリード要
求の対象となるアドレスを含むブロックとが同一であっ
ても、アドレス自体が異なれば、直ちにリード処理を実
行することができるので、ストア要求に後続するリード
要求の処理を高速化できる利点がある。
As described above, according to the present invention, at the time of a store request, if the block including the address that is the target of the store request is stored in the bypass buffer, the store process is performed on the bypass buffer. Therefore, compared to the conventional example in which the data stored in the bypass buffer is transferred to the data array, there is an advantage that the store processing can be speeded up. Further, according to the present invention, a bypass control buffer having an entry corresponding to each entry of the bypass buffer, in which each entry stores a bypass buffer store wait flag, is provided when a read request for data stored in the bypass buffer is made. When the bypass buffer store wait flag is on, read processing is provided, and when it is off, data is immediately read from the bypass buffer and returned to the request source of the read request. Even if the containing block and the block containing the address that is the target of the read request are the same, the read process can be executed immediately if the address itself is different, so the processing of the read request following the store request is speeded up. There are advantages.

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

第1図は本発明の実施例のブロック図である。 図に於いて、20……アドレスアレイ、21,34,35,53……
検出回路、31……ストアアドレスバッファ、33……スト
アデータバッファ、40……データアレイ,51……バイパ
スバッファ、70……制御回路である。
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, 20 …… address array, 21,34,35,53 ……
A detection circuit, 31 ... Store address buffer, 33 ... Store data buffer, 40 ... Data array, 51 ... Bypass buffer, 70 ... Control circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】主記憶装置のデータの写しを記憶するデー
タアレイと、 前記主記憶装置からのブロックリードデータを前記デー
タアレイに格納する前に一時的に格納するバイパスバッ
ファとを具備したキャッシュメモリ制御装置に於いて、 リード要求時或いはストア要求時、該リード要求或いは
ストア要求の対象となるアドレスを含むブロックが前記
バイパスバッファに格納されているか否かを検出する検
出手段と、 該検出手段でストア要求の対象となるアドレスを含むブ
ロックが前記バイパスバッファに格納されていることが
検出された場合は前記バイパスバッファに対してストア
処理を行ない、検出されなかった場合は前記データアレ
イに対してストア処理を行なうストア処理手段と、 前記バイパスバッファの各エントリ対応のエントリを有
し、各エントリに前記各バイパスバッファの各エントリ
に格納されているデータがストア処理中であるか否かを
示すバイパスバッファストア待ちフラグが格納されるバ
イパス制御バッファとを設け、 前記検出手段でリード要求が前記バイパスバッファに対
するものであることが検出されることにより、該リード
要求のアドレスに対応する前記バイパス制御バッファの
エントリに格納されているバイパスバッファストア待ち
フラグを参照し、バイパスバッファストア待ちフラグが
オフであれば前記バイパスバッファからデータを読出し
てリード要求の要求元へ返送し、オンであれば前記バイ
パスバッファに対するストア処理が完了するまでリード
要求を待たせることを特徴とするキャッシュメモリ制御
装置に於けるバイパスバッファの制御方式。
1. A cache memory comprising: a data array for storing a copy of data in a main memory; and a bypass buffer for temporarily storing block read data from the main memory before storing in the data array. In the control device, at the time of a read request or a store request, a detection unit that detects whether or not a block including an address to be the target of the read request or the store request is stored in the bypass buffer, and the detection unit. If it is detected that the block including the address that is the target of the store request is stored in the bypass buffer, store processing is performed on the bypass buffer, and if not detected, it is stored in the data array. Store processing means for performing processing, and an entry corresponding to each entry of the bypass buffer And a bypass control buffer in which each entry stores a bypass buffer store wait flag indicating whether or not the data stored in each entry of each bypass buffer is undergoing store processing, When it is detected that the read request is for the bypass buffer, the bypass buffer store wait flag stored in the entry of the bypass control buffer corresponding to the address of the read request is referred to If the wait flag is off, data is read from the bypass buffer and returned to the request source of the read request, and if on, the read request is waited until the store processing for the bypass buffer is completed. Control of bypass buffer in controller method.
JP61233925A 1986-09-30 1986-09-30 Control method of bypass buffer in cache memory controller Expired - Lifetime JPH0769861B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61233925A JPH0769861B2 (en) 1986-09-30 1986-09-30 Control method of bypass buffer in cache memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61233925A JPH0769861B2 (en) 1986-09-30 1986-09-30 Control method of bypass buffer in cache memory controller

Publications (2)

Publication Number Publication Date
JPS6388658A JPS6388658A (en) 1988-04-19
JPH0769861B2 true JPH0769861B2 (en) 1995-07-31

Family

ID=16962750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61233925A Expired - Lifetime JPH0769861B2 (en) 1986-09-30 1986-09-30 Control method of bypass buffer in cache memory controller

Country Status (1)

Country Link
JP (1) JPH0769861B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63120377A (en) * 1986-11-10 1988-05-24 Canon Inc Image reader

Also Published As

Publication number Publication date
JPS6388658A (en) 1988-04-19

Similar Documents

Publication Publication Date Title
US5761734A (en) Token-based serialisation of instructions in a multiprocessor system
US5095424A (en) Computer system architecture implementing split instruction and operand cache line-pair-state management
EP0408058A2 (en) Microprocessor
JPH03225542A (en) Memory of data and processing circuit for bit encode data
EP0173909B1 (en) Look-aside buffer least recently used marker controller
JPH0519176B2 (en)
JPH0769861B2 (en) Control method of bypass buffer in cache memory controller
EP0271187B1 (en) Split instruction and operand cache management
JPH06103477B2 (en) Parallel cache memory
JPS6266348A (en) Store check system for cache memory controller
JP3241637B2 (en) Cache memory
JPH0769863B2 (en) Data processing device
JP3226557B2 (en) Multiprocessor system
JP2588547B2 (en) Multi CPU system
JP3437224B2 (en) Delay invalidation method
JPS62174846A (en) Storage checking system
JPH02259945A (en) Storing processing system
JP3287239B2 (en) Hierarchical cache memory and its state transition control method
JPH0769862B2 (en) Cache memory device
JPS63311548A (en) Cache memory controlling system
JPS6116348A (en) Buffer memory device
JPH1055303A (en) Memory system
JPH05289940A (en) Cache memory control system
JPH02224158A (en) Cache memory device, data processor, data access method, and method for storing data in cache memory
JPS61211752A (en) Page hysteresis memory device

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term