JPH02125347A - Data buffer device for cache replace - Google Patents

Data buffer device for cache replace

Info

Publication number
JPH02125347A
JPH02125347A JP63277425A JP27742588A JPH02125347A JP H02125347 A JPH02125347 A JP H02125347A JP 63277425 A JP63277425 A JP 63277425A JP 27742588 A JP27742588 A JP 27742588A JP H02125347 A JPH02125347 A JP H02125347A
Authority
JP
Japan
Prior art keywords
address
data
mpu
cache
replace
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
JP63277425A
Other languages
Japanese (ja)
Inventor
Toshiyuki Muta
俊之 牟田
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 JP63277425A priority Critical patent/JPH02125347A/en
Publication of JPH02125347A publication Critical patent/JPH02125347A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the processing efficiency by reading access object data in a buffer to transfer it to an MPU at the time of coincidence between a replace address and a new access address of the MPU and data read. CONSTITUTION:A replace address register (REPADR) 11 holds the replace address as the address of cache replace. A replace data buffer (REP buffer) 12 holds data of replace. An address comparing part 13 compares the replace address in the REPADR 11 with contents of the MPU access address corresponding to the replace address. When the comparison in the address comparing part 13 results in coincidence and data read is indicated, a data transfer control part 14 reads access object data in the REP buffer 12 and transfers it to an MPU 20. Thus, data of replace can be read without waiting for the end of the replace processing in a cache memory device 30.

Description

【発明の詳細な説明】 〔概 要〕 キャッシュメモリ装置がリプレース中のデータをリード
するアクセスを保証するキャッシュリプレース用データ
バッファ装置に関し、 リプレースの終了を待つことなくリプレース中のデータ
をリードしてMPUに転送して処理効率を向上させるこ
とを目的とし、 キャッシュメモリ装置がリプレース中に、MPUよりリ
プレース中のデータをリードすべく新たに起動されたア
クセスを保証するキャッシュリプレース用データバッフ
ァ装置であって、キャッシユリプレース中のリプレース
アドレスを保持するレジスタと、リプレース中のデータ
を保持するリプレースデータバッファと、リプレースア
ドレスとMPUの新たなアクセスアドレスを比較するア
ドレス比較部と、両アドレスが一致しかつリード時の場
合に、前記バッファ内のアクセス対象データをリードし
てMPUに転送するデータ転送制御部を設けるように構
成する。
[Detailed Description of the Invention] [Summary] Regarding a data buffer device for cache replacement that guarantees access to read the data being replaced by a cache memory device, the data buffer device for cache replacement can read the data being replaced without waiting for the end of the replacement to A data buffer device for cache replacement that guarantees newly activated access to read the data being replaced from an MPU while the cache memory device is being replaced. , a register that holds the replace address during cache replacement, a replace data buffer that holds the data that is being replaced, and an address comparison unit that compares the replace address with the new access address of the MPU. In this case, a data transfer control unit is provided to read the access target data in the buffer and transfer it to the MPU.

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

本発明は、情報処理装置のキャッシュメモリ装置がリプ
レース中に、プロセッサよりリプレース中のデータをリ
ードすべく新たに起動されたアクセスを保証するキャッ
シュリプレース用データバッファ装置に関する。
The present invention relates to a data buffer device for cache replacement that guarantees newly activated access from a processor to read data being replaced while a cache memory device of an information processing device is being replaced.

〔従来の技術〕[Conventional technology]

キャッシュメモリ装置は、主メモリ装置とプロセッサの
速度差を調整するために設けられる小容量の高速なメモ
リ装置であるが、近年、小型計算機の分野においてもそ
の性能の大幅な向上に伴い、キャッシュメモリ装置の重
要性がクローズアップされるようになってきた。
A cache memory device is a small-capacity, high-speed memory device that is installed to adjust the speed difference between the main memory device and the processor, but in recent years, with the significant improvement in performance in the field of small computers, cache memory The importance of equipment has come into focus.

プロセッサは主メモリ装置をアクセスするとき、最初に
キャッシュメモリ装置をアクセスし、ヒツトしたときは
そのアドレス領域にリード又はライトを行う。これによ
り、データのり一ド/ライト処理を高速に行うことがで
きる。キャッシュメモリ装置にミスヒントしたときは、
キャッシュメモリ装置よりアクセスの可能性が低いプロ
・ツクを追い出して空きブロックを作り、そこにアクセ
ス対象のある新ブロックを格納するリプレース処理が行
われる。
When the processor accesses the main memory device, it first accesses the cache memory device, and when a hit occurs, reads or writes to that address area. Thereby, data paste/write processing can be performed at high speed. When a miss hint occurs in the cache memory device,
A replacement process is performed in which a program with a lower possibility of access is evicted from the cache memory device to create an empty block, and a new block to be accessed is stored therein.

以下、第5図〜第7図を参照して、従来のキャッシュメ
モリ装置とその動作を、ダイレクトマツピングのキャッ
シュメモリ装置の場合を例にとって説明する。
Hereinafter, a conventional cache memory device and its operation will be described with reference to FIGS. 5 to 7, taking a direct mapping cache memory device as an example.

第5図は、従来のキャッシュメモリ装置の構成をブロッ
ク図で示したものである。図において、20はプロセッ
サ(以下MPUで示す)、30はキャッシュメモリ装置
である。なお、図中の各構成要素及び経路中に表示され
る小文字の数字は、データのビット数を示すものである
FIG. 5 is a block diagram showing the configuration of a conventional cache memory device. In the figure, 20 is a processor (hereinafter referred to as MPU), and 30 is a cache memory device. Note that lowercase numbers displayed in each component and route in the diagram indicate the number of bits of data.

MPU20において、21はMPUアクセスアドレスレ
ジスタ(以下MPUADRで示す)で、MPU20のア
クセスアドレスが格納される。MPUアクセスアドレス
はθ〜31032ビットで、15〜31の17ビツトが
上位アドレスを形成し、下位4〜14の11ビツトがC
ACHEアドレスを形成し、下位2〜14の13ビツト
がCACHEアクセスアドレスを形成する。
In the MPU 20, 21 is an MPU access address register (hereinafter referred to as MPUADR) in which the access address of the MPU 20 is stored. The MPU access address is θ ~ 31032 bits, the 17 bits 15 to 31 form the upper address, and the lower 11 bits 4 to 14 form the C address.
The lower 2 to 14th 13 bits form the CACHE access address.

キャッシュメモリ装置30において、31はTAGメモ
リで、2にエントリを有し、各エントリにはMPUアク
セスアドレスの上位アドレス(15〜31ビツト)が格
納される。
In the cache memory device 30, 31 is a TAG memory, which has entries at 2, each entry storing an upper address (15 to 31 bits) of the MPU access address.

32はスルーラッチで、MPUアクセスアドレスから下
位4〜14ビツトのCACHEアドレスを受け、MPU
20の発行するリプレース信号(以下REP信号で示す
)が加えられたときはこのキャッシュアドレスをラッチ
し、それ以外のときはスルーで通してTAGメモリ31
及び後述するデータメモリに加える。
32 is a through latch that receives the CACHE address of the lower 4 to 14 bits from the MPU access address, and
When a replace signal (hereinafter referred to as REP signal) issued by 20 is added, this cache address is latched, and otherwise it is passed through and stored in the TAG memory 31.
and added to the data memory described later.

33はアドレス比較部で、MPUADR21及びTAG
メモリ31よりリードしたMPUアクセスアドレスの上
位アドレス(15〜31ビツト)を比較し、一致したと
きにHIT信号を出力する。
33 is an address comparison section, MPUADR21 and TAG
The upper address (15 to 31 bits) of the MPU access address read from the memory 31 is compared, and when they match, a HIT signal is output.

このHIT信号によりアクセスが正常に行われたことを
MPU20に応答する応答信号が作成される。
This HIT signal generates a response signal that responds to the MPU 20 that the access has been performed normally.

34はデータメモリで、ロングワード(4バイト)幅で
32KBの容量を持ち、キャッシュデータが格納される
RAMである。
34 is a data memory, which is a RAM having a long word (4 byte) width and a capacity of 32 KB, and in which cache data is stored.

35はアドレスカウンタで、MPUADR21のビット
2及びピット3を受け、TAGメモリ31にリプレース
されるlブロック(16バイト)中の4バイトデータ(
ロングワード)のアドレスを示すアドレスビットを、リ
プレース中にカウントする。
35 is an address counter which receives bit 2 and pit 3 of MPUADR 21 and stores 4-byte data (
The address bits indicating the address of the longword are counted during replacement.

36はアドレスセレクタで、REP信号を受けたとき、
すなわちリプレース時はアドレスカウント35の出力す
るアドレスビット(2ビツト)をセレクトし、REP信
号がオフのとき、すなわちリプレースでない通常アクセ
ス時は、MPUADR21のビット2及びビット3をセ
レクトする。
36 is an address selector, and when receiving the REP signal,
That is, at the time of replacement, the address bits (2 bits) output by the address count 35 are selected, and when the REP signal is off, that is, at the time of normal access other than replacement, bits 2 and 3 of the MPUADR 21 are selected.

37はトランシーバで、2個のドライバ371及び37
2を有し、MPU20のデータ転送を行うMPUデータ
バス38とデータメモリ34のデータ転送を行うCAC
HEデータバス39を結合する。ドライバ371はCA
CHEデータバスのデータをMPUデータバス38に送
出し、ドライバ372はMPUデータバス38のデータ
をCACHEデータバス39に送出する。
37 is a transceiver, and two drivers 371 and 37
2, and performs data transfer between the MPU data bus 38 and the data memory 34, which performs data transfer between the MPU 20 and the data memory 34.
Connect HE data bus 39. Driver 371 is CA
The data on the CHE data bus is sent to the MPU data bus 38, and the driver 372 sends the data on the MPU data bus 38 to the CACHE data bus 39.

次に、第5図のバッファ制御動作を、MPUアクセスア
ドレスがキャッシュメモリにヒツトしたときとミスヒツ
トしたときに分けて説明する。
Next, the buffer control operation shown in FIG. 5 will be explained separately for when the MPU access address hits the cache memory and when it misses.

(a)  キャッシュメモリにヒツト時の動作MPUア
クセスアドレスがキャッシュメモリにヒツトしたときの
動作を、第6図の動作タイミングチャートを参照して説
明する。
(a) Operation when the cache memory is hit The operation when the MPU access address hits the cache memory will be explained with reference to the operation timing chart of FIG.

アクセス起動時は、MPU30が発行するアドレススト
ローブ(第6図の■)により、MPUADR21に格納
されたMPUアクセスアドレス中のCACHEアドレス
(下位4〜14ビツト)がスルーラッチ32に加えられ
る(第6図の■)。
At the time of access activation, the CACHE address (lower 4 to 14 bits) in the MPU access address stored in the MPUADR 21 is added to the through latch 32 by the address strobe (■ in Fig. 6) issued by the MPU 30 (Fig. 6). ■).

アクセス起動時はMPU20の送出するREP信号はオ
フであるので、CACHEアドレスはスルーラッチ22
をスルーで通ってTAGメモリ31に加えられる(第6
図の■)。なお、最初のMPUアクセスアドレスはリー
ドアドレスであり、次ぎはライトアドレスである。
Since the REP signal sent by the MPU 20 is off when access is activated, the CACHE address is stored in the through latch 22.
is added to the TAG memory 31 (6th
■) in the figure. Note that the first MPU access address is a read address, and the next is a write address.

TAGメモリ31は、入力されたCACHEアドレスで
アクセスされるデータ、すなわちMPUアクセスアドレ
スの上位アドレス(15〜31ビツト)をリードしてア
ドレス比較部23に加える。
The TAG memory 31 reads the data accessed by the input CACHE address, that is, the upper address (15 to 31 bits) of the MPU access address, and adds it to the address comparator 23.

アドレス比較部33は、TAGメモリ31から入力され
たMPUアクセスアドレスの上位アドレスとMPUAD
R21よりリードしたMPUアクセスアドレスの上位ア
ドレスを比較し、両者が一致したときは、キャッシュメ
モリにヒツトしたことをMPU20に通知する。MPU
20は、キャッシュメモリにヒントしたときは、MPU
アクセスアドレス中のライトアドレスに同期してキャッ
シュデータ・ライトイネーブル信号(以下キャッシュデ
ータWE信号で示す)を発生する(第6図■)また、R
EP信号はオフに保持される。
The address comparison unit 33 compares the upper address of the MPU access address inputted from the TAG memory 31 and the MPUAD.
The upper address of the MPU access address read from R21 is compared, and when the two match, the MPU 20 is notified that the cache memory has been hit. MPU
20 is when the cache memory is hinted, the MPU
A cache data write enable signal (hereinafter referred to as cache data WE signal) is generated in synchronization with the write address in the access address (Fig. 6).
The EP signal is held off.

また、キャッシュメモリにヒツトしたときは、リプレー
スは行われないので、TAGメモリ31にMPUアクセ
スアドレスの上位ビットのライトを行うためのTAGラ
イト信号(TAG  WT倍信号示される)は発生され
ない(第6図■)、またアドレスカウンタ35の出力は
利用されないか又は作動されない(第6図の■)。
Furthermore, when the cache memory is hit, no replacement is performed, so the TAG write signal (indicated by the TAG WT times signal) for writing the upper bits of the MPU access address to the TAG memory 31 is not generated (the 6th (■ in FIG. 6), and the output of the address counter 35 is not used or is not activated (■ in FIG. 6).

REP信号がオフのとき、すなわちキャッシュメモリに
ヒツトしたときは、アドレスセレクタ36はMPUAD
R31のヒツト2及びビット3をセレクトする。このセ
レクトされたMPUアクセスアドレスのビット2及びヒ
ツト3は、スルーラッチ32からの下位4〜14ビツト
と結合され2〜14の13ビツトのCACHEアクセス
アドレスとしてデータメモリ34に加えられる。このC
ACHEアクセスアドレスにより、データメモリ34が
アクセスされる。
When the REP signal is off, that is, when the cache memory is hit, the address selector 36
Select hit 2 and bit 3 of R31. Bits 2 and 3 of the selected MPU access address are combined with the lower 4 to 14 bits from the through latch 32 and added to the data memory 34 as a 13-bit CACHE access address 2 to 14. This C
Data memory 34 is accessed by the ACHE access address.

データメモリ34は、CACHEアクセスアドレスでア
クセスされたデータ(4バイト幅)を取り出し、リード
時は、CACHEデータバス39→ドライバ371→M
PUデータバス38の経路でMPU20に転送する(第
6図■、■のり一ド時)、またライト時は、MPU20
→MPUデータバス38→ドライバ371→CACHE
データバス39の経路でデータメモリ34に加えられた
データを、キャッシュデータWE信号を低レベルになっ
たタイミングでデータメモリ34上のCACHEアクセ
スアドレスエントリにライトする。
The data memory 34 takes out the data (4-byte width) accessed by the CACHE access address, and when reading, the CACHE data bus 39→driver 371→M
It is transferred to the MPU 20 via the route of the PU data bus 38 (Fig.
→MPU data bus 38 → driver 371 → CACHE
The data added to the data memory 34 through the path of the data bus 39 is written to the CACHE access address entry on the data memory 34 at the timing when the cache data WE signal becomes low level.

以上のようにして、キャッシュメモリにヒツトしたとき
は、そのデータメモリ34にアクセスして直ちにリード
/ライトが行われるので、リード/ライト処理を高速に
行うことができる。
As described above, when a cache memory is hit, the data memory 34 is accessed and read/write is performed immediately, so that read/write processing can be performed at high speed.

(bl  キャッシュメモリにミスヒント時の動作MP
Uアクセスアドレスがキャッシュメモリにミスヒツトし
たときの動作を、第7図の動作タイミングチャートを参
照して説明する。
(bl Operation MP when there is a miss hint in cache memory
The operation when the U access address misses the cache memory will be explained with reference to the operation timing chart of FIG.

前述の(a)のヒツト時の動作の場合と同様に、アクセ
ス起動時は、MPU20が発行するアドレスストローブ
(第7図Φの10時点前)により、MPUADR21に
格納されたMPUアクセスアドレス中のCACHEアド
レス(下位4〜14ビツト)がスルーラッチ32に加え
られる(第7図■の10時点前)。アクセス起動時はR
EP信号はオフであるので、CACHEアドレスはスル
ーラッチ32をスルーで通ってTAGメモリ31に加え
られる(第7図■の10時点前)。
As in the case of the hit operation in (a) above, when access is started, the address strobe issued by the MPU 20 (before time 10 of Φ in FIG. 7) causes the CACHE in the MPU access address stored in the MPUADR 21 to be The address (lower 4 to 14 bits) is added to the through latch 32 (before time 10 in Figure 7). R when starting access
Since the EP signal is off, the CACHE address passes through the through latch 32 and is added to the TAG memory 31 (before time 10 in FIG. 7).

TAGメモリ31は、入力されたCACHEアドレスよ
りMPUアクセスアドレスの上位アドレス(15〜31
ビツト)をリードしてアドレス比較部33に送る。アド
レス比較部33は、TAGメモリ31及びMPUADR
21より入力されたMPUアクセスアドレスの両上位ア
ドレスを比較し、両者が不一致のときは、キャッシュメ
モリにミスヒツトしたことをMPU20に通知する。
The TAG memory 31 stores addresses higher than the input CACHE address (15 to 31) of the MPU access address.
bit) and sends it to the address comparison section 33. The address comparison unit 33 includes the TAG memory 31 and the MPUADR.
Both upper addresses of the MPU access address inputted from 21 are compared, and if they do not match, the MPU 20 is notified that there has been a miss in the cache memory.

MPU20は、キャッシュメモリにミスヒツトしたとき
は、リプレース処理を行うためにREP信号をオンにし
く第7図の10時点)、図示しない主メモリ装置に対し
て1ブロツク(16バイト)の転送制御を開始する。
When there is a miss in the cache memory, the MPU 20 turns on the REP signal to perform the replacement process (time 10 in FIG. 7) and starts controlling the transfer of one block (16 bytes) to the main memory device (not shown). do.

REP信号がオンになると、スルーラッチ32は入力中
のCACHEアドレスをラッチする(第7図■の10時
点以後)。
When the REP signal is turned on, the through latch 32 latches the CACHE address being input (after time 10 in Figure 7).

一方、セレクタ36は、REP信号がオンになるとアド
レスカウンタ35の出力をセレクトする。
On the other hand, the selector 36 selects the output of the address counter 35 when the REP signal is turned on.

アドレスカウンタ35はMPUADR31のMPUアク
セスアドレスのビット2及びビット3をカウントアツプ
し、そのカウント値(01,10゜11.00)を順番
に出力する(第7図の■)。
The address counter 35 counts up bits 2 and 3 of the MPU access address of the MPUADR 31, and sequentially outputs the count values (01, 10°, 11.00) (■ in FIG. 7).

MPU20は、MPUアドレスストローブに同期してT
AGWT信号を発生してTAGメモリ31に加える(第
7図の■)。これにより、MPUADR21にあるMP
Uアクセスアドレスの上位アドレス(15〜31ビツト
)がTAGメモリ31上のCACHEアドレスエントリ
にライトされる。
The MPU 20 synchronizes with the MPU address strobe.
The AGWT signal is generated and added to the TAG memory 31 (■ in FIG. 7). As a result, the MP in MPUADR21
The upper address (15 to 31 bits) of the U access address is written to the CACHE address entry on the TAG memory 31.

更にMPU20は、図示しない主メモリ装置のニブルモ
ードを使って4バイトづつ4回に分けて1ブロツクのリ
プレースデータを取り出し、データメモリ34に転送す
る(第7図の■)、それとともに、各4バイトデータ転
送に同期して、キャッシュデータWE信号をデータメモ
リ34に加える(第7図の■)。なお、前述のアドレス
カウンタ35のカウント動作と各4バイトデータ転送及
びキャッシュデータWEの送出は、同期して行われる。
Furthermore, the MPU 20 uses the nibble mode of the main memory device (not shown) to extract one block of replacement data in four bytes each, and transfers it to the data memory 34 (■ in FIG. 7). In synchronization with the byte data transfer, the cache data WE signal is added to the data memory 34 (■ in FIG. 7). Note that the above-mentioned counting operation of the address counter 35, each 4-byte data transfer, and the sending of the cache data WE are performed in synchronization.

一方、アドレスセレクタ36でセレクトされたアドレス
カウンタ35の2ビツト出力はスルーラッチ32にラッ
チされたCACHEアドレス(4〜14ビツト)と結合
され、MPUアクセスアドレスの下位2〜14の13ビ
ツトのCACHEアクセスアドレスとなってデータメモ
リ34に加えられる。このCACHEアクセスアドレス
は、CAC)IEアドレスより4バイト単位のデータエ
ントリを4個(16バイトの1ブロツク分)順番にアク
セスする。
On the other hand, the 2-bit output of the address counter 35 selected by the address selector 36 is combined with the CACHE address (4 to 14 bits) latched by the through latch 32, and the 13-bit CACHE access of the lower 2 to 14 bits of the MPU access address is The address is added to the data memory 34. This CACHE access address sequentially accesses four data entries (one block of 16 bytes) in units of 4 bytes from the CAC/IE address.

これにより、CACHEアクセスアドレスに対応するデ
ータメモリ34上の4個のデータエントリには、図示し
ない主メモリ装置から転送された4個の4バイトデータ
(1ブロツク分のデータ)が格納される。
As a result, four pieces of 4-byte data (data for one block) transferred from the main memory device (not shown) are stored in the four data entries on the data memory 34 corresponding to the CACHE access address.

リプレースデータ中、最初の4バイトデータはミスヒツ
トしたアクセス対象データであるので、トランシーバ3
7は、主メモリ装置から転送される16バイトのリプレ
ースデータ中の最初の4バイトデータをCACHEデー
タバス→ドライバ371→MPUデータバス38の経路
でMPU20に送る(第7図の■)。
The first 4 bytes of the replacement data are the data to be accessed due to a mishit, so the transceiver 3
7 sends the first 4 bytes of the 16 bytes of replacement data transferred from the main memory device to the MPU 20 via the route of CACHE data bus→driver 371→MPU data bus 38 (■ in FIG. 7).

MPU20は、この4バイトデータをサンプルした後バ
スサイクルを終了するように制御する。
The MPU 20 controls the bus cycle to end after sampling this 4-byte data.

リプレースが行われるT、以後はキャッシュメモリ装置
30はビジーとなり、アクセスは■止される。したがっ
て、MPU20はバスサイクルを再開することは可能で
あるが、キャッシュメモリ装置30は参照するアクセス
であれば、リプレースが終了するまで待ち状態になり、
リプレース終7後にアクセスが起動される。
After T when the replacement is performed, the cache memory device 30 becomes busy and access is stopped. Therefore, the MPU 20 can restart the bus cycle, but if the access is for reference, the cache memory device 30 will be in a waiting state until the replacement is completed.
Access is activated 7 after the replacement is completed.

以上のようにして、キャッシュメモリにミスヒツトした
ときは、リプレース処理が行われる。
As described above, when a cache memory miss occurs, replacement processing is performed.

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

従来のキャッシュメモリ制御方式は、前述のように、キ
ャッシュメモリにミスヒツトしてリプレース処理を行っ
ているときは、キャッシュメモリを参照することができ
ず、リプレース終了まで待ち状態になる。
As described above, in the conventional cache memory control system, when a cache memory miss occurs and replacement processing is being performed, the cache memory cannot be referenced and the cache memory remains in a waiting state until the replacement is completed.

このため無駄な待ち時間が生じ、処理効率が低下すると
いう問題があった。特に、近年のように小型計算機の分
野においても処理の高速化が要望されるに伴い、この問
題も顕在化するようになってきた。
This causes a problem of unnecessary waiting time and reduced processing efficiency. In particular, this problem has become more apparent as there has been a demand for faster processing in the field of small computers in recent years.

本発明は、リプレース中に次のキャッシュメモリに対す
るアクセスがリードで、かつリプレース中のブロックで
ある場合に、リプレースの終了を待つことなくリプレー
ス中のデータをリードしてプロセッサ20に転送して処
理効率を向上させるように改良したキャッシュリプレー
ス用データバッファ装置を提供することを目的とする。
The present invention improves processing efficiency by reading the data being replaced and transferring it to the processor 20 without waiting for the end of the replacement when the next access to the cache memory during replacement is a read and the block being replaced. An object of the present invention is to provide a data buffer device for cache replacement which is improved so as to improve the performance.

〔課題を解決するための手段〕[Means to solve the problem]

プログラムは、その実行中に大きな分岐をすることは少
なく、利用するプログラムのアドレスは前のアドレスか
ら次のアドレスへと時間的に順番に移動することが多い
という性質を有し、この性質は、プログラムの動作特性
の局所性と呼ばれているものである。
A program has the property that it rarely makes large branches during its execution, and the address of the program it uses often moves sequentially in time from the previous address to the next address. This is called the locality of the program's behavior characteristics.

キャッシュメモリは本来このプログラムの動作特性の局
所性を利用したもので、最近アクセスされたアドレスの
近傍のアドレスのデータが格納されている。これにより
、MPUアクセスアドレスがキャッシュメモリにヒツト
する可能性を高くしている。この場合、リプレースされ
たブロック内のデータにアクセスされる可能性は、プロ
グラムの動作特性の局所性から特に高いと考えられる。
Cache memory originally takes advantage of the locality of the program's operating characteristics, and stores data at addresses near the most recently accessed address. This increases the possibility that the MPU access address will hit the cache memory. In this case, the possibility that data in the replaced block will be accessed is considered to be particularly high due to the locality of the operating characteristics of the program.

本発明は、この点に着目してリプレースされたブロック
内のデータにアクセスされた場合に、そのデータをリプ
レース中に転送できるようにしたものである。
The present invention focuses on this point and makes it possible to transfer the data during replacement when data in a replaced block is accessed.

以下、前述の課題を解決するために本発明が採用した手
段を、第1図を参照して説明する。第1図は、本発明の
基本構成をブロック図で示したものである。
Hereinafter, the means adopted by the present invention to solve the above-mentioned problems will be explained with reference to FIG. FIG. 1 is a block diagram showing the basic configuration of the present invention.

第1図において、lOは本発明のデータバッファ装置、
20はプロセッサ(MPUで示す)である。
In FIG. 1, lO is the data buffer device of the present invention;
20 is a processor (indicated by MPU).

MPU20において、21はMPUアクセスアドレスレ
ジスタ(MAADRで示す)で、MPU20のアクセス
アドレスが格納される。
In the MPU 20, 21 is an MPU access address register (indicated by MAADR) in which the access address of the MPU 20 is stored.

データバッファ装置10において、11はリプレースア
ドレスレジスタ(以下REPADRで示す)で、キャッ
シュリプレース中のアドレスでリプレースアドレスを保
持する。
In the data buffer device 10, 11 is a replace address register (hereinafter referred to as REPADR), which holds a replace address at an address during cache replacement.

12はリプレニスデータバソファ(以下REPバフファ
で示す)で、リプレース中のデータを保持する。
12 is a replacement data buffer (hereinafter referred to as REP buffer), which holds data being replaced.

13はアドレス比較部で、REPADRI 1のリプレ
ースアドレスと該リプレースアドレスに対応するMPU
アクセスアドレスの内容を比較する。
13 is an address comparison unit that compares the replacement address of REPADRI 1 and the MPU corresponding to the replacement address.
Compare the contents of access addresses.

14はデータ転送制御部で、アドレス比較部13でアド
レスの一致がとれかつリード時の場合に、REPバンフ
ァ12内のアクセス対象データをリードして、MPU2
0に転送する制御を行う。
14 is a data transfer control unit which reads the access target data in the REP buffer 12 when the addresses match in the address comparison unit 13 and is read, and sends the data to the MPU 2.
Controls transfer to 0.

30は、キャッシュメモリ装置である。このキャッシュ
メモリ装置30の内容すなわち、TAGメモリ31、ス
ルーラッチ32、アドレス比較部33、データメモリ3
4、アドレスカウンタ35、アドレスセレクタ36、ト
ランシーバ37、ドライバ371,372、MPUデー
タバス38、CACHEデータバス39等は第5図で説
明したとおりであるので、説明は省略する。
30 is a cache memory device. The contents of this cache memory device 30 are TAG memory 31, through latch 32, address comparator 33, and data memory 3.
4. The address counter 35, address selector 36, transceiver 37, drivers 371, 372, MPU data bus 38, CACHE data bus 39, etc. are as explained in FIG. 5, so their explanation will be omitted.

〔作 用〕[For production]

第1図に示す本発明の動作を、第2図の動作タイミング
チャートを参照して説明する。
The operation of the present invention shown in FIG. 1 will be explained with reference to the operation timing chart of FIG.

第2図の動作タイミングチャート中の■〜■により行わ
れる動作は、従来のキャッシュメモリ装置30によって
行われる動作である。
The operations performed by ■ to ■ in the operation timing chart of FIG. 2 are operations performed by the conventional cache memory device 30.

すなわち、MPU20が発行するアドレスストローブ(
第2図■の10時点前)により、MPUADR21によ
り、MPUADR21に格納されたMPUアクセスアド
レス中のCACHEアドレス部分がスルーラッチ32に
加えられる(第2図■の10時点前)。CAC)IBア
ドレスはスルーラッチ32をスルーで通ってTAGメモ
リ31に加えられる(第2図■の10時点前)。
That is, the address strobe (
2), the CACHE address portion of the MPU access address stored in the MPUADR 21 is added to the through latch 32 by the MPUADR 21 (10 time points before (2) in FIG. 2). The CAC) IB address passes through the through latch 32 and is added to the TAG memory 31 (before time 10 in Figure 2).

TAGメモリ31は、入力されたCACHEアドレスよ
りMPUアドレスの上位アドレスをリードして、アドレ
ス比較部33に送る。アドレス比較部33は、TAGメ
モリ31及びMPUADR21より入力されたMPUア
クセスアドレスの両上位アドレスを比較し、両者が不一
致のときは、キャッシュメモリにミスヒツトしたことを
MPU20に通知する。
The TAG memory 31 reads the higher address of the MPU address from the input CACHE address and sends it to the address comparison section 33 . The address comparison unit 33 compares both upper addresses of the MPU access address inputted from the TAG memory 31 and the MPUADR 21, and when the two do not match, notifies the MPU 20 that there has been a miss in the cache memory.

MPU20は、キャッシュメモリにミスヒツトしたとき
は、リプレース処理を行うためにREP信号をオンにし
く第2図のT0時点)、図示しない主メモリ装置に対し
て転送単位のデータ転送制御を開始する。
When there is a miss in the cache memory, the MPU 20 turns on the REP signal to perform a replacement process (at time T0 in FIG. 2), and starts data transfer control in transfer units to the main memory device (not shown).

REP信号がオンになると、スルーラッチ32は入力中
のCACHEアドレスをラッチする(第2図■の10時
点以降)。
When the REP signal is turned on, the through latch 32 latches the CACHE address being input (after time 10 in Figure 2).

一方、アドレスセレクタ36は、REP信号がオンにな
るとアドレスカウンタ35の出力をセレクトする。アド
レスカウンタ35はMPUADR31のMPUアクセス
アドレスの下位ビットをカウントし、データメモリ34
をアクセスするCACHEアクセスアドレスの下位ビッ
ト値を出力する(第2図の■)。
On the other hand, the address selector 36 selects the output of the address counter 35 when the REP signal is turned on. The address counter 35 counts the lower bits of the MPU access address of the MPUADR 31, and
The lower bit value of the CACHE access address for accessing is output (■ in FIG. 2).

MPU20は、MPUアドレスストローブに同期してT
AGWT信号を発生してTAGメモリ31に加える(第
2図の■)。これにより、MPUADR21にあるMP
Uアクセスアドレスの上位アドレスがTAGメモリ31
上のCACHEアドレスエントリにライトされる。
The MPU 20 synchronizes with the MPU address strobe.
The AGWT signal is generated and added to the TAG memory 31 (■ in FIG. 2). As a result, the MP in MPUADR21
The upper address of the U access address is the TAG memory 31
written to the CACHE address entry above.

更にMPU20は、図示しない主メモリ装置より転送単
位のデータを取り出し、データメモリ34に転送する(
第2図の■)。それととともに、各転送単位のデータ転
送に同期して、キャッシュデータWE信号をデータメモ
リ34に加える(第2図の■)。なお、前述のアドレス
カウンタ35のカウント動作と各転送単位データ転送及
びキャッシュデータWE信号の送出は、同期して行われ
る。
Furthermore, the MPU 20 extracts data in units of transfer from a main memory device (not shown) and transfers it to the data memory 34 (
■) in Figure 2). At the same time, a cache data WE signal is added to the data memory 34 in synchronization with the data transfer of each transfer unit (■ in FIG. 2). Note that the counting operation of the address counter 35 described above, each transfer unit data transfer, and the sending of the cache data WE signal are performed in synchronization.

一方、アドレスセレクタ36でセレクトされたアドレス
カウンタ35の下位ビット出力はスルーラッチ32にラ
ッチされたCACHEアドレスと結合され、CACHE
アクセスアドレスとなって、データメモリ34に加えら
れる。
On the other hand, the lower bit output of the address counter 35 selected by the address selector 36 is combined with the CACHE address latched by the through latch 32, and the CACHE address is
It becomes an access address and is added to the data memory 34.

これにより、データメモリ34には、主メモリ装置から
転送単位で転送されたリプレースデータが格納される(
図には、リプレースデータが4個の転送単位からなる場
合が示されている)。
As a result, the data memory 34 stores the replacement data transferred from the main memory device in transfer units (
The figure shows a case where the replacement data consists of four transfer units).

トランシーバ37は、最初に転送された転送単位のリプ
レース用のデータ部分をMPU20に送る。MPU20
は、この転送単位のデータを受は取ると、以後のバスサ
イクルを終了させる(第2図■)。
The transceiver 37 sends the replacement data portion of the first transferred transfer unit to the MPU 20 . MPU20
After receiving this transfer unit of data, the bus ends the subsequent bus cycle ((2) in FIG. 2).

以上説明した従来のキャッシュメモリ装置のデータメモ
リ34へのリプレースデータの転送と同期して、同じリ
プレースデータが各連送単位で順次REPバッファ12
に格納、保持されて行く (第2図の■、[相]、■、
■)。
In synchronization with the transfer of replacement data to the data memory 34 of the conventional cache memory device described above, the same replacement data is sequentially transferred to the REP buffer 12 for each continuous transmission unit.
(■, [phase], ■, in Figure 2)
■).

また、リプレース中のアドレス(リプレースアドレス)
は、REPADRI 1に保持される。
Also, the address being replaced (replacement address)
is held in REPADRI 1.

MPU20は、最初のアクセスが終了すると、次のMP
Uアクセスアドレスによ5アクセスを開始するが、キャ
ッシュメモリ装置30は前述のリプレース処理中である
ので、アクセスを行うことができない。
When the first access is completed, the MPU 20 starts the next MP
5 access is started using the U access address, but since the cache memory device 30 is undergoing the above-mentioned replacement process, it cannot be accessed.

しかしながら、本発明の場合は、MPUADR21にあ
る前記次のMPUアクセスアドレスの内容がREPAD
R11にあるリプレースアドレスの内容とアドレス比較
部13によって比較される。
However, in the case of the present invention, the content of the next MPU access address in MPUADR21 is
The content of the replace address in R11 is compared by the address comparison unit 13.

アドレス比較部13は、両者の内容の比較結果をデータ
転送制御部14に通知する。
The address comparison unit 13 notifies the data transfer control unit 14 of the comparison result of the contents of both.

データ転送制御部14は、アドレス比較部13でアドレ
スの一致がとれかつリード時である場合に、REPバッ
ファ12内のアクセス対象データをリードしてMPU2
0に転送する。
The data transfer control unit 14 reads the access target data in the REP buffer 12 and sends the MPU 2
Transfer to 0.

アドレス比較部13でアドレスの一致がとれないか、又
は一致がとれてもライト時の場合は、REPバッファ1
2内のアクセス対象データをMPU20に転送すること
は行わない。
If the addresses cannot match in the address comparison unit 13, or even if there is a match, when writing, the REP buffer 1
The data to be accessed in MPU 2 is not transferred to MPU 20.

以上のように、リプレース中のデータを保持するREP
バッファ12を設けてリプレース中でもアクセスできる
ようにしたので、リプレースでもMPUアクセスアドレ
スでREPバフファ12をアクセスすることにより、リ
プレース中のデータをリードすることができる。
As mentioned above, the REP that holds the data being replaced
Since the buffer 12 is provided so that it can be accessed even during replacement, the data being replaced can be read by accessing the REP buffer 12 using the MPU access address.

これにより、キャッシュメモリ装置3oにおけるリプレ
ース処理の終了を待つことなくリプレース中のデータの
リードが可能となり、無駄な待ち時間が無くなってMP
U20の処理効率を向上させることができる。
This makes it possible to read the data being replaced without waiting for the end of the replacement process in the cache memory device 3o, eliminating unnecessary waiting time and allowing MP
The processing efficiency of U20 can be improved.

〔実施例〕 本発明の実施例を、第3図〜第5図を参照して説明する
。第3図は本発明の一実施例の構成の説明図、第4図は
同実施例の動作タイミングチャートである。第5図の従
来のキャッシュメモリ装置20については、°先に説明
したとおりである。
[Example] An example of the present invention will be described with reference to FIGS. 3 to 5. FIG. 3 is an explanatory diagram of the configuration of an embodiment of the present invention, and FIG. 4 is an operation timing chart of the embodiment. The conventional cache memory device 20 shown in FIG. 5 is as described above.

以下の実施例において、リプレース時のデータ転送単位
は4バイトであり、16バイトからなるブロック単位で
リプレースが行われるものとする。
In the following embodiment, it is assumed that the unit of data transfer at the time of replacement is 4 bytes, and replacement is performed in units of blocks each consisting of 16 bytes.

(A)実施例の構成 第3図において、データバッファ装置10. リプレー
スアドレスレジスタ(REPADR)11゜リプレース
デ、−タバソファ (REPバッファ)12、アドレス
比較部13.データ転送制御部14゜プロセッサ(MP
U)20.MPUアクセスアドレスレジスタ(MPUA
DR)21及びキャッシュメモリ装置30については、
第1図で説明したとおりである。
(A) Configuration of Embodiment In FIG. 3, data buffer device 10. Replace address register (REPADR) 11゜Replace address register (REP buffer) 12, address comparison section 13. Data transfer control unit 14゜processor (MP
U)20. MPU access address register (MPUA
DR) 21 and cache memory device 30,
This is as explained in FIG.

また、キャッシュメモリ装置30におけるTAGメモリ
31.スルーラッチ32.アドレス比較部33.データ
メモリ34.アドレスカウンタ35、アドレスセレクタ
36.トランシーバ37゜ドライバ371,372.M
PUデータバス38゜CACHEデータバス39につい
ては、第5図で説明したとおりである。なお、図中に示
されている小文字の数字は、各データのビット数を示す
Furthermore, the TAG memory 31 . Through latch 32. Address comparison section 33. Data memory 34. Address counter 35, address selector 36. Transceiver 37° driver 371, 372. M
The PU data bus 38 and the CACHE data bus 39 are as described in FIG. Note that the lowercase numbers shown in the figure indicate the number of bits of each data.

40は主メモリ制御部で、主メモリに対するアクセス制
御を行ってデータのり−ド/ライトを行・う。
40 is a main memory control unit which controls access to the main memory and performs data reading/writing.

データバッファ装置10において、REPADRllは
スルーランチで構成され、D端子にはMPUADR31
からその4〜31ビツトのMPUアクセスアドレスが入
力され、H(Hold)端子にはREP信号が入力され
る。REP信号がオフのときにMPUアクセスアドレス
はスルーラッチをスルーで通り、REP信号がオンにな
ると、そのときのMPUアクセスアドレスがランチされ
る。
In the data buffer device 10, REPADRll is configured with a through launch, and MPUADR31 is connected to the D terminal.
The MPU access address of 4 to 31 bits is inputted from the MPU access address, and the REP signal is inputted to the H (Hold) terminal. When the REP signal is off, the MPU access address passes through the through latch, and when the REP signal is turned on, the MPU access address at that time is launched.

REPバッファ12は4バイト幅のデータエントリを4
個備え、1ブロツク (16バイト)のリプレースデー
タが保持される。このREPバッファ12・において、
121はデコーダで、キャッシュメモリ装置30のアド
レスカウンタ36の出力をデコードし、RFPバッファ
12の4個のデータエントリをアクセスするアクセス信
号を発生する。
The REP buffer 12 stores four 4-byte wide data entries.
Each block (16 bytes) of replacement data is held. In this REP buffer 12,
A decoder 121 decodes the output of the address counter 36 of the cache memory device 30 and generates access signals for accessing the four data entries of the RFP buffer 12.

122゜〜122.はJK形のフリップフロップ(以下
JKFFで示す)で、REPバッファ12のデータエン
トリ (4個)に設けられ、そのデータエントリの有効
/無効を指示するフラグ(■。〜V、で示す)がセット
される。各JKFF 122o〜122.のに端子には
共通にREP信号の反転信号(*REPで示す)が入力
され、J端子にはデコーダ121からの各アクセス信号
がそれぞれ入力される。REP信号及びデコード信号が
共にオンのときにそのJKFFすなわちフラグはオン(
Hレベル)になって、そのデータエントリの有効が指示
され、デコード信号がオフのときそのJKFFすなわち
フラグはオフ(Lレベル)になってそのデータエントリ
の無効が指示される。
122°~122. is a JK-type flip-flop (hereinafter referred to as JKFF), which is provided at the data entry (4 pieces) of the REP buffer 12, and a flag (indicated by ■.~V) indicating the validity/invalidity of the data entry is set. be done. Each JKFF 122o~122. An inverted signal of the REP signal (indicated by *REP) is commonly input to the terminal, and each access signal from the decoder 121 is input to the J terminal. When both the REP signal and the decode signal are on, the JKFF or flag is on (
When the decode signal is OFF, the JKFF, that is, the flag, becomes OFF (L level) to indicate that the data entry is invalid.

この各フラグ(V O〜■i)は対応するスルーラッチ
(次に説明)のホールド信号としても機能する。
Each of these flags (VO to ■i) also functions as a hold signal for the corresponding through latch (described next).

123゜〜123.はスルーランチで、REPバッファ
12の4個のデータエントリとして機能する。各スルー
ラッチ123゜〜123.のD端子には主メモリ制御部
12からのリプレースデータが入力され、H端子には対
応するJKFF 122゜〜122.からホールド信号
(フラグv0〜V3)が入力される。ホールド信号がオ
ンすなわちフラグがオンになったとき、対応するスルー
ラッチにリプレースデータ(4バイト)がラッチされる
123°~123. are through launches and function as four data entries in the REP buffer 12. Each through latch 123°~123. The replacement data from the main memory control unit 12 is input to the D terminal of , and the corresponding JKFF 122° to 122. A hold signal (flags v0 to V3) is input from. When the hold signal is turned on, that is, the flag is turned on, replacement data (4 bytes) is latched into the corresponding through latch.

124はマルチプレクサ(以下MPXで示す)で、スル
ーラッチ123゜〜1233すなわちデータエントリの
一つをセレクトして出力する。125はインバータで、
REP信号を反転して*RFP信号を発生して、JKF
F 122゜〜122、のに端子に供給する。
124 is a multiplexer (hereinafter referred to as MPX) which selects and outputs one of the through latches 123° to 1233, that is, one of the data entries. 125 is an inverter,
Inverts the REP signal and generates the *RFP signal, JKF
F 122° to 122°, supplied to the terminal.

データ転送制御部14において、141はデコーダで、
MPUADR31のMPUアクセスアドレス中の2及び
3ビツトをデコードし、REPバッファ1204個のデ
ータエントリを順番にセレクトするセレクト信号を発生
する。
In the data transfer control unit 14, 141 is a decoder;
Bits 2 and 3 of the MPU access address of the MPUADR 31 are decoded to generate a select signal that sequentially selects 1204 data entries in the REP buffer.

142はマルチプレクサ(以下MPXで示す)で、デコ
ーダ141からのセレクト信号を受け、JKFF122
゜〜1223の出力するフラグをセレクトする。このセ
レクトされたフラグは、セレクトされたデータエントリ
の有効/無指示信号(以下VALID信号で示す)とし
て用いられる。
142 is a multiplexer (hereinafter referred to as MPX) which receives the select signal from the decoder 141 and outputs the JKFF122
Select the flag to be output from ゜ to 1223. This selected flag is used as a valid/no indication signal (hereinafter referred to as a VALID signal) of the selected data entry.

143はドライバで、MPX 124でセレクトされた
データエントリのリプレースデータをMPUデータバス
38に出力する。
A driver 143 outputs replacement data for the data entry selected by the MPX 124 to the MPU data bus 38.

144はAND回路で、REP、信号(2クロツク遅延
されたREP信号)、アドレス比較部13からのHIT
信号及びリード時を示すREAD信号がともにオンのと
きに出力してドライバ143を作動させる。なお、RE
AD/WRITE信号はMPU20より送出される。
144 is an AND circuit that outputs REP, the signal (REP signal delayed by 2 clocks), and HIT from the address comparator 13.
When both the signal and the READ signal indicating read time are on, the driver 143 is activated. In addition, RE
The AD/WRITE signal is sent from the MPU 20.

145はAND回路で、MPX142からの■ALiD
信号、REP、、READ信号及びアドレス比較部13
からのHIT信号がともにオンのときに、アクセスが正
常に行われたことを指示する応答信号を出力する。
145 is an AND circuit, ■ALiD from MPX142
Signal, REP, READ signal and address comparison section 13
When both the HIT signals from the terminal are on, a response signal indicating that the access has been performed normally is output.

(B)実施例の動作 第3図の実施例の動作を、第4図の動作タイミングチャ
ートを参照して説明する。
(B) Operation of the Embodiment The operation of the embodiment shown in FIG. 3 will be explained with reference to the operation timing chart of FIG. 4.

MPLJ20は、システムのクロック(第4図の■)に
同期してMPUアドレスストローブ及びキャッシュメモ
リ装置20をアクセスするMPUアクセスアドレスを発
行する(第4図の■、■)。
The MPLJ 20 issues an MPU address strobe and an MPU access address for accessing the cache memory device 20 (■, ■ in FIG. 4) in synchronization with the system clock (■ in FIG. 4).

このMPUアドレス(0〜31ビツト)は、MPUAD
R31に格納される。
This MPU address (0 to 31 bits) is
Stored in R31.

キャッシュメモリ装置20においては、先に第1図で説
明したと同じようにしてアドレス比較部33によるヒツ
ト判定が行われる。
In the cache memory device 20, the hit determination is performed by the address comparator 33 in the same manner as described above with reference to FIG.

アドレス比較部34は、TAGメモリ31の上位アドレ
スとMPUADR31の上位アドレス(15〜31ビツ
ト)が一致しないと、MPU20にミスヒントを通知す
る。
The address comparator 34 notifies the MPU 20 of a miss hint if the upper address of the TAG memory 31 and the upper address (15 to 31 bits) of the MPUADR 31 do not match.

MPU20は、このミスヒツト通知を受けると、リプレ
ース処理を行うためにREP信号をオンにしく第4図の
■)、主メモリ制御部40に対して1ブロツクのリプレ
ースデータの転送制御を開始する。このREP信号は、
キャッシュメモリ装置30のスルーラッチ32.アドレ
スセレクタ36゜REPバッファ12のJKFFl 2
2゜〜1223の各に端子及びREPADR11を構成
するスルーラッチのH端子に加えられる。
When the MPU 20 receives this miss notification, it turns on the REP signal to perform the replacement process ((■) in FIG. 4), and starts controlling the transfer of one block of replacement data to the main memory control unit 40. This REP signal is
Through latch 32 of cache memory device 30. Address selector 36° REP buffer 12 JKFFl 2
It is applied to each of the terminals 2° to 1223 and the H terminal of the through latch forming the REPADR 11.

アドレスセレクタ36は、REP信号を受けるとアドレ
スカウンタ35の出力するアドレスを選択する。アドレ
スカウンタ36は、MPUアクセスアドレスのビット2
及びビット3を受け、リプレース中の16バイトデータ
(1ブロツク)を4バイト単位で区別するアドレス(0
1,10,11,00)を2クロック周期で発生する(
第4図■)。
Address selector 36 selects the address output by address counter 35 upon receiving the REP signal. The address counter 36 is bit 2 of the MPU access address.
and bit 3, the address (0
1, 10, 11, 00) in two clock cycles (
Figure 4 ■).

以下、第1図、第2図、第5図及び第7図で説明したと
同じリプレース処理が行われる。すなわち、TAGメモ
リ31にミスヒツトしたMPUアクセスアドレスの上位
アドレスがライトされ、主メモリ制御部40からは、1
ブロツク(16バイト)のリプレースデータが4バイト
単位で転送されてデータメモリ34に順次格納される。
Thereafter, the same replacement processing as explained in FIG. 1, FIG. 2, FIG. 5, and FIG. 7 is performed. That is, the upper address of the MPU access address that has missed is written to the TAG memory 31, and the main memory control unit 40 writes 1
The block (16 bytes) of replacement data is transferred in units of 4 bytes and sequentially stored in the data memory 34.

その際、MPUアクセスアドレス(アドレスカウンタ3
5のアドレスがrolJ)によってアクセスされたデー
タ(4バイト)は、ドライバ371及びMPUデータバ
ス38を経由してMPU20に送られる(第4図の@)
At that time, the MPU access address (address counter 3
The data (4 bytes) accessed by address 5 (rolJ) is sent to the MPU 20 via the driver 371 and the MPU data bus 38 (@ in FIG. 4).
.

MPU20は更に、REP信号を2クロツク(4バイト
の転送処理時間)遅延させたREP、信号を発生してA
ND回路144及び145に加える(第4図の■)。
The MPU 20 further generates a REP signal that is delayed by 2 clocks (4 byte transfer processing time) from the REP signal, and
It is added to the ND circuits 144 and 145 (■ in FIG. 4).

一方、REPバッファ12のデコーダ121は、アドレ
スカウンタ36のアドレスをデコードし、REPバッフ
ァ12の4個のデータエントリをアクセスするアクセス
信号を発生する。アドレスカウンタ36のアドレス値r
oIJ、rlOJ、r11」及び「00」に対応して、
JKFF122゜、1221.122□及び122.に
デコードされたアクセス信号が加えられる。
On the other hand, the decoder 121 of the REP buffer 12 decodes the address of the address counter 36 and generates an access signal for accessing the four data entries of the REP buffer 12. Address value r of address counter 36
oIJ, rlOJ, r11” and “00”,
JKFF122°, 1221.122□ and 122. The decoded access signal is added to the

このアクセス信号を受け、JKFF122o〜122、
は、順番にオンになってフラグvo、V1.v2及びV
、を発生する(第4図の■〜[相])。
Upon receiving this access signal, JKFF122o~122,
are turned on in order and the flags vo, V1. v2 and V
, is generated (■ to [phase] in Fig. 4).

このフラグv0〜V、はホールド信号となって対応する
スルーラッチ123゜〜123.に加えられ、そのとき
主メモリ制御部40より転送された各4バイトデータを
ラッチする。これにより、スルーラッチ123゜にはア
ドレスカウンタ36のアドレス値が「00」のときの4
バイトデータD0がラッチされ、以下、スルーラッチ1
23+。
These flags v0 to V serve as hold signals to the corresponding through latches 123° to 123. and latches each 4-byte data transferred from the main memory control unit 40 at that time. As a result, the through latch 123° has 4 bits when the address value of the address counter 36 is “00”.
Byte data D0 is latched, and hereafter, through latch 1
23+.

123を及び123.には、アドレス値が「Ol」「1
0」及び「11」のときの4バイトデータD+、1)g
及びり、がラッチされる(第4図の@〜■)。
123 and 123. The address value is "Ol""1"
4-byte data D+, 1)g when “0” and “11”
and are latched (@~■ in Fig. 4).

ミスヒツトした次にアクセスを行うMPUアクセスアド
レスがMPUADR31にセットされると、データバッ
ファ装置10のアドレス比較部13は、MPUADR3
1のMPUアクセスアドレス(4〜31ビツト)とRE
PADR11にラッチされたリプレースアドレスを比較
する。REPADRIIには、REP信号が加えられた
ときにラッチされたMPUアクセスアドレス(4〜31
ビツト)が保持されている。次のMPUアクセスアドレ
スがリプレース中のブロック内のデータをアクセスする
ときは、そのアドレス値(4〜31ビツト)はREPA
DR11のリプレースアドレスと一致するので、アドレ
ス比較部13はHiT信号を出力し、AND回路144
及び145に加える。
When the MPU access address to be accessed next after a miss is set in MPUADR31, the address comparison unit 13 of the data buffer device 10
1 MPU access address (4 to 31 bits) and RE
The replacement address latched in PADR11 is compared. REPADRII contains the MPU access address (4 to 31) latched when the REP signal was applied.
bits) are retained. When the next MPU access address accesses data in the block being replaced, the address value (4 to 31 bits) is REPA
Since it matches the replacement address of DR11, the address comparator 13 outputs a HiT signal and the AND circuit 144
and 145.

一方、データバッファ装置10のデコーダ141は、M
PUADR31のMPUアクセスアドレス中のビット2
及びビット3をデコードし、REPバッファ12の4個
のデータエントリをセレクトするセレクト信号を発生し
て、MPX124及び142に加える。
On the other hand, the decoder 141 of the data buffer device 10
Bit 2 in MPU access address of PUADR31
and bit 3, and generates a select signal that selects the four data entries of REP buffer 12 and applies it to MPX 124 and 142.

MPX142は、このセレクト信号でJKFF122゜
〜122.の出力するフラグv0〜v3をセレクトし、
フラグがオンのときVALID信号を発生してAND回
路145に加える。
MPX142 uses this select signal to select JKFF122° to 122. Select flags v0 to v3 to be output,
When the flag is on, a VALID signal is generated and applied to the AND circuit 145.

AND回路145は、MPX142から(7)VALI
D信号、REP、信号、READ信号及びHIT信号が
ともにオンのときに、アクセスが正常に行われたことを
指示する応答信号を発生してMPU20に通知する。
The AND circuit 145 receives (7) VALI from the MPX 142.
When the D signal, REP signal, READ signal, and HIT signal are all on, a response signal indicating that the access has been performed normally is generated and notified to the MPU 20.

一方、MPX124は、デコーダ141からのセレクト
信号を受け、スルーラッチ123゜〜123、にラッチ
された4バイトの各リプレースデータを順番にセレクト
してドライバ143に送る。
On the other hand, the MPX 124 receives a select signal from the decoder 141, sequentially selects each of the 4-byte replacement data latched in the through latches 123° to 123, and sends the selected data to the driver 143.

またAND回路144は、RFP、信号、HIT信号及
びリード信号がともにオンのときに出力してドライバ1
43を作動させる。
Furthermore, the AND circuit 144 outputs the signal to the driver 1 when the RFP, signal, HIT signal, and read signal are all on.
Activate 43.

これにより、次のアクセス用のMPUアクセスアドレス
に一致するアドレスの4バイトのリプレースデータがド
ライバ143よりMPUデータバス38を経由してMP
U20に転送される。MPUアクセスアドレスが第4図
の■に示すように、リプレースデータ中のアドレスが「
10」及び「01」であるとすると、このアドレスの4
バイトデータがセレクトされてMPU20に転送される
(第4図の@)。
As a result, 4-byte replacement data at an address matching the MPU access address for the next access is sent from the driver 143 to the MP via the MPU data bus 38.
Transferred to U20. As the MPU access address is shown in Figure 4, the address in the replacement data is "
10" and "01", this address's 4
Byte data is selected and transferred to the MPU 20 (@ in FIG. 4).

以上、1ブロツク(16バイト)からなるリプレースデ
ータが4バイト単位で転送される場合を例にとって説明
したが、本発明はこれ以外の転送単位でリプレースデー
タが転送される場合にも適用されるものである。また、
REPバッファ12も、スルーラッチの他にレジスタを
用いて構成することもできる。
The above description has been made using an example in which replace data consisting of one block (16 bytes) is transferred in units of 4 bytes, but the present invention is also applicable to cases in which replace data is transferred in units of transfer other than this. It is. Also,
The REP buffer 12 can also be configured using registers in addition to through latches.

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

以上説明したように、本発明によれば次の諸効果が得ら
れる。
As explained above, according to the present invention, the following effects can be obtained.

(1)  リプレース中のデータを保持するREPバッ
ファを設けてリプレース中でもアクセスできるようにし
たので、リプレースでもMPUアクセスアドレスでRE
Pバッファをアクセスすることにより、リプレース中の
データをリードすることができる。
(1) A REP buffer is provided to hold the data being replaced so that it can be accessed even during replacement, so even during replacement, the REP buffer can be accessed even during replacement.
By accessing the P buffer, the data being replaced can be read.

(2)前記(1)により、キャッシュメモリ装置におけ
るリプレース処理の終了を待つことなくリプレース中の
データのリードが可能となり、無駄な待ち時間が無くな
ってMPUの処理効率を向上さセることができる。
(2) Due to (1) above, data being replaced can be read without waiting for the end of replacement processing in the cache memory device, eliminating unnecessary waiting time and improving MPU processing efficiency. .

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

第1図は、本発明の基本構成の説明図、第2図は、本発
明の動作タイミングチャート、第3図は、本発明の一実
施例の構成の説明図、第4図は、同実施例の動作タイミ
ングチャート、第5図は、従来のキャッシュメモリ装置
の説明図、第6図は、従来のキャッシュメモリ装置のキ
ャツシュヒツト時の動作タイミングチャー ト、 第7図は、従来のキャッシュメモリ装置のキャッシュミ
スヒツト時の動作タイミングチ ャートである。 第1図及び第3図において、 10・・・データバッファ装置、11・・・リプレース
アドレスレジスタ(REPADR) 、12・・・リプ
レースデータバッファ (REPバッファ)、13・・
・アドレス比較部、14・・・データ転送制御部、20
・・・プロセッサ(MPU) 、21・・・MPUアク
セスアドレスレジスタ(MPUADR) 、30・・・
キャッシュメモリ装置、31・・・TAGメモリ、32
・・・スルーラッチ、33・・・アドレス比較部、34
・・・データメモリ、35・・・アドレスカウンタ、3
6・・・アドレスセレクタ、37・・・トランシーバ、
38・・・MPUデータバス、39・・・CACHEデ
ータバス。
FIG. 1 is an explanatory diagram of the basic configuration of the present invention, FIG. 2 is an operation timing chart of the present invention, FIG. 3 is an explanatory diagram of the configuration of one embodiment of the present invention, and FIG. 4 is an explanatory diagram of the configuration of an embodiment of the present invention. An example operation timing chart, FIG. 5 is an explanatory diagram of a conventional cache memory device, FIG. 6 is an operation timing chart of a conventional cache memory device at the time of cash hit, and FIG. 7 is a cache of a conventional cache memory device. It is an operation timing chart at the time of a mishit. 1 and 3, 10...data buffer device, 11...replace address register (REPADR), 12...replace data buffer (REP buffer), 13...
・Address comparison unit, 14...Data transfer control unit, 20
...Processor (MPU), 21...MPU access address register (MPUADR), 30...
Cache memory device, 31...TAG memory, 32
... Through latch, 33 ... Address comparison section, 34
...Data memory, 35...Address counter, 3
6...Address selector, 37...Transceiver,
38...MPU data bus, 39...CACHE data bus.

Claims (1)

【特許請求の範囲】 1、キャッシュメモリ装置(30)がリプレース中に、
プロセッサ(20)よりプリレース中のデータをリード
すべく新たに起動されたアクセスを保証するキャッシュ
リプレース用データバッファ装置(10)であって、 (a)キャッシュリプレース中のリプレースアドレスを
保持するリプレースアドレスレジスタ(11)と、 (b)リプレース中のデータを保持するリプレースデー
タバッファ(12)と、 (c)リプレースアドレスレジスタ(11)のリプレー
スアドレスと該リプレースアドレスに対応するプロセッ
サ(20)の新たなアクセスアドレスの内容を比較する
アドレス比較部(13)と、 (d)アドレス比較部(13)でアドレスの一致がとれ
かつリード時の場合に、リプレースデータバッファ(1
2)内のアクセス対象データをリードしてプロセッサ(
20)に転送するデータ転送制御部(14)、 を備えたことを特徴とするキャッシュリプレース用デー
タバッファ装置。
[Claims] 1. During replacement of the cache memory device (30),
A cache replacement data buffer device (10) that guarantees newly activated access from a processor (20) to read data being pre-raced, the device comprising: (a) a replacement address register that holds a replacement address during cache replacement; (11); (b) a replace data buffer (12) that holds the data being replaced; and (c) a new access between the replace address of the replace address register (11) and the processor (20) corresponding to the replace address. (d) Address comparison unit (13) that compares the contents of the address; and (d) Address comparison unit (13) when the addresses match and when reading, the replacement data buffer (13).
2) reads the data to be accessed in the processor (
20) A data buffer device for cache replacement, comprising: a data transfer control unit (14) for transferring data to a data buffer device.
JP63277425A 1988-11-04 1988-11-04 Data buffer device for cache replace Pending JPH02125347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63277425A JPH02125347A (en) 1988-11-04 1988-11-04 Data buffer device for cache replace

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63277425A JPH02125347A (en) 1988-11-04 1988-11-04 Data buffer device for cache replace

Publications (1)

Publication Number Publication Date
JPH02125347A true JPH02125347A (en) 1990-05-14

Family

ID=17583380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63277425A Pending JPH02125347A (en) 1988-11-04 1988-11-04 Data buffer device for cache replace

Country Status (1)

Country Link
JP (1) JPH02125347A (en)

Similar Documents

Publication Publication Date Title
US5301296A (en) Microprocessor with cache memory
JP3204323B2 (en) Microprocessor with built-in cache memory
US8131951B2 (en) Utilization of a store buffer for error recovery on a store allocation cache miss
JPH06101225B2 (en) Computer system, memory reading method and transfer method in computer system, memory control method and memory controller
JPH02190930A (en) Software instruction executing apparatus
US4980819A (en) Mechanism for automatically updating multiple unit register file memories in successive cycles for a pipelined processing system
JPH11501744A (en) Parallel access micro-TLB for increasing address translation speed
US5386579A (en) Minimum pin-count multiplexed address/data bus with byte enable and burst address counter support microprocessor transmitting byte enable signals on multiplexed address/data bus having burst address counter for supporting signal datum and burst transfer
KR950000549B1 (en) Apparatus and method for increasing operand utilization in data processing systems
JP2001184211A (en) Device and method for performing pop and push operation of stack in processing system
US5664230A (en) Data processing with adaptable external burst memory access
US5051894A (en) Apparatus and method for address translation of non-aligned double word virtual addresses
KR100218616B1 (en) Transmission method and system for providing next address during current transaction
US5421026A (en) Data processor for processing instruction after conditional branch instruction at high speed
US5197133A (en) Control store addressing from multiple sources
US4737908A (en) Buffer memory control system
JPH02125347A (en) Data buffer device for cache replace
JP2000148584A (en) Prefetch method and apparatus
JPH08249175A (en) Method and apparatus for selective support of nonarchitectural instruction at inside of superscalar processor device
JP4111645B2 (en) Memory bus access control method after cache miss
US6904500B2 (en) Cache controller
JP3729832B2 (en) Cache memory device
JPH04340145A (en) Cache memory device
JP3078293B2 (en) Storage controller
JP2001344152A (en) Cache memory device