JPH05225060A - Information processor - Google Patents

Information processor

Info

Publication number
JPH05225060A
JPH05225060A JP4059243A JP5924392A JPH05225060A JP H05225060 A JPH05225060 A JP H05225060A JP 4059243 A JP4059243 A JP 4059243A JP 5924392 A JP5924392 A JP 5924392A JP H05225060 A JPH05225060 A JP H05225060A
Authority
JP
Japan
Prior art keywords
cache
software
count
address
information processing
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
JP4059243A
Other languages
Japanese (ja)
Inventor
Hirohisa Amagasaki
浩久 尼崎
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 JP4059243A priority Critical patent/JPH05225060A/en
Publication of JPH05225060A publication Critical patent/JPH05225060A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To change a cache control parameter by enabling software to detect the cache hit rate at the time of job execution. CONSTITUTION:Software accesses a cache access counter means 112 and a cache hit counter means 111 to detect the cache hit rate, and a cache parameter set register means 104 is so set that the cache hit rate is maximum, and a cache system (direct map/set associative) is selected and the cache line size is set by the value of this cache parameter set register means 104.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は情報処理装置のキャッシ
ュヒット率測定とキャッシュ制御を実現するための情報
処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing device for realizing cache hit rate measurement and cache control of the information processing device.

【0002】[0002]

【従来の技術】従来、この種の情報処理装置において
は、ジョブ実行時のキャッシュのヒット率の測定の際は
外部にロジックアナライザなどの測定器を接続する必要
があった。また、キャッシュの制御に関するパラメータ
(ラインサイズなど)は固定であるか、可変であっても
リセット時にしか変更できずジョブ実行時に変更するこ
とはできなかった。
2. Description of the Related Art Conventionally, in this type of information processing apparatus, it has been necessary to connect a measuring device such as a logic analyzer to the outside when measuring the cache hit rate during job execution. In addition, even if the parameter (line size etc.) related to cache control is fixed or variable, it can be changed only at reset and cannot be changed at job execution.

【0003】[0003]

【発明が解決しようとする課題】上述した従来の情報処
理装置では、一般にキャッシュのヒット率のわずかな変
化が性能に大きく影響するがキャッシュのヒット率を装
置設計時に正確に予測することは非常に難しいという課
題があった。また、キャッシュのヒット率はキャッシュ
の構成方式(ダイレクトマップ方式,セットアソシアテ
ィブ方式)やライン(ブロック)サイズに依存するが、
これらのパラメータをどう設定したときに最高のキャッ
シュヒット率になるかはプログラムの命令,データアク
セスの仕方によって異なる。従来の情報処理装置におい
てこれらのパラメータは固定であるか可変であってもリ
セット時にしか変更できないためあるプログラムに対し
ては効果的な設定であっても別のプログラムに対しては
非能率的な設定になるという課題があった。したがっ
て、従来の情報処理装置はハードウェアの処理性能を最
高に引き出しているとはいえない。
In the above-mentioned conventional information processing apparatus, generally, a slight change in the cache hit rate greatly affects the performance, but it is very difficult to accurately predict the cache hit rate at the time of designing the apparatus. There was a problem that was difficult. The cache hit rate depends on the cache configuration method (direct map method, set associative method) and line (block) size.
How to set these parameters to obtain the highest cache hit rate depends on the program instruction and data access method. In the conventional information processing apparatus, even if these parameters are fixed or variable, they can be changed only at the time of reset, so even if the setting is effective for one program, it is inefficient for another program. There was a problem of becoming a setting. Therefore, it cannot be said that the conventional information processing apparatus has the maximum hardware processing performance.

【0004】[0004]

【課題を解決するための手段】本発明の情報処理装置
は、キャッシュを持つ情報処理装置において、ソフトウ
ェアからアクセス可能でありキャッシュアクセス回数を
カウントするキャッシュアクセスカウンタ手段と、上記
ソフトウェアからアクセス可能でありキャッシュヒット
回数をカウントするキャッシュヒットカウンタ手段を備
えるものである。また、本発明の別の発明による情報処
理装置は上記のものにおいて、ソフトウェアからアクセ
ス可能なキャッシュカウント上限アドレスレジスタ手段
と、上記ソフトウェアからアクセス可能なキャッシュカ
ウント下限アドレスレジスタ手段を備え、かつキャッシ
ュに対するアクセスアドレスがキャッシュカウント下限
アドレスレジスタの値以上でありかつデータキャッシュ
カウント上限アドレスレジスタの値以下の場合に限りキ
ャッシュアクセス回数をカウントするキャッシュアクセ
スカウンタ手段およびキャッシュヒット回数をカウント
するキャッシュヒットカウンタ手段を備えるものであ
る。また、本発明のさらに別の発明による情報処理装置
は上記の第1の発明において、ソフトウェアからアクセ
ス可能なキャッシュパラメータ設定レジスタ手段と、ダ
イレクトマップ方式とセットアソシアティブ方式を排他
的に実現できるキャッシュを備え、上記キャッシュパラ
メータ設定レジスタ手段の値により上記キャッシュの制
御方式をダイレクトマップ方式にするかセットアソシア
ティブ方式にするか選択するようにしたものである。
In an information processing apparatus having a cache, the information processing apparatus of the present invention is accessible by software, and cache access counter means for counting the number of times of cache access, and is accessible by the software. A cache hit counter means for counting the number of cache hits is provided. An information processing apparatus according to another invention of the present invention is the above-mentioned one, which comprises cache count upper limit address register means accessible by software and cache count lower limit address register means accessible by software, and accessing the cache. A cache access counter means for counting the number of cache accesses and a cache hit counter means for counting the number of cache hits only when the address is greater than or equal to the value of the cache count lower limit address register and less than or equal to the value of the data cache count upper limit address register Is. Further, an information processing apparatus according to still another invention of the present invention comprises, in the above-mentioned first invention, cache parameter setting register means accessible by software and a cache capable of exclusively realizing a direct map method and a set associative method. According to the value of the cache parameter setting register means, either the direct map method or the set associative method is selected as the cache control method.

【0005】[0005]

【作用】本発明においては、ジョブ実行時にソフトウェ
アが特定のアドレス範囲についてのキャッシュヒット率
を知ることができ、最高のキャッシュヒット率を得られ
るようにキャッシュパラメータを変更することができる
ようにする。
According to the present invention, the software can know the cache hit rate for a specific address range at the time of executing a job and can change the cache parameter so as to obtain the highest cache hit rate.

【0006】[0006]

【実施例】図1は本発明の一実施例を示すブロック図で
ある。この図1において、101は論理アドレス生成手
段、102は高速アドレス変換手段、103はタグ比較
手段、104はソフトウェアからアクセス可能なキャッ
シュパラメータ設定レジスタ手段、105はダイレクト
マップ方式とセットアソシアティブ方式を排他的に実現
できるキャッシュであるキャッシュメモリ手段、106
は命令デコード手段、107はゲート手段、108はソ
フトウェアからアクセス可能なキャッシュカウント上限
アドレスレジスタ手段、109はソフトウェアからアク
セス可能なキャッシュカウント下限アドレスレジスタ手
段、110はアドレス比較手段、111はソフトウェア
からアクセス可能でありキャッシュヒット回数をカウン
トするキャッシュヒットカウンタ手段、112はソフト
ウェアからアクセス可能でありキャッシュアクセス回数
をカウントするキャッシュアクセスカウンタ手段であ
る。113は論理アドレス(VA31−0)、114は
物理アドレス上位ビット(PA31−12)、115は
キャッシュタグ(TAG31−12)、116はキャッ
シュヒット信号、117はキャッシュアクセス信号、1
18はデータバス、119はキャッシュパラメータ信
号、120はキャッシュカウント上限アドレス、121
はキャッシュカウント下限アドレス、122はカウント
イネーブル信号、123はキャッシュヒットカウント信
号、124は外部から供給される命令信号である。
FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG. 1, 101 is a logical address generating means, 102 is a high-speed address converting means, 103 is a tag comparing means, 104 is a cache parameter setting register means accessible by software, and 105 is a direct map method and a set associative method. A cache memory means which is a cache that can be realized
Is instruction decoding means, 107 is gate means, 108 is cache count upper limit address register means accessible by software, 109 is cache count lower limit address register means accessible by software, 110 is address comparing means, 111 is accessible by software Is a cache hit counter means for counting the number of cache hits, and 112 is a cache access counter means accessible by software and for counting the number of cache accesses. Reference numeral 113 is a logical address (VA31-0), 114 is a physical address upper bit (PA31-12), 115 is a cache tag (TAG31-12), 116 is a cache hit signal, 117 is a cache access signal, 1
18 is a data bus, 119 is a cache parameter signal, 120 is a cache count upper limit address, 121
Is a cache count lower limit address, 122 is a count enable signal, 123 is a cache hit count signal, and 124 is an instruction signal supplied from the outside.

【0007】このように、本発明はソフトウェアからア
クセス可能でありキャッシュアクセス回数をカウントす
るキャッシュアクセスカウンタ手段113およびソフト
ウェアからアクセス可能でありキャッシュヒット回数を
カウントするキャッシュヒットカウンタ手段111を備
えるように構成されている。また、この発明において、
ソフトウェアからアクセス可能なキャッシュカウント上
限アドレスレジスタ手段108とソフトウェアからアク
セス可能なキャッシュカウント下限アドレスレジスタ手
段109を持ち、キャッシュに対するアクセスアドレス
がキャッシュカウント下限アドレスレジスタの値以上で
ありかつキャッシュカウント上限アドレスレジスタの値
以下の場合に限りキャッシュアクセス回数をカウントす
るキャッシュアクセスカウンタ手段113およびキャッ
シュヒット回数をカウントするキャッシュヒットカウン
タ手段111を備えるように構成され、さらに本発明は
上記第1の発明において、ソフトウェアからアクセス可
能なキャッシュパラメータ設定レジスタ手段104とダ
イレクトマップ方式とセットアソシアティブ方式を排他
的に実現できるキャッシュ105を持ちキャッシュパラ
メータ設定レジスタ手段104の値によりキャッシュ1
05の制御方式をダイレクトマップ方式にするかセット
アソシアティブ方式にするか選択するように構成され、
さらに、また、上記第1の発明において、ソフトウェア
からアクセス可能なキャッシュパラメータ設定レジスタ
手段104とラインサイズを変更できるキャッシュを持
ちキャッシュパラメータ設定レジスタ手段104の値に
よりキャッシュラインサイズを変更するように構成され
ている。
As described above, the present invention is configured to include the cache access counter means 113 which is accessible from software and counts the number of cache accesses, and the cache hit counter means 111 which is accessible from software and counts the number of cache hits. Has been done. Further, in this invention,
It has a cache count upper limit address register means 108 accessible by software and a cache count lower limit address register means 109 accessible by software, and the access address to the cache is equal to or greater than the value of the cache count lower limit address register and of the cache count upper limit address register. The cache access counter means 113 for counting the number of cache accesses and the cache hit counter means 111 for counting the number of cache hits are provided only when the value is less than or equal to the value. Further, in the first aspect of the present invention, the present invention provides access from software. The possible cache parameter setting register means 104 and the key that can exclusively realize the direct map method and the set associative method. Cache the value of the cash parameter setting register means 104 has a Mesh 105 1
The control method of 05 is configured to select the direct map method or the set associative method,
Furthermore, in the first invention, the cache parameter setting register means 104 accessible from software and the cache capable of changing the line size are provided, and the cache line size is changed according to the value of the cache parameter setting register means 104. ing.

【0008】そして、ソフトウェアからアクセス可能で
あり命令キャッシュアクセス回数をカウントする命令キ
ャッシュアクセスカウンタ手段およびソフトウェアから
アクセス可能であり命令キャッシュヒット回数をカウン
トする命令キャッシュヒットカウンタ手段を持つように
構成され、また、ソフトウェアからアクセス可能な命令
キャッシュカウント上限アドレスレジスタ手段とソフト
ウェアからアクセス可能な命令キャッシュカウント下限
アドレスレジスタ手段を持ち、命令キャッシュに対する
アクセスアドレスが命令キャッシュカウント下限アドレ
スレジスタの値以上でありかつ命令キャッシュカウント
上限アドレスレジスタの値以下の場合に限り命令キャッ
シュアクセス回数をカウントする命令キャッシュアクセ
スカウンタ手段および命令キャッシュヒット回数をカウ
ントする命令キャッシュヒットカウンタ手段を持つよう
に構成されている。
Further, it is configured to have an instruction cache access counter means that is accessible from software and counts the number of instruction cache accesses, and an instruction cache hit counter means that is accessible from software and counts the number of instruction cache hits. , Instruction cache count upper limit address register means accessible from software and instruction cache count lower limit address register means accessible from software, the access address to the instruction cache is greater than or equal to the value of the instruction cache count lower limit address register and the instruction cache count Instruction cache access counter means for counting the number of instruction cache accesses only when the value is less than or equal to the upper limit address register value. It is configured to have an instruction cache hit counter means for counting the micro instruction cache hit count.

【0009】つぎにこの図1に示す実施例の動作を説明
する。まず、論理アドレス生成手段101により論理ア
ドレス113が生成され、この論理アドレス113の上
位論理アドレスVA31−12が高速アドレス変換手段
102で物理アドレスに変換されると同時に論理アドレ
ス113の下位論理アドレスVA12−2がキャッシュ
メモリ手段105をアクセスする。そして、物理アドレ
ス上位ビット114とキャッシュタグ115をタグ比較
手段103で比較し一致した場合キャッシュヒットと判
定されキャッシュヒット信号116が論理「1」とな
る。一方、命令信号124は命令デコード手段106に
よってデコードされ、キャッシュアクセスを伴う命令の
場合、キャッシュアクセス信号117が論理「1」とな
る。そして、キャッシュカウント上限アドレスレジスタ
手段108,キャッシュカウント下限アドレスレジスタ
手段109はソフトウェアから値を読み書きできる32
ビットレジスタ手段である。
Next, the operation of the embodiment shown in FIG. 1 will be described. First, the logical address generating means 101 generates a logical address 113, and the high-speed logical address VA31-12 of this logical address 113 is converted into a physical address by the high-speed address converting means 102, and at the same time, the lower logical address VA12- of the logical address 113. 2 accesses the cache memory means 105. Then, the physical address upper bit 114 and the cache tag 115 are compared by the tag comparison means 103, and if they match, it is determined to be a cache hit and the cache hit signal 116 becomes a logic "1". On the other hand, the instruction signal 124 is decoded by the instruction decoding means 106, and in the case of an instruction involving cache access, the cache access signal 117 becomes logic "1". Then, the cache count upper limit address register means 108 and the cache count lower limit address register means 109 can read / write a value from software 32.
It is a bit register means.

【0010】つぎに、ソフトウェアによりキャッシュカ
ウント上限アドレスレジスタ108,キャッシュカウン
ト下限アドレスレジスタ109に設定された値はキャッ
シュカウント上限アドレス120,キャッシュカウント
下限アドレス121に出力される。アドレス比較手段1
10はこのキャッシュカウント上限アドレス120とキ
ャッシュカウント下限アドレス121および論理アドレ
ス113を比較し、この論理アドレス113がキャッシ
ュカウント下限アドレス121以上であり、キャッシュ
カウント上限アドレス120以下である場合にカウント
イネーブル信号122を論理「1」にする。このカウン
トイネーブル信号122が論理「1」のときキャッシュ
アクセス信号117はキャッシュアクセスカウンタ手段
112でカウントされる。このキャッシュアクセスカウ
ンタ手段112の値はキャッシュカウント下限アドレス
121以上キャッシュカウント上限アドレス120以下
のアドレス空間に対するキャッシュアクセスの回数を表
わす。そして、キャッシュヒット信号116とキャッシ
ュアクセス信号117はゲート手段107で論理積をと
られキャッシュヒットカウント信号123となる。そし
て、カウントイネーブル信号122が論理「1」のとき
キャッシュヒットカウント信号123はキャッシュヒッ
ト上位カウンタ手段111でカウントされる。ここで、
このキャッシュヒットカウンタ手段111の値はキャッ
シュカウント下限アドレス121以上キャッシュカウン
ト上限アドレス120以下のアドレス空間に対するキャ
ッシュヒットの回数を表わす。キャッシュヒットカウン
タ手段111,キャッシュアクセスカウンタ手段112
は任意のアドレスに割り付けられており、ソフトウェア
から値を読み込むことができる。このキャッシュヒット
カウンタ手段111から読み込んだ値をNHIT,キャッ
シュアクセスカウンタ手段112から読み込んだ値をN
RWとするとキャッシュのヒット率はNHIT/NRW とな
り、ソフトウェアはキャッシュヒットカウンタ手段11
1,キャッシュアクセスカウンタ手段112を読み込む
ことでキャッシュのヒット率を知ることができる。キャ
ッシュパラメータレジスタ手段104はソフトウェアか
ら値を読み書きすることができる32ビットレジスタ手
段である。
Next, the values set in the cache count upper limit address register 108 and the cache count lower limit address register 109 by software are output to the cache count upper limit address 120 and the cache count lower limit address 121. Address comparison means 1
Reference numeral 10 compares the cache count upper limit address 120 with the cache count lower limit address 121 and the logical address 113, and when the logical address 113 is greater than or equal to the cache count lower limit address 121 and less than or equal to the cache count upper limit address 120, the count enable signal 122. Is set to logic "1". When the count enable signal 122 is logic "1", the cache access signal 117 is counted by the cache access counter means 112. The value of the cache access counter means 112 represents the number of times of cache access to the address space between the cache count lower limit address 121 and the cache count upper limit address 120. Then, the cache hit signal 116 and the cache access signal 117 are logically ANDed by the gate means 107 and become the cache hit count signal 123. Then, when the count enable signal 122 is logic "1", the cache hit count signal 123 is counted by the cache hit upper counter means 111. here,
The value of the cache hit counter means 111 represents the number of cache hits for the address space from the cache count lower limit address 121 to the cache count upper limit address 120. Cache hit counter means 111, cache access counter means 112
Is assigned to an arbitrary address, and the value can be read from software. The value read from the cache hit counter means 111 is N HIT , and the value read from the cache access counter means 112 is N HIT .
If it is RW , the cache hit rate is N HIT / N RW , and the software is cache hit counter means 11
1, the cache hit rate can be known by reading the cache access counter means 112. The cache parameter register means 104 is a 32-bit register means that can read and write a value from software.

【0011】このキャッシュパラメータレジスタ手段1
04(32ビットレジスタ手段)の構成例を図2に示
す。この図2において、D/Sはダイレクトマップ方
式、セットアソシアティブ方式選択ビットであり、LS
Z1,LSZ0はキャッシュのラインサイズ指定ビット
である。
This cache parameter register means 1
An example of the configuration of 04 (32-bit register means) is shown in FIG. In FIG. 2, D / S is a direct map system and set associative system selection bit, and LS
Z1 and LSZ0 are cache line size designation bits.

【0012】このLSZ1,LSZ0とラインサイズの
関係を図3に示す。そして、キャッシュメモリ手段10
5を詳細に示したのが図4である。キャッシュバンク
「0」,「1」の容量がそれぞれ4KBづつあり、最小
ラインサイズが1ワード(4バイト)の場合について説
明する。この図4において図1と同一符号のものは相当
部分を示し、401はキャッシュバンク0、402はキ
ャッシュバンク1、403は論理和をとるゲート手段、
405,405はそれぞれキャッシュバンク0,キャッ
シュバンク1のデータバッファ手段、406,408は
ナンド(NAND)ゲート手段、407は論理否定ゲー
ト手段、409〜412は論理積をとるゲート手段、4
13は論理アドレスVAのうちの11ビットVA12−
2、414はダイレクトマップ,セットアソシアティブ
選択信号、415,416はラインサイズ選択信号(L
SZ1,LSZ0)、417,418はキャッシュバン
ク選択信号、115−0,115−1はそれぞれキャッ
シュバンク0,キャッシュバンク1のタグ信号、103
−0,103−1はそれぞれキャッシュバンク0,キャ
ッシュバンク1のタグ比較手段である。
FIG. 3 shows the relationship between LSZ1 and LSZ0 and the line size. And the cache memory means 10
5 shows details of FIG. A case will be described in which the cache banks “0” and “1” each have a capacity of 4 KB and the minimum line size is 1 word (4 bytes). In FIG. 4, the same reference numerals as those in FIG. 1 indicate corresponding parts, 401 is a cache bank 0, 402 is a cache bank 1 and 403 is a gate means for taking a logical sum,
Reference numerals 405 and 405 denote data buffer means for cache bank 0 and cache bank 1, respectively, 406 and 408 are NAND gate means, 407 is a logical negation gate means, and 409 to 412 are gate means for taking a logical product, 4
13 is 11 bits VA12- of the logical address VA
2, 414 are direct maps, set associative selection signals, 415, 416 are line size selection signals (L
SZ1, LSZ0), 417 and 418 are cache bank selection signals, 115-0 and 115-1 are tag signals of cache bank 0 and cache bank 1, respectively, 103
-0 and 103-1 are tag comparison means for cache bank 0 and cache bank 1, respectively.

【0013】この図4におけるキャッシュバンク0 4
01,キャッシュバンク1 402の構成例を図5に示
す。この図5において、タグ(TAGn)とデータ(D
ATAn)の組み合わせで1エントリを構成しており全
部で1024エントリある。そして、CA11−0の値
により1024エントリのうちの1つのエントリが指定
される。キャッシュアクセスが行われるときは図4の論
理アドレスVAのうちの11ビットVA12−2 41
3によってキャッシュバンク0 401とキャッシュバ
ンク1 402がアクセスされ、キャッシュバンク0の
タグ信号115−0と物理アドレス上位ビット114が
キャッシュバンク0のタグ比較手段103−1によって
比較される。この比較の結果キャッシュバンク0のタグ
信号115−0またはキャッシュバンク1のタグ信号1
15−1が物理アドレス上位ビット114と等しい場合
にキャッシュヒットと判定され、どちらのバンクがヒッ
トしたかによってキャッシュバンク0のデータバッファ
手段404またはキャッシュバンク1のデータバッファ
手段405のどちらかを通してデータがキャッシュに読
み書きされる。
Cash bank 0 4 in FIG.
FIG. 5 shows a configuration example of 01 and cash bank 1402. In FIG. 5, the tag (TAGn) and the data (D
The combination of ATAn) constitutes one entry, and there are 1024 entries in total. Then, one of the 1024 entries is designated by the value of CA11-0. When a cache access is performed, 11 bits VA12-2 41 of the logical address VA of FIG. 4 are used.
3, the cache bank 0 401 and the cache bank 1 402 are accessed, and the tag signal 115-0 of the cache bank 0 and the physical address upper bit 114 are compared by the tag comparison means 103-1 of the cache bank 0. As a result of this comparison, tag signal 115-0 of cache bank 0 or tag signal 1 of cache bank 1
If 15-1 is equal to the physical address upper bit 114, it is determined to be a cache hit, and data is passed through either the data buffer means 404 of the cache bank 0 or the data buffer means 405 of the cache bank 1 depending on which bank has hit. Read and write to cache.

【0014】そして、ダイレクトマップ,セットアソシ
アティブ選択信号414が論理「1」のとき論理アドレ
スVA12がキャッシュバンク0,キャッシュバンク1
のキャッシュバンク選択信号417,418として入力
されキャッシュバンク0とキャッシュバンク1は連続す
る8KBのキャッシュとなり、ダイレクトマップ方式と
なる。ここで、このダイレクトマップ,セットアソシア
ティブ選択信号414が論理「0」のときはキャッシュ
選択信号417,418は両方とも論理「1」となりキ
ャッシュバンク0 401,キャッシュバンク1 40
2は4KB×2ウェイのセットアソシアティブ方式キャ
ッシュとして動作する。そして、ラインサイズ選択信号
(LSZ1,LSZ0)415,416によってキャッ
シュバンク0,1のタグのアクセスアドレスの下位2ビ
ット(VA3,2)がマスクされる。このラインサイズ
選択信号415,416が11[2] のときはモジュロ1
6が0,4,8,12となるアドレスに対して別々のタ
グが参照されるのでキャッシュの管理単位すなわち、ラ
インサイズは1Wとなる。また、このラインサイズ選択
信号415,416が10[2] のときはナンドゲート手
段408によってタグのアクセスアドレスの最下位がマ
スクされることによりアドレス空間の縮退が生じてモジ
ュロ8が0,4となるアドレスに対して参照されるタグ
は同一のものとなりラインサイズは2Wとなる。同様に
ラインサイズ選択信号415,416が00[2] のとき
は論理積をとるゲート手段409〜412によってタグ
のアクセスアドレスの下位2ビットがマスクされ、ライ
ンサイズは4Wとなる。
When the direct map, set associative selection signal 414 is logic "1", the logical address VA12 is cache bank 0, cache bank 1
Are input as the cache bank selection signals 417 and 418, and the cache bank 0 and the cache bank 1 are continuous 8 KB caches, which is a direct map system. Here, when the direct map / set associative selection signal 414 is logic "0", both the cache selection signals 417 and 418 are logic "1" and the cache bank 0 401 and the cache bank 1 40
2 operates as a 4 KB × 2 way set associative cache. Then, the line size selection signals (LSZ1, LSZ0) 415, 416 mask the lower 2 bits (VA3, 2) of the access address of the tags of the cache banks 0, 1. When the line size selection signals 415 and 416 are 11 [2] , modulo 1
Since different tags are referred to for the addresses where 6 is 0, 4, 8, and 12, the cache management unit, that is, the line size is 1W. When the line size selection signals 415, 416 are 10 [2] , the NAND gate means 408 masks the lowest access address of the tag, thereby degenerating the address space, and modulo 8 becomes 0,4. The tags referenced to the address are the same and the line size is 2W. Similarly, when the line size selection signals 415 and 416 are 00 [2] , the lower 2 bits of the tag access address are masked by the gate means 409 to 412 which take the logical product, and the line size becomes 4W.

【0015】このラインサイズ選択信号415,416
(LSZ1,0)の値と論理アドレスVA12−2がア
クセスするタグエントリの関係を図6に示す。この図6
において、(a)はLSZ1,0=11の場合を示し、
(b)はLSZ1,0=10、(c)はLSZ1,0=
00の場合を示す。なお、以上説明したことはデータキ
ャッシュ,命令キャッシュのどちらに対しても適用でき
る。また、以上説明したように、ソフトウェアはキャッ
シュカウント上限アドレスレジスタ手段108とキャッ
シュカウント下限アドレスレジスタ手段109およびキ
ャッシュヒットカウンタ手段111ならびにキャッシュ
アクセスカウンタ手段113をアクセスすることにより
特定のアドレス範囲についてのキャッシュヒット率を知
ることができ、最高のキャッシュヒット率を得られるよ
うにキャッシュパラメータレジスタ手段104を設定す
ることができる。
The line size selection signals 415, 416
FIG. 6 shows the relationship between the value of (LSZ1,0) and the tag entry accessed by the logical address VA12-2. This Figure 6
, (A) shows the case of LSZ1, 0 = 11,
(B) is LSZ1,0 = 10, (c) is LSZ1,0 =
The case of 00 is shown. The above description can be applied to both the data cache and the instruction cache. Further, as described above, the software accesses the cache count upper limit address register means 108, the cache count lower limit address register means 109, the cache hit counter means 111, and the cache access counter means 113 to cause a cache hit for a specific address range. The rate can be known and the cache parameter register means 104 can be set to obtain the highest cache hit rate.

【0016】[0016]

【発明の効果】以上説明したように本発明は、ジョブ実
行時にソフトウェアが特定のアドレス範囲についてのキ
ャッシュヒット率を知ることができ、最高のキャッシュ
ヒット率を得られるようにキャッシュパラメータを変更
することができるようにしたので、ハードウェアの処理
性能を最高に引き出すことができる効果がある。
As described above, according to the present invention, software can know the cache hit rate for a specific address range at the time of executing a job, and the cache parameter is changed so that the highest cache hit rate can be obtained. Since it has been made possible, it has the effect of maximizing the processing performance of the hardware.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】図1の動作説明に供するキャッシュパラメータ
設定レジスタを示す説明図である。
FIG. 2 is an explanatory diagram showing a cache parameter setting register used for explaining the operation of FIG.

【図3】図1の動作説明に供するLSZとラインサイズ
の関係を示す説明図である。
FIG. 3 is an explanatory diagram showing the relationship between LSZ and line size used in the description of the operation in FIG.

【図4】図1の動作説明に供するキャッシュの詳細を示
すブロック図である。
FIG. 4 is a block diagram showing details of a cache for explaining the operation of FIG.

【図5】図1の動作説明に供するキャッシュの詳細を示
す説明図である。
5 is an explanatory diagram showing details of a cache for explaining the operation of FIG. 1. FIG.

【図6】図1の動作説明に供するLSZとVAがアクセ
スするタグエントリの関係を示す説明図である。
FIG. 6 is an explanatory diagram showing the relationship between tag entries accessed by LSZ and VA for explaining the operation of FIG. 1;

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

104 キャッシュパラメータ設定レジスタ手段 105 キャッシュメモリ手段(キャッシュ) 108 キャッシュカウント上限アドレスレジスタ手段 109 キャッシュカウント下限アドレスレジスタ手段 111 キャッシュヒットカウンタ手段 112 キャッシュアクセスカウンタ手段 104 cache parameter setting register means 105 cache memory means (cache) 108 cache count upper limit address register means 109 cache count lower limit address register means 111 cache hit counter means 112 cache access counter means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュを持つ情報処理装置におい
て、ソフトウェアからアクセス可能でありキャッシュア
クセス回数をカウントするキャッシュアクセスカウンタ
手段と、前記ソフトウェアからアクセス可能でありキャ
ッシュヒット回数をカウントするキャッシュヒットカウ
ンタ手段を備えることを特徴とする情報処理装置。
1. An information processing apparatus having a cache, comprising cache access counter means accessible by software and counting the number of cache accesses, and cache hit counter means accessible by software and counting the number of cache hits. An information processing device characterized by the above.
【請求項2】 請求項1記載の情報処理装置において、
ソフトウェアからアクセス可能なキャッシュカウント上
限アドレスレジスタ手段と、前記ソフトウェアからアク
セス可能なキャッシュカウント下限アドレスレジスタ手
段を備え、かつキャッシュに対するアクセスアドレスが
キャッシュカウント下限アドレスレジスタの値以上であ
りかつキャッシュカウント上限アドレスレジスタの値以
下の場合に限りキャッシュアクセス回数をカウントする
キャッシュアクセスカウンタ手段およびキャッシュヒッ
ト回数をカウントするキャッシュヒットカウンタ手段を
備えることを特徴とする情報処理装置。
2. The information processing apparatus according to claim 1,
A cache count upper limit address register means accessible from software and a cache count lower limit address register means accessible from the software, and an access address to the cache is equal to or more than a value of the cache count lower limit address register and the cache count upper limit address register An information processing apparatus comprising a cache access counter means for counting the number of cache accesses and a cache hit counter means for counting the number of cache hits only when the value is less than or equal to
【請求項3】 請求項1記載の情報処理装置において、
ソフトウェアからアクセス可能なキャッシュパラメータ
設定レジスタ手段と、ダイレクトマップ方式とセットア
ソシアティブ方式を排他的に実現できるキャッシュを備
え、前記キャッシュパラメータ設定レジスタ手段の値に
より前記キャッシュの制御方式をダイレクトマップ方式
にするかセットアソシアティブ方式にするか選択するよ
うにしたことを特徴とする情報処理装置。
3. The information processing apparatus according to claim 1,
A cache parameter setting register means accessible from software and a cache capable of exclusively realizing the direct map method and the set associative method are provided, and the cache control method is set to the direct map method according to the value of the cache parameter setting register means. An information processing apparatus characterized in that a set associative method is selected.
JP4059243A 1992-02-14 1992-02-14 Information processor Pending JPH05225060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4059243A JPH05225060A (en) 1992-02-14 1992-02-14 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4059243A JPH05225060A (en) 1992-02-14 1992-02-14 Information processor

Publications (1)

Publication Number Publication Date
JPH05225060A true JPH05225060A (en) 1993-09-03

Family

ID=13107758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4059243A Pending JPH05225060A (en) 1992-02-14 1992-02-14 Information processor

Country Status (1)

Country Link
JP (1) JPH05225060A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007206806A (en) * 2006-01-31 2007-08-16 Matsushita Electric Ind Co Ltd Cache observation system, analysis method of processor, and cache memory
US7287144B2 (en) 2003-11-17 2007-10-23 International Business Machines Corporation Hit ratio estimation device, hit ratio estimation method, hit ratio estimation program and recording medium
JP2010238112A (en) * 2009-03-31 2010-10-21 Ntt Docomo Inc Communication terminal and communication control method
JP2010244205A (en) * 2009-04-02 2010-10-28 Fujitsu Ltd Compiler program and compiler device
JP2011048413A (en) * 2009-08-25 2011-03-10 Fujitsu Ltd Recording device, recording method, and recording program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5132241A (en) * 1974-09-13 1976-03-18 Fujitsu Ltd
JPS55157182A (en) * 1979-05-25 1980-12-06 Nec Corp Buffer memory
JPS62191948A (en) * 1986-02-19 1987-08-22 Nec Corp Disk cache control device
JPH0228851A (en) * 1988-07-19 1990-01-30 Fujitsu Ltd Disk cache control system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5132241A (en) * 1974-09-13 1976-03-18 Fujitsu Ltd
JPS55157182A (en) * 1979-05-25 1980-12-06 Nec Corp Buffer memory
JPS62191948A (en) * 1986-02-19 1987-08-22 Nec Corp Disk cache control device
JPH0228851A (en) * 1988-07-19 1990-01-30 Fujitsu Ltd Disk cache control system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7287144B2 (en) 2003-11-17 2007-10-23 International Business Machines Corporation Hit ratio estimation device, hit ratio estimation method, hit ratio estimation program and recording medium
JP2007206806A (en) * 2006-01-31 2007-08-16 Matsushita Electric Ind Co Ltd Cache observation system, analysis method of processor, and cache memory
JP2010238112A (en) * 2009-03-31 2010-10-21 Ntt Docomo Inc Communication terminal and communication control method
JP2010244205A (en) * 2009-04-02 2010-10-28 Fujitsu Ltd Compiler program and compiler device
JP2011048413A (en) * 2009-08-25 2011-03-10 Fujitsu Ltd Recording device, recording method, and recording program

Similar Documents

Publication Publication Date Title
US6349394B1 (en) Performance monitoring in a NUMA computer
US6499028B1 (en) Efficient identification of candidate pages and dynamic response in a NUMA computer
US6327643B1 (en) System and method for cache line replacement
US7577791B2 (en) Virtualized load buffers
JPH05225060A (en) Information processor
JPH0845275A (en) Control method for memory reading and writing, and memory device using the method
US6378044B1 (en) Method and system for cache replacement among configurable cache sets
US5581730A (en) Condition detector and prioritizer with associativity determination logic
US5590302A (en) Device for generating structured addresses
JPS619766A (en) Data transfer device
JP2790119B2 (en) Cache miss address distribution trace circuit
JP3511529B2 (en) Complex arithmetic processing unit
JPS6331809B2 (en)
US6721861B2 (en) Indicator of validity status information for data storage within a data processing system
JP3260466B2 (en) Memory update method
JP2963257B2 (en) Processing equipment
KR100236530B1 (en) Address generating circuit of a digital signal processor
JP2536651B2 (en) Exception address buffer management method
JP2908117B2 (en) Vector arithmetic processing unit
JPH09146837A (en) Cache bypass circuit
JPH05250264A (en) Cache memory
JPH0415844A (en) Cache memory control circuit
JPH0883213A (en) Storage device including cache memory
JPH05225063A (en) Buffer memory clear system
JPH0535467A (en) Microprocessor