JP2000293437A - Cache memory device and cache memory control method - Google Patents

Cache memory device and cache memory control method

Info

Publication number
JP2000293437A
JP2000293437A JP11096858A JP9685899A JP2000293437A JP 2000293437 A JP2000293437 A JP 2000293437A JP 11096858 A JP11096858 A JP 11096858A JP 9685899 A JP9685899 A JP 9685899A JP 2000293437 A JP2000293437 A JP 2000293437A
Authority
JP
Japan
Prior art keywords
cache
data
address
sets
group
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
JP11096858A
Other languages
Japanese (ja)
Inventor
Yosuke Nakamura
陽介 中村
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 JP11096858A priority Critical patent/JP2000293437A/en
Publication of JP2000293437A publication Critical patent/JP2000293437A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To implement substitute algorithm by a programmer by selecting a cache set or its group when a specific value is stored in the specific bit area of an entry of a high-speed converting buffer mechanism. SOLUTION: The high-speed converting buffer mechanism (TLB) 41 of a memory management (MMU) 4 has multiple entries, which is each stored with a virtual page address VPN, a physical page address PFN, an effective bit V, and extension C bits so that they correspond to one another. The extension C bits are information obtained by adding information specifying a cache set to information of the C bits indicating a conventional cache coherency property. Then a selector 5 selects one of 0th and 1st cache sets 31 and 32 according to the value of the extension C bits included in data outputted from the MMU 4. Further, a controller 6 makes one of the 0th and 1st cache sets 31 and 32 active when the extension C bits are '11'.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、キャッシュメモリ
装置に関し、特に、TLBエントリにリプレーシング処
理が実行されるキャッシュセットを指定するビット領域
を設け、プログラマーによる置換アルゴリズムの実施手
段を実現することができるようにしたキャッシュメモリ
装置をそなえるプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device, and more particularly, to providing a TLB entry with a bit area designating a cache set in which a replacing process is to be performed, thereby realizing means for implementing a replacement algorithm by a programmer. The present invention relates to a processor having a cache memory device.

【0002】[0002]

【従来の技術】多くの情報処理装置では、少ない物理メ
モリを補うため、大きな仮想アドレス空間を用いて論理
的にメモリ空間を拡張している。この拡張されたアドレ
ス空間を高速にアクセスする為の手段として、TLB
(Table Look−up Buffer;高速変
換緩衝機構)とキャッシュメモリとを使用する方法が一
般に行われている。TLBは、仮想アドレス空間上のア
ドレス(仮想アドレス)を物理アドレスに高速に変換す
るための高速のアドレス変換部である。
2. Description of the Related Art In many information processing apparatuses, a large virtual address space is used to logically expand a memory space in order to supplement a small physical memory. As means for accessing this extended address space at high speed, TLB is used.
(Table Look-up Buffer; high-speed conversion buffering mechanism) and a method of using a cache memory are generally used. The TLB is a high-speed address converter for converting an address (virtual address) in a virtual address space into a physical address at a high speed.

【0003】また、キャッシュメモリは、比較的低速で
動作する主メモリのアクセスを見かけ上高速化するため
に、主メモリの記憶内容の写しを記憶する高速メモリで
ある。
A cache memory is a high-speed memory that stores a copy of the contents stored in the main memory in order to increase the apparent speed of accessing the main memory that operates at a relatively low speed.

【0004】TLBは、仮想アドレスと物理アドレスへ
の変換情報を有するルックアップテーブルを記憶してい
る、キャッシュメモリよりも高速のメモリ或いはレジス
タと、仮想アドレスでこのテーブルを参照して、該当す
るデータがキャッシュメモリに格納されているか否か、
格納されている場合には、その物理アドレスを読み出
す。仮想アドレスから最終的な物理アドレスへの変換に
際しては、TLBをカバーする他のアドレス変換手段が
使用されることもある。
[0004] The TLB stores a look-up table having conversion information into a virtual address and a physical address. A memory or a register which is faster than a cache memory, and refers to this table by a virtual address to obtain a corresponding data. Whether or not is stored in the cache memory,
If stored, the physical address is read. When converting the virtual address to the final physical address, other address conversion means covering the TLB may be used.

【0005】図6に示す従来のキャッシュメモリ装置の
構成のように、容量の限られているキャッシュメモリを
有効に使用するために、TLBエントリにキャッシュ・
コヒーレンシー属性の情報を指定するコヒーレンシー指
定ビットを付加することもある。
In order to effectively use a cache memory having a limited capacity as in the configuration of the conventional cache memory device shown in FIG.
A coherency designation bit for designating coherency attribute information may be added.

【0006】図6に示す従来例の場合、該コヒーレンシ
ー指定のビットが1であれば、通常のcache属性に
よる制御、すなわち、置換論理(リプレーシング・アル
ゴリズム)を含むキャッシュの制御がなされる。
In the case of the conventional example shown in FIG. 6, if the coherency designation bit is 1, control based on the ordinary cache attribute, that is, control of the cache including replacement logic (replacement algorithm) is performed.

【0007】上記のコヒーレンシー指定のビットが0で
あれば、uncache 属性による制御、すなわちキ
ャッシュを使用しない制御が実施される。
If the coherency designation bit is 0, control based on the uncache attribute, that is, control not using a cache, is performed.

【0008】上記で、置換論理(リプレーシング・アル
ゴリズム)とは、キャッシュに空きが無い場合に、どの
ブロックを追い出すべきかを決定するアルゴリズムのこ
とである。この決定には、過去のアクセスに関する統計
上の情報や、参照データの局所性等の経験則、或いは、
ブロックの優先度指定等が参考にされる。これらの決定
は、キャッシュのヒット率の向上と関係している。
In the above, the replacement logic (replacement algorithm) is an algorithm for determining which block should be evicted when there is no free space in the cache. This decision may include statistical information about past accesses, empirical rules such as locality of reference data, or
The specification of the block priority is referred to. These decisions are related to increasing the cache hit rate.

【0009】例えば、プロセッサで言うところの置換論
理(リプレーシング・アルゴリズム)には、一般には、
キャッシュメモリの置換論理と、TLBエントリの置換
論理との区別がある(本発明は、キャッシュメモリの置
換論理の方に関係している)。
For example, permutation logic (replacement algorithm) in a processor generally includes:
There is a distinction between replacement logic for cache memories and replacement logic for TLB entries (the invention relates to replacement logic for cache memories).

【0010】キャッシュのリプレーシング・アルゴリズ
ムとして最も多用されてきたのは、いわゆるLRU(L
east Recently Used)アルゴリズム
である。すなわち、直近に参照されたブロックは、置換
されないようにする制御が一般的であった。
The most frequently used cache replacing algorithm is the so-called LRU (LRU).
east recently used) algorithm. That is, a control is generally performed so that the most recently referenced block is not replaced.

【0011】しかし、近年は、リプレーシング・アルゴ
リズムばかりではなく、リプレーシングに関する最適制
御方法がア・プリオリに判明している場合に対応する必
要性から、プログラム中の命令セット(通常はロード命
令)に、該最適制御方法を実現するための手段を持たせ
る方針も見られる。
However, in recent years, not only the replacing algorithm but also the need to cope with the case where the optimal control method relating to the replacement is known a priori, an instruction set (usually a load instruction) in a program has been required. In addition, there is a policy to provide means for realizing the optimal control method.

【0012】このような方針に基づく先出願として、特
開平4−338848号公報には、TLBエントリに、
当該TLBエントリの置換を禁止する(追い出しを禁止
する)ことを指定する置換禁止フラグを設ける技術が開
示されている。
As a prior application based on such a policy, Japanese Patent Application Laid-Open No. 4-338848 discloses a TLB entry.
A technique of providing a replacement prohibition flag for designating prohibition of replacement (prohibition of eviction) of the TLB entry is disclosed.

【0013】また、特開平6−348595号公報に
は、複数のキャッシュセットそれぞれに当該キャッシュ
セットの置換を禁止することができる置換禁止フラグを
設ける手段と、上記複数のキャッシュセットの各置換禁
止フラグを集約して、一つの追い出しエントリを選択す
る手段を有する技術が開示されている。
Japanese Patent Application Laid-Open No. 6-348595 discloses means for providing a replacement prohibition flag for prohibiting replacement of a plurality of cache sets, and a replacement prohibition flag for each of the plurality of cache sets. Have been disclosed that have a means for selecting one eviction entry by integrating the eviction entries.

【0014】さらに、特開平7−28706号公報に
は、キャッシュ中のキャッシュラインに、当該キャッシ
ュラインの優先度を指定する領域を設置する技術が開示
されている。
Furthermore, Japanese Patent Application Laid-Open No. 7-28706 discloses a technique for setting an area for designating the priority of a cache line in a cache line in the cache.

【0015】[0015]

【発明が解決しようとする課題】従来のキャッシュ装置
における上記のcache属性下のLRUアルゴリズム
では、キャッシュアクセスの頻度が唯一の決定因子とな
ってリプレースされるブロックが決定される。このた
め、該ブロックを格納しているキャッシュセット(キャ
ッシュの組)も自動的に決定される。従って、キャッシ
ュ状態と実行プログラムとの間の整合性に、不本意なア
ンマッチが生じた際などには、リプレースしない方が良
いのにリプレースされてしまったり、或いはこれとは逆
に、リプレースした方が良いのにリプレースされなかっ
たりすることがある。これが原因でスラッシングと呼ば
れる現象を発生し、本来ならば不要と思えるリプレース
が多発し、処理性能が低下する場合がある。
In the LRU algorithm under the cache attribute in the conventional cache device, the block to be replaced is determined based on the frequency of cache access as the sole determinant. Therefore, a cache set (a set of caches) storing the block is automatically determined. Therefore, when undesired unmatches occur in the consistency between the cache state and the execution program, it is better not to replace, but instead, it is replaced. May be good but not replaced. As a result, a phenomenon called thrashing occurs, and a number of replacements that are originally unnecessary may occur frequently, and the processing performance may decrease.

【0016】最適化フェーズを備えたコンパイラや、O
Sを用いて最適化したコードを使用した場合であって
も、上記の通りキャッシュ状態によっては、最適化が効
果を発揮しないことがある。
A compiler with an optimization phase, O
Even when the code optimized using S is used, the optimization may not be effective depending on the cache state as described above.

【0017】すなわち、従来技術では、キャッシュ内で
のリプレーシングの必要が生じた時に、リプレースが実
行されるキャッシュセットは、システム固有のリプレー
シング・アルゴリズム(通常はLRU論理)に従って強
制的に指定される。該リプレースされるキャッシュセッ
トを最適化フェーズを備えたコンパイラ等によって生成
される実行プログラム上から動的に指定することが出来
ない。このため、上記のようなリプレースが多発し、処
理性能が低下する場合があった。
That is, in the prior art, when the need for replacement in the cache arises, the cache set to be replaced is forcibly specified according to a system-specific replacement algorithm (usually LRU logic). You. The cache set to be replaced cannot be dynamically specified from an execution program generated by a compiler or the like having an optimization phase. For this reason, the above-mentioned replacement often occurs, and the processing performance may be reduced.

【0018】そこで、本発明に際して、従来のリプレー
シング・アルゴリズムを適用するモードとは別のモード
として、リプレースされるキャッシュセットを、実行プ
ログラム上の命令セット(通常はロード命令)から指定
出来る手段を与えることが検討された。
Therefore, in the present invention, as a mode different from the mode to which the conventional replacing algorithm is applied, means for designating a cache set to be replaced from an instruction set (usually a load instruction) on an execution program is provided. Giving was considered.

【0019】なお、特開平4−338848号公報に開
示されている技術は、追い出し禁止指定がなされるブロ
ックに対応して複数のキャッシュセットのいずれかを選
択する技術ではない。
The technique disclosed in Japanese Patent Application Laid-Open No. 4-338848 is not a technique for selecting any one of a plurality of cache sets corresponding to a block for which eviction prohibition is specified.

【0020】また、特開平6−348595号公報に開
示されている技術は、TLBを使用していないし、上記
公報と同様に、追い出し禁止指定がなされるブロックに
対応して複数のキャッシュセットのいずれかを選択する
技術ではない。
The technique disclosed in Japanese Patent Application Laid-Open No. 6-348595 does not use a TLB and, like the above-mentioned publication, uses any of a plurality of cache sets corresponding to a block for which eviction prohibition is specified. It is not a technology to choose.

【0021】さらに、特開平7−28706号公報に開
示されている技術は、やはり上記公報と同様にTLBを
使用していないし、追い出し禁止指定ではなく優先度指
定がなされる。
Further, the technique disclosed in Japanese Patent Application Laid-Open No. 7-28706 does not use the TLB similarly to the above-mentioned publication, and specifies a priority instead of a prohibition of eviction.

【0022】本発明は、以上のような従来のキャッシュ
メモリ装置における問題点に鑑みてなされたものであ
り、プログラマーによる置換アルゴリズムの実施手段を
実現することができるキャッシュメモリ装置とその方法
を提供することを目的とする。
The present invention has been made in view of the above-mentioned problems in the conventional cache memory device, and provides a cache memory device and a method thereof capable of realizing a means for executing a replacement algorithm by a programmer. The purpose is to:

【0023】[0023]

【課題を解決するための手段】上記の課題を解決するた
めに、この発明の第1の観点に係るキャッシュメモリ装
置は、複数個のキャッシュセットを持つセットアソシア
ティブ方式のキャッシュメモリと、仮想アドレスの一部
と前記キャッシュメモリ内エントリとの対応をアドレス
変換情報として持つ高速変換緩衝機構と、所定の置換論
理でリプレーシング制御を実行する制御回路を備えたキ
ャッシュメモリ装置を持つ、仮想記憶方式のプロセッサ
において、前記高速変換緩衝機構の各エントリは、当該
エントリに対応したブロックのデータについて、前記キ
ャッシュメモリ装置内のキャッシュセット又はキャッシ
ュセットのグループを指定する指定値を格納するための
指定ビット領域を備え、前記制御回路は、前記高速変換
緩衝機構のエントリの指定ビット領域に、前記指定値が
格納されている場合に、前記指定値により指定されたキ
ャッシュセット又はキャッシュセットのグループを選択
する、ことを特徴とする。
In order to solve the above-mentioned problems, a cache memory device according to a first aspect of the present invention includes a set associative cache memory having a plurality of cache sets, and a virtual address storage device. A virtual memory type processor having a high-speed translation buffer mechanism having a correspondence between a part and an entry in the cache memory as address translation information, and a cache memory device including a control circuit for executing replacing control with a predetermined replacement logic. In the above, each entry of the high-speed conversion buffer mechanism has a designated bit area for storing a designated value that designates a cache set or a group of cache sets in the cache memory device for data of a block corresponding to the entry. , The control circuit includes an input of the high-speed conversion buffer mechanism. The designated bit region of, when the designated value is stored, selects a group of the specified cache set or cache set by the specified value, characterized in that.

【0024】この構成によれば、指定ビットにより、前
記キャッシュメモリ内のキャッシュセット又はキャッシ
ュセットのグループを直接指定することができる。この
指定ビットにより、当該エントリに対応するブロックの
最適な制御方法がプログラマーによって把握されている
場合などに、最適制御方法を実現する手段をプログラマ
ーに与えることができる。
According to this configuration, it is possible to directly designate a cache set or a group of cache sets in the cache memory by the designation bit. The designation bits can provide the programmer with a means for implementing the optimum control method when the programmer knows the optimum control method for the block corresponding to the entry.

【0025】前記高速変換緩衝機構のエントリの指定ビ
ット領域は、当該エントリがキャシュメモリを使用する
か否かを指定する情報、例えば、キャッシュコヒーレン
シー属性を示すビットと、使用するキャッシュセットま
たはキャッシュセットのグループを選択する情報とを格
納してもよい。
The specified bit area of the entry of the high-speed conversion buffer mechanism includes information for specifying whether the entry uses a cache memory, for example, a bit indicating a cache coherency attribute, a cache set to be used, or a cache set of the cache set. Information for selecting a group may be stored.

【0026】この場合、前記高速変換緩衝機構のエント
リの指定ビット領域の大きさは、キャッシュセット或い
はキャッシュセットのグループを指定する情報と、キャ
ッシュ・コヒーレンシー属性を示す情報との両方を意味
付けするに必要十分なビット数として設置することがで
きる。このようなビット構成とすることにより、両者を
それぞれ別の領域で指定するよりも高速変換緩衝機構の
各エントリの必要ビット数が節約できる。
In this case, the size of the designated bit area of the entry of the high-speed conversion buffer mechanism means both information for specifying a cache set or a group of cache sets and information for indicating a cache coherency attribute. The number of bits can be set as necessary and sufficient. With such a bit configuration, the required number of bits of each entry of the high-speed conversion buffer mechanism can be reduced as compared with the case where both are designated in different areas.

【0027】データをブロック単位で記憶すると共に各
ブロックのデータの仮想アドレスと物理アドレスと該ブ
ロックがいずれのキャッシュセット又はキャッシュセッ
トのグループを使用するかを示す指定値とを対応付けて
記憶するアドレス変換テーブルを記憶する主メモリを配
置してもよい。前記制御回路は、前記キャッシュ装置で
ミスヒットとなった場合に、アクセス対象のデータの主
メモリ内の物理アドレスを判別し、判別した物理アドレ
スに位置するブロックデータを、指定値が示すキャッシ
ュセット又はキャッシュセットのグループにリプレース
する。
An address for storing data in units of blocks and for associating a virtual address and a physical address of data of each block with a designated value indicating which cache set or group of cache sets the block uses. A main memory for storing the conversion table may be arranged. The control circuit, when a miss occurs in the cache device, determines a physical address in the main memory of the data to be accessed, a block data located at the determined physical address, a cache set indicated by a specified value or Replace with a group of cache sets.

【0028】データを前記主メモリにロードする際に、
前記アドレス変換テーブルに、ロードするデータブロッ
クの仮想アドレスと主メモリ内の物理アドレスと該ブロ
ックがいずれのキャッシュセット又はキャッシュセット
のグループを使用するかを示す指定値とを対応付けて格
納する手段を備えてもよい。この構成によれば、主メモ
リにデータをロードする際等に、そのブロックがロード
されるキャッシュセット又はキャッシュセットのグルー
プを指定値により特定することができる。
When loading data into the main memory,
Means for storing, in the address translation table, a virtual address of a data block to be loaded, a physical address in main memory, and a designated value indicating which cache set or group of cache sets the block uses, May be provided. According to this configuration, when data is loaded into the main memory or the like, a cache set or a group of cache sets into which the block is loaded can be specified by the specified value.

【0029】前記キャッシュセット又はキャッシュセッ
トのグループと実質的に同一の容量のデータブロック
に、同一の指定値を設定することにより、前記キャッシ
ュセット又はキャッシュセットのグループをリプレース
の起こらない高速メモリとして使用することができる。
By setting the same designated value to a data block having substantially the same capacity as the cache set or the cache set group, the cache set or the cache set group is used as a high-speed memory that does not cause replacement. can do.

【0030】前記制御回路は、前記指定値がキャッシュ
セットのグループ、例えば、2つのキャッシュセットを
指定している場合に、指定されたグループ内のキャッシ
ュセットを所定の置換論理、例えば、LRUアルゴリズ
ムに従って、選択してリプレース処理を行うようにして
もよい。この場合、キャッシュセットを指定してリプレ
ーシング処理する機能と、従来の置換論理を適用してリ
プレーシング処理する機能とを折衷することができる。
When the specified value specifies a group of cache sets, for example, two cache sets, the control circuit converts the cache sets in the specified group according to a predetermined replacement logic, for example, an LRU algorithm. May be selected to perform the replacement process. In this case, it is possible to compromise between the function of performing the replacement process by specifying the cache set and the function of performing the replacement process by applying the conventional replacement logic.

【0031】前記主メモリのエントリの指定ビット領域
内の指定値は、実行プログラム中の所定の命令セットの
実行によって格納されたものであってもよい。
The designated value in the designated bit area of the entry in the main memory may be stored by executing a predetermined instruction set in an execution program.

【0032】また、この発明の第2の観点にかかるキャ
ッシュメモリ装置は、複数個のキャッシュセットを有す
るセットアソシアティブ方式のキャッシュメモリと、デ
ータをブロック単位で記憶する主メモリと、前記主メモ
リにデータのブロックをロードする際に、該データブロ
ックについて、該データブロックが使用する前記キャッ
シュメモリのキャッシュセット又はキャッシュセットの
グループを指定する指定データを設定する手段と、前記
主メモリ上のデータブロックを前記キャッシュメモリに
格納する際に、対応する指定データに従ってキャッシュ
セット又はキャッシュセットのグループを選択し、選択
したキャッシュセットに該データブロックを格納する制
御手段と、を備えることを特徴とする。
A cache memory device according to a second aspect of the present invention includes a set associative cache memory having a plurality of cache sets, a main memory for storing data in block units, and a data memory in the main memory. Means for setting, for the data block, designation data for designating a cache set or a group of cache sets of the cache memory used by the data block; and setting the data block on the main memory to A control unit for selecting a cache set or a group of cache sets according to corresponding designated data when storing the data block in the cache memory, and storing the data block in the selected cache set.

【0033】この構成によれば、主メモリ上のデータを
格納するキャッシュセットを、指定することができる。
指定データの設定を適切に行うことにより、キャッシュ
メモリのヒット率を向上することができる。
According to this configuration, a cache set for storing data on the main memory can be specified.
By appropriately setting the designated data, the hit rate of the cache memory can be improved.

【0034】また、この発明の第3の観点にかかるキャ
ッシュメモリ装置は、ブロック単位でデータを記憶する
主メモリと、複数個のキャッシュセットを持ち、主メモ
リ上のデータの写しを記憶するキャッシュメモリと、仮
想アドレスを物理アドレスに変換するアドレス変換手段
と、キャッシュミスヒットが発生した場合に、所定の置
換論理で、ブロック単位で、キャッシュメモリ上のデー
タを主メモリ上のデータにリプレーシングする制御回路
と、を備えたキャッシュメモリ装置において、アドレス
変換手段は、各ブロックのデータについて、前記キャッ
シュメモリ装置内のキャッシュセット又はキャッシュセ
ットのグループを指定する指定情報を含み、前記制御回
路は、リプレース対象のデータブロックについて、アド
レス変換手段に指定情報が設定されている場合に、指定
情報により指定されたキャッシュセット又はキャッシュ
セットのグループを選択して、該当するブロックのデー
タをリプレースする、ことを特徴とする。
A cache memory device according to a third aspect of the present invention has a main memory for storing data in block units, a cache memory having a plurality of cache sets and storing a copy of data on the main memory. Address conversion means for converting a virtual address into a physical address, and control for replacing data in the cache memory with data in the main memory in units of blocks by a predetermined replacement logic when a cache mishit occurs. Wherein the address translation means includes, for each block of data, designation information for designating a cache set or a group of cache sets in the cache memory device, wherein the control circuit For the data block of If the information is set by selecting a group of the specified cache set or cache set by the designation information, to replace the data of the corresponding block, and wherein the.

【0035】前記指定情報は、対応するデータブロック
がキャシュメモリを使用するか否かを指定する情報と使
用するキャッシュセットまたはキャッシュセットのグル
ープを選択する情報とを含んでもよい。
The specification information may include information for specifying whether or not the corresponding data block uses the cache memory and information for selecting a cache set or a group of cache sets to be used.

【0036】前記アドレス変換手段は、例えば、前記主
メモリ上に配置され、各ブロックのデータの仮想アドレ
スと物理アドレスと該ブロックがいずれのキャッシュセ
ット又はキャッシュセットのグループを使用するかを示
す指定値とを対応付けて記憶するアドレス変換テーブル
と、前記アドレス変換テーブルの写しを記憶する高速変
換緩衝機構と、を備える。
The address conversion means is, for example, arranged on the main memory, and specifies a virtual address and a physical address of data of each block and a designated value indicating which cache set or group of cache sets the block uses. And a high-speed conversion buffer mechanism for storing a copy of the address conversion table.

【0037】供給された仮想アドレスを前記高速変換緩
衝機構により物理アドレスに変換し、高速変換緩衝機構
でミスヒットとなった場合に、アドレス変換テーブルで
物理アドレスに変換する手段と、前記高速変換緩衝機構
またはアドレス変換テーブルにより変換された物理アド
レスを用いて前記キャッシュメモリをアクセスするアク
セス手段と、をさらに配置し、前記アクセス手段により
アクセスされたキャッシュメモリで、キャッシュミスと
なった場合に、前記制御回路は、判別した物理アドレス
に位置する主メモリ上のブロックデータを、指定値が示
すキャッシュセット又はキャッシュセットのグループに
リプレースするようにしてもよい。
Means for converting the supplied virtual address into a physical address by the high-speed translation buffer mechanism, and converting the virtual address into a physical address by using an address translation table in the event of a mishit in the high-speed translation buffer mechanism; And an access unit for accessing the cache memory using a physical address converted by a mechanism or an address conversion table, wherein the cache memory accessed by the access unit is configured to perform the control when a cache miss occurs. The circuit may replace the block data on the main memory located at the determined physical address with the cache set or the cache set group indicated by the specified value.

【0038】また、この発明の第4の観点にかかるキャ
ッシュメモリ制御方法は、複数個のキャッシュセットを
持つセットアソシアティブ方式のキャッシュメモリと、
仮想アドレスの一部と前記キャッシュメモリ内エントリ
との対応をアドレス変換情報として持つ高速変換緩衝機
構とを備えたキャッシュメモリ装置を制御するキャッシ
ュメモリ制御方法であって、前記高速変換緩衝機構の各
エントリに、当該エントリに対応したブロックのデータ
について、前記キャッシュメモリ内のキャッシュセット
又はキャッシュセットのグループを指定する指定値を格
納するための指定ビット領域を配置し、前記高速変換緩
衝機構のエントリの指定ビット領域に、前記指定値が格
納されている場合に、前記指定値により指定されたキャ
ッシュセット又はキャッシュセットのグループを選択す
る、ことを特徴とする。
A cache memory control method according to a fourth aspect of the present invention includes a set associative cache memory having a plurality of cache sets;
A cache memory control method for controlling a cache memory device including a high-speed translation buffer mechanism having a correspondence between a part of a virtual address and an entry in the cache memory as address translation information, wherein each entry of the high-speed translation buffer mechanism is controlled. A designation bit area for storing a designation value for designating a cache set or a group of cache sets in the cache memory for data of a block corresponding to the entry; When the specified value is stored in the bit area, a cache set or a group of cache sets specified by the specified value is selected.

【0039】主メモリ上の各データブロックに、コンパ
イラ、OS、ロードプログラムなどにより、そのデータ
ブロックのリプレーシング処理に先立ち、予め指定ビッ
トを付加しておいてもよい。
Each data block on the main memory may have a designated bit added thereto in advance by a compiler, an OS, a load program, or the like, before the data block is replaced.

【0040】また、指定ビットがキャッシュセットのグ
ループを指定している場合に、グループ内のキャッシュ
セットを所定の置換論理で選択してリプレース処理を行
うようにしてもよい。この場合、キャッシュセットを指
定してリプレーシング処理する機能と、LRUなどの従
来の置換論理を適用してリプレーシング処理する機能と
を部分的に折衷することができる。
When the designated bit designates a cache set group, the cache set in the group may be selected by a predetermined replacement logic to perform a replacement process. In this case, it is possible to partially compromise the function of performing the replacement processing by designating the cache set and the function of performing the replacement processing by applying the conventional replacement logic such as LRU.

【0041】[0041]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。 (第1の実施の形態)図1は、本発明の第1の実施の形
態に係るコンピュータ装置の、構成を示す図である。図
示するように、このコンピュータ装置は、CPU(中央
処理装置)1と、主メモリ2と、キャッシュメモリ3
と、MMU(メモリマネージメントユニット)4と、セ
レクタ5と、コントローラ6と、複数の周辺装置7、と
を備える。
Embodiments of the present invention will be described below with reference to the drawings. (First Embodiment) FIG. 1 is a diagram showing a configuration of a computer device according to a first embodiment of the present invention. As shown in the figure, this computer device includes a CPU (Central Processing Unit) 1, a main memory 2, a cache memory 3
, An MMU (memory management unit) 4, a selector 5, a controller 6, and a plurality of peripheral devices 7.

【0042】CPU1は、このコンピュータ装置の中核
となる処理装置である。主メモリ2は、各種プログラ
ム、データなどを格納するための揮発性メモリであり、
仮想アドレス(論理アドレス)を物理アドレス(主メモ
リ2上の格納位置)に変換するためのアドレス変換テー
ブル21が置かれている。
The CPU 1 is a processing device which is a core of the computer device. The main memory 2 is a volatile memory for storing various programs, data, and the like.
An address conversion table 21 for converting a virtual address (logical address) into a physical address (a storage position on the main memory 2) is provided.

【0043】キャッシュメモリ3は、主メモリ2よりも
高速アクセス可能な、例えば、SRAMなどから構成さ
れる高速メモリであり、主メモリ2上のデータ、プログ
ラム等の複製を記憶する。キャッシュメモリ3は、第0
のキャッシュセット31と第1のキャッシュセット32
と制御回路(キャッシュ制御回路)39とから構成され
ている。第0キャッシュメモリ31と第1キャッシュメ
モリ32との各キャッシュラインには、有効ビットV
と、タグ(物理タグ)Tagと、データDataとが格
納されている。キャッシュ制御回路39は、MMU4か
ら供給されるデータに従って、第0キャッシュセット3
1または第1キャッシュセット32をアクセスし、ま
た、必要に応じて、リプレース処理を行う。
The cache memory 3 is a high-speed memory, such as an SRAM, which can be accessed at a higher speed than the main memory 2 and stores a copy of data, programs, and the like on the main memory 2. The cache memory 3 is
Cache set 31 and first cache set 32
And a control circuit (cache control circuit) 39. Each cache line of the 0th cache memory 31 and the first cache memory 32 has a valid bit V
, A tag (physical tag) Tag, and data Data. The cache control circuit 39 determines the 0th cache set 3 according to the data supplied from the MMU 4.
The first or first cache set 32 is accessed, and a replacement process is performed as necessary.

【0044】MMU4は、CPU1等からの仮想アドレ
スによるアクセスの要求を受けて、主メモリ2、キャッ
シュメモリ3,などに対するアクセスを管理するための
ものであり、TLB41を備える。
The MMU 4 is for managing access to the main memory 2, the cache memory 3, and the like in response to a request for access by a virtual address from the CPU 1 or the like, and includes the TLB 41.

【0045】TLB41は、図2に示すように、複数の
エントリを備え、各エントリには、仮想ページアドレス
VPN(Virtual Page Number)
と、物理ページアドレスPFN(Page Frame
Number)と、有効ビットVと、拡張Cビットと
が対応付けて格納されている。
As shown in FIG. 2, the TLB 41 has a plurality of entries, and each entry has a virtual page address VPN (Virtual Page Number).
And the physical page address PFN (Page Frame)
Number), a valid bit V, and an extended C bit are stored in association with each other.

【0046】仮想ページアドレスVPNは、参照される
仮想空間上の所定サイズのデータブロック(内容は命令
コード、データなど)であるページのアドレスであり、
仮想アドレスの上位ビットから構成される。物理ページ
アドレスPFNは、対応するデータブロックが格納され
ている物理領域のアドレスであり、物理アドレスの上位
ビットから構成される。有効ビットVは、該当エントリ
の内容が有効であるか無効であるかを示すビットであ
る。
The virtual page address VPN is the address of a page which is a data block of a predetermined size (contents are an instruction code, data, etc.) in the referenced virtual space.
It consists of the upper bits of the virtual address. The physical page address PFN is the address of the physical area where the corresponding data block is stored, and is composed of the upper bits of the physical address. The valid bit V is a bit indicating whether the content of the entry is valid or invalid.

【0047】拡張Cビットは、従来のキャッシュ・コヒ
ーレンシー属性を示すC(Coherency)ビット
の情報にキャッシュセットを指定する情報を付加した情
報である。本実施の形態においては、拡張Cビットが”
00”の場合は、図6に示す従来のキャッシュのCビッ
トが”0”の場合と同じで、uncache属性を示
し、該エントリに対応するデータブロック(ページ)は
キャッシュを使用しない。
The extended C bit is information obtained by adding information designating a cache set to C (Coherency) bit information indicating a conventional cache coherency attribute. In the present embodiment, the extension C bit is "
The case of "00" is the same as the case where the C bit of the conventional cache shown in FIG. 6 is "0", indicates the uncache attribute, and the data block (page) corresponding to the entry does not use the cache.

【0048】拡張Cビットが”11”の場合は、図6に
示す従来のキャッシュのCビットが”1”の場合と同じ
で、通常のキャッシュアクセス時は、キャッシュ制御回
路39により第0または第1のキャッシュセット31,
32のうち物理アドレスに対応するエリアが有するもの
が選択されて使用され、キャッシュリプレース時は、L
RUアルゴリズムに基づいて第0または第1のキャッシ
ュセット31,32の一方が選択されて使用される。
When the extension C bit is "11", it is the same as the case where the C bit of the conventional cache shown in FIG. 6 is "1". 1 cache set 31,
32, the one in the area corresponding to the physical address is selected and used.
One of the zeroth or first cache set 31, 32 is selected and used based on the RU algorithm.

【0049】また、上記の拡張Cビットが”01の場合
は、セレクタ5により、拡張Cビットが”01”の場合
は第0キャッシュセット11が、”10”の場合は第1
キャッシュセット32が、それぞれ選択される。
When the above-mentioned extended C bit is “01”, the selector 5 sets the 0th cache set 11 when the extended C bit is “01” and the first cache set when it is “10”.
Each of the cache sets 32 is selected.

【0050】上記の拡張Cビットは、プログラム中の命
令セット、通常は、参照するブロックのアドレス情報を
アドレス変換テーブル21からキャッシュメモリ3へロ
ードするロード命令によって、その値を設定することが
可能である。また、主メモリ2にデータをロードする際
に、アドレス変換テーブル21上に、予めの拡張Cビッ
トを設定してもよい。また、ユーザが、専用ツールを用
いて、主メモリ2上の特定領域のデータブロックについ
て、拡張Cビットを設定してもよい。
The value of the above-mentioned extended C bit can be set by an instruction set in a program, usually, a load instruction for loading the address information of the block to be referenced from the address conversion table 21 into the cache memory 3. is there. When data is loaded into the main memory 2, an extended C bit may be set on the address conversion table 21 in advance. Further, the user may set the extended C bit for the data block in the specific area on the main memory 2 by using a special tool.

【0051】セレクタ5は、MMU4から出力されるデ
ータに含まれている拡張Cビットの値に従って、第0の
キャッシュセット31と第1のキャッシュセット32の
一方を選択する。
The selector 5 selects one of the 0th cache set 31 and the first cache set 32 according to the value of the extended C bit included in the data output from the MMU 4.

【0052】コントローラ6は、供給されたアドレスな
どに基づいて、メインメモリ2及び周辺回路6の動作を
制御する。また、コントローラ6は、前述の拡張Cビッ
トが”11”の場合に、第0キャッシュセット31と第
1キャッシュセット32との一方をアクティブとする。
The controller 6 controls the operation of the main memory 2 and the peripheral circuit 6 based on the supplied address and the like. When the above-mentioned extended C bit is “11”, the controller 6 activates one of the zeroth cache set 31 and the first cache set 32.

【0053】周辺装置7は、ディスク装置、表示装置な
どから構成されている。
The peripheral device 7 includes a disk device, a display device, and the like.

【0054】図3に、拡張Cビットが予め設定されてい
るタイプのアドレス変換テーブル21の一例を示す。図
示するように、このアドレス変換テーブル21は、複数
のエントリを備え、各エントリには、仮想ページアドレ
スと、物理ページアドレスと、拡張Cビットとが対応付
けて登録されている。
FIG. 3 shows an example of an address conversion table 21 of a type in which the extension C bit is set in advance. As shown in the figure, the address conversion table 21 includes a plurality of entries, and in each entry, a virtual page address, a physical page address, and an extended C bit are registered in association with each other.

【0055】各拡張Cビットは、第0キャッシュセット
31と第1キャッシュセット32の使用目的に応じて、
ユーザの個別設定、アセンブラの実行、コンパイラの実
行などにより任意に設定できる。
Each extended C bit is set according to the purpose of use of the 0th cache set 31 and the first cache set 32.
It can be set arbitrarily by user's individual setting, execution of assembler, execution of compiler, etc.

【0056】例えば、あるプログラムを実行する際に、
主メモリ2上の特定のエリアのデータを第0キャッシュ
セット31又は第1キャッシュセット32に常駐させる
場合には、そのエリアの拡張Cビットに”01”又は”
10”を設定する。また、あるプログラムを実行する際
に、主メモリ2上の第0キャッシュセット31と同一サ
イズの領域の拡張Cビットに全て”01”を設定し、第
1キャッシュセット32と同一サイズの領域の拡張Cビ
ットに全て”10”を設定することにより、第0キャッ
シュセット31と第1キャッシュセット32を、リプレ
ースの起こらない高速メモリとして使用することも可能
である。
For example, when executing a program,
When data of a specific area on the main memory 2 is made to reside in the 0th cache set 31 or the first cache set 32, "01" or "01" is set in the extended C bit of the area.
10 ". When a certain program is executed, all the extended C bits of the area of the same size as the 0th cache set 31 on the main memory 2 are set to" 01 ", and the first cache set 32 By setting all the extension C bits of the same size area to “10”, the 0th cache set 31 and the 1st cache set 32 can be used as a high-speed memory that does not cause replacement.

【0057】キャッシュメモリ3を使用すると、ミスヒ
ットの確率が非常に高く、頻繁にリプレースを繰り返す
ことによってかえって効率が低下するような場合には、
拡張Cビットを”00”として、キャッシュメモリ3を
使用しないようにすることも有効である。
When the cache memory 3 is used, the probability of a mishit is very high, and if the efficiency is reduced by frequent replacement,
It is also effective to set the extended C bit to “00” so that the cache memory 3 is not used.

【0058】さらに、通常のLRUアルゴリズムに基づ
いて、キャッシュメモリ3の内容をリプレースする場合
には、拡張Cビットを”11”とする。
Further, when replacing the contents of the cache memory 3 based on the normal LRU algorithm, the extension C bit is set to "11".

【0059】以下、本実施の形態に係るキャッシュメモ
リ装置の動作を図4を参照して説明する。CPU1が、
主メモリ2をアクセスするために、MMU4に出力した
仮想アドレスの上位アドレス(仮想上位アドレス)VP
N(Virtual PageNumber)は、TL
B41へ入力され、TLB41の複数のエントリのう
ち、入力された仮想上位アドレスVPNに一致するVP
Nを備えるTLBエントリが存在するか否かが判別され
る。該当するエントリが存在する場合、バリッドビット
Vが”1”(有効)を示しているか否かを判別する。
Hereinafter, the operation of the cache memory device according to the present embodiment will be described with reference to FIG. CPU1
In order to access the main memory 2, the upper address (virtual upper address) VP of the virtual address output to the MMU 4
N (Virtual Page Number) is TL
B41 which is inputted to B41 and which matches the inputted virtual upper address VPN among the plurality of entries of TLB41.
It is determined whether there is a TLB entry having N. If the corresponding entry exists, it is determined whether or not the valid bit V indicates “1” (valid).

【0060】入力された仮想上位アドレスVPNに一致
するVPNを備えるTLBエントリが存在し、且つ、そ
のエントリのバリッドビットVが1(有効)を示してい
る場合、TLBヒットである。この場合、MMU4は、
該当するエントリに登録されている物理ページアドレス
PFNと仮想アドレスの下位アドレス(ページ内アドレ
ス)とを連結して、物理アドレスを求めて、Cビットと
共に出力する。
If there is a TLB entry having a VPN that matches the input virtual upper address VPN and the valid bit V of the entry indicates 1 (valid), it is a TLB hit. In this case, MMU4
By linking the physical page address PFN registered in the corresponding entry and the lower address (in-page address) of the virtual address, a physical address is obtained and output together with the C bit.

【0061】一方、TLBミスヒットの場合は、MMU
4は、コントローラ6を介して主メモリ2上のアドレス
変換テーブル21を参照して、CPU1がMMU4に出
力した仮想上位アドレスVPNに一致するVPNを備え
るエントリを検出し、その内容を取り込む。MMU4
は、取り込んだエントリに登録されている物理ページア
ドレスPFNと下位アドレスとを連結して、物理アドレ
スを求め、拡張Cビットと共に出力する。なお、TLB
ミスヒットの場合に、TLBリプレースアルゴリズムに
従って、TLB41内のテーブルをアドレス変換テーブ
ル21の内容に置換することも可能である。
On the other hand, in the case of a TLB miss, the MMU
Reference numeral 4 refers to the address translation table 21 on the main memory 2 via the controller 6, detects an entry having a VPN that matches the virtual higher-order address VPN output by the CPU 1 to the MMU 4, and fetches the contents. MMU4
Concatenates the physical page address PFN registered in the fetched entry with the lower address, obtains the physical address, and outputs it together with the extended C bit. In addition, TLB
In the case of a mishit, the table in the TLB 41 can be replaced with the contents of the address translation table 21 according to the TLB replacement algorithm.

【0062】MMU4が出力した拡張Cビットが”0
0”の場合、すなわち、uncache属性が指定され
ている場合、セレクタ5は、第0キャッシュセット31
と第1キャッシュセット32のいずれをもイネーブル状
態としない(セレクトしない)。従って、キャッシュメ
モリ3へのアクセスは行われない。MMU4は、コント
ローラ6を介して、物理アドレスが指示する主メモリ2
上の位置にアクセスし、データを読み出し又はデータを
書き込む。
When the extended C bit output from the MMU 4 is "0"
0 ”, that is, when the uncache attribute is specified, the selector 5 sets the 0th cache set 31
And the first cache set 32 are not enabled (not selected). Therefore, access to the cache memory 3 is not performed. The MMU 4 controls the main memory 2 designated by the physical address via the controller 6.
Access the upper position to read data or write data.

【0063】一方、MMU4が出力した拡張Cビット
が”01”の場合、セレクタ5は、第0キャッシュセッ
ト31のみをアクティブ状態とする。キャッシュ制御回
路39は、下位アドレスに対応する第0キャッシュセッ
ト31のキャシュラインのTagが、MMU4から供給
された物理アドレスの上位アドレスと一致し、且つ、バ
リッドビットVが”1”(有効)であるか否か、すなわ
ち、第0キャッシュセット31上でキャッシュがヒット
するか否かを判別する。
On the other hand, when the extension C bit output from the MMU 4 is “01”, the selector 5 activates only the 0th cache set 31. The cache control circuit 39 determines that the tag of the cache line of the 0th cache set 31 corresponding to the lower address matches the upper address of the physical address supplied from the MMU 4 and that the valid bit V is “1” (valid). It is determined whether or not there is, that is, whether or not the cache hits on the 0th cache set 31.

【0064】キャッシュ制御回路39は、キャッシュヒ
ットであると判別すると、物理アドレスに基づいて、そ
のキャッシュラインにアクセス(データの読み出し・書
き込み)を行う。
When determining that there is a cache hit, the cache control circuit 39 accesses (reads and writes data) the cache line based on the physical address.

【0065】一方、データ読み出しの場合は、キャッシ
ュ制御回路39は、キャッシュミスヒットであると判別
した場合、キャッシュリプレースを行うため、MMU4
にその旨を通知する。この通知に従って、MMU4は、
コントローラ6を介して主メモリ2から、物理ページア
ドレスに対応するデータを読み出して、キャッシュメモ
リ3に供給する。キャッシュ制御回路39は、主メモリ
2から読み出されたデータを、セレクタ5により選択さ
れている第0キャッシュセット31にコピー(リプレー
ス)する。MMU4は、第0キャッシュセット31のリ
プレースされたキャッシュラインからデータを読み出
す。
On the other hand, in the case of data reading, when the cache control circuit 39 determines that there is a cache mishit, the MMU 4
To that effect. In accordance with this notification, MMU 4
Data corresponding to the physical page address is read from the main memory 2 via the controller 6 and supplied to the cache memory 3. The cache control circuit 39 copies (replaces) the data read from the main memory 2 to the 0th cache set 31 selected by the selector 5. The MMU 4 reads data from the replaced cache line of the 0th cache set 31.

【0066】データ書き込みの場合は、キャッシュ制御
回路39は、キャッシュミスヒットであると判別した場
合、セレクタ5により選択されている第0キャッシュセ
ット31に書き込みを行うと同時に、MMU4にその旨
を通知する。この通知に従って、MMU4は、コントロ
ーラ6を介して主メモリ2の物理ページアドレスに対応
するデータを書きこむ。
In the case of data writing, when the cache control circuit 39 determines that there is a cache mishit, it writes the 0th cache set 31 selected by the selector 5 and notifies the MMU 4 at the same time. I do. According to this notification, the MMU 4 writes data corresponding to the physical page address of the main memory 2 via the controller 6.

【0067】一方、MMU4が出力した拡張Cビット
が”10”の場合、セレクタ5は、拡張Cビットに従っ
て、第1キャッシュセット32のみをアクティブ状態と
する。キャッシュ制御回路39は、MMU4から供給さ
れた物理アドレスの上位アドレス(PFN)に対応する
tagを有し、且つ、バリッドビットVが”1”(有
効)のキャッシュラインが、アクティブ状態にある第1
キャッシュセット32上に存在するか否か、すなわち、
第1キャッシュセット32上でキャッシュがヒットする
か印加を判別する。
On the other hand, when the extension C bit output from the MMU 4 is “10”, the selector 5 activates only the first cache set 32 according to the extension C bit. The cache control circuit 39 has a tag corresponding to the upper address (PFN) of the physical address supplied from the MMU 4, and the cache line whose valid bit V is "1" (valid) is in the active state.
Whether it exists on the cache set 32, that is,
It is determined whether a cache hit occurs on the first cache set 32 or not.

【0068】キャッシュ制御回路39は、キャッシュヒ
ットと判別すれば、そのキャッシュラインにアクセス
(データの読み出し・書き込み)を行う。
If the cache control circuit 39 determines that there is a cache hit, the cache control circuit 39 accesses (reads and writes data) the cache line.

【0069】一方、キャッシュ制御回路39は、キャッ
シュミスヒットと判別すれば、キャッシュリプレースを
行うため、MMU4にその旨を通知する。
On the other hand, if the cache control circuit 39 determines that there is a cache miss, it notifies the MMU 4 to perform cache replacement.

【0070】MMU4は、通知に従って、コントローラ
6を介して主メモリ2から、物理アドレス(PFN)が
指示するデータブロックを読み出して、キャッシュメモ
リ3に供給する。キャッシュ制御回路39は、主メモリ
2から読み出されたデータブロックをセレクタ5が選択
している第1キャッシュセット32にコピー(リプレー
ス)する。MMU4は、第1キャッシュセット32のリ
プレースされたキャッシュラインからデータを読み出
し、またはそのキャッシュラインにデータを書き込む。
The MMU 4 reads the data block indicated by the physical address (PFN) from the main memory 2 via the controller 6 according to the notification, and supplies the data block to the cache memory 3. The cache control circuit 39 copies (replaces) the data block read from the main memory 2 to the first cache set 32 selected by the selector 5. The MMU 4 reads data from the replaced cache line of the first cache set 32 or writes data to the cache line.

【0071】一方、MMU4が出力した拡張Cビット
が”11”の場合、キャッシュ制御回路39は、MMU
4から供給された物理アドレスの上位アドレスに対応す
るtagを有し、且つ、バリッドビットVが”1”(有
効)であるキャッシュラインが、第0キャッシュセット
31と第1キャッシュセット32のいずれかに存在する
か否かを判別する。MMU4から供給された物理アドレ
スに対応するtagを有し、且つ、バリッドビットV
が”1”(有効)であるキャッシュラインが両キャッシ
ュセットのいずれかに存在すると判別されれば、キャッ
シュヒットである。キャッシュ制御回路39は、そのキ
ャッシュラインにアクセスを行う。
On the other hand, when the extended C bit output from MMU 4 is “11”, cache control circuit 39
The cache line having a tag corresponding to the upper address of the physical address supplied from No. 4 and having a valid bit V of “1” (valid) is one of the 0th cache set 31 and the first cache set 32. It is determined whether or not it exists. It has a tag corresponding to the physical address supplied from the MMU 4 and has a valid bit V
If it is determined that a cache line with "1" (valid) exists in either of the cache sets, it is a cache hit. The cache control circuit 39 accesses the cache line.

【0072】MMU4から供給された物理アドレスに対
応するtagを有するキャッシュラインが第0キャッシ
ュセット31と第1キャッシュセット32とのいずれに
も存在しない場合、又は、存在していても、そのバリッ
ドビットVが”0”(無効)である場合は、キャッシュ
ミスヒットである。この場合には、キャッシュ制御回路
39は、キャッシュリプレースを行うため、MMU4に
その旨を通知する。
If the cache line having the tag corresponding to the physical address supplied from the MMU 4 does not exist in either the 0th cache set 31 or the first cache set 32, or if it exists, the valid bit If V is "0" (invalid), it is a cache miss hit. In this case, the cache control circuit 39 notifies the MMU 4 to perform cache replacement.

【0073】この通知に従って、MMU4は、コントロ
ーラ6を介して、主メモリ2の物理ページアドレスが指
示するエリアから、対応するデータブロックを読み出し
て、キャッシュメモリ3に供給する。キャッシュ制御回
路39は、LRU置換論理に従って、主メモリ2から読
み出されたデータブロックを第0キャッシュセット31
と第1キャッシュセット32とのうち、最も昔に使用さ
れたデータブロック上にコピー(リプレース)する。M
MU4は、リプレースされたキャッシュラインからデー
タを読み出し、またはそのキャッシュラインにデータを
書き込む。
In accordance with this notification, the MMU 4 reads the corresponding data block from the area indicated by the physical page address of the main memory 2 via the controller 6 and supplies the data block to the cache memory 3. The cache control circuit 39 stores the data block read from the main memory 2 in the 0th cache set 31 according to the LRU replacement logic.
The first cache set 32 is copied (replaced) on the data block that has been used the oldest. M
The MU 4 reads data from the replaced cache line or writes data to the cache line.

【0074】このように、この実施の形態によれば、ツ
ールを用いた個別処理、コンパイラの設定、ローディン
グプログラムの処理などにより、主メモリ2上の各デー
タブロック(ページ)について、キャッシュの不使用、
第0キャッシュセット31のみ使用、第1キャッシュセ
ット32のみ使用、LRUによるキャッシュセットの選
択の何れかを設定することができる。すなわち、リプレ
ースするキャッシュセットを直接指定したり、LRUの
アルゴリズムでキャッシュセットを選択して、そのキャ
ッシュセットとリプレースを行うことができるため、キ
ャッシュの特定セットを任意のデータブロックに割り当
てるなどのキャッシュ構造に最適化したコードを、キャ
ッシュの状態に依存せずに作り出すことができる。
As described above, according to this embodiment, the cache is not used for each data block (page) in the main memory 2 by individual processing using a tool, setting of a compiler, processing of a loading program, and the like. ,
One of the use of only the 0th cache set 31, the use of only the first cache set 32, and the selection of a cache set by the LRU can be set. That is, since a cache set to be replaced can be directly specified, or a cache set can be selected by an LRU algorithm and replaced with the cache set, a cache structure such as allocating a specific set of cache to an arbitrary data block can be used. Optimized code can be created independently of the state of the cache.

【0075】また、特定のデータ(群)を任意のキャッ
シュセットに割り当てた場合には、キャッシュ・ミスヒ
ットによるリプレースを排除でき、メモリの高速アクセ
スが可能となる。このような最適化により、キャッシュ
メモリのヒット率を操作し、性能を向上することができ
る。
When specific data (group) is assigned to an arbitrary cache set, replacement due to cache mishit can be eliminated, and high-speed access to the memory becomes possible. Through such optimization, the hit rate of the cache memory can be manipulated, and the performance can be improved.

【0076】(第2の実施の形態)図5は、本発明の第
2の実施の形態に係るキャッシュメモリ装置の全体構成
を示すブロック図である。上記の第1の実施の形態で
は、2個のキャッシュセットが設置され、その拡張Cビ
ットは、2個のキャッシュセットのうちのいずれかを指
定するものであった。本実施の形態では、拡張Cビット
を、キャッシュセットの指定又はキャッシュセットのグ
ループの指定が可能なようにビット拡張する。
(Second Embodiment) FIG. 5 is a block diagram showing an overall configuration of a cache memory device according to a second embodiment of the present invention. In the above-described first embodiment, two cache sets are provided, and the extended C bit specifies one of the two cache sets. In the present embodiment, the extension C bit is extended so that a cache set can be specified or a group of cache sets can be specified.

【0077】図5に示す構成では、拡張Cビットは3ビ
ットであるが、一般には、従来のキャッシュ・コヒーレ
ンシー属性を示す情報に、キャッシュセットの指定又は
キャッシュセットのグループの指定情報を加えた情報を
示すに必要十分なビット数が取られる。この拡張Cビッ
トは、主メモリのアドレス変換テーブルの各エントリに
も設定されている。
In the configuration shown in FIG. 5, the extended C bit is 3 bits. In general, however, information obtained by adding information specifying a cache set or specifying a cache set group to information indicating a conventional cache coherency attribute is used. And the number of bits necessary and sufficient to indicate This extended C bit is also set in each entry of the address conversion table of the main memory.

【0078】以下、本実施の形態に係るキャッシュメモ
リ装置の動作を図5を参照して説明する。CPU1が出
力した仮想アドレスの上位アドレスVPNは、TLB4
1へ入力される。TLBヒットの場合、上位アドレスに
対応する物理ページアドレスPFNと下位アドレスとを
連結して、物理アドレスを求めて、Cビットと共に出力
する。
Hereinafter, the operation of the cache memory device according to the present embodiment will be described with reference to FIG. The upper address VPN of the virtual address output by the CPU 1 is TLB4
1 is input. In the case of a TLB hit, the physical page address PFN corresponding to the upper address and the lower address are connected to obtain a physical address, which is output together with the C bit.

【0079】一方、TLBミスヒットの場合は、主メモ
リ2上のアドレス変換テーブル21を参照して、仮想上
位アドレスVPNに対応する物理ページアドレスPFN
を求め、求めた物理ページアドレスPFNと下位アドレ
スとを連結して、物理アドレスを求め、拡張Cビットと
共に出力する。
On the other hand, in the case of a TLB miss, the physical page address PFN corresponding to the virtual upper address VPN is referred to by referring to the address conversion table 21 in the main memory 2.
Is obtained, the obtained physical page address PFN and the lower address are concatenated to obtain a physical address, which is output together with the extended C bit.

【0080】拡張Cビットが”000”の場合は、un
cache属性が指定されている場合であり、セレクタ
5は、第0キャッシュセット31〜第3キャッシュセッ
ト34のいずれをもイネーブル状態としない。MMU4
は、コントローラ6を介して主メモリ2にアクセスし、
データを読み出し又はデータを書き込む。
When the extension C bit is “000”, un
This is the case where the cache attribute is specified, and the selector 5 does not enable any of the 0th cache set 31 to the third cache set 34. MMU4
Accesses the main memory 2 via the controller 6,
Read data or write data.

【0081】拡張Cビットが”001”の場合、セレク
タ5は、第0キャッシュセット31のみをアクティブ状
態とする。キャッシュ制御回路39は、第0キャッシュ
セット31上で、キャッシュがヒットするか否かを判別
する。キャッシュヒットの場合、キャッシュ制御回路3
9は、第0キャッシュセット31をアクセスする。
When the extension C bit is “001”, the selector 5 sets only the 0th cache set 31 to the active state. The cache control circuit 39 determines whether or not the cache hits on the 0th cache set 31. In the case of a cache hit, the cache control circuit 3
9 accesses the 0th cache set 31.

【0082】一方、キャッシュミスヒットの場合、キャ
ッシュ制御回路39は、キャッシュリプレースを行うた
め、MMU4にキャッシュミスヒットを通知する。この
通知に従って、MMU4は、コントローラ6を介して主
メモリ2から、対応するデータブロックを読み出して、
キャッシュメモリ3に供給する。キャッシュ制御回路3
9は、主メモリ2から読み出されたデータブロックを第
0キャッシュセット31にコピーする。
On the other hand, in the case of a cache miss, the cache control circuit 39 notifies the MMU 4 of the cache miss to perform cache replacement. According to this notification, the MMU 4 reads the corresponding data block from the main memory 2 via the controller 6, and
The data is supplied to the cache memory 3. Cache control circuit 3
9 copies the data block read from the main memory 2 to the 0th cache set 31.

【0083】拡張Cビットが”010”の場合には、セ
レクタ5が第1キャッシュセット32のみをアクティブ
状態とし、キャッシュヒットであれば、第1キャッシュ
セット32にアクセスが行われ、キャッシュミスヒット
であれば、主メモリ2から対応するデータブロックが読
み出されて、第1キャッシュセット32にリプレースさ
れる。
If the extension C bit is "010", the selector 5 activates only the first cache set 32, and if a cache hit occurs, the access is made to the first cache set 32 and a cache miss occurs. If so, the corresponding data block is read from the main memory 2 and replaced in the first cache set 32.

【0084】拡張Cビットが”011”の場合には、セ
レクタ5が第2キャッシュセット33のみをアクティブ
状態とし、キャッシュヒットであれば、第2キャッシュ
セット33にアクセスが行われ、キャッシュミスヒット
であれば、主メモリ2から対応するデータブロックが読
み出されて、第2キャッシュセット33にリプレースさ
れる。
When the extension C bit is "011", the selector 5 activates only the second cache set 33, and if a cache hit occurs, the second cache set 33 is accessed and a cache miss occurs. If so, the corresponding data block is read from the main memory 2 and replaced in the second cache set 33.

【0085】拡張Cビットが”100”の場合には、セ
レクタ5が第3キャッシュセット34のみをアクティブ
状態とし、キャッシュヒットであれば、第3キャッシュ
セット34にアクセスが行われる。キャッシュミスヒッ
トであれば、主メモリ2から対応するデータブロックが
読み出されて、第3キャッシュセット34にリプレース
される。
When the extension C bit is "100", the selector 5 activates only the third cache set 34, and if a cache hit occurs, the third cache set 34 is accessed. If a cache miss occurs, the corresponding data block is read from the main memory 2 and replaced in the third cache set 34.

【0086】次に、拡張Cビットが”101”の場合に
は、セレクタ5は第0キャッシュセット31と第1キャ
ッシュセット32とをアクティブ状態とする。キャッシ
ュ制御回路39は、第0キャッシュセット31又は第1
キャッシュセット32上で、キャッシュがヒットするか
否かを判別する。すなわち、MMU4から供給された物
理上位アドレスに対応するtagを有するキャッシュラ
インが、第0キャッシュセット31又は第1キャッシュ
セット32上に存在し、且つ、そのキャッシュラインの
バリッドビットVが”1”(有効)であるか否かを判別
する。
Next, when the extension C bit is “101”, the selector 5 activates the 0th cache set 31 and the first cache set 32. The cache control circuit 39 controls the 0th cache set 31 or the 1st cache set.
It is determined whether or not the cache hits on the cache set 32. That is, a cache line having a tag corresponding to the physical upper address supplied from the MMU 4 exists on the 0th cache set 31 or the first cache set 32, and the valid bit V of the cache line is “1” ( Valid).

【0087】キャッシュヒットであれば、キャッシュ制
御回路39は、ヒットした第0又は第1キャッシュセッ
ト31又は32にアクセスする。
In the case of a cache hit, the cache control circuit 39 accesses the hit 0th or first cache set 31 or 32.

【0088】一方、キャッシュミスヒットの場合、キャ
ッシュ制御回路39は、キャッシュリプレースを行うた
め、MMU4にキャッシュミスヒットを通知する。この
通知に従って、MMU4は、コントローラ6を介して主
メモリ2の物理上位アドレスPFNで指示される領域か
らデータブロックを読み出して、キャッシュメモリ3に
供給する。キャッシュ制御回路39は、主メモリ2から
読み出されたデータブロックを、LRU置換ルールに従
って、第0キャッシュセット31と第1キャッシュセッ
ト32とのいずれかの、最も昔に使用されたデータブロ
ックの上にコピーする。
On the other hand, in the case of a cache miss, the cache control circuit 39 notifies the MMU 4 of the cache miss in order to perform cache replacement. In accordance with this notification, the MMU 4 reads a data block from the area of the main memory 2 indicated by the physical higher address PFN via the controller 6 and supplies the data block to the cache memory 3. The cache control circuit 39 stores the data block read from the main memory 2 in the uppermost one of the 0th cache set 31 and the first cache set 32 according to the LRU replacement rule. Copy to

【0089】次に、拡張Cビットが”110”の場合に
は、セレクタ5は第2キャッシュセット33と第3キャ
ッシュセット34とをアクティブ状態とする。キャッシ
ュ制御回路39は、第2キャッシュセット33又は第3
キャッシュセット34上で、キャッシュがヒットするか
否かを判別する。
Next, when the extension C bit is "110", the selector 5 activates the second cache set 33 and the third cache set 34. The cache control circuit 39 controls the second cache set 33 or the third
It is determined whether or not the cache hits on the cache set 34.

【0090】キャッシュヒットであれば、キャッシュ制
御回路39は、ヒットした第2又は第3キャッシュセッ
ト33又は34にアクセスする。
If the hit is a cache hit, the cache control circuit 39 accesses the hit second or third cache set 33 or 34.

【0091】一方、キャッシュミスヒットの場合、キャ
ッシュ制御回路39は、MMU4とコントローラ6とを
介して主メモリ2の物理上位アドレスPFNで指示され
る領域からデータブロックを読み出して、LRU置換ル
ールに従って、第2キャッシュセット33と第3キャッ
シュセット33とのいずれかにコピーする。
On the other hand, in the case of a cache miss, the cache control circuit 39 reads a data block from the area specified by the physical upper address PFN of the main memory 2 via the MMU 4 and the controller 6, and according to the LRU replacement rule. Copy to one of the second cache set 33 and the third cache set 33.

【0092】さらに、拡張Cビットが”111”の場合
には、セレクタ5は第0キャッシュセット31〜第3キ
ャッシュセット34をアクティブ状態とする。キャッシ
ュ制御回路39は、第0キャッシュセット31〜第3キ
ャッシュセット34上で、キャッシュがヒットするか否
かを判別する。
Further, when the extension C bit is "111", the selector 5 activates the 0th cache set 31 to the third cache set 34. The cache control circuit 39 determines whether or not a cache hit occurs on the 0th cache set 31 to the third cache set 34.

【0093】キャッシュヒットであれば、キャッシュ制
御回路39は、ヒットしたキャッシュセットにアクセス
する。
If the hit is a cache hit, the cache control circuit 39 accesses the hit cache set.

【0094】一方、キャッシュミスヒットの場合、キャ
ッシュ制御回路39は、キャッシュリプレースを行うた
め、MMU4にキャッシュミスヒットを通知する。この
通知に従って、MMU4は、コントローラ6を介して主
メモリ2の物理上位アドレスPFNで指示される領域か
らデータブロックを読み出して、キャッシュメモリ3に
供給する。キャッシュ制御回路39は、主メモリ2から
読み出されたデータブロックを、LRU置換ルールに従
って、第0キャッシュセット31〜第3キャッシュセッ
ト34のいずれかのうちで、最も昔に使用されたデータ
ブロックの上にコピーする。
On the other hand, in the case of a cache miss, the cache control circuit 39 notifies the MMU 4 of the cache miss to perform cache replacement. In accordance with this notification, the MMU 4 reads a data block from the area of the main memory 2 indicated by the physical higher address PFN via the controller 6 and supplies the data block to the cache memory 3. The cache control circuit 39 converts the data block read from the main memory 2 into the oldest used data block among the 0th cache set 31 to the third cache set 34 according to the LRU replacement rule. Copy above.

【0095】第2の実施の形態の構成によっても、各デ
ータブロックが使用するキャッシュセットの指定又はキ
ャッシュセットのグループを、キャッシュの状態に依存
せずに指定し、キャッシュを最適化して使用することが
できる。また、キャッシュセットをグループ化すること
により、より細かくキャッシュ構造に最適化した制御を
行うことができる。しかも、通常のLRU論理などのの
置換アルゴリズムも、グループ化されたキャッシュセッ
トのグループ内のブロックに対して適用することができ
る。
According to the configuration of the second embodiment, it is also possible to specify a cache set used by each data block or a group of cache sets independently of the state of the cache, and to optimize and use the cache. Can be. Further, by grouping the cache sets, it is possible to perform control that is more finely optimized for the cache structure. In addition, a replacement algorithm such as ordinary LRU logic can be applied to blocks in a group of the grouped cache sets.

【0096】上記の各実施の形態においては、キャッシ
ュセットの指定又はキャッシュセットのグループの指定
ビットを、従来のキャッシュ・コヒーレンシー属性を示
すCビットを拡張する方法で設置したが、一般には、T
LBエントリ又はアドレス変換テーブルのエントリ内
で、両者を別個の領域として設置することができる。
In each of the above embodiments, the designation bit of the cache set or the group of the cache set is set by extending the C bit indicating the conventional cache coherency attribute.
Both can be set as separate areas in the LB entry or the address translation table entry.

【0097】上記の各実施の形態において、キャッシュ
セットの指定又はキャッシュセットのグループを指定す
るための指定値を主メモリ上のアドレス変換テーブルに
設定する手法などは任意に変更可能である。例えば、主
メモリ2上のアドレス変換テーブル21には、拡張Cビ
ットを配置せず、アドレス変換テーブルの写しをTLB
に生成する際に、拡張Cビットを設定するようにしても
よい。
In each of the above embodiments, the method of setting a specified value for specifying a cache set or a group of cache sets in the address translation table on the main memory can be arbitrarily changed. For example, in the address conversion table 21 on the main memory 2, the extension C bit is not arranged, and a copy of the address conversion table is written in TLB.
, The extended C bit may be set.

【0098】上記第1及び第2の実施の形態において
は、キャッシュメモリ3をアクセスする際にも、セレク
タ5が、拡張Cビットに対応するキャッシュセットのみ
をアクティブ状態にしたが、アクセス時は、全キャッシ
ュセットをアクティブとして、キャッシュヒット・ミス
ヒットを判別し、リプレース処理のタイミングでのみ、
セレクタ5を動作させてもよい。
In the first and second embodiments, when the cache memory 3 is accessed, the selector 5 activates only the cache set corresponding to the extended C bit. With all cache sets active, cache hits and mishits are determined, and only at the time of replacement processing,
The selector 5 may be operated.

【0099】[0099]

【発明の効果】以上に説明したとおり、本発明に係るキ
ャッシュメモリ装置によれば、例えば、キャッシュ・ミ
ス(不必要なリプレーシング処理の多発)があった場
合、或いはキャッシュがミスすることが予見される場合
には、リプレースが実行されるキャッシュセットをプロ
グラム上から直接指定したり、場合によっては通常のL
RU論理の置換アルゴリズムを実施することができる。
従って、コンパイラ等で、特定のキャッシュセットを任
意のブロックに強制的に割り当てるなどの、キャッシュ
構造に最適化したコードを生成することが可能となり、
これにより、キャッシュ状態に依存せずに、最適なキャ
ッシュの制御を実施することができる。
As described above, according to the cache memory device of the present invention, it is foreseen that, for example, a cache miss (frequent occurrence of unnecessary replacing processing) or a cache miss will occur. In this case, the cache set to be replaced is specified directly from the program, and in some cases, the normal L
A replacement algorithm for RU logic can be implemented.
Therefore, it is possible to generate code optimized for the cache structure, such as forcibly assigning a specific cache set to an arbitrary block by a compiler or the like,
Thus, optimal cache control can be performed without depending on the cache state.

【0100】また、参照頻度が高いブロックであること
が予見されるような特定のブロックを、いずれかのキャ
ッシュセットに割り当てることにより、キャッシュ・ミ
スによるリプレーシング処理を排除して、キャッシュセ
ットを占有させることが出来るため、以後の上記ブロッ
クのアクセスについては、外部メモリ・アクセスでは1
サイクル毎に8クロックを必要とするところを、零クロ
ックとすることが出来る。
By allocating a specific block, which is predicted to be a block with a high reference frequency, to any one of the cache sets, the replacing process due to a cache miss is eliminated and the cache set is occupied. Therefore, with respect to the subsequent access to the block, the external memory access requires 1
Where eight clocks are required per cycle, zero clocks can be used.

【0101】このようなキャッシュ制御の最適化によ
り、キャッシュのヒット率を向上せしめ、情報処理装置
の性能向上に寄与させることが可能となる。また、キャ
ッシュセットをグループ化することにより、より細かく
キャッシュ構造に最適化したコードを生成し、キャッシ
ュ状態に依存しない制御を適用することができる。しか
も、通常のLRU論理の置換アルゴリズムも、グループ
化されたキャッシュセットのグループ内のブロックに対
しては部分的に適用することができる。
By optimizing such cache control, it is possible to improve the cache hit ratio and contribute to the improvement of the performance of the information processing apparatus. Further, by grouping the cache sets, it is possible to generate a code that is more finely optimized for the cache structure, and to apply a control that does not depend on the cache state. In addition, a normal LRU logic replacement algorithm can also be partially applied to blocks within a group of cached sets.

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

【図1】図1は、本発明の第1の実施の形態に係るキャ
ッシュメモリ装置の全体構成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a cache memory device according to a first embodiment of the present invention.

【図2】TLBのエントリの一例を示す図である。FIG. 2 illustrates an example of a TLB entry.

【図3】主メモリ上に形成されるアドレス変換テーブル
の一例を示す図である。
FIG. 3 is a diagram showing an example of an address conversion table formed on a main memory.

【図4】本発明の第1の実施の形態に係るキャッシュメ
モリ装置の動作を説明するための図である。
FIG. 4 is a diagram for explaining an operation of the cache memory device according to the first embodiment of the present invention.

【図5】本発明の第2の実施の形態に係るキャッシュメ
モリ装置の動作を説明するためのブロック図である。
FIG. 5 is a block diagram illustrating an operation of a cache memory device according to a second embodiment of the present invention.

【図6】従来のキャッシュメモリ装置の全体構成を示す
ブロック図である。
FIG. 6 is a block diagram showing an overall configuration of a conventional cache memory device.

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

1 CPU 2 主メモリ 3 キャッシュメモリ 4 MMU(メモリマッピングユニット) 5 セレクタ 6 コントローラ 7 周辺機器 31 第0キャッシュセット 32 第1キャッシュセット 33 第2キャッシュセット 34 第3キャッシュセット 39 キャッシュ制御回路 41 TLB(高速変換緩衝機構) 1 CPU 2 Main Memory 3 Cache Memory 4 MMU (Memory Mapping Unit) 5 Selector 6 Controller 7 Peripheral Equipment 31 0th Cache Set 32 1st Cache Set 33 2nd Cache Set 34 3rd Cache Set 39 Cache Control Circuit 41 TLB (High Speed Conversion buffer mechanism)

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】複数個のキャッシュセットを持つセットア
ソシアティブ方式のキャッシュメモリと、仮想アドレス
の一部と前記キャッシュメモリ内エントリとの対応をア
ドレス変換情報として持つ高速変換緩衝機構と、所定の
置換論理でリプレーシング制御を実行する制御回路を備
えたキャッシュメモリ装置を持つ、仮想記憶方式のプロ
セッサにおいて、 前記高速変換緩衝機構の各エントリは、当該エントリに
対応したブロックのデータについて、前記キャッシュメ
モリ装置内のキャッシュセット又はキャッシュセットの
グループを指定する指定値を格納するための指定ビット
領域を備え、 前記制御回路は、前記高速変換緩衝機構のエントリの指
定ビット領域に、前記指定値が格納されている場合に、
前記指定値により指定されたキャッシュセット又はキャ
ッシュセットのグループを選択する、 ことを特徴とするキャッシュメモリ装置。
1. A set associative cache memory having a plurality of cache sets, a high-speed translation buffer having a correspondence between a part of a virtual address and an entry in the cache memory as address translation information, and a predetermined replacement logic. In a virtual memory type processor having a cache memory device provided with a control circuit for performing replacing control in the cache memory device, each entry of the high-speed conversion buffer mechanism stores data of a block corresponding to the entry in the cache memory device. A specified bit area for storing a specified value that specifies a cache set or a group of cache sets, wherein the control circuit stores the specified value in a specified bit area of an entry of the high-speed conversion buffer mechanism. In case,
A cache set or a group of cache sets specified by the specified value is selected.
【請求項2】前記高速変換緩衝機構のエントリの指定ビ
ット領域は、当該エントリがキャシュメモリを使用する
か否かを指定する情報と使用するキャッシュセットまた
はキャッシュセットのグループを選択する情報とを格納
する、 を特徴とする請求項1に記載のキャッシュメモリ装置。
2. A designated bit area of an entry of the high-speed conversion buffer mechanism stores information for designating whether the entry uses a cache memory and information for selecting a cache set or a group of cache sets to be used. The cache memory device according to claim 1, wherein:
【請求項3】データをブロック単位で記憶すると共に各
ブロックのデータの仮想アドレスと物理アドレスと該ブ
ロックがいずれのキャッシュセット又はキャッシュセッ
トのグループを使用するかを示す指定値とを対応付けて
記憶するアドレス変換テーブルを記憶する主メモリを備
え、 前記制御回路は、前記キャッシュ装置でミスヒットとな
った場合に、アクセス対象のデータの主メモリ内のブロ
ックデータを、指定値が示すキャッシュセット又はキャ
ッシュセットのグループにリプレースする、 ことを特徴とする請求項1又は2に記載のキャッシュメ
モリ装置。
3. A method of storing data in units of blocks and storing a virtual address and a physical address of data of each block in association with a designated value indicating which cache set or group of cache sets the block uses. A main memory for storing an address conversion table to be accessed, wherein the control circuit, when a mishit occurs in the cache device, sets a block data in the main memory of the data to be accessed in a cache set or a cache indicated by a designated value. The cache memory device according to claim 1, wherein the cache memory device is replaced with a set group.
【請求項4】データを前記主メモリにロードする際に、
前記アドレス変換テーブルに、ロードするデータブロッ
クの仮想アドレスと主メモリ内の物理アドレスと該ブロ
ックがいずれのキャッシュセット又はキャッシュセット
のグループを使用するかを示す指定値とを対応付けて格
納する手段を備える、ことを特徴とする請求項3に記載
のキャッシュメモリ装置。
4. When loading data into the main memory,
Means for storing, in the address translation table, a virtual address of a data block to be loaded, a physical address in main memory, and a designated value indicating which cache set or group of cache sets the block uses, The cache memory device according to claim 3, comprising:
【請求項5】前記キャッシュセット又はキャッシュセッ
トのグループと実質的に同一の容量のデータブロック
に、同一の指定値を設定することにより、前記キャッシ
ュセット又はキャッシュセットのグループをリプレース
の起こらない高速メモリとして使用する、ことを特徴と
する請求項4に記載のキャッシュメモリ装置。
5. A high-speed memory that does not cause replacement of the cache set or the group of cache sets by setting the same designated value to a data block having substantially the same capacity as that of the cache set or the group of cache sets. The cache memory device according to claim 4, wherein the cache memory device is used as:
【請求項6】前記制御回路は、前記指定値がキャッシュ
セットのグループを指定している場合に、指定されたグ
ループ内のキャッシュセットを所定の置換論理で選択し
てリプレース処理を行う、ことを特徴とする請求項1乃
至5のいずれ1項に記載のキャッシュメモリ装置。
6. The control circuit according to claim 1, wherein when the specified value specifies a cache set group, a cache set in the specified group is selected by a predetermined replacement logic to perform a replacement process. The cache memory device according to any one of claims 1 to 5, wherein:
【請求項7】複数個のキャッシュセットを有するセット
アソシアティブ方式のキャッシュメモリと、 データをブロック単位で記憶する主メモリと、 前記主メモリにデータのブロックをロードする際に、該
データブロックについて、該データブロックが使用する
前記キャッシュメモリのキャッシュセット又はキャッシ
ュセットのグループを指定する指定データを設定する手
段と、 前記主メモリ上のデータブロックを前記キャッシュメモ
リに格納する際に、対応する指定データに従ってキャッ
シュセット又はキャッシュセットのグループを選択し、
選択したキャッシュセットに該データブロックを格納す
る制御手段と、を備えることを特徴とするキャッシュメ
モリ装置。
7. A set associative cache memory having a plurality of cache sets, a main memory storing data in block units, and when loading a data block into the main memory, the data block Means for setting specified data specifying a cache set or a group of cache sets of the cache memory used by a data block; and storing a data block on the main memory in the cache memory in accordance with the corresponding specified data. Select a set or a group of cache sets,
Control means for storing the data block in a selected cache set.
【請求項8】ブロック単位でデータを記憶する主メモリ
と、複数個のキャッシュセットを持ち、主メモリ上のデ
ータの写しを記憶するキャッシュメモリと、仮想アドレ
スを物理アドレスに変換するアドレス変換手段と、キャ
ッシュミスヒットが発生した場合に、所定の置換論理
で、ブロック単位で、キャッシュメモリ上のデータを主
メモリ上のデータにリプレーシングする制御回路と、を
備えたキャッシュメモリ装置において、 アドレス変換手段は、各ブロックのデータについて、前
記キャッシュメモリ装置内のキャッシュセット又はキャ
ッシュセットのグループを指定する指定情報を含み、 前記制御回路は、リプレース対象のデータブロックにつ
いて、アドレス変換手段に指定情報が設定されている場
合に、指定情報により指定されたキャッシュセット又は
キャッシュセットのグループを選択して、該当するブロ
ックのデータをリプレースする、 ことを特徴とするキャッシュメモリ装置。
8. A main memory for storing data in block units, a cache memory having a plurality of cache sets and storing a copy of data on the main memory, and an address conversion means for converting a virtual address to a physical address. A control circuit that replaces data in the cache memory with data in the main memory in units of blocks by a predetermined replacement logic when a cache mishit occurs. Includes designation information for designating a cache set or a group of cache sets in the cache memory device for the data of each block, and the control circuit sets the designation information to the address conversion means for the data block to be replaced. The key specified by the specified information Sshusetto or select a group of cache set, to replace the data of the corresponding block, the cache memory device, characterized in that.
【請求項9】前記指定情報は、対応するデータブロック
がキャシュメモリを使用するか否かを指定する情報と使
用するキャッシュセットまたはキャッシュセットのグル
ープを選択する情報とを含む、ことを特徴とする請求項
8に記載のキャッシュメモリ装置。
9. The method according to claim 8, wherein the designation information includes information for designating whether the corresponding data block uses the cache memory and information for selecting a cache set or a group of cache sets to be used. The cache memory device according to claim 8.
【請求項10】前記アドレス変換手段は、 前記主メモリ上に配置され、各ブロックのデータの仮想
アドレスと物理アドレスと該ブロックがいずれのキャッ
シュセット又はキャッシュセットのグループを使用する
かを示す指定値とを対応付けて記憶するアドレス変換テ
ーブルと、 前記アドレス変換テーブルの写しを記憶する高速変換緩
衝機構と、を備える、ことを特徴とする請求項8または
9に記載のキャッシュメモリ装置。
10. The address translation means is arranged on the main memory, and specifies a virtual address and a physical address of data of each block, and a designated value indicating which cache set or group of cache sets the block uses. 10. The cache memory device according to claim 8, further comprising: an address translation table that stores the address translation table in association with the address translation table; and a high-speed translation buffer mechanism that stores a copy of the address translation table.
【請求項11】供給された仮想アドレスを前記高速変換
緩衝機構により物理アドレスに変換し、高速変換緩衝機
構でミスヒットとなった場合に、アドレス変換テーブル
で物理アドレスに変換する手段と、 前記高速変換緩衝機構またはアドレス変換テーブルによ
り変換された物理アドレスを用いて前記キャッシュメモ
リをアクセスするアクセス手段と、をさらに備え、 前記アクセス手段によりアクセスされたキャッシュメモ
リで、キャッシュミスとなった場合に、前記制御回路
は、判別した物理アドレスに位置する主メモリ上のブロ
ックデータを、指定値が示すキャッシュセット又はキャ
ッシュセットのグループにリプレースする、ことを特徴
とする請求項10に記載のキャッシュメモリ装置。
11. A means for converting the supplied virtual address into a physical address by the high-speed translation buffer mechanism, and converting the virtual address into a physical address by using an address translation table when a miss occurs in the high-speed translation buffer mechanism. An access unit for accessing the cache memory using a physical address converted by a conversion buffer mechanism or an address conversion table, wherein the cache memory accessed by the access unit has a cache miss. 11. The cache memory device according to claim 10, wherein the control circuit replaces the block data on the main memory located at the determined physical address to a cache set or a group of cache sets indicated by the specified value.
【請求項12】データを前記主メモリにロードする際
に、前記アドレス変換テーブルに、ロードするデータブ
ロックの仮想アドレスと主メモリ内の物理アドレスと該
ブロックがいずれのキャッシュセット又はキャッシュセ
ットのグループを使用するかを示す指定値とを対応付け
て格納する手段を備える、ことを特徴とする請求項10
または11に記載のキャッシュメモリ装置。
12. When loading data into the main memory, the virtual address of the data block to be loaded, the physical address in the main memory, and which cache set or group of cache sets the block is stored in the address translation table. 11. The apparatus according to claim 10, further comprising means for storing a designated value indicating whether or not to use the information.
Or a cache memory device according to item 11.
【請求項13】複数個のキャッシュセットを備えるキャ
ッシュメモリ上のデータブロックを所定の置換論理で主
メモリ上の他のデータにリプレーシングし、該リプレー
シングするキャッシュメモリ制御方法において、 主メモリ上の各データブロックに、そのデータブロック
がリプレーシングによりロードされるキャッシュセット
又はキャッシュセットのグループを指定する指定ビット
を対応付けて配置し、 リプレーシング対象のデータブロックの指定ビットによ
り指定されたキャッシュセット又はキャッシュセットの
グループを選択して、リプレーシング処理を実効する、 ことを特徴とするキャッシュメモリ制御方法。
13. A cache memory control method for replacing a data block in a cache memory having a plurality of cache sets with other data in the main memory by a predetermined replacement logic, and performing the replacing. Each data block is assigned a designated bit that specifies a cache set or a group of cache sets into which the data block is loaded by replacing, and the cache set or the designated bit is designated by the designated bit of the data block to be replaced. A cache memory control method, comprising selecting a group of cache sets and performing a replacing process.
JP11096858A 1999-04-02 1999-04-02 Cache memory device and cache memory control method Pending JP2000293437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11096858A JP2000293437A (en) 1999-04-02 1999-04-02 Cache memory device and cache memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11096858A JP2000293437A (en) 1999-04-02 1999-04-02 Cache memory device and cache memory control method

Publications (1)

Publication Number Publication Date
JP2000293437A true JP2000293437A (en) 2000-10-20

Family

ID=14176180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11096858A Pending JP2000293437A (en) 1999-04-02 1999-04-02 Cache memory device and cache memory control method

Country Status (1)

Country Link
JP (1) JP2000293437A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005215911A (en) * 2004-01-29 2005-08-11 Hitachi Ltd Information processor
WO2006038258A1 (en) * 2004-09-30 2006-04-13 Renesas Technology Corp. Data processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005215911A (en) * 2004-01-29 2005-08-11 Hitachi Ltd Information processor
WO2006038258A1 (en) * 2004-09-30 2006-04-13 Renesas Technology Corp. Data processor

Similar Documents

Publication Publication Date Title
JP4256167B2 (en) Extension mechanism for computer memory protection
US5689679A (en) Memory system and method for selective multi-level caching using a cache level code
US6766419B1 (en) Optimization of cache evictions through software hints
US4811209A (en) Cache memory with multiple valid bits for each data indication the validity within different contents
JP3859757B2 (en) Translation table entry with cacheability attribute bit for virtual address, virtual address reference method using the bit, and virtual address reference device
JPS6136667B2 (en)
JP3666689B2 (en) Virtual address translation method
US5555395A (en) System for memory table cache reloads in a reduced number of cycles using a memory controller to set status bits in the main memory table
US20080177952A1 (en) Method and Apparatus for Setting Cache Policies in a Processor
US10031854B2 (en) Memory system
JP2012533124A (en) Block-based non-transparent cache
JP6478843B2 (en) Semiconductor device and cache memory control method
US20110167224A1 (en) Cache memory, memory system, data copying method, and data rewriting method
US6553477B1 (en) Microprocessor and address translation method for microprocessor
JPH0661068B2 (en) Memory relocation method and hierarchical storage system
US6651156B1 (en) Mechanism for extending properties of virtual memory pages by a TLB
JPH04242848A (en) System for controlling cache memory by running mode
JPH11288386A (en) Computer system
JP3973129B2 (en) Cache memory device and central processing unit using the same
JP2007280421A (en) Data processor
JP2000293437A (en) Cache memory device and cache memory control method
US7099998B1 (en) Method for reducing an importance level of a cache line
JP2011141754A (en) Cache memory
JPH11143774A (en) Cache control mechanism
JPH0728706A (en) Cache memory device