JPH05158794A - Cache compartment selection controller - Google Patents

Cache compartment selection controller

Info

Publication number
JPH05158794A
JPH05158794A JP3349089A JP34908991A JPH05158794A JP H05158794 A JPH05158794 A JP H05158794A JP 3349089 A JP3349089 A JP 3349089A JP 34908991 A JP34908991 A JP 34908991A JP H05158794 A JPH05158794 A JP H05158794A
Authority
JP
Japan
Prior art keywords
compartment
cache
data
routine
address
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
JP3349089A
Other languages
Japanese (ja)
Inventor
Koichi Matsumoto
浩一 松本
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 JP3349089A priority Critical patent/JPH05158794A/en
Publication of JPH05158794A publication Critical patent/JPH05158794A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To execute a routine whose utilizing frequency is low, and whose processing speed is requested, without generating the deterioration of a performance due to a cache miss hit. CONSTITUTION:An address array 2 and a data array 3 have plural compartment 2-1-2-4, and 3-1-3-4. A block load (writing) mode for the specific compartment(for example, 2-1 and 3-1) can be necessarily obtained by controlling a selector 5 by an outside command, for example, inputting '1' to a compartment selecting means 7. Thus, the routine whose high speed processing is requested can be loaded from a main storage to the specific compartment. Then, when '0' is inputted through the selector 5 to the means 7 by the outside command, the specific compartment is turned to a block load inhibition mode, so that the written routine can be necessarily turned to the cache hit without being replaced.

Description

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

【0001】[0001]

【技術分野】本発明はキャッシュコンパートメント選択
制御装置に関し、特に主記憶の記憶データのブロック写
しを格納し前記主記憶アドレスの一部により索引される
複数のコンパートメント構成のキャッシのキャッシュコ
ンパートメント選択制御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache compartment selection control device, and more particularly to a cache compartment selection control device for a cache having a plurality of compartments which stores a block copy of storage data in main storage and is indexed by a part of the main storage address. It is a thing.

【0002】[0002]

【従来技術】従来、キャッシュは、主記憶のデータのう
ち読出しが行われたものの写しをブロック単位で高速ア
クセス可能なメモリに置くことによって、主記憶上のデ
ータ読出し時間を短縮化することを目的としたものであ
る。
2. Description of the Related Art Conventionally, a cache aims at shortening the data read time in the main memory by placing a copy of the data in the main memory that has been read in a memory that can be accessed at high speed in block units. It is what

【0003】通常は、主記憶アドレスの一部(セットア
ドレスと呼ぶ)からキャッシュメモリのどこに主記憶デ
ータの写しを格納するかを決めており、セットアドレス
が同じデータについて複数の格納場所を設けており、各
々をコンパートメントと呼んでいる。
Normally, a part of the main memory address (called a set address) is used to determine where in the cache memory a copy of the main memory data is stored, and a plurality of storage locations are provided for data having the same set address. And each is called a compartment.

【0004】セットアドレスが同じでセットアドレス以
外のアドレスが異なるデータが読出された場合、使用し
ていないコンパートメントにデータが格納されていく。
同じセットアドレスに対するコンパートメントが全て使
用されている時にさらに同じセットアドレスでセットア
ドレス以外のアドレスが異なる主記憶データの読出しが
行われた場合、所定の置換アルゴリズムによってあるコ
ンパートメントのデータと置換えて新しいデータを格納
している。
When data having the same set address but different addresses other than the set address is read, the data is stored in an unused compartment.
When all the compartments for the same set address are used and the main memory data with the same set address but different addresses other than the set address is read, new data is replaced with the data in a certain compartment by a predetermined replacement algorithm. Is stored.

【0005】上述した従来の方式では、同じセットアド
レスのデータで全てのコンパートメントを使用している
時にさらに同じセットアドレスを持つデータが読出され
た場合、置換アルゴリズムによってあるコンパートメン
トのデータと置換えて新しいデータを格納するが、追出
されるデータは通常使用頻度の最も低いデータ、最後に
使用された時期が最も過去のデータであることが多い。
In the above-mentioned conventional method, when data having the same set address is used and all the compartments are read, when the data having the same set address is read, the replacement algorithm replaces the data of a certain compartment with new data. However, the data to be ejected is usually the least frequently used data, and the most recently used data is often the oldest data.

【0006】しかし、ソフトウェアプログラム又はファ
ームウェアプログラムの中で、使用頻度は高くないが処
理速度の速さが要求されるルーチン(使用されることは
少ないが動作が非常に高速な周辺装置を制御するルーチ
ン等)が存在する場合、そのルーチンプログラムがキャ
ッシュにヒットせず、その都度主記憶まで読出しにいく
のでは処理性能が非常に低下するといった問題がある。
However, in a software program or a firmware program, a routine which is not frequently used but is required to have a high processing speed (a routine for controlling a peripheral device which is rarely used but operates at a very high speed) Etc.), the routine program does not hit the cache, and if it goes to the main memory for reading each time, there is a problem that the processing performance deteriorates significantly.

【0007】[0007]

【発明の目的】本発明の目的は、使用頻度は少ないが処
理速度の速さが要求されるルーチンをキャッシュミスヒ
ットによる性能低下を起さずに実行可能なキャッシュコ
ンパートメント選択制御装置を提供することである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a cache compartment selection control device capable of executing a routine which is rarely used but requires a high processing speed, without causing performance degradation due to a cache miss. Is.

【0008】[0008]

【発明の構成】本発明によれば、主記憶の記憶データの
ブロック写しを格納し前記主記憶アドレスの一部により
索引される複数のコンパートメント構成のキャッシのキ
ャッシュコンパートメント選択制御装置であって、外部
指令により特定のコンパートメントに対して強制的にブ
ロックデータのロード制御をなす手段を有することを特
徴とするキャッシュコンパートメント選択制御装置が得
られる。
According to the present invention, there is provided a cache compartment selection control device for a cache having a plurality of compartments which stores a block copy of stored data in a main memory and is indexed by a part of the main memory address. A cache compartment selection control device having a means for forcibly performing block data load control for a specific compartment according to a command is obtained.

【0009】[0009]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0010】図1は本発明の実施例のブロック図であ
る。ここでは、キャッシュが4コンパートメントのセッ
トアソシアティブストアスルー方式で、キャッシュデー
タ置換アルゴリズムとしてブロックロード時に最後に使
用された時期が最も過去のデータを追出す方式(LRU
方式)を採用したものについて説明する。
FIG. 1 is a block diagram of an embodiment of the present invention. In this example, the cache is a 4-compartment set associative store-through method, and the cache data replacement algorithm is a method of expelling the oldest data last used at the time of block loading (LRU).
System) will be described.

【0011】本実施例の装置は、主記憶アドレスレジス
タ1と、アドレスアレイ2のコンパートメント2-1 ,2-
2 ,2-3 ,2-4 と、データアレイ3のコンパートメント
3-1,3-2 ,3-3 ,3-4 と、あるコンパートメントに格
納されているデータの使用時期が他のコンパートメント
に格納されているデータの使用時期とどちらが後かを各
セットアドレスごとに示すLRUビット4と、選択器
5,6-1 〜6-4 ,9と、ブロックロード時にどのコンパ
ートメントにデータを格納するかをLRUビットから選
択するコンパートメント選択手段7と、各コンパートメ
ントのヒット,ミスヒットを検出する比較器8-1 ,8-2
,8-3 ,8-4 と、LRUビット変更手段10とから構
成されている。
The apparatus of this embodiment comprises the main memory address register 1 and the compartments 2-1 and 2-of the address array 2.
2, 2-3, 2-4 and the compartment of the data array 3
For each set address, 3-1, 3-2, 3-3, 3-4 and when the data stored in one compartment is used, and when the data stored in another compartment is used LRU bit 4, selectors 5, 6-1 to 6-4, 9 and compartment selecting means 7 for selecting from which LRU bit the data is to be stored at the time of block loading, hits of each compartment, Comparators 8-1 and 8-2 for detecting mishits
, 8-3, 8-4 and the LRU bit changing means 10.

【0012】次に、本発明の実施例の動作について説明
する。通常時は、このキャッシュは以下の様に普通のキ
ャッシュと同じ動作をする。キャッシュの通常動作は公
知であるが、その概略を説明すると、中央処理装置が主
記憶読出しを行うと、主記憶アドレスレジスタ1に格納
された読出しアドレスの一部をセットアドレス101 とし
てアドレスアレイ2-1 〜2-4 とデータアレイ3-1 〜3-4
の該当するセットを夫々読出し、読出しアドレスのセッ
トアドレス101 以外のアドレス部分102 と読出されたア
ドレスアレイ2のセットの内容とを比較器8-1 〜8-4 で
比較する。
Next, the operation of the embodiment of the present invention will be described. Normally, this cache behaves like a normal cache as follows. Although the normal operation of the cache is well known, the outline thereof will be described. When the central processing unit performs the main memory read, a part of the read address stored in the main memory address register 1 is set as the set address 101 to the address array 2-. 1 to 2-4 and data array 3-1 to 3-4
The corresponding sets are read out, and the address portions 102 other than the set address 101 of the read address and the read contents of the set of the address array 2 are compared by the comparators 8-1 to 8-4.

【0013】一致するコンパートメントが存在すれば、
対応するデータアレイ3のコンパートメントの内容が選
択器9を通して中央処理装置(図示せず)に読出され
る。一致するコンパートメントが存在しなければ、キャ
ッシュミスヒットとなりキャッシュ内に目的の主記憶デ
ータがないため、主記憶から目的のデータをブロックロ
ードでキャッシュ内に取込む。
If there is a matching compartment,
The contents of the corresponding compartment of the data array 3 are read out to the central processing unit (not shown) through the selector 9. If there is no matching compartment, a cache miss occurs and the target main memory data does not exist in the cache. Therefore, the target data is fetched from the main memory into the cache by block load.

【0014】この時、どのコンパートメントにデータを
取込むかは、LRUビット4によって決められる。LR
Uビット4はセット毎に存在するが、そのうちのひとつ
をとって説明する。本例のキャッシュの様に4コンパー
トメントの場合はLRUビット4は6ビットで構成され
る。各々のビットをa,b,c,d,e,fとすると、
各ビットに次の様な意味を持たせてこれらから最も過去
に参照されたコンパートメントを選択できる様になって
いる。
At this time, which compartment is to receive the data is determined by the LRU bit 4. LR
The U bit 4 exists for each set, but one of them will be described. In the case of four compartments like the cache of this example, the LRU bit 4 is composed of 6 bits. If each bit is a, b, c, d, e, f,
Each bit has the following meaning so that the most referenced compartment from these can be selected.

【0015】a……コンパートメント2-1 ,3-1 が2-2
,3-2 より新しい時0 b……コンパートメント2-1 ,3-1 が2-3 ,3-3より新
しい時0 c……コンパートメント2-1 ,3-1 が2-4 ,3-4より新
しい時0 d……コンパートメント2-2 ,3-2 が2-3 ,3-3より新
しい時0 e……コンパートメント2-2 ,3-2 が2-4 ,3-4より新
しい時0 f……コンパートメント2-3 ,3-3 が2-4 ,3-4より新
しい時0 これらのビットは、キャッシュが参照される度にLRU
変更手段10によって更新される。
A: Compartments 2-1 and 3-1 are 2-2
, 3-2 newer than 0b …… Compartments 2-1 and 3-1 are 2-3, newer than 3-3 0c …… Compartments 2-1 and 3-1 are 2-4, 3-4 Newer time 0 d …… Compartments 2-2 and 3-2 are newer than 2-3 and 3-3 0 e …… Compartments 2-2 and 3-2 are newer than 2-4 and 3-4 0 f ... Compartments 2-3, 3-3 are newer than 2-4, 3-4 0 These bits are LRU each time the cache is referenced.
It is updated by the changing unit 10.

【0016】通常は、選択器6-1 〜6-4 がLRUビット
4を選択してコンパートメント選択手段7に出力してい
るので、コンパートメント選択手段7はLRUビット4
から最も過去のコンパートメントを選択し、そのコンパ
ートメントにブロックロードが行われる。
Since the selectors 6-1 to 6-4 normally select the LRU bit 4 and output it to the compartment selecting means 7, the compartment selecting means 7 outputs the LRU bit 4 to the compartment selecting means 7.
The oldest compartment is selected from and the block is loaded into that compartment.

【0017】中央処理装置が主記憶書込みする場合は、
該当するデータがキャッシュ内にある時はキャッシュ内
のデータを書換えてから主記憶も書換える方法やキャッ
シュ内の該当するセットを無効化してから主記憶を書換
える方法等があるが、公知の技術であり本発明の主題で
はないため、詳細な説明は省略する。
When the central processing unit writes in the main memory,
When the corresponding data is in the cache, there is a method of rewriting the data in the cache and then the main memory, a method of invalidating the corresponding set in the cache and then rewriting the main memory, etc. Since this is not the subject of the present invention, detailed description thereof will be omitted.

【0018】ソフトウェア又はファームウェアの指示に
より、必ずブロックロードデータを格納しない又は必ず
ブロックロードデータを格納するコンパートメントを指
定する時は次の様に動作する。ここでは、コンパートメ
ント2-1 ,3-1 が指定の対象となる場合について説明す
る。
The operation is as follows when the compartment in which the block load data is not always stored or the block load data is always stored is designated by the instruction of the software or the firmware. Here, the case where the compartments 2-1 and 3-1 are designated targets will be described.

【0019】(a)必ずブロックロードデータを格納し
ないモードのとき;ソフトウェア又はファームウェアの
指示により選択器5から“0”を出力させる。さらに、
ソフトウェア又はファームウェアの指示により選択器6-
1 〜6-4 に選択器5の出力を選択し、コンパートメント
選択手段7により出力する。これにより、コンパートメ
ント選択手段7には、LRUビット4のa,b,cが必
ず“0”である様に見える。すなわち、コンパートメン
ト2-1 ,3-1 は、最後に参照した時期が他のコンパート
メントよりも最近であるということになる。
(A) In a mode in which block load data is not always stored; "0" is output from the selector 5 according to an instruction from software or firmware. further,
Selector 6 according to software or firmware instructions
The output of the selector 5 is selected as 1 to 6-4 and output by the compartment selecting means 7. As a result, it appears to the compartment selecting means 7 that a, b and c of the LRU bit 4 are always "0". In other words, compartments 2-1 and 3-1 were last referenced more recently than other compartments.

【0020】従って、コンパートメント2-1 ,3-1 はブ
ロックロードデータが格納されることがない。コンパー
トメント2-1 ,3-1 に格納されているデータはこのモー
ドの間は必ずキャッシュヒットすることになる。
Therefore, no block load data is stored in the compartments 2-1 and 3-1. The data stored in compartments 2-1 and 3-1 will always have a cache hit during this mode.

【0021】(b)必ずブロックロードデータを格納す
るモードのとき;ソフトウェア又はファームウェアの指
示により選択器5から“1”を出力させる。さらに、ソ
フトウェア又はファームウェアの指示により選択器6-1
〜6-4 に選択器5の出力を選択し、コンパートメント選
択手段7に出力する。これにより、コンパートメント選
択手段7には、LRUビット4のa,b,cが必ず
“1”である様に見える。すなわち、コンパートメント
2-1 ,3-1 は、最後に参照した時期が他のコンパートメ
ントよりも過去であるということになる。
(B) In a mode in which block load data is always stored; "1" is output from the selector 5 according to an instruction from software or firmware. In addition, the selector 6-1 is activated by software or firmware instructions.
The output of the selector 5 is selected for 6-6 and output to the compartment selecting means 7. As a result, it appears to the compartment selection means 7 that a, b, and c of the LRU bit 4 are always "1". I.e. compartment
2-1 and 3-1 means that the last referenced time is earlier than other compartments.

【0022】従って、コンパートメント2-1 ,3-1 には
ブロックロードデータが必ず格納される。このモードで
は、特定のデータをコンパートメント2-1 ,3-1 を指定
して格納することができる。
Therefore, the block load data is always stored in the compartments 2-1 and 3-1. In this mode, specific data can be stored in compartments 2-1 and 3-1.

【0023】以上の構成により、ソフトウェアプログラ
ム又はファームウェアプログラムの中で、使用頻度は高
くないが処理速度の速さが要求されるルーチン(使用さ
れることは少ないが動作が非常に高速な周辺装置を制御
するルーチン等)が存在する場合、上記(b)のモード
で当該ルーチンを主記憶から読出すことにより特定のコ
ンパートメントに格納し、その後上記(a)のモードに
することで当該ルーチンが必ずキャッシュ内に存在する
ことになり、高速な処理を必要とする箇所で性能低下を
起こすことなく実行することができる。
With the above configuration, in the software program or the firmware program, a routine that is not frequently used but is required to have a high processing speed (a peripheral device that is rarely used but operates at a very high speed is used). If a routine to be controlled exists), the routine is stored in a specific compartment by reading the routine from the main memory in the mode of (b) above, and the routine is always cached by entering the mode of (a) above. Since it exists inside, it can be executed at a place requiring high-speed processing without degrading performance.

【0024】[0024]

【発明の効果】本発明によれば、主記憶上に格納されて
いるソフトウェアプログラム又はファームウェアプログ
ラムの中で、使用頻度は高くないが非常に高速な速さが
要求されるルーチン(使用されることは少ないが動作が
非常に高速な周辺装置を制御するルーチン等)が存在す
る場合、そのルーチンが必ずキャッシュに存在するよう
にすることによって、主記憶までの大きな読出し時間を
短縮化して性能低下を防ぐことが可能となるという効果
がある。
According to the present invention, in a software program or a firmware program stored in the main memory, a routine which is not frequently used but requires extremely high speed (is used). If there is a routine that controls a peripheral device that operates at a very low speed but operates very fast, make sure that the routine always exists in the cache to shorten the large read time to main memory and reduce performance. The effect is that it can be prevented.

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

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

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

1 アドレスレジスタ 2 アドレスアレイ 2-1 〜2-4 アドレスコンパートメント 3 データアレイ 3-1 〜3-4 データコンパートメント 4 LRUビット 6-1 〜6-4 選択器 7 コンパートメント選択手段 8 比較器 9 選択器 10 LRU変更手段 1 Address Register 2 Address Array 2-1 to 2-4 Address Compartment 3 Data Array 3-1 to 3-4 Data Compartment 4 LRU Bits 6-1 to 6-4 Selector 7 Compartment Selector 8 Comparator 9 Selector 10 LRU change means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 主記憶の記憶データのブロック写しを格
納し前記主記憶アドレスの一部により索引される複数の
コンパートメント構成のキャッシのキャッシュコンパー
トメント選択制御装置であって、外部指令により特定の
コンパートメントに対して強制的にブロックデータのロ
ード制御をなす手段を有することを特徴とするキャッシ
ュコンパートメント選択制御装置。
1. A cache compartment selection control device for a cache having a plurality of compartments configured to store a block copy of storage data in main storage and indexed by a part of the main storage address, wherein a specific compartment is designated by an external command. A cache compartment selection control device comprising means for forcibly performing load control of block data.
【請求項2】 外部指令により特定のコンパートメント
に対して強制的にブロックデータのロード不可制御をな
す手段を有することを特徴とする請求項1記載のキャッ
シュコンパートメント選択制御装置。
2. The cache compartment selection control device according to claim 1, further comprising means for forcibly performing a block data load prohibition control for a specific compartment by an external command.
JP3349089A 1991-12-05 1991-12-05 Cache compartment selection controller Pending JPH05158794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3349089A JPH05158794A (en) 1991-12-05 1991-12-05 Cache compartment selection controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3349089A JPH05158794A (en) 1991-12-05 1991-12-05 Cache compartment selection controller

Publications (1)

Publication Number Publication Date
JPH05158794A true JPH05158794A (en) 1993-06-25

Family

ID=18401420

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3349089A Pending JPH05158794A (en) 1991-12-05 1991-12-05 Cache compartment selection controller

Country Status (1)

Country Link
JP (1) JPH05158794A (en)

Similar Documents

Publication Publication Date Title
US5689679A (en) Memory system and method for selective multi-level caching using a cache level code
US4315312A (en) Cache memory having a variable data block size
US6912623B2 (en) Method and apparatus for multithreaded cache with simplified implementation of cache replacement policy
JP2554449B2 (en) Data processing system having cache memory
JP7049338B2 (en) Storage circuit that responds to tag matching commands
US5091851A (en) Fast multiple-word accesses from a multi-way set-associative cache memory
US5317704A (en) Storage relocating method and hierarchy storage system utilizing a cache memory
US10083126B2 (en) Apparatus and method for avoiding conflicting entries in a storage structure
US20100217937A1 (en) Data processing apparatus and method
JPH06348595A (en) Cache device
US6122708A (en) Data cache for use with streaming data
US7237067B2 (en) Managing a multi-way associative cache
US5539892A (en) Address translation lookaside buffer replacement apparatus and method with user override
EP0167089B1 (en) Memory access control system and method for an information processing apparatus
JP4297961B2 (en) Memory access control device and memory access control method
JPH0529945B2 (en)
US6745313B2 (en) Absolute address bits kept in branch history table
JPH05158794A (en) Cache compartment selection controller
US6560677B1 (en) Methods, cache memories, systems and computer program products for storing transient, normal, and locked entries in an associative cache memory
JPH0659977A (en) Cache memory capable of executing indicative line substituting operation and its control method
US20040181633A1 (en) Cache memory system, a cache memory, an updating method for the cache memory and for the cache memory system, and an updating program for the cache memory system
JPH0477344B2 (en)
JPH06161900A (en) Cache memory device
JPH0784886A (en) Method and unit for cache memory control
JP2972451B2 (en) Cache memory control method by hardware control software