[go: up one dir, main page]

JPH02195456A - Cache storage system - Google Patents

Cache storage system

Info

Publication number
JPH02195456A
JPH02195456A JP1014578A JP1457889A JPH02195456A JP H02195456 A JPH02195456 A JP H02195456A JP 1014578 A JP1014578 A JP 1014578A JP 1457889 A JP1457889 A JP 1457889A JP H02195456 A JPH02195456 A JP H02195456A
Authority
JP
Japan
Prior art keywords
cache
data
memory
main memory
word
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1014578A
Other languages
Japanese (ja)
Inventor
Takumi Yamazaki
山崎 琢己
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 Ibaraki Ltd
Original Assignee
NEC Ibaraki Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Ibaraki Ltd filed Critical NEC Ibaraki Ltd
Priority to JP1014578A priority Critical patent/JPH02195456A/en
Publication of JPH02195456A publication Critical patent/JPH02195456A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve a cache hit ratio by allowing effective bits stored in a cache memory to correspond to the number of data words constituting one block. CONSTITUTION:Each word constituting one block of data stored in the cache memory 70 registers an effective bit in a cache directory writing circuit 40 in each word by the action of a control circuit 90. Cache coincidence at the time of writing data in a main memory is checked by a coincidence detecting circuit 80 in each word. At the time of generating a cache miss hit, only the ineffective word in the blocks stored in the cache memory 70 is read out again from the main memory and written in the cache memory 70, a cache directory 60 is updated and required data are sent to a CPU.

Description

【発明の詳細な説明】 (産業上の利用分野〕 本発明は、キャッシュ記憶方式に係り、とくに、キャッ
シュメモリとキャッシュディレクトリとを備えた記憶方
式に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a cache storage system, and particularly to a storage system including a cache memory and a cache directory.

〔従来の技術〕[Conventional technology]

第2図に従来例を示す。 FIG. 2 shows a conventional example.

この第2図の従来例は、主記憶データの一部をブロック
単位で格納するキャッシュメモリ70と、キャッシュメ
モリ70に格納された主記憶データブロックのアドレス
情報と有効性ビットとを記憶しているキャッシュディレ
クトリ60と、主記憶データ書き込み時に主記憶アドレ
スとキャッシュディレクトリ60の記憶アドレス情報と
が一致しているかどうかをチェックする一致検出回路8
0と、キャッシュメモリ70とキャッシュディレクトリ
60への書き込みや主記憶からのデータ読み出しを制御
する制御回路90とを備えている。
The conventional example shown in FIG. 2 includes a cache memory 70 that stores part of main memory data in blocks, and stores address information and validity bits of the main memory data blocks stored in the cache memory 70. A coincidence detection circuit 8 that checks whether the cache directory 60 and the main memory address match the storage address information of the cache directory 60 when writing data to the main memory.
0, and a control circuit 90 that controls writing to the cache memory 70 and cache directory 60 and reading data from the main memory.

キャッシュメモリ70には、数バイトのデータを1ワー
ドとし、連続した数ワードを1ブロックと定義し、ブロ
ック単位で主記憶データの一部および有効性ビットが格
納されている。
In the cache memory 70, several bytes of data are defined as one word, several consecutive words are defined as one block, and part of main memory data and validity bits are stored in block units.

CPUから主記憶データの読み出しコマンドが送出され
ると、主記憶データ読み出しアドレスの一部がキャッシ
ュメモリ70とキャッシュディレクトリ60へ出力され
る。
When a main memory data read command is sent from the CPU, a part of the main memory data read address is output to the cache memory 70 and the cache directory 60.

そして、−数構出回路80にてキャッシュメモリ70に
有効なデータが格納されている(ヒツト)か否(ミスヒ
ツト)かがブロック単位でチェックされ、制御回路90
にて、ヒツトの場合にはキャッシュメモリ70から8売
み出したデータがCPUに送出される。ミスヒツトの場
合には、CPUが要求したデータを含むブロックを主記
憶から読み出し、必要なデータをCPUに送出するとと
もにキャッシュメモリ70に書き込み、そしてキャッシ
ュディレクトリ60の内容を更新する。
Then, the negative number output circuit 80 checks whether valid data is stored in the cache memory 70 (hit) or not (miss) in block units, and the control circuit 90
In the case of a hit, the data sold out from the cache memory 70 is sent to the CPU. In the case of a miss, the block containing the data requested by the CPU is read from the main memory, the necessary data is sent to the CPU and written to the cache memory 70, and the contents of the cache directory 60 are updated.

主記憶へのデータ書き込みの場合には、書き込みアドレ
スに対応するブロックがキャッシュメモIJ70に存在
するかどうかが一致検出回路80でチェック(キャッシ
ュ一致チェック)され、存在する場合には、制御回路9
0にて、このブロックを無効にするためにキャッシュデ
ィレクトリ60の有効性ビットを無効状態にセットする
In the case of data writing to the main memory, the coincidence detection circuit 80 checks whether a block corresponding to the write address exists in the cache memory IJ 70 (cache coincidence check), and if it exists, the control circuit 9
0, sets the validity bit of cache directory 60 to an invalid state to invalidate this block.

〔発明が解決しようとした課題〕[Problem that the invention sought to solve]

しかしながら、上記従来例においては、キャッシュメモ
リに格納されたブロック単位のデータに対し、有効性ビ
ットをブロック単位でキャッシュディレクトリに登録し
ているために、ブロック単位でキャッシェ一致チェック
が行われ、主記憶データ書き込みが1ワードの場合でも
主記憶データ書き込みアドレスがキャッシュメモリに存
在すると、そのブロック全てが無効となり、主記憶デー
タ読み出し時のキャツシュヒツト率が低下し、データ処
理速度が遅くなるという不都合があった。
However, in the above conventional example, validity bits are registered in the cache directory for each block of data stored in the cache memory, so a cache match check is performed for each block, and the main memory Even if the data write is one word, if the main memory data write address exists in the cache memory, the entire block becomes invalid, which causes the inconvenience that the cache hit rate when reading main memory data decreases and the data processing speed slows down. .

〔発明の目的〕[Purpose of the invention]

本発明の目的は、かかる従来例の有する不都合を改善し
、とくに、キャツシュヒツト率の向上を図ったキャッシ
ュ記憶方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a cache storage system that improves the disadvantages of the conventional example and, in particular, improves the cache hit rate.

(課題を解決するための手段) そこで、本発明では、主記憶データをブロック化しその
数ブロックを格納するキャッシュメモリと、キャッシュ
メモリに格納された各主記憶データブロックのアドレス
情報と有効性ビットとを記憶しているキャッシュディレ
クトリと、主記憶データ書き込み時に主記憶アドレスと
前記キャッシュディレクトリの記憶アドレス情報とが一
致しているかどうかをチェックする一致検出回路と、キ
ャッシュメモリとキャッシュディレクトリへの書き込み
や主記憶からのデータ読み出しを制御する制御回路とを
有している。そして、キャッシュメモリに格納された有
効性ビットを1ブロックを構成するデータ語数(ワード
数)に対応せしめる、等の構成を採っている。これによ
って前述した目的を達成しようとしたものである。
(Means for Solving the Problems) Therefore, in the present invention, main memory data is divided into blocks and a cache memory for storing several blocks thereof, and address information and validity bits of each main memory data block stored in the cache memory are provided. a cache directory that stores the cache directory, a match detection circuit that checks whether the main memory address matches the storage address information of the cache directory when writing main memory data, and a match detection circuit that checks whether the main memory address matches the storage address information of the cache directory when writing data to the cache memory and and a control circuit that controls data reading from the memory. A configuration is adopted in which the validity bits stored in the cache memory are made to correspond to the number of data words constituting one block. This is an attempt to achieve the above-mentioned purpose.

〔作  用〕[For production]

制御回路の作用により、キャッシュメモリ内に格納され
ているデータの1ブロックを構成する各ワードがワード
毎に有効性ビットをキャッシュディレクトリに登録され
、主記憶データ書き込み時のキャッシュ一致チェックを
ワード単位で行われる。さらにキャッシュミスヒツト時
は、キャッシュメモリに格納されたブロック中の有効で
ないワードのみが再読み出される。
By the action of the control circuit, the validity bit of each word constituting one block of data stored in the cache memory is registered in the cache directory, and the cache consistency check is performed on a word-by-word basis when main memory data is written. It will be done. Furthermore, in the event of a cache miss, only invalid words in the block stored in the cache memory are reread.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を第1図に基づいて説明する。 An embodiment of the present invention will be described below with reference to FIG.

第1図の実施例では、主記憶データをブロック化しその
数ブロックを格納するキャッシュメモリ70と、キャッ
シュメモリ70に格納された各主記憶データブロックの
アドレス情報と有効性ビットとを記憶しているキャッシ
ュディレクトリ60と、主記憶データ書き込み時に主記
憶アドレスとキャッシュディレクトリ60の記憶アドレ
ス情報とが一致しているかどうかをチェックする一致検
出回路80と、キャッシュメモリ70とキャッシュディ
レクトリ60への書き込みや主記憶からのデータ読み出
しを制御する制御回路90とを有している。
In the embodiment shown in FIG. 1, there is a cache memory 70 that blocks main memory data and stores several blocks thereof, and stores address information and validity bits of each main memory data block stored in the cache memory 70. A cache directory 60 , a coincidence detection circuit 80 that checks whether the main memory address and the storage address information of the cache directory 60 match when writing data to the main memory, and a match detection circuit 80 that checks whether the main memory address matches the storage address information of the cache directory 60 and the cache memory 70 and the main memory when writing data to the cache directory 60 . It has a control circuit 90 that controls data reading from the memory.

キャッシュディレクトリ60に記憶されている各ブロッ
クの有効性ビット数は、1ブロックのワード数(本実施
例では4ワードとした)に対応(VO〜■3)している
The number of validity bits of each block stored in the cache directory 60 corresponds to the number of words in one block (4 words in this embodiment) (VO~3).

さらに、CPUから出力されるアドレス(ADDC)を
セットする読み出しアドレスレジスタ20と、他の処理
装置が主記憶データ書き込みを行う時のアドレス(AD
DM)をセットする書き込みアドレスレジスタ10と、
読み出しアドレスレジスタ20か書き込みアドレスレジ
スタlOかのどちらかを選択するアドレス選択回路30
とを有している。
Furthermore, there is a read address register 20 that sets the address (ADDC) output from the CPU, and an address (ADDC) used when other processing devices write main memory data.
a write address register 10 for setting DM);
Address selection circuit 30 that selects either read address register 20 or write address register IO
It has

しかも、アドレス選択回路30の出力信号と制御回路9
0の出力信号とによりキャッシュディレクトリ60に書
き込みを行うキャッシュディレクトリ書き込み回路40
と、制御回路90の出力信号と主記憶からの出力信号と
からキャッシュメモリ70に書き込むためのキャッシュ
メモリ書き込み回路50とを有している。
Moreover, the output signal of the address selection circuit 30 and the control circuit 9
cache directory write circuit 40 that writes to the cache directory 60 with an output signal of 0;
and a cache memory write circuit 50 for writing into the cache memory 70 from the output signal of the control circuit 90 and the output signal from the main memory.

一致検出回路80では、アドレス選択回路30の出力信
号とキャッシュディレクトリ60の出力信号とにより主
記憶データ書き込み時のキャッシュ一致チェックや主記
憶データ読み出し時のキャツシュヒツト/ミスヒツトチ
ェックが行われる。
The coincidence detection circuit 80 uses the output signal of the address selection circuit 30 and the output signal of the cache directory 60 to perform a cache coincidence check when writing main memory data and a cache hit/miss check when reading main memory data.

制御回路90では、CPUからの主記憶データ読み出し
コマンド(CMDC)及び他の処理装置からの主記憶デ
ータ書き込みコマンド(CMDM)とアドレス選択回路
30の出力信号と一致検出回路80の出力信号とにより
主記憶へコマンド(CMDC’ )が送出されたり各種
制御信号が出力される。
The control circuit 90 uses the main memory data read command (CMDC) from the CPU, the main memory data write command (CMDM) from another processing device, the output signal of the address selection circuit 30, and the output signal of the coincidence detection circuit 80 to A command (CMDC') is sent to the memory and various control signals are output.

次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

先ず、CPUからの主記憶データ読み出し時には、アド
レス選択回路30で読み出しアドレスレジスタ20が選
択され、読み出しアドレス20の中位ビット(ADM)
がキャッシュディレクトリ60とキャッシュメモリ70
に出力される。読み出しアドレス20の上位ビット(A
DH)は−数構出回路80に出力され、キャッシュデイ
レクト!J60から出力されるアドレス情報と一致して
いるかどうかがチェックされる。さらに、−数構出回路
80ではアドレス選択回路30から出力された読み出し
アドレス20の下位ビット(ADL)によって、選択さ
れたワードの有効性ビットが有効であるかどうかがチェ
ックされる。そして、その結果、制御回路90により、
キャツシュヒツトの場合はキャッシュメモリ70から読
み出したデータをCPUに送出する。キャッシュミスヒ
ツトの場合はブロック中の有効でないワードのみを主記
憶から再読み出しを行い、キャッシュメモリ70に書き
込み、キャッシュディレクトリ60を更新し、CPUに
所望のデータを送出する。
First, when reading main memory data from the CPU, the read address register 20 is selected by the address selection circuit 30, and the middle bit (ADM) of the read address 20 is selected.
is the cache directory 60 and cache memory 70
is output to. Upper bit of read address 20 (A
DH) is output to the -number output circuit 80, and the cache direct! It is checked whether the address information matches the address information output from J60. Furthermore, the minus number configuration circuit 80 checks whether the validity bit of the selected word is valid or not based on the lower bit (ADL) of the read address 20 output from the address selection circuit 30. As a result, the control circuit 90
In the case of a cash hit, data read from the cache memory 70 is sent to the CPU. In the case of a cache miss, only the invalid words in the block are reread from the main memory, written to the cache memory 70, the cache directory 60 is updated, and the desired data is sent to the CPU.

他の処理装置から主記憶にデータを書き込む場合は、ア
ドレス選択回路30で書き込みアドレスレジスタ10が
選択される。そして、書き込みアドレス10の中位ビッ
ト(ADM)がキャッシュディレクトリ60に出力され
る。キャッシュディレクトリ60から出力されたアドレ
ス情報と書き込みアドレス10の上位ビット(ADH)
とを−数構出回路80で比較し、その結果、制御回路9
0により、一致していれば書き込みアドレス10の下位
ピッ) (ADL)に対応する有効性ビット(VO〜V
3)を無効化する。この時、他の処理装置から主記憶に
書き込まれるワード数は書き込みコマンド(CMDM)
を解析することによって判断される0例えば4ワード連
続して書き込み(1ブロックの全ワード)を行う場合は
、有効性ビット(VO〜V3)は全て無効化される。
When writing data to the main memory from another processing device, the write address register 10 is selected by the address selection circuit 30. Then, the middle bit (ADM) of write address 10 is output to cache directory 60. Address information output from cache directory 60 and upper bits (ADH) of write address 10
is compared by the -number output circuit 80, and as a result, the control circuit 9
0, if they match, the validity bit (VO to V
3) Disable. At this time, the number of words written to the main memory from another processing device is determined by the write command (CMDM).
For example, when writing four words in succession (all words in one block), all validity bits (VO to V3) are invalidated.

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

以上のように、本発明によると、キャッシュメモリの1
ブロックを構成する各ワード毎に有効性ビットをキャッ
シュディレクトリに登録する、という構成を採っている
ため、主記憶にデータを書き込む時のキャッシュ一致チ
ェックをワード単位で行うことができ、さらに、キャッ
シュミスヒツト時はキャッシュメモリに格納されたブロ
ック中の有効でないワードのみを再読み出しすることが
できる。これがため、キャツシュヒツト率を上げること
ができ、処理速度が飛躍的に上昇するという従来にない
優れたキャッシュ記憶方式を提供することができる。
As described above, according to the present invention, one of the cache memory
Because the configuration is such that a validity bit is registered in the cache directory for each word that makes up a block, it is possible to check cache consistency on a word-by-word basis when writing data to main memory, and it also prevents cache errors. When hit, only invalid words in the block stored in the cache memory can be reread. Therefore, it is possible to provide an unprecedented and excellent cache storage system in which the cache hit rate can be increased and the processing speed can be dramatically increased.

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

第1図は本発明の一実施例を示すブロック図、第2図は
従来例を示すブロック図である。 60・・・・・・キャッシュディレクトリ、70・・・
・・・キャッシュメモリ、80・・・・・・−数構出回
路、90・・・・・・制御回路。 (主記構ン 第2図
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 is a block diagram showing a conventional example. 60... Cache directory, 70...
. . . Cache memory, 80 . . . -number output circuit, 90 . . . Control circuit. (Main structure Figure 2

Claims (2)

【特許請求の範囲】[Claims] (1)、主記憶データの一部をブロック単位で格納する
キャッシュメモリと、キャッシュメモリに格納された主
記憶データブロックのアドレス情報と有効性ビットとを
記憶しているキャッシュディレクトリと、主記憶データ
書き込み時に主記憶アドレスと前記キャッシュディレク
トリの記憶アドレス情報とが一致しているかどうかをチ
ェックする一致検出回路と、前記キャッシュメモリ及び
キャッシュディレクトリへの書き込み或いは主記憶から
のデータ読み出しを制御する制御回路とを有するキャッ
シュ記憶方式において、 前記キャッシュメモリに格納された有効性ビットが、1
ブロックを構成するデータ語数としてのワード数に対応
していることを特徴としたキャッシュ記憶方式。
(1) A cache memory that stores part of main memory data in blocks, a cache directory that stores address information and validity bits of main memory data blocks stored in the cache memory, and main memory data a coincidence detection circuit that checks whether a main memory address and storage address information of the cache directory match when writing; and a control circuit that controls writing to the cache memory and the cache directory or reading data from the main memory. In a cache storage system having a cache memory, a validity bit stored in the cache memory is 1.
A cache storage method characterized by being compatible with the number of data words forming a block.
(2)、主記憶データ読み出し時にキャッシュメモリに
有効なデータが存在するかどうかをワード単位でチェク
するとともに、存在しない場合には有効でないワードの
みを主記憶から読み出してキャッシュメモリ及びキャッ
シュディレクトリの内容を更新することを特徴とした特
許請求の範囲(1)項記載のキャッシュ記憶方式。
(2) When reading main memory data, check whether valid data exists in the cache memory word by word, and if it does not exist, read only invalid words from the main memory and read the contents of the cache memory and cache directory. The cache storage method according to claim (1), characterized in that the cache storage method updates the .
JP1014578A 1989-01-24 1989-01-24 Cache storage system Pending JPH02195456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1014578A JPH02195456A (en) 1989-01-24 1989-01-24 Cache storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1014578A JPH02195456A (en) 1989-01-24 1989-01-24 Cache storage system

Publications (1)

Publication Number Publication Date
JPH02195456A true JPH02195456A (en) 1990-08-02

Family

ID=11865045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1014578A Pending JPH02195456A (en) 1989-01-24 1989-01-24 Cache storage system

Country Status (1)

Country Link
JP (1) JPH02195456A (en)

Similar Documents

Publication Publication Date Title
US5276849A (en) Apparatus and method for maintaining cache/main memory consistency utilizing a dual port FIFO buffer
JPH06208508A (en) Cash tag memory
US6507897B2 (en) Memory paging control apparatus
US6363460B1 (en) Memory paging control method
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
JPH0548497B2 (en)
KR100251784B1 (en) Method and apparatus for providing a readable and writable cache tag memory
JPH02195456A (en) Cache storage system
JPH0795307B2 (en) Cache memory control circuit
JP3729832B2 (en) Cache memory device
JP2703255B2 (en) Cache memory writing device
JPH0373040A (en) Cache memory
JP3761890B2 (en) Cache memory device
JP3074897B2 (en) Memory circuit
JPS6232832B2 (en)
JPH09282231A (en) Write-back type cache device
JPH07152650A (en) Cache control unit
JP2952884B2 (en) Cache controller
JPS6135583B2 (en)
JPH01315851A (en) Cache memory control system
JPH0243692A (en) Microprocessor and its cache memory
JPH0449445A (en) Hierarchical cache system
JPH0448263B2 (en)
JPS62274349A (en) Data processing system
JPH06149677A (en) Cache memory system