JPH086857A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH086857A
JPH086857A JP6135396A JP13539694A JPH086857A JP H086857 A JPH086857 A JP H086857A JP 6135396 A JP6135396 A JP 6135396A JP 13539694 A JP13539694 A JP 13539694A JP H086857 A JPH086857 A JP H086857A
Authority
JP
Japan
Prior art keywords
memory
data
tag
address
bit
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
JP6135396A
Other languages
Japanese (ja)
Inventor
Kiyoshi Nakakimura
清 中木村
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 JP6135396A priority Critical patent/JPH086857A/en
Publication of JPH086857A publication Critical patent/JPH086857A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the yield by dividing a tag memory into an (a)-bit memory part for storing the high-order (a) bits of (n) bits of a tag address and a (b)-bit memory part for storing the low-order (b) bits, and providing the single (a)-bit memory part in common to all entries. CONSTITUTION:The cache memory is constituted by dividing the tag memory 9 into the 17-bit memory part 9a and 3-bit memory part 9b, and the single 17-bit memory part 9a is provided in common to all the entries of a data memory 7. Then the high-order 17 bits of the tag address 1a of data which are cached first are stored in the 17-bit memory part 9a of the tag memory 9 and only data having matching high-order 17 bits of the tag address 1a can be cached thereafter. Consequently, the contents of the 17-bit memory 9a are fixed to the high-order 17 bits unless all the data in the data memory 7 are made ineffective, and data can be cached only when the 17 bits match.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、使用したデータを、そ
のアドレスとともに記憶しておき、同アドレスのデータ
が再び必要になった場合は該当するデータが読出される
キャッシュメモリに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory in which used data is stored together with its address, and when the data at the same address is needed again, the corresponding data is read out.

【0002】[0002]

【従来の技術】情報処理システムは、一般に主記憶装置
より逐次データを読出し制御部へ供給してデータ処理を
実行するが、主記憶装置はアクセス速度が遅く、データ
の処理速度を減速させることになる。そこで、既に使用
したデータを、そのアドレスとともに主記憶装置よりも
高速動作するメモリに記憶しておくことによって、再び
同アドレスのデータが必要になったときには該当するデ
ータを迅速に制御部へ読出すことにより、情報処理シス
テムのデータ処理を高速化することが可能となる。そこ
で、複数のデータと、その夫々のデータのアドレスとを
記憶しておくためにキャッシュメモリが使用されてい
る。
2. Description of the Related Art Generally, an information processing system sequentially reads data from a main storage device and supplies the data to a control unit to perform data processing. However, the main storage device has a slow access speed, and the data processing speed is slowed down. Become. Therefore, by storing already used data together with the address in a memory that operates faster than the main storage device, when the data at the same address is needed again, the corresponding data can be quickly read to the control unit. As a result, the data processing of the information processing system can be speeded up. Therefore, a cache memory is used to store a plurality of data and the address of each data.

【0003】図4は一般に使用されている従来のキャッ
シュメモリの要部構成を示すブロック図である。なお、
実際のキャッシュメモリでは、他にも種々の制御回路を
必要とするが、図4では便宜上省略して示している。図
示していないマイクロ・プロセッシング・ユニット(以
下MPU という) における所定データのアドレス1はアド
レス1の中の上位20ビットのタグアドレス1a及びアドレ
ス1の中のタグアドレス1aに続く下位8ビットのエント
リアドレス1bからなる。エントリアドレス1bはエントリ
アドレス1bをキャッシュメモリ中の実際のエントリを指
定する信号に変換するエントリデコーダ2へ入力され
る。
FIG. 4 is a block diagram showing a main structure of a conventional cache memory which is generally used. In addition,
Although an actual cache memory requires various control circuits in addition to them, they are omitted in FIG. 4 for convenience. The address 1 of the predetermined data in a micro processing unit (hereinafter referred to as MPU) (not shown) is the tag address 1a of the upper 20 bits in the address 1 and the entry address of the lower 8 bits following the tag address 1a in the address 1. It consists of 1b. The entry address 1b is input to the entry decoder 2 which converts the entry address 1b into a signal designating an actual entry in the cache memory.

【0004】20ビットのタグアドレス1aは20ビット×25
6 エントリの記憶容量を有する比較機能付タグメモリ3
へ入力される。エントリアドレスをエントリデコーダ2
でデコードした結果、指定されるエントリ指定信号は1
ビット×256 エントリのバリッドビット4及びデータ書
込み読出し回路6及びタグメモリ3,データメモリ7へ
入力される。比較機能付タグメモリ3において、記憶し
ているタグアドレスと、入力されたタグアドレスとを比
較した比較結果と、バリッドビット4の値とによりヒッ
ト信号生成部5でヒット信号を生成し、ヒット信号生成
部5から出力されるヒット信号HTはヒット信号HTの値に
よりデータの読出しを制御する制御部8へ入力される。
The 20-bit tag address 1a is 20 bits × 25
Tag memory with comparison function with a storage capacity of 6 entries 3
Is input to. Entry address to entry decoder 2
As a result of decoding by, the entry designation signal designated is 1
It is input to the valid bit 4 of bit × 256 entries, the data write / read circuit 6, the tag memory 3 and the data memory 7. In the tag memory 3 with the comparison function, the hit signal is generated in the hit signal generation unit 5 based on the comparison result of the stored tag address and the input tag address and the value of the valid bit 4, and the hit signal is generated. The hit signal HT output from the generation unit 5 is input to the control unit 8 which controls the reading of data according to the value of the hit signal HT.

【0005】データ書込み読出し回路6により 256エン
トリの記憶容量を有するデータメモリ7に対して、デー
タの書込み、読出しをできるようになっている。データ
書込み読出し回路6にはデータメモリ7へ書込むべきデ
ータDTW が入力され、データメモリ7から読出したデー
タDTR は制御部8を介して読出されるようになってい
る。
The data write / read circuit 6 can write / read data to / from the data memory 7 having a storage capacity of 256 entries. The data writing and reading circuit 6 is input data DT W to be written to the data memory 7, the data DT R read out from the data memory 7 is adapted to be read through the control unit 8.

【0006】次にこのキャッシュメモリの動作を説明す
る。キャッシュメモリへのデータの書込み時には、8ビ
ットのエントリアドレス1bをエントリデコーダ2により
デコードした結果、指定されるエントリに対して、デー
タメモリ7にはデータ書込み読出し回路6を介してデー
タDTW が書込まれ、タグメモリ3にはタグアドレス1aが
書込まれる。またデータ読出し時にはエントリアドレス
1bをエントリデコーダ2によりデコードした結果、指定
されるエントリに対して、バリッドビット4によるデー
タの有効, 無効の判定及びタグアドレス1aとタグメモリ
3内のデータ、つまり既に使用したデータのタグアドレ
スとの比較を行ない、その比較結果が有効であって、且
つタグアドレス1aが一致すれば、ヒット信号生成部5で
生成されるヒット信号HTがアクティブとなって制御部8
へ与えられて、データ書込み読出し回路6により読出さ
れたデータDTR が制御部8を介して外部へ読出される。
Next, the operation of the cache memory will be described. At the time of writing data to the cache memory, as a result of decoding the 8-bit entry address 1b by the entry decoder 2, data DT W is written to the data memory 7 via the data write / read circuit 6 for the specified entry. Then, the tag address 1a is written in the tag memory 3. When reading data, the entry address
As a result of decoding 1b by the entry decoder 2, the valid / invalid judgment of the data by the valid bit 4 and the tag address 1a and the data in the tag memory 3, that is, the tag address of the data already used, are determined for the specified entry. If the comparison result is valid and the tag address 1a matches, the hit signal HT generated by the hit signal generation unit 5 becomes active and the control unit 8
Given the readout data DT R is read out to the outside through the control unit 8 by the data writing and reading circuit 6.

【0007】このように従来のキャッシュメモリは、過
去に使用されたデータを記憶しておくためのデータメモ
リ7に対応して、それと同エントリ数のタグアドレス1a
の20ビットを全て記憶するためのタグメモリ3を備えて
いる。
As described above, the conventional cache memory corresponds to the data memory 7 for storing the data used in the past and has the same number of tag addresses 1a as the number of entries.
It is equipped with a tag memory 3 for storing all 20 bits of.

【0008】[0008]

【発明が解決しようとする課題】しかし乍ら、前述した
如くデータメモリ7に記憶された各エントリのデータに
対して、MPU からのタグアドレスの全てを夫々記憶すべ
きタグメモリを備えることは、そのタグメモリの記憶容
量が大幅に大きいものとなり、集積した場合にはチップ
上に比較的大きい面積を占有して、キャッシュメモリの
歩留りを低下させる原因になるという問題がある。本発
明は斯かる問題に鑑み、タグメモリのチップ上の面積を
減少させ、歩留りを向上させ得るキャッシュメモリを提
供することを目的とする。
However, the provision of the tag memory for storing all the tag addresses from the MPU for the data of each entry stored in the data memory 7 as described above is as follows. There is a problem that the storage capacity of the tag memory becomes significantly large, and when integrated, it occupies a relatively large area on the chip and causes a reduction in the yield of the cache memory. In view of such a problem, it is an object of the present invention to provide a cache memory that can reduce the area of the tag memory on the chip and improve the yield.

【0009】[0009]

【課題を解決するための手段】第1発明に係るキャッシ
ュメモリは、タグメモリをタグアドレスnビットの上位
aビットを記憶するaビットメモリ部と、下位bビット
を記憶するbビットメモリ部 (a+b=n、a, b, n
は整数) とに分割し、aビットメモリ部をデータメモリ
の全エントリに対して共通に単数で設ける構成にする。
A cache memory according to a first aspect of the present invention comprises a tag memory having an a-bit memory section for storing upper a bits of a tag address n bits and a b-bit memory section for storing lower b bits (a + b). = N, a, b, n
Is an integer), and a single a-bit memory unit is provided for all entries of the data memory.

【0010】第2発明に係るキャッシュメモリは、タグ
アドレスのnビットを記憶するための1エントリ分の記
憶容量を有するタグメモリ部と、全エントリ分のデータ
の有効, 無効を判定するバリッドビット部とを備えるタ
グメモリ・ユニットを複数備える構成にする。
A cache memory according to a second aspect of the present invention is a tag memory unit having a storage capacity for one entry for storing n bits of a tag address, and a valid bit unit for determining validity / invalidity of data for all entries. A plurality of tag memory units each including and are provided.

【0011】[0011]

【作用】第1発明では、タグアドレスnビットの上位a
ビットを、各エントリに共通するaビットメモリ部に記
憶する。上位aビットに続く下位bビットをエントリに
対応するbビットメモリ部に記憶する。aビットメモリ
部及びエントリアドレスで指定されるエントリのbビッ
トメモリ部に記憶している内容と、タグアドレスとが一
致するとエントリアドレスで指定されるエントリのデー
タメモリから読出したデータが外部へ読出される。これ
により、タグメモリのチップ上の面積が減少し、キャッ
シュメモリの歩留りが向上する。
In the first aspect of the invention, the high order a of n bits of the tag address is used.
The bits are stored in the a-bit memory section common to each entry. The lower b bits following the upper a bits are stored in the b bit memory unit corresponding to the entry. When the contents stored in the a-bit memory section and the b-bit memory section of the entry specified by the entry address match the tag address, the data read from the data memory of the entry specified by the entry address is read out to the outside. It As a result, the area of the tag memory on the chip is reduced, and the yield of the cache memory is improved.

【0012】第2発明では、タグアドレスnビットを、
タグメモリ・ユニット内の1エントリ分の記憶容量を有
するタグメモリ部に記憶する。バリッドビットにより各
エントリのデータの有効, 無効を判定する。タグメモリ
部に記憶している内容とタグアドレスとが一致し、エン
トリのデータを有効と判定すると、エントリアドレスで
指定されるエントリのデータメモリから読出したデータ
が外部へ読出される。タグメモリ・ユニットの数を、デ
ータメモリのエントリ数より十分に少なくする。これに
より、タグメモリのチップ上の面積が減少し、キャッシ
ュメモリの歩留りが向上する。
In the second invention, the tag address n bits are
The data is stored in the tag memory unit having a storage capacity of one entry in the tag memory unit. Valid / invalid of data of each entry is judged by valid bit. When the content stored in the tag memory unit matches the tag address and the entry data is determined to be valid, the data read from the data memory of the entry specified by the entry address is read to the outside. The number of tag memory units is sufficiently smaller than the number of data memory entries. As a result, the area of the tag memory on the chip is reduced, and the yield of the cache memory is improved.

【0013】[0013]

【実施例】以下本発明をその実施例を示す図面により詳
述する。図1は本発明に係るキャッシュメモリの要部の
構成を示すブロック図である。図示していないMPU にお
ける所定データのアドレス1は、アドレス1の中の上位
20ビットのタグアドレス1a及びアドレス1の中のタグア
ドレス1aに続く8ビットのエントリアドレス1bとからな
る。エントリアドレス1bはエントリアドレス1bをキャッ
シュメモリ中の実際のエントリを指定する信号に変換す
るエントリデコーダ2へ入力される。20ビットのタグア
ドレスは比較機能付タグメモリ9へ入力される。タグメ
モリ9はタグアドレス1aの20ビットのうちの例えば上位
17ビットが入力される17ビットメモリ部9aと、上位17ビ
ットに続く下位3ビットが入力される3ビットメモリ部
9bとからなっている。17ビットメモリ部9aは、後述する
データメモリ7の 256エントリの全エントリに対して共
通化して単数で設けられている。
The present invention will be described in detail below with reference to the drawings showing the embodiments thereof. FIG. 1 is a block diagram showing a configuration of a main part of a cache memory according to the present invention. The address 1 of the predetermined data in the MPU (not shown) is the higher order of the addresses 1.
It consists of a 20-bit tag address 1a and an 8-bit entry address 1b following the tag address 1a in address 1. The entry address 1b is input to the entry decoder 2 which converts the entry address 1b into a signal designating an actual entry in the cache memory. The 20-bit tag address is input to the tag memory 9 with a comparison function. The tag memory 9 is, for example, the higher order of the 20 bits of the tag address 1a.
17-bit memory section 9a into which 17 bits are input, and 3-bit memory section into which lower 3 bits following the upper 17 bits are input
It consists of 9b. The 17-bit memory unit 9a is provided as a single unit common to all the 256 entries of the data memory 7 described later.

【0014】3ビットメモリ部9bはデータメモリ7の 2
56エントリの各エントリに対応して設けられている。タ
グメモリ9にはデータメモリ7の全エントリのデータの
有効, 無効を判定するバリッドビット4が設けられてお
り、またタグメモリ9によってタグアドレス1aと、タグ
メモリの内容とを比較した比較結果と、バリッドビット
4の判定結果とによりヒット信号HTを生成するヒット信
号生成部5が設けられている。ヒット信号生成部5から
出力されるヒット信号HTは、ヒット信号HTに応じてデー
タの出力を制御する制御部8へ入力される。
The 3-bit memory unit 9b is a memory of the data memory 7.
It is provided corresponding to each of the 56 entries. The tag memory 9 is provided with a valid bit 4 for judging the validity / invalidity of the data of all entries of the data memory 7, and the tag memory 9 compares the tag address 1a with the contents of the tag memory. , A hit signal generation unit 5 for generating a hit signal HT according to the determination result of the valid bit 4 is provided. The hit signal HT output from the hit signal generation unit 5 is input to the control unit 8 which controls the output of data according to the hit signal HT.

【0015】データ書込み読出し回路6には、データメ
モリ7のエントリアドレスで指定されるエントリに対し
て書込むデータDTW が入力され、データメモリ7のエン
トリアドレスで指定されるエントリに対して、データ書
込み読出し回路6により読出されたデータDTR は制御部
8を介して外部へ読出されるようになっている。なお、
実際のキャッシュメモリでは、これら以外に種々の制御
回路を有するが、ここでは便宜上省略している。
[0015] Data write and read circuit 6, writing data DT W for the entry specified by the entry address of the data memory 7 is input, for the entry specified by the entry address of the data memory 7, data data DT R which is read by the write and read circuit 6 is adapted to be read to the outside through the control unit 8. In addition,
An actual cache memory has various control circuits other than these, but they are omitted here for convenience.

【0016】次にこのように構成したキャッシュメモリ
の動作を説明する。いま、キャッシュメモリへのデータ
書込み時に、有効なデータがデータメモリ7に記憶され
ていない場合には、8ビットのエントリアドレス1bをエ
ントリデコーダ2でデコードした結果、指定されるエン
トリに対して、データメモリ7にはデータ書込み読出し
回路6を介してデータDTW が、またタグメモリ9の3ビ
ットメモリ部9bにはタグアドレス1aの下位3ビットが夫
々書込まれる。更にデータメモリ7の全エントリに共通
する17ビットメモリ9aには、タグアドレス1aの上位17ビ
ットが書込まれる。
Next, the operation of the cache memory thus configured will be described. Now, when valid data is not stored in the data memory 7 at the time of writing data to the cache memory, as a result of decoding the 8-bit entry address 1b by the entry decoder 2 data DT W via the data writing and reading circuit 6 to the memory 7, also the 3-bit memory portion 9b of the tag memory 9 the lower 3 bits of the tag address 1a is written people write respectively. Further, the upper 17 bits of the tag address 1a are written in the 17-bit memory 9a which is common to all the entries of the data memory 7.

【0017】しかし、キャッシュメモリへのデータ書込
み時に、有効なデータがデータメモリ7に既に記憶され
ている場合には、タグアドレス1aの上位17ビットと、17
ビットメモリ部9aの内容との比較を行って、その比較結
果が一致している場合には、8ビットのエントリアドレ
ス1bをエントリデコーダ2でデコードした結果、指定さ
れるエントリに対して、データメモリ7にはデータ書込
み読出し回路6を介してデータDTW が、3ビットメモリ
部9bにはタグアドレス1aの下位3ビットが、夫々書込ま
れる。
However, when valid data is already stored in the data memory 7 when writing data to the cache memory, the upper 17 bits of the tag address 1a and 17
When the contents of the bit memory unit 9a are compared and the comparison result is a match, the 8-bit entry address 1b is decoded by the entry decoder 2, and as a result, the data memory The data DT W is written in the data 7 via the data write / read circuit 6, and the lower 3 bits of the tag address 1a are written in the 3-bit memory section 9b.

【0018】しかし乍ら、タグアドレス1aの上位17ビッ
トと、17ビットメモリ部9aの内容との比較結果が不一致
であった場合には、データメモリ7に対してデータの書
込みを一切行わず、データはキャッシングされない。
However, if the comparison result of the upper 17 bits of the tag address 1a and the content of the 17-bit memory section 9a does not match, no data is written to the data memory 7, No data is cached.

【0019】また、キャッシュメモリからのデータの読
出し時には、エントリアドレス1bをエントリデコーダ2
でデコードした結果、指定されるエントリに対して、バ
リッドビット4によるデータの有効, 無効の判定及びタ
グアドレス1aの下位3ビットと、3ビットメモリ部9bの
内容との比較を行ない、更にタグアドレス1aの上位17ビ
ットと、17ビットメモリ部9aの内容との比較を行ない、
データの判定結果が有効であり、かつ両比較結果が一致
すればヒット信号生成部5からヒット信号HTが出力され
て、データ書込み読出し回路6を介して読出されたデー
タDTR が制御部8を介して外部へ読出される。
When reading data from the cache memory, the entry address 1b is set to the entry decoder 2
As a result of decoding in step 3, the valid / invalid judgment of the data by the valid bit 4 and the lower 3 bits of the tag address 1a and the content of the 3-bit memory section 9b are performed for the specified entry, and the tag address Compare the upper 17 bits of 1a with the contents of the 17-bit memory section 9a,
Data of the determination result is valid, and both the comparison result from the hit signal generator 5 when being output hit signal HT is a match, the data DT R read out through the data writing and reading circuit 6 is a control unit 8 It is read out to the outside via.

【0020】このように図1に示したキャッシュメモリ
は、タグメモリ9を17ビットメモリ部9aと、3ビットメ
モリ部9bとに分割した構成にするとともに、17ビットメ
モリ部9aを、データメモリ7の全エントリに対して共通
に単数で設けたので、タグメモリ9のチップ上の面積を
減少させ得、その結果、キャッシュメモリの歩留りを向
上させることができる。
As described above, in the cache memory shown in FIG. 1, the tag memory 9 is divided into the 17-bit memory section 9a and the 3-bit memory section 9b, and the 17-bit memory section 9a is replaced by the data memory 7. Since the single entry is commonly provided for all entries, the area of the tag memory 9 on the chip can be reduced, and as a result, the yield of the cache memory can be improved.

【0021】このようにしてキャッシュメモリは、タグ
メモリ9の17ビットメモリ部9aには、最初にキャッシン
グされたデータのタグアドレス1aの上位17ビットが記憶
され、以後、データのタグアドレス1aの上位17ビットが
一致するデータだけがキャッシング可能になる。そのた
めデータメモリ7内の全てのデータが無効となるような
状態が生じない限りは、タグメモリ9の17ビットメモリ
部9aの内容は、最初にキャッシングしたデータのタグア
ドレスの上位17ビットで固定されることにより、以後こ
の17ビットが一致した場合のみ、データをキャッシング
することになる。
In this way, in the cache memory, the 17-bit memory section 9a of the tag memory 9 stores the upper 17 bits of the tag address 1a of the first cached data, and thereafter, the higher order of the tag address 1a of the data. Only data whose 17 bits match can be cached. Therefore, unless a situation occurs in which all the data in the data memory 7 becomes invalid, the contents of the 17-bit memory section 9a of the tag memory 9 is fixed at the upper 17 bits of the tag address of the first cached data. As a result, data will be cached only when the 17 bits match thereafter.

【0022】また、キャッシュメモリは、その原理が通
常のプログラムでは、ある時点でアクセスされたデータ
は、近い将来再びアクセスされる可能性が高いという時
間的局所性と、アクセスされたデータの近傍のデータが
アクセスされる可能性が高いという空間的局所性を有す
ることを利用している。この空間的局所性によれば、通
常のプログラム実行では、次にアクセスされるデータの
アドレスは比較的近いアドレスであるから、現在アクセ
スされているデータのアドレスと、アドレスの下位数ビ
ットのみが異なるだけで、アドレスの上位が共通である
場合の割合が多い。それ故、タグアドレスの例えば上位
17ビットを固定しても殆ど支障が生じない。
Further, the cache memory has a temporal locality that a data accessed at a certain point is likely to be accessed again in the near future in a program whose normal principle is normal, and the cache memory has a local area near the accessed data. It takes advantage of the spatial locality that data is likely to be accessed. According to this spatial locality, in the normal program execution, the address of the data to be accessed next is a relatively close address, so the address of the data currently being accessed differs from the low-order bits of the address. However, there are many cases where the upper addresses are common. Therefore, for example, the top of the tag address
Fixing 17 bits causes almost no trouble.

【0023】しかし、下位アドレスが0…0、1…1の
ように上位アドレスも変化する近傍のデータに関して
は、キャッシングが不可能な場合の割合が多くなり、問
題となる場合があり得る。このような問題は、図2に示
すキャッシュメモリの構成にすることにより解消でき
る。
However, with respect to data in the vicinity where the lower address is 0 ... 0, 1 ... 1 and the upper address also changes, the ratio of cases in which caching is not possible increases, which may cause a problem. Such a problem can be solved by using the configuration of the cache memory shown in FIG.

【0024】図2は本発明に係るキャッシュメモリの他
の実施例の構成を示すブロック図である。アドレス1の
上位20ビットのタグアドレス1aは比較機能付タグメモリ
10へ入力される。このタグメモリ10は20ビットのタグア
ドレスの上位17ビットが入力される複数の17ビットメモ
リ部10a …10a と、下位3ビットが入力される複数の3
ビットメモリ部10b …10b とに分割されている。
FIG. 2 is a block diagram showing the configuration of another embodiment of the cache memory according to the present invention. Tag address 1a of upper 20 bits of address 1 is tag memory with comparison function
Input to 10. This tag memory 10 has a plurality of 17-bit memory units 10a ... 10a to which the upper 17 bits of a 20-bit tag address are input and a plurality of 3 bits to which the lower 3 bits are input.
Bit memory section 10b ... 10b is divided.

【0025】17ビットメモリ部10a …10a 夫々は、デー
タメモリ7の全エントリの一部である複数のエントリに
対して共通化されている。3ビットメモリ部10b …10b
夫々は、データメモリ7の各エントリに対して設けられ
ており、図1の17ビットメモリ部9aと同じである。17ビ
ットメモリ部10a …10a 及び3ビットメモリ部10b …10
b は、夫々に該当するタグアドレスの一部を記憶するよ
うになっている。それ以外の構成は図1に示したキャッ
シュメモリの構成と同様となっており、同一構成部分に
は同一符号を付している。
Each of the 17-bit memory sections 10a ... 10a is shared by a plurality of entries which are a part of all the entries of the data memory 7. 3-bit memory section 10b ... 10b
Each is provided for each entry of the data memory 7, and is the same as the 17-bit memory unit 9a of FIG. 17-bit memory section 10a ... 10a and 3-bit memory section 10b ... 10
b stores a part of the tag address corresponding to each. The other configuration is the same as the configuration of the cache memory shown in FIG. 1, and the same components are designated by the same reference numerals.

【0026】次にこのキャッシュメモリの動作を説明す
る。キャッシュメモリへのデータ書込み時に、8ビット
のエントリアドレス1bをエントリデコーダ2でデコード
した結果、指定されるエントリに対して、対応する17ビ
ットメモリ部10a において、17ビットメモリ部10a が共
通化されているエントリ内に有効なデータが記憶されて
いない場合、又はタグアドレス1aの上位17ビットと、17
ビットメモリ部10a の内容とが一致した場合には、デー
タメモリ7にはデータ書込み読出し回路6を介してデー
タが、3ビットメモリ部10b にはタグアドレス1aの下位
3ビットが、夫々書込まれる。
Next, the operation of this cache memory will be described. As a result of decoding the 8-bit entry address 1b by the entry decoder 2 when writing data to the cache memory, the 17-bit memory unit 10a is shared by the corresponding 17-bit memory unit 10a for the specified entry. If there is no valid data stored in the entry, or if the upper 17 bits of tag address 1a
When the contents of the bit memory unit 10a match, data is written in the data memory 7 via the data writing / reading circuit 6, and the lower 3 bits of the tag address 1a are written in the 3-bit memory unit 10b. .

【0027】更に全エントリの一部である複数のエント
リに対して共通化された17ビットメモリ部10a に対して
も、タグアドレス1aの上位17ビットが書込まれる。ただ
し、後者のタグアドレス1aの上位17ビットと、17ビット
メモリ部10a の内容とが一致した場合には、必ずしもタ
グアドレス1aの上位17ビットを、17ビットメモリ部10a
に書込む必要はない。
Further, the upper 17 bits of the tag address 1a are written also in the 17-bit memory section 10a which is shared by a plurality of entries which are a part of all the entries. However, if the higher 17 bits of the latter tag address 1a and the contents of the 17-bit memory unit 10a match, the higher 17 bits of the tag address 1a is not necessarily the 17-bit memory unit 10a.
There is no need to write in.

【0028】また、反対にキャッシュメモリへのデータ
書込み時に、8ビットのエントリアドレス1bをエントリ
デコーダ2でデコードした結果、指定されるエントリに
対して、対応する17ビットメモリ部10a において、タグ
アドレス1aの上位17ビットと、17ビットメモリ部10a の
内容とが一致せず、且つ17ビットメモリ部10a が共通化
されているエントリ内に有効なデータが存在している場
合には、データメモリに対しては書込みを一切行わず、
データはキャッシングされない。
On the contrary, when data is written to the cache memory, the 8-bit entry address 1b is decoded by the entry decoder 2 and, as a result, the tag address 1a in the corresponding 17-bit memory section 10a is corresponding to the designated entry. If the high-order 17 bits of the above do not match the contents of the 17-bit memory unit 10a, and valid data exists in the entry in which the 17-bit memory unit 10a is shared, the data memory No writing at all,
No data is cached.

【0029】また、キャッシュメモリからのデータ読出
し時には、エントリアドレス1bをエントリデコーダ2で
デコードした結果、指定されるエントリに対して、対応
するバリッドビット4によるデータの有効, 無効の判定
及びタグアドレス1aの下位3ビットと、3ビットメモリ
部10b の内容との比較を行ない、更に、タグアドレス1a
の上位17ビットと、17ビットメモリ部10a の内容との比
較を行ない、その判定結果が有効であり、且つ両比較結
果が一致すれば、ヒット信号生成部5からヒット信号HT
が出力されて、データ書込み読出し回路6を介してデー
タメモリ7から読出されたデータDTR が制御部8を通じ
て外部へ読出される。
When data is read from the cache memory, the entry address 1b is decoded by the entry decoder 2 and, as a result, the valid / invalid judgment of the corresponding valid bit 4 and the tag address 1a are performed for the designated entry. The lower 3 bits of the tag and the contents of the 3-bit memory section 10b are compared, and the tag address 1a
If the result of the comparison is valid and the comparison results match, the hit signal generator 5 outputs the hit signal HT.
There is output, data read DT R from the data memory 7 through the data writing and reading circuit 6 is read out to the outside through the control unit 8.

【0030】このようにして図2に示すキャッシュメモ
リは、比較機能付タグメモリ10を17ビットメモリ部10a
…10a と、3ビットメモリ部10b …10b とに分割した構
成とし、更に17ビットメモリ部10a をデータメモリ7の
全エントリの一部である複数エントリに対して共通とす
ることでタグメモリのチップ上の面積を減少させ得、タ
グメモリのチップ上の面積が小さいキャッシュメモリを
実現できる。またタグアドレス1aの上位17ビットが異な
るアドレスを有するデータであってもキャッシングが可
能になる。
In this way, the cache memory shown in FIG. 2 has the comparison function tag memory 10 as the 17-bit memory unit 10a.
... 10a and 3-bit memory unit 10b ... 10b, and the 17-bit memory unit 10a is shared by a plurality of entries that are a part of all entries of the data memory 7 The area above can be reduced, and a cache memory with a small area on the tag memory chip can be realized. Further, even data having an address in which the upper 17 bits of the tag address 1a are different can be cached.

【0031】図3は本発明に係るキャッシュメモリの更
に他の実施例の構成を示すブロック図である。アドレス
1の上位20ビットのタグアドレス1aは、複数の比較機能
付タグメモリ・ユニット12a,12b …12m へ入力される。
タグメモリ・ユニット12a(12b …12m)は、タグアドレス
1aの20ビットを記憶する比較機能付タグメモリ11a(11b
…11m)と、データメモリ7の全エントリ分のデータの有
効, 無効を判定するバリッドビット4a (4b…4m) と、タ
グアドレス1aとタグメモリ11a(11b …11m)の内容との比
較結果と、エントリアドレス1bで指定したエントリのバ
リッドビット4a(4b…4m) の値とによりヒット信号HTを
生成するヒット信号生成部5a (5b…5m)とにより構成さ
れている。ヒット信号生成部5a,5b …5mから出力される
ヒット信号HTは、最終的なヒット信号を制御するヒット
信号制御部13へ入力され、ヒット信号制御部13から出力
されるヒット信号HTは制御部8へ入力される。それ以外
の構成は図1に示したキャッシュメモリの構成と同様と
なっており、同一構成部分には同一符号を付している。
FIG. 3 is a block diagram showing the configuration of still another embodiment of the cache memory according to the present invention. The tag address 1a of the upper 20 bits of the address 1 is input to the plurality of tag memory units 12a, 12b ... 12m with comparison function.
Tag memory unit 12a (12b ... 12m) is the tag address
Tag memory with comparison function 11a (11b
... 11m) and valid bits 4a (4b ... 4m) for judging the validity / invalidity of data for all entries in the data memory 7, and the comparison result of the tag address 1a and the contents of the tag memory 11a (11b ... 11m) , A hit signal generator 5a (5b ... 5m) that generates a hit signal HT based on the value of the valid bit 4a (4b ... 4m) of the entry specified by the entry address 1b. The hit signal HT output from the hit signal generation units 5a, 5b ... 5m is input to the hit signal control unit 13 that controls the final hit signal, and the hit signal HT output from the hit signal control unit 13 is 8 is input. The other configuration is the same as the configuration of the cache memory shown in FIG. 1, and the same components are designated by the same reference numerals.

【0032】次にこのキャッシュメモリの動作を説明す
る。キャッシュメモリへのデータ書込み時に、全てのエ
ントリに有効なデータが記憶されていない場合には、所
定のタグメモリ・ユニットのタグメモリに対し、20ビッ
トのタグアドレス1aを書込み、エントリアドレス1bで指
定されるエントリのバリッドビットを有効の状態にセッ
トし、データメモリ7のエントリアドレスで指定される
エントリにデータを書込む。
Next, the operation of this cache memory will be described. When valid data is not stored in all entries when writing data to the cache memory, write the 20-bit tag address 1a to the tag memory of the specified tag memory unit and specify it with the entry address 1b. The valid bit of the entry to be set is set to the valid state, and the data is written to the entry designated by the entry address of the data memory 7.

【0033】また、データメモリ7内に既にデータが記
憶されており、タグメモリに記憶されている内容と、書
込むデータのタグアドレス1aとが一致した場合には、そ
のタグメモリ・ユニットのバリッドビットを有効の状態
にセットし、データメモリ7のエントリアドレスで指定
されるエントリにデータを書込む。更にデータメモリ7
内に既にデータが記憶されており、タグメモリに記憶さ
れている内容と、書込むデータのタグアドレス1aとが一
致せず、且つ全エントリに対してバリッドビットが有効
ではないタグメモリ・ユニットが存在する場合には、そ
のタグメモリ・ユニットに対して20ビットのタグアドレ
ス1aを、20ビットのタグメモリに書込み、エントリアド
レスで指定されるエントリのバリッドビットを有効の状
態にセットして、データメモリ7のエントリアドレスで
指定されるエントリにデータを書込む。
If data is already stored in the data memory 7 and the contents stored in the tag memory match the tag address 1a of the data to be written, the valid data of the tag memory unit is validated. The bit is set to the valid state, and the data is written in the entry designated by the entry address of the data memory 7. Further data memory 7
Data is already stored in the tag memory, the content stored in the tag memory does not match the tag address 1a of the data to be written, and the valid bit is not valid for all entries. If it exists, write the 20-bit tag address 1a for that tag memory unit to the 20-bit tag memory, set the valid bit of the entry specified by the entry address to the valid state, and write the data. Data is written in the entry designated by the entry address of the memory 7.

【0034】しかし乍ら、データの書込み時に、前述し
たようにデータメモリ7内の全てのエントリにデータが
記憶されていない場合、またはデータメモリ7内に既に
データが記憶されており、そのタグメモリに記憶されて
いる内容と、書込むデータのタグアドレスとが一致した
場合、あるいはデータメモリ7内に既にデータが記憶さ
れており、そのタグメモリに記憶されている内容と、書
込むデータのタグアドレス1aとが一致せず、かつ全エン
トリに対してバリッドビットが有効ではないタグメモリ
・ユニットが存在する場合のいずれの条件も満たされな
い場合には、データメモリに対するデータの書込みを一
切行わず、データはキャッシングされない。
However, when writing data, as described above, when data is not stored in all the entries in the data memory 7, or when data is already stored in the data memory 7, the tag memory When the content stored in the tag and the tag address of the data to be written match, or the data is already stored in the data memory 7 and the content stored in the tag memory and the tag of the data to be written If the address 1a does not match, and none of the conditions when there is a tag memory unit for which valid bits are not valid for all entries are not satisfied, then no data is written to the data memory, No data is cached.

【0035】また、キャッシュメモリからのデータの読
出し時には、エントリアドレス1bをエントリデコーダ2
でデコードした結果、指定されるエントリに対して、各
タグメモリ・ユニット12a,12b …12m のバリッドビット
によるデータの有効, 無効の判定及びタグアドレス1aと
タグメモリの内容との比較を行ない、判定結果が有効で
あり、且つタグアドレスが一致すれば、ヒット信号生成
部からヒット信号HTが出力される。そして、全てのタグ
メモリ・ユニット12a,12b …12m からのヒット信号HTを
用いて、ヒット信号制御部13から最終的なヒット信号HT
が出力されれば、データ書込み読出し回路6を介して読
出された所定のエントリのデータDTR が制御部8を通じ
て外部へ読出される。
When reading data from the cache memory, the entry address 1b is set to the entry decoder 2
As a result of decoding in step 1, for the specified entry, the validity / invalidity of the data by the valid bits of each tag memory unit 12a, 12b ... 12m is determined, and the comparison between the tag address 1a and the content of the tag memory is performed and the determination is made. If the result is valid and the tag addresses match, the hit signal HT is output from the hit signal generation unit. Then, the hit signal HT from all the tag memory units 12a, 12b, ...
There If output data DT R of a given entry which is read via the data writing and reading circuit 6 is read out to the outside through the control unit 8.

【0036】このように図3に示したキャッシュメモリ
においては、MPU からのタグアドレスnビットを記憶す
るための一つのタグメモリと、全エントリ分のデータの
有効, 無効を判定するバリッドビットとからなるタグメ
モリ・ユニットを複数備えることによって、データメモ
リのエントリ数より少ないタグメモリを用いて従来のキ
ャッシュメモリと同様の機能を、タグメモリのチップ上
の面積を減少させて実現できる。その結果、キャッシュ
メモリの歩留りを向上させることができる。
As described above, in the cache memory shown in FIG. 3, one tag memory for storing n bits of the tag address from the MPU and a valid bit for judging the validity / invalidity of the data for all entries are used. By providing a plurality of tag memory units, it is possible to realize a function similar to that of the conventional cache memory by using a tag memory having a smaller number of data memory entries, while reducing the area of the tag memory on the chip. As a result, the yield of the cache memory can be improved.

【0037】本実施例では、タグメモリ及びデータメモ
リを夫々単数設けた場合について説明したが、単数に限
定されるものではない。即ち、タグメモリ及びデータメ
モリ等を組合せて1ウエイとし、複数ウエイを有するセ
ットアソシアティブ構成としても同様の効果が得られ
る。また、本実施例では、タグメモリを17ビットメモリ
部と、3ビットメモリ部とに分割しているが、それは単
なる例示であり、それに何ら限定するものではない。
In the present embodiment, the case in which the single tag memory and the single data memory are provided has been described, but the number is not limited to one. That is, the same effect can be obtained even if the tag memory and the data memory are combined into one way and the set associative structure has a plurality of ways. Further, in the present embodiment, the tag memory is divided into a 17-bit memory section and a 3-bit memory section, but this is merely an example and the present invention is not limited to this.

【0038】[0038]

【発明の効果】以上詳述したように、第1発明のキャッ
シュメモリは、データメモリに記憶された各データに対
してMPU からのタグアドレスnビットの全てを夫々記憶
するタグメモリを、タグアドレスの上位aビットを記憶
するaビットメモリ部と、下位bビットを記憶する下位
bビットメモリ部とに分割した構成にし、aビットメモ
リ部をデータメモリの全エントリに対して共通化し単数
で設けたので、タグメモリのチップ上の面積を減少させ
たキャッシュメモリを実現できて、その結果、キャッシ
ュメモリの歩留りを向上させることができる。
As described in detail above, the cache memory of the first invention is a tag memory that stores all of the tag address n bits from the MPU for each data stored in the data memory. Of the a-bit memory unit for storing the upper-order a bits and the lower-b-bit memory unit for storing the lower-order b bits, and the a-bit memory unit is shared by all the entries of the data memory Therefore, a cache memory in which the area of the tag memory on the chip is reduced can be realized, and as a result, the yield of the cache memory can be improved.

【0039】第2発明のキャッシュメモリは、タグアド
レスnビットを記憶するための一つのタグメモリと、デ
ータメモリの全エントリ分のデータの有効, 無効を判定
するバリッドビットとからなるタグメモリ・ユニットを
複数備えたので、タグアドレスnビットが一致すれば、
所定のエントリに対してデータのキャッシングが可能と
なり、データメモリのエントリ数以下の数のタグメモリ
を用いることができてタグメモリのチップ上の面積を減
少させたキャッシュメモリを実現でき、その結果、キャ
ッシュメモリの歩留りを向上させることができる。
The cache memory according to the second aspect of the present invention comprises a tag memory unit comprising one tag memory for storing a tag address of n bits and a valid bit for judging validity / invalidity of data for all entries of the data memory. Since multiple tags are provided, if the tag address n bits match,
It becomes possible to cache data for a given entry, and it is possible to use a number of tag memories less than or equal to the number of entries of the data memory, and it is possible to realize a cache memory in which the area of the tag memory on the chip is reduced. The yield of the cache memory can be improved.

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

【図1】 本発明に係るキャッシュメモリの要部の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a main part of a cache memory according to the present invention.

【図2】 本発明に係るキャッシュメモリの要部の他の
実施例の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of another embodiment of a main part of a cache memory according to the present invention.

【図3】 本発明に係るキャッシュメモリの要部の更に
他の実施例の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of still another embodiment of the main part of the cache memory according to the present invention.

【図4】 従来のキャッシュメモリの要部の構成を示す
ブロック図である。
FIG. 4 is a block diagram showing a configuration of a main part of a conventional cache memory.

【符号の説明】[Explanation of symbols]

2 エントリデコーダ、4 バリッドビット、4a,4b 〜
4m バリッドビット、5 ヒット信号生成部、7 デ
ータメモリ、9 タグメモリ、9a 17ビットメモリ部、
9b 3ビットメモリ部、10 タグメモリ、10a,10a …
17ビットメモリ部、10b,10b … 3ビットメモリ部、11
a,11b 〜11m 20ビットメモリ部、12a,12b 〜12m タ
グメモリ・ユニット。
2 entry decoder, 4 valid bits, 4a, 4b ~
4m valid bit, 5 hit signal generator, 7 data memory, 9 tag memory, 9a 17 bit memory,
9b 3-bit memory, 10 tag memory, 10a, 10a ...
17-bit memory section, 10b, 10b ... 3-bit memory section, 11
a, 11b to 11m 20-bit memory unit, 12a, 12b to 12m Tag memory unit.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 使用したデータを、そのアドレスの一部
であるエントリアドレスによって指定されるエントリに
対して、データメモリに記憶するとともに一部であるn
ビットのタグアドレスをタグメモリに記憶して、後に、
アドレスで指定されるエントリに対して該タグメモリが
記憶しているタグアドレスと同タグアドレスがタグメモ
リへ入力された場合に、データメモリからのデータが読
出されるキャッシュメモリにおいて、 前記タグメモリを、タグアドレスnビットの上位aビッ
トを記憶するaビットメモリ部と、下位bビットを記憶
するbビットメモリ部とに(a+b=n、a,b,cは
整数)分割されており、前記aビットメモリ部を、デー
タメモリの全エントリに対して共通に単数で設けてある
ことを特徴とするキャッシュメモリ。
1. The used data is stored in a data memory for an entry designated by an entry address which is a part of the address, and n is a part of the stored address.
The tag address of the bit is stored in the tag memory, and later,
In the cache memory in which the data from the data memory is read when the same tag address as that stored in the tag memory for the entry specified by the address is input to the tag memory, , A tag address n bits are divided into an a-bit memory unit for storing high-order a bits and a b-bit memory unit for storing low-order b bits (a + b = n, a, b, and c are integers). A cache memory characterized in that a single bit memory unit is provided commonly to all entries of the data memory.
【請求項2】 aビットメモリ部を、データメモリの全
エントリの一部である複数エントリに対して共通に設け
てある請求項1記載のキャッシュメモリ。
2. The cache memory according to claim 1, wherein the a-bit memory section is provided commonly to a plurality of entries which are a part of all the entries of the data memory.
【請求項3】 使用したデータをデータメモリに記憶す
るとともに、記憶したデータのnビットのタグアドレス
をタグメモリに記憶して、該タグメモリが記憶している
タグアドレスと同タグアドレスがタグメモリへ入力され
た場合に、データメモリからのデータが読出されるキャ
ッシュメモリにおいて、 前記タグアドレスのnビットを記憶するタグメモリと、
データメモリの全エントリ分のデータの有効,無効を判
定するバリッドビットとを有するタグメモリ・ユニット
を複数備えていることを特徴とするキャッシュメモリ。
3. The used data is stored in a data memory, the n-bit tag address of the stored data is stored in the tag memory, and the tag address stored in the tag memory is the same as the tag address. A tag memory for storing n bits of the tag address in a cache memory from which data is read from the data memory when input to
A cache memory comprising a plurality of tag memory units each having a valid bit for determining whether data of all entries of the data memory is valid or invalid.
JP6135396A 1994-06-17 1994-06-17 Cache memory Pending JPH086857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6135396A JPH086857A (en) 1994-06-17 1994-06-17 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6135396A JPH086857A (en) 1994-06-17 1994-06-17 Cache memory

Publications (1)

Publication Number Publication Date
JPH086857A true JPH086857A (en) 1996-01-12

Family

ID=15150741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6135396A Pending JPH086857A (en) 1994-06-17 1994-06-17 Cache memory

Country Status (1)

Country Link
JP (1) JPH086857A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004310739A (en) * 2003-03-26 2004-11-04 Matsushita Electric Ind Co Ltd Semiconductor device
WO2006038258A1 (en) * 2004-09-30 2006-04-13 Renesas Technology Corp. Data processor
JP2016062613A (en) * 2014-09-17 2016-04-25 三星電子株式会社Samsung Electronics Co.,Ltd. Cache memory system and operating method of the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004310739A (en) * 2003-03-26 2004-11-04 Matsushita Electric Ind Co Ltd Semiconductor device
WO2006038258A1 (en) * 2004-09-30 2006-04-13 Renesas Technology Corp. Data processor
JP2016062613A (en) * 2014-09-17 2016-04-25 三星電子株式会社Samsung Electronics Co.,Ltd. Cache memory system and operating method of the same

Similar Documents

Publication Publication Date Title
US5913223A (en) Low power set associative cache memory
US6430655B1 (en) Scratchpad RAM memory accessible in parallel to a primary cache
US7493445B2 (en) Cache memory system and control method of the cache memory system
JPH06110781A (en) Cache memory device
US4821171A (en) System of selective purging of address translation in computer memories
US5682515A (en) Low power set associative cache memory with status inhibit of cache data output
US5276829A (en) Data processing system including cache memory for rapidly converting a logical address into a physical address using shared memory flag
US7024536B2 (en) Translation look-aside buffer for improving performance and reducing power consumption of a memory and memory management method using the same
US5710905A (en) Cache controller for a non-symetric cache system
JPH10340226A (en) Cache memory of associative storage system
US6385696B1 (en) Embedded cache with way size bigger than page size
JP5745200B2 (en) Cache memory system and operation method capable of controlling number of blocks stored in cache memory
JPH086857A (en) Cache memory
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
US4456976A (en) Associative memory system
JP3242161B2 (en) Data processor
US6707752B2 (en) Tag design for cache access with redundant-form address
JP3997404B2 (en) Cache memory and control method thereof
JP3262182B2 (en) Cache memory system and microprocessor device
JPH04369061A (en) Control system for cache memory
JPS6015971B2 (en) buffer storage device
JP3289284B2 (en) Cache memory device with address adder
JPH04324194A (en) Rom circuit
JP2613258B2 (en) Information processing method and apparatus
JP2005157530A (en) Data converting system