JPH03156653A - Cache memory control system - Google Patents
Cache memory control systemInfo
- Publication number
- JPH03156653A JPH03156653A JP1298023A JP29802389A JPH03156653A JP H03156653 A JPH03156653 A JP H03156653A JP 1298023 A JP1298023 A JP 1298023A JP 29802389 A JP29802389 A JP 29802389A JP H03156653 A JPH03156653 A JP H03156653A
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- software
- cache memory
- controller
- cache
- 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
- 230000015654 memory Effects 0.000 title claims abstract description 52
- 238000000034 method Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はキャッシュメモリの制御方式に関し、特にキャ
ッシュメモリ容量が固定されたキャッシュメモリ・シス
テムのタグメモリのセット数選択制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory control method, and more particularly to a control method for selecting the number of sets of tag memories in a cache memory system with a fixed cache memory capacity.
従来、この種のキャッシュメモリ制御方式は、CPUシ
ステムの設計段階でのみソフトウェアの一般的な局所性
をもとに行われていた。Conventionally, this type of cache memory control method has been performed based on the general locality of software only at the design stage of the CPU system.
上述した従来のキャッシュメモリ制御方式では、タグメ
モリのセット数は、CPUシステムの設計段階でのみ、
ソフトウェアの一般的な局所性をもとに決められていた
ので、そのCPUシステムで実際に使用されるソフトウ
ェア各々の局所性に適したタグメモリのセット数をとれ
ることが少なく、キャツシュヒツト率がソフトウェア各
々の局所性に大きく影響されるという欠点がある6本発
明の目的は、このような欠点を除き、ソフトウェア各々
の局所性を判断し、そのソフトウェアに適したタグメモ
リのセット数を得られるようにしたキャッシュメモリ制
御方式を提供することにある。In the conventional cache memory control method described above, the number of tag memory sets is determined only at the design stage of the CPU system.
Since the number of tag memory sets is determined based on the general locality of software, it is rare to be able to set the number of tag memory sets appropriate for the locality of each piece of software actually used in the CPU system. The object of the present invention is to solve this problem by determining the locality of each piece of software and obtaining the number of tag memory sets suitable for that software. The object of the present invention is to provide a cache memory control method that achieves the following.
本発明の構成は、CPUと、タグメモリのセット数を任
意に設定できるキャッシュメモリ・コントローラとをア
ドレス線を介して接続したシステムのキャッシュメモリ
制御方式において、前記CPUのアクセスアドレスがキ
ャッシュメモリにヒツトし、またはミスヒツトしたこと
を示す信号を計数する計数手段を有し、この計数手段に
より得られた計数値を前記タグメモリのセット数を決定
する一つの要因として前記CPUに供給し、このCPU
により任意のソフトウェア各々に適したタグメモリのセ
ット数を設定するようにしたことを特徴とする。The configuration of the present invention is such that in a cache memory control method of a system in which a CPU and a cache memory controller that can arbitrarily set the number of tag memories set are connected via an address line, an access address of the CPU is used to hit the cache memory. It has a counting means for counting signals indicating that the tag memory has been set or mishit, and supplies the count value obtained by the counting means to the CPU as one factor for determining the number of sets of the tag memory.
Accordingly, the number of tag memory sets suitable for each arbitrary software is set.
次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例のブロック図である0本実施
例は、キャッシュメモリコントローラ1、CPU2およ
び計数手段3から構成される。FIG. 1 is a block diagram of one embodiment of the present invention. This embodiment is composed of a cache memory controller 1, a CPU 2, and a counting means 3.
キャッシュメモリコントローラ1はタグメモリを内蔵し
、そのタグメモリのセット数を任意に設定できるライト
スル一方式のものであり、CPU2によりアドレス10
のアクセスが開始されると、キャッシュメモリ・コント
ローラ1は、CPU2が所望するデータがキャッシュメ
モリに存在する場合にはヒツト信号11をCPU2に対
し出力する。計数手段3はキャッシュメモリ・コントロ
ーラ1の出力するヒツト信号11を計数するものであり
、CPU2からの読出しも可能となっている。The cache memory controller 1 has a built-in tag memory, and is a write-through type in which the number of tag memory sets can be arbitrarily set.
When access is started, the cache memory controller 1 outputs a hit signal 11 to the CPU 2 if the data desired by the CPU 2 exists in the cache memory. The counting means 3 counts the hit signal 11 output from the cache memory controller 1, and can also be read from the CPU 2.
従って任意のソフトウェアが、上述のハードウェア資源
上にはじめておかれた場合には、現CPUシステムで実
現可能なタグメモリのセット数をCPU2でキャッシュ
メモリ・コントローラ1を制御してすべて試行し、この
時のそれぞれの場合のヒツト回数を計数手段3にて計数
し、その計数値データ12をCPU2に供給し、その計
数値の大小比較をCPU2で行い、最も大きい計数値の
セット数選択データ13を保持し、キャッシュメモリ・
コントローラ1に供給する。Therefore, when arbitrary software is installed on the above-mentioned hardware resources for the first time, the CPU 2 controls the cache memory controller 1 to try all the tag memory sets that can be achieved with the current CPU system. The number of hits in each case is counted by the counting means 3, the counted value data 12 is supplied to the CPU 2, the counted values are compared in size, and the set number selection data 13 of the largest counted value is obtained. Retains and cache memory
Supplied to controller 1.
次回以降、このソフトウェアが動作するときにはCPU
2にてキャッシュメモリ・コントローラ1をそのソフト
ウェアに適したタグメモリのセット数で動作するように
制御する。From next time onwards, when this software runs, the CPU
At step 2, the cache memory controller 1 is controlled to operate with the set number of tag memories suitable for the software.
第2図は本発明の第2の実施例のブロック図である。FIG. 2 is a block diagram of a second embodiment of the invention.
本実施例のキャッシュメモリ・コントローラ1′は第1
の実施例のキャッシュメモリ・コントローラ1の機能に
加え、リプレースが発生したことを示す信号14を出力
する機能を持っている。計数手段3は、このリプレース
発生信号14を計数するようになっている。The cache memory controller 1' of this embodiment is the first cache memory controller 1'.
In addition to the functions of the cache memory controller 1 of the embodiment described above, the cache memory controller 1 has a function of outputting a signal 14 indicating that a replacement has occurred. The counting means 3 counts this replacement generation signal 14.
この実施例では、リプレースが発生したことを示す信号
14を計数手段3にて計数するため、ライトスル一方式
のキャッシュメモリ・コントローラでは計数する必要の
ないCPU2のライトアクセスを計数することがなく、
計数値がタグメモリのセット数を決定するより効果的な
要因となり、より適したタグメモリのセット数を算出で
きるという利点がある。In this embodiment, since the signal 14 indicating that a replacement has occurred is counted by the counting means 3, there is no need to count the write access of the CPU 2, which does not need to be counted in a write-through type cache memory controller.
There is an advantage that the count value becomes a more effective factor in determining the number of tag memory sets, and a more suitable number of tag memory sets can be calculated.
以上説明したように本発明は、動作させるソフトウェア
各々に適したタグメモリのセット数をキャシュメモリコ
ントローラに提供することにより、キャツシュヒツト率
の動作させるソフトウェア個別の局所性による影響をで
きるだけ少なくできるという効果がある。As explained above, the present invention provides the cache memory controller with the number of tag memory sets suitable for each piece of software to be run, thereby minimizing the effect of the locality of each piece of software to be run on the cache hit rate. be.
第1図、第2図は本発明の第1および第2の実施例のブ
ロック図である。
1.1′・・・キャッシュ・メモリ・コントローラ、2
・・・CPtJ、3・・・計数手段、10・・・アドレ
ス、11・・・ヒツト信号、12・・・データ、13・
・・セット数選択信号、14・・・リプレース発生信号
。1 and 2 are block diagrams of first and second embodiments of the present invention. 1.1'...cache memory controller, 2
... CPtJ, 3... Counting means, 10... Address, 11... Hit signal, 12... Data, 13...
...Set number selection signal, 14...Replace generation signal.
Claims (1)
ャッシュメモリ・コントローラとをアドレス線を介して
接続したシステムのキャッシュメモリ制御方式において
、前記CPUのアクセスアドレスがキャッシュメモリに
ヒットし、またはミスヒットしたことを示す信号を計数
する計数手段を有し、この計数手段により得られた計数
値を前記タグメモリのセット数を決定する一つの要因と
して前記CPUに供給し、このCPUにより任意のソフ
トウェア各々に適したタグメモリのセット数を設定する
ようにしたことを特徴とするキャッシュメモリ制御方式
。In a cache memory control method of a system in which a CPU and a cache memory controller that can arbitrarily set the number of tag memory sets are connected via an address line, an access address of the CPU hits or misses the cache memory. The count value obtained by the counting means is supplied to the CPU as one factor for determining the number of sets of the tag memory, and the CPU is used to control each arbitrary software. A cache memory control method characterized by setting an appropriate number of tag memory sets.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1298023A JPH03156653A (en) | 1989-11-15 | 1989-11-15 | Cache memory control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1298023A JPH03156653A (en) | 1989-11-15 | 1989-11-15 | Cache memory control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH03156653A true JPH03156653A (en) | 1991-07-04 |
Family
ID=17854116
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1298023A Pending JPH03156653A (en) | 1989-11-15 | 1989-11-15 | Cache memory control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH03156653A (en) |
-
1989
- 1989-11-15 JP JP1298023A patent/JPH03156653A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2215321C2 (en) | Memory access protection | |
JPS6136667B2 (en) | ||
US6327643B1 (en) | System and method for cache line replacement | |
JPH03156653A (en) | Cache memory control system | |
JP2972451B2 (en) | Cache memory control method by hardware control software | |
JPS59121545A (en) | Address trap system | |
JPH0883213A (en) | Storage device including cache memory | |
JPH05257807A (en) | Cache memory controller | |
JP3068451B2 (en) | Electronic computer | |
JPH07152649A (en) | Method and device for memory caching | |
JPH03116345A (en) | Data processor | |
JPS62145342A (en) | Cache memory system | |
JP2762797B2 (en) | Information processing apparatus of pipeline configuration having instruction cache | |
JP3082207B2 (en) | LSI with built-in cache memory | |
JPH04288647A (en) | Substitution controller for cache memory | |
JPH04336349A (en) | Cache memory device | |
JPH05298086A (en) | Information processor | |
JPH09293019A (en) | Replacement system for cache memory | |
JPH02253358A (en) | Cache memory | |
JPH04268296A (en) | Erasable type read out dedicated memory | |
JPH0784873A (en) | Storage device | |
JPS63208144A (en) | Cache memory controller | |
JPH03170872A (en) | Digital oscilloscope | |
JPH0567058A (en) | Counter | |
JPH0352044A (en) | Central processing unit |