JPH01222351A - Check system for cache memory - Google Patents

Check system for cache memory

Info

Publication number
JPH01222351A
JPH01222351A JP63048457A JP4845788A JPH01222351A JP H01222351 A JPH01222351 A JP H01222351A JP 63048457 A JP63048457 A JP 63048457A JP 4845788 A JP4845788 A JP 4845788A JP H01222351 A JPH01222351 A JP H01222351A
Authority
JP
Japan
Prior art keywords
cache memory
data
memory
check
main storage
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
JP63048457A
Other languages
Japanese (ja)
Inventor
Hiromichi Ito
浩道 伊藤
Yukihiro Seki
関 行宏
Hajime Yamagami
山上 一
Atsushi Masuko
淳 益子
Hitoshi Kobayashi
斉 小林
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.)
Hitachi Image Information Systems Inc
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Video Engineering Co 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 Hitachi Ltd, Hitachi Video Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP63048457A priority Critical patent/JPH01222351A/en
Publication of JPH01222351A publication Critical patent/JPH01222351A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve reliability without reducing an access speed by checking a cache memory by means of using the idle time of the action of the cache memory. CONSTITUTION:When the copy of data of a main storage device 4 which a CPU 1 accesses does not exist on the cache memory, data is accessed from the main storage device 4. At that time, data accessed from the main storage device 4 and the high order bits of the address of data are respectively written in a BS (Buffer Strage) 3 and AA (Address Array) 2 in the cache memory and the writing terminates at a short time since memory elements used for AA2 and BS3 are at high speed. Since the main storage device is in a low speed on the other hand, the cache memory comes to wait for the access termination of the main storage, and the cache memory is checked by using the wait time. Thus, the reliability of AA2 and BS3 consisting the cache memory can easily be improved without reducing the access speed of the cache memory.

Description

【発明の詳細な説明】[Detailed description of the invention]

r産業上の利用分野】 本発明は、情報処理装置における記憶装置に係り、特に
キャッシュメモリによる階層構造を備えた場合に好適な
メモリチェック方式に関する。
1. Field of the Invention The present invention relates to a storage device in an information processing device, and more particularly to a memory check method suitable for a hierarchical structure using cache memory.

【従来の技術】[Conventional technology]

中央処理装置(cpu)から低速な主記憶装置へのデー
タアクセスを見かけ上高速化する手段として、高速なキ
ャッシュメモリを用いるのが一般的である。この方式で
はCPUのデータアクセスは、まず、主記憶データの一
部がコピーされているキャッシュメモリに対して行なわ
れ、求めるデータがキャッシュメモリに存在しなかった
場合のみ主記憶に対してアクセスを行なう0通常のプロ
グラムにおいては、データアクセスに局所性があるため
、適当なデータをキャッシュメモリにコピーしておくこ
とにより、CPUからのデータアクセスのほとんどを高
速なキャッシュメモリへのアクセスだけで済ませること
ができる。 キャッシュメモリ方式の構成例を第2図に示す、キャッ
シュメモリは、主記憶4のデータのコピーが記憶されて
いるB S (Buffer Storage) 3と
、BS3にコピーした主記憶4のアドレスを示す情報が
記憶されているAA (Address Array)
2およびキャッシュメモリに求めるデータのコピーが存
在するかどうかを調べるコンパレータ5により構成され
る。BS3およびAA2はCPU1の出力するアドレス
バス8の値の下位ビットを用いてアドレッシングされ、
残りの上位ビットは、BS3へのデータコピーを行なう
際にAA2に書込み、キャッシュメモリへのアクセスの
際にはAA2から読出した値とコンパレータ5によりて
比較される。コンパレータ5からの出力が、一致してい
るという結果(以下ヒツトと呼ぶ)ならばBS3から読
出したデータをセレクタ7により選び、データバス9を
通してCPUIに送る。一方、−致していないという結
果の場合(以下、ミスヒツトと呼ぶ)には主記憶4から
読出したデータをセレクタフにより選びデータバス9を
通してCPU1に送る。ミスヒツト時にはバッファ6を
通してAA2およびBS3の内容が更新される。 ミスヒツト時の動作を第3図のタイムチャートに示す、
10はアドレスバス8の値、11はAA2からの読出、
12はAA2への書込、13はBS3からの読出、14
はBS3への書込、15は主記憶4からの読出である。 ここでAA2への書込12に用いるデータはアドレスバ
ス8の値10の上位ビットである。またBS3への書込
14に用いるデータは主記憶4からの読出15で得られ
たデータである。 従来、キャッシュメモリの信頼性向上の方法については
、特開昭60−117348号に記載のようにAA2お
よびBS3にはパリティビットを設け、パリティチエツ
クを行なうのが一般的である。なお、パリティビットは
データに含まれる“l”の数を反映したものであり、デ
ータとパリティビットに含まれる“l”の数が奇数ある
いは偶数になるようにパリティビットを生成、チエツク
することによりlビウトエラーを検出することができる
。 第4図にパリティチエツク機能を持つキャッシュメモリ
の構成を示す、AA2あるいはBS3からの読出の際に
は、パリティチエッカ16によりパリティチエツクを行
ない、エラーが検出された場合、前記パリティチエッカ
16より出力されるエラー信号によりミスヒツトとして
主記憶4からのデータなCPUIに送る。このパリティ
チエツク方式の採用により、AA2およびBS3に発生
した1ビツトエラーを救うことができる。 ■発明が解決しようとする課題】 ところで、記憶装置には、大容量化およびメモリ素子の
高集積度化に対応した高信頼化が必要とされ、主記憶装
置にはE CC(Error CorrectingC
ode)による2ビツトエラー検出、1ビツトエラー訂
正機能を設けるのが一般的である。しかしながら、EC
C方式では、検査情報の作r&およびエラーチエツク、
訂正に要する時間が長く、特に高速性が求められるキャ
ッシュメモリに採用することは困難である。このため、
一般に、上記従来技術のようにキャッシュメモリを構成
するAA2およびBS3にパリティチエツク方式を採用
する。パリティチエツク方式は、AA2あるいはBS3
に1ビツトエラーが発生した場合には主記憶4のデータ
を採用するため、CPUIは実行中のプログラムを停止
することなく処理を続行できるという点で優れている。 しかしながら、AA2あるいはBS3に2ビツトエラー
が発生した場合、検出が不可能であるため、ECC方式
に比べて信頼性が低いという問題があった。 本発明の目的は、キャッシュメモリを構成するAA2あ
るいはBS3の信頼性を、キャッシュメモリのアクセス
速度を低下することなく容易に向上させることにある。 1課題を解決するための手段】 本発明によるメモリチェック方式は、上記目的を達成す
るために、少なくとも主記憶とキャッシュメモリとによ
る階層構造を有する記憶装置を備える情報処理装置にお
いて、前記キャッシュメモリの動作の空き時間を利用し
て前記キャッシュメモリのメモリチェックを行なうよう
にしたものである。 上記空き時間としては、例えば、ミスヒツト時に主記憶
をアクセスする際に、主記憶とキャッシュメモリのアク
セス時間の差により生じるものが利用できる。 ]作用1  ′ 前記のように、CPUIのアクセスする主記憶4のデー
タのコピーがキャッシュメモリ上に存在しない場合、す
なわちミスヒツト時場合には、主記憶・4からデータを
アクセスする。この時、キャッシュメモリのB−S 3
およびAA2には主記憶からアクセスしたデータおよび
該データのアドレス上位ビットがそれぞれ書込まれる。 この書込はAA2およびBS3に使用するメモリ素子が
高速であるため、短時間で終了し得る。一方、主記憶は
低速であるので、キャッシュメモリは主記憶のアクセス
終了を待つことになる。この待ち時間を利用して、キャ
ッシュメモリのチエツクを行なうことができる。このチ
エツクの方法としては、例えば、今、書込んだ内容なA
A2またはBS3から読出して、これを書込データと照
合し、あるいは、AA2またはBS3に通出なデータを
書込み、続けて読出を行ない、この読出データを書込デ
ータと照合することにより行なえる。このチエツクによ
りAA2あるいはBS3に発生した故障を検出すること
ができる。
A high-speed cache memory is generally used as a means to apparently speed up data access from a central processing unit (CPU) to a slow main memory. In this method, data access by the CPU is first performed to the cache memory to which part of the main memory data has been copied, and the main memory is accessed only if the desired data does not exist in the cache memory. 0In a normal program, data access has locality, so by copying appropriate data to the cache memory, most data accesses from the CPU can be completed by accessing the high-speed cache memory only. can. An example of the configuration of the cache memory method is shown in FIG. 2. The cache memory includes a BS (Buffer Storage) 3 in which a copy of the data in the main memory 4 is stored, and information indicating the address of the main memory 4 copied to the BS 3. AA (Address Array) where is stored
2 and a comparator 5 that checks whether a copy of the desired data exists in the cache memory. BS3 and AA2 are addressed using the lower bits of the value of address bus 8 output by CPU1,
The remaining upper bits are written to AA2 when copying data to BS3, and are compared by comparator 5 with the value read from AA2 when accessing the cache memory. If the outputs from the comparator 5 match (hereinafter referred to as hits), the selector 7 selects the data read from the BS 3 and sends it to the CPUI via the data bus 9. On the other hand, if the result is that they do not match (hereinafter referred to as a miss), the selector selects the data read from the main memory 4 and sends it to the CPU 1 via the data bus 9. When a miss occurs, the contents of AA2 and BS3 are updated through buffer 6. The time chart in Figure 3 shows the operation when a mishit occurs.
10 is the value of address bus 8, 11 is read from AA2,
12 is writing to AA2, 13 is reading from BS3, 14
15 is a write to the BS3, and 15 is a read from the main memory 4. Here, the data used for writing 12 to AA2 is the upper bit of value 10 of address bus 8. Further, the data used for writing 14 to the BS 3 is the data obtained by reading 15 from the main memory 4. Conventionally, as a method for improving the reliability of cache memory, it has been common to provide parity bits in AA2 and BS3 and perform a parity check, as described in Japanese Patent Laid-Open No. 117348/1983. Note that the parity bit reflects the number of "l"s included in the data, and by generating and checking the parity bit so that the number of "l"s included in the data and parity bits is an odd or even number. 1 bit errors can be detected. FIG. 4 shows the configuration of a cache memory with a parity check function. When reading from AA2 or BS3, parity check is performed by parity checker 16. If an error is detected, parity check is performed by parity checker 16. The output error signal causes the data from the main memory 4 to be sent to the CPUI as a miss. By employing this parity check method, it is possible to eliminate 1-bit errors occurring in AA2 and BS3. ■Problems to be Solved by the Invention] By the way, storage devices are required to be highly reliable in response to increased capacity and higher integration of memory elements, and main storage devices are equipped with ECC (Error Correcting C
It is common to provide a 2-bit error detection and 1-bit error correction function using the . However, E.C.
In the C method, creation of inspection information and error checking,
It takes a long time to make corrections, making it difficult to apply it to cache memories that require particularly high speed. For this reason,
Generally, as in the prior art described above, a parity check method is adopted for the AA2 and BS3 that constitute the cache memory. Parity check method is AA2 or BS3
If a 1-bit error occurs, data in the main memory 4 is used, so the CPUI is superior in that it can continue processing without stopping the program being executed. However, if a 2-bit error occurs in AA2 or BS3, it cannot be detected, so there is a problem in that reliability is lower than in the ECC method. An object of the present invention is to easily improve the reliability of AA2 or BS3 constituting a cache memory without reducing the access speed of the cache memory. 1. Means for Solving the Problems In order to achieve the above object, a memory check method according to the present invention provides an information processing apparatus that includes a storage device having a hierarchical structure of at least a main memory and a cache memory. The memory check of the cache memory is performed using idle time during operation. As the free time, for example, when accessing the main memory at the time of a miss, the time generated due to the difference in access time between the main memory and the cache memory can be used. ] Effect 1' As described above, if a copy of the data in the main memory 4 accessed by the CPUI does not exist in the cache memory, that is, in the case of a miss, the data is accessed from the main memory 4. At this time, B-S 3 of the cache memory
The data accessed from the main memory and the upper bits of the address of the data are respectively written to AA2. This writing can be completed in a short time because the memory elements used for AA2 and BS3 are high speed. On the other hand, since the main memory is slow, the cache memory must wait for the access to the main memory to end. This waiting time can be used to check the cache memory. As a method of checking, for example, if the content you have just written is
This can be done by reading data from A2 or BS3 and comparing it with the written data, or by writing normal data into AA2 or BS3, reading it out continuously, and comparing the read data with the written data. This check makes it possible to detect a failure occurring in AA2 or BS3.

【実施例】【Example】

以下、本発明の一実施例を第1図に示し説明する。 本実施例の特徴は、ミスヒツト時のAA2へのデータ書
込後にチエツク用の読出17を行なうことである。動作
を順に述べると、CPU lからのデータアクセスか発
生すると、まずAA2からデータ読出11を行ない、ア
ドレスバス8の値lOの上位ビットとコンパレータ5で
比較する。ミスヒツト時には前記コンパレータ5の出力
は不一致を示す。この時、BS3からもデータ読出13
を行なうが、このデータは使われない、一方、前記コン
パレータ5の出力が不一致を示したことにより主記憶4
からの読出15が開始される。この主記憶4からの読出
15か完了するまでに、アドレスバス8の値10の上位
ビットをデータとしてAA2への書込12と、AA2か
らのチエツク用読出17を行なう、チエツク用読出17
で読出されたデータとアドレスバス8の値lOの上位ビ
ットとをコンパレータ5を用いて比較し、一致していな
ければ、AA2が故障していると判断し、以後のアクセ
スではキャッシュメモリをバイパスする等の処置を行な
う、前記比較結果が一致していたならば、主記憶4から
の読出データをcputに送ると共に、これをデータと
してBS3への書込14を行ないアクセスを終了する。 本実施例においては、チエツク用の回路としてヒツト/
ミスヒツト判定に用いるコンパレータをそのまま用いる
ことができ、ハードウェアの量を増加させることなくA
A2のチエツクができるという効果がある。 第5図に本発明の他の実施例を示す0本実施例では、キ
ャッシュミスヒツト時のチエ・ンクにおいてBS3への
チエツク用書込18およびチエツク用読出19を行なう
ことが特徴である。すなわち。 キャッシュミスヒツト時におけるBS3の通常の読出1
3と通常の書込14の間に、チエツク用データをチエツ
ク用書込18によりBS3に書込み、続けてチエツク用
読出19によりBS3からデータを読出す、この読出デ
ータと前記チエツク用データとを比較することにより、
BS3の故障を検出する。前記チエツク用データとして
用いる値は任意であるが、通常の読出13で読出された
データの値の“1”と“0”を反転した値を用いれば、
BS3の各ビットに対し“1”と“0”の両方が読み書
きできることが確認できるのでチエツクの効果が大きい
。 以上の実施例では、AA2あるいはBS3のいずれか一
方のみに対してチエツクを行なう例を挙げたが両方同時
に行なうこともできる。また、パリティチエツク方式と
併用することも可能である。
An embodiment of the present invention is shown in FIG. 1 and will be described below. The feature of this embodiment is that the check read 17 is performed after data is written to AA2 at the time of a miss. To describe the operation in order, when a data access occurs from CPU 1, data is first read 11 from AA2 and compared with the upper bit of value 10 of address bus 8 by comparator 5. When there is a mishit, the output of the comparator 5 indicates a mismatch. At this time, data read 13 from BS3 as well.
However, this data is not used. On the other hand, since the output of the comparator 5 indicates a mismatch, the data is stored in the main memory 4.
Reading 15 from is started. Before this reading 15 from the main memory 4 is completed, the upper bit of the value 10 of the address bus 8 is written to AA2 as data, and the check reading 17 is performed from AA2.
The comparator 5 compares the data read out with the upper bit of the value lO of the address bus 8, and if they do not match, it is determined that AA2 is faulty, and the cache memory is bypassed in subsequent accesses. If the comparison results match, the read data from the main memory 4 is sent to cput, and the data is written 14 to the BS 3 as data, thereby ending the access. In this embodiment, the check circuit uses a
The comparator used for mishit judgment can be used as is, and A can be achieved without increasing the amount of hardware.
This has the effect of being able to check A2. FIG. 5 shows another embodiment of the present invention. This embodiment is characterized in that a check write 18 and a check read 19 are performed to the BS 3 during a check when a cache miss occurs. Namely. Normal read 1 of BS3 when cache miss occurs
Between 3 and normal write 14, check data is written to BS3 by check write 18, and then data is read from BS3 by check read 19, and this read data is compared with the check data. By doing so,
Detects failure of BS3. The value used as the check data is arbitrary, but if a value that is the inversion of "1" and "0" of the data read in the normal reading 13 is used,
The check is very effective because it can be confirmed that both "1" and "0" can be read and written to each bit of BS3. In the above embodiment, an example was given in which only one of AA2 and BS3 is checked, but both can be checked at the same time. It is also possible to use it in conjunction with a parity check method.

【発明の効果】【Effect of the invention】

本発明によれば、キャッシュメモリを構成するAAおよ
びBSにおける1ビツトあるいは多ビットの故障を、シ
ステムの動作中にキャッシュメモリの空き時間を利用し
て容易にチエツクできるので、アクセス速度を低下させ
ることなく信頼性を向上させることができる。
According to the present invention, 1-bit or multi-bit failures in the AA and BS that constitute the cache memory can be easily checked by using the free time of the cache memory while the system is operating, thereby reducing the access speed. reliability can be improved.

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

第1図は本発明の実施例のタイムチャート、第2図は本
発明を適用可能なキャッシュメモリの構成例のブロック
図、第3−図は従来のキャッシュメモリのタイムチャー
ト、第4図は従来のパリティチエツク方式の構成例のブ
ロック図、第5図は本発明の他の実施例のタイムチャー
トである。 l・・・CPU 2・・・AA 3・・・BS 4・・・主記憶 5・・・コンパレータ 11・・・AAの読出 12・・・AAの書込 13・・・BSの読出 14・・・BSの書込 15・・・主記憶の読出 17・−A Aのチエツク用読出 18・・・BSのチエツク用書込 19・−B Sのチエツク用読出
FIG. 1 is a time chart of an embodiment of the present invention, FIG. 2 is a block diagram of a configuration example of a cache memory to which the present invention can be applied, FIG. 3 is a time chart of a conventional cache memory, and FIG. 4 is a conventional cache memory. FIG. 5 is a block diagram of a configuration example of the parity check method, and FIG. 5 is a time chart of another embodiment of the present invention. l... CPU 2... AA 3... BS 4... Main memory 5... Comparator 11... AA reading 12... AA writing 13... BS reading 14... ...Write BS 15...Read main memory 17 -A Read for check of A 18...Write for BS check 19 -Read for check of BS

Claims (1)

【特許請求の範囲】[Claims] 1、少なくとも主記憶とキャッシュメモリとによる階層
構造を有する記憶装置を備える情報処理装置において、
前記キャッシュメモリの動作の空き時間を利用して前記
キャッシュメモリのメモリチェックを行なうことを特徴
とするキャッシュメモリのメモリチェック方式。
1. In an information processing device equipped with a storage device having a hierarchical structure consisting of at least a main memory and a cache memory,
A memory check method for a cache memory, characterized in that a memory check of the cache memory is performed using idle time during operation of the cache memory.
JP63048457A 1988-03-01 1988-03-01 Check system for cache memory Pending JPH01222351A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63048457A JPH01222351A (en) 1988-03-01 1988-03-01 Check system for cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63048457A JPH01222351A (en) 1988-03-01 1988-03-01 Check system for cache memory

Publications (1)

Publication Number Publication Date
JPH01222351A true JPH01222351A (en) 1989-09-05

Family

ID=12803888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63048457A Pending JPH01222351A (en) 1988-03-01 1988-03-01 Check system for cache memory

Country Status (1)

Country Link
JP (1) JPH01222351A (en)

Similar Documents

Publication Publication Date Title
EP0989492B1 (en) Technique for correcting single-bit errors in caches with sub-block parity bits
US6754858B2 (en) SDRAM address error detection method and apparatus
JP2862948B2 (en) Semiconductor storage device
US6292906B1 (en) Method and apparatus for detecting and compensating for certain snoop errors in a system with multiple agents having cache memories
JP4395425B2 (en) Data processing apparatus and method for processing corrupted data values
US20030009721A1 (en) Method and system for background ECC scrubbing for a memory array
JPH0594377A (en) Parity detecting circuit
JPS59214952A (en) Processing system of fault
JPH01222351A (en) Check system for cache memory
JPH09288619A (en) Main storage device
JPH0612342A (en) Fault detecting method for ram
JP2993099B2 (en) Redundant memory device
JPH06149685A (en) Memory error recovering circuit
JPS6235146B2 (en)
JPH04243446A (en) Cache registration controller
JP3457428B2 (en) Data processing device
JP3106448B2 (en) Processor unit
JPH0223442A (en) Memory control device
JPS62166456A (en) Information processor
JPH01273152A (en) Cache memory control system
JPH04233052A (en) Duplex memory device
JPH02143352A (en) Memory error detection and correction system
JPS61166654A (en) Memory patrol diagnosis system
JPH08190512A (en) Data storage controller
JPH02268351A (en) Error processing system for store cache part