JPH11143774A - Cache control mechanism - Google Patents
Cache control mechanismInfo
- Publication number
- JPH11143774A JPH11143774A JP9320423A JP32042397A JPH11143774A JP H11143774 A JPH11143774 A JP H11143774A JP 9320423 A JP9320423 A JP 9320423A JP 32042397 A JP32042397 A JP 32042397A JP H11143774 A JPH11143774 A JP H11143774A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- register
- cache control
- address
- prefetch
- 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
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
(57)【要約】
【課題】 メモリアクセスパターンに応じたキャッシュ
制御を行うことにより性能の向上をはかるキャッシュ制
御機構を提供することにある。
【解決手段】 キャッシュと、1つ以上のレジスタを有
し、該レジスタを用いてキャッシュ、主記憶等のアドレ
ス指定を行うプロセッサにおけるキャッシュ制御機構で
あり、前記レジスタ対応にキャッシュ制御情報を予め設
定し、該レジスタを用いてアドレス指定を行う場合及び
前記レジスタの値が更新される場合に、設定されたキャ
ッシュ制御情報に従ってキャッシュ制御を行う。例え
ば、レジスタに対応するキャッシュ制御情報がアドレス
マスクであるとき、図に示すように、キャッシュカラム
アドレスの一部であるXと、アドレスマスクのPとMを
置き換え回路に入力し、XをYに置き換えている。
(57) [Problem] To provide a cache control mechanism for improving performance by performing cache control according to a memory access pattern. Kind Code: A1 A cache control mechanism in a processor having a cache and one or more registers, and using the registers to specify addresses of a cache, a main memory, and the like, wherein cache control information is set in advance in correspondence with the registers. When the address is specified using the register and when the value of the register is updated, the cache control is performed according to the set cache control information. For example, when the cache control information corresponding to the register is an address mask, as shown in the figure, X, which is a part of the cache column address, and P and M of the address mask are input to the replacement circuit, and X is changed to Y. Has been replaced.
Description
【0001】[0001]
【発明の属する技術分野】本発明は計算機システムにお
けるプロセッサのキャッシュ制御機構に関する。The present invention relates to a cache control mechanism for a processor in a computer system.
【0002】[0002]
【従来の技術】プロセッサのキャッシュにおいては、以
下の(1)から(3)のような問題があり、従来のキャ
ッシュ構成及びキャッシュ制御機構においては、それぞ
れの問題を解決するための工夫がなされている。 (1)同一のキャッシュカラムに対して割り当てられる
べきデータがあり、該複数データの間での競合が生じ、
新たにあるデータがキャッシュカラムに割り当てられる
と、該キャッシュカラムに既に割り当てられていた必要
なデータがキャッシュから追い出されるためにメモリア
クセスの性能が低下する。この問題については、従来の
技術では、キャッシュのアソシアティビィティーを高め
ることや、用途別に分離したキャッシュを持ってプロセ
ッサのモード毎に切り替え、または明示的に切り替えて
使用することや、スラッシング解消の為にアソシアティ
ビィティーの高い一時的なバッファを持つこと等によ
り、解決を図っている。2. Description of the Related Art There are the following problems (1) to (3) in the cache of a processor, and in the conventional cache configuration and cache control mechanism, various measures have been taken to solve the respective problems. I have. (1) There is data to be allocated to the same cache column, and a conflict occurs among the plurality of data,
When new data is allocated to a cache column, required data that has already been allocated to the cache column is evicted from the cache, and the performance of memory access is reduced. In order to solve this problem, the conventional technology increases cache associativity, uses a separate cache for each application, switches it for each processor mode, uses it explicitly, and solves thrashing. In order to solve this problem, we have a temporary buffer with high associability.
【0003】(2)アクセス対象のデータがキャッシュ
に無い場合は、キャッシュに比べて主記憶アクセスのレ
イテンシが長いためにプロセッサの待ち時間が生じる。
この問題については、従来の技術では、実際にデータを
ロードするよりも早い時期にデータをキャッシュするプ
リフェッチがある。プリフェッチには、プログラム中で
アドレスを指定して明示的に行うソフトウェア制御プリ
フェッチと、アドレスの連続性や、その他の条件をハー
ドウェアが検出して行うハードウェアプリフェッチがあ
る。後者の例としては、Hewlett-Packard journal 1996
年2月号30頁に示されるように、ヒューレット・パッカ
ード社のマイクロプロセッサPA-7200においては、命令
セットにメモリアクセス後にアドレス指定に用いたレジ
スタを更新する命令があり、この命令の実行時にはハー
ドウェアがプリフェッチ可能と判断し、前記レジスタの
値をアドレスとしてプリフェッチを行う。(2) When the data to be accessed is not in the cache, the latency of the main memory access is longer than that of the cache, so that a waiting time of the processor occurs.
Regarding this problem, in the related art, there is a prefetch that caches data earlier than actually loading the data. The prefetch includes a software control prefetch that is explicitly performed by designating an address in a program, and a hardware prefetch that is performed when hardware detects address continuity and other conditions. An example of the latter is the Hewlett-Packard journal 1996
Hewlett-Packard Microprocessor PA-7200 has an instruction to update the register used for addressing after memory access to the instruction set. The hardware determines that prefetch is possible, and performs prefetch using the value of the register as an address.
【0004】(3)アドレス空間にマッピングされるの
は記憶装置と記憶装置以外のデバイス(例えば、I/O
が持っているレジスタ)があるが、記憶装置以外のデバ
イスから読み出した値をキャッシュすると正しい動作が
期待できない場合がある。また、ストアの結果をすぐに
反映する必要がある場合には、ストアイン動作をしては
いけない。この問題については、従来の技術では、メモ
リ管理機構が管理する単位(ページ)毎に、ロード時にキ
ャッシュ可能か不可能かの属性と、ストアのキャッシュ
ヒット時にストアスルー動作を行うかストアイン動作を
行うか、ストアのキャッシュミス時にライトアロケート
動作を行うか、ライトノーアロケート動作を行うかの属
性を持ち、この属性に従うことで正しいキャッシュ制御
を行うことが可能である。(3) A storage device and a device other than the storage device (for example, an I / O device) are mapped in the address space.
However, if a value read from a device other than a storage device is cached, correct operation may not be expected. If it is necessary to immediately reflect the result of the store, the store-in operation must not be performed. With regard to this problem, in the conventional technology, for each unit (page) managed by the memory management mechanism, the attribute of whether or not the cache can be cached at the time of loading and the store-through operation or the store-in operation at the time of a store cache hit are determined. It has an attribute of whether to perform a write allocate operation or a write no allocate operation when a store cache miss occurs, and correct cache control can be performed by following this attribute.
【0005】[0005]
【発明が解決しようとする課題】かかる従来のキャッシ
ュ構成及びキャッシュ制御機構においては以下のような
問題点がある。 (1)キャッシュのアソシアティビィティーを高めるこ
とで競合を減らすキャッシュ構成では、キャッシュから
の同時読み出しのビット数が増えることになるため、配
線やディレイ、信号の同時切り替えノイズ等の増大を伴
い、プロセッサの動作周波数が制限される。また、同容
量のキャッシュを実現するために必要なチップ上の面積
も大きくなる。また、大規模データがキャッシュあふれ
を起こすことで他のデータが追い出される場合には対応
できない。用途別に分離したキャッシュを持つ構成は汎
用性が低い。スラッシング解消の為にアソシアティビィ
ティーの高い一時的なバッファを持つ構成でも、大規模
データがキャッシュあふれを起こすことで他のデータが
追い出される場合には対応できない。The conventional cache configuration and cache control mechanism have the following problems. (1) In a cache configuration in which the contention is reduced by increasing the associativity of the cache, the number of bits for simultaneous reading from the cache increases. Operating frequency is limited. Further, the area on the chip required to realize a cache having the same capacity also increases. Also, it is not possible to cope with a case where other data is evicted due to cache overflow of large-scale data. Configurations with separate caches for different uses are less versatile. Even a configuration having a temporary buffer with high associativity to eliminate thrashing cannot cope with a case where large-scale data causes cache overflow and other data is evicted.
【0006】(2)ソフトウェア制御のプリフェッチを
行うと命令数が増える。ハードウェア制御では必要なデ
ータを実際に使われるよりも十分早くプリフェッチし、
かつ不要なプリフェッチの発行を少なく抑えることは難
しい。先のヒューレット・パッカード社のマイクロプロ
セッサPA-7200の例では、ハードウェアが検出できるプ
リフェッチ有効条件は、特定の命令の実行に限られ、ま
た、プリフェッチ対象となるアドレスも命令実行後のレ
ジスタの値に限られる。このため、過剰なキャッシュ参
照が発生することで性能低下を招く場合があり、また、
大きなレイテンシを効果的に隠蔽することができない。(2) The number of instructions increases when software-controlled prefetch is performed. Hardware control prefetches required data much faster than it is actually used,
In addition, it is difficult to reduce unnecessary issuance of prefetch. In the example of the Hewlett-Packard Microprocessor PA-7200, the prefetch valid condition that can be detected by hardware is limited to the execution of a specific instruction, and the address to be prefetched is also the value of the register after the instruction is executed. Limited to For this reason, performance degradation may be caused by excessive cache reference,
Large latencies cannot be effectively concealed.
【0007】(3)ページ単位に持つキャッシュ属性に
従うキャッシュ制御は、正しい動作は保証できるが、性
能については必ずしも有利ではない。(3) Cache control according to the cache attribute of each page can guarantee correct operation, but is not necessarily advantageous in performance.
【0008】例えば、キャッシュ可能属性のページのデ
ータを必ずキャッシュすることは、連続アドレスに対す
るアクセスについては有効であるが、ストライド、離散
アドレスに対するアクセスについてはアクセスしないデ
ータを主記憶から読み込むことになり、不要なデータ転
送によりメモリアクセスのトラフィックが増大する。ま
た、ストアイン属性のページに対しては主記憶に対する
書き込みを直ぐには行わないことは、メモリアクセスの
トラフィックの低減には有効であるが、主記憶を共有す
る他のデバイスとのコヒーレンス制御の為にはキャッシ
ュのフラッシュが必要となり、オーバヘッドが大きい。
また、ライトアロケート属性のページに対するストアが
キャッシュミスした時にはそのデータを含むラインをキ
ャッシュすることはそのプロセッサがそのラインに対す
るロードやストアを行う場合にはメモリアクセスのトラ
フィックの低減に有効だが、すぐにそのラインがフラッ
シュされる場合には却ってトラフィックが増大するし、
大規模データのメモリコピーを行う場合はキャッシュに
無駄なデータが入ることで他のデータが追い出されると
いった弊害がある。For example, it is effective to always cache data of a page having a cacheable attribute, which is effective for access to continuous addresses, but reads data not to be accessed for stride and discrete addresses from a main memory. Unnecessary data transfer increases memory access traffic. Although it is effective to reduce the memory access traffic to not immediately write to the main storage for a page with the store-in attribute, it is necessary to control coherence with other devices sharing the main storage. Requires a flush of the cache and has a large overhead.
Also, when a store for a page with a write allocate attribute causes a cache miss, caching the line containing that data is effective in reducing memory access traffic when the processor loads or stores the line, but immediately If the line is flushed, the traffic will increase,
When memory copy of large-scale data is performed, there is a problem that useless data enters the cache and other data is evicted.
【0009】本発明の目的は、動作周波数が高く、大容
量のキャッシュ構成に好適な、同一キャッシュカラムに
対する複数データの競合及び、大規模データのキャッシ
ュあふれによる性能低下を避ける手段を有するキャッシ
ュ制御機構を提供することにある。本発明の他の目的
は、比較的大きいレイテンシの主記憶を持つプロセッサ
に好適な、様々なメモリアクセスパターンに対応可能な
ハードウェア制御のプリフェッチ手段を有するキャッシ
ュ制御機構を提供することにある。本発明のさらに他の
目的は、ロード及びストアのアクセスパターンに応じて
最適な主記憶アクセス性能を得る手段を有するキャッシ
ュ制御機構を提供することにある。SUMMARY OF THE INVENTION It is an object of the present invention to provide a cache control mechanism which has a high operating frequency and is suitable for a large-capacity cache configuration and which has means for avoiding competition of a plurality of data for the same cache column and performance degradation due to cache overflow of large-scale data. Is to provide. It is another object of the present invention to provide a cache control mechanism having hardware-controlled prefetch means suitable for a processor having a main memory having a relatively large latency and capable of supporting various memory access patterns. Still another object of the present invention is to provide a cache control mechanism having means for obtaining optimum main storage access performance according to load and store access patterns.
【0010】[0010]
【課題を解決するための手段】上記目的を達成するた
め、本発明は、キャッシュと、1つ以上のレジスタを有
し、該レジスタを用いてキャッシュ、主記憶等のアドレ
ス指定を行うプロセッサにおけるキャッシュ制御機構で
あって、予め設定可能なキャッシュ制御情報を前記レジ
スタ対応に有し、前記レジスタを用いてアドレス指定を
行う場合及び前記レジスタの値が更新される場合は、該
キャッシュ制御情報に従ってキャッシュ制御を行うよう
にしている。In order to achieve the above object, the present invention provides a cache in a processor having a cache and one or more registers, and using the registers to specify addresses of a cache, a main memory, and the like. A control mechanism having cache control information that can be set in advance in correspondence with the register, and performing an address designation using the register and, when the value of the register is updated, performing cache control according to the cache control information. To do.
【0011】また、前記キャッシュ制御情報としてアド
レスマスクを有し、プロセッサがキャッシュにアクセス
を行うときにアドレス指定を行うレジスタに対応するア
ドレスマスクでキャッシュのカラム選択に用いるアドレ
スの一部を置き換える手段を備え、該手段により置き換
えの行われたアドレスによりキャッシュにアクセスする
ようにしている。[0011] Further, there is provided means for having an address mask as the cache control information, and replacing a part of an address used for selecting a column of the cache with an address mask corresponding to a register for specifying an address when the processor accesses the cache. The cache is accessed by the address replaced by the means.
【0012】また、前記キャッシュ制御情報としてセッ
トアソシアティブ構成のキャッシュのロウ番号を有し、
プロセッサがキャッシュラインの置き換えを必要とする
ときにアドレス指定を行うレジスタに対応するロウ番号
のキャッシュラインに置き換える手段を備えるようにし
ている。The cache control information may include a set associative cache row number.
When the processor needs to replace the cache line, the processor is provided with a means for replacing the cache line with the cache line of the row number corresponding to the register for which the address is specified.
【0013】また、前記キャッシュ制御情報としてプリ
フェッチ有効条件を有し、レジスタの値が更新されたと
き該レジスタに対応するプリフェッチ有効条件の成立を
検出する検出手段を備え、該手段により成立が検出され
たとき更新後のレジスタの値をスタートアドレスとして
データを主記憶からキャッシュに読み込むようにしてい
る。The cache control information includes a prefetch valid condition, and when the value of the register is updated, a detecting means for detecting the establishment of the prefetch valid condition corresponding to the register is provided. In this case, data is read from the main memory to the cache using the updated register value as a start address.
【0014】また、前記キャッシュ制御情報としてプリ
フェッチインデックスを有し、レジスタの値が更新さ
れ、該レジスタに対応するプリフェッチ有効条件の成立
が前記検出手段で検出されたときは、更新後のレジスタ
の値と該レジスタに対応する前記プリフェッチインデッ
クスの和をスタートアドレスとしてデータを主記憶から
キャッシュに読み込むようにしている。The cache control information has a prefetch index, and the value of the register is updated. When the detection means detects that the prefetch valid condition corresponding to the register is satisfied, the updated value of the register is And the prefetch index corresponding to the register is used as a start address to read data from the main memory into the cache.
【0015】また、前記キャッシュ制御情報としてプリ
フェッチサイズを有し、レジスタの値が更新され、該レ
ジスタに対応するプリフェッチ有効条件の成立が前記検
出手段で検出されたときは、更新後のレジスタの値をス
タートアドレスとして該レジスタに対応するプリフェッ
チサイズ分だけのデータを主記憶からキャッシュに読み
込むようにしている。Further, the cache control information has a prefetch size, the value of the register is updated, and when the prefetch valid condition corresponding to the register is satisfied by the detecting means, the value of the updated register is Is used as a start address, and data of a prefetch size corresponding to the register is read from the main memory into the cache.
【0016】また、前記キャッシュ制御情報としてプリ
フェッチインデックスとプリフェッチサイズを有し、レ
ジスタの値が更新され、該レジスタに対応するプリフェ
ッチ有効条件の成立が前記検出手段で検出されたとき
は、更新後のレジスタの値と該レジスタに対応する前記
プリフェッチインデックスの和をスタートアドレスとし
て該レジスタに対応する前記プリフェッチサイズ分だけ
のデータを主記憶からキャッシュに読み込むようにして
いる。Further, the cache control information has a prefetch index and a prefetch size, and the value of the register is updated. When the detection means detects that a prefetch valid condition corresponding to the register is satisfied, The sum of the value of the register and the prefetch index corresponding to the register is used as a start address, and data corresponding to the prefetch size corresponding to the register is read from the main memory to the cache.
【0017】また、前記キャッシュ制御情報としてロー
ド動作モードを有し、プロセッサがロードを行なうとき
には、アドレス指定を行うレジスタに対応するロード動
作モードに従って、キャッシュミス時にキャッシュに対
するライン転送を行うか行わないかを選択する手段を備
えるようにしている。Further, the cache control information has a load operation mode, and when the processor performs a load operation, whether or not to perform a line transfer to the cache at the time of a cache miss in accordance with the load operation mode corresponding to the register for specifying an address. Is provided.
【0018】また、前記キャッシュ制御情報としてスト
ア動作モードを有し、プロセッサがストアを行なうとき
には、アドレス指定を行うレジスタに対応するストア動
作モードに従って、キャッシュヒット時にはストアイン
動作とストアスルー動作を選択し、キャッシュミス時に
はライトアロケート動作とノーライトアロケート動作を
選択する手段を備えるようにしている。The cache control information has a store operation mode. When the processor performs a store operation, a store-in operation and a store-through operation are selected when a cache hit occurs in accordance with a store operation mode corresponding to a register for specifying an address. Means are provided for selecting a write allocate operation and a no-write allocate operation when a cache miss occurs.
【0019】また、前記キャッシュ制御情報としてロー
ド動作モードおよびストア動作モードを有し、プロセッ
サがロードを行なうときには、アドレス指定を行うレジ
スタに対応するロード動作モードに従って、キャッシュ
ミス時にキャッシュに対するライン転送を行うか行わな
いかを選択し、プロセッサがストアを行なうときには、
アドレス指定を行うレジスタに対応するストア動作モー
ドに従って、キャッシュヒット時にはストアイン動作と
ストアスルー動作を選択し、キャッシュミス時にはライ
トアロケート動作とノーライトアロケート動作を選択す
る手段を備えるようにしている。The cache control information includes a load operation mode and a store operation mode. When the processor performs a load, a line transfer to the cache is performed at the time of a cache miss in accordance with the load operation mode corresponding to the register for specifying an address. Or not, and when the processor does the store,
According to a store operation mode corresponding to a register for which an address is specified, a means for selecting a store-in operation and a store-through operation when a cache hit occurs, and a means for selecting a write allocate operation and a no-write allocate operation when a cache miss occurs.
【0020】また、前記キャッシュ制御情報の控えを有
し、キャッシュ制御情報の設定を行うときは同時にキャ
ッシュ制御情報の控えも設定し、前記レジスタに他のレ
ジスタの値または他のレジスタの値を用いた演算結果が
書き込まれる時は前記レジスタに対応するキャッシュ制
御情報を、前記控えのキャッシュ制御情報を元に更新
し、前記レジスタにキャッシュまたは主記憶から読み込
んだ値が書き込まれる時は前記控えのキャッシュ制御情
報を前記レジスタに対応するキャッシュ制御情報として
再び設定するようにしている。The cache control information has a copy, and when the cache control information is set, a copy of the cache control information is also set at the same time, and the value of another register or the value of another register is used for the register. When the calculated operation result is written, the cache control information corresponding to the register is updated based on the reserved cache control information. When the value read from the cache or main memory is written to the register, the reserved cache control information is updated. The control information is set again as cache control information corresponding to the register.
【0021】[0021]
【発明の実施の形態】以下、本発明の実施の形態を詳細
に説明する。図1は本発明の動作の実施の形態を示すフ
ローチャートである。図9は、図1のフローチャートに
おけるステップ155の詳細を示すフローチャートであ
り、図13、図14は図1のフローチャートにおけるス
テップ120の詳細を示すフローチャートである。図1
8は、本発明に関わるプロセッサと主記憶の構成を示す
概略ブロック図であり、また、図19は図18のプロセ
ッサがレジスタ対応に持つキャッシュ制御情報の一覧表
である。図2は、従来のキャッシュ制御機構の構成の一
部を示すブロック図であり、キャッシュにアクセスする
ときは、アドレスの一部を用いてキャッシュのカラムを
選択することを示している。図3は、図19のアドレス
マスクを元に動作する本発明の機構を図2のキャッシュ
制御機構に適用した場合の構成を示すブロック図であ
る。図4は、図3の置き換え回路の論理動作例を示す真
理値表であり、図5は図4の真理値表で示す置き換え回
路を用いた場合に可能となるキャッシュ制御の例を示す
模式図である。Embodiments of the present invention will be described below in detail. FIG. 1 is a flowchart showing an embodiment of the operation of the present invention. FIG. 9 is a flowchart showing details of step 155 in the flowchart of FIG. 1, and FIGS. 13 and 14 are flowcharts showing details of step 120 in the flowchart of FIG. FIG.
8 is a schematic block diagram showing a configuration of a processor and a main memory according to the present invention, and FIG. 19 is a list of cache control information that the processor of FIG. 18 has for registers. FIG. 2 is a block diagram showing a part of the configuration of the conventional cache control mechanism, and shows that when accessing the cache, a column of the cache is selected using a part of the address. FIG. 3 is a block diagram showing a configuration when the mechanism of the present invention that operates based on the address mask of FIG. 19 is applied to the cache control mechanism of FIG. FIG. 4 is a truth table showing an example of a logical operation of the replacement circuit of FIG. 3, and FIG. 5 is a schematic diagram showing an example of cache control enabled when the replacement circuit shown in the truth table of FIG. 4 is used. It is.
【0022】図6は、従来のキャッシュ制御機構の構成
の一部を示すブロック図であり、セットアソシアティブ
構成のキャッシュにアクセスした結果がミスであった場
合には、そのカラムのLRU情報を元に置き換えるロウを
決定することを示している。図7は、図19に示すロウ
番号を元に動作する本発明の機構を図6のキャッシュ制
御機構に適用した場合の構成を示すブロック図である。
図8は、図19に示すプリフェッチ有効条件とプリフェ
ッチインデックスとプリフェッチサイズを元に動作する
本発明の実施例の構成を示すブロック図である。図10
は、図8におけるプリフェッチ有効条件の例を示す表で
あり、図9は図8の動作を示すフローチャートである。FIG. 6 is a block diagram showing a part of the configuration of a conventional cache control mechanism. If a result of accessing a cache having a set associative structure is a miss, the LRU information of the column is used as a basis. This indicates that a row to be replaced is determined. FIG. 7 is a block diagram showing a configuration when the mechanism of the present invention that operates based on the row numbers shown in FIG. 19 is applied to the cache control mechanism of FIG.
FIG. 8 is a block diagram showing the configuration of an embodiment of the present invention that operates based on the prefetch valid condition, prefetch index, and prefetch size shown in FIG. FIG.
9 is a table showing an example of the prefetch valid condition in FIG. 8, and FIG. 9 is a flowchart showing the operation of FIG.
【0023】図11は、従来のキャッシュ制御機構の構
成の一部を示すブロック図であり、ロードまたはストア
時はページ毎に持つキャッシュ属性を読み出し、それを
元にキャッシュの制御を行うことを示す。図12は、図
19のロード動作モードを元に動作する機構と、ストア
動作モードを元に動作する本発明の機構を図11のキャ
ッシュ制御機構に適用した場合の構成を示すブロック図
である。図13と図14は、図12の動作を示すフロー
チャートである。図15は、本発明のキャッシュ制御機
構の実施例の一部の構成を示すブロック図である。図1
6と図17は、図15の動作を示す図である。FIG. 11 is a block diagram showing a part of the configuration of a conventional cache control mechanism. In loading or storing, a cache attribute for each page is read and cache control is performed based on the read attribute. . FIG. 12 is a block diagram showing a configuration in which the mechanism operating based on the load operation mode in FIG. 19 and the mechanism of the present invention operating based on the store operation mode are applied to the cache control mechanism in FIG. FIG. 13 and FIG. 14 are flowcharts showing the operation of FIG. FIG. 15 is a block diagram showing a partial configuration of an embodiment of the cache control mechanism of the present invention. FIG.
6 and 17 are diagrams showing the operation of FIG.
【0024】図18において、プロセッサ10は、1以上
のレジスタ200を有し、各レジスタ200対応にキャッシュ
制御情報を有する。そして、命令実行の結果に基づきレ
ジスタ200の値を更新する。プロセッサ10は、命令実行
するときに、キャッシュ210または主記憶50にアクセス
する必要があれば、レジスタ200を用いてアドレスを指
定する。プロセッサ10は制御装置30を持ち、制御装置30
はキャッシュ制御機構70を持ち、キャッシュ制御機構70
はプロセッサ10がレジスタ200の値を更新する場合およ
びレジスタ200を用いてアドレスを指定する場合は、各
レジスタ200に対応するキャッシュ制御情報1500に基づ
き動作する。キャッシュ制御情報1500はソフトウェアで
設定可能であり、図19において、キャッシュ制御情報
1500の各々は個別に設定可能である。In FIG. 18, the processor 10 has one or more registers 200, and has cache control information corresponding to each register 200. Then, the value of the register 200 is updated based on the result of the instruction execution. When the processor 10 needs to access the cache 210 or the main memory 50 when executing an instruction, the processor 10 specifies an address using the register 200. The processor 10 has a control device 30, and the control device 30
Has a cache control mechanism 70, and the cache control mechanism 70
The processor 10 operates based on the cache control information 1500 corresponding to each register 200 when the processor 10 updates the value of the register 200 and specifies an address using the register 200. The cache control information 1500 can be set by software.
Each of the 1500s is individually configurable.
【0025】図2、図3、図6、図7、図11、図12
に示すアドレス計算回路201は、レジスタ200の値を元に
アドレスを計算する。図2、図6、図7において、アド
レス計算回路201により得られたアドレスの内の一部は
キャッシュカラムアドレス202として、キャッシュ210に
アクセスするときのカラム選択に用いられる。図3にお
いては、置き換え回路310が同じアドレスの一部をアド
レスマスク300で置き換えてキャッシュカラムアドレス2
02とする。アドレスマスク300は、Pフィールド301とMフ
ィールド302からなり、置き換え回路310の論理動作は真
理値表400に従う。従来の機構を示す図6においては、
置き換えロウ選択回路600はキャッシュミス時にキャッ
シュから読み出したLRU情報610を元に置き換えるロウを
決定する。本発明の機構を示す図7においては、置き換
えロウ選択回路710はキャッシュミス時にキャッシュか
ら読み出したLRU情報610とロウ番号700を元に置き換え
るロウを決定する。図8において、プリフェッチ制御回
路890は、プリフェッチ有効条件800の成立を条件検出回
路810が検出した場合にプリフェッチを行う。プリフェ
ッチ有効条件800には図10のプリフェッチ有効条件の
例1000に挙げた各条件を個別に設定することが可能で、
条件成立検出回路810は、設定されている条件のうち、
何れかが成立すれば条件成立を検出し、プリフェッチ制
御回路890に報告する。FIG. 2, FIG. 3, FIG. 6, FIG. 7, FIG.
The address calculation circuit 201 calculates an address based on the value of the register 200. 2, 6, and 7, a part of the address obtained by the address calculation circuit 201 is used as a cache column address 202 for column selection when accessing the cache 210. In FIG. 3, the replacement circuit 310 replaces a part of the same address with the address mask 300 to replace the cache column address 2.
02. The address mask 300 includes a P field 301 and an M field 302, and the logical operation of the replacement circuit 310 follows the truth table 400. In FIG. 6 showing a conventional mechanism,
The replacement row selection circuit 600 determines a replacement row based on the LRU information 610 read from the cache at the time of a cache miss. In FIG. 7 showing the mechanism of the present invention, the replacement row selection circuit 710 determines a row to be replaced based on the LRU information 610 and the row number 700 read from the cache at the time of a cache miss. In FIG. 8, a prefetch control circuit 890 performs prefetch when the condition detection circuit 810 detects that the prefetch enable condition 800 is satisfied. In the prefetch valid condition 800, each condition listed in the example 1000 of the prefetch valid condition in FIG. 10 can be individually set.
The condition satisfaction detection circuit 810 includes, among the set conditions,
If any one of the conditions is satisfied, the condition detection is detected and reported to the prefetch control circuit 890.
【0026】図11、図12において、アドレス計算回
路201で得られたアドレスの別の一部はページ選択アド
レス1110として、ページテーブル1100にアクセスすると
きのページ選択に用いられる。従来の機構を示す図11
において、ロード/ストア制御回路1150はページテーブ
ルから読み出したページのキャッシュ属性1130を元にロ
ード/ストア時の動作を決定する。本発明の機構を示す
図12においては、ロード/ストア制御回路1250はペー
ジテーブルから読み出したページのキャッシュ属性1130
とロード動作モード1200とストア動作モード1220を元に
ロード/ストア時の動作を決定する。In FIGS. 11 and 12, another part of the address obtained by the address calculation circuit 201 is used as a page selection address 1110 for page selection when accessing the page table 1100. FIG. 11 showing a conventional mechanism.
In, the load / store control circuit 1150 determines the load / store operation based on the page cache attribute 1130 read from the page table. In FIG. 12 showing the mechanism of the present invention, the load / store control circuit 1250 has a cache attribute 1130 of the page read from the page table.
The load / store operation is determined based on the load operation mode 1200 and the store operation mode 1220.
【0027】図15、図17において、レジスタ200は
対応するキャッシュ制御情報として、キャッシュ制御情
報1500と、キャッシュ制御情報の控え1510を持つ。ソフ
トウェアでキャッシュ制御情報1500を設定するときは、
同時に同じ内容が控えのキャッシュ制御情報1510にも設
定される。図16において、レジスタ200はレジスタ160
0の値を元に更新される。In FIGS. 15 and 17, the register 200 has cache control information 1500 and a cache control information copy 1510 as corresponding cache control information. When setting cache control information 1500 with software,
At the same time, the same content is set in the copy cache control information 1510. In FIG. 16, a register 200 is a register 160
Updated based on 0 value.
【0028】次に図1、図9、図13、図14のフロー
チャートと図4の真理値表と図5の模式図と図10の表
と図19の一覧表に基づいて、図3と図7と図8と図1
2と図15と図16と図17と図18の各部の動作を説
明する。図1のフローチャートにおいて、まず、プロセ
ッサ10が命令を実行する(ステップ100)。この命令がレ
ジスタ200を用いてアドレスを指定するメモリアクセス
命令であり(ステップ105)、図3に示すレジスタ200に対
応するアドレスマスク300が設定されている(ステップ11
0)場合には、アドレス計算回路201によってレジスタ200
の値を元に計算したアドレスの一部 X(図4の例の場
合、X(0)、X(1)、X(2)の3ビットからなる)を、置き換え
回路310によってアドレスマスク300のMフィールド301(M
は、図4の例の場合、M(0)、M(1)、M(2)の3ビットから
なる)とPフィールド302(Pは、図4の例の場合、P(0)、P
(1)、P(2)の3ビットからなる)を元に図4に示す真理値
表400に従い置き換えたアドレスの一部 Y(図4の例の場
合、Y(0)、Y(1)、Y(2)の3ビットからなる)を含むキャッ
シュカラムアドレス202を用いてキャッシュ210に対して
アクセスする(ステップ115)。ここで、レジスタ毎に対
応するアドレスマスク300の内容を変えることで、その
レジスタを用いてアドレスを指定するデータを、キャッ
シュ210内の別のカラムに割り当てることができる。な
お、図4において、M(0)、Y(0)、X(0)、P(0)はそれぞれ
上位ビット、M(2)、Y(2)、X(2)、P(2)はそれぞれ下位ビ
ットである。このような構成によれば、例えば、図5の
様にキャッシュ210を、領域A501、領域B502、領域C50
3、領域D504の容量の異なる4つの領域に分けることが可
能である。すなわち、領域A501の場合には、M="110", P
="00-"に設定されており、図4の真理値表にしたがっ
て、Y="00X(2)"となり、領域B502の場合には、M="111",
P="010"に設定されており、図4の真理値表にしたがっ
て、Y="010"となり、領域C503の場合には、M="111", P
="011"に設定されており、図4の真理値表にしたがっ
て、Y="011"となり、領域D504の場合には、M="100", P
="100"に設定されており、図4の真理値表にしたがっ
て、Y="1X(1)X(2)"となる。領域A501にスタック、領域B
502と領域C503に2つの浮動小数点データ配列、領域D504
に整数データを割り当て、別の領域に割り当てたデータ
同士の競合をなくす、といった使い方ができる。Next, based on the flowcharts of FIGS. 1, 9, 13, and 14, the truth table of FIG. 4, the schematic diagram of FIG. 5, the table of FIG. 10, and the list of FIG. 7, 8 and 1
2, FIG. 15, FIG. 16, FIG. 17, and FIG. 18 will be described. In the flowchart of FIG. 1, first, the processor 10 executes an instruction (step 100). This instruction is a memory access instruction for specifying an address using the register 200 (step 105), and an address mask 300 corresponding to the register 200 shown in FIG. 3 is set (step 11).
0), the address calculation circuit 201 registers
4 (in the case of the example of FIG. 4, consisting of three bits of X (0), X (1), and X (2)), the replacement circuit 310 M field 301 (M
In the example of FIG. 4, M (0), M (1), and M (2) consist of three bits) and the P field 302 (P is P (0), P (0)
(1), a part of the address replaced based on the truth table 400 shown in FIG. 4 based on the three bits P (2) Y (in the example of FIG. 4, Y (0), Y (1) , Y (2)) (step 115). Here, by changing the contents of the address mask 300 corresponding to each register, data specifying an address using the register can be assigned to another column in the cache 210. In FIG. 4, M (0), Y (0), X (0), and P (0) are upper bits, and M (2), Y (2), X (2), and P (2) are Each is a lower bit. According to such a configuration, for example, as shown in FIG. 5, the cache 210 is stored in the area A501, the area B502, and the area C50.
3. The area D504 can be divided into four areas having different capacities. That is, in the case of the area A501, M = "110", P
= "00-", Y = "00X (2)" according to the truth table of FIG. 4, and in the case of the area B502, M = "111",
P is set to “010”, and according to the truth table of FIG. 4, Y is set to “010”. In the case of the area C503, M is set to “111” and P is set to P.
= "011", Y = "011" according to the truth table of FIG. 4, and in the case of the area D504, M = "100", P
= 100, and Y = 1X (1) X (2) "according to the truth table of FIG. Stack on area A501, area B
Two floating point data arrays in area 502 and area C503, area D504
Can be used, for example, by assigning integer data to each other and eliminating competition between data assigned to different areas.
【0029】次に、ロードまたはストアを実行すると
(ステップ120、詳細フローは図13のステップ1300以下
となる。また、そのためのキャッシュ制御機構の構成は
図12に示すとおりである。)、図12に示すロード/ス
トア制御回路1250は、命令がロードで(ステップ1300)あ
ればロード動作を行う。キャッシュヒットであれば(ス
テップ1305)、キャッシュ210からロードする(ステップ1
310)。Next, when load or store is executed,
(Step 120, the detailed flow is less than or equal to step 1300 in FIG. 13. The configuration of the cache control mechanism for that is as shown in FIG. 12.) The load / store control circuit 1250 shown in FIG. If loading (step 1300), the loading operation is performed. If it is a cache hit (step 1305), it is loaded from the cache 210 (step 1305).
310).
【0030】キャッシュミスであれば(ステップ1305)、
アドレス計算回路201で求めたアドレスの一部をページ
選択アドレス1110としてページテーブル1100を参照(ス
テップ1315)し、そのページのキャッシュ属性1130を読
み出す。キャッシュ属性1130がキャッシュ可能属性であ
り(ステップ1320)、レジスタ200に対応するロード動作
モード1200が"ライン転送を行わない"でなければ(ステ
ップ1325)、主記憶50からキャッシュ210にライン転送を
行う(ステップ1330)。キャッシュ属性1130がキャッシュ
可能属性でない(ステップ1320)か、レジスタ200に対応
するロード動作モード1200が"ライン転送を行わない"で
あれば(ステップ1325)、主記憶50からロードを行うが、
キャッシュ210にライン転送を行わない(ステップ133
5)。If it is a cache miss (step 1305),
A part of the address obtained by the address calculation circuit 201 is referred to the page table 1100 as the page selection address 1110 (step 1315), and the cache attribute 1130 of the page is read. If the cache attribute 1130 is a cacheable attribute (step 1320) and the load operation mode 1200 corresponding to the register 200 is not "not performing line transfer" (step 1325), a line transfer from the main memory 50 to the cache 210 is performed. (Step 1330). If the cache attribute 1130 is not the cacheable attribute (step 1320), or if the load operation mode 1200 corresponding to the register 200 is "do not perform line transfer" (step 1325), the data is loaded from the main memory 50.
No line transfer is performed to the cache 210 (step 133
Five).
【0031】このような構成によれば、例えば、離散ア
ドレスに対するアクセスを行う場合にはロード動作モー
ド1200にキャッシュミス時にキャッシュに対するライン
転送を行わない設定をすることで、同一ラインに含まれ
るが必要のないデータを転送しないようにすることがで
きる。また、連続アドレスに対するアクセスを行う場合
にはロード動作モード1200にキャッシュミス時にキャッ
シュ210に対するライン転送を行う設定をすることで必
要なデータを一度にキャッシュ210に転送することがで
きるロード/ストア制御回路1250は、命令がストアであ
れば(ステップ1300)ストア動作を行う(ステップ1400)。
キャッシュヒットであれば(ステップ1405)、アドレス計
算回路201で求めたアドレスの一部をページ選択アドレ
ス1110としてページテーブル1100を参照(ステップ1410)
し、そのページのキャッシュ属性1130を読み出す。キャ
ッシュ属性1130がストアイン属性であり(ステップ141
5)、レジスタ200に対応するストア動作モード1220がス
トアインであれば(ステップ1420)、キャッシュ210に対
しては書き込むが主記憶50に対しては書き込まないスト
アイン動作を行う(ステップ1425)。キャッシュ属性1130
がストアイン属性でない(ステップ1415)か、レジスタ20
0に対応するストア動作モード1220がストアインでなけ
れば(ステップ1420)、キャッシュ210と共に主記憶50に
も書き込むストアスルー動作を行う(ステップ1430)。According to such a configuration, for example, when accessing a discrete address, it is necessary to set the load operation mode 1200 so that line transfer to the cache is not performed at the time of a cache miss, so that it is included in the same line. You can prevent the transfer of data without the data. Also, when performing access to a continuous address, a load / store control circuit that can transfer necessary data to the cache 210 at a time by setting the line operation to the cache 210 in the case of a cache miss in the load operation mode 1200 In step 1250, if the instruction is a store (step 1300), a store operation is performed (step 1400).
If it is a cache hit (step 1405), a part of the address obtained by the address calculation circuit 201 is referred to the page table 1100 as the page selection address 1110 (step 1410).
Then, the cache attribute 1130 of the page is read. The cache attribute 1130 is the store-in attribute (step 141
5) If the store operation mode 1220 corresponding to the register 200 is store-in (step 1420), a store-in operation is performed to write to the cache 210 but not to the main memory 50 (step 1425). Cache attribute 1130
Is not a store-in attribute (step 1415) or register 20
If the store operation mode 1220 corresponding to 0 is not store-in (step 1420), a store-through operation of writing data to the main memory 50 together with the cache 210 is performed (step 1430).
【0032】キャッシュミスであれば(ステップ1405)、
アドレスの一部をページ選択アドレス1110としてページ
テーブル1100を参照(ステップ1450)し、そのページのキ
ャッシュ属性1130を読み出す。キャッシュ属性1130がラ
イトアロケート属性であり(ステップ1455)、レジスタ20
0に対応するストア動作モード1220がライトアロケート
であれば(ステップ1460)、主記憶50からキャッシュ210
にライン転送を行ってからキャッシュ210に対して書き
込むライトアロケート動作を行う(ステップ1465)。キャ
ッシュ属性1130がライトアロケート属性でない(ステッ
プ1455)か、レジスタ200に対応するストア動作モード12
20がライトアロケートでなければ(ステップ1460)、主記
憶50のみに書き込むライトノーアロケート動作を行う
(ステップ1470)。If it is a cache miss (step 1405),
A part of the address is referred to the page table 1100 as the page selection address 1110 (step 1450), and the cache attribute 1130 of the page is read. Cache attribute 1130 is the write allocate attribute (step 1455), and register 20
If the store operation mode 1220 corresponding to 0 is a write allocate (step 1460), the cache 210
Then, a write allocate operation for writing to the cache 210 is performed after the line transfer (step 1465). The cache attribute 1130 is not the write allocate attribute (step 1455), or the store operation mode 12 corresponding to the register 200
If 20 is not a write allocate (step 1460), a write no allocate operation of writing only to the main memory 50 is performed.
(Step 1470).
【0033】このような構成によれば、例えば、メモリ
コピー等を行うときにはストア動作モード1220にストア
スルー及びノーライトアロケート動作を設定することで
コヒーレンス制御のオーバヘッドを低減し、アロケート
動作のオーバヘッドを無くし、他のデータがキャッシュ
210から追い出されることを避けることができる。ま
た、共有しないデータや他のプロセッサが頻繁に更新ま
たは参照しないデータに対するアクセスを行うときには
ストア動作モード1220にストアイン及びライトアロケー
ト動作を設定することでメモリアクセスのトラフィック
を低減することができる。According to such a configuration, for example, when performing a memory copy or the like, the store operation mode 1220 is set with the store-through and no-write allocate operations, thereby reducing the coherence control overhead and eliminating the allocate operation overhead. And other data is cached
You can avoid being kicked out of 210. Also, when accessing non-shared data or data that is not frequently updated or referred to by another processor, the memory access traffic can be reduced by setting the store-in and write-allocate operations in the store operation mode 1220.
【0034】ロードまたはストアを実行するときにキャ
ッシュミスすると、キャッシュラインを置き換える場合
がある(ステップ125)。すなわち、前述のステップ1330
における「主記憶からキャッシュ210にライン転送を行
う」場合、または、前述のステップ1465における「主記
憶からキャッシュ210にライン転送を行ってからキャッ
シュ210に対して書き込むライトアロケート動作を行
う」場合に、ライン転送先のキャッシュラインまたはラ
イトアロケート先のキャッシュラインに有効データがキ
ャッシュされている場合、キャッシュラインの置き換え
を行う。このときに、図7に示す置き換えロウ決定回路
710は、レジスタ200に対応するロウ番号700が設定され
ていれば(ステップ130)、ロウ番号700のロウを置き換え
対象とし(ステップ135)、ロウ番号700が設定されていな
ければ(ステップ130)、キャッシュ210から読み出したLR
U情報を元に置き換え対象のロウを決定する(ステップ14
0)。ここで、レジスタ毎に対応するロウ番号の内容を変
えることで、そのレジスタを用いてアドレスを指定する
データをキャッシュ210内の特定のロウに選択的に割り
当てることが可能である。例えば数値演算では、特定の
大規模データの連続アドレスに対するアクセスを行う
と、キャッシュあふれによって他のデータがキャッシュ
210から追い出されることが起きるが、そのデータを特
定のロウに割り当てることで、他のデータがキャッシュ
210から追い出されることを防ぐことができる。If a cache miss occurs when executing a load or store, the cache line may be replaced (step 125). That is, the above-mentioned step 1330
In the case of `` performing a line transfer from the main storage to the cache 210 '' in the above, or the case of `` performing the line allocation from the main storage to the cache 210 and then performing a write allocate operation to write to the cache 210 '' in the above-mentioned step 1465 When valid data is cached in the cache line of the line transfer destination or the cache line of the write allocate destination, the cache line is replaced. At this time, the replacement row determination circuit shown in FIG.
710, if the row number 700 corresponding to the register 200 is set (step 130), the row of the row number 700 is replaced (step 135), and if the row number 700 is not set (step 130), LR read from cache 210
Determine the Row to be replaced based on the U information (Step 14
0). Here, by changing the content of the corresponding row number for each register, it is possible to selectively assign data specifying an address using the register to a specific row in the cache 210. For example, in numerical operations, when accessing a continuous address of specific large-scale data, cache overflow causes other data to be cached.
It can be evicted from 210, but by assigning that data to a specific row, other data is cached.
It can prevent you from being kicked out of 210.
【0035】命令実行の結果、レジスタ200の値が更新
された場合は(ステップ145)、レジスタ200に対応するプ
リフェッチ有効条件800が成立したか否かを条件成立検
出回路810が判定し(ステップ150)、プリフェッチ制御回
路890に通知する。プリフェッチ制御回路890は条件成立
検出回路810からの通知を受け取ると、プリフェッチを
開始する(ステップ155)。ステップ155の詳細フローは図
9に示すステップ910以下である。図8の例の場合、プ
リフェッチ有効条件800には4ビットの値がセットされ
る。 また、図10のプリフェッチ有効条件の例(1000)
には、発生するプリフェッチ有効条件が示される。例え
ば、プリフェッチ有効条件800の4ビットの値が"1000"
であり、この時、4ビットの値の最左端のビットに対応
する参照符号1010のプリフェッチ有効条件が発生してい
れば、条件成立回路810の出力は真となる。また、プリ
フェッチ有効条件800の4ビットの値が"0100"であり、
この時、4ビットの値の左から2番目のビットに対応す
る参照符号1020のプリフェッチ有効条件が発生していれ
ば、条件成立回路810の出力は真となる。また、プリフ
ェッチ有効条件800の4ビットの値が"0010"であり、こ
の時、4ビットの値の左から3番目のビットに対応する
参照符号1030のプリフェッチ有効条件が発生していれ
ば、条件成立回路810の出力は真となる。また、プリフ
ェッチ有効条件800の4ビットの値が"0001"であり、こ
の時、4ビットの値の最右端のビットに対応する参照符
号1040のプリフェッチ有効条件が発生していれば、条件
成立回路810の出力は真となる。しかし、プリフェッチ
有効条件800の4ビットの値が"1000"であり、この時、
4ビットの値の左から2番目のビットに対応する参照符
号1020のプリフェッチ有効条件が発生していれば、条件
成立回路810の出力は偽となる。また、プリフェッチ有
効条件8004ビツト値が"1111"であり、この時、参照符
号1010、1020、1030、1040のプリフェッチ有効条件のい
ずれかが発生していれば、条件成立回路810の出力は真
となる。しかし、プリフェッチ有効条件8004ビツト値
が"0000"である時は、参照符号1010、1020、1030、1040
のプリフェッチ有効条件のいずれかが発生していても、
条件成立回路810の出力は偽となる。When the value of the register 200 is updated as a result of the execution of the instruction (step 145), the condition satisfaction detection circuit 810 determines whether the prefetch valid condition 800 corresponding to the register 200 is satisfied (step 150). ), And notifies the prefetch control circuit 890. Upon receiving the notification from the condition satisfaction detection circuit 810, the prefetch control circuit 890 starts prefetch (step 155). The detailed flow of Step 155 is Step 910 and subsequent steps shown in FIG. In the example of FIG. 8, a 4-bit value is set in the prefetch validity condition 800. Also, an example of the prefetch valid condition in FIG. 10 (1000)
Shows a prefetch valid condition that occurs. For example, the 4-bit value of the prefetch enable condition 800 is "1000"
At this time, if the prefetch valid condition of reference numeral 1010 corresponding to the leftmost bit of the 4-bit value has occurred, the output of the condition satisfaction circuit 810 becomes true. Also, the 4-bit value of the prefetch valid condition 800 is "0100",
At this time, if the prefetch valid condition of reference numeral 1020 corresponding to the second bit from the left of the 4-bit value has occurred, the output of the condition satisfaction circuit 810 becomes true. If the 4-bit value of the prefetch valid condition 800 is “0010” and the prefetch valid condition of the reference numeral 1030 corresponding to the third bit from the left of the 4-bit value is generated, the condition The output of the establishment circuit 810 is true. If the 4-bit value of the prefetch valid condition 800 is "0001" and the prefetch valid condition of reference numeral 1040 corresponding to the rightmost bit of the 4-bit value is generated at this time, the condition satisfaction circuit The output of 810 is true. However, the 4-bit value of the prefetch valid condition 800 is "1000".
If the prefetch valid condition of reference numeral 1020 corresponding to the second bit from the left of the 4-bit value has occurred, the output of the condition satisfaction circuit 810 becomes false. The prefetch valid condition 8004 bit value is "1111". At this time, if any of the prefetch valid conditions denoted by reference numerals 1010, 1020, 1030, and 1040 has occurred, the output of the condition satisfaction circuit 810 is true. Become. However, when the prefetch valid condition 8004 bit value is “0000”, reference numerals 1010, 1020, 1030, and 1040
Even if any of the prefetch enable conditions for
The output of the condition satisfaction circuit 810 is false.
【0036】プリフェッチの動作についてはまず、プリ
フェッチサイズ850とサイズ保持手段855とカウンタ860
と比較器880とプリフェッチインデックス820と加算器83
0とスタートアドレス保持手段840を備える構成の動作に
ついて説明し、その後、他の構成について説明する。プ
リフェッチを開始すると、カウンタ860を0にクリアし
(ステップ910)、プリフェッチサイズ850の値をサイズ保
持手段855に保持する(ステップ915)。加算器830でレジ
スタ200の値とプリフェッチインデックス820の値の和を
求めスタートアドレスとし、スタートアドレス保持手段
840に保持する(ステップ920)。カウンタ860とサイズ保
持手段855の値を比較し(ステップ925)、等しくなければ
加算器870でスタートアドレス保持手段840とカウンタ86
0の値の和を求めプリフェッチアドレスとし、該プリフ
ェッチアドレスに対応する主記憶50内のデータをキャ
ッシュ210の該プリフェッチアドレスに対応するキャッ
シュラインに転送することを開始する(ステップ930)。
その後、サイズ保持手段の値が正であればカウンタに1
を加算し、負であればカウンタから1を減算し(ステップ
935、ステップ940、ステップ945)、カウンタとサイズの
比較(ステップ925)に戻る。As for the prefetch operation, first, the prefetch size 850, the size holding means 855, and the counter 860
And comparator 880, prefetch index 820 and adder 83
The operation of the configuration including 0 and the start address holding means 840 will be described, and then other configurations will be described. When the prefetch starts, the counter 860 is cleared to 0.
(Step 910) The value of the prefetch size 850 is held in the size holding means 855 (Step 915). The adder 830 calculates the sum of the value of the register 200 and the value of the prefetch index 820 and sets the sum as a start address.
It is held at 840 (step 920). The value of the counter 860 is compared with the value of the size holding means 855 (step 925).
The sum of the values of 0 is obtained as the prefetch address, and the transfer of the data in the main memory 50 corresponding to the prefetch address to the cache line of the cache 210 corresponding to the prefetch address is started (step 930).
Then, if the value of the size holding means is positive, the counter is incremented by one.
If it is negative, subtract 1 from the counter (step
935, step 940, step 945), and return to the counter and size comparison (step 925).
【0037】このような構成によれば、例えば、C言語
におけるポインタ変数を格納するレジスタに対応するプ
リフェッチ有効条件800の、"キャッシュまたは主記憶か
ら読み出した値が書き込まれたとき" 1010を有効とする
ことで、動作を高速化できる。また例えば、2重ループ
の内側のループで連続アドレスに対する主記憶50へのア
クセスを行い、外側のループではベースアドレスを1回
の内側ループでアクセスする領域の大きさずつ更新する
場合には、ベースアドレスを格納するレジスタ200に対
応するプリフェッチ有効条件800の、"レジスタの値に即
値を加算または減算して元のレジスタに書き戻したと
き" 1020を有効とし、プリフェッチインデックス820と
プリフェッチサイズ850を1回の内側ループでアクセスす
る領域の大きさに設定することで、内側ループ1回分の
主記憶アクセスレイテンシを隠蔽することができる。当
然、プリフェッチインデックス820を1回の内側ループで
アクセスする領域の大きさの何倍かに設定することで内
側ループ1回分の何倍かのレイテンシを隠蔽することも
できる。また例えば、プログラムカウンタに対応するプ
リフェッチ有効条件800の、"レジスタの値に即値を加算
して元のレジスタに書き戻し、元の値の下位Nビットを
無視した値と結果の値の下位Nビットを無視した値が異
なるとき" 1030を有効とし、プリフェッチサイズ850を2
のN乗に設定することで、コードキャッシュミス時のペ
ナルティを削減することができる。また例えば、あるレ
ジスタに対応するプリフェッチ有効条件800の、"主記憶
アクセスと同時にアドレスレジスタを更新する命令の実
行によってアドレスレジスタの値が変ったとき" 1040を
有効とし、プリフェッチインデックス820を適当な大き
さに設定することで、公知の技術である前述の、Hewlet
t-Packard journal1996年2月号30頁に示されるヒューレ
ット・パッカード社のマイクロプロセッサPA-7200と同
様に命令数を増加させずにプリフェッチ可能である上
に、該公知の技術よりもはるかに大きい主記憶アクセス
レイテンシを隠蔽することができる。According to such a configuration, for example, "when a value read from the cache or the main memory is written" 1010 of the prefetch valid condition 800 corresponding to the register storing the pointer variable in the C language is valid. By doing so, the operation can be sped up. Also, for example, when the main memory 50 is accessed for a continuous address in the inner loop of the double loop, and the base address is updated by the size of the area accessed in one inner loop in the outer loop, The prefetch validity condition 800 corresponding to the register 200 storing the address, "when the immediate value is added to or subtracted from the register value and written back to the original register" 1020 is valid, and the prefetch index 820 and prefetch size 850 are set to 1 By setting the size of the area to be accessed in the inner loop, the main memory access latency for one inner loop can be hidden. Naturally, by setting the prefetch index 820 to a multiple of the size of the area accessed in one inner loop, it is possible to hide the latency of several times of one inner loop. Also, for example, in the prefetch enable condition 800 corresponding to the program counter, the immediate value is added to the value of the register, the value is written back to the original register, the value ignoring the lower N bits of the original value, and the lower N bits of the result value If the value ignoring is different, "1030 is valid and the prefetch size 850 is 2
By setting to the Nth power, the penalty at the time of a code cache miss can be reduced. Also, for example, the prefetch validity condition 800 corresponding to a certain register, “when the value of the address register changes due to execution of an instruction to update the address register simultaneously with main memory access” 1040 is made valid, and the prefetch index 820 is set to an appropriate size. By setting to the above, Hewlett
Similar to the Hewlett-Packard Microprocessor PA-7200 shown on page 30 of the t-Packard journal, February 1996, it can be prefetched without increasing the number of instructions, and it is much larger than the known technology. The storage access latency can be hidden.
【0038】また、上記の構成で、スタートアドレス保
持手段840とカウンタ860と加算器870に代えて、プリフ
ェッチアドレスカウンタだけを持ち、サイズ保持手段85
5に代えてプリフェッチ終了アドレス保持手段を持つ構
成も可能である。この構成の場合は、レジスタ200の値
とプリフェッチインデックス820の値の和をプリフェッ
チアドレスカウンタに設定し、レジスタ200の値とプリ
フェッチインデックス820の値とプリフェッチサイズの
和をプリフェッチ終了アドレス保持手段に設定する。そ
してプリフェッチしながらプリフェッチアドレスカウン
タをインクリメント(またはデクリメント)し、プリフェ
ッチアドレスカウンタの値とプリフェッチ終了アドレス
保持手段の値が一致したところでプリフェッチを終了す
る。In the above configuration, only the prefetch address counter is provided instead of the start address holding means 840, the counter 860 and the adder 870, and the size holding means 85
A configuration having prefetch end address holding means instead of 5 is also possible. In the case of this configuration, the sum of the value of the register 200 and the value of the prefetch index 820 is set in the prefetch address counter, and the sum of the value of the register 200, the value of the prefetch index 820, and the prefetch size is set in the prefetch end address holding means. . Then, the prefetch address counter is incremented (or decremented) while the prefetch is being performed, and the prefetch ends when the value of the prefetch address counter matches the value of the prefetch end address holding means.
【0039】また、上記の構成で、機能を限定すること
で一部の要素を省いた構成も可能である。プリフェッチ
サイズ850は、値を1またはキャッシュラインのサイズの
固定倍に限定することで省略可能である。プリフェッチ
インデックスは値を0またはまたはキャッシュラインの
サイズの固定倍に限定することで省略可能である。In the above-described configuration, a configuration in which some elements are omitted by limiting functions is also possible. The prefetch size 850 can be omitted by limiting the value to 1 or a fixed multiple of the size of the cache line. The prefetch index can be omitted by limiting the value to 0 or a fixed multiple of the cache line size.
【0040】レジスタ200の値が、キャッシュ50または
主記憶210から読み出した値によって更新された場合は
(ステップ160)、図15に示す予め設定した控えのキャ
ッシュ制御情報1510が、キャッシュ制御情報1500に再設
定される(ステップ165)。また、レジスタ200に、図16
に示すように他のレジスタ1600の値またはレジスタ1600
の値を用いた演算結果が書き込まれる時は、レジスタ16
00に対応する控えのキャッシュ制御情報1610が読み出さ
れ、キャッシュ制御情報1500に書き込まれる(ステップ1
70)。When the value of the register 200 is updated by the value read from the cache 50 or the main memory 210,
(Step 160), the preset cache control information 1510 shown in FIG. 15 is reset to the cache control information 1500 (Step 165). In addition, the register 200 shown in FIG.
The value of other register 1600 or register 1600 as shown in
When the operation result using the value of
The reserved cache control information 1610 corresponding to 00 is read and written to the cache control information 1500 (step 1).
70).
【0041】[0041]
【発明の効果】本発明によれば、レジスタ対応に持つキ
ャッシュ制御情報に従ってキャッシュ制御を行うこと
で、従来困難であったメモリアクセスパターンに応じた
キャッシュ制御が可能になる。また、アドレス指定に用
いるレジスタに対応するアドレスマスクでキャッシュの
カラム選択に用いるアドレスの一部を置き換えてキャッ
シュにアクセスすることによって、キャッシュのカラム
のうちアドレスマスクによって決まる一部のカラムのみ
を使用するので、データ毎にアドレスマスクを変えるこ
とで同一カラムに対する複数データの競合をなくすこと
ができ、従来技術であるロウの数を増やした場合と較べ
てキャッシュから同時に読み出すビット数が小さいので
キャッシュアクセスを速くすることが可能であり、ま
た、キャッシュを構成するメモリとしてビット幅が小さ
く、ワード長の大きいメモリが使えるため、同容量のキ
ャッシュを実現するために必要な配線量も小さくするこ
とが可能である。また、アドレス指定に用いるレジスタ
に対応するロウ番号のキャッシュラインを置き換えるこ
とによって、キャッシュのロウのうちロウ番号によって
決まる一部のロウを選択的に使用するので、特定の大規
模データに特定のロウ番号を占有的に割り当てることで
大規模データによるキャッシュあふれが他のデータを追
い出すことをなくすことができる。また、アドレス指定
に用いるレジスタに対応するプリフェッチ有効条件によ
って、プリフェッチ有効条件が成立したときのみ更新後
のレジスタの値をスタートアドレスとしてデータをキャ
ッシュに読み込むので、プリフェッチ有効条件を適当に
設定することでプリフェッチ命令を追加することなくデ
ータをキャッシュに読み込むことができる。また、アド
レス指定に用いるレジスタに対応するプリフェッチ有効
条件とプリフェッチインデックスによって、プリフェッ
チ有効条件が成立したときのみ更新後のレジスタの値と
プリフェッチインデックスの和をスタートアドレスとし
てデータをキャッシュに読み込むので、プリフェッチ有
効条件とプリフェッチインデックスを適当に設定するこ
とでプリフェッチ命令を追加することなくデータを実際
に使用するよりも十分早くキャッシュに読み込むことが
できる。また、アドレス指定に用いるレジスタに対応す
るプリフェッチ有効条件とプリフェッチサイズによっ
て、プリフェッチ有効条件が成立したときのみ更新後の
レジスタの値をスタートアドレスとしてプリフェッチサ
イズ分だけのデータをキャッシュに読み込むので、プリ
フェッチ有効条件とプリフェッチサイズを適当に設定す
ることでプリフェッチ命令を追加することなく必要なデ
ータをキャッシュに読み込むことができる。また、アド
レス指定に用いるレジスタに対応するプリフェッチ有効
条件とプリフェッチインデックスとプリフェッチサイズ
によって、プリフェッチ有効条件が成立したときのみ更
新後のレジスタの値とプリフェッチインデックスの和を
スタートアドレスとしてプリフェッチサイズ分だけのデ
ータをキャッシュに読み込むので、プリフェッチ有効条
件とプリフェッチインデックスとプリフェッチサイズを
適当に設定することでプリフェッチ命令を追加すること
なく必要なデータを実際に使用するよりも十分早くキャ
ッシュに読み込むことができる。また、アドレス指定に
用いるレジスタに対応するロード動作モードに従って、
キャッシュヒット時とキャッシュミス時のそれぞれにキ
ャッシュに対するライン転送を行うか行わないかを選択
するので、離散データに対するアクセスについてはライ
ン転送を行わない設定をすることで、無駄なデータ転送
をなくすことができる。また、アドレス指定に用いるレ
ジスタに対応するストア動作モードに従って、キャッシ
ュヒット時のストアイン動作とストアスルー動作を選択
し、キャッシュミス時のライトアロケート動作とノーラ
イトアロケート動作を選択するので、主記憶を共有する
他のプロセッサまたは他のデバイスと頻繁にコヒーレン
ス制御を行う必要のある共有データに対するアクセスに
ついてはストアスルー動作を設定することで、キャッシ
ュのフラッシュが不要となりコヒーレンス制御のオーバ
ヘッドを低減することができ、また、メモリコピーを行
う場合はノーライトアロケート動作設定することで、ア
ロケート動作のオーバヘッドを無くし、キャッシュに無
駄なデータが入ることで他のデータが追い出されること
を防ぐことができ、それ以外の場合はストアインおよび
ライトアロケート動作を設定することでメモリアクセス
のトラフィックを削減することができる。また、レジス
タに対応するキャッシュ制御情報をレジスタの値のソー
スに応じて控えのキャッシュ制御情報を自動的に設定す
るので、キャッシュ制御のための命令数の増加を抑える
ことができる。According to the present invention, cache control according to a memory access pattern, which has been conventionally difficult, can be performed by performing cache control in accordance with cache control information corresponding to a register. Also, by accessing a cache by replacing a part of an address used for selecting a column of a cache with an address mask corresponding to a register used for specifying an address, only a part of the columns of the cache determined by the address mask is used. Therefore, by changing the address mask for each data, it is possible to eliminate contention of a plurality of data for the same column, and the number of bits read from the cache at the same time is smaller than when the number of rows is increased in the related art. It is possible to increase the speed.Also, a memory with a small bit width and a large word length can be used as the memory constituting the cache, so that the amount of wiring required to realize a cache of the same capacity can be reduced. is there. Also, by replacing the cache line of the row number corresponding to the register used for address specification, a part of the rows of the cache determined by the row number is selectively used, so that the specific large-scale data is stored in the specific row. By allocating numbers exclusively, it is possible to prevent cache overflow due to large-scale data from eviction of other data. Also, the data is read into the cache with the updated register value as the start address only when the prefetch valid condition is satisfied by the prefetch valid condition corresponding to the register used for address specification, so that the prefetch valid condition is appropriately set. Data can be read into the cache without adding a prefetch instruction. In addition, the prefetch validity condition and prefetch index corresponding to the register used for address specification make it possible to read data into the cache using the sum of the updated register value and prefetch index as the start address only when the prefetch validity condition is satisfied. By appropriately setting the conditions and the prefetch index, data can be read into the cache sufficiently sooner than actually used without adding a prefetch instruction. In addition, the prefetch validity condition and prefetch size corresponding to the register used for address specification determine that the prefetch validity condition is satisfied. By appropriately setting the condition and the prefetch size, necessary data can be read into the cache without adding a prefetch instruction. Only when the prefetch valid condition is satisfied, the sum of the updated register value and the prefetch index is used as the start address, and only the prefetch valid data corresponding to the register used for address specification is used as the start address. Is read into the cache, and by appropriately setting the prefetch valid condition, the prefetch index, and the prefetch size, necessary data can be read into the cache sufficiently quickly without adding a prefetch instruction, as compared with actually using the data. Also, according to the load operation mode corresponding to the register used for addressing,
It is possible to select whether or not to perform line transfer to the cache at the time of a cache hit and cache miss, respectively.Therefore, by setting the line transfer not to be performed for access to discrete data, unnecessary data transfer can be eliminated. it can. In addition, according to the store operation mode corresponding to the register used for address designation, a store-in operation and a store-through operation at the time of a cache hit are selected, and a write allocate operation and a no-write allocate operation at the time of a cache miss are selected. By setting a store-through operation for access to shared data that requires frequent coherence control with other processors or other devices to be shared, cache flush is not required and coherence control overhead can be reduced. In addition, when performing a memory copy, by setting a no-write allocate operation, the overhead of the allocate operation can be eliminated, and other data can be prevented from being evicted due to useless data entering the cache. If strike It is possible to reduce the traffic of memory access by setting the in and write allocate operation. Also, since the cache control information corresponding to the register is automatically set as the reserved cache control information according to the source of the value of the register, it is possible to suppress an increase in the number of instructions for cache control.
【図1】本発明の動作の実施の形態を示すフローチャー
トである。FIG. 1 is a flowchart showing an embodiment of the operation of the present invention.
【図2】従来のキャッシュ制御機構の構成の一部を示す
ブロック図である。FIG. 2 is a block diagram showing a part of the configuration of a conventional cache control mechanism.
【図3】図2にアドレスマスクを元に動作する置き換え
回路を適用した場合の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration when a replacement circuit that operates based on an address mask is applied to FIG. 2;
【図4】図3における置き換え回路の論理動作例を示す
真理値表である。FIG. 4 is a truth table showing a logical operation example of the replacement circuit in FIG. 3;
【図5】図3のキャッシュ制御機構を用いた場合に可能
となるキャッシュ制御の例を示す模式図である。FIG. 5 is a schematic diagram showing an example of cache control enabled when the cache control mechanism of FIG. 3 is used.
【図6】従来のキャッシュ制御機構の構成の一部を示す
ブロック図である。FIG. 6 is a block diagram showing a part of the configuration of a conventional cache control mechanism.
【図7】図6に置き換えロウ決定回路を適用した場合の
構成を示すブロック図である。FIG. 7 is a block diagram showing a configuration when the replacement row determination circuit is applied to FIG. 6;
【図8】プリフェッチ制御を行うキャッシュ制御機構の
実施例の構成を示すブロック図である。FIG. 8 is a block diagram illustrating a configuration of an embodiment of a cache control mechanism that performs prefetch control.
【図9】図8のキャッシュ制御機構の動作を示すフロー
チャートである。FIG. 9 is a flowchart showing the operation of the cache control mechanism of FIG. 8;
【図10】プリフェッチ有効条件の例を示す図である。FIG. 10 is a diagram illustrating an example of a prefetch valid condition.
【図11】従来のキャッシュ制御機構の構成の一部を示
すブロック図である。FIG. 11 is a block diagram showing a part of the configuration of a conventional cache control mechanism.
【図12】ロード動作モードおよびストア動作モードを
適用したキャッシュ制御機構の構成の一部を示すブロッ
ク図である。FIG. 12 is a block diagram illustrating a part of a configuration of a cache control mechanism to which a load operation mode and a store operation mode are applied;
【図13】図12の構成におけるロードに関わる動作を
示すフローチャートである。FIG. 13 is a flowchart showing an operation related to loading in the configuration of FIG. 12;
【図14】図12の構成におけるストアに関わる動作を
示すフローチャートである。FIG. 14 is a flowchart showing an operation relating to a store in the configuration of FIG. 12;
【図15】本発明のレジスタとキャッシュ制御情報とキ
ャッシュ制御情報の控えの関係を示すブロック図であ
る。FIG. 15 is a block diagram showing a relationship between a register, cache control information, and a copy of cache control information according to the present invention.
【図16】図15のレジスタに演算の結果が書きこまれ
た時の動作を示す図である。16 is a diagram illustrating an operation when a result of an operation is written in the register of FIG. 15;
【図17】図15のレジスタにロードデータが書きこま
れた時の動作を示す図である。17 is a diagram illustrating an operation when load data is written in the register of FIG. 15;
【図18】本発明に関わるプロセッサと主記憶の構成を
示す概略ブロック図である。FIG. 18 is a schematic block diagram showing a configuration of a processor and a main storage according to the present invention.
【図19】図18におけるキャッシュ制御情報の一覧表
を示す図である。FIG. 19 is a diagram showing a list of cache control information in FIG. 18;
10 プロセッサ 30 制御装置 50 主記憶 70 キャッシュ制御機構 200 レジスタ 202 キャッシュカラムアドレス 210 キャッシュ 300 アドレスマスク 310 置き換え回路 700 ロウ番号 800 プリフェッチ有効条件 810 条件成立検出回路 820 プリフェッチインデックス 850 プリフェッチサイズ 890 プリフェッチ制御回路 1200 ロード動作モード 1220 ストア動作モード 1500 キャッシュ制御情報 1510 ロード時に再設定される控えのキャッシュ制
御情報10 Processor 30 Controller 50 Main Memory 70 Cache Control Mechanism 200 Register 202 Cache Column Address 210 Cache 300 Address Mask 310 Replacement Circuit 700 Row Number 800 Prefetch Valid Condition 810 Condition Satisfaction Detection Circuit 820 Prefetch Index 850 Prefetch Size 890 Prefetch Control Circuit 1200 Load Operation mode 1220 Store operation mode 1500 Cache control information 1510 Reserved cache control information reset at the time of loading
Claims (7)
し、該レジスタを用いてキャッシュ、主記憶等のアドレ
ス指定を行うプロセッサにおけるキャッシュ制御機構で
あって、 予め設定可能なキャッシュ制御情報を前記レジスタ対応
に有し、前記レジスタを用いてアドレス指定を行う場合
及び前記レジスタの値が更新される場合は、該キャッシ
ュ制御情報に従ってキャッシュ制御を行うことを特徴と
するキャッシュ制御機構。1. A cache control mechanism in a processor having a cache and one or more registers, and using the registers to specify an address of a cache, a main memory, or the like, the cache control mechanism comprising: A cache control mechanism having register correspondence, wherein cache control is performed in accordance with the cache control information when address designation is performed using the register and when the value of the register is updated.
いて、 前記キャッシュ制御情報としてアドレスマスクを有し、
プロセッサがキャッシュにアクセスを行うときにアドレ
ス指定を行うレジスタに対応するアドレスマスクでキャ
ッシュのカラム選択に用いるアドレスの一部を置き換え
る手段を備え、該手段により置き換えの行われたアドレ
スによりキャッシュにアクセスすることを特徴とするキ
ャッシュ制御機構。2. The cache control mechanism according to claim 1, further comprising an address mask as said cache control information,
Means for replacing a part of an address used for selecting a column of a cache with an address mask corresponding to a register for specifying an address when the processor accesses the cache, and accessing the cache by the address replaced by the means; A cache control mechanism, characterized in that:
いて、 キャッシュ制御情報としてセットアソシアティブ構成の
キャッシュのロウ番号を有し、プロセッサがキャッシュ
ラインの置き換えを必要とするときにアドレス指定を行
うレジスタに対応するロウ番号のキャッシュラインを置
き換える手段を備えることを特徴とするキャッシュ制御
機構。3. The cache control mechanism according to claim 1, wherein the cache control information has a row number of a cache in a set associative configuration, and corresponds to a register for specifying an address when the processor needs to replace a cache line. A cache control mechanism comprising means for replacing a cache line of a row number to be executed.
いて、 前記キャッシュ制御情報としてプリフェッチ有効条件を
有し、レジスタの値が更新されたとき該レジスタに対応
するプリフェッチ有効条件の成立を検出する検出手段を
備え、該手段により成立が検出されたとき更新後のレジ
スタの値をスタートアドレスとしてデータを主記憶から
キャッシュに読み込むことを特徴とするキャッシュ制御
機構。4. The cache control mechanism according to claim 1, further comprising a prefetch valid condition as said cache control information, and detecting, when the value of the register is updated, a satisfaction of the prefetch valid condition corresponding to the register. A cache control mechanism for reading data from a main memory into a cache using the updated register value as a start address when the establishment is detected by the means.
いて、 前記キャッシュ制御情報としてプリフェッチインデック
スとプリフェッチサイズを有し、レジスタの値が更新さ
れ、該レジスタに対応するプリフェッチ有効条件の成立
が前記検出手段で検出されたときは、更新後のレジスタ
の値と該レジスタに対応する前記プリフェッチインデッ
クスの和をスタートアドレスとして該レジスタに対応す
る前記プリフェッチサイズ分だけのデータを主記憶から
キャッシュに読み込むことを特徴とするキャッシュ制御
機構。5. The cache control mechanism according to claim 4, wherein said cache control information has a prefetch index and a prefetch size, and a value of a register is updated. When the data is detected in the above, the data of the prefetch size corresponding to the register is read from the main memory to the cache using the sum of the updated register value and the prefetch index corresponding to the register as a start address. Cache control mechanism.
いて、 前記キャッシュ制御情報としてロード動作モードおよび
ストア動作モードを有し、プロセッサがロードを行なう
ときには、アドレス指定を行うレジスタに対応するロー
ド動作モードに従って、キャッシュミス時にキャッシュ
に対するライン転送を行うか行わないかを選択し、プロ
セッサがストアを行なうときには、アドレス指定を行う
レジスタに対応するストア動作モードに従って、キャッ
シュヒット時にはストアイン動作とストアスルー動作を
選択し、キャッシュミス時にはライトアロケート動作と
ノーライトアロケート動作を選択する手段を備えること
を特徴とするキャッシュ制御機構。6. The cache control mechanism according to claim 1, wherein the cache control information includes a load operation mode and a store operation mode, and when the processor performs a load operation, the processor operates in accordance with a load operation mode corresponding to a register for specifying an address. Select whether or not to perform line transfer to the cache at the time of a cache miss. When the processor performs a store, select the store-in operation and store-through operation at the time of a cache hit according to the store operation mode corresponding to the register that specifies the address. And a means for selecting between a write allocate operation and a no-write allocate operation when a cache miss occurs.
項記載のキャッシュ制御機構において、 前記キャッシュ制御情報の控えを有し、キャッシュ制御
情報の設定を行うときは同時にキャッシュ制御情報の控
えも設定し、 前記レジスタに他のレジスタの値または他のレジスタの
値を用いた演算結果が書き込まれる時は前記レジスタに
対応するキャッシュ制御情報を、前記他のレジスタに対
応するキャッシュ制御情報を元に更新し、 前記レジスタにキャッシュまたは主記憶から読み込んだ
値が書き込まれる時は前記控えのキャッシュ制御情報を
前記レジスタに対応するキャッシュ制御情報として再び
設定することを特徴とするキャッシュ制御機構。7. The cache control mechanism according to claim 1, further comprising a copy of said cache control information, wherein said copy of said cache control information is simultaneously made when setting the cache control information. When a value of another register or an operation result using a value of another register is written to the register, the cache control information corresponding to the register is used as a basis based on the cache control information corresponding to the other register. And when the value read from the cache or main memory is written to the register, the reserved cache control information is set again as cache control information corresponding to the register.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9320423A JPH11143774A (en) | 1997-11-06 | 1997-11-06 | Cache control mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9320423A JPH11143774A (en) | 1997-11-06 | 1997-11-06 | Cache control mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH11143774A true JPH11143774A (en) | 1999-05-28 |
Family
ID=18121300
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP9320423A Pending JPH11143774A (en) | 1997-11-06 | 1997-11-06 | Cache control mechanism |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH11143774A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003007155A1 (en) * | 2001-07-12 | 2003-01-23 | Ip Flex Inc. | Integrated circuit device |
JP2005215911A (en) * | 2004-01-29 | 2005-08-11 | Hitachi Ltd | Information processing device |
JP2010086496A (en) * | 2008-10-03 | 2010-04-15 | Nec Corp | Vector computer system with cache memory, and operation method therefor |
US8166252B2 (en) | 2007-06-18 | 2012-04-24 | Fujitsu Limited | Processor and prefetch support program |
CN112860596A (en) * | 2021-02-07 | 2021-05-28 | 厦门壹普智慧科技有限公司 | Data flow cache of neural network tensor processor |
-
1997
- 1997-11-06 JP JP9320423A patent/JPH11143774A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003007155A1 (en) * | 2001-07-12 | 2003-01-23 | Ip Flex Inc. | Integrated circuit device |
US6868017B2 (en) | 2001-07-12 | 2005-03-15 | Ip Flex Inc. | Integrated circuit device |
JP2005215911A (en) * | 2004-01-29 | 2005-08-11 | Hitachi Ltd | Information processing device |
US8166252B2 (en) | 2007-06-18 | 2012-04-24 | Fujitsu Limited | Processor and prefetch support program |
JP2010086496A (en) * | 2008-10-03 | 2010-04-15 | Nec Corp | Vector computer system with cache memory, and operation method therefor |
US8151058B2 (en) | 2008-10-03 | 2012-04-03 | Nec Corporation | Vector computer system with cache memory and operation method thereof |
CN112860596A (en) * | 2021-02-07 | 2021-05-28 | 厦门壹普智慧科技有限公司 | Data flow cache of neural network tensor processor |
CN112860596B (en) * | 2021-02-07 | 2023-12-22 | 厦门壹普智慧科技有限公司 | Data stream cache device of neural network tensor processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0780769B1 (en) | Hybrid numa coma caching system and methods for selecting between the caching modes | |
US5893144A (en) | Hybrid NUMA COMA caching system and methods for selecting between the caching modes | |
US6957304B2 (en) | Runahead allocation protection (RAP) | |
US6356980B1 (en) | Method and system for bypassing cache levels when casting out from an upper level cache | |
US7913041B2 (en) | Cache reconfiguration based on analyzing one or more characteristics of run-time performance data or software hint | |
KR100240912B1 (en) | Stream filter | |
US7676632B2 (en) | Partial cache way locking | |
US7711902B2 (en) | Area effective cache with pseudo associative memory | |
US6766419B1 (en) | Optimization of cache evictions through software hints | |
US6826651B2 (en) | State-based allocation and replacement for improved hit ratio in directory caches | |
US8464009B2 (en) | Method for memory interleave support with a ceiling mask | |
US6430656B1 (en) | Cache and management method using combined software and hardware congruence class selectors | |
JP7340326B2 (en) | Perform maintenance operations | |
US20060143396A1 (en) | Method for programmer-controlled cache line eviction policy | |
JP2023507078A (en) | Downgrade prefetch level | |
JPH1196074A (en) | Computer system for dynamically selecting exchange algorithm | |
WO1993012484A1 (en) | A cache memory hierarchy that reduces power consumption by reducing accesses to main memory | |
US6385695B1 (en) | Method and system for maintaining allocation information on data castout from an upper level cache | |
US6421761B1 (en) | Partitioned cache and management method for selectively caching data by type | |
US6370618B1 (en) | Method and system for allocating lower level cache entries for data castout from an upper level cache | |
US7093075B2 (en) | Location-based placement algorithms for set associative cache memory | |
US20080301371A1 (en) | Memory Cache Control Arrangement and a Method of Performing a Coherency Operation Therefor | |
JP5157424B2 (en) | Cache memory system and cache memory control method | |
US20020062423A1 (en) | Spatial footprint prediction | |
JPH11143774A (en) | Cache control mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20040316 |