JP2716163B2 - Cache memory control method - Google Patents

Cache memory control method

Info

Publication number
JP2716163B2
JP2716163B2 JP63264427A JP26442788A JP2716163B2 JP 2716163 B2 JP2716163 B2 JP 2716163B2 JP 63264427 A JP63264427 A JP 63264427A JP 26442788 A JP26442788 A JP 26442788A JP 2716163 B2 JP2716163 B2 JP 2716163B2
Authority
JP
Japan
Prior art keywords
read
cache
data
block
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.)
Expired - Lifetime
Application number
JP63264427A
Other languages
Japanese (ja)
Other versions
JPH02110752A (en
Inventor
均 ▲高▼木
雅俊 小藤
修也 平山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP63264427A priority Critical patent/JP2716163B2/en
Publication of JPH02110752A publication Critical patent/JPH02110752A/en
Application granted granted Critical
Publication of JP2716163B2 publication Critical patent/JP2716163B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 技術分野 本発明はキャッシュメモリ制御方式に関し、特に主記
憶装置内のデータのコピーを複数ワードからなるブロッ
ク単位で保持し、これ等ブロック内のデータの有効性を
管理するための有効ビットをワード単位で有するキャッ
シュメモリの制御方式に関する。
Description: TECHNICAL FIELD The present invention relates to a cache memory control system, and in particular, retains a copy of data in a main storage device in units of blocks composed of a plurality of words, and manages the validity of data in these blocks. And a control method of a cache memory having valid bits for each word.

従来技術 キャッシュメモリの制御方式としては、キャッシュメ
モリ装置のディレクトリ部においてブロックアドレスと
このブロックアドレスに対する1ビットの有効ビットを
データ部に登録して、ブロック単位でデータの管理を行
う方式のものがある。この様な制御方式では、キャッシ
ュメモリ装置に対して読出し要求が送られてくると、ブ
ロックアドレスと有効ビットとの判定によりキャッシュ
ミスが生じた場合、主記憶装置に対してブロックの読出
しを行うようになっている。
2. Description of the Related Art As a control method of a cache memory, there is a method of registering a block address and one valid bit corresponding to the block address in a data portion in a directory portion of a cache memory device and managing data in block units. . In such a control method, when a read request is sent to the cache memory device, if a cache miss occurs due to the determination of the block address and the valid bit, the block is read from the main storage device. It has become.

一方、ある種の情報処理システムでは、キャッシュメ
モリ装置がブロックの内容と主記憶装置の内容との対応
性を、複数の有効ビットで管理しているものがある。す
なわち、キャッシュメモリ装置内のブロック内容をこの
ブロックを構成するワード単位にて管理すべく、ワード
毎に有効ビットを設けたものがある。
On the other hand, in some types of information processing systems, a cache memory device manages the correspondence between the contents of a block and the contents of a main storage device using a plurality of valid bits. That is, there is a cache memory device in which a valid bit is provided for each word in order to manage the contents of a block in the word constituting the block.

この方式では、ストア動作や他のプロセッサのストア
動作等によって、ブロック内の部分領域であるワードに
対応する有効ビットをリセットして無効化している。従
って、ある瞬間においてはブロック内の1つの有効ビッ
トのみが無効を示している場合が生じ得る。この様な場
合にも、読出し要求によってキャッシュミスが生じたと
き、主記憶装置に対して当読読出し要求のあったブロッ
クの読出しを行っている。
In this method, a valid bit corresponding to a word which is a partial area in a block is reset and invalidated by a store operation or a store operation of another processor. Therefore, at a certain moment, a case may occur in which only one valid bit in the block indicates invalid. In such a case as well, when a cache miss occurs due to the read request, the block for which the read / read request was issued is read from the main storage device.

この様に、従来の方式では、ブロック内の有効ビット
が複数あるにもかかわらず、ブロック内のただ1つの有
効ビットが無効になっているために生じたキャッシュミ
ス時にも、主記憶装置に対して当読ブロックの読出しを
行うようになっているので、メモリのアクセス時間がか
かり過ぎ、動作速度の低下を招来することになる。
As described above, in the conventional method, even when there is a plurality of valid bits in the block, even when a cache miss occurs because only one valid bit in the block is invalid, the main storage device can be used. In such a case, the read block is read out, so that it takes too much time to access the memory, which leads to a decrease in operating speed.

また、従来の方式では、ある瞬間においてはブロック
内の有効ビットが1つ以上(少くとも1つ)無効を示し
ている場合が生じ得る。この様な場合にも、読出し要求
によりキャッシュヒットが生じたとき、主記憶装置に対
してブロック読出しは行っていない。従って、キャッシ
ュミスするまではキャッシュメモリ装置に対して有効デ
ータを反映できないことになる。
Further, in the conventional method, there may be a case where one or more (at least one) valid bits in a block indicate invalid at a certain moment. Even in such a case, when a cache hit occurs due to the read request, the block read is not performed on the main storage device. Therefore, valid data cannot be reflected on the cache memory device until a cache miss occurs.

ここで、アクセスされたブロックは以後アクセス頻度
が一般的に比較的高くなるという事実からすれば、上述
の様な場合にはキャッシュヒット率が低下して、やはり
処理速度が低下するという欠点がある。
Here, the fact that the frequency of access to the accessed block generally becomes relatively high thereafter has the drawback that the cache hit rate decreases in the above-described case, and the processing speed also decreases. .

発明の目的 本発明の目的は、メモリアクセスの動作時間を短縮し
て処理速度を大としたキャッシュメモリ制御方式を提供
することである。
SUMMARY OF THE INVENTION An object of the present invention is to provide a cache memory control method which shortens the operation time of memory access and increases the processing speed.

本発明の他の目的は、有効ビットが1つのときのキャ
ッシュミス時におけるメモリアクセス時間の短縮を図っ
たキャッシュメモリ制御方式を提供することである。
It is another object of the present invention to provide a cache memory control method for shortening a memory access time when a cache miss occurs when the number of valid bits is one.

本発明のさらに他の目的は、有効ビットが1つ以上あ
るときのキャッシュヒット時においてもキャッシュミス
の如く主記憶装置からブロックデータを読出してキャッ
シュメモリへデータを反映させ、キャッシュヒット率の
向上を図ったキャッシュメモリ制御方式を提供すること
である。
Still another object of the present invention is to improve the cache hit ratio by reading block data from the main storage device and reflecting the data to the cache memory as in a cache miss even when a cache hit occurs when there is one or more valid bits. It is an object of the present invention to provide an intended cache memory control method.

発明の構成 本発明によれば、主記憶装置内のデータのコピーを複
数ワードからなるブロック単位で保持し、これ等ブロッ
ク内のデータの有効性を管理するための有効ビットをワ
ード単位で有するキャッシュメモリの制御方式であっ
て、前記キャッシュメモリへの読出し要求に応答してキ
ャッシュヒットかキャッシュミスかを判定する手段と、
キャッシュミスと判定されたとき、読出し対象のブロッ
クにおけるワード単位の有効ビットの無効化状態を検出
する手段を設け、この検出結果が1つのワードのみの無
効を示しているとき、この無効となっているワードを前
記主記憶装置から読出すと共に他のワードは前記キャッ
シュメモリから読出し、前記検出結果が複数のワードの
無効を示しているとき、前記主記憶装置から読出し要求
のブロックを読出すようにしたことを特徴とするキャッ
シュメモリ制御方式が得られる。
According to the present invention, there is provided a cache which holds a copy of data in a main storage device in units of blocks each consisting of a plurality of words, and has a valid bit in words for managing the validity of data in these blocks. A memory control method, comprising: means for determining whether a cache hit or a cache miss in response to a read request to the cache memory;
Means for detecting an invalid state of a valid bit in a word unit in a block to be read when a cache miss is determined is provided. When the detection result indicates that only one word is invalid, the invalid state is determined. The read word is read from the main memory and the other word is read from the cache memory. When the detection result indicates that a plurality of words are invalid, the read request block is read from the main memory. Thus, a cache memory control method characterized by the above is obtained.

更に、本発明によれば、主記憶装置内のデータのコピ
ーを複数ワードからなるブロック単位で保持し、これ等
ブロック内のデータの有効性を管理するための有効ビッ
トをワード単位で有するキャッシュメモリの制御方式で
あって、前記キャッシュメモリへの読出し要求に応答し
てキャッシュヒットかキャッシュミスかを判定する手段
と、キャッシュヒットと判定されたとき、読出し対象の
ブロックにおけるワード単位の有効ビットの無効化状態
を検出する手段を設け、この検出結果が少なくとも1つ
のワードの無効を示しているとき、読出し要求元に対し
てキャッシュメモリから対応するブロックを読出して送
出すると共に前記主記憶装置に対して対応するブロック
の読出しをなすようにしたことを特徴とするキャッシュ
メモリ制御方式が得られる。
Further, according to the present invention, a cache memory which holds a copy of data in a main storage device in units of blocks each composed of a plurality of words and has valid bits for managing the validity of data in these blocks in units of words. Means for determining whether a cache hit or cache miss occurs in response to a read request to the cache memory, and when a cache hit is determined, invalidation of a word unit valid bit in a block to be read. Means for detecting an activation state, and when this detection result indicates that at least one word is invalid, the corresponding block is read out from the cache memory to the read request source and sent out, and the read request is sent to the main storage device. A cache memory control method characterized in that corresponding blocks are read out. It is.

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

第1図は本発明の一実施例のブロック図であり、第2
図は読出要求アドレスとアドレスアレイ(AA)5に登録
されているアドレスとの比較ゲート群8の詳細図であ
る。尚、ここでは1セットのセットアソシアティブキャ
ッシュについて説明し、また各ワードごとに有効ビット
が存在していることを想定している。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
The figure is a detailed diagram of a comparison gate group 8 for comparing a read request address with an address registered in an address array (AA) 5. Here, one set of associative cache will be described, and it is assumed that a valid bit exists for each word.

先ず、図示せぬ上位装置からのリードリクエストに関
する動作について説明する。リードリクエストとそのア
ドレスは信号線51,52を通じてアドレスセレクタ(SAX)
1,ステータスセレクタ(SSX)2により選択され、アド
レスレジスタ(AAR)3とステータスレジスタ(SAR)4
に夫々格納される。
First, an operation related to a read request from a higher-level device (not shown) will be described. The read request and its address are sent via signal lines 51 and 52 to the address selector (SAX).
1, selected by status selector (SSX) 2, address register (AAR) 3 and status register (SAR) 4
Respectively.

当該リクエストがSAR4によってリードリクエストであ
ることが解読されると、アドレスアレイ(AA)5とAAR3
の出力の一部59によりアドレッシングされ、AA5の出力
とAAR3の出力の別の一部が比較器7により比較される。
AAR1の下位2ビットは信号線60を通じてリードライトデ
コーダ(RWDEC)6へ入力され、このデコーダ6により
各出力がブロック内のワード位置を表わす様にデコード
される。この場合は2ビットが4本になる。AA5のV0か
らV3の各部はブロック内の各語の有効性を表示してお
り、ゲート群8によりAAR1に保持されているアドレスの
ブロック内のワードに対するV0からV3において有効性が
比較される。
When the request is read by the SAR4 as a read request, the address array (AA) 5 and the AAR3
The output of AA5 and another part of the output of AAR3 are compared by the comparator 7.
The lower two bits of AAR1 are input to a read / write decoder (RWDEC) 6 through a signal line 60, and each output is decoded by the decoder 6 so as to represent a word position in the block. In this case, there are four 2 bits. The portions V0 to V3 of AA5 indicate the validity of each word in the block, and the gate group 8 compares the validity in V0 to V3 for the word in the block at the address held in AAR1.

AAR3によるAA5のアクセスの結果は以下の3つに分類
され、ステータスレジスタ(SBR)10に格納される。
The result of AA5 access by AAR3 is classified into the following three, and is stored in the status register (SBR) 10.

a.キャッシュヒット(条件:HIT);キャッシュ記憶内に
要求されたデータが存在する。
a. Cache hit (condition: HIT): The requested data exists in the cache storage.

b.キャッシュミス(条件:MIS ・▲
▼);キャッシュ記憶内に要求されたデータが存在せ
ず、それは、ブロック内の1語だけの有効ビットが無効
になっている。
b. Cache miss (Condition: MIS ・ ▲
▼); The requested data does not exist in the cache storage, because the valid bit of only one word in the block is invalid.

c.キャッシュミス(条件:MIS ・MULTIMIS);キャッシ
ュ記憶内に要求されたデータが存在せず、それはブロッ
ク内の2語以上の有効ビットが無効になっている。
c. Cache miss (Condition: MIS MULTIMIS): The requested data does not exist in the cache storage, and the valid bit of two or more words in the block is invalid.

SBR10の状態から次のサイクルの動作が決定する。 The operation of the next cycle is determined from the state of SBR10.

a.HITの場合:アドレスレジスタ(ABR)9の一部出力73
によりデータアレイ(DA)13がアドレッシングされ、そ
の出力がデータセレクタ(SDX)14で信号線75により選
択され、データレジスタ(DCR)15に格納され、次のサ
イクルで要求元へ返される。
a.HIT: Partial output of address register (ABR) 9 73
Thus, the data array (DA) 13 is addressed, its output is selected by the signal line 75 by the data selector (SDX) 14, stored in the data register (DCR) 15, and returned to the request source in the next cycle.

b.MIS ・MULITIMISの場合:主記憶へのデータの読出し
要求が発行される。リクエストアドレスはABR9の出力に
よって指示される。同時にSBR10の出力80がステータス
デコーダ(SDEC)16により解読され、ブロック読出しで
あることが信号線81を通して指示される。ABR9とSBR10
の内容が信号線71,74によりSAX1,SSX2を経由して、それ
ぞれAAR3とSAR4に格納される。AA5はリードリクエスト
の場合と同様にAAR3によりアドレッシングされるが、こ
の場合にはAA5のAA部には信号線57によるAAR3の上位が
書込まれる。V0からV3には0(無効)がセットされる。
b. MIS MU MULITIMIS: A request to read data from the main memory is issued. The request address is specified by the output of ABR9. At the same time, the output 80 of the SBR 10 is decoded by the status decoder (SDEC) 16, and it is instructed through a signal line 81 that the read operation is a block read. ABR9 and SBR10
Are stored in AAR3 and SAR4 via signal lines 71 and 74 via SAX1 and SSX2, respectively. AA5 is addressed by AAR3 as in the case of the read request, but in this case, the upper part of AAR3 by signal line 57 is written to the AA section of AA5. 0 (invalid) is set in V0 to V3.

c.MIS ・▲▼の場合:主記憶へのデー
タの読出し要求が発行される。リクエストアドレスはAB
R9の出力により指示される。同時にSBR10の出力80がSDE
C16により解読され、1ワード読出しであることが信号
線82を通して指示される。
c. MIS ・ In the case of ▲ ▼: A request to read data from the main memory is issued. Request address is AB
Instructed by the output of R9. At the same time, SBR10 output 80 is SDE
It is decoded by C16, and it is instructed through the signal line 82 that one word is read.

次に、主記憶からデータの読出し動作について述べ
る。データは信号線77によってデータレジスタ(DAR)1
1に格納される。同時に対応するアドレスが信号線52とS
AX1とを経由してAAR3に格納される。またデータ読出し
である旨がSAR4に格納される。ここでSAR4の内容により
2つの状態がある。
Next, an operation of reading data from the main memory will be described. Data is sent to the data register (DAR) 1 via signal line 77.
Stored in 1. At the same time, the corresponding address is signal line 52 and S
Stored in AAR3 via AX1. Also, the fact that the data is read is stored in SAR4. Here, there are two states depending on the contents of SAR4.

a.ブロック読出しの場合:AA5はAAR3の出力59によりアド
レッシングされる。AAR3の別の出力60とデコーダ6によ
り読出されるブロック内のワード位置とによりV0からV3
が選択され、“1"(有効)が書込まれる。次のサイクル
では、DAR11の内容、即ち読出しデータがデータレジス
タ(DBR)12に移動される。またAAR3,SAR4もABR9とSBR1
0に移動する。DA13はABR9によりアドレッシングされ、S
BR10の指示によってDBR12のデータが書込まれる。デー
タの読出しは上記動作がこの例では4回行なわれる。主
記憶からデータが到来する順番はキャッシュミスを起こ
したアドレスから始まり、ブロック内のアドレスを巡回
する様に送られてくるものとする。最初のロード動作
は、DA13にDBR12の内容を書込む際、DCR15の入力はSDX1
4によってDBR12の出力79が信号線76により選択され、次
のサイクルで読出しデータが上位装置に返送される。
a. For block read: AA5 is addressed by output 59 of AAR3. Depending on the other output 60 of AAR3 and the word position in the block read by decoder 6, V0 to V3
Is selected, and “1” (valid) is written. In the next cycle, the contents of DAR 11, that is, the read data, are moved to data register (DBR) 12. AAR3 and SAR4 are also ABR9 and SBR1
Move to 0. DA13 is addressed by ABR9 and S13
Data of DBR12 is written according to the instruction of BR10. The data reading is performed four times in this example. The order in which data arrives from the main memory starts from the address where a cache miss has occurred, and is sent so as to circulate through the addresses in the block. In the first load operation, when writing the contents of DBR12 to DA13, the input of DCR15 is SDX1
4, the output 79 of the DBR 12 is selected by the signal line 76, and the read data is returned to the host device in the next cycle.

b.1ワード読出しの場合:次のサイクルに入りDAR11の内
容(読出しデータ)がDBR12に移動される。同時にAAR3,
SAR4もABR9とSBR10に移動し、次のサイクルでDCR15にSD
X14において信号線76により選択されたデータがDCR15に
格納される。その後、読出しデータが上位装置へ返され
る。
b. In the case of one-word reading: the next cycle is entered, and the contents (read data) of DAR11 are moved to DBR12. At the same time AAR3,
SAR4 also moves to ABR9 and SBR10 and SDR15 to SDR in the next cycle.
In X14, the data selected by the signal line 76 is stored in the DCR15. Thereafter, the read data is returned to the host device.

第2図に第1図のブロックのゲート群8の具体例を示
しており、キャッシュヒット、ミスの判定用比較器7の
出力70と、リードライトデコーダ6の出力61〜64と、更
には有効ビットV0〜V3の各ビット出力66〜69とを用い
て、AA5のアクセス結果であるHIT,MIS ・▲
▼及びMISを判定するためのゲート回路である。
FIG. 2 shows a specific example of the gate group 8 of the block shown in FIG. 1. The output 70 of the comparator 7 for judging a cache hit or a miss, the outputs 61 to 64 of the read / write decoder 6, and the validity are furthermore shown. Using the bit outputs 66 to 69 of bits V0 to V3, HIT, MIS
And a gate circuit for determining MIS.

この様に、キャッシュミス時に、無効を示す有効ヒッ
トが1つのときには、有効ビットに対応するワードをキ
ャッシュメモリから読出し、無効ワードのみ主記憶装置
から読出すようにしているために、有効ワードについて
はキャッシュメモリへ再登録する必要がないので、主記
憶装置へのアクセス時間が短くなり、その分(3ワード
分)キャッシュメモリは他の処理を行うことが可能とな
るのである。
As described above, when there is one valid hit indicating invalidity at the time of a cache miss, the word corresponding to the valid bit is read from the cache memory, and only the invalid word is read from the main storage device. Since it is not necessary to re-register in the cache memory, the access time to the main storage device is shortened, and the cache memory can perform other processing accordingly (for three words).

第3図は本発明の他の実施例のブロック図であり、第
1図と同等部分は同一符号により示している。本実施例
においても、1セットのセットアソシアティブキャッシ
ュについて説明し、また各ワードごとに有効ビットが存
在しているものとする。
FIG. 3 is a block diagram of another embodiment of the present invention, and the same parts as those in FIG. 1 are denoted by the same reference numerals. Also in this embodiment, one set of associative cache will be described, and it is assumed that a valid bit exists for each word.

先ず、図示せぬ上位装置からのリードリクエストに関
する動作について説明する。リードリクエストとそのア
ドレスは信号線51,53を通してアドレスセレクタ(SAX)
1,ステータスセレクタ(SSX)2により選択され、アド
レスレジスタ(AAR)3とステータスレジスタ(SAR)4
に格納される。SAR4によってリードリクエストであるこ
とが解読されると、アドレスアレイ(AA)5とAAR3の出
力の一部59によりアドレッシングされ、AA5の出力とAAR
3の出力の別の一部が比較器7により比較される。AAR1
の下位2ビットは信号線60を通じて、リードライトデコ
ーダ(RWDEC)6により各出力がブロック内のワード位
置を表わす様にデコードされる。この場合は2ビットが
4本となる。AA5のV0からV3の各部はブロック内の各語
の有効を表示しており、ゲート群8によりAAR1に保持さ
れているアドレスのブロック内のワードに対するV0から
V3において有効性が吟味される。
First, an operation related to a read request from a higher-level device (not shown) will be described. Address selector (SAX) for read request and its address through signal lines 51 and 53
1, selected by status selector (SSX) 2, address register (AAR) 3 and status register (SAR) 4
Is stored in When the read request is decoded by SAR4, it is addressed by the address array (AA) 5 and a part 59 of the output of AAR3, and the output of AA5 and AAR
Another part of the output of 3 is compared by the comparator 7. AAR1
The lower two bits are decoded by a read / write decoder (RWDEC) 6 through a signal line 60 so that each output indicates a word position in the block. In this case, there are four 2 bits. Each part of V0 to V3 of AA5 indicates the validity of each word in the block, and the gate group 8 sets V0 to V3 for the word in the block at the address held in AAR1.
Effectiveness will be examined in V3.

AAR3によりAA5のアクセスの結果は以下の3つに分類
することができステータスレジスタ(SBR)10に格納さ
れる。
The access result of AA5 can be classified into the following three by AAR3 and stored in the status register (SBR) 10.

a.キャッシュヒット(条件:HIT ・VALID);キャッシュ
記憶内に要求されたデータが存在し、かつブロック内の
有効ビットが1つも無効になっていない。
a. Cache hit (condition: HIT VALID): The requested data exists in the cache storage, and no valid bit in the block has been invalidated.

b.キャッシュヒット(条件:HIT ・▲▼);
キャッシュ記憶内に要求されたデータが存在し、かつブ
ロック内の有効ビットのうち無効になっているビットが
1つ以上ある。
b. Cache hit (Condition: HIT ・ ▲ ▼);
The requested data exists in the cache storage, and one or more of the valid bits in the block are invalid.

c.キャッシュミス(条件:MIS);キャッシュ記憶内に要
求されたデータが存在しない。
c. Cache miss (condition: MIS); the requested data does not exist in the cache storage.

SBR10の状態から次のサイクルの動作が決定する。 The operation of the next cycle is determined from the state of SBR10.

a.HIT ・VALIDの場合:アドレスレジスタ(ABR)9の出
力73によりデータアレイ(DA)13がアドレッシングさ
れ、その出力がデータセレクタ(SDX)14で信号線75に
より選択され、データレジスタ(DCR)15に格納され、
次のサイクルに要求元へ返される。
a.HIT VALID: The data array (DA) 13 is addressed by the output 73 of the address register (ABR) 9, its output is selected by the signal line 75 by the data selector (SDX) 14, and the data register (DCR) Stored in 15,
Returned to requestor in next cycle.

b.HIT ・▲▼の場合:HIT ・VALIDの場合と同
様にデータが要求元へ返される。同時に主記憶へのデー
タの読出し要求が発行される。リクエストアドレスはAB
R9の出力72によって指示される。ABR9とSBR10の内容が
信号線71,74によりSAX,SSXを経由して、それぞれAAR3と
SAR4に格納される。AA5はリードリクエストの場合と同
様にAAR3によりアドレッシングされるが、この場合には
AA5のAA部には信号線57によるAAR3の上位が書込まれ
る。V0からV3には0がセットされる。
b. HIT • In the case of ▲ ▼: HIT • Data is returned to the request source in the same way as in the case of VALID. At the same time, a request for reading data from the main memory is issued. Request address is AB
Indicated by the output 72 of R9. The contents of ABR9 and SBR10 are connected to AAR3 via signal lines 71 and 74 via SAX and SSX, respectively.
Stored in SAR4. AA5 is addressed by AAR3 as in the case of a read request, but in this case
The upper part of AAR3 by the signal line 57 is written in the AA part of AA5. 0 is set in V0 to V3.

c.MISの場合:主記憶へデータの読出し要求が発行さ
れ、以下の動作はHIT・▲▼の場合と同様に
して行なわれる。
c. In the case of MIS: a data read request is issued to the main memory, and the following operations are performed in the same manner as in the case of HIT.

次に、主記憶からのデータ読出し動作について述べ
る。データは信号線77によってデータレジスタ(DAR)1
1に格納され、対応するアドレスが信号線102とSAX1を経
由してAAR3に格納される。またデータの読出しである旨
がSARに格納される。AA5はAAR3の出力59によりアドレッ
シングされる。AAR3の別の出力60とデコーダ(RWDEC)
6により読出されるブロック内のワード位置によりV0か
らV3が選択され“1"が書込まれる。
Next, an operation of reading data from the main memory will be described. Data is sent to the data register (DAR) 1 via signal line 77.
1 and the corresponding address is stored in AAR3 via signal line 102 and SAX1. The fact that the data is read is stored in the SAR. AA5 is addressed by output 59 of AAR3. AAR3 another output 60 and decoder (RWDEC)
6, V0 to V3 are selected according to the word position in the block read out, and "1" is written.

次のサイクルでは、DAR11の内容、即ち読出しデータ
がデータレジスタ(DBR)12に移動する。DA13はABR9に
よりアドレッシングされ、SBR10の指示によりDBR12のデ
ータが書込まれる。データの読出しは上記動作がこの例
では4回行なわれる。
In the next cycle, the contents of the DAR 11, that is, the read data move to the data register (DBR) 12. DA13 is addressed by ABR9, and data of DBR12 is written according to the instruction of SBR10. The data reading is performed four times in this example.

主記憶からデータが到来する順番はキャッシュヒット
(HIT ・▲▼)またはキャッシュミス(MI
S)をしたアドレスから始まり、ブロック内のアドレス
を順回する様に送られてくる。以下の動作はキャッシュ
ヒット(HIT ・▲▼)およびキャッシュミス
(MIS)と同様にして行なわれる。ただし、キャッシュ
ミスの場合は最初のロードの動作はDA13にDBR12の内容
を書込む際、DCR15の入力はSDX14によってDBR12の出力7
9が信号線76により選択され、次のサイクルで読出しデ
ータが上位装置に返される。
The order in which data arrives from main memory is either a cache hit (HIT, ▲ ▼) or a cache miss (MI
It starts from the address where S) was performed, and is sent so that the addresses in the block are turned forward. The following operations are performed in the same manner as the cache hit (HIT • ▲) and the cache miss (MIS). However, in the case of a cache miss, the first load operation is to write the contents of DBR12 to DA13, and the input of DCR15 is output from DBR12 by SDX14.
9 is selected by the signal line 76, and the read data is returned to the host device in the next cycle.

第4図は第1図のブロックにおけるゲート群8の具体
例を示しており、先の実施例と同様にキャッシュヒッ
ト、ミス判定用比較器7の出力70と、リードライトデコ
ーダ6の出力61〜64と、更には有効ビットV0〜V3の各ビ
ット出力66〜69とを用いて、AA5のアクセス結果であるH
IT,MIS及びVALIDを判定するためゲート回路である。こ
の様に、キャッシュヒット時に少くとも1の有効ビット
が無効を示すとき、キャッシュミスと同じ様に主記憶装
置からデータ読出しを行い、キャッシュメモリに対して
主記憶装置のデータを反映させるようにしているので、
キャッシュヒット率の向上が期待できることになる。
FIG. 4 shows a specific example of the gate group 8 in the block shown in FIG. 1. As in the previous embodiment, the output 70 of the comparator 7 for judging a cache hit / miss and the outputs 61 to 61 of the read / write decoder 6 are shown. H, which is the access result of AA5, using 64, and furthermore, the respective bit outputs 66 to 69 of the valid bits V0 to V3.
It is a gate circuit for determining IT, MIS and VALID. As described above, when at least one valid bit indicates invalid at the time of a cache hit, data is read from the main memory in the same manner as a cache miss, and the data in the main memory is reflected in the cache memory. Because
An improvement in the cache hit rate can be expected.

発明の効果 叙上の如く、本発明によれば、キャッシュミス時に1
つの有効ビットが無効を示すとき、無効ワードは主記憶
から読出してキャッシュメモリへ反映させ、有効ワード
はキャッシュメモリから読出すので、データのキャッシ
ュメモリへの反映時の動作時間が短縮でき、よってメモ
リアクセスの高速化が図れるという効果がある。
Effect of the Invention As described above, according to the present invention, when a cache miss occurs, 1
When two valid bits indicate invalid, the invalid word is read from the main memory and reflected in the cache memory, and the valid word is read from the cache memory. Therefore, the operation time when data is reflected in the cache memory can be reduced, and the memory This has the effect of speeding up access.

また、キャッシュヒット時に少くとも1つの有効ビッ
トが無効を示すとき、キャッシュミスと同様に主記憶装
置より対応ブロックデータを読出してキャッシュメモリ
へ無効ワードを反映させるようにしているので、キャッ
シュヒット率が向上し、よってメモリアクセスの高速化
が図れるという効果がある。
Also, when at least one valid bit indicates invalid at the time of a cache hit, the corresponding block data is read from the main storage device and the invalid word is reflected in the cache memory in the same manner as in the case of a cache miss, so that the cache hit rate is reduced. Thus, there is an effect that the speed of memory access can be increased.

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

第1図は本発明の実施例のブロック図、第2図は第1図
のブロックのゲート群の具体例回路図、第3図は本発明
の他の実施例のブロック図、第4図は第3図のブロック
のゲート群の具体例回路図である。 主要部分の符号の説明 5……アドレスアレイ 7……比較器 8……ゲート群 13……データアレイ
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a circuit diagram of a specific example of a gate group of the block of FIG. 1, FIG. 3 is a block diagram of another embodiment of the present invention, and FIG. FIG. 4 is a specific example circuit diagram of a gate group of the block of FIG. 3; Explanation of Signs of Main Parts 5 ... Address Array 7 ... Comparator 8 ... Gate Group 13 ... Data Array

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平山 修也 東京都港区西新橋3丁目20番4号 日本 電気エンジニアリング株式会社内 (56)参考文献 特開 昭62−133545(JP,A) 特開 昭60−83156(JP,A) 特開 平1−321534(JP,A) ────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Shuya Hirayama 3-20-4 Nishi-Shimbashi, Minato-ku, Tokyo Japan Electric Engineering Co., Ltd. (56) References JP-A-62-133545 (JP, A) 60-83156 (JP, A) JP-A-1-321534 (JP, A)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】主記憶装置内のデータのコピーを複数ワー
ドからなるブロック単位で保持し、これ等ブロック内の
データの有効性を管理するための有効ビットをワード単
位で有するキャッシュメモリの制御方式であって、前記
キャッシュメモリへの読出し要求に応答してキャッシュ
ヒットかキャッシュミスかを判定する手段と、キャッシ
ュミスと判定されたとき、読出し対象のブロックにおけ
るワード単位の有効ビットの無効化状態を検出する手段
を設け、この検出結果が1つのワードのみの無効を示し
ているとき、この無効となっているワードを前記主記憶
装置から読出すと共に他のワードは前記キャッシュメモ
リから読出し、前記検出結果が複数のワードの無効を示
しているとき、前記主記憶装置から読出し要求のブロッ
クを読出すようにしたことを特徴とするキャッシュメモ
リ制御方式。
1. A control method for a cache memory in which a copy of data in a main storage device is held in units of blocks each consisting of a plurality of words, and a valid bit for managing the validity of data in these blocks is provided in units of words. Means for determining a cache hit or a cache miss in response to a read request to the cache memory, and, when the cache miss is determined, the invalidation state of the valid bit in word units in the block to be read. Means for detecting, when the detection result indicates that only one word is invalid, the invalidated word is read from the main storage device and the other word is read from the cache memory; Reading a block of a read request from the main storage when the result indicates that a plurality of words are invalid. Cache memory control method, characterized in that the.
【請求項2】主記憶装置内のデータのコピーを複数ワー
ドからなるブロック単位で保持し、これ等ブロック内の
データの有効性を管理するための有効ビットをワード単
位で有するキャッシュメモリの制御方式であって、前記
キャッシュメモリへの読出し要求に応答してキャッシュ
ヒットかキャッシュミスかを判定する手段と、キャッシ
ュヒットと判定されたとき、読出し対象のブロックにお
けるワード単位の有効ビットの無効化状態を検出する手
段を設け、この検出結果が少なくとも1つのワードの無
効を示しているとき、読出し要求元に対してキャッシュ
メモリから対応するブロックを読出して送出すると共に
前記主記憶装置に対して対応するブロックの読出しをな
すようにしたことを特徴とするキャッシュメモリ制御方
式。
2. A control method for a cache memory which holds a copy of data in a main storage unit in units of blocks each consisting of a plurality of words and has valid bits for managing the validity of data in these blocks in units of words. Means for determining a cache hit or a cache miss in response to a read request to the cache memory; and, if determined to be a cache hit, invalidating the valid bit in word units in the block to be read. Means for detecting, when the result of the detection indicates that at least one word is invalid, the corresponding block is read out from the cache memory to the read request source and transmitted, and the corresponding block is transmitted to the main storage device. A cache memory control method, characterized in that the data is read from the cache memory.
JP63264427A 1988-10-20 1988-10-20 Cache memory control method Expired - Lifetime JP2716163B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63264427A JP2716163B2 (en) 1988-10-20 1988-10-20 Cache memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63264427A JP2716163B2 (en) 1988-10-20 1988-10-20 Cache memory control method

Publications (2)

Publication Number Publication Date
JPH02110752A JPH02110752A (en) 1990-04-23
JP2716163B2 true JP2716163B2 (en) 1998-02-18

Family

ID=17403030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63264427A Expired - Lifetime JP2716163B2 (en) 1988-10-20 1988-10-20 Cache memory control method

Country Status (1)

Country Link
JP (1) JP2716163B2 (en)

Also Published As

Publication number Publication date
JPH02110752A (en) 1990-04-23

Similar Documents

Publication Publication Date Title
EP0596636B1 (en) Cache tag memory
US5249284A (en) Method and system for maintaining data coherency between main and cache memories
US6651115B2 (en) DMA controller and coherency-tracking unit for efficient data transfers between coherent and non-coherent memory spaces
US4493026A (en) Set associative sector cache
EP0090575B1 (en) Memory system
US6564306B2 (en) Apparatus and method for performing speculative cache directory tag updates
KR100190351B1 (en) Apparatus and method for reducing interference in two-level cache memory
US5388247A (en) History buffer control to reduce unnecessary allocations in a memory stream buffer
US5067078A (en) Cache which provides status information
US5226150A (en) Apparatus for suppressing an error report from an address for which an error has already been reported
US4357656A (en) Method and apparatus for disabling and diagnosing cache memory storage locations
US5778433A (en) Computer system including a first level write-back cache and a second level cache
EP0343567A2 (en) Multi-processing system and cache apparatus for use in the same
JPS629942B2 (en)
US5809562A (en) Cache array select logic allowing cache array size to differ from physical page size
US5269009A (en) Processor system with improved memory transfer means
US5809537A (en) Method and system for simultaneous processing of snoop and cache operations
EP0470739B1 (en) Method for managing a cache memory system
US5161219A (en) Computer system with input/output cache
US5557622A (en) Method and apparatus for parity generation
EP0535701A1 (en) Architecture and method for combining static cache memory and dynamic main memory on the same chip (CDRAM)
JP2716163B2 (en) Cache memory control method
US5696938A (en) Computer system permitting mulitple write buffer read-arounds and method therefor
US5960456A (en) Method and apparatus for providing a readable and writable cache tag memory
JP3340047B2 (en) Multiprocessor system and duplicate tag control method