JP2555461B2 - Cache memory system - Google Patents

Cache memory system

Info

Publication number
JP2555461B2
JP2555461B2 JP2039271A JP3927190A JP2555461B2 JP 2555461 B2 JP2555461 B2 JP 2555461B2 JP 2039271 A JP2039271 A JP 2039271A JP 3927190 A JP3927190 A JP 3927190A JP 2555461 B2 JP2555461 B2 JP 2555461B2
Authority
JP
Japan
Prior art keywords
data
instruction
cache memory
cache
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.)
Expired - Fee Related
Application number
JP2039271A
Other languages
Japanese (ja)
Other versions
JPH03241426A (en
Inventor
道雄 森岡
公三郎 栗田
英雄 沢本
小林  芳樹
隆夫 小林
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.)
Hitachi Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Engineering Co Ltd
Hitachi Ltd
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 Hitachi Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Engineering Co Ltd
Priority to JP2039271A priority Critical patent/JP2555461B2/en
Publication of JPH03241426A publication Critical patent/JPH03241426A/en
Application granted granted Critical
Publication of JP2555461B2 publication Critical patent/JP2555461B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データ処理装置のキャッシュメモリシステ
ムに係り、特に、命令用,データ用等の複数のキャッシ
ュメモリからなるキャッシュメモリシステムにおいて、
データの一致保証に好適なキャッシュメモリ制御方式に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory system for a data processing device, and more particularly to a cache memory system including a plurality of cache memories for instructions, data, etc.
The present invention relates to a cache memory control method suitable for guaranteeing data consistency.

〔従来の技術〕[Conventional technology]

(1)背景 プロセッサの性能向上のためパイプライン方式が高度
化している。パイプライン方式は、1つの命令の実行に
必要な処理、例えば、命令フェッチ,デコード,アドレ
ス計算,データフェッチ,演算などの処理をそれぞれ独
立なステージとし、ステージ間で次々に命令を実行する
ことにより高性能化を図る手段である。パイプラインの
高度化にともない、従来、命令とデータとを単一のキャ
ッシュメモリい格納していた方式から、これらを分離す
る命令・データ分割キャッシュメモリ方式が不可欠にな
りつつある。命令キャッシュとデータキャッシュとを分
割することにより、命令フェッチとデータフェッチ・ス
トアとの競合を避け、パイプラインを効率よく動作させ
ることが可能となる。
(1) Background Pipeline methods are becoming more sophisticated to improve processor performance. In the pipeline method, the processing required for execution of one instruction, for example, instruction fetch, decode, address calculation, data fetch, operation, etc., is set as independent stages, and instructions are executed one after another between stages. It is a means to improve performance. Along with the sophistication of pipelines, an instruction / data division cache memory method for separating instructions and data from a single cache memory is becoming indispensable. By dividing the instruction cache and the data cache, it is possible to avoid the competition between the instruction fetch and the data fetch / store, and operate the pipeline efficiently.

このような命令・データ分割キャッシュメモリ方式で
新たに問題となるのは、命令・データストア競合の制御
である。すなわち、汎用計算機では、データストアによ
って命令を変更する場合がある。今、命令フェッチは命
令キャッシュ、データフェッチ・ストアはデータキャッ
シュと完全に分割したとする。この場合、データストア
による命令変更は、データキャッシュのみを変更し、命
令キャッシュには古いデータが残ったままとなる。命令
フェッチがこの古い命令を読み出して実行すると、正常
な動作が保証されない。
A new problem in such an instruction / data division cache memory system is control of instruction / data store competition. That is, in a general-purpose computer, the instruction may be changed by the data store. Now, it is assumed that the instruction fetch is completely divided from the instruction cache and the data fetch / store is completely divided from the data cache. In this case, the instruction change by the data store changes only the data cache, and old data remains in the instruction cache. If the instruction fetch reads and executes this old instruction, normal operation is not guaranteed.

このため、データストアによる変更要求があった場合
は、命令・データストア競合制御により、命令キャッシ
ュとデータキャッシュの内容を常に一致させて最新情報
とする制御が必要となる。ここで注意すべき点として
は、データストアによる変更要求があれば、即座に命令
キャッシュとデータキャッシュの一致を保証しなければ
ならないことがある。これは、データストアによる命令
変更の後すぐに変更された命令をフェッチする場合でも
正常な動作を保証する必要があるからである。
Therefore, when there is a change request by the data store, it is necessary to control the contents of the instruction cache and the data cache to be always the same by using the instruction / data store conflict control so that the contents are updated. It should be noted here that if there is a change request by the data store, it is necessary to immediately guarantee that the instruction cache and the data cache match. This is because it is necessary to guarantee the normal operation even when the changed instruction is fetched immediately after the instruction is changed by the data store.

(2)従来方式 命令・データストア競合制御で最も簡単な方式は、デ
ータストアによる変更要求があれば、命令キャッシュと
デーキャッシュの両者を即座に変更する方式である。こ
うすれば、データストアによる命令変更に続いて当該命
令フェッチが要求されても正常な動作を保証できる。し
かし、この方式では、命令キャッシュにおいて、命令フ
ェッチとデータストアのアクセス競合し、パイプライン
動作の障害となる。
(2) Conventional method The simplest method of instruction / data store conflict control is a method of immediately changing both the instruction cache and the data cache if there is a change request by the data store. In this way, normal operation can be guaranteed even if the instruction fetch is requested following the instruction change by the data store. However, in this method, in the instruction cache, there is an access conflict between the instruction fetch and the data store, which hinders the pipeline operation.

この問題を解決する従来方式は、特開昭60−151749号
公報に開示されている。すなわち、データストア要求が
発行された場合、即座に命令キャッシュを変更せず、そ
の要求を多段の命令バッファに蓄積する。そして、命令
キャッシュがアクセスされていない時に、命令変更バッ
フアの内容に従って命令キャッシュを更新する方式であ
る。本方式によれば、命令フェッチとデータストアとが
競合することなく、パイプラインをスムーズに動作させ
ることができる。
A conventional method for solving this problem is disclosed in JP-A-60-151749. That is, when a data store request is issued, the instruction cache is not immediately changed and the request is accumulated in the multistage instruction buffer. Then, when the instruction cache is not accessed, the instruction cache is updated according to the contents of the instruction change buffer. According to this method, the pipeline can be operated smoothly without conflict between the instruction fetch and the data store.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上記従来技術によっても依然としていくつかの問題が
残る。第1に、データストアが連続する場合を考慮する
と、4段から8段程度の命令変更バッファが必要となる
ことである。このため、ハード量が増大する問題があ
る。
Even the above-mentioned conventional techniques still have some problems. First, considering the case where the data stores are continuous, four to eight instruction change buffers are required. Therefore, there is a problem that the amount of hardware increases.

第2に、データストアによる命令変更に続いて当該命
令のフェッチが発行された時に、命令変更が命令変更バ
ッファに残っていて命令キャッシュに反映されない場合
がある。このため、命令変更バッファの全てのエントリ
に比較器を設け、要求されている命令が、命令変更バッ
ファに残っていないかどうかを検出する機構が不可決と
なる。これらの機構は、ハード量増大の要因になるとと
もに、命令変更バッファの管理が複雑になる問題があ
る。
Second, when a fetch of the instruction is issued following the instruction change by the data store, the instruction change may remain in the instruction change buffer and not be reflected in the instruction cache. Therefore, the mechanism for providing comparators in all the entries of the instruction change buffer and detecting whether or not the requested instruction remains in the instruction change buffer becomes indeterminate. These mechanisms cause a problem that the amount of hardware increases and the management of the instruction change buffer becomes complicated.

本発明の目的は、従来方式のような命令変更バッファ
を設けることなく、命令・データ分離キャッシュメモリ
方式における命令・データストア競合の制御を実現する
キャッシュメモリシステムを提供することである。
An object of the present invention is to provide a cache memory system that realizes control of instruction / data store competition in the instruction / data separation cache memory method without providing an instruction change buffer as in the conventional method.

〔課題をするための手段〕[Means for achieving the task]

上記目的は、命令キャッシュメモリとデータキャッシ
ュメモリとを分離したキャッシュメモリ方式において、
命令およびデータキャッシュメモリに存在する全ての情
報を識別するキャッシュデータ識別手段を設け、データ
キャッシュメモリの全ての登録データに当該データが命
令キャッシュに存在するかどうかを示す共有ビットを設
け、データキャッシュに要求するデータが存在しない場
合、主メモリから要求データを読み出し、新規に登録す
るとともに、前記キャッシュデータ識別手段により命令
キャッシュに該当するデータが存在するかどうかを検出
し、存在すればデータキャッシュの登録データの共有ビ
ットを「1」とし、これによって命令キャッシュとデー
タキャッシュに同一のデータが登録されたことを示す方
式により達成される。
In the cache memory system in which the instruction cache memory and the data cache memory are separated,
A cache data identification means for identifying all the information existing in the instruction and data cache memory is provided, and a shared bit indicating whether or not the data exists in the instruction cache is provided in all registered data in the data cache memory, and the data cache is provided in the data cache. If the requested data does not exist, the requested data is read from the main memory and newly registered, and at the same time, the cache data identification means detects whether or not the corresponding data exists in the instruction cache. If there is, the data cache is registered. The shared bit of the data is set to "1", and this is achieved by a method indicating that the same data is registered in the instruction cache and the data cache.

すなわち、本発明は、上記目的を達成するために、主
記憶装置の命令の一部を格納する命令キャッシュメモリ
と、主記憶装置のデータの一部を格納するデータキャッ
シュメモリと、前記命令キャッシュメモリおよびデータ
キャッシュメモリに存在するすべての情報を識別するキ
ャッシュデータ識別手段とを有するキャッシュメモリシ
ステムにおいて、データキャッシュメモリに、格納する
基本データ単位ごとに当該データが命令キャッシュメモ
リに存在するか否かを示す共有データ識別情報を格納す
る領域を設け、命令キャッシュメモリまたはデータキャ
ッシュメモリに要求するデータが存在しない場合のみキ
ャッシュデータ識別手段により他のキャッシュメモリに
該当データが格納されているか否かを検出する手段と、
該当データが存在すれば共有データ識別情報を更新する
手段とを設けたキャッシュメモリシステムを提案するも
のである。
That is, in order to achieve the above object, the present invention provides an instruction cache memory for storing a part of an instruction of a main storage device, a data cache memory for storing a part of data of a main storage device, and the instruction cache memory. And a cache data identification means for identifying all information existing in the data cache memory, in the data cache memory, it is determined whether or not the data exists in the instruction cache memory for each basic data unit to be stored. An area for storing the shared data identification information shown is provided, and only when the requested data does not exist in the instruction cache memory or the data cache memory, the cache data identification means detects whether or not the corresponding data is stored in another cache memory. Means and
The present invention proposes a cache memory system provided with means for updating shared data identification information when corresponding data exists.

前記キャッシュメモリシステムは、データキャッシュ
メモリに更新したいデータが存在しない場合または共有
データ識別情報により同一データが命令キャッシュメモ
リにも存在することが検出された場合のみにキャッシュ
データ識別手段により命令キャッシュメモリに該当デー
タが格納されているか否かを検出する手段と、該当デー
タが存在すれば当該データを更新する手段とを備えるこ
ともできる。
In the cache memory system, the cache data identification means stores the data in the instruction cache memory only when the data to be updated does not exist in the data cache memory or when the shared data identification information detects that the same data also exists in the instruction cache memory. It is also possible to provide means for detecting whether or not the corresponding data is stored, and means for updating the data if the corresponding data exists.

〔作用〕[Action]

本発明においては、データストアが発行され、対象デ
ータがデータキャッシュに存在する場合、対象データの
共有ビットが「0」であれば、命令キャッシュへの変更
は不要となる。これは、この共有ビットにより命令キャ
ッシュとデータキャッシュの同一のデータが存在しない
ことが保証されているためである。また、共有ビットが
「1」であるかまたは対象データがデータキャッシュに
存在しない場合は、プログラムの実行を中断し、前記キ
ャッシュデータ識別手段により命令キャッシュに該当す
るデータが存在するかどうかを検出し、存在すればこれ
を更新する。データストアにおいては、8割から9割の
割合で対象データがデータキャッシュに存在し、かつ、
命令キャッシュとデータキャッシュで共有されるデータ
が非常に少ないため、プログラム実行を中断しての命令
キャッシュ更新は、ほとんど発生しない。
In the present invention, when the data store is issued and the target data exists in the data cache, if the shared bit of the target data is “0”, the change to the instruction cache is unnecessary. This is because the shared bit guarantees that the same data does not exist in the instruction cache and the data cache. When the shared bit is "1" or the target data does not exist in the data cache, the execution of the program is interrupted and the cache data identification means detects whether or not the corresponding data exists in the instruction cache. , Update this if it exists. In the data store, 80% to 90% of the target data exists in the data cache, and
Since the amount of data shared by the instruction cache and the data cache is very small, the instruction cache update by interrupting the program execution hardly occurs.

本発明によれば、従来方式の命令変更バッファを設け
ることなく、命令・データストア競合を制御でき、パイ
プライン動作への障害を極力抑えることが可能となる。
According to the present invention, it is possible to control the instruction / data store conflict without providing the conventional instruction change buffer, and it is possible to minimize the obstacle to the pipeline operation.

〔実施例〕〔Example〕

次に、第1図〜第4図を参照して、本発明によるキャ
ッシュメモリシステムの一実施例を詳細に説明する。
An embodiment of a cache memory system according to the present invention will now be described in detail with reference to FIGS.

第1図は、本発明を適用するデータ処理装置の一例を
示している。図において、複数のプロセッサ100が共有
バス500を介して、主記憶装置200を共有している。共有
バス500には、ファイルを蓄積する固定ディスク装置300
や、外部入出力装置とのデータ転送を行なう入出力プロ
セッサ400が接続される。
FIG. 1 shows an example of a data processing device to which the present invention is applied. In the figure, a plurality of processors 100 share a main storage device 200 via a shared bus 500. A fixed disk device 300 that stores files on the shared bus 500
Also, an input / output processor 400 that transfers data with an external input / output device is connected.

プロセッサ100(他も同様)内部の命令フェッチユニ
ットIU100は、プログラムの実行に必要な命令を主記憶
装置200からフェッチする機能を持つ。フェッチされた
命令は、命令実行ユニットEU140に転送される。命令実
行ユニット140では、命令の意味を解釈して必要なデー
タを主記憶装置200からフェッチした後、演算を実行す
る。命令アドレス変換装置121は、命令フェッチユニッ
ト110が送出する論理アドレスを物理アドレスに変換す
る。命令キャッシュメモリ122は、主記憶装置200に記憶
される命令コピーを高速なメモリに蓄えている。命令ア
ドレス変換装置121によって変換された物理アドレスに
より命令キャッシュメモリ122が検索され、要求する命
令が命令キャッシュ122内に存在すれば、短時間で要求
命令がフェッチされる。要求する命令が存在しない場合
は、主記憶装置200から該当する命令が命令キャッシュ
メモリ122に転送され、新規登録されるとともに、命令
フェッチユニット110に要求命令が供給される。
The instruction fetch unit IU100 inside the processor 100 (similarly for others) has a function of fetching an instruction required for executing a program from the main storage device 200. The fetched instruction is transferred to the instruction execution unit EU140. The instruction execution unit 140 interprets the meaning of the instruction, fetches necessary data from the main storage device 200, and then executes an operation. The instruction address translation device 121 translates the logical address sent by the instruction fetch unit 110 into a physical address. The instruction cache memory 122 stores the instruction copy stored in the main storage device 200 in a high-speed memory. The instruction cache memory 122 is searched by the physical address translated by the instruction address translator 121, and if the requested instruction exists in the instruction cache 122, the requested instruction is fetched in a short time. If the requested instruction does not exist, the corresponding instruction is transferred from the main storage device 200 to the instruction cache memory 122, newly registered, and the requested instruction is supplied to the instruction fetch unit 110.

データアドレス変換装置151は、命令実行ユニット140
が送出する論理アドレスを物理アドレスに変換する。デ
ータキャッシュメモリ152は、主記憶装置200に記憶され
るデータのコピーを高速なメモリに蓄えている。データ
アドレス変換装置151によって変換された物理アドレス
によりデータキャッシュメモリ152が検索され、要求す
るデータがデータキャッシュ152内に存在すれば、短時
間で要求データがフェッチされる。要求するデータが存
在しない場合は、主記憶装置置200から該当するデータ
がデータキャッシュメモリ152に転送され、新規登録さ
れるとともに、命令実行ユニット140に要求データが供
給される。キャッシュデータ識別装置130は、命令キャ
ッシュとデータキャッシュに格納されている全てのデー
タを識別できるメモリであり、命令キャッシュとデータ
キャッシュ間の干渉制御に用いられる。
The data address translation device 151 includes an instruction execution unit 140
Converts the logical address sent by to the physical address. The data cache memory 152 stores a copy of the data stored in the main storage device 200 in a high-speed memory. The data cache memory 152 is searched by the physical address converted by the data address conversion device 151, and if the requested data exists in the data cache 152, the requested data is fetched in a short time. If the requested data does not exist, the corresponding data is transferred from the main storage device 200 to the data cache memory 152, newly registered, and the requested data is supplied to the instruction execution unit 140. The cache data identification device 130 is a memory that can identify all data stored in the instruction cache and the data cache, and is used for interference control between the instruction cache and the data cache.

第2図は、命令キャッシュ120,データキャッシュ150,
キャッシュデータ識別装置130の構成を示す図である。
FIG. 2 shows an instruction cache 120, a data cache 150,
3 is a diagram showing a configuration of a cache data identification device 130. FIG.

まず、命令キャッシュ120の構成要素について説明す
る。令命アドレス変換装置1100は、論理アドレス情報11
01とこれに対応する物理アドレス情報1102とを対で保持
する連想メモリである。命令キャッシュメモリは、命令
そのものを保持する命令記憶部1300と、当該命令に対応
する物理アドレス情報を保持する命令ディレクトリ部12
00とを含んでいる。本実施例において、命令ディレクト
リ部1200は、ワード方向に4つの部分に分割され、それ
ぞれクラス0(1201)、クラス1(1202)、クラス2
(1203)、クラス3(1204)と呼ばれる。各クラスに
は、物理アドレスのビット〈0−19〉が保持される。ま
た、対応するデータが有効か無効かを示すVビット1205
を有する。
First, the components of the instruction cache 120 will be described. The command address translation device 1100 uses the logical address information 11
This is an associative memory that holds 01 and the corresponding physical address information 1102 as a pair. The instruction cache memory includes an instruction storage unit 1300 that holds an instruction itself and an instruction directory unit 12 that holds physical address information corresponding to the instruction.
Includes 00 and. In this embodiment, the instruction directory section 1200 is divided into four parts in the word direction, which are class 0 (1201), class 1 (1202), and class 2 respectively.
(1203), called Class 3 (1204). Each class holds bits <0-19> of the physical address. Also, V bit 1205 indicating whether the corresponding data is valid or invalid
Have.

データキャッシュメモリ150の構成要素であるデータ
アドレス変換装置1400,データ記憶部1600は、命令キャ
ッシュメモリ120の構成要素と同じであるので説明は省
略する。データディレクトリ部1500は、データディレク
トリ1500の各エントリに、対応するデータが命令キャッ
シュにも存在するかどうかを示す共有ビット1507を追加
した点が、命令ディレクトリ部1200と異なる。
The data address translation device 1400 and the data storage unit 1600, which are the constituent elements of the data cache memory 150, are the same as the constituent elements of the instruction cache memory 120, and a description thereof will be omitted. The data directory unit 1500 differs from the instruction directory unit 1200 in that a shared bit 1507 indicating whether or not corresponding data is also present in the instruction cache is added to each entry of the data directory 1500.

キャッシュデータ識別装置130は、命令ディレクトリ1
200のコピーである命令識別ディレクトリ1700と、デー
タディレクトリ1500のコピーである識別ディレクトリ18
00とを含んでいる。命令・データ識別ディレクトリは、
4つのクラスを並列にアクセスし、比較器により一致検
証する構成となっている。
The cache data identification device 130 has an instruction directory 1
Instruction identification directory 1700, which is a copy of 200, and identification directory 18 which is a copy of the data directory 1500.
Includes 00 and. The command / data identification directory is
The configuration is such that four classes are accessed in parallel and a match verification is performed by a comparator.

次に、各構成要素のアクセス方法を示す。命令アドレ
ス変換装置1100は命令論理アドレス1000のビット〈11−
19〉によって検索される。読み出された論理アドレス情
報1101は、命令論理アドレスのビット〈0−10〉と比較
され一致すれば、物理アドレス情報1102が命令キャッシ
ュに渡される。命令ディレクトリ部1200と命令記憶部13
00は、命令論理アドレスのビット〈18−31〉をインデク
スアドレスとして用いる。このうちビット〈18−19〉は
アドレス変換に依存して変化する部分であり、ビット
〈20−31〉は、アドレス変換の対象とならない部分であ
る。ビット〈18−19〉により、令命ディレクトリ部と命
令記憶部の4つのクラスの1つが選択され、ビット〈20
−31〉によって、クラス内のエントリーが選択される。
命令ディレクトリ1200から読み出された物理アドレス情
報は、命令アドレス変換装置1100からの物理アドレス情
報1102と比較され、一致検出される。
Next, a method of accessing each component will be shown. The instruction address translation device 1100 uses the bit <11-
19〉. The read logical address information 1101 is compared with the bits <0-10> of the instruction logical address, and if they match, the physical address information 1102 is passed to the instruction cache. Instruction directory section 1200 and instruction storage section 13
00 uses the bit <18-31> of the instruction logical address as an index address. Of these bits, bit <18-19> is a portion that changes depending on address translation, and bit <20-31> is a portion that is not subject to address translation. Bit <18-19> selects one of the four classes of the command directory section and instruction storage section, and bit <20
-31> selects an entry in the class.
The physical address information read from the instruction directory 1200 is compared with the physical address information 1102 from the instruction address translation device 1100, and a match is detected.

データアドレス変換装置1400、データディレクトリ部
1500、データ記憶部1600のアクセス方法に関しては、命
令の場合と同じであるので、説明を省略する。
Data address converter 1400, data directory section
The method of accessing 1500 and the data storage unit 1600 is the same as in the case of the instruction, so the description thereof is omitted.

命令論理アドレス1000のビット〈20−31〉、またはデ
ータ論理アドレス1005のビット〈20−31〉がセレクト19
02によって選択され、キャッシュデータ識別装置130の
命令識別ディレクトリ1700において、インデクスアドレ
スとして用いられる。命令識別ディレクトリ1700の4つ
のクラス1701−1704から読み出された物理アドレス情報
は、命令アドレス変換装置1100の物理アドレス情報1102
またはデータアドレス変換装置1400の物理アドレス情報
1402からセレクタ1901の選択した結果と比較され、一致
検証される。データ識別ディレクトリ1800のアクセス方
式もこれと同じである。
Bit <20-31> of instruction logical address 1000 or bit <20-31> of data logical address 1005 is selected 19
02, and is used as an index address in the instruction identification directory 1700 of the cache data identification device 130. The physical address information read from the four classes 1701-1704 of the instruction identification directory 1700 is the physical address information 1102 of the instruction address translation device 1100.
Or physical address information of the data address translator 1400
From 1402, the result is compared with the result selected by the selector 1901 and the match is verified. The access method of the data identification directory 1800 is also the same.

次に、第2図,第3図,第4図を参照して、命令実行
ユニットがデータキャッシュメモリをアクセスする処理
を説明する。第3図は、データフェッチ時の処理フロー
を示し、第4図は、データストア時の処理フローを示し
ている。なお、命令フェッチユニットによる命令キャッ
シュメモリのアクセス処理は、データフェッチの処理を
ほぼ同じになるため、説明を省略する。
Next, the processing for the instruction execution unit to access the data cache memory will be described with reference to FIG. 2, FIG. 3, and FIG. FIG. 3 shows a processing flow at the time of data fetch, and FIG. 4 shows a processing flow at the time of data store. The instruction fetch memory access processing by the instruction fetch unit is almost the same as the data fetch processing, and thus the description thereof is omitted.

(1)データフェッチのヒット時 命令実行ユニットからデータフェッチ要求があるとデ
ータ論理アドレスが1005にセットされる。データ論理ア
ドレスのビット〈0−19〉は、データアドレス変換装置
1400により物理アドレスのビット〈0−19〉に変換され
る。これと並行して、データディレクトリ部1500および
データ記憶部1600から、データ論理アドレスのビット
〈18−31〉がインデクスアドレスとして読み出される。
この時、データ論理アドレスのビット〈18−19〉でクラ
スが選択され、ビット〈20−30〉でクラス内のエントリ
が選択される。データディレクトリ1500部から読み出さ
れら情報は、比較器1506により、データアドレス変換装
置1400の出力である物理アドレスと比較される。比較し
た結果が一致すれば、ゲート1601が制御され、データ記
憶部から読み出されたデータ命令実行ユニットに転送さ
れる。
(1) On data fetch hit When a data fetch request is issued from the instruction execution unit, the data logical address is set to 1005. Bits <0-19> of the data logical address are the data address translation device.
It is converted by 1400 into bits <0-19> of the physical address. In parallel with this, bits <18-31> of the data logical address are read as an index address from the data directory unit 1500 and the data storage unit 1600.
At this time, the class is selected by bits <18-19> of the data logical address, and the entry within the class is selected by bits <20-30>. The information read from the data directory 1500 section is compared by the comparator 1506 with the physical address output from the data address translation device 1400. If the compared results match, the gate 1601 is controlled and transferred to the data instruction execution unit read from the data storage unit.

(2)データフェッチのミスヒット時 データキャッシュの一致検証の動作は前述の場合と同
様である。一致検証の結果ミスヒットであれば、物理ア
ドレスが主記憶装置200に転送され、要求データを含む
一定サイズのデータ(これをブロックと呼ぶ)の転送を
要求する。主記憶装置200からデータが転送されて来る
までに以下の処理を行なう。データ論理アドレスのビッ
ト〈20−31〉がセレクタ1902により選択され、命令識別
ディレクトリ1700とデータ識別ディレクトリ1800が同時
に読み出される。読み出された情報は、比較器1706また
は1806により、データアドレス変換装置1400により出力
される物理アドレス情報1402と比較される。命令識別デ
ィレクトリ1700で一致が検出された場合、新規に登録す
るデータキャッシュのエントリの共有ビット1507を
「1」として登録する。また、命令識別ディレクトリで
一致が検出されなかった場合は、新規に登録するデータ
キャッシュのエントリの共有ビット1507を「0」として
登録する。
(2) At the time of a data fetch miss hit The operation of the data cache match verification is the same as that described above. If the result of the match verification is a mishit, the physical address is transferred to the main storage device 200, and transfer of data of a fixed size including the requested data (this is called a block) is requested. The following processing is performed until the data is transferred from the main storage device 200. Bits <20-31> of the data logical address are selected by the selector 1902, and the instruction identification directory 1700 and the data identification directory 1800 are read simultaneously. The read information is compared with the physical address information 1402 output by the data address translation device 1400 by the comparator 1706 or 1806. When a match is detected in the instruction identification directory 1700, the shared bit 1507 of the newly registered data cache entry is registered as "1". If no match is detected in the instruction identification directory, the shared bit 1507 of the newly registered data cache entry is registered as "0".

データ識別ディレクトリ1800で一致が検出された場
合、エンコーダ1807により、比較器1806の結果から該当
データが存在するデータキャッシュのクラスアドレス18
08が生成される。このクラスアドレスとデータ論理アド
レスのビット〈20−31〉を結合したものを、データキャ
ッシュの無効化アドレスとする。無効化アドレスは、セ
レクタ1904により選択されてデータディレクトリ部1500
を検索し、対応するエントリのVビット1505を「0」と
ることにより無効化する。
When a match is detected in the data identification directory 1800, the encoder 1807 uses the result of the comparator 1806 to determine the class address of the data cache in which the corresponding data exists.
08 is generated. The combination of this class address and the bit <20-31> of the data logical address is used as the invalidation address of the data cache. The invalidation address is selected by the selector 1904 and the data directory section 1500 is selected.
Is searched for, and the V bit 1505 of the corresponding entry is set to “0” to invalidate.

主記憶装置200に要求していたデータが転送されてく
ると、これをデータ論理アドレスのビット〈18−31〉に
従って、データキャッシュメモリに登録する。同時に、
要求データを命令実行ユニットに転送する。
When the requested data is transferred to the main storage device 200, it is registered in the data cache memory according to bits <18-31> of the data logical address. at the same time,
Transfer the requested data to the instruction execution unit.

(3)データストアのヒット時 データストア時には、データ論理アドレス1005に、ス
トアデータが1602にセットされる。
(3) At the time of data store hit At the time of data store, the data logical address 1005 and the store data are set to 1602.

データ論理アドレスのビット〈0−19〉は、データア
ドレス変換装置1400により物理アドレスウのビット〈0
−19〉に変換される。これと並行して、データディレク
トリ部1500が、データ論理アドレスのビット〈18−31〉
をインデクスアドレスとして読み出す。この時、データ
論理アドレスのビット〈18−19〉でクラスが選択され、
ビット〈20−31〉によってクラス内のエントリが選択さ
れる。データディレクトリ部から読み出された情報は、
データアドレス変換装置1400の出力である物理アドレス
と比較器1506により比較される。比較した結果が一致
し、かつ対応する共有ビットが「0」であれば、ストア
データ1602がデータ記憶部1600に対応するエントリに書
き込まれるだけで処理は終了する。この時には、命令キ
ャッシュの変更またはデータキャッシュの他のクラスの
変更は不要である。これは、共有ビットにより命令キャ
ッシュには該当データが存在しないことが保証されるか
らである。
Bits <0-19> of the data logical address are converted by the data address translation device 1400 into bits <0-19 of the physical address.
−19〉. In parallel with this, the data directory section 1500 sets the bit <18-31> of the data logical address.
Is read as an index address. At this time, the class is selected by bits <18-19> of the data logical address,
An entry within the class is selected by bits <20-31>. The information read from the data directory section is
The comparator 1506 compares the physical address output from the data address translation device 1400. If the compared results match and the corresponding shared bit is "0", the store data 1602 is simply written to the entry corresponding to the data storage unit 1600, and the processing ends. At this time, it is not necessary to change the instruction cache or other classes of the data cache. This is because the shared bit guarantees that the corresponding data does not exist in the instruction cache.

また、比較結果が一致し、かつ、対応する共有ビット
が「1」であれば、ストアデータ1602がデータ記憶部16
00の対応するエントリに書き込まれるとともに、プロセ
ッサの実行を中断し、キャッシュ識別装置130を検索す
る。すなわち、データ論理アドレスのビット〈20−31〉
がセレクタ1902により選択され、命令識別ディレクトリ
1700とデータ識別ディレクトリ1800とが同時に読み出さ
れる。読み出された情報は、比較器1706または1806によ
り、データアドレス変換装置1400から出力される物理ア
ドレス情報1402と比較される。命令識別ディレクトリ17
00で一致が検出された場合、比較器1706の結果からエン
コーダ1706により該当データが存在する命令キャッシュ
のクラスアドレス1708が生成される。該クラスアドレス
とデータ論理アドレスのビット〈20−31〉を結合したも
のを、命令キャッシュの変更アドレスとする。変更アド
レスは、セレクタ1903により選択されて命令記憶部1300
をアクセスし、対応するエントリにストアデータ1602を
書き込む。
If the comparison results match and the corresponding shared bit is “1”, the store data 1602 is stored in the data storage unit 16.
It is written to the corresponding entry of 00, suspends the execution of the processor, and searches the cache identification device 130. That is, bits <20-31> of the data logical address
Is selected by the selector 1902, and the instruction identification directory
1700 and data identification directory 1800 are read simultaneously. The read information is compared with the physical address information 1402 output from the data address translation device 1400 by the comparator 1706 or 1806. Instruction identification directory 17
When a match is detected in 00, the encoder 1706 generates the class address 1708 of the instruction cache in which the corresponding data exists from the result of the comparator 1706. The combination of the class address and the bits <20-31> of the data logical address is used as the change address of the instruction cache. The changed address is selected by the selector 1903 and is stored in the instruction storage unit 1300.
To write the store data 1602 to the corresponding entry.

以上の変更を終了した後、プロセッサの実行を再会す
る。
After finishing the above changes, re-execute the processor.

(4)データストアのミスヒット時 データキャッシュの一致検証の動作は前述の場合と同
様である。一致検証の結果ミスヒットであれば、プロセ
ッサの実行を中断し、キャッシュ識別装置130の検索を
行なう。すなわち、データ論理アドレスのビット〈20−
31〉がセレクタ1902により選択され、命令識別ディレク
トリ1700とデータ識別ディレクトリ1800とが同時に読み
出される。読み出された情報は、比較器1706または1806
により、データアドレス変換装置より出力される物理ア
ドレス情報1402と比較される。命令識別ディレクトリ17
00で一致が検出された場合、比較器1706の結果からエン
コーダ1706により該当データが存在する命令キャッシュ
のクラスアドレス1708が生成される。このクラスアドレ
スとデータ論理アドレスのビット〈20−31〉を結合した
ものを、命令キャッシュの変更アドレスとする。変更ア
ドレスは、セレクタ1903により選択されて、命令記憶部
1300をアクセスし、対応するエントリにストアデータ16
02を書き込む。
(4) At the time of a data store miss hit The operation of the data cache match verification is the same as that described above. If the result of the match verification is a mishit, the execution of the processor is interrupted and the cache identification device 130 is searched. That is, the bit <20− of the data logical address
31> is selected by the selector 1902, and the instruction identification directory 1700 and the data identification directory 1800 are read simultaneously. The information read out is stored in the comparator 1706 or 1806.
Is compared with the physical address information 1402 output from the data address translation device. Instruction identification directory 17
When a match is detected in 00, the encoder 1706 generates the class address 1708 of the instruction cache in which the corresponding data exists from the result of the comparator 1706. The combination of this class address and bits <20-31> of the data logical address is used as the modified address of the instruction cache. The changed address is selected by the selector 1903, and is stored in the instruction storage unit.
Access 1300 and store data in the corresponding entry 16
Write 02.

同様にデータ識別ディレクトリ1800で一致が検出され
た場合、比較器1806の結果からエンコーダ1807により該
当データが存在するデータキャッシュのクラスアドレス
1808が生成される。当該クラスアドレスとデータ論理ア
ドレスのビット〈20−31〉を結合したものを、データキ
ャッシュの変更アドレスとする。変更アドレスは、セレ
クタ1904により選択されてデータ記憶部1600をアクセス
し、対応するエントリにストアデータ1602を書き込む。
Similarly, when a match is detected in the data identification directory 1800, the class address of the data cache where the corresponding data exists from the result of the comparator 1806 by the encoder 1807.
1808 is generated. The combination of the class address and the bits <20-31> of the data logical address is used as the changed address of the data cache. The changed address is selected by the selector 1904 to access the data storage unit 1600, and the store data 1602 is written in the corresponding entry.

以上の2つの変更を終了した後、プロセッサの実行を
再開する。
After the above two changes are completed, the execution of the processor is restarted.

〔発明の効果〕〔The invention's effect〕

本発明によれば、データキャッシュメモリあるいは命
令キャッシュメモリがミスヒットした場合のみ、または
ヒットしても共有されているデータについてのみ、命令
キャッシュとデータキャッシュの一致保証制御をすれば
よい。キャッシュメモリのヒット率は8割から9割と高
く、かつ、命令キャッシュとデータキャッシュで共有さ
えるデータが非常に少ないため、プログラム実行を中断
しての一致保証制御はほとんど発生しない。
According to the present invention, the coincidence guarantee control of the instruction cache and the data cache may be performed only when the data cache memory or the instruction cache memory has a mishit, or only for the data which is shared even if it is hit. The hit rate of the cache memory is as high as 80% to 90%, and the data shared by the instruction cache and the data cache is very small, so that the match guarantee control after interrupting the program execution hardly occurs.

したがって、従来方式の命令変更バッファを設けるこ
となく、少量のハードウエアで命令・データキャッシュ
の一致制御を実現でき、しかもパイプライン動作への障
害を極力抑えることが可能となる。
Therefore, it is possible to realize instruction / data cache coincidence control with a small amount of hardware without providing a conventional instruction change buffer, and it is possible to minimize obstacles to pipeline operations.

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

第1図は本発明を適用するデータ処理装置の一例の全体
構造を示すブロック図、第2図は本発明による実施例の
命令キャッシュ,データキャッシュ,キャッシュデータ
識別装置の構成を示す図、第3図はデータフェッチ時の
処理フローを示す図、第4図はデータストア時の処理フ
ローを示す図である。 100……プロセッサ、110……命令フェッチユニット、 120……命令キャッシュ、121……命令アドレス変換装
置、 122……命令キャッシュメモリ、130……キャッシュデー
タ識別装置、 140……命令実行ユニット、150……データキャッシュ、 151……データアドレス変簡装置、152……データキャッ
シュメモリ、 200……主記憶装置、300……固定ディスク、400……入
出力プロセッサ、 500……共通バス、1000……命令論理アドレス、 1005……データ論理アドレス、1100……命令アドレス変
換装置、 1200……命令ディレクトリ部、1300……命令記憶部、 1400……データアドレス変換装置、1500……データディ
レクトリ部、 1507……共有ビット、1600……データ記憶部、 1700……命令識別ディレクトリ、1800……データ識別デ
ィレクトリ。
FIG. 1 is a block diagram showing the entire structure of an example of a data processing device to which the present invention is applied, and FIG. 2 is a diagram showing the configuration of an instruction cache, a data cache, and a cache data identification device of an embodiment according to the present invention. FIG. 4 is a diagram showing a process flow at the time of data fetch, and FIG. 4 is a diagram showing a process flow at the time of data store. 100 ... Processor, 110 ... Instruction fetch unit, 120 ... Instruction cache, 121 ... Instruction address translation device, 122 ... Instruction cache memory, 130 ... Cache data identification device, 140 ... Instruction execution unit, 150 ... … Data cache, 151 …… Data address converter, 152 …… Data cache memory, 200 …… Main memory, 300 …… Fixed disk, 400 …… I / O processor, 500 …… Common bus, 1000 …… Instructions Logical address, 1005 ... Data logical address, 1100 ... instruction address conversion device, 1200 ... instruction directory part, 1300 ... instruction storage part, 1400 ... data address conversion device, 1500 ... data directory part, 1507 ... Shared bit, 1600 ... Data storage section, 1700 ... Instruction identification directory, 1800 ... Data identification directory.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 沢本 英雄 神奈川県秦野市堀山下1番地 株式会社 日立製作所神奈川工場内 (72)発明者 小林 芳樹 茨城県日立市久慈町4026番地 株式会社 日立製作所日立研究所内 (72)発明者 小林 隆夫 茨城県日立市幸町3丁目2番1号 日立 エンジニアリング株式会社内 (56)参考文献 特開 昭63−193246(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Hideo Sawamoto, 1 Horiyamashita, Hinoyamashita, Hadano City, Kanagawa Prefecture, Kanagawa Plant, Hitachi Ltd. (72) Yoshiki Kobayashi, 4026 Kuji Town, Hitachi City, Ibaraki Hitachi Research Institute, Ltd. Hitachi Research In-house (72) Inventor Takao Kobayashi 3-2-1, Saiwaicho, Hitachi, Ibaraki Hitachi Engineering Co., Ltd. (56) Reference JP-A-63-193246 (JP, A)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】主記憶装置の命令の一部を格納する命令キ
ャッシュメモリと、主記憶装置のデータの一部を格納す
るデータキャッシュメモリと、前記命令キャッシュメモ
リおよびデータキャッシュメモリに存在するすべての情
報を識別するキャッシュデータ識別手段とを有するキャ
ッシュメモリシステムにおいて、 前記データキャッシュメモリに、格納する基本データ単
位ごとに当該データが前記命令キャッシュメモリに存在
するか否かを示す共有データ識別情報を格納する領域を
設け、 前記命令キャッシュメモリまたはデータキャッシュメモ
リに要求するデータが存在しない場合のみ前記キャッシ
ュデータ識別手段により他のキャッシュメモリに該当デ
ータが格納されているか否かを検出る手段と、 該当データが存在すれば前記共有データ識別情報を更新
する手段と を備えたことを特徴とするキャッシュメモリシステム。
1. An instruction cache memory for storing a part of an instruction of a main storage device, a data cache memory for storing a part of data of a main storage device, and all of the instruction cache memory and the data cache memory existing in the data cache memory. In a cache memory system having cache data identifying means for identifying information, shared data identification information indicating whether or not the data exists in the instruction cache memory for each basic data unit to be stored in the data cache memory And a means for detecting whether or not the corresponding data is stored in another cache memory by the cache data identification means only when the requested data does not exist in the instruction cache memory or the data cache memory, If the shared data exists Cache memory system comprising the means for updating the different information.
【請求項2】請求項1に記載のキャッシュメモリシステ
ムにおいて、 前記データキャッシュメモリに更新したいデータが存在
しない場合または前記共有データ識別情報により同一デ
ータが命令キャッシュメモリにも存在することが検出さ
れた場合にのみ前記シャッシュデータ識別手段により命
令キュッシュメモリに該当データが格納されているか否
かを検出する手段と、 該当データが存在すれば当該データを更新する手段と を備えたことを特徴とするキャッシュメモリシステム。
2. The cache memory system according to claim 1, wherein there is no data to be updated in the data cache memory, or it is detected by the shared data identification information that the same data also exists in the instruction cache memory. Only in this case, the smash data identifying means includes means for detecting whether or not the corresponding data is stored in the instruction cache memory, and means for updating the data if the corresponding data exists. Cache memory system.
【請求項3】請求項1または2に記載されたキャッシュ
メモリシステムを備えたコンピュータ。
3. A computer provided with the cache memory system according to claim 1.
JP2039271A 1990-02-20 1990-02-20 Cache memory system Expired - Fee Related JP2555461B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2039271A JP2555461B2 (en) 1990-02-20 1990-02-20 Cache memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2039271A JP2555461B2 (en) 1990-02-20 1990-02-20 Cache memory system

Publications (2)

Publication Number Publication Date
JPH03241426A JPH03241426A (en) 1991-10-28
JP2555461B2 true JP2555461B2 (en) 1996-11-20

Family

ID=12548490

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2039271A Expired - Fee Related JP2555461B2 (en) 1990-02-20 1990-02-20 Cache memory system

Country Status (1)

Country Link
JP (1) JP2555461B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3740834A1 (en) * 1987-01-22 1988-08-04 Nat Semiconductor Corp MAINTAINING COHERENCE BETWEEN A MICROPROCESSOR-INTEGRATED CACHE AND AN EXTERNAL MEMORY

Also Published As

Publication number Publication date
JPH03241426A (en) 1991-10-28

Similar Documents

Publication Publication Date Title
US5095424A (en) Computer system architecture implementing split instruction and operand cache line-pair-state management
JP2565648B2 (en) Method and system for maintaining coherence of translation lookaside buffer
US10083126B2 (en) Apparatus and method for avoiding conflicting entries in a storage structure
JPS6135584B2 (en)
JPH0658650B2 (en) Virtual computer system
JPS59165144A (en) Order extractor
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
JP4666511B2 (en) Memory caching in data processing
JP3973129B2 (en) Cache memory device and central processing unit using the same
JP2555461B2 (en) Cache memory system
US5510973A (en) Buffer storage control system
EP0271187A2 (en) Split instruction and operand cache management
US12038839B2 (en) Processor and method for designating a demotion target to be demoted from an in-core cache structure to an out-of-core cache structure
JPS644214B2 (en)
US20230418749A1 (en) Processor and method for designating a demotion target to be demoted from an in-core cache structure to an out-of-core cache structure
JPH0552539B2 (en)
JPS63751A (en) Prefetch control system
JPH05342101A (en) Hierarchical cache memory
JPS589452B2 (en) Firmware broom
JP2024502812A (en) Techniques for tracking modifications to the contents of regions of memory
JPS63189943A (en) Branch forecasting control system
JP2542565B2 (en) Branch predictive control method
JP2637853B2 (en) Cache memory device
JPH0991199A (en) Device access method in hierarchical storage system
JP2002063154A (en) System for controlling scalar memory access instruction issue at accessing of vector memory

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees