JPS6272041A - Cache memory controller - Google Patents

Cache memory controller

Info

Publication number
JPS6272041A
JPS6272041A JP60212821A JP21282185A JPS6272041A JP S6272041 A JPS6272041 A JP S6272041A JP 60212821 A JP60212821 A JP 60212821A JP 21282185 A JP21282185 A JP 21282185A JP S6272041 A JPS6272041 A JP S6272041A
Authority
JP
Japan
Prior art keywords
address
memory
block
data
cache memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP60212821A
Other languages
Japanese (ja)
Other versions
JPH0556543B2 (en
Inventor
Izuyuki Uehara
上原 出之
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 JP60212821A priority Critical patent/JPS6272041A/en
Publication of JPS6272041A publication Critical patent/JPS6272041A/en
Publication of JPH0556543B2 publication Critical patent/JPH0556543B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve a throughput by allowing a following read request to be accepted when the block address of following memory read request data is equal in the block address in block loading if the following memory read request is made during the block loading. CONSTITUTION:Block addresses in an address register 7 and a block load address register s8 are inputted to a comparing circuit 3, whose comparison result is inputted as an address coincidence signal EQL to a decision circuit 4 and a control part 5. When the block addresses are coincident with each other, the decision circuit 4 calculates an in-block word address where the block loading is started, i.e. an address where a request is made by a CPU for the 1st time on the basis of the in-block word address BALL and a count signal CNT and then compares it with the in-block word address MAL of the CPU memory read request to decide whether or not data in a request address is already written on a cache memory 1, thereby reporting the result to the control part 5 as a decision signal JAG.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュメモリの制御装置に関し、特にブロ
ックロード中に処理装置からメモリリードリクエストが
発生した際の制御方式の改良に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory control device, and more particularly to an improvement in a control method when a memory read request is generated from a processing device during block loading.

〔従来の技術〕[Conventional technology]

処理装置(以下CPUと称す)とメインメモリとの動作
スピードのギャップを埋めるために、周知の如く両者の
間に高速・小容量のメモリで構成されるキャッシュ記憶
装置を設ける方策がよく採用される。メインメモリは予
め容量が一定の多数のブロックに分割され、これら多数
のブロックのうちの一部のブロックに格納されているデ
ータを、キャッシュ記憶装置内のキャッシュメモリに書
込んでおく (このような書込みをブロックロードとい
う)。
In order to bridge the gap in operating speed between a processing unit (hereinafter referred to as a CPU) and main memory, a policy is often adopted to provide a cache storage device consisting of high-speed, small-capacity memory between the two. . The main memory is divided in advance into a large number of blocks with a fixed capacity, and the data stored in some of these blocks is written to the cache memory in the cache storage device. (The write is called a block load).

CPUがメモリデータのリードリクエストを出すと、先
ずリードリクエストされているデータがキャッシュメモ
リに存在する(ヒツト)か否(ミスヒント)かが調べら
れる。もしヒツトすればキャッシュメモリからの読出し
データのうちの当嘉亥データがCPUに送出される0反
対にミスヒツトすればキャッシュメモリからの読出しデ
ータは放棄され、メインメモリの当3亥アドレスのデー
タを読んでCPUに送出すると共に当該データが含まれ
るブロックがキャッシュメモリの空ブロックまたは例え
ば最も永く使用されていないデータを記憶しているブロ
ックにブロックロードされる。一般にこの1ブロツクの
データ量はメインメモリからキャッシュメモリに転送さ
れるデータ単位よりも大きいため、1回のブロックロー
ドに対してメインメモリの読出し動作およびキャッシュ
メモリへの書込み動作は複数回行なわれることになる。
When the CPU issues a request to read memory data, it is first checked whether the data requested to be read exists in the cache memory (hit) or not (miss hint). If there is a hit, the current data of the data read from the cache memory will be sent to the CPU.On the other hand, if there is a miss, the data read from the cache memory will be discarded and the data at the current address in the main memory will be read. The data is sent to the CPU and the block containing the data is loaded into an empty block of the cache memory or a block storing, for example, data that has not been used for the longest time. Generally, the amount of data in one block is larger than the data unit transferred from main memory to cache memory, so the main memory read operation and cache memory write operation are performed multiple times for one block load. become.

ミスヒツト時に発生するブロックロード要求が開始され
て最後の読出しデータがキャッシュメモリへ書込みを終
了するまでの期間であるブロックロード動作中、キャッ
シュメモリへ読出しデータを書込んでいるときは、キャ
ッシュメモリが占有されるためにキャッシュメモリから
の読出しは行なうことができない。
During a block load operation, which is the period from the start of a block load request that occurs at the time of a miss until the last read data finishes writing to the cache memory, when the read data is being written to the cache memory, the cache memory is occupied. Therefore, reading from the cache memory cannot be performed.

従来、このブロックロード中にCPUがメモリデータの
リードリクエストを出した場合、ブロックロード中はキ
ャッシュメモリをブロックロードに占有させているため
、CPUのメモリデータのリードリクエストは必ずブロ
ックロードの終了を待って受は付けるように構成されて
いた。
Conventionally, if the CPU issues a read request for memory data during this block load, the cache memory is occupied by the block load, so the CPU's memory data read request always waits for the end of the block load. The reception desk was configured so that it could be installed.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したように従来のキャッシュメモリIII御装置で
は、CPUのメモリリードリクエストがブロックロード
の終了まで必ず待たされることになり、キャッシュメモ
リ処理装置のスルーブツトを低下させるという欠点があ
った。
As described above, in the conventional cache memory III control device, the CPU's memory read request always has to wait until the end of block loading, which has the disadvantage of reducing the throughput of the cache memory processing device.

本発明の目的は、ブロックロード中にCPUから後続の
メモリリードリクエストが発生した場合、その後続のメ
モリリードリクエストデータのブロックアドレスがブロ
ックロード中のブロックアドレスと等しいときは、ブロ
ックロード中に後続のメモリリードリクエストの処理が
可能なように構成することにより、キャッシュメモリ処
理装置のスループントを向上させることにある。
An object of the present invention is that when a subsequent memory read request is generated from the CPU during a block load, and the block address of the subsequent memory read request data is equal to the block address during the block load, the subsequent memory read request during the block load is The object of the present invention is to improve the throughput of a cache memory processing device by configuring it to be able to process memory read requests.

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

本発明は上記目的を達成するために、1回のブロックロ
ード要求に対して発生する複数のメモリリクエストに対
応するメモリリプライデータの数をカウントするカウン
ト回路と、 処理装置で発生する後続のメモリリクエストのアドレス
とキャッシュメモリの書込みアドレスとを比較する比較
回路と、 キャッシュメモリからの読出しデータとメインメモリか
らの読出しデータを選択する選択回路と、ブロックロー
ド中に処理装置から後続のメモリリードリクエストが発
生し且つ前記比較回路の出力が前記′dt続のメモリリ
クエストのブロックアドレスとキャッシュメモリの書込
みブロックアドレスとが一致していることを示すとき、
前記カウント回路のカウント値、ブロックロードアドレ
ス及び前記後続のメモリリクエストのアドレスに基づき
前記後続のメモリリードリクエストのアドレスに対応す
るデータが既にキャッシュメモリに書込まれたブロック
内ワードであるか否かを判定する判定回路と、 該判定回路で既に書込みが行なわれたと判定された場合
には、前記後続のメモリリードリクエストのアドレスで
キャンシュメモリから読出されたデータをブロックロー
ドによってキャッシュメモリが専有されていないタイミ
ングで前記選択回路で選択させ、前記書込みが未だ終了
していないと判定された場合には、前記後続のメモリリ
ードリクエストのアドレスと同一のアドレスのメモリリ
プライデータが返却されるまで前記メモリリードリクエ
ストを待ち合わせ、その返却と同時にメモリリプライタ
イミングでメモリリプライデータを前記選択回路で選択
させる制御手段とを設ける。
In order to achieve the above object, the present invention includes a count circuit that counts the number of memory reply data corresponding to multiple memory requests generated in response to one block load request, and subsequent memory requests generated in a processing device. A comparison circuit that compares the address of the block with the write address of the cache memory, a selection circuit that selects read data from the cache memory and read data from the main memory, and a subsequent memory read request from the processing unit during block loading. and when the output of the comparison circuit indicates that the block address of the 'dt consecutive memory request and the write block address of the cache memory match;
Based on the count value of the counting circuit, the block load address, and the address of the subsequent memory request, it is determined whether the data corresponding to the address of the subsequent memory read request is a word in the block that has already been written to the cache memory. a determination circuit that determines, and if the determination circuit determines that writing has already been performed, block loading the data read from the cache memory at the address of the subsequent memory read request so that the cache memory is not exclusively occupied; If it is determined that the writing is not completed yet, the memory read request is made to be selected by the selection circuit based on the timing, and the memory read request is continued until the memory reply data of the same address as the address of the subsequent memory read request is returned. and control means for causing the selection circuit to select memory reply data at the memory reply timing simultaneously with the return of the data.

〔作用〕[Effect]

ブロックロード中に処理装置から後続のメモリリードリ
クエストが発生すると、そのメモリリードリクエストの
アドレスのブロックアドレスとブロックロード処理が行
なわれているブロックロードアドレスのブロックアドレ
スとが比較回路で比較され、両アドレスの一致の有無が
調べられる。
When a subsequent memory read request is generated from the processing unit during a block load, a comparator circuit compares the block address of the address of the memory read request and the block address of the block load address where block load processing is being performed, and both addresses are The presence or absence of a match is checked.

一方、ブロックロード要求に対して発生する複数のメモ
リリプライデータの数がカウント回路でカウントされ、
判定回路は比較回路の出力が一致を示すとき、カウント
回路のカウント値、ブロックロードアドレス及び後続の
メモリリードリクエストのアドレスから要求されたデー
タが既にキャンシュメモリに書込まれたブロック内ワー
ドであるか否かを判定する。そして、既に書込まれたデ
ータである場合には、後続のメモリリードリクエストの
アドレスによってキャッシュメモリから読出されたデー
タをブロックロードによってキャッシュメモリが占有さ
れていないタイミングで読出してCPUに送出し、書込
みが未だ終了していないと判定されたときは、要求され
たデータが処理装置から返却されるまで待ち合わせ、返
却されたときに処理装置へ送出する。
On the other hand, the number of multiple memory reply data generated in response to a block load request is counted by a counting circuit.
When the output of the comparison circuit indicates a match, the determination circuit determines whether the data requested from the count value of the counting circuit, the block load address, and the address of the subsequent memory read request is a word in the block that has already been written to the cache memory. Determine whether or not. If the data has already been written, the data read from the cache memory by the address of the subsequent memory read request is read out at a timing when the cache memory is not occupied by the block load, sent to the CPU, and written. If it is determined that the requested data has not been completed yet, it waits until the requested data is returned from the processing device, and when it is returned, it is sent to the processing device.

〔実施例〕〔Example〕

第1図は本発明の一実施例のブロック図である。 FIG. 1 is a block diagram of one embodiment of the present invention.

一般に、メインメモリ (図示せず)は、1ブロツクが
例えば32バイトの容量を有する多数のブロックに分割
されている。これに対し、メインメモリとキャンシュメ
モリ1との間で転送されるデータ単位はブロックの容量
より小さく例えば8バイトになっている。従って、ミス
ヒツトが生じた場合にメインメモリに対して4回メモリ
リードリクエスト信号MRQを出し、これを受けてメイ
ンメモリから送出されるメモリリードデータMRDを4
回キャッシュメモリ1に書込むことによってブロックロ
ードが完了する。なお、CPUが要求するメモリリード
データは最初のメモリリプライタイミングでリプライ信
号RPYとともにCPUへ送出する。メインメモリはサ
イクルタイムが例えば100nsであり、CPUのサイ
クルタイムはそれより短く例えば50nsとなっている
ため、メインメモリはメモリリードリクエストMRQを
CPUサイクルで27(Tはt CPUサイクル)に1
回受付けることになり、メモリリプライデータMRD及
びメモリリプライ信号MRYも同様に2Tに1回送出す
ることになる。
Generally, a main memory (not shown) is divided into a number of blocks, each block having a capacity of, for example, 32 bytes. On the other hand, the data unit transferred between the main memory and the cache memory 1 is smaller than the block capacity, for example, 8 bytes. Therefore, when a mishit occurs, the memory read request signal MRQ is issued to the main memory four times, and in response, the memory read data MRD sent from the main memory is sent out four times.
Block loading is completed by writing to cache memory 1 once. Note that the memory read data requested by the CPU is sent to the CPU together with the reply signal RPY at the first memory reply timing. The cycle time of the main memory is, for example, 100 ns, and the cycle time of the CPU is shorter, for example, 50 ns, so the main memory sends a memory read request MRQ every 27 CPU cycles (T is t CPU cycles).
Similarly, memory reply data MRD and memory reply signal MRY will be sent once every 2T.

第1図において、アドレスレジスタ7はCPUからメモ
リリクエストアドレスADDがセットされるレジスタで
ある。このレジスタ7は、メモリリクエストアドレスA
DDの内のブロックアドレスMARを格納する部分と、
ブロック内ワードアドレスMALを格納する例えば2ビ
ツトの部分に分かれ、ブロック内ワードアドレスMAL
は図示しない手段によりブロックロード動作前半におい
て所定の順序で更新される。アドレスレジスタ7の全て
の内容はアドレス信号MADとしてキャッシュメモリl
に選択回路10を介して加えられ、ブロックアドレスM
ARは比較回路3に入力され、ブロック内ワードアドレ
スMALは判定回路4に入力される。
In FIG. 1, address register 7 is a register in which a memory request address ADD is set by the CPU. This register 7 is the memory request address A.
A part of the DD that stores the block address MAR,
For example, it is divided into 2-bit parts that store the intra-block word address MAL, and the intra-block word address MAL is
are updated in a predetermined order in the first half of the block loading operation by means not shown. All contents of address register 7 are stored in cache memory l as address signal MAD.
is added to the block address M via the selection circuit 10.
AR is input to the comparison circuit 3, and the intra-block word address MAL is input to the determination circuit 4.

ブロックロードアドレスレジスタ8は、ブロックロード
動作中の所定のタイミングで開かれるゲート回路9を介
してアドレスレジスタ7の内容がセントされるレジスタ
で、ブロックアドレスBAHを格納する部分と2ビツト
のブロック内ワードアドレスBALを格納する部分とか
ら構成される。
The block load address register 8 is a register to which the contents of the address register 7 are sent via a gate circuit 9 that is opened at a predetermined timing during a block load operation, and contains a part that stores the block address BAH and a 2-bit intra-block word. It consists of a part that stores the address BAL.

ブロックロードアドレスレジスタ8の全ての内容BLA
は選択回路10を介してキャッシュメモリ1に加えられ
、ブロックアドレスBAHは比較回路3に入力され、ブ
ロック内ワードアドレスBALは判定回路4に入力され
る。上記ブロック内ワードアドレスBALは図示しない
手段によりブロックロード動作後半において所定の順序
で更新される。キャッシュメモリlは図示しないメイン
メモリの複数のブロックのアドレスとデータのコピーを
記憶するメモリで、選択回路10を介したアドレスMA
D、BLAとメインメモリからのメモリリードデータM
RDと、制御部5からのキャッシュ書込み信号CWTと
が入力され、ヒツト信号HITとキャッシュリードデー
タCHDを出力する。
All contents of block load address register 8 BLA
is added to the cache memory 1 via the selection circuit 10, the block address BAH is input to the comparison circuit 3, and the intra-block word address BAL is input to the determination circuit 4. The intra-block word address BAL is updated in a predetermined order in the latter half of the block load operation by means not shown. A cache memory l is a memory that stores addresses and data copies of multiple blocks of a main memory (not shown), and the address MA via the selection circuit 10 is
D, memory read data M from BLA and main memory
RD and a cache write signal CWT from the control section 5 are input, and a hit signal HIT and cache read data CHD are output.

キャッシュメモリ1はアドレスレジスタ7にセットされ
たアドレスMADが入力された際、アドレスMADと同
一のアドレスが内部に記憶されているかを参照し、記憶
されている場合はヒツト信号HITを“1″とし、記憶
されていない場合はヒツト信号HITを“0”のままと
する、また、制御部5からのキャッシュ書込み信号CW
Tが“1”のタイミングで選択回路10から入力されて
いるアドレスにメモリリードデータMRDを書込み、キ
ャッシュ書込み信号CWTが“0”のタイミングでは選
択回路lOから入力されているアドレスのデータがあれ
ばそれをキャッシュリードデータCRDとして出力する
When the address MAD set in the address register 7 is input, the cache memory 1 checks whether the same address as the address MAD is stored internally, and if so, sets the hit signal HIT to "1". , if it is not stored, the hit signal HIT remains "0", and the cache write signal CW from the control unit 5
Memory read data MRD is written to the address input from the selection circuit 10 at the timing when T is "1", and if there is data at the address input from the selection circuit IO at the timing when the cache write signal CWT is "0". It outputs it as cache read data CRD.

カウント回路2は、例えば2ビツトのカウンタで構成さ
れ、1回のブロックロード要求に対して発生する複数の
メモリリクエストに対応するメモリリプライ信号MPY
をカウントし、このカウンタ回路2のカウント値CNT
は判定回路4に入力される。比較回路3は、アドレスレ
ジスタ7のブロックアドレスMAHとブロックロードア
ドレスレジスタ8からのブロックアドレスBAHとを比
較するもので両アドレスが一致しているとき判定回路4
.制御部5に加わるアドレス一致信号EQLを例えば“
1°とする。
The count circuit 2 is composed of, for example, a 2-bit counter, and outputs a memory reply signal MPY corresponding to multiple memory requests generated in response to one block load request.
is counted, and the count value CNT of this counter circuit 2 is
is input to the determination circuit 4. The comparison circuit 3 compares the block address MAH of the address register 7 with the block address BAH from the block load address register 8. When both addresses match, the determination circuit 4
.. For example, if the address match signal EQL applied to the control unit 5 is
Let it be 1°.

判定回路4は、アドレス一致信号EQLが“l”のとき
、ブロックロードアドレスレジスタ8のブロック内ワー
ドアドレスBALの現在値とカウント回路2のカウント
値CNTとから、ブロックロードが開始されたブロック
内ワードアドレスを算出する。これは、例えばブロック
内ワードアドレスBALが00→01−10−11−0
0の順で更新されるとすると、現在のブロック内ワード
アドレスBALが例えば「10」でカウント値が「2」
であれば、2つ前の値「OO」を開始アドレスとする0
判定回路4は開始アドレスを算出すると、その開始アド
レスとアドレスレジスタ7のブロック内ワードアドレス
MALとを比較し、アドレスレジスタ7にセットされた
要求アドレスのデータが既にキャッシュメモリ内に書込
まれたデータか否かを判定する。この判定は、前述の開
始アドレスとカウント回路2のカウント値から既にキャ
ッシュメモリに書込まれたデータのブロック内ワードア
ドレスが判るので、アドレスレジスタ7のブロック内ワ
ードアドレスMALがその中に含まれているか否かで判
定できる0判定回路4は、アドレスレジスタ7にセット
された要求アドレスのデータが既にキャッシュメモリ内
に書込まれたデータであると判定したときは、制御部5
に加わる判定信号JAGを例えば“l”とする。
When the address match signal EQL is "1", the determination circuit 4 determines the word in the block from which the block load has started based on the current value of the word address BAL in the block of the block load address register 8 and the count value CNT of the counter circuit 2. Calculate the address. This means, for example, that the word address BAL within the block is 00 → 01-10-11-0
If it is updated in the order of 0, the current in-block word address BAL is, for example, "10" and the count value is "2".
If so, 0 with the two previous value "OO" as the starting address
When the determination circuit 4 calculates the start address, it compares the start address with the in-block word address MAL of the address register 7, and determines whether the data at the requested address set in the address register 7 is data already written in the cache memory. Determine whether or not. This determination is made because the intra-block word address of the data already written to the cache memory can be determined from the above-mentioned start address and the count value of the count circuit 2. When the zero determination circuit 4 determines that the data at the request address set in the address register 7 is data that has already been written in the cache memory, the control unit 5
For example, let the judgment signal JAG applied to the signal JAG be "l".

制御部5は、CPUからメモリリードリクエスト信号R
EQを受けると、そのリクエスト信号REQがブロック
ロード動作の前半以外の期間に入力されたときに限り図
示しないセント信号を送出してCPUからのアドレスA
DDをアドレスレジスタ7にセットする。そして、この
セットをブロックロード動作中以外で行なったときは、
選択回路lOをアドレスレジスタ7側に切換え、ヒント
信号HITが“l”になるか否かを監視する。そして、
ヒツト信号HITが1°になれば選択回路6をキャッシ
ュメモリ1側に切換え、アドレスレジスタ7のアドレス
MADで読出されたキャッシュリードデータCHDをリ
プライ信号RPYとともにCPUへ送出する。また、ヒ
ツト信号HITが“1″にならないと、後述するブロッ
クロード動作を開示する。一方、ブロックロード動作の
後半部分において新たなメモリリードリクエスト信号R
EQが発生し、そのメモリリードリクエスト信号REQ
に伴うCPUアドレスADDをアドレスレジスタ7にセ
ットしたときは、ブロックロード動作と並行して判定回
路4の判定結果に基づく後述するキャッシュ一致処理を
行なう。
The control unit 5 receives a memory read request signal R from the CPU.
When EQ is received, only when the request signal REQ is input during a period other than the first half of the block load operation, a cent signal (not shown) is sent and the address A is sent from the CPU.
Set DD in address register 7. And when this set is performed other than during block loading operation,
The selection circuit IO is switched to the address register 7 side, and it is monitored whether the hint signal HIT becomes "L" or not. and,
When the hit signal HIT reaches 1°, the selection circuit 6 is switched to the cache memory 1 side, and the cache read data CHD read at the address MAD of the address register 7 is sent to the CPU together with the reply signal RPY. Further, if the hit signal HIT does not become "1", a block load operation, which will be described later, is initiated. On the other hand, in the latter half of the block load operation, a new memory read request signal R
EQ occurs and its memory read request signal REQ
When the corresponding CPU address ADD is set in the address register 7, cache matching processing, which will be described later, based on the determination result of the determination circuit 4 is performed in parallel with the block load operation.

第2図は上述のブロックロードの動作タイムチャートで
あり、以下第1図及び第2図に基づいて本実施例の動作
を説明する。
FIG. 2 is an operation time chart of the above-mentioned block loading, and the operation of this embodiment will be explained below based on FIGS. 1 and 2.

ブロックロード動作の前半以外の期間でCPUからメモ
リリードリクエスト信号REQとアドレスADDが発生
すると、アドレスADDはアドレスレジスタ7にセット
され、キャッシュメモリ1では選択回路10がアドレス
レジスタ7側に切換えられることによってアドレスレジ
スタ7にセットされたアドレスMADに該当するアドレ
スが内部に記憶されているか否かが参照される。この結
果キャッシュメモリ1に該当するアドレスが存在すれば
、キャッシュメモリ1から制御部5に加えられているヒ
ント信号HITは論理“loとなり、制御部5は選択回
路6においてキャッシュ読出しデータCHDを選択させ
、出力データDTOとしてCPUに送出させる。
When a memory read request signal REQ and an address ADD are generated from the CPU in a period other than the first half of the block load operation, the address ADD is set in the address register 7, and in the cache memory 1, the selection circuit 10 is switched to the address register 7 side. It is checked whether an address corresponding to the address MAD set in the address register 7 is stored internally. As a result, if the corresponding address exists in the cache memory 1, the hint signal HIT applied from the cache memory 1 to the control section 5 becomes logic "lo", and the control section 5 causes the selection circuit 6 to select the cache read data CHD. , to be sent to the CPU as output data DTO.

キャッシュメモリ1に1亥当するアドレスが存在しない
場合は、ヒツト信号HITが論理“1”にならないため
に、制御部5はブロックロードを開始する。制御部5は
ブロックロードを開始すると、先ずメモリリードリクエ
スト信号MRQをメインメモリに送出し、アドレスレジ
スタ7が保持するアドレスMADによって指定される番
地を続出す。このメモリリードリクエスト信号MRQは
第2図のOPUタイミングT2.T3.T4.T6の4
つのタイミングでそれぞれRQI−RQ4として出され
、アドスタレジスタフの内容は図示しない手段により下
位2ビツトの値(ブロック内ワードアドレス)が各タイ
ミングで所定の順序で更新される。
If there is no corresponding address in the cache memory 1, the control unit 5 starts loading the block because the hit signal HIT does not become logic "1". When the control unit 5 starts block loading, it first sends a memory read request signal MRQ to the main memory, and successively reads the address specified by the address MAD held by the address register 7. This memory read request signal MRQ is applied at OPU timing T2 in FIG. T3. T4. T6 no 4
They are output as RQI-RQ4 at each timing, and the contents of the address register field are updated by means not shown in the lower two bits (intra-block word address) at each timing in a predetermined order.

メインメモリはメモリリードリクエスト信号MRQを受
けると、メモリリプライ信号MRYとともに指定された
アドレスのメモリリードデータMRDを送出する。制御
部5は最初のメモリリプライ信号MRY (RYI)を
第2図のCPUタイミングTIOで受は取ると選択回路
6においてメモリリードデータMRDを選択させ、リプ
ライ信号RPYとともに出力データDTOをCPUに送
出する。同時に制御部5はゲート信号aを送出してゲー
ト回路9を開きアドレスレジスタ7の内容をブロックロ
ードアドレスレジスタ8に転送すると共に選択回路10
を切換え、ブロックロードアドレスレジスタ8にセント
されたアドレスBLAによって示されるキャッシュメモ
リlの番地にキャッシュ書込み信号CWTを送出するこ
とによりメモリリードデータMRDを書込む。キャッシ
ュメモリlへの書込み動作は後続する3つのメモリリー
ドデータについても行なわれ、第2図の各CPUタイミ
ングTI2. T14. T16で制御部5がメモリリ
プライ信号MRYをそれぞれRY2〜RY4として受は
取り、ブロックロードアドレスレジスタ8の下位2ビツ
トの内容が図示しない手段により各リプライタイミング
で所定の順序で更新されたアドレスにキャッシュ書込み
信号CWTを送出することによって書込みを行ない、ブ
ロックロードを終了する。
When the main memory receives the memory read request signal MRQ, it sends out the memory read data MRD at the specified address along with the memory reply signal MRY. When the control unit 5 receives the first memory reply signal MRY (RYI) at the CPU timing TIO in FIG. 2, it causes the selection circuit 6 to select the memory read data MRD, and sends the output data DTO to the CPU together with the reply signal RPY. . At the same time, the control section 5 sends out a gate signal a to open the gate circuit 9 and transfer the contents of the address register 7 to the block load address register 8, as well as to the selection circuit 10.
, and writes the memory read data MRD by sending the cache write signal CWT to the address of the cache memory I indicated by the address BLA written to the block load address register 8. The write operation to the cache memory I is also performed for the following three memory read data, and each CPU timing TI2. T14. At T16, the control unit 5 receives the memory reply signal MRY as RY2 to RY4, respectively, and caches the contents of the lower two bits of the block load address register 8 at an address updated in a predetermined order at each reply timing by a means not shown. Writing is performed by sending a write signal CWT, and the block load is completed.

このブロックロードによるメモリリプライ信号MRYが
到来する毎にカウント回路2がカウントアツプされリプ
ライの数が計数される。このカウント回路2のカウント
信号CNTは判定回路4に入力される。
Every time the memory reply signal MRY due to this block load arrives, the count circuit 2 counts up and counts the number of replies. The count signal CNT of the count circuit 2 is input to the determination circuit 4.

次に上記ブロックロード動作中に例えば第2図のCPU
タイミングT13でCPUから後続のメモリリードリク
エストREQが発生した場合について説明する。
Next, during the above block loading operation, for example, the CPU shown in FIG.
A case where a subsequent memory read request REQ is generated from the CPU at timing T13 will be described.

ブロックロード動作中に後続のメモリリードリクエスト
REQが発生すると、それに伴ってCPUから発生され
るアドレスADDによってアドレスレジスタ7の内容は
後続のメモリリードリクエストのアドレスへ書換えられ
、ブロックロードアドレスレジスタ8には現在のブロッ
クロードアドレスが格納されたまま保持される。そして
、先ず、アドレスレジスタ7とブロックロードアドレス
レジスタ8の各々のブロックアドレス(MAH,BAH
)が比較回路3に入力され、比較結果はアドレス一致信
号EQLとして出力され判定回路4と制御部5に入力さ
れる。
When a subsequent memory read request REQ occurs during a block load operation, the contents of the address register 7 are rewritten to the address of the subsequent memory read request by the address ADD generated from the CPU, and the block load address register 8 is The current block load address remains stored. First, each block address (MAH, BAH
) is input to the comparison circuit 3, and the comparison result is output as an address match signal EQL and input to the determination circuit 4 and the control section 5.

ブロックアドレスが一致していない場合は、通常のCP
Uメモリリードリクエストの処理と同様であり、ブロッ
クロードの終了までCPUのメモリ読出し要求が待たさ
れることになる。しかし、一致している場合は、アドレ
スレジスタ7のブロック内ワードアドレスMALと、ブ
ロックロードアドレスレジスタ8のブロック内ワードア
ドレスBALが判定回路4に入力されていることによっ
て、判定回路4は、ブロック内ワードアドレスBALと
カウント信号CNTに基づきブロックロードが開始され
たブロック内ワードアドレス即ち最初にCPUから要求
のあったアドレスを算出し、これとCPUメモリリード
リクエストのブロック内ワードアドレスMALとを比較
することによって、要求アドレスのデータが既にキャシ
ュメモリ1内に書込まれたデータかそうでないかを判定
し、判定信号JAGとして制御部5に通知する。既にキ
ャッシュメモリ1に書込まれたデータである場合、つま
り判定信号JAGが論理“1”である場合は、制御部5
は、ブロックロードによってキャッシュメモリlが専有
されていないタイミングで選択回路lOを一時的にアド
レスレジスタ7側に切換え、アドレスレノスタフのアド
レスでキャッシュメモリlから読出されたキャフソユリ
ードデータCHDを選択回路6で選択させ、出力データ
DToとしてリプライ信号RPYとともにCPUへ送出
する。
If the block addresses do not match, the normal CP
This is similar to the processing of a U memory read request, and the CPU's memory read request is made to wait until the block load is completed. However, if they match, since the intra-block word address MAL of the address register 7 and the intra-block word address BAL of the block load address register 8 are input to the judgment circuit 4, the judgment circuit 4 determines that the intra-block Based on the word address BAL and count signal CNT, calculate the intra-block word address at which block loading is started, that is, the address initially requested by the CPU, and compare this with the intra-block word address MAL of the CPU memory read request. Accordingly, it is determined whether the data at the requested address has already been written in the cache memory 1 or not, and the result is notified to the control unit 5 as a determination signal JAG. If the data has already been written in the cache memory 1, that is, if the determination signal JAG is logic “1”, the control unit 5
temporarily switches the selection circuit IO to the address register 7 side at a timing when the cache memory 1 is not occupied by a block load, and selects the cache read data CHD read from the cache memory 1 at the address of address Reno Stuff. The circuit 6 selects the data and sends it to the CPU together with the reply signal RPY as output data DTo.

一方、アドレス一致信号EQLが論理゛l”で判定信号
JAGが“01の場合は、CPLJのメモリリードリク
エスト信号REQはホールドされ、第2図のCPUタイ
ミングT14、あるいはT16でメモリリプライ信号M
RYが返却され、判定信号JAGが“l”になるまで待
たされる。制御部5はメモリリプライ信号MRYととも
に判定信号JAGが“1゛になったタイミングで選択回
路6にメモリリードデータMRDを選択させ、リプライ
信号RPYとともにリードデータをCPUに送出する。
On the other hand, when the address match signal EQL is logic "1" and the determination signal JAG is "01", the memory read request signal REQ of CPLJ is held, and the memory reply signal M is held at CPU timing T14 or T16 in FIG.
RY is returned and the process waits until the determination signal JAG becomes "l". The control unit 5 causes the selection circuit 6 to select the memory read data MRD at the timing when the judgment signal JAG becomes "1" together with the memory reply signal MRY, and sends the read data to the CPU together with the reply signal RPY.

この動作は、第2図のCPUタイミングT12でCPU
がメモリリードリクエストREQを出して、比較信号E
QLと判定信号JAGがともに“l”となった場合も同
様であるゆ 〔発明の効果〕 以上説明したように、本発明は、ブロックロード中に後
続のメモリリードリクエストが発生した場合、発生した
メモリリードリクエストのブロックアドレスとブロック
ロード中のブロックアドレスが一致していれば、既にキ
ャッシュメモリに書込まれたデータについては速やかに
CPUに要求データが送出され、後続するメモリリプラ
イデータがCPUの要求するメモリ読出しデータである
場合には、そのデータが返却された時点でCPUに要求
データが送出されるので、キャッシュ制御装置のスルー
プットを向上させることができる効果がある。
This operation is performed by the CPU at CPU timing T12 in FIG.
issues a memory read request REQ and sends a comparison signal E.
The same is true when both QL and judgment signal JAG become "l". [Effect of the Invention] As explained above, the present invention provides a method for determining whether a subsequent memory read request occurs during a block load. If the block address of the memory read request and the block address during block loading match, the requested data is immediately sent to the CPU for data already written to the cache memory, and the subsequent memory reply data is sent to the CPU as requested. If the requested data is memory read data, the requested data is sent to the CPU when the data is returned, which has the effect of improving the throughput of the cache control device.

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

第1図は本発明の一実施例を示すブロック図および、 第2図は第1図の実施例の動作を説明するための動作タ
イムチャートである。 図において、1はキャッシュメモリ、2はカウント回路
、3は比較回路、4は判定回路、5は制御部、6は選択
回路、7はアドレスレジスタ、8はブロックロードアド
レスレジスタである。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 is an operation time chart for explaining the operation of the embodiment of FIG. In the figure, 1 is a cache memory, 2 is a count circuit, 3 is a comparison circuit, 4 is a determination circuit, 5 is a control section, 6 is a selection circuit, 7 is an address register, and 8 is a block load address register.

Claims (1)

【特許請求の範囲】 1回のブロックロード要求に対して発生する複数のメモ
リリクエストに対応するメモリリプライデータの数をカ
ウントするカウント回路と、処理装置で発生する後続の
メモリリクエストのアドレスとキャッシュメモリの書込
みアドレスとを比較する比較回路と、 キャッシュメモリからの読出しデータとメインメモリか
らの読出しデータを選択する選択回路と、ブロックロー
ド中に処理装置から後続のメモリリードリクエストが発
生し且つ前記比較回路の出力が前記後続のメモリリクエ
ストのブロックアドレスとキャッシュメモリの書込みブ
ロックアドレスとが一致していることを示すとき、前記
カウント回路のカウント値、ブロックロードアドレス及
び前記後続のメモリリクエストのアドレスに基づき前記
後続のメモリリードリクエストのアドレスに対応するデ
ータが既にキャッシュメモリに書込まれたブロック内ワ
ードであるか否かを判定する判定回路と、 該判定回路で既に書込みが行なわれたと判定された場合
には、前記後続のメモリリードリクエストのアドレスで
キャッシュメモリから読出されたデータをブロックロー
ドによってキャッシュメモリが専有されていないタイミ
ングで前記選択回路で選択させ、前記書込みが未だ終了
していないと判定された場合には、前記後続のメモリリ
ードリクエストのアドレスと同一のアドレスのメモリリ
プライデータが返却されるまで前記メモリリードリクエ
ストを待ち合わせ、その返却と同時にメモリリプライタ
イミングでメモリリプライデータを前記選択回路で選択
させる制御手段とを具備したことを特徴とするキャッシ
ュメモリ制御装置。
[Claims] A count circuit that counts the number of memory reply data corresponding to multiple memory requests generated in response to one block load request, and an address and cache memory for subsequent memory requests generated in a processing device. a selection circuit that selects read data from the cache memory and read data from the main memory; and a selection circuit that selects read data from the cache memory and read data from the main memory; and a selection circuit that selects read data from the cache memory and read data from the main memory; When the output of indicates that the block address of the subsequent memory request and the write block address of the cache memory match, the block address of the subsequent memory request is determined based on the count value of the counting circuit, the block load address, and the address of the subsequent memory request. A determination circuit that determines whether the data corresponding to the address of a subsequent memory read request is a word within a block that has already been written to the cache memory; causes the selection circuit to select the data read from the cache memory at the address of the subsequent memory read request at a timing when the cache memory is not occupied by the block load, and it is determined that the write has not yet been completed. In this case, the memory read request is waited for until memory reply data with the same address as the address of the subsequent memory read request is returned, and at the same time as the memory reply data is returned, the selection circuit selects the memory reply data at the memory reply timing. 1. A cache memory control device comprising: a control means.
JP60212821A 1985-09-25 1985-09-25 Cache memory controller Granted JPS6272041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60212821A JPS6272041A (en) 1985-09-25 1985-09-25 Cache memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60212821A JPS6272041A (en) 1985-09-25 1985-09-25 Cache memory controller

Publications (2)

Publication Number Publication Date
JPS6272041A true JPS6272041A (en) 1987-04-02
JPH0556543B2 JPH0556543B2 (en) 1993-08-19

Family

ID=16628911

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60212821A Granted JPS6272041A (en) 1985-09-25 1985-09-25 Cache memory controller

Country Status (1)

Country Link
JP (1) JPS6272041A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0278426A2 (en) * 1987-02-07 1988-08-17 Nec Corporation Buffer memory circuit arrangement capable of receiving a request without qualification during block transfer
JPS6479843A (en) * 1987-09-22 1989-03-24 Nec Corp Information processor
EP0330007A2 (en) * 1988-02-22 1989-08-30 International Business Machines Corporation Functional cache memory chip architecture
EP0628912A1 (en) * 1992-02-28 1994-12-14 Oki Electric Industry Company, Limited Cache memory apparatus
WO2001037098A1 (en) * 1999-11-16 2001-05-25 Hitachi, Ltd Data processing device and data processing system
JP2009288977A (en) * 2008-05-28 2009-12-10 Fujitsu Ltd Cache memory control device, semiconductor integrated circuit, and cache memory control method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69412574T2 (en) 1993-12-22 1998-12-24 Nihon Plast Co., Ltd., Fuji, Shizuoka Cable reel

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59177782A (en) * 1983-03-25 1984-10-08 Nec Corp Buffer memory controlling system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59177782A (en) * 1983-03-25 1984-10-08 Nec Corp Buffer memory controlling system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0278426A2 (en) * 1987-02-07 1988-08-17 Nec Corporation Buffer memory circuit arrangement capable of receiving a request without qualification during block transfer
JPS6479843A (en) * 1987-09-22 1989-03-24 Nec Corp Information processor
EP0330007A2 (en) * 1988-02-22 1989-08-30 International Business Machines Corporation Functional cache memory chip architecture
EP0628912A1 (en) * 1992-02-28 1994-12-14 Oki Electric Industry Company, Limited Cache memory apparatus
EP0628912A4 (en) * 1992-02-28 1995-10-11 Oki Electric Ind Co Ltd Cache memory apparatus.
US5634104A (en) * 1992-02-28 1997-05-27 Oki Electric Industry Co. Ltd. Cache memory apparatus for reading data corresponding to input address information
US5754814A (en) * 1992-02-28 1998-05-19 Oki Electric Industry Co., Ltd. Cache memory apparatus for reading data corresponding to input address information
WO2001037098A1 (en) * 1999-11-16 2001-05-25 Hitachi, Ltd Data processing device and data processing system
JP2009288977A (en) * 2008-05-28 2009-12-10 Fujitsu Ltd Cache memory control device, semiconductor integrated circuit, and cache memory control method

Also Published As

Publication number Publication date
JPH0556543B2 (en) 1993-08-19

Similar Documents

Publication Publication Date Title
JP3236287B2 (en) Multiprocessor system
JPS6272041A (en) Cache memory controller
JPH06103169A (en) Read data prefetching mechanism for central arithmetic processor
JP2000298640A (en) Dma device
JPH03147157A (en) Information processor
JPH0551933B2 (en)
EP0943998B1 (en) Cache memory apparatus
JP3130569B2 (en) Cache memory store method
JPH07234819A (en) Cache memory
JPS59180878A (en) Control system for buffer storage
JPH09319657A (en) Processor provided with buffer for reading instruction
JP3076199B2 (en) Buffer access control circuit
JPH07152650A (en) Cache control unit
JPH05143464A (en) Main storage key access control system
JPH04353949A (en) Cache memory control system
JP2972711B2 (en) Ordering control method and node
JPH1055308A (en) Cache memory
JPH07146819A (en) Cache system
JPH04359336A (en) Data substituting circuit for cache memory
JPH01307849A (en) Data access device
JPH05120142A (en) Cache memory controller
JPS58179981A (en) Store buffer controller
JPH0736785A (en) Memory controller
JPH09106375A (en) Device and method for controlling cache memory
JPH08166905A (en) Cache memory control method

Legal Events

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