JPH0235545A - Diagnosing method for set associative cache memory - Google Patents

Diagnosing method for set associative cache memory

Info

Publication number
JPH0235545A
JPH0235545A JP63092150A JP9215088A JPH0235545A JP H0235545 A JPH0235545 A JP H0235545A JP 63092150 A JP63092150 A JP 63092150A JP 9215088 A JP9215088 A JP 9215088A JP H0235545 A JPH0235545 A JP H0235545A
Authority
JP
Japan
Prior art keywords
memory
information
cache memory
control signal
bit memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP63092150A
Other languages
Japanese (ja)
Other versions
JPH06105441B2 (en
Inventor
Akira Yamada
朗 山田
Tatsuo Yamada
山田 達雄
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63092150A priority Critical patent/JPH06105441B2/en
Publication of JPH0235545A publication Critical patent/JPH0235545A/en
Publication of JPH06105441B2 publication Critical patent/JPH06105441B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To facilitate diagnosing operation by generating at least one signal which enables stored information to be read out or written in a substitution priority storage means for data of each way. CONSTITUTION:A control register 21 sets a control signal TEST to '1' and a control signal RW to '0' or '1'. The control signal TEST places a cache memory in diagnostic mode when '1'. The control signal RW allows information to be written in an LRU bit memory 8 when '0' in diagnostic mode and also allows stored information to be read out of the LRU bit memory 8 when '1' in diagnostic mode. Then when the control signal RW is '0', the information to be written in the LRU bit memory 8 is written in the LRU bit memory 8 specified by a set select 3 through a control circuit 22. Further, when the control signal RW is '1', the information stored in the LRU bit memory 8 specified by the set select 3 is read out through the control circuit 22.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はセットアソシアティブ方式キャッシュメモリの
診断方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for diagnosing a set-associative cache memory.

〔従来の技術〕[Conventional technology]

第2図(alおよび(b)は従来のセットアソシアティ
ブ方式キャッシュメモリの診断方法を説明するためのア
ドレス構成図および4ウ工イセツトアソシアテイブ方式
キャッシュメモリのブロック構成図である。この4ウ工
イセフトアソシアテイブ方式キャッシュメモリは、CQ
出版社の[インタフェースJ 19B7年9月号の25
0頁に記載されたものである。
FIGS. 2(al) and (b) are an address configuration diagram and a block configuration diagram of a 4-way set associative cache memory for explaining a conventional set-associative cache memory diagnosis method. The CQ associative cache memory is
Publisher's [Interface J September 19B7 issue 25
It is written on page 0.

第2図(a)において、1はキャッシュメモリにアクセ
スしようとするアドレス、2はアドレス1の一部である
アドレスタグ、3はアドレス1の一部であるセットセレ
クト、4はアドレス1の一部であるワードセレクトであ
る。また第2図山)において、5はキャッシュメモリ内
にあるアドレスタグを保持するアドレスタグメモリ、6
は後記データブロックメモリ7の保持しているデータが
有効であるか無効であるかを示すバリソトビットメモリ
、。
In FIG. 2(a), 1 is the address to access the cache memory, 2 is the address tag which is part of address 1, 3 is the set select which is part of address 1, and 4 is part of address 1. This is a word select. In addition, in Figure 2), 5 is an address tag memory that holds address tags in the cache memory;
is a variable bit memory that indicates whether the data held in the data block memory 7, which will be described later, is valid or invalid.

7はキャッシュメモリ内にあるデータを保持するデータ
ブロックメモリ、8は各ウェイのデータの置換え優先順
位記憶手段としてのLRUビフトメモリである。LRU
ビットメモリ8はデータの置換えをL RU (Lea
st Recently Used)アルゴリズムによ
って制御される状態レジスタである。さらに、9はアド
レスタグ2とアドレスタグメモリ5に保持しているアド
レスのデータとを比較して一致しているか否かを調べる
アドレスタグ比較器、10はアドレスlのワードセレク
ト4によって選択されるセレクタ、11はアドレスタグ
比較器によって選択されるセレクタであり、aはセレク
タ11から出力されるデータである。
Reference numeral 7 represents a data block memory for holding data in the cache memory, and reference numeral 8 represents an LRU bit memory as a data replacement priority storage means for each way. L.R.U.
The bit memory 8 performs data replacement using LRU (Lea
This is a status register controlled by the stRecentlyUsed) algorithm. Furthermore, 9 is an address tag comparator which compares the address data held in the address tag 2 and the address data held in the address tag memory 5 to see if they match, and 10 is selected by the word select 4 of address l. A selector 11 is a selector selected by an address tag comparator, and a is data output from the selector 11.

次に動作について説明する。外部からアドレスlが与え
られると、セットセレクト3で選ばれた各ウェイのアド
レスタグメモリ5の内容をアドレスタグ比較器9に送る
と共に、データブロックメモリ7の内容もセレクタ10
に送り、ワードセレクト4で選ばれたワードデータをセ
レクタ11に送る。そして、アドレスタグ比較器9で、
選ばれたアドレスタグメモリ5の内容とアドレスタグ2
と一致しているか否かを調べ、一致しているウェイが存
在していれば、セレクタ11よりそのウェイのデータを
出力データaとして出力する。しかし、アドレス比較器
9で不一致となれば、キヤ・ノシュメモリ外のメインメ
モリ (図示せず)にデータを読みにいき、MPUにデ
ータを送ると共にキャッシュメモリ内のデータブロック
メモリ7にデータを格納する。この時どのウェイにデー
タを格納するかを決めるのがLRUアルゴリズムで、そ
の情報がLRUビットメモリ8に格納されている。
Next, the operation will be explained. When an address l is given from the outside, the contents of the address tag memory 5 of each way selected by the set select 3 are sent to the address tag comparator 9, and the contents of the data block memory 7 are also sent to the selector 10.
The word data selected by the word select 4 is sent to the selector 11. Then, in the address tag comparator 9,
Contents of selected address tag memory 5 and address tag 2
If there is a matching way, the selector 11 outputs the data of that way as output data a. However, if there is a mismatch in the address comparator 9, the data is read in the main memory (not shown) outside the cache memory, sent to the MPU, and stored in the data block memory 7 in the cache memory. . At this time, the LRU algorithm determines in which way the data should be stored, and this information is stored in the LRU bit memory 8.

次に、このキャッシュメモリのLRUビットメモリ8の
診断方法について述べる。この従来例ではLRUビット
メモリ8に外部から情報を直接書き込むことができない
ため、LRUビットメモリ8を診断すべき値に設定する
ためには、メインメモリのデータをキャッシュメモリに
複数回書き込むという動作が必要であった。また、この
従来例ではLRUビットメモリ8から記憶情報を外部に
直接読み出すことができないため、LRUビー/ トメ
モリ8の記憶情報が所望の値に設定されていることを1
IiI認するためには、キャッシュメモリよりの複数回
の読出し動作とメインメモリのデータをキャッシュメモ
リに複数回書き込むという動作が必要であった。
Next, a method of diagnosing the LRU bit memory 8 of this cache memory will be described. In this conventional example, it is not possible to directly write information to the LRU bit memory 8 from the outside, so in order to set the LRU bit memory 8 to the value that should be diagnosed, it is necessary to write the data in the main memory to the cache memory multiple times. It was necessary. In addition, in this conventional example, since it is not possible to directly read the stored information from the LRU bit memory 8 to the outside, it is necessary to confirm that the stored information in the LRU beat/beat memory 8 is set to a desired value.
In order to recognize IiI, it was necessary to read data from the cache memory multiple times and write data from the main memory to the cache memory multiple times.

このように、従来のLRUビットメモリ8の診断方法は
、LR(Jビットメモリ8の直接的読出しおよび書込み
が不可能なため、間接的観察によりメモリ8の良否を判
断するものであった。
As described above, the conventional method for diagnosing the LRU bit memory 8 has been to judge the quality of the memory 8 through indirect observation, since direct reading and writing of the LR (J bit memory 8) is impossible.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のセットアソシアティブ方式のキャッシュメモリの
LRUビットメモリ8を診断するためには、LRUビフ
トメモリ8に外部から情報を直接書き込むことができな
いため、LR[Jビットメモリ8を診断すべき値にする
ためには、メインメモリのデータをキャッシュメモリに
複数回書き込むという動作が必要であるという課題があ
った。
In order to diagnose the LRU bit memory 8 of the conventional set associative cache memory, information cannot be directly written to the LRU bit memory 8 from the outside, so in order to set the LR [J bit memory 8 to the value to be diagnosed However, there was a problem in that the data in the main memory had to be written to the cache memory multiple times.

また、従来のセットアソシアティブ方式のキャッシュメ
モリのLRUビットメモリ8を診断するためには、LR
Uビットメモリ8から外部に記憶情報を直接読み出すこ
とができないため、LRUビットメモリ8の記憶情報が
所望の値に設定されていることを確認するためには、キ
ャッシュメモリよりの複数回の読出し動作とメインメモ
リのデータをキャッシュメモリに複数回書き込むという
動作が必要であるという課題があった。
In addition, in order to diagnose the LRU bit memory 8 of the conventional set associative cache memory, the LR
Since stored information cannot be directly read externally from the U bit memory 8, in order to confirm that the stored information in the LRU bit memory 8 is set to the desired value, multiple read operations from the cache memory are required. There was a problem in that it was necessary to write the data in the main memory to the cache memory multiple times.

本発明はこのような点に鑑みてなされたものであり、そ
の目的とするところは、セットアソシアティブ方式キャ
ッシュメモリのLRUビットメモリの診断モードにおい
て、LRUビフトメモリの記憶情報の直接的読出しおよ
び書込みが可能で、従って診断が容易なセットアソシア
ティブ方式キャッシュメモリの診断方法を提供すること
にある。
The present invention has been made in view of the above points, and its purpose is to enable direct reading and writing of information stored in the LRU bit memory in the diagnostic mode of the LRU bit memory of the set associative cache memory. Therefore, it is an object of the present invention to provide a method for diagnosing a set associative type cache memory that is easy to diagnose.

〔課題を解決するための手段〕[Means to solve the problem]

このような課題を解決するために本発明は、Nウェイの
セットアソシアティブ方式のキャッシュメモリにおいて
、診断モードでは、各ウェイのデータの置換え優先順位
記憶手段の記憶情報を読み出すこと並びに上記置換え優
先1碩位記憶手段に情報を書き込むことを許可する少な
くとも1つの信号を発生するようにしたものである。
In order to solve such problems, the present invention provides an N-way set associative type cache memory that, in the diagnostic mode, reads out the storage information of the data replacement priority storage means of each way, and The apparatus is configured to generate at least one signal for permitting information to be written to the storage means.

〔作用〕[Effect]

本発明による診断方法は、Nウェイのセットアソシアテ
ィブ方式キャッシュメモリにおいて、診断モードでは、
各ウェイのデータの置換え優先順位記憶手段の記憶情報
を読み出すことを許可する少な(とも1つの信号を発生
し、セットセレクトを指定することにより、上記置換え
優先順位記憶手段のセットセレクトに対応する記憶情報
を読み出す。
In the diagnostic method according to the present invention, in the N-way set associative cache memory, in the diagnostic mode,
By generating one signal and specifying a set select to permit reading out the storage information of the data replacement priority storage means of each way, the memory corresponding to the set selection of the replacement priority storage means is generated. Read information.

また、Nウェイのセットアソシアティブ方式キャッシュ
メモリにおいて、診断モードでは、各ウェイのデータの
置換え優先順位記憶手段に情報を書き込むことを許可す
る少なくとも1つの信号を発生し、セットセレクトを指
定することにより、上記置換え優先順位記憶手段のセッ
トセレクトに対応する記憶位置に情報を書き込む。
Further, in the N-way set associative cache memory, in the diagnostic mode, by generating at least one signal to permit writing of information into the data replacement priority storage means of each way and specifying set selection, Information is written to a storage location corresponding to the set selection in the replacement priority storage means.

〔実施例〕〔Example〕

以下、本発明によるセットアソシアティブ方式キャッシ
ュメモリの診断方法を第1図を用いて説明する。第1図
(a)および(b)は従来のセントアソシアティブ方式
キャッシュメモリの診断方法を説明するためのアドレス
構成図および4ウ工イセツトアソシアテイブ方式キャッ
シュメモリのブロック構成図である。第1図において、
21は制御信号TESTおよび制御信号RWを発生する
制御レジスタ、22は制御信号TESTおよび制御信号
RWによりLRUビットメモリ8からの記憶情報の読出
しとLRUビットメモリ8への情報の書込みを制御する
制御回路であり、同図において第2図と同一部分又は相
当部分には同一符号が付しである。
A method for diagnosing a set associative cache memory according to the present invention will be described below with reference to FIG. FIGS. 1(a) and 1(b) are an address configuration diagram and a block diagram of a four-way set associative cache memory for explaining a conventional method of diagnosing a sent associative cache memory. In Figure 1,
21 is a control register that generates a control signal TEST and a control signal RW, and 22 is a control circuit that controls reading of stored information from the LRU bit memory 8 and writing of information to the LRU bit memory 8 using the control signal TEST and the control signal RW. In this figure, the same or corresponding parts as in FIG. 2 are given the same reference numerals.

次に動作について説明する。第1図(blに示す4ウ工
イセツトアソシアテイブ方式キャッシュメモリの通常動
作は第2図で示した従来例のキャッシュメモリの動作と
全く同じで、診断モードの動作のみが異なる。以下に診
断モードにおけるLRUビットメモリ8の診断動作につ
いて説明する。
Next, the operation will be explained. The normal operation of the four-way set associative cache memory shown in FIG. 1 (bl) is exactly the same as the operation of the conventional cache memory shown in FIG. The diagnostic operation of the LRU bit memory 8 in the diagnostic mode will be explained.

まず、LRUビットメモリ8への情報の書込み動作につ
いて述べる。診断モート′でLRUビットメモリ8への
情報の書込みを行なうには、制御レジスタ21により制
御信号TESTを“11に、制御信号RWを“0”に設
定する。制御信号TESTは・ “l”のときキャッシ
ュメモリを診断モードに設定する。制御信号RWは、診
断モードで“I”のときLRUビフトメモリ8がら記憶
情報を読み出すことを許可し、診断モードで“0”のと
きLRUビットメモリ8に情報を書き込むことを許可す
る制御信号である。このように制御信号を設定し、セッ
トセレクト3を指定することにより、LRUビットメモ
リ8に書き込むべき情報は、制御図B22を通じてセッ
トセレクト3で指定されたLRUピントメモリ8に書き
込まれる。
First, the operation of writing information to the LRU bit memory 8 will be described. To write information to the LRU bit memory 8 in the diagnostic mode', the control signal TEST is set to "11" and the control signal RW to "0" by the control register 21.The control signal TEST is set to "1". When the cache memory is set to the diagnostic mode, the control signal RW allows reading of stored information from the LRU bit memory 8 when it is "I" in the diagnostic mode, and allows reading of stored information from the LRU bit memory 8 when it is "0" in the diagnostic mode. By setting the control signal in this way and specifying set select 3, the information to be written to the LRU bit memory 8 is the information specified by set select 3 through control diagram B22. It is written to the LRU focus memory 8.

次にLRUビアトメモリ8からの情報の読出し動作につ
いて説明する。診断モードでLRUピントメモリ8から
の情報の読出しを行なうには、制御レジスタ21により
制御信号TESTを“1”に、制御信号RWを“l”に
設定する。このように制御信号を設定し、セットセレク
ト3を指定することにより、セ・ノドセレクト3で指定
されたLRUピントメモリ8の記憶情報は制御回路22
を通じて読み出される。
Next, the operation of reading information from the LRU via memory 8 will be explained. To read information from the LRU focus memory 8 in the diagnostic mode, the control register 21 sets the control signal TEST to "1" and the control signal RW to "1". By setting the control signal in this way and specifying the set select 3, the storage information of the LRU focus memory 8 specified by the front select 3 is transferred to the control circuit 22.
read out through

本発明によるキャッシュメモリの診断方法は、キャンシ
ュメモリを集積回路で構成したものや、キャッシュメモ
リを内蔵する集積回路で構成されたマイクロプロセッサ
におけるキャッシュメモリの診断を行なう際に特に有効
である。
The method of diagnosing a cache memory according to the present invention is particularly effective when diagnosing a cache memory in a cache memory configured with an integrated circuit or in a microprocessor configured with an integrated circuit including a cache memory.

また、第1図において、制御信号RW、TESTは制御
レジスタ21からの出力としているが、キャッシュメモ
リ外部から与えることも可能である。
Further, in FIG. 1, the control signals RW and TEST are output from the control register 21, but they can also be provided from outside the cache memory.

〔発明の効果) 以上説明したように本発明によれば、セットアソシアテ
ィブ方式キャッシュメモリの置換え優先順位記憶手段の
診断モードにおいて、セットセレクトを指定して、置換
え優先順位記憶手段の記憶情報の読出しおよび書込みを
行なうことにより、置換え優先順位記憶手段の記憶情報
の直接的読出しおよび書込みが可能となり、セットアソ
シアティブ方式キャッシュメモリの診断が容易となる効
果がある。
[Effects of the Invention] As described above, according to the present invention, in the diagnosis mode of the replacement priority storage means of a set associative cache memory, set select is specified and information stored in the replacement priority storage means is read and Writing allows direct reading and writing of the information stored in the replacement priority storage means, which has the effect of facilitating diagnosis of the set associative type cache memory.

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

第1図(alおよび(b)は本発明による診断方法の一
実施例を説明するためのアドレス構成図およびセットア
ソシアティブ方式キャッシュメモリの系統図、第2図(
a)および(blは従来の診断方法を説明するためのア
ドレス構成図およびセットアソシアティブ方式キャッシ
ュメモリの系統図である。 1・・・アドレス、2・・・アドレスタグ、3・・・セ
ットセレクト、4・・・ワードセレクト、5・・・アド
レス構成図そり、6・・・バリントビットメモリ、7・
・・データフロックメモリ、8・・・LRUビットメモ
リ、9・・・アドレスタグ比較器、10.11・・・セ
レクタ、21・・・制御レジスタ、22・・・制御回路
FIGS. 1A and 1B are an address configuration diagram and a system diagram of a set associative cache memory for explaining an embodiment of the diagnostic method according to the present invention, and FIGS.
a) and (bl) are an address configuration diagram and a system diagram of a set associative cache memory for explaining a conventional diagnostic method. 1...Address, 2...Address tag, 3...Set select, 4... Word select, 5... Address configuration diagram, 6... Balint bit memory, 7...
...Data block memory, 8...LRU bit memory, 9...Address tag comparator, 10.11...Selector, 21...Control register, 22...Control circuit.

Claims (1)

【特許請求の範囲】[Claims] Nを2以上の自然数としたときのNウェイのセットアソ
シアティブ方式のキャッシュメモリにおいて、診断モー
ドでは、各ウェイのデータの置換え優先順位記憶手段の
記憶情報の読出しおよび前記置換え優先順位記憶手段へ
の情報の書込みを許可する少なくとも1つの信号を発生
し、セットセレクトを指定することにより、前記置換え
優先順位記憶手段の前記セットセレクトに対応する前記
記憶情報の読出しおよび前記セットセレクトに対応する
記憶位置への前記情報の書込みを行なうことを特徴とす
るNウェイのセットアソシアティブ方式キャッシュメモ
リの診断方法。
In an N-way set associative type cache memory where N is a natural number of 2 or more, in the diagnostic mode, reading the information stored in the replacement priority storage means for data of each way and transmitting information to the replacement priority storage means. By generating at least one signal to permit writing of the information and specifying a set select, reading of the stored information corresponding to the set select of the replacement priority storage means and writing to a storage location corresponding to the set select is performed. A method for diagnosing an N-way set associative cache memory, comprising writing the information.
JP63092150A 1988-04-13 1988-04-13 Set-associative cache memory diagnostic method Expired - Lifetime JPH06105441B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63092150A JPH06105441B2 (en) 1988-04-13 1988-04-13 Set-associative cache memory diagnostic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63092150A JPH06105441B2 (en) 1988-04-13 1988-04-13 Set-associative cache memory diagnostic method

Publications (2)

Publication Number Publication Date
JPH0235545A true JPH0235545A (en) 1990-02-06
JPH06105441B2 JPH06105441B2 (en) 1994-12-21

Family

ID=14046395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63092150A Expired - Lifetime JPH06105441B2 (en) 1988-04-13 1988-04-13 Set-associative cache memory diagnostic method

Country Status (1)

Country Link
JP (1) JPH06105441B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6701461B2 (en) 1998-07-01 2004-03-02 Fujitsu Limited Method and apparatus for testing a cache
JP2009048343A (en) * 2007-08-17 2009-03-05 Fujitsu Ltd Cache tag test method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6701461B2 (en) 1998-07-01 2004-03-02 Fujitsu Limited Method and apparatus for testing a cache
JP2009048343A (en) * 2007-08-17 2009-03-05 Fujitsu Ltd Cache tag test method

Also Published As

Publication number Publication date
JPH06105441B2 (en) 1994-12-21

Similar Documents

Publication Publication Date Title
US4996641A (en) Diagnostic mode for a cache
US4092713A (en) Post-write address word correction in cache memory system
KR100423276B1 (en) Instruction fetch method and apparatus
JP2000514941A (en) Parity generation flyval XOR for data collected from the bus
JPS6136667B2 (en)
JPH11143775A (en) Cache memory system
JPS62145340A (en) Cache memory control system
JPH0786848B2 (en) Cache memory
JPS61180347A (en) Addressable cash memory by physical address and virtual address
JPH0235545A (en) Diagnosing method for set associative cache memory
US4737908A (en) Buffer memory control system
JPH1185613A (en) Cache memory
JP2821326B2 (en) Cache memory failure detection device
JPH1125006A (en) Memory tester
EP0604030A2 (en) Copy back cache tag memory
JPH05289904A (en) Debugging tool for cache memory
KR950013113B1 (en) Method for the control of cache state in multi processor system
JPH0795309B2 (en) Set associative cache memory
JPH1078917A (en) Cache memory device and its diagnostic method
JPH0821001B2 (en) Cache memory control method
JPS6280742A (en) Buffer storage control system
JPH0540691A (en) Fault detector for cache memory
JPH02156352A (en) Cache memory
JPH06103173A (en) Portable data processor
JPH0340149A (en) Data processor