JPH0268640A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH0268640A
JPH0268640A JP63221559A JP22155988A JPH0268640A JP H0268640 A JPH0268640 A JP H0268640A JP 63221559 A JP63221559 A JP 63221559A JP 22155988 A JP22155988 A JP 22155988A JP H0268640 A JPH0268640 A JP H0268640A
Authority
JP
Japan
Prior art keywords
data
tag
data storage
cache
storage means
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
JP63221559A
Other languages
Japanese (ja)
Other versions
JPH071483B2 (en
Inventor
Yuichi Hachiman
八幡 勇一
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.)
PFU Ltd
Original Assignee
PFU 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 PFU Ltd filed Critical PFU Ltd
Priority to JP63221559A priority Critical patent/JPH071483B2/en
Publication of JPH0268640A publication Critical patent/JPH0268640A/en
Publication of JPH071483B2 publication Critical patent/JPH071483B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To store data in plural storage means and to extend the capacity of cache memory by selecting either plural data storage means and retrieval control means based on part of second tag information, and validating readout/ write on a selected data storage means. CONSTITUTION:The retrieval control means 120 and the data storage means 111 are selected by a selection means 131 based on part of the second tag information. Therefore, the readout of a data block from a selected data storage means 111 can be validated, and a corresponding data block is retrieved and outputted based on control by the retrieval control means 120. Also, when no corresponding data block is stored in the selected data storage means 111, the write on the data storage means 111 can be validated. In other words, either the plural retrieval control means 120 and data storage means 111 is selected by the selection means 131. In such a way, it is possible to store the data in the plural data storage means 111, and to obtain the cache memory large in capacity.

Description

【発明の詳細な説明】 〔目 次〕 概要 産業上の利用分野 従来の技術 発明が解決しようとする課題 課題を解決するための手段 作用 実施例 ■、実施例と第1図との対応関係 ■、実施例の構成 (i)システム全体の構成 (ii )キャッシュメモリの構成 ■、実施例の動作 (i)ヒツトの場合 (ii)キャッシュミスの場合 ■、実施例のまとめ ■0発明の変形態様 発明の効果 いて、複数のデータ格納手段と複数の検索制御手段の何
れか1つずつを選択する選択手段とを具え、選択手段に
よって選択されたデータ格納手段に対する読み出しおよ
び書き込みが有効となるように構成する。
[Detailed Description of the Invention] [Table of Contents] Overview Industrial Application Fields Conventional Technology Problems to be Solved by the Invention Means for Solving the Problems Action Examples ■, Correspondence between the Examples and FIG. 1 ■ , Configuration of the embodiment (i) Overall system configuration (ii) Cache memory configuration ■, Operation of the embodiment (i) In the case of a hit (ii) In the case of a cache miss ■, Summary of the embodiment ■ 0 Modifications of the invention As an effect of the invention, the present invention includes a selection means for selecting one of a plurality of data storage means and a plurality of search control means, so that reading and writing to the data storage means selected by the selection means is effective. Configure.

〔イ既  要〕[Already required]

キャッシュメモリに関し、 ハードウェア構成を複雑にすることなく格納容量を大き
くすることを目的とし、 データブロックを主記憶装置における格納アドレスに対
応した格納場所に格納する複数のデータ格納手段と、複
数のデータ格納手段のそれぞれに対応して設けられ、格
納アドレスの一部を第1タグ情報として格納するタグ情
報格納領域を有し、この第1タグ情報と処理装置が主記
憶装置の該当領域を指定するために出力する指定アドレ
スの一部である第2タグ情報とに基づいてデータ格納手
段に格納されたデータブロックの検索動作を制御する検
索制御手段と、第2タグ情報の一部に基づ〔産業上の利
用分野〕 本発明は、情報処理システムにおいて、データのアクセ
ス(読み出し、書き込み)を高速に行なうために設けら
れるキャッシュメモリに関するものである。
Regarding cache memory, the aim is to increase storage capacity without complicating the hardware configuration. A tag information storage area is provided corresponding to each of the storage means and stores a part of the storage address as first tag information, and the first tag information and the processing device specify the corresponding area of the main storage device. a search control means for controlling a search operation of a data block stored in the data storage means based on second tag information that is a part of the specified address to be outputted for the search; INDUSTRIAL APPLICATION FIELD The present invention relates to a cache memory provided for high-speed data access (reading and writing) in an information processing system.

〔従来の技術] キャッシュメモリにおいては、情報処理システムの主記
憶装置内の一定量の情報が、その情報の主記憶装置内の
格納場所と対応するように、キャッシュメモリ内のデー
タメモリ部に格納されている。
[Prior Art] In a cache memory, a certain amount of information in the main memory of an information processing system is stored in a data memory section of the cache memory so as to correspond to a storage location in the main memory of the information. has been done.

主記憶装置におけるアドレスとこのデータメモリ部内の
アドレスとを対応させる方法の一つとして4ウエイセン
トアソシアテイブ方弐がある。
One method of associating addresses in the main memory with addresses in the data memory section is a four-way cent associative method.

第4図は、4ウ工イセツトアソシアテイブ方式を用いた
キャッシュメモリの構成図である。
FIG. 4 is a block diagram of a cache memory using a four-way set associative method.

ここで、情報処理システムのマイクロプロセッサ(MP
U)が扱うアドレス空間は、20ビツトであるものとし
、例えば図のように上位8ビツトをタグ部2次の8ビツ
トをインデックス部、下位の4ビツトをワードセレクト
部と称する。
Here, the microprocessor (MP) of the information processing system
The address space handled by U) is assumed to be 20 bits.For example, as shown in the figure, the upper 8 bits are called a tag part, the secondary 8 bits are called an index part, and the lower 4 bits are called a word select part.

また、主記憶装置内において格納アドレスのタグ部で指
定される記憶領域をセクタと称し、このセクタ内には、
16ワードからなるデータブロックが256セツト含ま
れているものとする。
In addition, the storage area specified by the tag part of the storage address in the main storage device is called a sector, and within this sector,
It is assumed that 256 sets of data blocks each consisting of 16 words are included.

キャッシュデータRAM420のキャッシュデータ格納
部421は、4ウエイのバンクからなり、各ウェイはそ
れぞれ16ワードのデータ長を持つ256セツトのエン
トリから構成され、全体として32にバイト(1ワード
を2バイトとする)の容量を持っている。キャッシュデ
ータ格納部421は、主記憶装置内における格納アドレ
スのインデックス部に対応したセットアドレスのエント
リにデータブロックを格納する。
The cache data storage section 421 of the cache data RAM 420 consists of 4-way banks, each way consisting of 256 sets of entries each having a data length of 16 words, and a total of 32 bytes (one word is 2 bytes). ) has a capacity of The cache data storage unit 421 stores the data block in the entry of the set address corresponding to the index part of the storage address in the main storage device.

各エントリに格納されたデータブロックが含まれている
セクタを指定するアドレスのタグ部は、タグ情報として
タグデータ格納部410に格納される。
A tag portion of an address specifying a sector containing a data block stored in each entry is stored in the tag data storage section 410 as tag information.

例えば、キャッシュデータ格納部421の1ウエイのセ
ットアドレス″“IFH“(H”は16進数を表す添え
字)のエントリに格納されているデータブロックのタグ
情報は、タグデータ格納部410の1ウエイのセットア
ドレス“IFH”に格納される。
For example, the tag information of the data block stored in the entry of the 1-way set address “IFH” (H is a hexadecimal subscript) in the cache data storage unit 421 is the 1-way set address in the tag data storage unit 410. is stored at the set address "IFH" of

例えばMPUがアドレス“3AIFAH”を参照した場
合、インデックス部“IFH”がタグデータ格納部41
0およびキャッシュデータ格納部421にセットアドレ
スとして入力される。
For example, when the MPU refers to the address "3AIFAH", the index section "IFH" is
0 and is input to the cache data storage section 421 as a set address.

このアドレスのインデックス部に基づいて、キャッシュ
データ格納部421の各ウェイからデータブロックAh
 、A−、A* 、A−が検索され、データセレクタ4
22に導入される。
Based on the index part of this address, data block Ah is sent from each way of the cache data storage unit 421.
, A-, A*, A- are searched and the data selector 4
It will be introduced in 22.

また同様にして、タグデータ格納部410の各ウェイか
らタグ情報“OIH”、  “’IFH”3AH”、’
“FOH″゛が検索される。
Similarly, tag information "OIH", "'IFH"3AH",'
“FOH” is searched.

このタグ情報は、それぞれ4つの比較器412a、41
2b、412c、412dにより、MPUが参照したア
ドレスのタグ部“3AH”°とを比較される。この比較
結果に基づいて、デコーダ413は例えばキャッシュデ
ータ格納部421の3ウエイを特定するヒツトコードを
生成し、このヒツトコードに基づいて、データセレクタ
422は4つのデータブロックAh、A、、Ak、AI
、の中からデータブロックAkを選択する。更に、デー
タセレクタ422は、ワードセレクト部” A H”に
基づいて、データブロックA、の中から該当する1ワー
ドのデータを選択する。
This tag information is stored in each of the four comparators 412a and 41
2b, 412c, and 412d compare the tag part "3AH" of the address referenced by the MPU. Based on this comparison result, the decoder 413 generates a hit code that specifies, for example, three ways of the cache data storage section 421, and based on this hit code, the data selector 422 selects four data blocks Ah, A, , Ak, AI.
A data block Ak is selected from among . Further, the data selector 422 selects one word of data from the data block A based on the word select section "AH".

また、オアゲート414は、4つの比較器412a〜4
12dの出力の論理和をとってヒツト信号を住成し、こ
のヒツト信号に基づいて、制御部430はヒツトキャッ
シュミスを判定する。
Further, the OR gate 414 includes four comparators 412a to 4
A hit signal is generated by ORing the outputs of 12d, and based on this hit signal, the control unit 430 determines a hit cache miss.

ヒツトの場合は、制御部430によって出力されるデー
タイネーブル信号により、データセレクタ422によっ
て選択されたデータは有効となってデータバスに出力さ
れる。
In the case of a hit, the data selected by the data selector 422 is made valid by the data enable signal outputted by the control unit 430 and outputted to the data bus.

キャッシュミスの場合は、制御部430は置き換えアル
ゴリズムに基づいて、キャッシュデータ格納部421お
よびタグデータ格納部410の内容の更新を行なう。こ
の際に、itr制御部430が出力するライト信号によ
り、それぞれタグ情報およびデータブロックの書き込み
が有効となる。
In the case of a cache miss, the control unit 430 updates the contents of the cache data storage unit 421 and the tag data storage unit 410 based on a replacement algorithm. At this time, the write signals output by the itr control unit 430 enable writing of tag information and data blocks, respectively.

上述のような4ウエイのタグデータ格納部および比較器
、デコーダなどで構成されるヒツト判定部は、1チツプ
のLSIにまとめられ、タグLSIとして発表されてい
る。
The above-mentioned 4-way tag data storage section, a comparator, a decoder, etc., and the hit determination section are combined into one chip LSI and announced as a tag LSI.

また、近年、MPUを用いたパーソナルコンピュータな
どの情報処理システムにおいてもキャッシュメモリを具
えるようになってきている。このようなシステムにおい
ては、キャッシュメモリを上述したようなタグLSIを
用いて構成することは、装置の小型化などの点で有効で
ある。
Furthermore, in recent years, information processing systems such as personal computers using MPUs have also come to be equipped with cache memories. In such a system, configuring the cache memory using the above-mentioned tag LSI is effective in reducing the size of the device.

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

ところで、該当するデータブロックがキャッシュデータ
格納部421に格納されていて、ヒツトする確率が高い
ほど、データの読み出し、書き込みの高速化が可能とな
るため、ヒツト率を高くするためにキャッシュメモリの
容量を大きくすることが望まれていた。
By the way, the higher the probability of a hit when the corresponding data block is stored in the cache data storage unit 421, the faster data can be read and written. Therefore, in order to increase the hit rate, the capacity of the cache memory is It was hoped that it would become larger.

そこで、第5図のように、上述したタグLSIとキャッ
シュデータRAMを2個ずつ用いて容量64にバイトの
キャッシュメモリを構成することが考えられる。
Therefore, as shown in FIG. 5, it is conceivable to construct a cache memory with a capacity of 64 bytes using two tag LSIs and two cache data RAMs.

ここで、図のようにアドレスの上位7ビツトをタグ部1
次の1ビツトをサブインデックス部と称する。
Here, as shown in the figure, enter the upper 7 bits of the address into tag part 1.
The next 1 bit is called the sub-index part.

導入されたアドレスのインデックス部とタグ部とに基づ
いて、タグLSI510a、510bにより生成された
ヒント信号S。+Shl+とヒツトコードC1,C,b
は、マルチプレクサ504により、サブインデックス部
に基づいて、それぞれの何れか一方が選択され、ヒツト
信号Sh、ヒツトコードCとして出力される。
A hint signal S generated by the tag LSIs 510a and 510b based on the index part and tag part of the introduced address. +Shl+ and hit code C1, C, b
are selected by the multiplexer 504 based on the sub-index portion, and output as the hit signal Sh and the hit code C.

キャッシュデータRAM520a、520bは、インデ
ックス部とヒツトコードCおよびワードセレクト部とに
基づいて、該当するlワードのデータを検索する。
The cache data RAMs 520a and 520b search for corresponding l word data based on the index section, hit code C, and word select section.

また、反転されたサブインデックス部に基づいて、タグ
LSI510aおよびキャッシュデータRAM520 
aに対する書き込みおよびキャッシュデータRAM52
0 aからのデータの出力動作が制御される。
Also, based on the inverted sub-index part, the tag LSI 510a and the cache data RAM 520
Write and cache data RAM 52 for a
The output operation of data from 0a is controlled.

タグLSI510bおよびキャッシュデータRAM52
0 bは、サブインデックス部に基づいて、同様に制御
される。
Tag LSI 510b and cache data RAM 52
0b is similarly controlled based on the sub-index portion.

ところで、上述した方式においては、サブインデックス
部のビット情報がタグ情報に含まれていないので、2つ
のタグLSIにおいて同時にヒツトと判定される可能性
がある。従って、サブインデックス部のビット情報に基
づいて、2つのタグLSrから出力されるヒツト信号お
よびヒツトコードをマルチプレクサで選択する必要があ
る。
By the way, in the above-described method, since the bit information of the sub-index part is not included in the tag information, there is a possibility that two tag LSIs will be determined to be hits at the same time. Therefore, it is necessary to use a multiplexer to select the hit signal and hit code output from the two tags LSr based on the bit information in the sub-index section.

このため、ハードウェアの構成が複雑になり、また、マ
ルチプレクサによるデイレイが生じるため、キャッシュ
メモリの動作が遅くなるという欠点を有する。
As a result, the hardware configuration becomes complicated, and a delay occurs due to the multiplexer, resulting in a disadvantage that the operation of the cache memory becomes slow.

本発明は、このような点にかんがみて創作されたもので
あり、ハードウェアの構成が簡単で、容量の大きいキャ
ッシュメモリを提供することを目的としている。
The present invention was created in view of these points, and an object of the present invention is to provide a cache memory with a simple hardware configuration and a large capacity.

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

第1図は、本発明のキャッシュメモリの原理ブロック図
である。
FIG. 1 is a basic block diagram of a cache memory according to the present invention.

図において、複数のデータ格納手段111は、データブ
ロックを主記憶装置における格納アドレスに対応した格
納場所に格納する。
In the figure, a plurality of data storage means 111 stores data blocks in storage locations corresponding to storage addresses in the main storage device.

検索制御手段120は、複数のデータ格納手段111の
それぞれに対応して設けられ、格納アドレスの一部を第
1タグ情報として格納するタグ情報格納領域121を有
し、この第1タグ情報と処理装置が主記憶装置の該当M
域を指定するために出力する指定アドレスの一部である
第2タグ情報とに基づいてデータ格納手段111に格納
されたデータブロックの検索動作を制御する。
The search control means 120 is provided corresponding to each of the plurality of data storage means 111, and has a tag information storage area 121 that stores a part of the storage address as first tag information, and has a tag information storage area 121 that stores a part of the storage address as first tag information. Applicable M where the device is the main storage device
The search operation for the data block stored in the data storage means 111 is controlled based on the second tag information that is part of the specified address output to specify the area.

選択手段131は、第2タグ情報の一部に基づいて、複
数のデータ格納手段111と複数の検索制御手段120
の何れか1つずつを選択する。
The selection means 131 selects the plurality of data storage means 111 and the plurality of search control means 120 based on a part of the second tag information.
Select one of the following.

従って、全体として、選択手段131によって選択され
たデータ格納手段111に対する読み出しおよび書き込
みが有効となるように構成する。
Therefore, as a whole, the configuration is such that reading and writing to the data storage means 111 selected by the selection means 131 is valid.

〔作 用〕 選択手段131により、第2タグ情報の一部に基づいて
、検索制御手段120とこれに対応するデータ格納手段
111が選択される。
[Operation] The selection means 131 selects the search control means 120 and the corresponding data storage means 111 based on part of the second tag information.

これにより、選択されたデータ格納手段111に対する
データブロックの読み出しが有効となり、対応する検索
制御手段120による制御に基づいて、該当するデータ
ブロックが検索されて出力される。
As a result, data block reading from the selected data storage means 111 is enabled, and the corresponding data block is searched and output under control by the corresponding search control means 120.

また、該当するデータブロックが選択されたデータ格納
手段111に格納されていない場合は、このデータ格納
手段111に対する書き込みが有効となる。
Furthermore, if the corresponding data block is not stored in the selected data storage means 111, writing to this data storage means 111 is valid.

本発明にあっては、第2タグ情報の一部に基づいて、選
択手段131により複数の検索制御手段120およびデ
ータ格納手段111から何れか一つが選択されるため、
複数のデータ格納手段111にデータを分けて格納する
ことが可能となる。
In the present invention, since one of the plurality of search control means 120 and data storage means 111 is selected by the selection means 131 based on a part of the second tag information,
It becomes possible to store data separately in a plurality of data storage means 111.

検索制御手段120は、タグLSr220に相当する。The search control means 120 corresponds to the tag LSr 220.

タグ情報格納領域121は、タグデータ格納部221に
相当する。
The tag information storage area 121 corresponds to the tag data storage section 221.

選択手段131は、インパーク231に相当する。The selection means 131 corresponds to the impark 231.

以上のような対応関係があるものとして、以下本発明の
実施例について説明する。
Examples of the present invention will be described below assuming that the correspondence relationship as described above exists.

〔実施例〕〔Example〕

以下、図面に基づいて本発明の実施例について詳細に説
明する。
Hereinafter, embodiments of the present invention will be described in detail based on the drawings.

第2図は、本発明の一実施例によるキャッシュメモリを
用いた情報処理システムの構成を示す。
FIG. 2 shows the configuration of an information processing system using a cache memory according to an embodiment of the present invention.

■    と 1 との ここで、本発明の実施例と第1図との対応関係を示して
おく。
Here, the correspondence between the embodiment of the present invention and FIG. 1 will be shown.

データ格納手段111は、キャッシュデータRAM21
0に相当する。
The data storage means 111 is a cache data RAM 21
Corresponds to 0.

第2図において、情報処理システムは、情報処理を行な
うCPU201と、データの読み出し。
In FIG. 2, the information processing system includes a CPU 201 that performs information processing and a CPU 201 that reads data.

書き込みを制御するメモリコントローラを有し、データ
を蓄積する主記憶装置202と、CPU201と主記憶
装置202との間のデータの授受を制御するメモリコン
トロ−ラ203と、所定量のデータを格納するキャッシ
ュメモリ200と、入出力コントローラを有する、例え
ばプリンタなどの入出力装置のためのアダプタ204と
、CPU2O5とアダプタ204との間のデータの授受
を制御するシステムバスコントローラ205とで構成さ
れている。
A main storage device 202 that has a memory controller that controls writing and stores data, a memory controller 203 that controls data exchange between the CPU 201 and the main storage device 202, and stores a predetermined amount of data. It is composed of a cache memory 200, an adapter 204 for an input/output device such as a printer, which has an input/output controller, and a system bus controller 205 that controls data exchange between the CPU 205 and the adapter 204.

ここで、CP[J201が扱うアドレス空間は20ビツ
トであるとし、上位ビットから8ビツトをタグ部1次の
8ビツトをインデックス部、下位の4ビツトをワードセ
レクト部と称する。また、タグ部のうち下位の1ビツト
をサブインデックスと称する。
Here, it is assumed that the address space handled by CP[J201 is 20 bits, and the upper 8 bits are called a tag part, the first 8 bits are called an index part, and the lower 4 bits are called a word select part. Furthermore, the lower 1 bit of the tag part is called a sub-index.

11  キャッシュメモリの 第3図は、実施例によるキャッシュメモリ200の構成
図である。
11 Cache Memory FIG. 3 is a configuration diagram of the cache memory 200 according to the embodiment.

図において、キャッシュメモリ200は、それぞれ32
にバイトの容量を持つ2つのキャッシュデータRAM2
10a、210bと、それぞれキャッシュデータRAM
210a、210bに対応する2つのタグLSI220
a、220bと、インバータ231と、オアゲート23
2と、アンドゲート233a、233b、234a、2
34bと、ヒツト信号に基づいてキャッシュデータRA
M210a、210bおよびタグLS[220a。
In the figure, each cache memory 200 has 32
Two cache data RAMs 2 with a capacity of bytes
10a, 210b and cache data RAM, respectively.
Two tag LSIs 220 corresponding to 210a and 210b
a, 220b, inverter 231, and OR gate 23
2, and gates 233a, 233b, 234a, 2
34b and the cache data RA based on the hit signal.
M210a, 210b and tag LS [220a.

220bを制御するキャッシュ制御部230とで構成さ
れている。
220b.

キャッシュデータRAM210a、210bは、それぞ
れ16ワードのデータ長を持つデータブロックを、主記
憶装置202における格納アドレスのインデックス部に
対応したセットアドルスで示される格納場所(エントリ
)に格納している。キャッシュデータRAM210a、
210bはそれぞれ256エントリ×4ウエイから成っ
ている。
The cache data RAMs 210a and 210b each store a data block having a data length of 16 words in a storage location (entry) indicated by a set address corresponding to the index part of the storage address in the main storage device 202. cache data RAM 210a,
210b each consists of 256 entries x 4 ways.

キャッシュデータRAM210a、210bは、インデ
ックス部とヒツトコードおよびワードセレクト部に基づ
いて1ワードのデータを検索し、出力制御端子Seへの
入力が“1゛°のとき、検索されたデータをデータバス
に出力し、また、ライト制御端子Swへの人力が“1゛
′のときに、書き込みが有効となるように構成されてい
る。
The cache data RAMs 210a and 210b search for one word of data based on the index section, hit code, and word select section, and output the searched data to the data bus when the input to the output control terminal Se is "1". Furthermore, the configuration is such that writing becomes valid when the human power applied to the write control terminal Sw is "1".

タグLSI220aは、キャッシュデータRAM210
aの各エントリに対応してタグ情報を格納するタグデー
タ格納部221aと、タグ情報と参照されたアドレスの
タグ部とに基づいてヒツト信号SaとヒツトコードCa
を生成する判定部222aとで構成されている。
The tag LSI 220a is the cache data RAM 210
A tag data storage unit 221a stores tag information corresponding to each entry of a, and a hit signal Sa and a hit code Ca are generated based on the tag information and the tag part of the referenced address.
and a determination unit 222a that generates.

タグLSI220bは、タグLSI220aと同様にタ
グデータ格納部221bと、ヒ・2ト信号sbとヒツト
コードcbを生成する判定部222bとで構成されてい
る。
Like the tag LSI 220a, the tag LSI 220b includes a tag data storage section 221b and a determination section 222b that generates a hit signal sb and a hit code cb.

タグLSI220a、220bは、それぞれのライト制
御端子Swへの入力が“1″のときに、書き込みが有効
となるように構成されている。
The tag LSIs 220a and 220b are configured such that writing is enabled when the input to each write control terminal Sw is "1".

判定部222a、222bにより生成されるヒツト信号
Sa、Sbは、それぞれキャッシュデータRAM210
a、210bに該当するデータブロックが格納されてい
るか否かを示している。
The hit signals Sa and Sb generated by the determination units 222a and 222b are sent to the cache data RAM 210, respectively.
It shows whether or not the corresponding data block is stored in a and 210b.

ヒツトコードCa、Cbは、それぞれキャッシュデータ
RAM210a、210bのどのウェイに該当するデー
タブロックが格納されているかを示している。
The hit codes Ca and Cb indicate which way of the cache data RAMs 210a and 210b, respectively, the corresponding data block is stored.

タグLSI220a、220bから出力されるヒツト信
号Saおよびヒツト信号sbはオアゲート232に導入
され、オアゲート232の出力はヒツト信号としてキャ
ッシュ制御部230に入力されている。
The hit signal Sa and the hit signal sb output from the tag LSIs 220a and 220b are introduced into an OR gate 232, and the output of the OR gate 232 is input as a hit signal to the cache control unit 230.

キャッシュ制御部230が出力するライト信号Dwは、
アンドゲート233aおよびアンドゲート233bのそ
れぞれの入力端子の一方に導入されている。
The write signal Dw output by the cache control unit 230 is
It is introduced into one of the input terminals of each of AND gate 233a and AND gate 233b.

また、アンドゲート233aの入力端子の他方には、イ
ンバータ231を介してアドレスのサブインデックス部
が導入されており、アンドゲート233aの出力はタグ
LSI220aおよびキャッシュデータRAM210a
のライト制御端子SWに接続されている。
Further, an address sub-index part is introduced to the other input terminal of the AND gate 233a via an inverter 231, and the output of the AND gate 233a is connected to the tag LSI 220a and the cache data RAM 210a.
It is connected to the light control terminal SW of.

一方、アントゲ−1−233bの入力端子の他方には、
このサブインデックス部がそのまま導入されており、ア
ンドゲート233bの出力はタグLSI220bおよび
キャッシュデータRAM210bのライト制御端子Sw
に接続されている。
On the other hand, the other input terminal of Antogame 1-233b has
This sub-index section is introduced as is, and the output of the AND gate 233b is the write control terminal Sw of the tag LSI 220b and the cache data RAM 210b.
It is connected to the.

また、キャッシュ制御部230が出力するデータイネー
ブル信号Deは、アンドゲート234aおよびアントゲ
−1−234bのそれぞれの入力端子の一方に導入され
ている。
Further, the data enable signal De outputted by the cache control unit 230 is introduced into one of the input terminals of each of the AND gate 234a and the AND gate 1-234b.

アンドゲート234aの入力端子の他方には、インバー
タ231の出力が導入されており、アンドゲート234
aの出力端子はキャッシュデータRAM210aの出力
制御端子Seに接続されている。
The output of the inverter 231 is introduced into the other input terminal of the AND gate 234a.
The output terminal of a is connected to the output control terminal Se of the cache data RAM 210a.

アンドゲート234bの入力端子の他方には、サブイン
デックス部が導入されており、アンドゲート234bの
出力端子はキャッシュデータRAM210 bの出力制
御端子Seに接続されている。
A sub-index section is introduced to the other input terminal of the AND gate 234b, and the output terminal of the AND gate 234b is connected to the output control terminal Se of the cache data RAM 210b.

ニーJO組ルλ仇作 以下、第2図、第3図を参照して、実施例の動作をヒツ
トの場合とキャッシュミスの場合とに分けて説明する。
Below, referring to FIGS. 2 and 3, the operation of the embodiment will be explained separately in the case of a hit and the case of a cache miss.

(i ヒツトの土”入 例えば、CPU201が主記憶装置202内の格納アド
レス゛5CIFAH”のデータをアクセスすると、アド
レスのインデックス部“’IPH”に基づいて、タグデ
ータ格納部221aおよびタグデータ格納部221bか
らそれぞれタグ情報が検索される。
For example, when the CPU 201 accesses the data at the storage address "5CIFAH" in the main memory 202, the tag data storage section 221a and the tag data storage section 221b are Tag information is searched for each.

判定部222aおよび判定部222bは、検索されたタ
グ情報とアドレスのタグ部” 5 CH″”に基づいて
、それぞれキャッシュデータRAM210a、210b
に該当するデータブロックがあるか否かを判定する。
The determining unit 222a and the determining unit 222b select the cache data RAMs 210a and 210b, respectively, based on the retrieved tag information and the tag part "5 CH" of the address.
Determine whether there is a corresponding data block.

例えば、判定部222aがキャッシュデータRAM21
0aの3ウエイに該当するデータブロックがあると判定
した場合は、ヒツト信号Saとして“1″゛を出力し、
キャッシュデータRAM210aの3ウエイを指定する
ヒツトコードCaを出力する。キャッシュデータRAM
210 aは、このヒツトコードCaとアドレスのイン
デックス部およびワードセレクト部゛AH″°とに基づ
いて、該当する1ワードのデータを検索する。
For example, the determination unit 222a uses the cache data RAM 21
If it is determined that there is a data block corresponding to the 3-way of 0a, "1" is output as the hit signal Sa,
A hit code Ca specifying the 3-way of the cache data RAM 210a is output. cache data RAM
210a searches for one corresponding word of data based on the hit code Ca, the address index section, and the word select section "AH"°.

一方、タグデータ格納部221bは、キャッシュデータ
RAM210 bには8亥当するデータブロックはない
と判定し、ヒツト信号sbとして“0パを出力する。
On the other hand, the tag data storage section 221b determines that there is no data block corresponding to 8 in the cache data RAM 210b, and outputs "0pa" as the hit signal sb.

ヒツト信号Saとヒツト信号sbが導入されると、オア
ゲート232はヒツト信号として1”′を出力する。
When the hit signal Sa and the hit signal sb are introduced, the OR gate 232 outputs 1'' as the hit signal.

キャッシュ制御部230は、このヒツト信号に基づいて
ヒツトであると判定し、データイネーブル信号Seとし
て“工゛を出力する。
The cache control unit 230 determines that it is a hit based on this hit signal, and outputs "work" as the data enable signal Se.

ここで、サブインデックス部をインバータ231によっ
て反転すると“1°゛となるので、アントゲ−)234
aの出力は′1“°となる。これにより、キャッシュデ
ータRAM210aにより検索されたデータは存効とな
り、データバスに出力される。
Here, when the sub-index part is inverted by the inverter 231, it becomes "1°", so the ant game) 234
The output of a becomes '1''. As a result, the data retrieved by the cache data RAM 210a becomes valid and is output to the data bus.

ii  キャッシュミスの 入 例えば、CPU201が主記憶装置202内の格納アド
レス“3D5FOR’”のデータをアクセスしたとき、
判定部222a、222bの両方により、キャッシュデ
ータRAM210a、210bの何れにも該当するデー
タブロックがないと判定された場合は、ヒツト信号は“
0″″となり、キャッシュ制御部230はキャッシュミ
スと判定する。
ii For example, when the CPU 201 accesses data at the storage address "3D5FOR'" in the main storage device 202,
If both the determination units 222a and 222b determine that there is no corresponding data block in either cache data RAM 210a or 210b, the hit signal is “
0″″, and the cache control unit 230 determines that there is a cache miss.

このとき、キャッシュ制御部230は、置き換えアルゴ
リズムに基づいて、キャッシュデータの更新を行なうか
否かを判断し、更新を行なう場合はライト信号Dwとし
て′1′′を出力する。
At this time, the cache control unit 230 determines whether or not to update the cache data based on the replacement algorithm, and when updating, outputs '1'' as the write signal Dw.

この場合は、サブインデックス部は1″゛であるので、
アントゲ−1−233bの出力゛′1゛がキャッシュデ
ータRAM210 bおよびタグLSI220bのライ
ト制御端子Swに入力され、これらに対する内容の書き
換えが可能となる。
In this case, the sub-index part is 1″, so
The output ``'1'' of the anime game 1-233b is input to the cache data RAM 210b and the write control terminal Sw of the tag LSI 220b, making it possible to rewrite the contents thereof.

キャッシュ制御部230は、CPU201に対して主記
憶装置202から格納アドレス” 3 D 5FOR”
′のデータを含むデータブロックの読み出しを要求し、
これにより、キャッシュデータRAM210bにこのデ
ータブロックが書き込まれ、タグデータ格納部221b
にタグ情報“3DH””が書き込まれる。
The cache control unit 230 sends a storage address “3D 5FOR” from the main storage device 202 to the CPU 201.
request to read the data block containing data ′,
As a result, this data block is written to the cache data RAM 210b, and the tag data storage section 221b
The tag information “3DH” is written in.

一方、キャッシュデータRAM210 aおよびタグL
SI220aのライト制御端子Swには、アンドゲート
233aの出力“′0°゛が入力されるので、これらに
対する内容の書き込みは許可されない。
On the other hand, cache data RAM 210 a and tag L
Since the output "'0°" of the AND gate 233a is input to the write control terminal Sw of the SI 220a, writing of contents to these is not permitted.

このようにして、主記憶装置202における格納アドレ
スのサブインデックス部が“0°′であるようなセクタ
に含まれるデータブロックは、キャッシュデータRAM
210aに書き込まれ、そのタグ情報はタグLSI22
0aに書き込まれる。
In this way, a data block included in a sector in which the sub-index part of the storage address in the main storage device 202 is "0°" is stored in the cache data RAM.
210a, and the tag information is written to the tag LSI 22.
Written to 0a.

一方、サブインデックス部が“′1″゛であるようなセ
クタに含まれるデータブロックはキャッシュデー・りR
AM210 bに書き込まれ、そのタグ情報はタグLS
I220bに書き込まれる。
On the other hand, the data block included in the sector whose sub-index part is "'1"" is cache data R.
AM210b is written, and the tag information is written to the tag LS.
Written to I220b.

■、−1のまとめ 上述のようにして、アドレスのタグ部およびタグLSI
220a、220bのタグデータ格納部221a、22
1bに格納するタグ情報にサブインデックス部のビット
情報を含める。このタグ部とタグ情報とに基づいて、判
定部222a、222bは、それぞれキャッシュデータ
RAM210a、210bに3亥当するデータブロック
があるか否かを判定する。
■Summary of -1 As described above, address tag part and tag LSI
Tag data storage units 221a and 220a and 220b
The bit information of the sub-index part is included in the tag information stored in 1b. Based on the tag part and the tag information, the determination units 222a and 222b determine whether or not there are three matching data blocks in the cache data RAMs 210a and 210b, respectively.

従って、言亥当するデータブロックがキャッシュデータ
RAM210a、210bのどちらかに格納されている
か否かは、タグLSI220a、220bが出力するヒ
ツト信号Sa、Sbの論理和をとることにより、判定す
ることができる。
Therefore, whether or not the relevant data block is stored in either of the cache data RAMs 210a and 210b can be determined by calculating the logical sum of the hit signals Sa and Sb output from the tag LSIs 220a and 220b. can.

また、キャッシュデータの更新を行なう際に制御部23
0が出力するライト信号Dwとナブインデックス部の論
理積がキャッシュデータRAM210bとタグLSI2
20bのライト制御端子SWに入力され、ライト信号D
wと反転されたサブインデックス部の論理積がキャッシ
ュデータRAM210aとタグLSI220aのライト
制御端子Swに入力される。
Also, when updating cache data, the control unit 23
The AND of the write signal Dw output by 0 and the nab index section is the cache data RAM 210b and the tag LSI 2.
The write signal D is input to the write control terminal SW of 20b.
The AND of w and the inverted sub-index portion is input to the write control terminal Sw of the cache data RAM 210a and the tag LSI 220a.

これにより、その格納アドレスのサブインデックス部の
ビット情報に基づいて、キャッシュデータRAM210
a、210bの何れか一方およびタグLSI220a、
220bの何れか一方を選択し、それぞれの内容を更新
することができる。
As a result, based on the bit information of the sub-index part of the storage address, the cache data RAM 210
a, 210b and the tag LSI 220a,
220b can be selected and the contents of each can be updated.

このような構成のキャッシュメモリにおいては、2つの
タグLSI220a、220bから出力されるヒツト信
号およびヒツトコードをマルチプレクサを用いて切り換
える必要がないので、ハードウェア構成も簡単となり、
容量を増やすことが可能となる。
In the cache memory having such a configuration, there is no need to use a multiplexer to switch the hit signal and hit code output from the two tag LSIs 220a and 220b, so the hardware configuration is also simple.
It becomes possible to increase the capacity.

また、マルチプレクサのような遅延を生しる素子を用い
ないので、キャッシュメモリの動作を高速とする効果も
ある。
Furthermore, since elements such as multiplexers that cause delays are not used, the cache memory can operate at high speed.

■、 口の・ンU なお、上述した本発明の実施例にあっては、2つのタグ
LSIと2つのキャッシュデータ格納部を組み合わせて
、2倍の容量のキャッシュメモリを構成する場合を考え
たが、2つに限らず、複数のタグLSIと複数のキャッ
シュデータ格納部をアドレスに基づいて選択するもので
あれば適用できる。
In the embodiment of the present invention described above, a case was considered in which two tag LSIs and two cache data storage units were combined to configure a cache memory with twice the capacity. However, the present invention is not limited to two, and can be applied as long as a plurality of tag LSIs and a plurality of cache data storage sections are selected based on addresses.

更に、rl、実施例と第1図との対応関係」において、
本発明と実施例との対応関係を説明しておいたが、これ
に限られることはなく、本発明には各種の変形態様があ
ることは当業者であれば容易に推考できるであろう。
Furthermore, in ``correspondence between examples and FIG. 1'',
Although the correspondence between the present invention and the embodiments has been described, those skilled in the art will easily assume that the present invention is not limited to this and that there are various modifications.

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

上述したように、本発明によれば、第2タグ情報の一部
に基づいて、複数のデータ格納手段および検索制御手段
の何れか1つが選択され、選択されたデータ格納手段に
対する読み出し、書き込みが有効となる。
As described above, according to the present invention, one of the plurality of data storage means and search control means is selected based on a part of the second tag information, and reading and writing to the selected data storage means is performed. It becomes effective.

従って、複数のデータ格納手段に分けてデータを格納す
ることができ、キャッシュメモリの容量を大きくするこ
とができ、また、ハードウェア構成を簡単とすることが
できるので、実用的には極めて有用である。
Therefore, data can be stored in multiple data storage means, the cache memory capacity can be increased, and the hardware configuration can be simplified, making it extremely useful in practice. be.

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

第1図は本発明のキャッシュメモリの原理ブロック図、 第2図は本発明の一実施例によるキャッシュメモリを用
いた情報処理システムの構成図、第3図は本発明の一実
施例によるキャッシュメモリの構成図、 第4図は4ウ工イセツトアソシアテイブ方式を用いたキ
ャッシュメモリの構成図、 第5図は容164にバイトのキャッシュメモリの構成図
である。 2は判定部、 0はキャッシュ制御部、 1はインバータ、 2はオアゲート、 3.234はアンドゲートである。 図において、 111はデータ格納手段、 120は検索制御手段、 121はタグ情報格納領域、 131は選択手段、 132はヒツト判定手段、 200はキャッシュメモリ、 201はCPU、 202は主記憶装置、 210はキャッシュデータ格納部、 220はタグLSI、 221はタグデータ格納部、 【カヒ例θ禰へ品 第3図
FIG. 1 is a principle block diagram of a cache memory according to the present invention, FIG. 2 is a configuration diagram of an information processing system using a cache memory according to an embodiment of the present invention, and FIG. 3 is a cache memory according to an embodiment of the present invention. FIG. 4 is a block diagram of a cache memory using a 4-way set associative method, and FIG. 5 is a block diagram of a cache memory with a capacity of 164 bytes. 2 is a determination unit, 0 is a cache control unit, 1 is an inverter, 2 is an OR gate, and 3.234 is an AND gate. In the figure, 111 is a data storage means, 120 is a search control means, 121 is a tag information storage area, 131 is a selection means, 132 is a hit determination means, 200 is a cache memory, 201 is a CPU, 202 is a main storage device, 210 is a Cache data storage unit, 220 is a tag LSI, 221 is a tag data storage unit,

Claims (1)

【特許請求の範囲】[Claims] (1)データブロックを主記憶装置における格納アドレ
スに対応した格納場所に格納する複数のデータ格納手段
(111)と、 前記複数のデータ格納手段(111)のそれぞれに対応
して設けられ、前記格納アドレスの一部を第1タグ情報
として格納するタグ情報格納領域(121)を有し、こ
の第1タグ情報と処理装置が前記主記憶装置の該当領域
を指定するために出力する指定アドレスの一部である第
2タグ情報とに基づいて前記データ格納手段(111)
に格納されたデータブロックの検索動作を制御する検索
制御手段(120)と、 前記第2タグ情報の一部に基づいて、前記複数のデータ
格納手段(111)と前記複数の検索制御手段(120
)の何れか1つずつを選択する選択手段(131)と、 を備え、前記選択手段(131)によって選択された前
記データ格納手段(111)に対する読み出しおよび書
き込みが有効となるように構成したことを特徴とするキ
ャッシュメモリ。
(1) A plurality of data storage means (111) for storing data blocks in storage locations corresponding to storage addresses in the main memory; It has a tag information storage area (121) in which a part of the address is stored as first tag information, and this first tag information and one of the designated addresses output by the processing device to designate the corresponding area of the main storage device. the data storage means (111) based on the second tag information which is the section;
a search control means (120) for controlling the search operation of the data blocks stored in the data storage means (111) and the plurality of search control means (120) based on a part of the second tag information;
), and the data storage means (111) selected by the selection means (131) is configured to be valid for reading and writing to the data storage means (111). A cache memory featuring:
JP63221559A 1988-09-05 1988-09-05 Cache memory Expired - Fee Related JPH071483B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63221559A JPH071483B2 (en) 1988-09-05 1988-09-05 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63221559A JPH071483B2 (en) 1988-09-05 1988-09-05 Cache memory

Publications (2)

Publication Number Publication Date
JPH0268640A true JPH0268640A (en) 1990-03-08
JPH071483B2 JPH071483B2 (en) 1995-01-11

Family

ID=16768626

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63221559A Expired - Fee Related JPH071483B2 (en) 1988-09-05 1988-09-05 Cache memory

Country Status (1)

Country Link
JP (1) JPH071483B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS558628A (en) * 1978-06-30 1980-01-22 Fujitsu Ltd Data processing system
JPS62194562A (en) * 1985-10-09 1987-08-27 Fujitsu Ltd Cache memory system
JPS638848A (en) * 1986-06-27 1988-01-14 Yokogawa Hewlett Packard Ltd Cache tag look-aside

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS558628A (en) * 1978-06-30 1980-01-22 Fujitsu Ltd Data processing system
JPS62194562A (en) * 1985-10-09 1987-08-27 Fujitsu Ltd Cache memory system
JPS638848A (en) * 1986-06-27 1988-01-14 Yokogawa Hewlett Packard Ltd Cache tag look-aside

Also Published As

Publication number Publication date
JPH071483B2 (en) 1995-01-11

Similar Documents

Publication Publication Date Title
US6389507B1 (en) Memory device search system and method
US5058003A (en) Virtual storage dynamic address translation mechanism for multiple-sized pages
US5689679A (en) Memory system and method for selective multi-level caching using a cache level code
JP3169155B2 (en) Circuit for caching information
US3800292A (en) Variable masking for segmented memory
US4057848A (en) Address translation system
KR930022222A (en) Apparatus and method for providing multiple outstanding operations in a multiprocessor computer system with a consistent cache
US5548739A (en) Method and apparatus for rapidly retrieving data from a physically addressed data storage structure using address page crossing predictive annotations
US6571316B1 (en) Cache memory array for multiple address spaces
JP3093807B2 (en) cache
US6745291B1 (en) High speed LRU line replacement system for cache memories
EP0706131A2 (en) Method and system for efficient miss sequence cache line allocation
JP2003044352A (en) Data processor
JPH08101797A (en) Translation lookaside buffer
JP3449487B2 (en) Conversion index buffer mechanism
JP2681398B2 (en) Storage device
RU2237278C2 (en) Condition bytes for cash memory
JPH0786848B2 (en) Cache memory
JPH11345168A (en) Method and system for accessing cache memory in data processing system
JPH0268640A (en) Cache memory
US5510973A (en) Buffer storage control system
KR100517765B1 (en) Cache memory and control method thereof
JPH035851A (en) Buffer storage device
JP3078303B2 (en) Cache memory control circuit
JPS63201850A (en) On chip cash memory

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees