JPS62133545A - Cache memory system - Google Patents

Cache memory system

Info

Publication number
JPS62133545A
JPS62133545A JP60274543A JP27454385A JPS62133545A JP S62133545 A JPS62133545 A JP S62133545A JP 60274543 A JP60274543 A JP 60274543A JP 27454385 A JP27454385 A JP 27454385A JP S62133545 A JPS62133545 A JP S62133545A
Authority
JP
Japan
Prior art keywords
memory
data
address
cache memory
block
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
JP60274543A
Other languages
Japanese (ja)
Inventor
Takashi Horikawa
隆 堀川
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 JP60274543A priority Critical patent/JPS62133545A/en
Publication of JPS62133545A publication Critical patent/JPS62133545A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the response speed of a cache memory by executing a control for loading only a part having a high possibility to be brought to an access, in the cache memory, at the time of a mishit. CONSTITUTION:In a memory 1, in case of a mishit, the block size dynamic variable mechanism 7 of a control part 6 executes a control so as to generate only the address of a part number (n) to 3 in an address generating part, based on a mishit address. This address is sent to an interface part 5, and a necessary part is read out of a memory device 12 and loaded to a load buffer 10. At the same time, a part requested by a processor 11 is delivered to the processor 11 through a data bus 13. In this case, a control part 6 transfers the address to an address tag. Also, the variable mechanism 7 decides a part in which an effective data in the buffer 10 is loaded, from mishit address information, stores the part in which the effective data is loaded, in a memory 8, and makes the corresponding valid flag effective.

Description

【発明の詳細な説明】 「産支」−の利用分野] 本発明はキャッシュ・メモリ・システムに関し、’II
+’に31算機の記憶階層の制御方式におけるキャッシ
ュ・メモリ・システムに関する。
DETAILED DESCRIPTION OF THE INVENTION Field of Application of "Sanshu" The present invention relates to a cache memory system;
31 relates to a cache memory system in a storage hierarchy control system for computers.

l U(l永の技術l ”V ’S−’7 :/ 、:I−・メモリ(Cach
CMemories:^CM Co m put、in
gSurveys、vol、I4.nol、191+2
.pp、473−510>に示されるように、記憶階層
を備えた情報処理装置では、主記憶装置をある大きさの
ブロックを単位として分割し5これらのプロ・ツクの一
部を高速にアクセスできるキャッシュ・メモリにコピー
しておくことで、プロセッサから要求されたデータがキ
ャッシュ・メモリ内に存在する場合にはこれをプロセ・
ソサに高速に渡すことができる。これにより、プロセッ
サからみたアクセス速度を向上させている。このブロッ
クの大きさく以下、ブロック・サイズ)は一般に2のべ
き乗にとられる。
lU(Long technology l ”V 'S-'7:/, :I-・Memory (Cach
CMemories: ^CM Com put, in
gSurveys, vol, I4. nol, 191+2
.. pp. 473-510>, in an information processing device equipped with a memory hierarchy, the main memory is divided into blocks of a certain size, and some of these programs can be accessed at high speed. By copying the data to the cache memory, if the data requested by the processor exists in the cache memory, the data can be copied to the cache memory.
Can be passed to Sosa quickly. This improves access speed from the processor's perspective. The size of this block (hereinafter referred to as block size) is generally taken as a power of two.

キャッシュ・メモリには、主記憶装置にあるブロックと
コピーと、主記憶装置においてこのブロックが存在する
位置を示すアドレス・タグとが記録される。データ・メ
モリは主記憶装置のコピーを記録する部分であり、ディ
レクトりはアドレス・タグを記録する部分である。1つ
のアドレス・タグにえt応するブロックが主記憶装置と
キャッシュ・メモリとの間でのマツピングの単位となる
The cache memory records the block and copy located in main memory, and an address tag indicating the location of this block in main memory. The data memory is the part that records a copy of main memory, and the directory is the part that records address tags. A block corresponding to one address tag is the unit of mapping between main memory and cache memory.

ギヤ・ソシュ・メモリはプロセッサからデータのアクセ
ス要求があると、ディレクトリを調べて要求されたデー
タがギヤ・ソシュ・メモリ内に存在するかどうかを判定
する。その語用、要求されたデータがギヤ・ソシュに存
在する場合、(以下、ヒラ1〜)には、キャッシュのデ
ータ・メモリからプロセッサにデータが渡される。要求
されたデータがキャッシュに存在しない場合(以下、ミ
ス・ヒラ1〜)には主記憶装置をアクセスしてプロセッ
サにデータを渡し、このデータが存在するブロックをキ
ャッシュにコピーする。
When the gear source memory receives a data access request from the processor, it checks the directory to determine whether the requested data exists in the gear source memory. If the requested data is present in the gear source, the data is passed from the data memory of the cache to the processor. If the requested data does not exist in the cache (hereinafter referred to as miss filler 1), the main memory is accessed, the data is passed to the processor, and the block containing this data is copied to the cache.

主記憶装置のブロックとキャッシュ・メモリのブロック
間でのマツピングの方式にはフル・アソシアティブ方式
、セット・アソシアティブ方式、ダイレクト・マツプ方
式がある。フル・アソシアティブ方式は、主記憶装置中
の任意のブロックをキャッシュ・メモリのf1意のブロ
ックにマ・ソビン′グできる方式である。ダイレクト・
マツプ方式では、主記憶装置のブロックが存在するアド
レスによりマツピングされるキャッシュ・メモリのブロ
ックが決定される方式である。セット・アソシアティブ
方式では、キャッシュ・メモリのブロックを幾つかのグ
ループに分けておき、主記憶のブロックが存在するアド
レスにより決定されるグルー1番号をもつキャッシュ・
メモリのブロックの内で任意のブロックにマ・ソピング
できる方式である。
There are full associative methods, set associative methods, and direct mapping methods for mapping between blocks in the main storage device and blocks in the cache memory. The fully associative method is a method in which an arbitrary block in the main memory can be mapped to a unique block f1 in the cache memory. direct·
In the mapping method, a cache memory block to be mapped is determined by the address where the main memory block exists. In the set associative method, cache memory blocks are divided into several groups, and cache memory blocks are divided into several groups, each having a glue 1 number determined by the address where the main memory block resides.
This method allows mapping to any block within the memory block.

キャッシュ・、メモリにプロセッサが要求したデータが
存在する割合(以下、ヒツト率)はブロック・サイズに
依存し、ブロック・サイズが大きくなるほどヒツト率が
向上する。このためブロックの大きさを1回のメモリ・
アクセスでロードできる部分(以下、バー1− )より
も大きくし、1つのプロ・ツクをロードするのに複数回
のメモリ・アクセスを行なうようにしたキャッシュ・メ
モリらある。この場合、通常は、ミス・ヒットを起こし
たときにはプロセッサが要求しているデータの存在する
パートからロードを行ない、同時にこのデータをプロセ
ッサに渡すことによって、ブロックの残りのパートのロ
ードとプロセッサの次の処理を同時に行なえるようにし
て全体料しての処理速度の高速化を計っている。このた
め、ブロックの後半のパートにおいてミス・ヒラ)−が
発生した場合には、主記憶装置からこのパートをロード
し、さらに、ブロックの境界までギヤ・ソシュ・ロード
した後、残りのパートすなわちブロック前半のバー1〜
を17−ドする。これをう・ソフ“ アラウン′ド・ロ
ードという。
The rate at which data requested by the processor exists in the cache and memory (hereinafter referred to as the hit rate) depends on the block size, and the hit rate improves as the block size increases. For this reason, the size of the block is
There is a cache memory which is larger than the portion that can be loaded by access (hereinafter referred to as bar 1-), and which requires multiple memory accesses to load one program. In this case, normally when a miss-hit occurs, the processor loads the requested data from the part that contains it, and at the same time passes this data to the processor so that it can load the remaining parts of the block and the processor's next part. The aim is to increase the overall processing speed by allowing multiple processes to be performed simultaneously. Therefore, if a miss occurs in the latter part of a block, this part is loaded from main memory, and then the gear is loaded to the block boundary, and then the remaining part, that is, the block First half bar 1~
17-code. This is called the "around road".

セクタ・バッフγ方式はフル・アソシアティブ方式、セ
ラ1〜・アソシアティブ方式、ダイレクト・マツプ方式
のいずれのギヤ・ソシュ・メモリにら適用できる方式で
、連続したブロックをい<−)かまとめたセクタを主記
憶装置とギヤ・ソシュ・メモリとのマツピングの単位と
し、セクタ内の各プロ・ツクについて主記憶装置のコピ
ーがデータ・メモリ内に存在するかどうかを示すパリ・
ソド・フラグをディレクトリ内のアドレス・タグに付属
させている。セクタ方式においてら、ミス・ヒラ1− 
Lなときに主記憶装置からギヤ・ソシコ・メモリにロー
ドする単位がブロック・サイズになる。即ち、プロセ・
ソサがあるアドレスで示される主記憶装置のデータを要
求してミス・ヒットを起こした場合、要求されたデータ
か存在するプロ・・lりのみをキヤ・・lシュにロード
し、そのプロ・・ツクのパリ・・ノド・ヒ・ソ)〜を有
効に4−る。
The sector buffer γ method is a method that can be applied to any gear source memory, including the full associative method, the cell-associative method, and the direct map method. It is the unit of mapping between main memory and gear source memory, and indicates whether a copy of main memory exists in data memory for each program in the sector.
Attaching the sodo flag to address tags in directories. In the sector method, Miss Hira 1-
The unit of loading from the main memory to the gear social memory when L is the block size. That is, the process
If a source requests data in main memory indicated by a certain address and causes a miss, it loads only the requested data or the program that exists into the cache, and then loads that program into the cache.・Tsuku's Paris... Nodo He So) ~ is effectively 4-ru.

[発明が解決しようとする問題点1 ト述した従来のキャッシュ・メモリ・システムにおいて
は、命令コードに関するアクセス要求が通常、主記憶装
置のアドレスの低い側から高い側に移るように構成され
ており、従って、ミス・ヒフ1〜を起こした原因が命令
コードのフェッチの場合には、ミス・ヒットを起したア
ドレスより大きいバー1〜の主記憶装置をミス・ヒフ1
−の後にアクセスすることが多く、ミス・ヒットの起し
たアトしスより小さいパートの主記憶装置をアクセスす
る可能性は少ないと考えられる。
[Problem to be Solved by the Invention 1] In the conventional cache memory system mentioned above, the access request related to the instruction code is usually moved from the lower address side to the higher address side of the main memory device. , Therefore, if the cause of miss high 1~ is instruction code fetch, the main memory of bar 1~ larger than the address that caused the miss hit will be stored as miss high 1~.
- is often accessed, and it is thought that there is little possibility of accessing a part of the main memory smaller than the address where the miss-hit occurred.

フロ・ツク・サイズがバス幅より大きいキヤ・・lシュ
 メモリでは、ブロックの後半のパートでミスし・11
〜を起した場合、このパートを最初にロードしてブI7
セ・ソサにデータを渡した後、ブロック前半のバー1−
をラッチ・アラウンド・ロードしていたため、命令コー
ドのフエ・ソチによるミス・ヒフ)・の直後にプロセッ
サから次のプロ・・ツクにある命令コートを要求された
場合においてら、キヤ・・lシュと主記憶装置の間でう
・ンプ・アラウンド・ロードを行なっている最中である
可能性がある。このとき、要求された命令コードがキャ
ッシユ・メモリ内に存在していなければ、プロセ・・I
すのアクセス要求による主記憶装置のアクセスがう・・
Iプ・アラウンド・ロードの終了まで待たされることに
なり、プロセ・ソサからのアクセス要求に対する応答が
送れることになる。このことがブロック・サイズがバス
幅より大きいキャッシュ・メモリを使用した計算機シス
テムの処理速度を向上する上での妨げの1つにな−)で
いた。さらに、この場合、使用される可能性の低いブロ
ック前半のパートをロードすることになるため、余分な
主記憶装置のアクセスを行なうという問題もあった。
In cache memory where the buffer size is larger than the bus width, a miss occurs in the latter part of the block.
If ~ occurs, load this part first and then
After passing the data to Ce Sosa, bar 1- of the first half of the block
If the processor requests an instruction code in the next program immediately after an instruction code error (miss) due to a latch-around load, the cache There is a possibility that an around load is being performed between the computer and main memory. At this time, if the requested instruction code does not exist in the cache memory, the process...
The main storage device is not accessed by the access request...
This means that a response to the access request from the processor can be sent until the IP around load is completed. This has been one of the obstacles to improving the processing speed of a computer system using a cache memory whose block size is larger than the bus width. Furthermore, in this case, since the first half of the block, which is unlikely to be used, is loaded, there is a problem in that the main memory is accessed redundantly.

〔問題点を解決するための手段”1 本発明のキャッシュ・、メモリ・システムは、主記憶装
置の一部を記録するためのデータ・メモリと、該データ
・メモリに記憶されているデータの有効・無効や主記憶
装置のどの位置であるかを記録するためのアドレス・タ
グと、プロセッサから要求されたデータがキヤ・lシュ
・メモリに存在しない場合、即ちミス・ヒ・11〜の場
合に、主記憶装置からキャッシュ・メモリに転送するデ
ータの大きさ、即ちプロ・ツク・サイズ、をバス幅より
も大きくすることを可能とするためのプロ・ツク・アド
レス発生部と、主記憶装置をアクセスするためのインタ
ーフェイス部と、上記の各部分を制御するための制御部
とを持つキヤ・lシュ・メモリにおいて、前記制御部に
プロ・ツク・サイズ動的可変機構と、アドレス・タグ部
にバス幅の整数倍を単位としてハリ・・ノド ピッ1〜
を設けることにより、ミス・ヒ・11〜のときに主記憶
装置からキャッシュ・メモリに転送するブロックの大き
さを動的に変化させる制御機構とを有している、 更に本発明のキヤ・・lシュ メモリ・システムは、プ
ロセ・ソサが要求するデータの種類を判別し、この判別
結果によりプロ・ツク・サイズ動的可変機構の動作を制
御する判別部を有している、〔実施例〕 次に、本発明の実施例について図面を参照して詳細に説
明する。
[Means for Solving the Problems 1] The cache/memory system of the present invention includes a data memory for recording a part of the main storage device, and a data memory for validating the data stored in the data memory.・An address tag to record whether the data is invalid or where it is in main memory, and if the data requested by the processor does not exist in the cache memory, that is, in the case of a miss. , a program address generator that enables the size of data transferred from the main memory device to the cache memory, that is, the program size, to be larger than the bus width, and the main memory device. In a cache memory having an interface section for accessing and a control section for controlling each of the above parts, the control section has a program size dynamic variable mechanism, and the address tag section has a dynamic program size variable mechanism. The unit is an integral multiple of the bus width.
Further, the present invention has a control mechanism that dynamically changes the size of the block transferred from the main storage device to the cache memory in the event of a miss. [Embodiment] The memory system has a determination unit that determines the type of data requested by the processor and controls the operation of the program size dynamically variable mechanism based on the determination result. Next, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は本発明の第1の実施例によるキャッシュ・メモ
リ・システムを示し、第2図は本実施例における主記憶
装置とキャッシュ・メモリとのマ・ソピングを示す。第
1図において本発明の第1の実施例はミス・ヒット発生
時に主記憶装置12からキヤ・lシュ・メモリ1にロー
ドするプロ・ツクの大きさを動的に変化させる方式のキ
ヤ・lシュ・メモリ・システムで、プロセ・:/ ? 
、1 ]がアドレス・ハス14にアドレス、制御バス1
5にアクセス要求を示す情報を出力してプロ・・lり内
のバート番号nのパートにあるデータを要求したとき、
キヤ・lシュ・、メモリの制御部すは、要求されている
アドレスとディしり1〜す3のアトしス・タグ部9に記
録されているフ゛ドレスとを比中交する。ここで、一致
するものがあればそのアドレス・タグっで示されるセク
タについてのハリ・ソl−・フラグ8によりバート番号
nについてのパリ・ソド フラグが有効になっているか
どうかを調べる。バート、番号nについてのパリ・・I
ド・フラグが有効になっていればキヤ・lシュ・メモリ
1にヒ・・/1・したと判定され、要求されたデータを
データ・メモリ2からプロセッサ】1に渡す、これ以外
の場き、すなわちアドレス・タグ9に一致するものがな
い場合、またはバー1〜番号nについてのパリ・ソド・
フラグ8が無効になっている場合にはミス・ヒットと判
定される、このときにはキャッシュ・メモリの制御部6
はプロセッサ11をプロセ・ソサへのウェイト要求線1
6をアクティブにすることにより、プロセッサ11が要
求しているデータを主3己憶装置12から収り込むまで
待たせる。主記憶装置12をアクセスする動作を次に示
す7 プロセッサ11がアクセス要求を出したとき、アドレス
発生部llはミス・ヒットに011えてプロセッサ11
か出力したアドレスを取り込んでおく2ミス・ヒ・ソl
〜のときには、アドレス発生部4が取り込んだアドレス
を主記憶インターフェイス部5に送る、また、取り込ん
だアドレスから残りのバートをロードするためσ)アト
L・スを作成し、順次、主記憶インターフェイス部5に
送る。主記憶インターフェイス部5は送られてきたこれ
らのアトしスをアドレス・バス18に出力し、制御線1
9にアクセス要求を出力して主記憶装置12をアクセス
し、必要なバートをデータ・バス17を通じて読み出し
て、これをロード・バ・ソファ10に送る。
FIG. 1 shows a cache memory system according to a first embodiment of the present invention, and FIG. 2 shows mapping between a main storage device and a cache memory in this embodiment. In FIG. 1, the first embodiment of the present invention is a cache memory that dynamically changes the size of the program loaded from the main memory 12 to the cache memory 1 when a miss-hit occurs. In the memory system, the process :/?
, 1 ] is the address in address bus 14, control bus 1
When outputting information indicating an access request to 5 and requesting data in the part number n in the program,
The cache/memory control unit intersects the requested address with the address recorded in the address tag section 9 of Digits 1 to 3. Here, if there is a match, it is checked whether the Paris flag for Bart number n is enabled using the Hari Solo flag 8 for the sector indicated by the address tag. Bart, Paris about number n...I
If the write flag is enabled, it is determined that cache memory 1 has been loaded, and the requested data is passed from data memory 2 to processor ]1. , i.e. if there is no match for address tag 9, or for bar 1 to number n
If flag 8 is disabled, it is determined that there is a miss hit; in this case, the cache memory control unit 6
is the wait request line 1 from the processor 11 to the processor
6 is activated, the processor 11 is made to wait until the requested data is received from the main storage device 12. The operation of accessing the main memory 12 is shown below.7 When the processor 11 issues an access request, the address generation unit
2) Import the output address
When ~, the address generated by the address generating section 4 is sent to the main memory interface section 5, and in order to load the remaining parts from the fetched address, σ) At L and S are created, and the main memory interface section Send to 5. The main memory interface section 5 outputs these sent addresses to the address bus 18 and connects them to the control line 1.
The CPU 9 outputs an access request to the main memory 12, reads out the necessary data via the data bus 17, and sends it to the load bus 10.

このロード・バッファ10の大きさはブロック・サイズ
に等しい。
The size of this load buffer 10 is equal to the block size.

従来のキャッシュ・メモリの制御部6は、この操作によ
りバート番号nから3のバートをロード・バッファ10
にロードし、同時にプロセッサ11の要求しているバー
トをプロセッサのデータ・バス13を通じて10セ・ン
サ11に渡す。さらに、パート番号0からn−1までの
バートをラップ・アラウンド・ロードしてロード・バッ
ファ10に送った後、アトトス発生部4から送られたア
トしスをアドレス・タグ9、ロードバッファ10からプ
ロ・ツクをデータ・メモリ2に記憶し、対応するプロ・
ツクのバリッド・フラグを有効にしていた。
Through this operation, the conventional cache memory control unit 6 loads the bart number 3 from bart number n to the buffer 10.
At the same time, the data requested by the processor 11 is passed to the 10 sensor 11 via the data bus 13 of the processor. Furthermore, after wrapping and loading parts from part numbers 0 to n-1 and sending them to the load buffer 10, the attos sent from the attos generator 4 is loaded from the address tag 9 and the load buffer 10. Store the program in data memory 2 and store the corresponding program in data memory 2.
Tsuku's valid flag was enabled.

第1の実施例によるキャッシュ・、メモリでは、パート
番号号nにおいて前と同様にミス・ヒ・yl〜した場合
、キヤ・・lシュ・メモリの制御部6は以下の操作杆な
う。まず、制御部6の中に存在するブロック・サイズ動
的可変機1147は、ミス・ヒラ1〜したアドレスをも
とにアドレス発生部4においてパート番号nから3のア
トし・スのみを発生させるように制御する、このアドレ
スはインターフェイス部5に送られる。インターフェイ
ス部5ではこの′アドレスにより必要なバートを主記憶
装;412がら読み出し、これをロード・バ・ソファ1
0にロードする。またこれと同時にフ゛ロセ・ソサ11
の要求しているバートをアロセ・ソサのデータ・バス1
3を通じてプロセ・ソサ】1に渡ず、この操作が終了す
ると、ロード・バ・ソファ10の中のバー1〜番号がn
から3のバー1へにデータがロードされた状態となって
いる。このとき、制御部6においてアドレス発生部4に
記録されているアドレスをアドレス・タグ9に転送する
6また、ブロック・サイズ動的町変機横7では、ミス・
ヒ・/+〜したアドレスの情報からロード・バ・ソファ
10の中で有効なデータがロードされている部分を量刑
し、ロード・バ・ソファ10の中で有効なデータがロー
ドされた部分、すなわちバー1一番号が[)から3のバ
ートのデータをデータ・メモリ2に記録させ、パリ・ソ
ド・フラグ8においてパート番号号がnから3に対応す
るハリ・ソド・フラグを有効にする。
In the cache memory according to the first embodiment, when a mistake occurs in part number n as before, the control section 6 of the cache memory performs the following operations. First, the block size dynamically variable machine 1147 existing in the control unit 6 causes the address generation unit 4 to generate only the Ats and Sus of part number n to 3 based on the addresses of misses 1 to 3. This address is sent to the interface section 5. The interface section 5 reads out the necessary part from the main memory 412 using this 'address, and sends it to the load bar 1.
Load to 0. At the same time, Florence Sosa 11
Aroce Sosa's Data Bus 1
3 through Process Sosa] When this operation is completed without passing to 1, the bar numbers 1 to 1 in the load bar sofa 10 will be changed to n.
The data is loaded from bar 1 to bar 3. At this time, in the control unit 6, the address recorded in the address generation unit 4 is transferred to the address tag 9.
Based on the information on the address, the part of the load bar sofa 10 where valid data is loaded is determined, and the part of the load bar sofa 10 where valid data is loaded, That is, the bar data of bar 11 numbers [) to 3 is recorded in the data memory 2, and in the pari sodo flag 8, the Hari Sodo flag corresponding to part numbers n to 3 is enabled.

第2図は本発明によるキヤ・・lシュ・メモリにおける
マ・1ピングの方法の一例を示す。第213において、
主記憶装置12の各セクタ20は連続した複数個のバー
ト22〜26で構成されており、1つまたは複数個のプ
ロ・ツク21に分割されている。
FIG. 2 shows an example of a method of mapping in cache memory according to the present invention. In the 213th
Each sector 20 of the main storage device 12 is composed of a plurality of consecutive parts 22 to 26, and is divided into one or more programs 21.

即ち、各ブロック21はN個のバート23〜26で構成
されている。各ブロック21を構成するN個のバートに
はOからN−1までの番号をつけている。このキャッシ
ュ・メモリには、主記憶装置12の各セクタをマ・・l
ピングの単位としてアドレス・タグ9を持たせ、各バー
トに対してはパリ・ソド・フラグ8を持たせている。デ
ータ・メモリ2にはプロ・1りの境界までのバー1〜、
即らバー1−1号rlからN−1までのパートを各部分
31〜311にロードすることにより、それに対応する
ノ\す・:ノド・フラグ8を有効にする。すなわちノ<
−ト番号がnから3のパートのデータをデータ・ノくり
・ノド・フラグ8においてバート番号がnから3に対応
する。
That is, each block 21 is composed of N parts 23 to 26. The N parts constituting each block 21 are numbered from O to N-1. Each sector of the main memory 12 is mapped to this cache memory.
An address tag 9 is provided as a ping unit, and a Paris flag 8 is provided for each bart. Data memory 2 contains bar 1 to the boundary of pro 1,
That is, by loading the parts from bar 1-1 rl to N-1 into each portion 31 to 311, the corresponding node flag 8 is enabled. In other words, ノ<
- The data of the part whose part number is n to 3 corresponds to the part number from n to 3 in the data cut-out flag 8.

すなわち第1の実施例では、プロセッサ11がバート番
号0のバード23にあるデータを要求した場合にはバー
ト番号が0から3までのパート23.24.25.26
をキャッシュ・メモリ内のデータ・メモリ2においてこ
れらを記録する部分31゜32.33.j4に記録し、
対応する/<リッド・フラグ27.28.29.3’O
を有効にする。この場合には従来のセクタ方式のキヤ・
lシュ・メモリと同じ動作をする。これに対し、ブロモ
・ソサ11がバート番号1のバー1−24にあるデータ
を要求した場きにはバート番号が1から3のバー1〜2
4.25.26をデータ・メモリ内の32゜33.34
に記録し、対応するパリ・・ノド・フラグ28.29.
30を有効にする。また、ブロモ・lす11かバー1〜
番号2のバー1へ25にあるデータを要求した場合には
バー1一番号か2と3の/に−1・25.26をデータ
 メモリ内の33.3・1に記録し、対応するパリ・ソ
ド フラグ29.30を有効にする7同様に、フ′ロセ
・・/す11がノ゛ζ−1・番号3のパート26にある
データを要求した場r)にはバート番号号が3のバー1
〜26のみをデータ・メモリ内の34に記録し、対応す
るパリ・・ノド・フラグ30をイ丁効にする。1足って
フ゛ロセ・ンサ11がノ(−1〜番号が1から3までの
パートにあるデータを要求した場合にはブロックの前半
にあるバー1〜のアクセスを行なわない。
In other words, in the first embodiment, when the processor 11 requests data in the bar 23 with bar number 0, the parts 23, 24, 25, 26 with bar numbers 0 to 3 are requested.
A portion 31, 32, 33, which records these in the data memory 2 in the cache memory. Record it on j4,
Corresponding /< lid flag 27.28.29.3'O
Enable. In this case, the conventional sector method
It operates in the same way as flash memory. On the other hand, when Bromo Sosa 11 requests the data in bars 1-24 of bart number 1, the data in bars 1-24 of bart number 1 to 3 is
4.25.26 to 32°33.34 in data memory
and the corresponding Paris-nod flag 28.29.
Enable 30. Also, bromo lsu 11 or bar 1~
If you request the data at 25 to bar 1 of number 2, record -1 25.26 to the bar 1 number or 2 and 3/33.・Sodo flag 29.Enable 30 7Similarly, if the file system 11 requests the data in part 26 of No.ζ-1.number 3, then the Bart number is Bar 1 of
.about.26 is recorded at 34 in data memory, and the corresponding Paris node flag 30 is enabled. If 1 is added and the processor 11 requests data in parts numbered from -1 to 1 to 3, it does not access bars 1 to 3 in the first half of the block.

次に本発明の第2の実施例について説明する7第3図は
本発明の第2の実施例を示す6第3図において、本発明
の第2の実施例はプロセッサの要求するデータの種類を
判別することにより、特定の種類のデータをアクセスさ
れたときに発生したミス・ヒットについて、主記憶装置
からキャッシュ・メモリにロードするブロックの大きさ
分動的に変化させる方式のキヤ・lシュ・メモリ・シス
テノ、て、キヤ・・lシュ・メモリの制御部内にブロモ
・ソザ11の要求するデータの種類を判別する判別部か
設けられている。プロセッサ11はアドレス・バス]4
にアドレス、制御バス15に要求するデータの種類に関
する情報を陰んだアクセス要求を示す情報を出力してブ
ロック内のバー1〜番号nのパートにあるデータを要求
する。プロセッサの要求したデータがキヤ・lシュ・メ
モリに存在するかどうかの判定とヒ・ソトシた場きの動
作は第1の実施例に示したキヤ・lシュ・メモリと同様
に動作する。ミス ヒ・ソ+・の場合に、フ”l′Vセ
・・lすの要求しているデータを得るなめに主記憶装置
12をアクセスする動作を次に示す。
Next, the second embodiment of the present invention will be explained.7 Figure 3 shows the second embodiment of the present invention.6 In Figure 3, the second embodiment of the present invention will explain the type of data requested by the processor. By determining the size of the block that is loaded from the main memory to the cache memory, a cache system that dynamically changes the block size to be loaded from the main memory to the cache memory is developed.・Memory System, Cache, etc. A discriminating unit for discriminating the type of data requested by the bromo source 11 is provided in the control unit of the cache memory. Processor 11 is an address bus]4
The control bus 15 outputs information indicating an access request including information regarding the type of data requested to the address and control bus 15 to request the data in the parts numbered from bar 1 to number n within the block. The determination as to whether the data requested by the processor exists in the cache memory and the operation at the time of the request are performed in the same manner as in the cache memory shown in the first embodiment. The following describes the operation of accessing the main memory 12 in order to obtain the data requested by the file in the case of a mistake.

バート番号号においてミス・ヒ・ソ)〜シた場合、キヤ
・lシュ メモリの制御部6は以下の操作を行なう。ま
ず、制御部6の中に(’f−在する判別部35において
プロセッサの要求するデータの種類を判別し、プロ・ツ
ク・サイズを動的に変化させるかどうかを°l′11定
する。その結果、ブロック・サイズをJl>的に変化さ
せないと判定された場かには、キヤ・lシュ・メモリの
制御部6は、従来のキャッシュ・メモリと同様、アドレ
ス発生部11からバート詐号nから3のアドレス、更に
パート詐号Oからn−1のアドレスを主記憶インターフ
ェイス部5に送るように制御する。主記憶インターフェ
イス部5では、送られてきたこれらのアトトスをアドレ
ス・ハス18に出力し、制御線19にアクセス要求を出
力して主記憶装置12をアクセスし、必要なパートをデ
ータ・バス17を通じて読み出して、これをロード・バ
ッファ10に送る。また、こ)′シと同時にプロセッサ
11の要求しているバー1〜をプロセッサのデータ・バ
ス13を通じてプ1コセ・・/す11に渡ず、、バー1
一番号0からr+−]までのパー1〜のラップ・アラウ
ンド・ロードが終了すると、制御部6はアトし・ス発生
部71から送られl:つ゛)・レスをアドレス・タグ9
、ロード・バッファ10からブロックをデータ・メモリ
2に記録し、対応するブロックのバリッド・フラグを有
効にする。
If a mistake occurs in the Bart number, the cache memory control unit 6 performs the following operations. First, the determining section 35 located in the control section 6 determines the type of data requested by the processor, and determines whether or not to dynamically change the program size. As a result, if it is determined that the block size will not be changed in accordance with Control is performed to send addresses from n to 3 and further addresses from part number O to n-1 to the main memory interface section 5.The main memory interface section 5 sends these sent attos to the address hash 18. The main storage device 12 is accessed by outputting an access request to the control line 19, and the necessary part is read out via the data bus 17 and sent to the load buffer 10. The bar 1 requested by the processor 11 is not passed through the processor's data bus 13 to the processor 11.
When the wrap-around loading of par 1~ from number 0 to r+-] is completed, the control unit 6 receives the address tag 9, which is sent from the address generation unit 71.
, records the block from the load buffer 10 into the data memory 2, and enables the valid flag of the corresponding block.

判別部35においてブV″7セ・ソサの要求するデータ
の種類を判別した結果、プロ・ツク・サイズを動的に′
変1ヒさせると判定された場合には、フロ・・lり・サ
イズ動的可変機構7を作動させる。制御部6では ブロ
ック・サイズ動的可変機構7によりアトトス発生部11
においてパート番号nから3のアトしスのみを発生させ
るように制御する。このアドレスはインターフニス部5
に送られ、前と同様、インターフェイス部5ではこのア
ドレスにより必要なパー1〜を主記憶12から読み出し
、これをロード・バッファ10にロードする。また、こ
れと同時にプロセッサ11の要求しているパートをブロ
モ・ツナのデータ・バス13を通じてプロセッサ]1に
渡す、この操作が終了すると、ロード・バッファ10の
中のバート番号がnから3のパートにデータがロードさ
れた状態となっている。このとき、制御部6においてア
ドレス発生部4に記録されているアドレスをアドレス・
タグ9に転送する9また、プロ・ツク・サイズ動的可変
機構7では、ミス・ヒットしたアドレスの情報からロー
ド・バッファ10の中で有効なデータがロードされてい
る部分を判別し、ロード・バッファ10の中で有効なデ
ータがロートされた部分、すなわちパー1〜番号がnか
ら3のバー1−のデータをデータ・メモリ2に記録させ
、バリッド・フラグ8においてノ(−1〜番号がnから
3に対応するパリ・・ノド・フラグを有効にする。
As a result of determining the type of data requested by the program in the determination unit 35, the program size is dynamically determined.
If it is determined that the flow size is to be changed, the flow size dynamic variable mechanism 7 is activated. In the control unit 6, the block size dynamic variable mechanism 7 controls the attos generation unit 11.
Control is performed so that only the attribution number 3 is generated from part number n. This address is Interfunis Department 5
As before, the interface unit 5 reads the necessary par 1 to 1 from the main memory 12 using this address and loads it into the load buffer 10. At the same time, the part requested by the processor 11 is passed to the processor 1 via the Bromo Tuna data bus 13. When this operation is completed, the part whose part number is 3 from n in the load buffer 10 is transferred to the processor 1 through the Bromo Tuna data bus 13. The data is now loaded. At this time, the control section 6 converts the address recorded in the address generation section 4 into an address.
Further, the program size dynamic variable mechanism 7 determines the part of the load buffer 10 where valid data is loaded from the information of the miss-hit address, and transfers it to the tag 9. The portion of the buffer 10 into which valid data has been rolled, that is, the data of par 1 to bar 1 with numbers n to 3, is recorded in the data memory 2, and the valid flag 8 is set to bar 1 with numbers n to 3. Enable the pari-nod flag corresponding to n to 3.

すなわち第2の実施例では、プロセッサ1]の要求する
データの種類によりう・・lブ・アラウンド・ロードを
行なうかどうかを決定する。この制御を行なうことによ
り、命令コードのようにアドレスが増える方向にアクセ
スが進む可能性の大きいデータに関してはブロック・サ
イズ動的可変機構7を作動させ、アクセスの進む方向に
1扁りのないデータに関してはラップ・アラウンド・ロ
ートを行なうようにすることができる。
That is, in the second embodiment, it is determined whether or not to perform an around load depending on the type of data requested by the processor 1. By performing this control, the block size dynamic variable mechanism 7 is activated for data that is likely to be accessed in the direction of increasing addresses, such as instruction codes, and for data that is not uniform in the direction of access. A wrap-around rotor can be used for this purpose.

このように本発明では、セクタ内の各パー1−にへリッ
ド・フラグを持たせ、ミス・ヒットのときにミス・ヒ・
・ノドを起こしたパート番号nからバー1一番号N−1
のパ 14キヤツシユ・メモリにロードする制御を行な
うことにより、従来ミス・ヒットの際に行なっていたバ
ート番号がOからn−】までのパー1〜をギヤ・ソシュ
・メモリにラップ・アラウンド・ロードする必要がなく
なる。このことにより、ミス・ヒットが続けて発生した
場合においても、従来のキャッシュ・メモリのように、
主記憶のアクセスをラップ・アラウンド・ロード終了ま
で待たされることがなくなり、また余分なメモリ・アク
セスを削減することができる。
In this way, in the present invention, each par 1 in a sector has a helid flag, and in the event of a miss hit,
・Bar 11 number N-1 from part number n that woke up the throat
By controlling the loading into the par 14 cache memory, wrap-around loading of pars 1~ with bar numbers O to n-] into the gear source memory, which was conventionally done in the event of a miss hit. There is no need to do so. As a result, even if misses occur one after another, unlike conventional cache memory,
Access to the main memory no longer has to wait until the end of wrap-around loading, and redundant memory accesses can be reduced.

L?J、 hに説明で明らかなように、本発明の主旨は
、主記憶とギヤ・・Iシュ・メモリとのマツピングの単
位であるセクタを細かく分割し、それぞれにパリ・ソI
・・フラグを用意しておくことにより、ブロモ・ソザか
へのアクセスがアドレスの高い方向に進む可能性の大き
いことを利用してミス・ヒットのときアクセスされる可
能性の高いバーI〜のみをキャッジ?、・メモリにロー
ドする制御方式を実現することである。この方式により
、従来のキャッシュ、メモリにおいて不必要なデータを
う・ツブ・アララン1〜・ロー1・する間に新に発生し
たミス・ヒットに対して、う・ソフ゛・アラウンド・ロ
ート終了まで主記憶装置のアクセスを待たぜていた状況
含回避し、また、余分なメモリ・アクセスを減少させる
。この主旨に反しないかぎり本発明にいくつかの実現方
法があることは明らかであろう。
L? As is clear from the explanations in Sections J and H, the gist of the present invention is to finely divide the sector, which is the unit of mapping between main memory and gear memory, and to
・By preparing a flag, we take advantage of the fact that there is a high possibility that accesses to bromo/soza will go in the direction of higher addresses. Catch only? ,・To realize a control method for loading into memory. With this method, new misses and hits that occur while writing unnecessary data in the conventional cache and memory can be handled until the end of the software, around, and row. To avoid situations where access to a storage device is made to wait, and to reduce redundant memory accesses. It will be obvious that the present invention can be implemented in several ways without departing from the spirit thereof.

なお、本発明の実施例では、パートの大きさをバス幅と
等しくしたキャッシュ・メモリ・システムを例にとって
説明しているが、バス幅の整数倍をパートとしてこれに
ハリ・・ノド・フラグを持たせたシステムにb本発明が
適用できる1、また、ここでは命令に関してのアクセス
がアドレスが増加する方向に進む可能性が高いことを利
用し、ミス・ヒ・ソI−が発生したパー1〜よりアトト
スの高いパートをギヤ・ソシュ・メモリにロードする方
式について説明したが、スタックのようにアドレスの低
い方向にアクセスが進む可能性の高いアクセスに関して
は、ミス・ヒットが発生したバー1へよりアドレスの低
いバー1〜をキャッシュ・メモリにロードする方式ら本
発明より容易に実現できることは明らかである2 〔発明の効用l 以」二説明したように本発明は、ミス・ヒ・−、トのと
きアクセスされる可能性の高いパートのみをキャッシュ
・メモリにロードする制御を行なうことにより、従来の
キヤ・γシュ・、メモリにおいて不!g・要なデータを
ラップ・アラウンド・ロードする間に新に発生したミス
・ヒラ1〜に対して、ラップ・アラウンド・ロード終了
まで主記憶のアクセスを待たぜていた状況を回避し、ま
た、余分なメモリ・アクセスを減少させることができる
効果がある。
In the embodiment of the present invention, a cache memory system in which the size of the part is equal to the bus width is explained as an example, but it is also possible to set the part to be an integral multiple of the bus width and set the hard-nod flag to the part. The present invention can be applied to a system in which a miss occurs. ~ We have explained the method of loading a higher attos part into the gear sosh memory, but for accesses where there is a high possibility that the access will proceed in the direction of lower addresses, such as in the stack, it is necessary to load the part with a higher attos into the gear sosh memory. It is clear that a method of loading bars 1~ with a lower address into the cache memory can be realized more easily than the present invention. By controlling the loading of only the parts that are likely to be accessed at the time of access into the cache memory, it is possible to avoid problems in conventional cache memory. g. Avoid the situation where access to the main memory was made to wait until the end of the wrap-around load in response to a new error 1~ that occurred during the wrap-around load of important data, and This has the effect of reducing unnecessary memory accesses.

更に、 本発明はセクタ方式と同様いくつかのパートを
まとめたセクタを主記憶装置とキャッシュ・メモリとの
マツピングの単位とし、セクタ内の各パートに対してバ
リッド・フラグを用意したキャッシュ・メモリにおいて
ミス・ヒットが発生した場合、主記憶からキャッシュ・
メモリにロードするは位としてブロックを定め、このブ
ロック中にあるパートの中で要求されたデータの存在す
るパートよりアドレスの高いパーt〜のみをロードし、
対応するバリッド・フラグを有効にすることにより、使
用される可能性の低いブロック前半のパートをキャッジ
ブー・メモリにロードすることを避け、キA−・ソシュ
、メモリの応答速度を向」ニさせる効果がある、 図面の簡ip、な51ε明 第1図は本発明の第1の実施例によるA・ヤツシュ・メ
モリの構成を示すブロック図、第2図は本発明の実施例
における主記憶装置とキャッシュ・メモリとのマ・ソビ
ングを示す図、第3図は本発明の第2の実施例によるキ
ャッシュ・メモリの構成を示す図である。
Furthermore, like the sector method, the present invention uses a sector, which is a collection of several parts, as a unit of mapping between the main storage device and the cache memory, and in the cache memory, a valid flag is prepared for each part within the sector. If a miss/hit occurs, the cache is removed from main memory.
A block is defined as the location to be loaded into memory, and among the parts in this block, only the part t~ whose address is higher than the part where the requested data exists, is loaded,
By enabling the corresponding valid flag, it is possible to avoid loading the first half of the block that is unlikely to be used into the cache memory, and improve the response speed of the memory. Figure 1 is a block diagram showing the configuration of the A. Yash memory according to the first embodiment of the present invention, and Figure 2 is a block diagram showing the structure of the main memory in the embodiment of the present invention. FIG. 3 is a diagram showing the configuration of a cache memory according to a second embodiment of the present invention.

1・・・キヤ・ソシ、−L・、メモリ、2・・・データ
・メモリ、3・・・ティレフ1〜す、4・・・アドレス
発生部、5・・インターフェイス部、b・・・制御部、
7・・・プロ・ツク・サイズ動的可変機f;■、8・・
・バリッド・フラグ、9・・アトしス・タグ、10・・
・ロードバッファ、11・・・ブロセ・ソサ、】2・・
・主記憶装置、13.17・・・データ・バス、14.
18・・・アドレス バス、15・・・制御バス、16
・・・ウェイ1〜要求線、19・・制御線、20・・・
セクタ、21・・・ブロック、22・・・26・・・バ
ー1〜.27〜30−・・フラグ、31〜34・・・パ
ート番号のパートを記録する部分、35・・・判別部。
DESCRIPTION OF SYMBOLS 1...Key position, -L, memory, 2...Data memory, 3...Tiref 1~S, 4...Address generation part, 5...Interface part, b...Control Department,
7... Pro-Tsuku size dynamic variable machine f; ■, 8...
・Valid flag, 9 ・Attis tag, 10 ・・
・Load buffer, 11...Brose Sosa,】2...
・Main storage device, 13.17...Data bus, 14.
18... Address bus, 15... Control bus, 16
...Way 1~Request line, 19...Control line, 20...
Sector, 21...Block, 22...26...Bar 1~. 27-30--Flag, 31-34--A portion for recording the part of the part number, 35--Discrimination section.

\、 0   乃 墾η喝 へ    へ へ 〜 〜\、 0       〃〃 To To To To To ~ ~

Claims (1)

【特許請求の範囲】 1、主記憶装置の一部を記録するためのデータ・メモリ
と、該データ・メモリに記憶されているデータの有効・
無効や主記憶装置のどの位置であるかを記録するための
アドレス・タグと、プロセッサから要求されたデータが
キャッシュ・メモリに存在しない場合、即ちミス・ヒッ
トの場合に、主記憶装置からキャッシュ・メモリに転送
するデータの大きさ、即ちブロック・サイズ、をバス幅
よりも大きくすることを可能とするためのブロック・ア
ドレス発生部と、主記憶装置をアクセスするためのイン
ターフェイス部と、上記の各部分を制御するための制御
部とを持つキャッシュ・メモリにおいて、前記制御部に
ブロック・サイズ動的可変機構と、アドレス・タグ部に
バス幅の整数倍を単位としてバリッド・ビットを設ける
ことにより、ミス・ヒットのときに主記憶装置からキャ
ッシュ・メモリに転送するブロックの大きさを動的に変
化させる制御機構とを有することを特徴とするキャッシ
ュ・メモリ・システム、 2、プロセッサが要求するデータの種類を判別し、この
判別結果によりブロック・サイズ動的可変機構の動作を
制御する判別部を制御部内に持たせることにより、プロ
セッサから要求されたデータの種類によりブロック・サ
イズを動的に変化させる特許請求の範囲第1項記載のキ
ャッシュ・メモリ・システム。
[Scope of Claims] 1. A data memory for recording a part of the main storage device, and a data memory for validating and storing data stored in the data memory.
An address tag is used to record whether the data is invalid or where in main memory it is located, and if the data requested by the processor does not exist in the cache memory, that is, in the case of a miss, the cache is removed from the main memory. A block address generator for making it possible to make the size of data transferred to the memory, that is, the block size, larger than the bus width; an interface unit for accessing the main memory; and each of the above. In a cache memory having a control section for controlling a portion, the control section is provided with a block size dynamic variable mechanism, and the address tag section is provided with valid bits in integer multiples of the bus width, A cache memory system characterized by having a control mechanism that dynamically changes the size of a block transferred from a main storage device to a cache memory in the event of a miss-hit.2. The block size is dynamically changed according to the type of data requested by the processor by having a discriminator in the control unit that discriminates the type and controls the operation of the block size dynamic variable mechanism based on the discrimination result. A cache memory system according to claim 1.
JP60274543A 1985-12-05 1985-12-05 Cache memory system Pending JPS62133545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60274543A JPS62133545A (en) 1985-12-05 1985-12-05 Cache memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60274543A JPS62133545A (en) 1985-12-05 1985-12-05 Cache memory system

Publications (1)

Publication Number Publication Date
JPS62133545A true JPS62133545A (en) 1987-06-16

Family

ID=17543176

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60274543A Pending JPS62133545A (en) 1985-12-05 1985-12-05 Cache memory system

Country Status (1)

Country Link
JP (1) JPS62133545A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240649A (en) * 1987-03-27 1988-10-06 Mitsubishi Electric Corp Data processor
JPH04127620U (en) * 1991-05-14 1992-11-20 太陽誘電株式会社 E type core

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240649A (en) * 1987-03-27 1988-10-06 Mitsubishi Electric Corp Data processor
JPH04127620U (en) * 1991-05-14 1992-11-20 太陽誘電株式会社 E type core

Similar Documents

Publication Publication Date Title
US5371870A (en) Stream buffer memory having a multiple-entry address history buffer for detecting sequential reads to initiate prefetching
JP3587591B2 (en) Method of controlling cache miss and computer system thereof
JP3289661B2 (en) Cache memory system
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
JP3666689B2 (en) Virtual address translation method
JPS58102381A (en) Buffer memory
JPS5876956A (en) Peripheral system with buffer memory
EP0173981A2 (en) Cache memory control circuit
JPH0512116A (en) Cache memory controller
JP3439167B2 (en) Method and apparatus for addressing the contents of main memory including a directory structure in a computer system
US5515522A (en) Coherence index generation for use by an input/output adapter located outside of the processor to detect whether the updated version of data resides within the cache
JPH0351011B2 (en)
JPH0519176B2 (en)
JPS62133545A (en) Cache memory system
JPS644214B2 (en)
JP2000047942A (en) Device and method for controlling cache memory
JPH0354649A (en) Buffer storage control system
JP3564343B2 (en) Data transfer device and method during cache bypass
JP2613258B2 (en) Information processing method and apparatus
JPH04205449A (en) Cache device
JPH077355B2 (en) Information processing equipment
JP2000148665A (en) Data processor
JP3204098B2 (en) Dynamic address decode cache control method
JPH01226056A (en) Address converter
JPH04353948A (en) Cache memory and cache memory system