JPH0795310B2 - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH0795310B2
JPH0795310B2 JP1261301A JP26130189A JPH0795310B2 JP H0795310 B2 JPH0795310 B2 JP H0795310B2 JP 1261301 A JP1261301 A JP 1261301A JP 26130189 A JP26130189 A JP 26130189A JP H0795310 B2 JPH0795310 B2 JP H0795310B2
Authority
JP
Japan
Prior art keywords
address
memory
cache
data
cache 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.)
Expired - Fee Related
Application number
JP1261301A
Other languages
Japanese (ja)
Other versions
JPH03123948A (en
Inventor
隆 堀川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1261301A priority Critical patent/JPH0795310B2/en
Publication of JPH03123948A publication Critical patent/JPH03123948A/en
Publication of JPH0795310B2 publication Critical patent/JPH0795310B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュ・メモリに関する。The present invention relates to cache memories.

〔従来の技術〕[Conventional technology]

「キャッシュ・メモリ」(Cache Memories:ACM Computi
ng Surveys,vol.14,no3,1982,pp.473-530)に示される
ように、記憶階層を備えた情報処理装置では、主記憶を
ある大きさのブロックを単位として分割し、これらのブ
ロックの一部を高速にアクセスできるキャッシュ・メモ
リにコピーしておくことにより、プロセッサから要求さ
れたデータがキャッシュ・メモリ内に存在するときに、
これをプロセッサに高速に渡すことで、プロセッサから
みたアクセス速度を向上させている。このブロックの大
きさ(以下、ブロック・サイズ)は一般に2つのべき乗
にとられる。
"Cache Memories: ACM Computi"
ng Surveys, vol.14, no3, 1982, pp.473-530), in an information processing device with a memory hierarchy, main memory is divided into blocks of a certain size, and these blocks are By copying a part of the data to the cache memory that can be accessed at high speed, when the data requested by the processor exists in the cache memory,
By passing this to the processor at high speed, the access speed seen from the processor is improved. The size of this block (hereinafter referred to as block size) is generally taken as a power of two.

キャッシュ・メモリには、主記憶にあるブロック(以
下、主記憶ブロック)が保持するデータのコピーと、主
記憶においてこのブロックが存在する位置を示すアドレ
ス・タグが記録される。キャッシュ・メモリ内のデータ
・メモリは主記憶ブロックに保持されているデータのコ
ピーを記録する部分であり、ディレクトリはアドレス・
タグを記録する部分である。1つのアドレス・タグに対
応するブロックが主記憶とキャッシュ・メモリとの間で
のマッピングの単位となる。
In the cache memory, a copy of data held by a block in the main memory (hereinafter referred to as main memory block) and an address tag indicating the position where this block exists in the main memory are recorded. The data memory in the cache memory is the part that records a copy of the data held in the main memory block, and the directory is the address
This is the part that records tags. A block corresponding to one address tag serves as a unit of mapping between the main memory and the cache memory.

キャッシュ・メモリはプロセッサからデータのアクセス
要求があると、プロセッサが出力するアドレスがディレ
クトリ内に存在するかどうかを調べることにより、要求
されたデータがキャッシュ・メモリ内に存在するかどう
かを判定する。その結果、要求されたデータがキャッシ
ュに存在する場合(以下、ヒット)には、キャッシュの
データ・メモリからプロセッサにデータが渡される。要
求されたデータがキャッシュに存在しない場合(以下、
ミス・ヒット)には、当該データを保持している主記憶
ブロックをアクセスして、このデータをプロセッサに渡
すとともにキャッシュのデータ・メモリにコピーする。
また、このときに、プロセッサが出力しているアドレス
の値が、対応するディレクトリに記録され、ミス・ヒッ
トの処理が完了する。
When there is a data access request from the processor, the cache memory determines whether the requested data exists in the cache memory by checking whether the address output by the processor exists in the directory. As a result, when the requested data exists in the cache (hereinafter, hit), the data is passed from the cache data memory to the processor. If the requested data does not exist in the cache (below,
In the case of “miss hit”, the main memory block holding the data is accessed, and this data is passed to the processor and also copied to the data memory of the cache.
At this time, the value of the address output by the processor is recorded in the corresponding directory, and the mishit processing is completed.

主記憶ブロックとキャッシュ・メモリのブロック間での
マッピングの方式にはフル・アソシアティブ方式、セッ
ト・アソシアティブ方式、ダイレクト・マップ方式があ
る。フル・アソシアティブ方式は、任意の主記憶ブロッ
クをキャッシュ・メモリの任意とブロックにマッピング
できる方式である。ダイレクト・マップ方式では、主記
憶ブロックが存在するアドレスによりマッピングされる
キャッシュ・メモリのブロックが一意に決定される方式
である。セット・アソシアティブ方式では、キャッシュ
・メモリのブロックの幾つかのグループに分けておき、
主記憶ブロックが存在するアドレスにより決定されるグ
ルーブ番号(セット番号)をもつキャッシュ・メモリの
ブロックの内で任意のブロックにマッピングできる方式
である。
Mapping methods between the main memory block and the cache memory block include a full associative method, a set associative method, and a direct map method. The full associative method is a method in which an arbitrary main memory block can be mapped to an arbitrary block of a cache memory and a block. The direct map method is a method in which a block of a cache memory to be mapped by an address where a main memory block exists is uniquely determined. In the set associative method, the cache memory blocks are divided into several groups,
This is a method in which a block can be mapped to an arbitrary block in the cache memory block having a groove number (set number) determined by an address where the main memory block exists.

このように、フル・アソシアティブ方式、または、セッ
ト・アソシアティブ方式のキャッシュ・メモリでは、1
つの主記憶ブロックにマッピング可能なキャッシュ・メ
モリのブロックが複数存在する。そこで、キャッシュ・
メモリ内部では、これらのブロックを識別するためにエ
ントリ・アドレスを用いて、データ・メモリやディレク
トリをアクセスしている。
Thus, in the cache memory of the full associative method or the set associative method, 1
There are multiple blocks of cache memory that can be mapped to one main memory block. So the cache
Inside the memory, the entry address is used to identify these blocks to access the data memory or directory.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

キャッシュ・メモリ全体が超高集積回路(LSIチップ)
として実現されるようになると、キャッシュ・メモリの
ディレクトリに保持されているアドレス・タグの内容お
よびデータ・メモリに保持されているデータの内容を外
部回路で利用することができないという問題点があっ
た。
The entire cache memory is an ultra-high integrated circuit (LSI chip)
However, there is a problem in that the contents of the address tag held in the cache memory directory and the contents of the data held in the data memory cannot be used in an external circuit. .

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のキャッシュ・メモリは、前記の問題点を解決す
るため、本来はキャッシュ内部でのみ使われるエントリ
・アドレスを、LSIチップ外部に出力するためのエント
リ・アドレス出力端子を設け、キャッシュヒットであれ
ばヒットしたエントリのアドレス、キャッシュミスであ
れば置き換え対象エントリのアドレスをエントリ・アド
レス出力端子に出力することを特徴とする。
In order to solve the above problems, the cache memory of the present invention is provided with an entry address output terminal for outputting an entry address, which is originally used only in the cache, to the outside of the LSI chip, and does not require a cache hit. For example, the address of the hit entry and the address of the replacement target entry in the case of a cache miss are output to the entry address output terminal.

〔作用〕[Action]

プロセッサがアクセスを行なったとき、キャッシュ・ヒ
ットであればヒットしたエントリのアドレス、キャッシ
ュ・ミスであれば置き換え対象エントリのアドレスを、
エントリ・アドレス出力端子に出力する。これにより、
キャッシュ・メモリ・チップ外部に付加する回路では、
このエントリ・アドレスを利用し、キャッシュ・ヒット
時には外部ディレクトリおよび外部データ・メモリをア
クセスし、キャッシュ・ミス時には外部には外部ディレ
クトリおよび外部データ・メモリの内容を更新すること
で、本来は、チップ内部でのみ保持されているディレク
トリおよびデータ・メモリの内容と同一内容を外部回路
において利用することができる。
When the processor makes an access, if there is a cache hit, the address of the entry that hit, if it is a cache miss, the address of the replacement target entry,
Output to the entry address output pin. This allows
In the circuit added to the outside of the cache memory chip,
By using this entry address, the external directory and external data memory are accessed at the time of a cache hit, and the contents of the external directory and the external data memory are updated to the outside at the time of a cache miss. The same contents as the contents of the directory and the data memory, which are held only at, can be used in the external circuit.

〔実施例〕〔Example〕

第1図に、本発明によるキャッシュ・メモリを利用した
キャッシュ・メモリ・システムの構成、第2図に、本発
明によるキャッシュ・メモリの構成、第3図に、プロセ
ッサがアクセス時に出力するアドレスの内容を示す。こ
のアドレスは、最下位ビットより順に、ブロック内アド
レス16、セット・アドレス14およびアドレスエータグ15
に分けられる。これらのアドレスのビットと数は、ブロ
ック・サイズやセット数に依存する。
FIG. 1 shows the structure of a cache memory system using a cache memory according to the present invention, FIG. 2 shows the structure of a cache memory according to the present invention, and FIG. 3 shows the contents of addresses output by a processor during access. Indicates. This address is, in order from the least significant bit, in-block address 16, set address 14 and address tag 15
It is divided into The bits and number of these addresses depend on the block size and number of sets.

まず、第2図に示すキャッシュ・メモリ3の動作を示
す。プロセッサがアクセス・アドレスを出力してキャッ
シュ・メモリ3をアクセスしたときのキャッシュ・メモ
リ動作は以下の通りである。
First, the operation of the cache memory 3 shown in FIG. 2 will be described. The cache memory operation when the processor outputs the access address and accesses the cache memory 3 is as follows.

まず、アクセス・アドレス内のセット・アドレス14によ
りディレクトリ7がアクセスされ、エントリ数分のアド
レス・タグがディレクトリ7から出力される。比較部9
では、これら複数のアドレス・タグと、アクセス・アド
レス内のアドレス・タグ15とを比較する。その結果、一
致するタグがあったときには、キャッシュ・ヒットであ
り、プロセッサの要求しているデータはキャッシュ・メ
モリ3内に存在している。そこで、アクセス・アドレス
内のセット・アドレス14と比較部9の出力するエントリ
・アドレス18によりデータ・メモリ2をアクセスしてプ
ロセッサの要求しているデータをプロセッサに渡す。こ
のエントリ・アドレス18は、エントリ・アドレス出力端
子4を通してキャッシュ・メモリ3の外部に出力され
る。
First, the directory 7 is accessed by the set address 14 in the access address, and as many address tags as the number of entries are output from the directory 7. Comparison unit 9
Then, these plural address tags are compared with the address tag 15 in the access address. As a result, when there is a matching tag, it is a cache hit, and the data requested by the processor exists in the cache memory 3. Therefore, the data memory 2 is accessed by the set address 14 in the access address and the entry address 18 output from the comparator 9 to pass the data requested by the processor to the processor. The entry address 18 is output to the outside of the cache memory 3 through the entry address output terminal 4.

比較部9による比較操作の結果、ディレクトリ7から出
力される複数のアドレス・タグに、アクセス・アドレス
内のアドレス・タグ15と一致するものがなかったときに
は、キャッシュ・ミスであり、プロセッサの要求してい
るデータはキャッシュ・メモリ3内に存在していない。
このときには、置き換え対象となるエントリのアドレス
を比較部9より出力するとともに、アクセス・アドレス
により主記憶ブロックをアクセスしてプロセッサの要求
しているデータを得て、これをプロセッサに渡す。
As a result of the comparison operation by the comparison unit 9, when there is no match among the plurality of address tags output from the directory 7 with the address tag 15 in the access address, it is a cache miss and the processor requests. Data is not present in the cache memory 3.
At this time, the address of the entry to be replaced is output from the comparison unit 9, the main memory block is accessed by the access address to obtain the data requested by the processor, and the data is passed to the processor.

また、ディレクトリ7およびデータ・メモリ内におい
て、比較部9より出力されるエントリ・アドレス18とア
クセス・アドレス内のセット・アドレス14により指定さ
れる位置に、アクセス・アドレス内のアドレス・タグ15
と、主記憶ブロックの内容を書き込むことで、キャッシ
ュ・ミス時におけるキャッシュ・メモリ内容の更新は完
了する。キャッシュ・ミス時には、置き換え対象となる
エントリのアドレスがエントリ・アドレス出力端子4を
通してキャッシュ・メモリ外部に出力される。
In the directory 7 and the data memory, the address tag 15 in the access address is located at a position specified by the entry address 18 output from the comparison unit 9 and the set address 14 in the access address.
By writing the contents of the main memory block, the updating of the contents of the cache memory at the time of a cache miss is completed. When a cache miss occurs, the address of the entry to be replaced is output to the outside of the cache memory through the entry address output terminal 4.

第1図に示すキャッシュ・メモリ・システムは、第2図
のキャッシュ・メモリ・チップに外部ディレクトリ7お
よび外部データ・メモリ8を付加したシステムである。
この動作は以下の通りである。
The cache memory system shown in FIG. 1 is a system in which an external directory 7 and an external data memory 8 are added to the cache memory chip of FIG.
This operation is as follows.

キャッシュ・ミス時において、置き換え対象となるキャ
ッシュ内ブロックのアドレスのうち、エントリのアドレ
スはエントリ・アドレス出力端子4に出力されており、
セット番号は、アクセス・アドレス内のセット・アドレ
スにより示される。そこで、これらのアドレスにより示
される外部ディレクトリ7および外部データ・メモリ8
内のブロックに、主記憶をアクセスするときのアドレス
と得られた主記憶ブロックの内容を記憶する。この操作
により、キャッシュ・メモリ内部のディレクトリおよび
データ・メモリ内部のコピーが外部ディレクトリ7およ
び外部データ・メモリ8に保持される。
At the time of a cache miss, the address of the entry among the addresses of the blocks in the cache to be replaced is output to the entry address output terminal 4,
The set number is indicated by the set address in the access address. Therefore, the external directory 7 and the external data memory 8 indicated by these addresses
The address when accessing the main memory and the obtained contents of the main memory block are stored in the block. By this operation, a copy inside the cache memory and a copy inside the data memory are held in the external directory 7 and the external data memory 8.

キャッシュ・ヒット時には、プロセッサの要求するデー
タの存在するキャッシュ内ブロックのアドレスのうち、
エントリのアドレスはエントリ・アドレス出力端子4に
出力されており、セット番号は、アクセス・アドレス内
のセット・アドレス14により示される。そこで、これら
のアドレスにより示される外部ディレクトリ7および外
部データ・メモリ8をアクセスして、プロセッサが行な
ったアクセスのアドレスとデータを外部回路で利用でき
る。
At the time of a cache hit, of the addresses of the blocks in the cache where the data requested by the processor exists,
The address of the entry is output to the entry address output terminal 4, and the set number is indicated by the set address 14 in the access address. Therefore, the external directory 7 and the external data memory 8 indicated by these addresses can be accessed, and the address and data of the access made by the processor can be used in the external circuit.

以上、説明した通り、本発明の主旨は、超高集積回路チ
ップとして実現されたキャッシュ・メモリから、アクセ
ス対象となっているブロックのエントリ・アドレスを出
力することにより、キャッシュ・メモリ・チップ内部の
エィレクトリとデータ・メモリの内容と同じデータを外
部回路において保持することを可能にすることである。
As described above, the gist of the present invention is to output the entry address of the block to be accessed from the cache memory realized as an ultra high-integrated circuit chip, thereby It is possible to retain the same data as the contents of the directory and the data memory in the external circuit.

従って、本発明には、種々の実施形態が存在することは
明らかである。例えば、本実施例では、外部にディレク
トリ7とデータ・メモリ8の両者を置くものとしたが、
ディレクトリのみ、あるいは、データ・メモリのみを置
くシステムも本発明に含まれる。
Therefore, it is obvious that the present invention has various embodiments. For example, in the present embodiment, both the directory 7 and the data memory 8 are placed outside.
A system having only a directory or only a data memory is also included in the present invention.

また、本実施例では、キャッシュ・ヒット時には、エン
トリ・アドレス出力端子から出力されるエントリ・アド
レスを利用して外部ディレクトリ7および外部データ・
メモリ8をアクセスしているが、キャッシュ・ヒット時
には外部ディレクトリ7および外部データ・メモリ8を
アクセスせず、これらに保持された内容を利用するシス
テムも本発明に含まれることは明らかである。
Further, in the present embodiment, at the time of a cache hit, the external directory 7 and the external data are stored by using the entry address output from the entry address output terminal.
It is obvious that the present invention also includes a system that accesses the memory 8 but does not access the external directory 7 and the external data memory 8 at the time of a cache hit and uses the contents held in these.

また、本実施例では、プロセッサとキャッシュ・メモリ
は別のブロックのブロックとして説明しているが、両者
が同一チップ上に搭載されている場合にも本発明は適用
可能である。
Further, in the present embodiment, the processor and the cache memory are described as blocks of different blocks, but the present invention can be applied to the case where both are mounted on the same chip.

〔発明の効果〕〔The invention's effect〕

本発明によると、キャッシュ・メモリ全体が超高集積回
路(LSIチップ)として実現されたキャッシュ・メモリ
・チップにおいても、キャッシュ・メモリのディレクト
リに保持されているアドレス・タグの内容およびデータ
・メモリに保持されているデータの内容を外部回路で利
用することができる。
According to the present invention, even in a cache memory chip in which the entire cache memory is realized as an ultra-high-integrated circuit (LSI chip), the content of the address tag and the data memory held in the directory of the cache memory are The content of the held data can be used in an external circuit.

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

第1図は、本発明によるキャッシュ・メモリを利用した
キャッシュ・メモリ・システムの構成を示すブロック
図、第2図は、本発明によるキャッシュ・メモリの構成
を示すブロック図、第3図は、プロセッサがアクセス時
に出力するアドレスの内容を示す図である。 1…ディレクトリ、2…データ・メモリ、3…キャッシ
ュ・メモリ、4…エントリ・アドレス出力端子、5…プ
ロセッサ、6…主記憶、7…外部ディレクトリ、8…外
部データ・メモリ、9…比較部、10…プロセッサ・デー
タ・バス、11…プロセッサ・アドレス・バス、12…メモ
リ・アドレス・バス、13…メモリ・データ・バス、14…
セット・アドレス、15…アドレス・タグ、16…ブロック
・アドレス、17…アクセス・アドレス、18…エントリ・
アドレス。
FIG. 1 is a block diagram showing a configuration of a cache memory system using a cache memory according to the present invention, FIG. 2 is a block diagram showing a configuration of a cache memory according to the present invention, and FIG. 3 is a processor. FIG. 5 is a diagram showing the contents of an address that is output at the time of access. 1 ... Directory, 2 ... Data memory, 3 ... Cache memory, 4 ... Entry address output terminal, 5 ... Processor, 6 ... Main memory, 7 ... External directory, 8 ... External data memory, 9 ... Comparison section, 10 ... Processor data bus, 11 ... Processor address bus, 12 ... Memory address bus, 13 ... Memory data bus, 14 ...
Set address, 15 ... Address tag, 16 ... Block address, 17 ... Access address, 18 ... Entry
address.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】超高集積回路内にディレクトリとデータ・
メモリを内蔵するキャッシュ・メモリにおいて、エント
リ・アドレス出力端子を設け、プロセッサがアクセスを
行なったとき、キャッシュ・ヒットであればヒットした
エントリのアドレス、キャッシュ・ミスであれば置き換
え対象エントリのアドレスを、エントリ・アドレス出力
端子に出力することを特徴とするキャッシュ・メモリ。
1. A directory and data in a highly integrated circuit.
In a cache memory with a built-in memory, an entry address output terminal is provided, and when the processor accesses, the address of the entry that is a hit if the cache hits, the address of the replacement target entry if the cache miss, A cache memory characterized by outputting to an entry address output terminal.
JP1261301A 1989-10-06 1989-10-06 Cache memory Expired - Fee Related JPH0795310B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1261301A JPH0795310B2 (en) 1989-10-06 1989-10-06 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1261301A JPH0795310B2 (en) 1989-10-06 1989-10-06 Cache memory

Publications (2)

Publication Number Publication Date
JPH03123948A JPH03123948A (en) 1991-05-27
JPH0795310B2 true JPH0795310B2 (en) 1995-10-11

Family

ID=17359895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1261301A Expired - Fee Related JPH0795310B2 (en) 1989-10-06 1989-10-06 Cache memory

Country Status (1)

Country Link
JP (1) JPH0795310B2 (en)

Also Published As

Publication number Publication date
JPH03123948A (en) 1991-05-27

Similar Documents

Publication Publication Date Title
JP3493409B2 (en) Computer equipment
US5586297A (en) Partial cache line write transactions in a computing system with a write back cache
US6658538B2 (en) Non-uniform memory access (NUMA) data processing system having a page table including node-specific data storage and coherency control
US5813031A (en) Caching tag for a large scale cache computer memory system
US6145064A (en) Method of efficiently updating hashed page tables
US5809562A (en) Cache array select logic allowing cache array size to differ from physical page size
JP2006277762A (en) Divided nondense directory for distributed shared memory multi-processor system
JP3439167B2 (en) Method and apparatus for addressing the contents of main memory including a directory structure in a computer system
US7117312B1 (en) Mechanism and method employing a plurality of hash functions for cache snoop filtering
EP0365117B1 (en) Data-processing apparatus including a cache memory
US7325102B1 (en) Mechanism and method for cache snoop filtering
EP0752662A1 (en) Method and apparatus for tagging a multi-way associative cache
US5479629A (en) Method and apparatus for translation request buffer and requestor table for minimizing the number of accesses to the same address
EP0173909B1 (en) Look-aside buffer least recently used marker controller
JPH04336641A (en) Data cache and method for use in processing system
JPH1091521A (en) Duplex directory virtual cache and its control method
US20020002659A1 (en) System and method for improving directory lookup speed
US7519778B2 (en) System and method for cache coherence
JPH0795310B2 (en) Cache memory
JP3262182B2 (en) Cache memory system and microprocessor device
KR920005296B1 (en) Information processing device
JPS5922315B2 (en) Buffer memory control method
JP3061818B2 (en) Access monitor device for microprocessor
JPS62118457A (en) Buffer memory control system
JPH05342101A (en) Hierarchical cache memory

Legal Events

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