JP2703255B2 - Cache memory writing device - Google Patents
Cache memory writing deviceInfo
- Publication number
- JP2703255B2 JP2703255B2 JP63059284A JP5928488A JP2703255B2 JP 2703255 B2 JP2703255 B2 JP 2703255B2 JP 63059284 A JP63059284 A JP 63059284A JP 5928488 A JP5928488 A JP 5928488A JP 2703255 B2 JP2703255 B2 JP 2703255B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- memory
- cache
- processor
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
- Dram (AREA)
Description
【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は高速アクセスを可能にするため、電子計算機
のプロセサと主記憶部との間に設けられるキャッシュメ
モリ書込み装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial application field) The present invention relates to a cache memory writing device provided between a processor of a computer and a main storage unit to enable high-speed access.
(従来の技術) 計算機の中央処理装置は、アーキテリチャの研究、VL
SI技術の発展にともない、性能、速度ともに、大幅に向
上している。マイクロプロセサの速度を活かすために
は、外部の記憶部のアクセス速度の向上が望まれてい
る。記憶部は一般的に高速、大容量であることが望まし
い。しかしながら、高速なメモリ(スタチィックメモ
リ)は、高価、低容量であり、大容量なダイナミックメ
モリは低速であるというデバイスレベルの相反する問題
があった。そこで、記憶部を2階層に分割し、大容量低
速な主記憶と、小容量高速なバッファ記憶とを組み合わ
せ、後者を前者と中央処理装置との中間に配置し、アク
セス頻度の高いデータを後者バッファ記憶部に格納して
おくことで、記憶部全体のアクセス速度を見かけ上向上
することが、行なわれている。このバッファ記憶部を一
般にキャッシュメモリと呼ぶ。キャッシュメモリ実現の
ための要素として、ヒット検出部がある。これは、中央
処理装置(以下プロセサ)のアクセスしたアドレスのデ
ータがキャッシュメモリに格納されているかどうかを判
定するためのものであり、格納されていればヒット、そ
うでなければミスという情報を出力する。ヒット、ミス
の検出には、一般にタグメモリと呼ばれるもう一つの記
憶部を用いる。タグメモリには、キャッシュのデータ用
メモリ(以下データメモリ)の内容の主記憶上でのアド
レス等が格納されている。ヒット検出部は、プロセサの
出力したアドレスと、タグメモリ内のアドレスとの比較
を行ない一致(ヒット)不一致(ミス)の判定を下す。(Prior art) The central processing unit of the computer is the research of the architecture, VL
With the development of SI technology, both performance and speed have been greatly improved. In order to utilize the speed of the microprocessor, it is desired to improve the access speed of the external storage unit. Generally, it is desirable that the storage unit has a high speed and a large capacity. However, a high-speed memory (static memory) is expensive and has a low capacity, and a large-capacity dynamic memory has a low speed. Therefore, the storage unit is divided into two layers, a large-capacity low-speed main memory and a small-capacity high-speed buffer storage are combined, and the latter is arranged between the former and the central processing unit, and the data with high access frequency is stored in the latter. By storing the data in the buffer storage unit, the access speed of the whole storage unit is apparently improved. This buffer storage unit is generally called a cache memory. There is a hit detection unit as an element for realizing a cache memory. This is to determine whether the data at the address accessed by the central processing unit (hereinafter referred to as a processor) is stored in the cache memory. If the data is stored, hit information is output. I do. For the detection of hits and misses, another storage unit generally called a tag memory is used. The tag memory stores the address of the contents of the data memory (hereinafter, data memory) of the cache on the main memory. The hit detection unit compares the address output from the processor with the address in the tag memory to determine a match (hit) or a mismatch (miss).
すなわち、ヒット検出のためには、タグメモリの読出
しのための時間と、比較器の時間が必要となり、データ
メモリのアクセスに比べて、比較器の分だけ時間がかか
る。そこで従来はプロセサのデータリードに関して、ヒ
ット/ミスの如何にかかわらず、キャッシュデータメモ
リの内容をプロセサに送り、次のサイクルでヒット/ミ
ス情報を通知する方式がとられていた。しかしながら、
コピーバック方式のキャッシュメモリにおいてプロセサ
のデータライトに関しては、ヒット/ミス検出後でない
と、データ部にライト許可を出すことができない。コピ
ーバック方式キャッシュでは、キャッシュヒット時のラ
イト動作はキャッシュに対してだけ実行され、主記憶に
反映されない。主記憶に反映されるのは、主にキャッシ
ュ内のデータエントリが他のアドレスのデータによって
リプレースされる時である。そのため、ライト動作でキ
ャッシュミスを起ことた場合には、もし、キャッシュの
内容がそれ以前に書きかえられて、主記憶の内容と不一
致を起こしているなら、一時、退避用メモリに転送した
後、本来のライト動作を行なわねばならない。(退避さ
れたデータは、それ以降主記憶に書きもどされる)この
様な理由で、ヒット/ミス情報を次のサイクルでプロセ
サに通知する方式をとるキャッシュメモリでは、ライト
動作は、最低でも2サイクル(ヒット検出+ライト動
作)を要していた。That is, the time required for reading the tag memory and the time required for the comparator are required for hit detection, and the time required for the comparator is longer than the time required for accessing the data memory. Therefore, conventionally, regarding the data read of the processor, a method has been adopted in which the contents of the cache data memory are sent to the processor regardless of the hit / miss, and hit / miss information is notified in the next cycle. However,
Regarding the data write of the processor in the copy-back type cache memory, a write permission cannot be issued to the data portion unless hit / miss detection is performed. In the copy-back cache, a write operation at the time of a cache hit is executed only for the cache and is not reflected in the main memory. Reflection to the main memory is mainly when a data entry in the cache is replaced by data at another address. Therefore, if a cache miss occurs during a write operation, if the contents of the cache have been rewritten earlier and inconsistent with the contents of main memory, temporarily transfer them to the evacuation memory. , The original write operation must be performed. (The saved data is thereafter written back to the main memory.) For such a reason, in a cache memory that uses a method of notifying the processor of hit / miss information in the next cycle, the write operation takes at least two cycles. (Hit detection + write operation).
第5図は、従来の方式によるライト動作を示すタイム
チャートである。プロセスサイクル0と1の2サイクル
がキャッシュヒット時のライト動作である。サイクル0
の先頭からアドレス0とライトデータ0がプロセサから
出力され、サイクル0では、まずヒット検出が行なわれ
る。FIG. 5 is a time chart showing a write operation according to the conventional method. Two cycles of process cycles 0 and 1 are write operations at the time of a cache hit. Cycle 0
The address 0 and the write data 0 are output from the processor from the beginning of the sequence. In cycle 0, hit detection is first performed.
よって検出後のHIT/MISS信号はサイクル1から有効に
よる。そのため、実際のライト動作はサイクル1で行う
ことになる。サイクル0,1ではキャッシュヒットしたた
めサイクル1でライト信号が出力されたが、サイクル2,
3ではキャッシュミスが発生したため、サイクル3でラ
イト信号は出力されない。Therefore, the HIT / MISS signal after detection is valid from cycle 1. Therefore, the actual write operation is performed in cycle 1. In cycles 0 and 1, a write signal was output in cycle 1 because of a cache hit.
In No. 3, since a cache miss has occurred, no write signal is output in cycle 3.
プロセササイクル0でライト信号を出力できない理由
は明らかで、キャッシュミスの時に、キャッシュに蓄え
られている別のアドレスの値を壊わしてしまうからであ
る。The reason why the write signal cannot be output in processor cycle 0 is obvious, because the value of another address stored in the cache is destroyed in the event of a cache miss.
以上の説明の通り、従来の方式では、ライト動作が2
サイクル必要である。As described above, in the conventional method, the write operation is performed for 2 times.
Cycle required.
(発明が解決しようとする課題) 以上、コピーバック方式キャッシュメモリ装置でヒッ
ト検出が次のサイクルで確定する方式をとった場合ライ
ト動作がリード動作の2倍の時間を要するという問題点
があった。これを回避するためには、ヒット検出部を高
速化し、1サイクルで、ヒットの検出と、データのライ
トが行えればよいことになるが、そのためには、より高
速なタグメモリ、比較器が必要となる。(Problems to be Solved by the Invention) As described above, when the hit detection is determined in the next cycle in the copy-back cache memory device, there is a problem that the write operation takes twice as long as the read operation. . In order to avoid this, it is only necessary to speed up the hit detection unit and perform hit detection and data writing in one cycle. To achieve this, a faster tag memory and comparator are required. Required.
本発明の目的は、この問題点をより少ないハードウェ
アコストにより解決することにある。An object of the present invention is to solve this problem with lower hardware costs.
(課題を解決するための手段) 本発明に係るキャッシュメモリ書込み装置は、プロセ
サと主記憶部との間に設けられ、主記憶部のデータの一
部を格納するキャッシュメモリと、前記プロセサから前
記キャッシュメモリへデータを書込む前に、前記キャッ
シュメモリ中の少なくともこの書込みが行われるべきア
ドレスのデータを格納するための記憶手段と、前記プロ
セサから前記キャッシュメモリの前記アドレスにデータ
を書込む手段と、前記プロセサからの前記書込みが行わ
れるべき主記憶アドレスのデータが前記キャッシュメモ
リに存在するか否かを判定する判定手段と、この判定手
段により存在しないと判定された場合に、前記プロセサ
から前記キャッシュメモリへ書き込まれたデータを存続
されたまま、前記主記憶部から前記キャッシュメモリへ
前記主記憶アドレスのデータを読込む手段と、前記記憶
手段に格納されたデータを前記キャッシュメモリ中のデ
ータに優先させて前記主記憶部に書戻す手段とを具備し
たことを特徴とする。(Means for Solving the Problems) A cache memory writing device according to the present invention is provided between a processor and a main storage unit, and stores a part of data in the main storage unit in a cache memory; Before writing data to the cache memory, storage means for storing at least data at an address in the cache memory at which the writing is to be performed; and means for writing data from the processor to the address of the cache memory. Determining means for determining whether or not data of a main storage address to be written from the processor exists in the cache memory; and when the determining means determines that the data does not exist, the processor determines that the data does not exist. While the data written to the cache memory is maintained, the cache is Means for reading the data of the main storage address into the cache memory, and means for rewriting the data stored in the storage means to the main storage unit in preference to the data in the cache memory. .
(作 用) プロセサからのライト動作に対して、本発明のキャッ
シュメモリは、サイクルの前半で、少なくとも、該当す
るアドレスから読み出したデータ(一般に1ワード)を
上記記憶手段に格納する。サイクルの後半では上記判定
手段のヒット/ミス信号の如何にかかわらず、キャッシ
ュメモリの該当するアドレスにプロセサのデータ(一般
に1ワード)をライトする。続く次のサイクルで、上記
判定手段より、ヒット/ミス信号が出力される。ヒット
の場合は、以降に必要な処理はない。ミスの場合は、必
要なデータを主記憶から読み込む必要があるが、プロセ
サが書き込んだアドレスだけはその内容を保持する。(Operation) In response to a write operation from the processor, the cache memory of the present invention stores at least data (generally one word) read from a corresponding address in the first half of the cycle in the storage means. In the latter half of the cycle, the processor data (generally one word) is written to the corresponding address of the cache memory regardless of the hit / miss signal of the determination means. In the following next cycle, a hit / miss signal is output from the determination means. In the case of a hit, no further processing is required. In the case of a miss, it is necessary to read necessary data from the main memory, but only the address written by the processor retains its contents.
一般にキャッシュメモリでは、タグメモリに格納され
ている1つの主記憶アドレスに対して、複数ワードのデ
ータが、そのデータメモリに格納される。これをブロッ
ク(又はライン)と呼び主記憶からの読込み、主記憶へ
の書戻しは、ブロック単位で行なわれる。Generally, in a cache memory, data of a plurality of words is stored in a data memory for one main storage address stored in a tag memory. This is called a block (or line), and reading from the main memory and writing back to the main memory are performed in block units.
また、タグメモリ内に、キャッシュのデータが、以前
にプロセサによって書きかえられたかどうかを示すフラ
グを持っており、ブロックがリプレースされる際に、こ
のフラグが立っていれば、キャッシュ内の前のデータ
を、そのタグが示す主記憶上のアドレスへ書きもどさな
ければならない。この書戻し対象となるデータは、通常
はキャッシュ内のデータであり、これが退避用メモリに
転送され、その後に主記憶に書き戻される。本発明で
は、特に上記ミスの場合には、書戻すべきデータの少な
くとも一部がキャッシュ内ではなく上記記憶手段中にあ
るため、例えば退避用メモリの入力部に選択器を設け
て、プロセサのライト動作により上記記憶手段に格納さ
れたデータをキャッシュ中のデータに優先させた結果
(上述したように一般に複数ワードのデータとなる)が
主記憶に書戻されるようにする。Also, in the tag memory, there is a flag indicating whether data in the cache has been rewritten by the processor before. When this flag is set when a block is replaced, if the flag is set, the previous value in the cache is set. Data must be written back to the address in main memory indicated by the tag. The data to be rewritten is usually data in the cache, which is transferred to the evacuation memory and then written back to the main memory. In the present invention, especially in the case of the above-mentioned mistake, at least a part of the data to be rewritten is not in the cache but in the storage means. By operation, the result of giving priority to the data stored in the storage means over the data in the cache (generally, data of a plurality of words as described above) is written back to the main storage.
(実施例) 以下図面を用いて、本発明の一実施例につき説明す
る。(Embodiment) An embodiment of the present invention will be described below with reference to the drawings.
第1図は本発明の一実施例のブロック図である。1は
プロセサ、9(AL)はプロセサから出力されるアドレス
の下位、10(AH)はアドレスの上位である。実施例で
は、キャッシュメモリをダイレクトマッピング(コピー
バック)方式とし、AL,AHをそれぞれ4ケタの数字で表
わす。ALはキャッシュメモリ2に供給され、タグメモリ
の出力がAHと比較される。(ヒット検出部3)つまりダ
イレクトマッピングキャッシュでは、主記憶部5上で、
ALが等しいアドレスのデータは、キャッシュの同一エン
トリに入る可能性がある。現在キャッシングされている
データのアドレスの上位は、タグメモリに入っている。
つまり、プロセサが出力したアドレスの下位(AL)でア
ドレシングされるタグメモリの内容と、AHとを比較すれ
ば、キャッシュがヒットしたがどうかがわかる。ヒット
orミスを示す信号がHIT/MISS信号12である。データメモ
リ4には、プロセサのALアドレスが供給され、データの
アクセスを行う。FIG. 1 is a block diagram of one embodiment of the present invention. 1 is a processor, 9 (AL) is the lower part of the address output from the processor, and 10 (AH) is the upper part of the address. In the embodiment, the cache memory is of a direct mapping (copy back) type, and AL and AH are each represented by a four-digit number. AL is supplied to the cache memory 2, and the output of the tag memory is compared with AH. (Hit detection unit 3) That is, in the direct mapping cache, on the main storage unit 5,
Data at addresses with the same AL may enter the same entry in the cache. The upper part of the address of the data currently being cached is stored in the tag memory.
That is, by comparing the contents of the tag memory addressed at the lower (AL) of the address output by the processor with the AH, it can be determined whether or not the cache has hit. hit
The HIT / MISS signal 12 is a signal indicating an or miss. The data memory 4 is supplied with the AL address of the processor and accesses data.
もし、キャッシュミスを起こした場合、主記憶部5か
ら正しいデータが読出され、データメモリ4に格納され
る。また、データメモリの前の内容が、すでにプロセサ
によって書き換えられていた場合には、その内容の主記
憶部5への書戻しを行う。If a cache miss occurs, correct data is read from the main storage unit 5 and stored in the data memory 4. If the previous contents of the data memory have already been rewritten by the processor, the contents are written back to the main storage unit 5.
そのために、前記、主記憶部5からの読込み中にデー
タメモリの前のデータを書戻し用記憶部6へ格納する。
実施例では、キャッシュの1ブロックを4ワードとして
いる。For this purpose, the data before the data memory is stored in the write-back storage unit 6 during the reading from the main storage unit 5.
In the embodiment, one block of the cache has four words.
第2図は、タグメモリの内容とデータメモリとの関係
を示した図である。タグメモリには、各エントリ毎にV,
M,上位アドレスという情報をもっている。Vは有効フラ
グであり、データが有効であるかどうかを示す。Mは書
換フラグであり、そのブロックのデータが、プロセサに
よって変更されたかどうかを示す。FIG. 2 is a diagram showing the relationship between the contents of the tag memory and the data memory. In the tag memory, V,
M, has information of upper address. V is a valid flag, and indicates whether data is valid. M is a rewrite flag, and indicates whether the data of the block has been changed by the processor.
タグメモリの各エントリに対して、データメモリの4
ワードが対応している。For each entry in the tag memory, 4
Words correspond.
第3図はプロセサによるリード動作を示したタイミグ
チャートである。リード動作については、従来も本発明
も同じである。プロセササイクル0は、キャッシュヒッ
トした時のリード動作である。アドレス0に対応したデ
ータ0が同一サイクル中にリードされる。プロセササイ
クル1からnまでは、キャッシュミス時のリード動作で
ある。まずプロセササイクル1でアドレス1が出力さ
れ、データXがリードされたが、サイクル2の先頭で、
HIT/MISS=0となったことから、キャッシュミスである
ことがわかる。よってデータXは無効なデータとして扱
われ、プロセサはHIT/MISS=0である間は停止する。そ
の間キャッシュ側は主記憶から正しいデータを読み込み
プロセササイクルnにて、正しいデータ1をプロセサに
渡す。FIG. 3 is a timing chart showing a read operation by the processor. The read operation is the same in the related art and the present invention. Processor cycle 0 is a read operation when a cache hit occurs. Data 0 corresponding to address 0 is read during the same cycle. The processor cycle 1 to n is a read operation at the time of a cache miss. First, address 1 was output and data X was read in processor cycle 1, but at the beginning of cycle 2,
Since HIT / MISS = 0, it is known that there is a cache miss. Therefore, data X is treated as invalid data, and the processor stops while HIT / MISS = 0. During this time, the cache side reads the correct data from the main memory and passes the correct data 1 to the processor in the processor cycle n.
第4図は、本発明のライト動作を示すタイミングチャ
ートである。第5図と比較するHIT/MISS信号の出力タイ
ミングは変わらないが、ライトサイクルが1サイクルで
終了していることがわかる。FIG. 4 is a timing chart showing the write operation of the present invention. Although the output timing of the HIT / MISS signal compared with FIG. 5 does not change, it can be seen that the write cycle is completed in one cycle.
本発明では、ライト時はHIT/MISSにかかわらずキャッ
シュメモリに対してライトを行なう。そのかわりに、キ
ャッシュの元のデータを1ワード記憶部に退避されたデ
ータは、主記憶に対する書き戻しが必要な場合に用いる
という制御を行なう。これにより、従来2サイクル要し
ていたライト動作を1サイクルで行うことができるとい
うものである。In the present invention, at the time of writing, writing is performed to the cache memory regardless of HIT / MISS. Instead, control is performed such that data whose original data in the cache is saved in the one-word storage unit is used when writing back to the main storage is necessary. Thus, the write operation, which conventionally required two cycles, can be performed in one cycle.
本発明の動作を第1図を用いて説明する。 The operation of the present invention will be described with reference to FIG.
プロセサ1は、AL9、AH19よりライトアドレスを出力
する。ALはアドレスの下位、AHは上位であり、本実施例
では、各々16ビットであるものとする。アドレスの出力
と同時に、プロセサはライトデータをDATAバス15に出力
する。これは32ビット(1ワード)であとする。ALはタ
グメモリ2のアドレスに供給され、タグメモリからの出
力データ11とAHがヒット検出部3にて比較され、一致し
ていたら、HIT/MISS信号12を1に、不一致なら0にす
る。この信号はプロセサがアドレスを出力した次のサイ
クルで確定するものとする。比較動作と並行して、デー
タメモリ4にはALがアドレスとして供給され、該アドレ
スのデータがデータ出力ライン16から読み出され、1ワ
ード記憶部7に格納される。続いて、プロセサが出力し
たライトデータがDATAバス15を通じて、入力バッファ13
からデータメモリ4へ入力され、ライトされる。Processor 1 outputs a write address from AL9 and AH19. AL is the lower part of the address and AH is the upper part. In this embodiment, it is assumed that each has 16 bits. The processor outputs the write data to the DATA bus 15 simultaneously with the output of the address. This is 32 bits (1 word). AL is supplied to the address of the tag memory 2, and the output data 11 from the tag memory and AH are compared by the hit detection unit 3, and if they match, the HIT / MISS signal 12 is set to 1; This signal is determined in the next cycle after the processor outputs the address. In parallel with the comparison operation, AL is supplied to the data memory 4 as an address. Data at the address is read from the data output line 16 and stored in the one-word storage unit 7. Subsequently, the write data output by the processor is transferred to the input buffer 13 through the DATA bus 15.
Is input to the data memory 4 and written.
実際には次のタイミングでHIT/MISS信号が確定するこ
とになるが、HIT/MISS信号が1なら、ライト動作は完
了、0ならキャッシュミスであるから主記憶部5から正
しいデータをキャッシュに読み込む必要がある。Actually, the HIT / MISS signal is determined at the next timing. However, if the HIT / MISS signal is 1, the write operation is completed. If the HIT / MISS signal is 0, a cache miss has occurred. There is a need.
それは、主記憶5→メモリデータバッファ17→入力バ
ッファ13→データメモリ4の経路で行なわれる。その
際、すでにプロセサによって値の書き込まれたワードに
は、メモリからのデータを書き込まない。本実施例では
1つのタグメモリのエントリに対して、データメモリ4
ワード分が対応することにしているが、メモリから読み
込まれる4ワードのうち、プロセサがライトしたワード
を除く3ワードをキャッシュにライトすることになる。This is performed in the route of the main memory 5, the memory data buffer 17, the input buffer 13, and the data memory 4. At this time, the data from the memory is not written to the word whose value has already been written by the processor. In the present embodiment, the data memory 4
Although it is assumed that the words correspond, three of the four words read from the memory except the word written by the processor are written to the cache.
また、プロセサがキャッシュにライトする前の状態に
おいて、タグメモリの該当するエントリのVフラグ、M
フラグ、(第2図)がともにセットされている時は、そ
のデータ部には、有効なデータが入っており、かつ主記
憶部5からコピーされた後に、プロセサによって書き換
えられていることを示す。そのような場合には、そのデ
ータが主記憶の他のアドレスのデータによって置きかわ
る前に、書戻し用記憶部6に退避しておき、後に主記憶
部5へ書き戻す必要がある。これが、ライトバック方式
キャッシュの特徴である。書戻し用記憶部6は、本実施
例ではキャッシュの1ブロックサイズに等しい4ワード
分の容量があり、ここへはデータメモリ4からデータ出
力ライン16を通してデータが書き込まれる。その際、ラ
イト動作によるキャッシュミスなら、ライトされたアド
レスのデータだけは、データメモリからではなく、1ワ
ード記憶部7からライトされる。Before the processor writes data to the cache, the V flag, M
When both the flag and (FIG. 2) are set, it indicates that the data portion contains valid data and has been rewritten by the processor after being copied from the main storage portion 5. . In such a case, it is necessary to save the data to the write-back storage unit 6 before the data is replaced with data at another address of the main storage, and then write it back to the main storage unit 5 later. This is a feature of the write-back cache. In this embodiment, the write-back storage unit 6 has a capacity of four words equal to one block size of the cache, and data is written from the data memory 4 through the data output line 16 to this. At this time, if a cache miss occurs due to a write operation, only the data at the written address is written not from the data memory but from the one-word storage unit 7.
また、キャッシュメモリシステムでは、キャッシュを
バイパスする動作を許すことがある。すなわち、プロセ
サが主記憶部を直接アクセスするか、I/Oレジスタを直
接アクセスする場合がある。これをノンキャッシュ動作
と言う。Further, in the cache memory system, an operation of bypassing the cache may be permitted. That is, the processor may directly access the main storage unit or directly access the I / O register. This is called a non-cache operation.
ノンキャッシュ動作であることが、プロセサがアドレ
スを出力する時点で決定されれば何の問題もないが、こ
れが、アドレス接換等何らかのパスを経由して決定され
る場合、ノンキャッシュ動作であることが判明するの
が、HIT/MISS信号と同時か、またはそれより遅延するこ
とがある。そのような場合、本発明では、1ワード記憶
部7からデータメモリへ再び古い値を書き戻すための再
現用バッファ18を具備している。There is no problem if non-cache operation is determined when the processor outputs an address.However, if this is determined via some path such as address replacement, it must be non-cache operation. May be coincident with the HIT / MISS signal or later. In such a case, the present invention includes a reproduction buffer 18 for rewriting old values from the one-word storage unit 7 to the data memory.
本実施例ではキャッシュの方式をダイレクトマッビン
グ、ブロックサイズを4ワード(1ワード32ビット)と
して説明したが、特に限定するものではない。本発明の
要旨を逸脱しない範囲で変形することも可能である。In the present embodiment, the cache method is described as direct mapping, and the block size is set to 4 words (1 word 32 bits). However, there is no particular limitation. Modifications are possible without departing from the spirit of the invention.
キャッシュメモリはプロセサのクロック周期が、キャ
ッシュのヒット検出に要する時間よりも、十分長い場合
には、リードライトともに1サイクルで行うことが可能
であるが、クロック周期が短かくなり、プロセッサが高
速になるにつれて、ヒット検出が間に合わないという問
題に直面する。そこで従来の解決策としては、ライトは
2サイクルで処理し、リードはヒットミスにかかわら
ず、1サイクルで処理し、2サイクル目で、リードデー
タが有効であるからどいうかの情報をプロセサに通知し
ていた。If the clock cycle of the processor is sufficiently longer than the time required for detecting a cache hit, the cache memory can perform both reading and writing in one cycle, but the clock cycle becomes shorter and the processor becomes faster. As they become, they face the problem of missed hit detection. Therefore, as a conventional solution, a write is processed in two cycles, a read is processed in one cycle irrespective of a hit or miss, and in the second cycle, the processor is notified of information as to whether the read data is valid or not. Was.
本発明によって、ライト動作もリード同様ヒットして
いれば1サイクルで完了することが可能となるという効
果が得られる。According to the present invention, it is possible to obtain an effect that a write operation can be completed in one cycle as long as a hit is made similarly to a read operation.
第1図は本発明の一実施例を示すブロック図、第2図は
本発明の実施例で用いたダイレクトマッピングキャッシ
ュのタグメモリエントリと、データメモリブロック(各
4ワード)の関係を示した図、第3図は本発明のプロセ
サによるリード動作を表わすタイミング4チャート、第
4図は本発明のプロセサによるライト動作を表わすタイ
ミングチャート、第5図は従来方式によるライト動作を
表わすタイミングチャートである。 1……プロセサ、2……タグメモリ 3……ヒット検出部、4……データメモリ 5……主記憶部、6……書戻し用記憶部 7……1ワード記憶部、8……セレクタ 9……AL、10……AH 11……タグメモリ出力、12……HIT/MISS信号 13……入力バッファ、15……DATAバス 16……データ出力ライン、17……メモリデータバッファ 18……再現用バッファFIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a diagram showing a relationship between a tag memory entry of a direct mapping cache used in an embodiment of the present invention and a data memory block (4 words each). FIG. 3 is a timing chart 4 showing a read operation by the processor of the present invention, FIG. 4 is a timing chart showing a write operation by the processor of the present invention, and FIG. 5 is a timing chart showing a write operation by the conventional method. 1 Processor 2 Tag memory 3 Hit detection unit 4 Data memory 5 Main storage unit 6 Write-back storage unit 7 1-word storage unit 8 Selector 9 …… AL, 10 …… AH 11 …… Tag memory output, 12 …… HIT / MISS signal 13 …… Input buffer, 15… DATA bus 16 …… Data output line, 17 …… Memory data buffer 18 …… Reproduction Buffer
───────────────────────────────────────────────────── フロントページの続き (72)発明者 前田 賢一 神奈川県川崎市幸区小向東芝町1 株式 会社東芝総合研究所内 (56)参考文献 特開 昭53−148344(JP,A) ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Kenichi Maeda 1 Toshiba Research Laboratory, Komukai Toshiba-cho, Saisaki-ku, Kawasaki-shi, Kanagawa Prefecture (56) References JP-A-53-148344 (JP, A)
Claims (1)
記憶部のデータの一部を格納するキャッシュメモリと、 前記プロセサから前記キャッシュメモリへデータを書込
む前に、前記キャッシュメモリ中の少なくともこの書込
みが行われるべきアドレスのデータを格納するための記
憶手段と、 前記プロセサから前記キャッシュメモリの前記アドレス
にデータを書込む手段と、 前記プロセサからの前記書込みが行われるべき主記憶ア
ドレスのデータが前記キャッシュメモリに存在するか否
かを判定する判定手段と、 この判定手段により存在しないと判定された場合に、前
記プロセサから前記キャッシュメモリへ書き込まれたデ
ータを存続させたまま、前記主記憶部から前記キャッシ
ュメモリへ前記主記憶アドレスのデータを読込む手段
と、 前記記憶手段に格納されたデータを前記キャッシュメモ
リ中のデータに優先させて前記主記憶部に書戻す手段と
を具備したことを特徴とするキャッシュメモリ書込み装
置。A cache memory provided between a processor and a main storage unit for storing a part of data in the main storage unit; and a cache memory for writing data from the processor to the cache memory. Storage means for storing data of at least the address at which the writing is to be performed; means for writing data from the processor to the address of the cache memory; and a main storage address at which the writing from the processor is to be performed. Determining means for determining whether or not the data exists in the cache memory; and when the determining means determines that the data does not exist, the data written from the processor to the cache memory is maintained, and Means for reading data of the main storage address from the main storage unit to the cache memory; Cache memory writing device stored the data in the storage means in preference to the data in the cache memory, characterized by comprising a means for writing back to the main storage unit.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63059284A JP2703255B2 (en) | 1988-03-15 | 1988-03-15 | Cache memory writing device |
| US07/321,398 US5034885A (en) | 1988-03-15 | 1989-03-10 | Cache memory device with fast data-write capacity |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63059284A JP2703255B2 (en) | 1988-03-15 | 1988-03-15 | Cache memory writing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH01233536A JPH01233536A (en) | 1989-09-19 |
| JP2703255B2 true JP2703255B2 (en) | 1998-01-26 |
Family
ID=13108939
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63059284A Expired - Fee Related JP2703255B2 (en) | 1988-03-15 | 1988-03-15 | Cache memory writing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2703255B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220058295A1 (en) * | 2020-08-20 | 2022-02-24 | Micron Technology, Inc. | Safety and security for memory |
-
1988
- 1988-03-15 JP JP63059284A patent/JP2703255B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220058295A1 (en) * | 2020-08-20 | 2022-02-24 | Micron Technology, Inc. | Safety and security for memory |
| US12189832B2 (en) * | 2020-08-20 | 2025-01-07 | Micron Technology, Inc. | Safety and security for memory |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH01233536A (en) | 1989-09-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0029517A2 (en) | Store-in-cache mode data processing apparatus | |
| JPS5821353B2 (en) | Channel-to-memory writing device | |
| JPH0250237A (en) | Multi-processor data processing system and cache device using the same | |
| US5034885A (en) | Cache memory device with fast data-write capacity | |
| JPH03225542A (en) | Memory of data and processing circuit for bit encode data | |
| US4658356A (en) | Control system for updating a change bit | |
| US4648033A (en) | Look-aside buffer LRU marker controller | |
| US7577791B2 (en) | Virtualized load buffers | |
| JP3733604B2 (en) | Cache memory | |
| JPS644214B2 (en) | ||
| JPH01233536A (en) | Cache memory writing device | |
| JP3564343B2 (en) | Data transfer device and method during cache bypass | |
| JP3081635B2 (en) | Cache memory invalidation processing apparatus and invalidation control method | |
| JPS5818710B2 (en) | memory system | |
| JPS6135583B2 (en) | ||
| JPH07152650A (en) | Cache controller | |
| KR970004520B1 (en) | High speed memory control method and device | |
| JPH09282231A (en) | Write-back type cache device | |
| JPH01251248A (en) | Cache control system for stack data structure | |
| JPS63259749A (en) | Virtual memory control method | |
| JP3074897B2 (en) | Memory circuit | |
| EP0460852A2 (en) | System for maintaining data coherency between main and cache memories | |
| EP0400851A2 (en) | Efficient cache utilizing a store buffer | |
| JPH02259945A (en) | Storing processing system | |
| JPH0387949A (en) | Cache memory controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |