JP2004303232A - Data memory cache device and data memory cache system - Google Patents
Data memory cache device and data memory cache system Download PDFInfo
- Publication number
- JP2004303232A JP2004303232A JP2004078088A JP2004078088A JP2004303232A JP 2004303232 A JP2004303232 A JP 2004303232A JP 2004078088 A JP2004078088 A JP 2004078088A JP 2004078088 A JP2004078088 A JP 2004078088A JP 2004303232 A JP2004303232 A JP 2004303232A
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- address
- area
- storage device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本特許出願に係る発明(以後単に「本発明」とも言う)は、CPUが主記憶装置をアクセスする時、主記憶装置のアクセス速度が遅いことによるオーバーヘッドを回避し、パフォーマンスを向上させることを目的とするメモリキャッシュ(キャッシュメモリとも言う)装置及びシステムに関するものである。 The invention according to the present patent application (hereinafter, also simply referred to as “the present invention”) aims at improving performance by avoiding overhead due to slow access speed of the main storage device when the CPU accesses the main storage device. (Also referred to as a cache memory) device and system.
本発明は、特に、データを記憶するデータメモリのキャッシュに関するものであり、更にいわゆるスタックメモリ、即ち、プッシュ・ポップ(push・pop)命令によってアドレスが連続的にアクセス(データの読み込みや書き込み)されるデータメモリのキャッシュに関するものである。 The present invention particularly relates to a cache of a data memory for storing data, and furthermore, a so-called stack memory, that is, an address is continuously accessed (reading or writing of data) by a push-pop instruction. This is related to a data memory cache.
従来の、プッシュ・ポップ命令に必要な時間を減少させ、キャッシュ内にプッシュ・ポップ後の不要なデータを保持しないようにするための、スタックキャッシュの制御方式及びスタックキャッシュには、例えば、主記憶装置上のデータ構造として最後に入力したデータが最初に出力されるスタック構造をサポートし、スタックへのデータ入力をプッシュ、前記スタックからのデータ出力をポップとして、他のデータ書込み/読出しと区別してデータ処理を行うマイクロコンピュータを備えたマイクロコンピュータシステムにおいて、前記マイクロコンピュータがプッシュするとき前記主記憶装置に代わって該当アドレスとデータの組を保持し、前記主記憶装置にプッシュされていない保持データを前記マイクロコンピュータが外部にアクセスしていない時を見計らって上記主記憶装置にプッシュし、前記マイクロコンピュータがポップするとき該当データを保持していれば前記主記憶装置に代わって該当データを前記マイクロコンピュータに出力し、前記マイクロコンピュータのポップで不要になったデータを後にポップされる可能性のあるスタック底部のデータに置き換えるため、前記マイクロコンピュータが外部にアクセスしていない時を見計らって前記主記憶装置からポップすることを特徴とするスタックキャッシュの制御方式があった(例えば、特許文献1参照。)。
しかしながら前記従来のスタックキャッシュシステム及びスタックキャッシュ制御方法では、通常のデータメモリに対するランダムアクセスを前提としたメモリアクセス高速化手法と何等変わることなく、スタックメモリと言う規則性のあるアクセスの特徴を生かすことができず、高速化を図る上で問題があった。 However, the conventional stack cache system and the conventional stack cache control method make use of the characteristic of the regular access called the stack memory without any difference from the memory access speed-up method assuming random access to the normal data memory. However, there was a problem in increasing the speed.
このことは特に近年ユビキタスコンピューティング等のためにニーズが増大しているJava(登録商標)システム等、スタックアクセスの比重が大きいメモリシステムでは特に大きな問題となる。具体的な問題点を次に説明する。 This is a serious problem particularly in a memory system having a large stack access specificity, such as a Java (registered trademark) system, which has been increasingly required for ubiquitous computing in recent years. Specific problems will be described below.
(第1の問題点)
例えばスタックに対するデータプッシュが、主記憶装置上のメモリアドレスの増加方向に行われたと仮定し、更にこのスタックがキャッシュメモリにキャッシュされていたと仮定する。そしてあるデータAのプッシュによってキャッシュミスが発生したと仮定する。この条件下では、キャッシュミスが発生したメモリアドレスから1キャッシュ単位分の新しいデータメモリの内容が、主記憶装置からキャッシュメモリに読み込まれる。
(First problem)
For example, assume that a data push on a stack is performed in the direction of increasing memory addresses on the main storage device, and that this stack is cached in a cache memory. It is assumed that a cache miss has occurred due to the push of a certain data A. Under this condition, the contents of the new data memory for one cache unit from the memory address where the cache miss has occurred are read from the main storage device to the cache memory.
この状態を図35に示す。図35はアドレス90のメモリ領域にスタックポインタ913があり、このアドレス90のメモリ領域にデータAがプッシュされた状態を示している。この時、図35に示すようにデータAのプッシュによってスタックポインタ913がアドレス89のメモリ領域からアドレス90のメモリ領域に移動する。
This state is shown in FIG. FIG. 35 shows a state where the stack pointer 913 is located in the memory area at the
そして更に同じ図35に示すようにアドレス90、91、92、93のメモリ領域が1つのキャッシュ単位であり、この1つのキャッシュ単位のアドレス90のメモリ領域が始めてアクセスされたので、このアドレス90、91、92、93のメモリ領域からなる1キャッシュ単位が、主記憶装置からキャッシュメモリに読み込まれる。
Further, as shown in FIG. 35, the memory area of
しかしながらこのキャッシュメモリに読み込まれた1キャッシュ単位分の新しいデータメモリの内容は、スタックアクセスの規則性に従う限り、続けて行われるデータプッシュによって上書きされる内容であり、決して読み出されることのないデータである。そしてこのように決して読み出されることのないデータを、主記憶装置からキャッシュメモリに読み込むことは、高速化を図る上での弊害となっていた。 However, the contents of the new data memory for one cache unit read into this cache memory are contents which are overwritten by successive data pushes and are data which are never read out, as long as the regularity of stack access is followed. is there. Reading data that is never read out from the main storage device into the cache memory as described above has been a problem in increasing the speed.
(第2の問題点)
上記とは逆に、スタックに対するデータポップが、主記憶装置上のメモリアドレスの減少方向に行われたと仮定し、更にこのスタックがキャッシュメモリにキャッシュされていたと仮定する。そしてあるデータBのポップによってキャッシュミスが発生したと仮定する。この条件下では、キャッシュミスが発生したメモリアドレスよりも大きなメモリアドレスから1キャッシュ単位分のデータメモリの内容が、キャッシュメモリから主記憶装置にライトバックされる。
(Second problem)
Conversely, it is assumed that a data pop on the stack has been performed in the direction of decreasing memory addresses on the main memory, and that this stack has been cached in the cache memory. Then, it is assumed that a cache miss has occurred due to a pop of a certain data B. Under this condition, the contents of the data memory for one cache unit are written back from the cache memory to the main storage device from the memory address larger than the memory address where the cache miss has occurred.
この状態を図36に示す。図36に示すようにデータBのポップによってスタックポインタ923がアドレス90のメモリ領域からアドレス89のメモリ領域に移動する。そして更に同じ図36に示すようにアドレス90、91、92、93のメモリ領域が1つのキャッシュ単位であり、この1つのキャッシュ単位以外のアドレス89のメモリ領域にスタックポインタが移動したので、このアドレス90、91、92、93のメモリ領域からなる1キャッシュ単位が、キャッシュメモリから主記憶装置にライトバックされ、キャッシュメモリが開放される。
This state is shown in FIG. As shown in FIG. 36, the stack pointer 923 moves from the memory area at the
しかしながらこの主記憶装置にライトバックされた1キャッシュ単位分のデータメモリの内容は、スタックアクセスの規則性に従う限り、既に行われたデータポップによって読み出された内容であり、決して再び読み出されることは有り得ない。そしてこのように決して読み出されることないデータを、キャッシュメモリから主記憶装置にライトバックすることは、高速化を図る上での弊害となっていた。 However, the contents of the data memory for one cache unit written back to the main memory are the contents read by the already performed data pop, and are never read again, as long as the regularity of the stack access is followed. Impossible. Writing back data that is never read from the cache memory to the main storage device in this way has been a problem in increasing the speed.
(第3の問題点)
また、スタックに対するデータプッシュが、主記憶装置上のメモリアドレスの増加方向に行われたと仮定し、更にこのスタックがキャッシュメモリにキャッシュされていたと仮定する。そしてあるデータC、D、・・、Eのプッシュが連続して実行されたと仮定する。この条件下では、現在スタックに対してプッシュ・ポップを行う領域であるスタックポインタの示すアドレスよりも低いアドレスのメモリ領域に多くのスタックプッシュされたデータ、今の例ではCやDが記憶されており、この低いアドレスのメモリ領域に記憶されたデータは、暫くの間、ポップによって読み出される可能性は非常に低い。
(Third problem)
It is also assumed that the data push to the stack has been performed in the direction of increasing the memory address on the main storage device, and that this stack has been cached in the cache memory. Assume that certain data C, D,..., E are continuously pushed. Under this condition, a lot of data pushed in the stack, that is, C or D in this example, is stored in a memory area at an address lower than the address indicated by the stack pointer, which is an area where a push / pop operation is currently performed on the stack. Therefore, it is very unlikely that the data stored in the memory area of this low address will be read out by pop for a while.
この状態を図37に示す。図37はアドレス194のメモリ領域にスタックポインタ933があり、遥か下の例えばアドレス80のメモリ領域からこのアドレス194のメモリ領域まで、連続してC、D、・・、Eのデータがプッシュされた状態を示している。この時図37に示すように、通常ならばアドレス80からアドレス83までの1つのキャッシュ単位はキャッシュメモリがフルにならない限りキャッシュメモリ領域を占めたままであり、主記憶装置にライトバックされることはない。そしてキャッシュメモリがフルになった時に始めて、主記憶装置にライトバックされ、キャッシュメモリを他のメモリ領域のために明け渡すことになる。
FIG. 37 shows this state. In FIG. 37, there is a stack pointer 933 in the memory area of the
このようにキャッシュメモリがゼロになり、新しいキャッシュメモリ領域に対する要求が発生してからライトバックを行うことは、高速化を図る上での弊害となっていた。 Performing write-back after the cache memory becomes zero and a request for a new cache memory area is generated has been a problem in increasing the speed.
例えば図37に示すように、現在のスタックポインタ933の位置であるアドレス194のメモリ領域よりも遥かに下のメモリ領域、例えばアドレス80〜83のメモリ領域は当分の間、ポップによって読み出される可能性は非常に低い。そこで、特許文献1に開示される従来技術とは異なり、例えばアドレス80〜83のメモリ領域である1つのキャッシュ単位のキャッシュメモリの内容を、予め主記憶装置にライトバックしておくことを、解決手段として想定することができる。それにより、キャッシュメモリの余裕がなくなった段階で慌ててキャッシュメモリの内容を主記憶装置に書き込み、キャッシュメモリに空き領域を作るよりも、メモリアクセス速度が向上することが期待される。
For example, as shown in FIG. 37, a memory area far below the memory area of the
(第4の問題点)
更にまた、スタックに対するデータポップが、主記憶装置上のメモリアドレスの減少方向に行われたと仮定し、更にこのスタックがキャッシュメモリにキャッシュされていたと仮定する。そしてあるデータF、G、・・、Hのポップが連続して実行されたと仮定する。この条件下では、現在スタックに対してプッシュ・ポップを行う領域であるスタックポインタの示すアドレスよりも低い値のアドレス領域、例えば今の例ではアドレス84〜87のメモリ領域にスタックプッシュされているデータは、すぐに続けてポップによって読み出される可能性が非常に高い。
(Fourth problem)
It is further assumed that a data pop on the stack has been performed in the direction of decreasing memory addresses on the main memory, and that the stack has been cached in the cache memory. It is assumed that certain data F, G,..., H are successively popped. Under this condition, data that is currently being pushed in the address area having a value lower than the address indicated by the stack pointer, which is the area where the push / pop operation is performed on the stack, for example, the memory area at
この状態を図38に示す。図38はアドレス91のメモリ領域にスタックポインタ943があり、遥か上の例えばアドレス196のメモリ領域からこのアドレス91のメモリ領域まで、連続してF、G、・・、Hのデータがポップされた状態を示している。この時図38に示すように、通常ならばアドレス84からアドレス87までの1つのキャッシュ単位はこの領域に属する1つのメモリ、例えばアドレス87のメモリ領域がポップの実行によってアクセスされない限り主記憶装置からキャッシュメモリ領域に読み込まれることはない。そして例えばこのアドレス87のメモリ領域がポップの実行によってアクセスされた時に始めて、主記憶装置からキャッシュメモリ上に読み出されることになる。
This state is shown in FIG. In FIG. 38, the stack pointer 943 is located in the memory area at the
このように新しい1つのキャッシュメモリ単位に属する領域が始めてアクセスされ、新しい1つのキャッシュメモリ領域に対するデータの要求が発生した後に、主記憶装置からキャッシュメモリ領域にデータの読み込みを行うことは、高速化を図る上での弊害となっていた。 As described above, the speed of reading data from the main storage device to the cache memory area after the area belonging to one new cache memory unit is accessed for the first time and a data request for the new one cache memory area occurs is increased. Was an adverse effect in achieving
例えば図38に示すように、現在のスタックポインタ943の位置であるアドレス91のメモリ領域のすぐ下のメモリ領域、例えばアドレス84〜87のメモリ領域を占める1つのキャッシュ単位は、すぐに続けてポップによって読み出される可能性が非常に高い。そこで、特許文献1に開示される従来技術とは異なり、例えばこのようなアドレス84〜87のメモリ領域である1つのキャッシュ単位のデータを、予め主記憶装置からキャッシュメモリに読み込んでおくことを、解決手段として想定することができる。それにより、キャッシュメモリ上にないメモリ領域に対するアクセスが行われた段階で慌てて主記憶装置の内容をキャッシュメモリに読み込むよりも、メモリアクセス速度が向上することが期待される。
For example, as shown in FIG. 38, one cache unit occupying the memory area immediately below the memory area at the
本発明は上記の問題点に鑑みてなされたもので、メモリアクセス速度を向上させるデータメモリキャッシュ装置及びデータメモリキャッシュシステムを提供することを目的とする。 The present invention has been made in view of the above problems, and has as its object to provide a data memory cache device and a data memory cache system that improve the memory access speed.
前記課題を解決するため、請求項1に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、データを保持するための複数のデータ領域を有し、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数のデータ領域の各々は複数の小領域に分割されており、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされるデータ保持部と、前記演算ユニットから、前記主記憶装置の連続したアドレスへのデータの書き込みである連続書き込みの要求があり、且つ前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域にキャッシュミスが発生した場合に前記対象データ領域を開放した後に、前記対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域が、アドレスの順序に関して前記連続書き込みの早い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、前記主記憶装置から前記対象データ領域へのデータの読み込みを行わずに前記演算ユニットが出力するデータを前記対象小領域へ書き込み、前記対象小領域が前記データ領域境界に隣接しない場合には、前記主記憶装置から前記対象データ領域へのデータの読み込みを行った上で前記演算ユニットが出力するデータを前記対象小領域へ書き込む制御部とを備えるものである。
In order to solve the above-mentioned problem, an invention according to
請求項1に記載の発明によれば、制御部は、演算ユニットからの連続したアドレスへの連続書き込み時にキャッシュミスが発生した時、書き込みを行うべきデータ領域に対して、当該データ領域の開放後に主記憶装置からの無用なデータの読み込みを行わないので、メモリアクセス速度が向上する。更に、制御部は、書き込みを行うべき小領域がデータ領域境界に隣接するか否かに応じて、開放後のデータ領域にデータの読み込みを略するか否かを選択している。すなわち、制御部は、書き込みを行うべき小領域がデータ領域境界にない場合にキャッシュミスが生じたときには、開放後のデータ領域に主記憶装置からのデータの読み込みを行う。このため、演算ユニットは連続書き込みを、データ領域境界に隣接する小領域に対応するアドレスだけでなく、データ領域境界に隣接しない小領域に対応するアドレスからも開始することができる。 According to the first aspect of the present invention, when a cache miss occurs at the time of continuous writing to consecutive addresses from the arithmetic unit, the control unit sets the data area to be written after releasing the data area. Since unnecessary data is not read from the main storage device, the memory access speed is improved. Further, the control unit selects whether or not to omit reading data from the opened data area according to whether the small area to be written is adjacent to the data area boundary. That is, when a cache miss occurs when the small area to be written is not at the data area boundary, the control unit reads data from the main storage device into the released data area. Therefore, the arithmetic unit can start the continuous writing not only from the address corresponding to the small area adjacent to the data area boundary but also from the address corresponding to the small area not adjacent to the data area boundary.
請求項2に記載の発明は、請求項1記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続書き込みの要求を検出するプッシュアクセス検出部と、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記対象データ領域についてキャッシュミスの有無を判定するキャッシュミス判定部と、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、前記キャッシュミス判定部が前記キャッシュミスの発生を判定した場合に、前記対象データ領域を開放するデータ領域開放部と、前記データ領域開放部が前記対象データ領域を開放した場合に、前記境界判定部の判定が否定的であるときには、前記データ領域開放部が開放した前記対象データ領域へ前記主記憶装置からデータを読み込み、前記境界判定部の判定が肯定的であるときには、前記データ領域開放部が開放した前記対象データ領域へ前記主記憶装置からデータを読み込まないリフィル部と、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記演算ユニットが出力するデータを前記対象小領域に書き込むデータ書き込み部とを備えるものである。
The invention according to
請求項2に記載の発明によれば、プッシュアクセス検出部が連続書き込みの要求を検出し、キャッシュミス判定部が対象データ領域についてキャッシュミスの有無を判定し、境界判定部が、対象小領域がデータ領域境界に隣接するか否かを判定し、データ領域開放部が、キャッシュミス判定部の判定に応じて対象データ領域を開放し、リフィル部が、境界判定部の判定に応じて、開放された対象データ領域へのデータの読み込みを行い、データ書き込み部が対象小領域に演算ユニットからのデータを書き込む。このため、制御部は、データの書き込みを行うべき小領域がデータ領域境界に隣接するか否かに応じて開放後のデータ領域にデータの読み込みを略する処理を、容易に実現し得る。 According to the second aspect of the present invention, the push access detection unit detects a continuous write request, the cache miss determination unit determines whether there is a cache miss in the target data area, and the boundary determination unit determines that the target small area is The data area release unit determines whether or not it is adjacent to the data area boundary, the data area release unit releases the target data area according to the determination of the cache miss determination unit, and the refill unit is released according to the determination of the boundary determination unit. The data is read into the target data area, and the data writing unit writes data from the arithmetic unit into the target small area. For this reason, the control unit can easily realize a process of omitting the reading of data from the opened data area according to whether the small area to which data is to be written is adjacent to the data area boundary.
請求項3に記載の発明は、請求項2記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、前記リフィル部は、前記対象データ領域に対応する適正フラグが開放を示す側に設定されている場合にも、前記境界判定部の判定が否定的であるときには、前記対象データ領域へ前記主記憶装置からデータを読み込み、前記境界判定部の判定が肯定的であるときには、前記対象データ領域へ前記主記憶装置からデータを読み込まないものである。 According to a third aspect of the present invention, in the data memory cache device according to the second aspect, the data holding unit holds a plurality of appropriate flags respectively indicating release or non-release of the plurality of data areas. The refill unit further includes an appropriate flag holding unit, and the refill unit is configured such that, even when the appropriate flag corresponding to the target data area is set to a side indicating open, when the determination of the boundary determining unit is negative, Data is read from the main storage device into the target data area, and when the determination by the boundary determination unit is affirmative, data is not read from the main storage device into the target data area.
請求項3に記載の発明によれば、データ保持部が適正フラグ保持部を備え、リフィル部が、対象データ領域が開放された場合だけでなく、対象データ領域に対応する適正フラグが対象データ領域の開放を示す場合にも、対象小領域の位置に応じて、主記憶装置から対象データ領域へのデータの読み込みを行うか否かを選択する。このため、対象データ領域が開放されている場合にも、無用な読み込みが回避され、それによってメモリアクセス速度が更に向上する。またリフィル部は、対象小領域がデータ領域境界に隣接しないときには、主記憶装置から対象データ領域へのデータの読み込みを行うので、演算ユニットは連続書き込みを、データ領域境界に隣接する小領域に対応するアドレスだけでなく、データ領域境界に隣接しない小領域に対応するアドレスからも開始することができる。 According to the third aspect of the present invention, the data holding unit includes the appropriate flag holding unit, and the refill unit sets the appropriate flag corresponding to the target data area not only when the target data area is opened, but also when the target data area is opened. Also indicates whether data is to be read from the main storage device to the target data area according to the position of the target small area. For this reason, even when the target data area is open, unnecessary reading is avoided, thereby further improving the memory access speed. When the target small area is not adjacent to the data area boundary, the refill unit reads data from the main storage device to the target data area, so that the arithmetic unit performs continuous writing on the small area adjacent to the data area boundary. It is possible to start from an address corresponding to a small area which is not adjacent to the data area boundary as well as an address to be assigned.
請求項4に記載の発明は、請求項2又は3記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、前記制御部は、前記境界判定部の判定が肯定的である場合には、前記データ書き込み部が前記データの書き込みを終了した後に、前記対象データ領域に対応するスタックフラグを肯定側に設定し、前記境界判定部の判定が否定的である場合には、前記データ書き込み部が前記データの書き込みを終了した後に、前記対象データ領域に対応するスタックフラグを変更しないスタックフラグ設定部を更に備えるものである。
The invention according to
請求項4に記載の発明によれば、データ保持部がスタックフラグ保持部を備え、制御部が、データの書き込み後に対象小領域の位置に応じてスタックフラグを操作するスタックフラグ設定部を備える。このため制御部が、連続書き込みの過程で、書き込みが終了したデータ領域のデータを、キャッシュミスの発生により当該データ領域を開放するのに先だって、データバスの不使用期間を利用して主記憶装置へ予め書き戻す構成を採る場合に、スタックフラグを利用することにより、スタックに割り付けられていないデータ領域のデータについて無用な書き戻しを行うこと回避することができる。更に、制御部が、連続読み出しの過程で読み出し前のデータ領域へ主記憶装置からデータを予め読み込む構成を採る場合においても、スタックフラグを利用することにより、スタックに割り付けられていないデータ領域のデータについて無用な読み込みを行うことを回避することができる。
According to the invention described in
請求項5に記載の発明は、請求項2乃至4の何れかに記載のデータメモリキャッシュ装置であって、前記複数のデータ領域は前記主記憶装置のアドレスの中位部分に対応づけられており、前記複数の小領域の各々が前記主記憶装置のアドレスの下位部分に対応づけられており、前記主記憶装置のアドレスの前記中位部分の同一の値に1以上のデータ領域が対応しており、前記データ保持部は、前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、前記制御部は、前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位側部分とを抽出するアドレス抽出部を更に備え、前記キャッシュミス判定部は、前記アドレス抽出部が抽出した前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記アドレス抽出部が抽出した前記上位部分とを比較し、何れも一致しない場合に前記キャッシュミスが発生したと判定し、前記境界判定部は、前記複数の小領域のうち前記アドレス抽出部が抽出した前記下位部分に対応する小領域が、アドレスの順序に関して当該小領域が属するデータ領域の前記連続書き込みの早い方向に位置する境界に隣接するか否かを判定することにより、前記対象小領域が前記データ領域境界に隣接するか否かを判定し、前記データ領域開放部は、前記プッシュアクセス検出部が前記連続書き込みの要求を検出し、且つ前記キャッシュミス判定部が前記キャッシュミスの発生を判定した場合に、前記アドレス抽出部が抽出した前記中位部分に対応する前記1以上のデータ領域の何れかを開放することにより前記対象データ領域を開放し、前記制御部は、前記データ領域開放部が開放した前記データ領域に対応づけられたタグを、前記アドレス抽出部が抽出した前記上位部分に更新するタグ更新部を更に備え、前記データ書き込み部は、前記アドレス抽出部が抽出した前記中位部分に対応し且つ前記アドレス抽出部が抽出した前記上位部分を保持するタグに対応づけられたデータ領域中の前記アドレス抽出部が抽出した前記下位部分に対応する小領域を前記対象小領域として、当該対象小領域へ前記演算ユニットが出力するデータを書き込むものである。
The invention according to claim 5 is the data memory cache device according to any one of
請求項5に記載の発明によれば、データ保持部が複数のタグ保持部を備え、アドレス抽出部が演算ユニットが出力したアドレスから各アドレス部分を抽出し、キャッシュミス判定部が、アドレス抽出部が抽出したアドレス部分とデータ領域に対応づけられたタグとに基づいてキャッシュミスの判定を行い、境界判定部が、抽出されたアドレス部分に基づいて対象小領域がデータ領域境界に隣接するか否かを判定し、データ領域開放部はアドレス抽出部が抽出したアドレス部分に基づいてデータ領域の開放を行い、タグ更新部が開放後のデータ領域に対応付けられたタグを更新し、データ書き込み部が、アドレス抽出部が抽出したアドレス部分とタグとに基づいて、演算ユニットが出力するデータの書き込みを行う。このため制御部は、書き込みを行うべき小領域がデータ領域境界に隣接するか否かに応じて開放後のデータ領域にデータの読み込みを略する処理、及びデータの書き込み処理を、更に容易且つ適切に実現し得る。 According to the fifth aspect of the present invention, the data holding unit includes a plurality of tag holding units, the address extraction unit extracts each address portion from the address output by the arithmetic unit, and the cache miss determination unit sets the address extraction unit. Performs a cache miss determination based on the extracted address part and the tag associated with the data area, and determines whether the target small area is adjacent to the data area boundary based on the extracted address part. The data area release unit performs release of the data area based on the address portion extracted by the address extraction unit, the tag update unit updates the tag associated with the released data area, and the data write unit Performs writing of data output by the arithmetic unit based on the address portion and the tag extracted by the address extracting unit. For this reason, the control unit further easily and appropriately performs the process of omitting the reading of data into the released data area and the data writing process according to whether the small area to be written is adjacent to the data area boundary. Can be realized.
なお、本発明において主記憶装置のアドレスの下位部分とは、実施の形態において各小領域がアドレスの最下位桁から第1及び第2桁を除いた第3及び第4桁に対応する例を示すように、中位部分の下位側に隣接する部分であって、必ずしも最下位までを含まなくてもよい。 In the present invention, the lower part of the address of the main storage device refers to an example in which each small area corresponds to the third and fourth digits excluding the first and second digits from the least significant digit of the address in the embodiment. As shown, it is a part adjacent to the lower side of the middle part, and does not necessarily have to include the lowest part.
請求項6に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを行う場合に、前記データ保持部のうち前記連続読み出しが終了しているデータ領域を、前記連続読み出しが終了しているデータ領域が保持するデータを前記主記憶装置へ書き戻すことなく開放する制御部とを備えるものである。 According to a sixth aspect of the present invention, there is provided a data memory cache device for use by interposing between an arithmetic unit and a main storage device accessed by the arithmetic unit, wherein the data memory cache device is associated with an address of the main storage device. A data holding unit having a plurality of data areas for holding data of addresses to be read, and a data holding unit for performing continuous reading, that is, reading data from a continuous address of the main storage device to the arithmetic unit. And a controller that releases the data area in which the continuous reading has been completed without writing back the data held in the data area in which the continuous reading has been completed to the main storage device.
請求項6に記載の発明によれば、制御部は、演算ユニットによる連続したアドレスからの連続読み出し時に、読み出しが行われたデータ領域を、当該データ領域が保持するデータを主記憶装置へ書き戻すことなく開放する。連続読み出しによってもはや再度読み出すことのないデータを保持するデータ領域は、開放しても支障のないものであり、且つ当該データ領域が保持するデータは無用なデータである以上、主記憶装置へ書き戻す必要もないものである。このように制御部は、無用なデータを保持するデータ領域をデータの書き戻しなしで開放するので、演算ユニットの動作に支障をもたらすことなく、メモリアクセス速度を向上させる。
According to the invention described in
請求項7に記載の発明は、請求項6記載のデータメモリキャッシュ装置であって、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数のデータ領域の各々は複数の小領域に分割されており、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、前記制御部は、前記演算ユニットから、前記主記憶装置の連続したアドレスからのデータの読み出しである連続読み出しの要求があった場合に、前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域から前記演算ユニットへのデータの読み出しを行うとともに、前記対象小領域が、アドレスの順序に関して前記連続読み出しの遅い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、前記対象データ領域から前記主記憶装置へのデータの書き戻しを行うことなく前記対象データ領域を開放し、前記対象小領域が前記データ領域境界に隣接しない場合には、前記対象データ領域を開放しないものである。 According to a seventh aspect of the present invention, in the data memory cache device according to the sixth aspect, data held in each of the plurality of data areas is read and written to the main storage device at a time, and the plurality of data Each of the areas is divided into a plurality of small areas, data held by each of the plurality of small areas is read and written to the arithmetic unit at a time, and the control unit reads the main memory from the arithmetic unit. When there is a request for continuous reading, which is the reading of data from consecutive addresses of the device, the address output by the arithmetic unit in the target data area, which is a data area corresponding to the address output by the arithmetic unit, Data is read out from the corresponding small area, the target small area, to the arithmetic unit, and the target small area is read in the address order. When adjacent to a data area boundary that is a boundary of the target data area located in the slower direction of the continuous reading, the target data is written back from the target data area to the main storage device without being written back. When the area is released and the target small area is not adjacent to the data area boundary, the target data area is not released.
請求項7に記載の発明によれば、制御部は、読み出しの対象である小領域がデータ領域境界に隣接するか否かに応じて、対象データ領域の開放を行うか否かを選択する。すなわち、制御部は、読み出しの対象である小領域がデータ領域境界にある場合には、対象データ領域の開放を行い、データ領域境界にない場合には開放を行わない。このため、演算ユニットは連続読み出しを、データ領域境界に隣接する小領域に対応するアドレスだけでなく、データ領域境界に隣接しない小領域に対応するアドレスで終了させることができる。
According to the invention described in
請求項8に記載の発明は、請求項7記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、前記制御部は、前記対象データ領域に対応づけられた適正フラグを、開放を示す側に設定することにより、前記対象データ領域を開放するものである。
The invention according to
請求項8に記載の発明によれば、制御部は適正フラグを所定側に設定することにより、対象データ領域の開放を行うので、対象データ領域の開放を容易に行うことができる。
According to the invention described in
請求項9に記載の発明は、請求項8記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域のデータを前記演算ユニットへ読み出すデータ読み出し部と、前記境界判定部の判定が肯定的であるときには、前記データ読み出し部による前記データの読み出し後に、前記対象データ領域から前記主記憶装置へのデータの書き戻しを行うことなく前記対象データ領域に対応づけられた前記適正フラグを、開放を示す側に設定し、前記対象小領域が前記データ領域境界に隣接しない場合には、前記対象データ領域に対応づけられた前記適正フラグを変更しない適正フラグ設定部とを備えるものである。 According to a ninth aspect of the present invention, in the data memory cache device according to the eighth aspect, the control unit detects a pop access detection unit that detects the continuous read request from the arithmetic unit, and the pop access detection unit detects the pop access detection unit. When the unit detects the request for continuous reading, a boundary determination unit that determines whether the target small area is adjacent to the data area boundary, and the pop access detection unit detects the request for continuous reading. In the case, the data read unit that reads the data of the target small area to the arithmetic unit, and when the determination by the boundary determination unit is affirmative, after the data is read by the data read unit, the data is read from the target data area. Release the appropriate flag associated with the target data area without writing back data to the main storage device. Set to the side, if the target small area is not adjacent to the data area boundary is one and a proper flag setting unit is not changed the appropriate flag associated with the said target data area.
請求項9に記載の発明によれば、ポップアクセス検出部が連続読み出しの要求を検出し、境界判定部が、対象小領域がデータ領域境界に隣接するか否かを判定し、データ読み出し部が対象小領域のデータを演算ユニットへ読み出し、適正フラグ設定部が、境界判定部の判定に応じて適正フラグの設定を行う。このため制御部は、読み出しの対象である小領域がデータ領域境界に隣接するか否かに応じて、対象データ領域を開放する処理を、容易に実現し得る。 According to the ninth aspect of the present invention, the pop access detecting section detects a request for continuous reading, the boundary determining section determines whether or not the target small area is adjacent to the data area boundary, and the data reading section determines The data of the target small area is read out to the arithmetic unit, and the appropriate flag setting unit sets the appropriate flag according to the determination by the boundary determining unit. For this reason, the control unit can easily realize the process of opening the target data area according to whether the small area to be read is adjacent to the data area boundary.
請求項10に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、データを保持するための複数のデータ領域を有し、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数のデータ領域の各々は複数の小領域に分割されており、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされるデータ保持部と、前記演算ユニットから、前記主記憶装置の連続したアドレスからのデータの読み出しである連続読み出しの要求があった場合に、前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域から前記演算ユニットへのデータの読み出しを行うとともに、前記対象小領域が、アドレスの順序に関して前記連続読み出しの遅い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、その後前記対象データ領域を開放する時に前記対象データ領域から前記主記憶装置へのデータの書き戻しを禁止するための設定を行い、前記対象小領域が前記データ領域境界に隣接しない場合には、前記設定を行わない制御部とを備えるものである。 According to a tenth aspect of the present invention, there is provided a data memory cache device for use by interposing between an arithmetic unit and a main storage device accessed by the arithmetic unit, and having a plurality of data areas for holding data. The data held in each of the plurality of data areas is read and written to the main storage device at a time, and each of the plurality of data areas is divided into a plurality of small areas. The data held by each of the arithmetic units is a data holding unit that is temporarily read and written to the arithmetic unit, and the arithmetic unit has a continuous read request for reading data from consecutive addresses in the main storage device. The address output by the arithmetic unit in a target data area that is a data area corresponding to the address output by the arithmetic unit; Data is read from the target small area, which is the corresponding small area, to the arithmetic unit, and the target small area is a boundary of the target data area located in the slower direction of the continuous reading with respect to the address order. When the target data area is adjacent to the area boundary, a setting is made to prohibit data write-back from the target data area to the main storage device when the target data area is released, and the target small area is set in the data area. And a control unit that does not perform the setting when it is not adjacent to the boundary.
請求項10に記載の発明によれば、制御部は、演算ユニットによる連続したアドレスからの連続読み出し時に、読み出しが行われたデータ領域に対して、当該データ領域の開放に伴う主記憶装置へのデータの書き戻しを禁止するための設定を行うので、メモリアクセス速度が向上する。更に、制御部は、読み出しの対象である小領域がデータ領域境界に隣接するか否かに応じて、書き戻しを禁止する設定を行うか否かを選択している。すなわち、制御部は、読み出しの対象である小領域がデータ領域境界にある場合には、書き戻しを禁止する設定を行い、データ領域境界にない場合には設定を行わない。このため、演算ユニットは連続読み出しを、データ領域境界に隣接する小領域に対応するアドレスだけでなく、データ領域境界に隣接しない小領域に対応するアドレスで終了させることができる。 According to the tenth aspect of the present invention, when the arithmetic unit reads the data area continuously from the consecutive addresses, the control unit sends the read data area to the main storage device when the data area is opened. Since the setting for prohibiting data write-back is performed, the memory access speed is improved. Further, the control unit selects whether or not to perform a setting to prohibit write-back according to whether or not the small area to be read is adjacent to the data area boundary. That is, when the small area to be read is at the data area boundary, the control unit performs the setting to prohibit the write-back, and does not perform the setting when it is not at the data area boundary. For this reason, the arithmetic unit can end the continuous reading not only at the address corresponding to the small area adjacent to the data area boundary but also at the address corresponding to the small area not adjacent to the data area boundary.
請求項11に記載の発明は、請求項10記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域が保持するデータと前記主記憶装置が対応するアドレスに保持するデータとの間の一致及び不一致をそれぞれ示す複数のダーティフラグを保持する複数のダーティフラグ保持部を更に備え、前記制御部は、前記対象データ領域に対応するダーティフラグを前記一致を示す側に設定することにより前記設定を行うものである。
The data memory cache device according to
請求項11に記載の発明によれば、データ保持部がダーティフラグ保持部を備え、制御部が、ダーティフラグを所定側に設定することにより、書き戻しを禁止するための設定を行う。このため制御部は、書き戻しを禁止するための設定を容易に行うことができる。 According to the eleventh aspect, the data holding unit includes the dirty flag holding unit, and the control unit sets the dirty flag to a predetermined side, thereby performing a setting for prohibiting write-back. For this reason, the control unit can easily perform setting for prohibiting write-back.
請求項12に記載の発明は、請求項11記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域のデータを前記演算ユニットへ読み出すデータ読み出し部と、前記境界判定部の判定が肯定的であるときには、前記データ読み出し部による前記データの読み出し後に、前記対象データ領域に対応する前記ダーティフラグを前記一致を示す側に設定し、前記データ領域境界判定部の判定が否定的であるときには、前記対象データ領域に対応する前記ダーティフラグを変更しないダーティフラグ設定部とを備えるものである。 According to a twelfth aspect of the present invention, in the data memory cache device according to the eleventh aspect, the control unit detects a pop access detection unit that detects the continuous read request from the arithmetic unit, and the pop access detection unit When the unit detects the request for continuous reading, a boundary determination unit that determines whether the target small area is adjacent to the data area boundary, and the pop access detection unit detects the request for continuous reading. In the case, when the data reading unit that reads the data of the target small area to the arithmetic unit and the boundary determination unit determines that the data is read by the data reading unit, the data reading unit corresponds to the target data area. The dirty flag is set to the side indicating the match, and when the determination of the data area boundary determination unit is negative, , In which and a dirty flag setting unit is not changed the dirty flag corresponding to the target data area.
請求項12に記載の発明によれば、ポップアクセス検出部が連続読み出しの要求を検出し、境界判定部が、対象小領域がデータ領域境界に隣接するか否かを判定し、データ読み出し部が対象小領域のデータを演算ユニットへ読み出し、ダーティフラグ設定部が、境界判定部の判定に応じてダーティフラグの設定を行う。このため制御部は、読み出しの対象である小領域がデータ領域境界に隣接するか否かに応じて書き戻しの禁止を設定する処理を、容易に実現し得る。 According to the twelfth aspect of the present invention, the pop access detecting section detects a request for continuous reading, the boundary determining section determines whether or not the target small area is adjacent to the data area boundary, and the data reading section determines The data of the target small area is read out to the arithmetic unit, and the dirty flag setting unit sets the dirty flag according to the determination of the boundary determining unit. For this reason, the control unit can easily realize the process of setting the prohibition of the write-back in accordance with whether the small area to be read is adjacent to the data area boundary.
請求項13に記載の発明は、請求項9又は12記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、前記制御部は、前記境界判定部の判定が肯定的である場合には、前記データ読み出し部が前記データの読み出しを終了した後に、前記対象データ領域に対応するスタックフラグを肯定側に設定し、前記境界判定部の判定が否定的である場合には、前記データ読み出し部が前記データの読み出しを終了した後に、前記対象データ領域に対応するスタックフラグを変更しないスタックフラグ設定部を更に備えるものである。 According to a thirteenth aspect of the present invention, in the data memory cache device according to the ninth or twelfth aspect, the data holding unit determines whether the plurality of data areas are used for either continuous writing or continuous reading. A plurality of stack flag holding units each holding a plurality of stack flags respectively indicating the plurality of stack flags, wherein the control unit controls the data read unit to read the data when the determination by the boundary determination unit is affirmative. After the end, the stack flag corresponding to the target data area is set to the positive side, and if the determination by the boundary determination unit is negative, after the data reading unit finishes reading the data, A stack flag setting unit that does not change the stack flag corresponding to the target data area is further provided.
請求項13に記載の発明によれば、データ保持部がスタックフラグ保持部を備え、制御部が、データの読み出し後に対象小領域の位置に応じてスタックフラグを操作するスタックフラグ設定部を備える。このため制御部が、連続読み出しの過程で、読み出しが終了したデータ領域のデータを、キャッシュミスの発生により当該データ領域を開放するのに先立って、データバスの不使用期間を利用して主記憶装置へ予め書き戻す構成を採る場合に、スタックフラグを利用することにより、スタックに割り付けられていないデータ領域のデータについて無用な書き戻しを行うこと回避することができる。 According to the thirteenth aspect, the data holding unit includes the stack flag holding unit, and the control unit includes the stack flag setting unit that operates the stack flag according to the position of the target small area after reading the data. Therefore, the control unit uses the non-use period of the data bus to store the data in the data area from which data has been read out in the course of continuous reading, before releasing the data area due to a cache miss. In the case of employing a configuration in which data is written back to the device in advance, by using a stack flag, it is possible to avoid unnecessary use of data in a data area not allocated to the stack.
請求項14に記載の発明は、請求項9、12又は13記載のデータメモリキャッシュ装置であって、前記複数のデータ領域は前記主記憶装置のアドレスの中位部分に対応づけられており、前記複数の小領域の各々が前記主記憶装置のアドレスの下位部分に対応づけられており、前記主記憶装置のアドレスの前記中位部分の同一の値に1以上のデータ領域が対応しており、前記データ保持部は、前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、前記制御部は、前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、前記境界判定部は、前記複数の小領域のうち前記アドレス抽出部が抽出した前記下位部分に対応する小領域が、アドレスの順序に関して当該小領域が属するデータ領域の前記連続読み出しの遅い方向に位置する境界に隣接するか否かを判定することにより、前記対象小領域が前記データ領域境界に隣接するか否かを判定し、前記データ読み出し部は、前記アドレス抽出部が抽出した前記中位部分に対応し且つ前記アドレス抽出部が抽出した前記上位部分を示すタグに対応づけられたデータ領域中の前記アドレス抽出部が抽出した前記下位部分に対応する小領域を前記対象小領域として、当該対象小領域のデータを前記演算ユニットへ読み出すものである。
The invention according to
請求項14に記載の発明によれば、データ保持部が複数のタグ保持部を備え、アドレス抽出部が演算ユニットが出力したアドレスから各アドレス部分を抽出し、境界判定部が、抽出されたアドレス部分に基づいて対象小領域がデータ領域境界に隣接するか否かを判定し、データ読み出し部が、アドレス抽出部が抽出したアドレス部分とタグとに基づいて、演算ユニットへのデータの読み出しを行う。このため制御部は、連続読み出しが終了した無用なデータ領域の書き戻しなしでの開放、又は当該無用なデータ領域の開放に伴う書き戻しの禁止の設定を、更に容易に実現し得る。
According to the invention described in
請求項15に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、前記演算ユニットから、前記主記憶装置の連続したアドレスへのデータの書き込みである連続書き込みを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続書き込みよりも連続書き込みの早い方向に位置する前記データ保持部中のデータ領域から前記主記憶装置へのデータの書き戻しを行う制御部とを備えるものである。
An invention according to
請求項15に記載の発明によれば、制御部が、連続書き込みを実行する期間に、アドレスの順序に関して現在行っている連続書き込みよりも連続書き込みの早い方向に位置するデータ領域のデータを、当該データ領域が開放される前にデータバスの不使用期間(すなわち空き時間)を利用して主記憶装置へ予め書き戻す。それにより制御部は、連続書き込みを終了している可能性が高く、従って直ちに読み出しが行われる可能性の低いデータ領域を後に開放する時に、書き戻しを行う必要がないので、メモリアクセス速度が向上する。
According to the invention described in
請求項16に記載の発明は、請求項15記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続書き込みの要求を検出するプッシュアクセス検出部と、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続書き込みの早い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、前記オフセットアドレスについてキャッシュミスの有無を判定するキャッシュミス判定部と、前記データバスが使用中であるか否かを判定する転送ビジー判定部と、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うライトバック部とを備えるものである。
The invention according to claim 16 is the data memory cache device according to
請求項16に記載の発明によれば、プッシュアクセス検出部が連続書き込みの要求を検出し、オフセット算出部がオフセットアドレスを算出し、キャッシュミス判定部がオフセットアドレスについてキャッシュミスの有無を判定し、転送ビジー判定部が、データバスが使用中であるか否かを判定し、ライトバック部が、キャッシュミス判定部の判定と転送ビジー判定部の判定とに応じて、オフセットアドレスに対応するデータ領域から主記憶装置へのデータの書き戻しを行う。このため制御部は、連続書き込みが終了したデータ領域である可能性の高いデータ領域のデータを、当該データ領域が開放される前にデータバスの不使用期間を利用して主記憶装置へ予め書き戻す処理を、容易にかつ適切に実現し得る。 According to the invention of claim 16, the push access detection unit detects a request for continuous writing, the offset calculation unit calculates an offset address, the cache miss determination unit determines whether or not a cache miss has occurred for the offset address, A transfer busy determining unit determines whether or not the data bus is in use, and a write-back unit determines a data area corresponding to the offset address according to the determination of the cache miss determining unit and the determination of the transfer busy determining unit. Writes data back to the main storage device. Therefore, the control unit writes the data in the data area which is likely to be the data area for which the continuous writing has been completed to the main storage device using the unused period of the data bus before the data area is released. The returning process can be easily and appropriately realized.
請求項17に記載の発明は、請求項16記載のデータメモリキャッシュ装置であって、前記複数のデータ領域は、前記主記憶装置のアドレスの中位部分に対応づけられており、且つ前記中位部分の同一の値に1以上のデータ領域が対応しており、前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、前記データ保持部は、前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、前記制御部は、前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、前記オフセット算出部は、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続書き込みの早い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出し、前記キャッシュミス判定部は、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合にキャッシュミスが発生したと判定するものである。 The invention according to claim 17 is the data memory cache device according to claim 16, wherein the plurality of data areas are associated with a middle part of an address of the main storage device, and One or more data areas correspond to the same value of the portion, and each of the plurality of data areas is divided into a plurality of small areas associated with the lower part of the address. The data held in each of the areas is temporarily read and written to the main storage device, the data held in each of the plurality of small areas is temporarily read and written to the arithmetic unit, and the data holding unit includes: The image processing apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas, wherein the control unit outputs the arithmetic unit. An address extracting unit that extracts the upper part, the middle part, and the lower part from the dress, wherein the offset calculating unit detects the address when the push access detecting unit detects the request for continuous writing. An address deviated from the address represented by the middle part and the high part extracted by the extraction unit at a predetermined interval in the direction of the continuous writing earlier is calculated as the offset address, and the cache miss determination unit is Comparing the value indicated by the tag associated with each of the one or more data areas corresponding to the middle part of the offset address with the upper part of the offset address, and if none of the values match, a cache miss occurs. Is determined to have occurred.
請求項17に記載の発明によれば、データ保持部が複数のタグ保持部を備え、アドレス抽出部が演算ユニットが出力したアドレスから各アドレス部分を抽出し、オフセット算出部が、アドレス抽出部が抽出したアドレス部分に基づいてオフセットアドレスを算出し、キャッシュミス判定部が、アドレス抽出部が抽出したアドレス部分とデータ領域に対応づけられたタグとに基づいてキャッシュミスの判定を行う。このため制御部は、オフセットアドレスの算出及びキャッシュミスの判定を容易に行うことができる。 According to the invention described in claim 17, the data holding unit includes a plurality of tag holding units, the address extraction unit extracts each address portion from the address output by the operation unit, and the offset calculation unit sets the address extraction unit. An offset address is calculated based on the extracted address portion, and the cache miss determining unit determines a cache miss based on the address portion extracted by the address extracting unit and the tag associated with the data area. Therefore, the control unit can easily calculate the offset address and determine the cache miss.
請求項18に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続読み出しよりも連続読み出しの早い方向に位置する前記データ保持部中のデータ領域から前記主記憶装置へデータの書き戻しを行う制御部とを備えるものである。 An invention according to claim 18 is a data memory cache device for use interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit, wherein the data memory cache device is associated with an address of the main storage device. A data holding unit including a plurality of data areas for holding data of addresses to be read, and a period during which continuous reading of reading data from a continuous address of the main storage device to the arithmetic unit is performed, and During a period in which a data bus for transferring data between the data holding unit and the main storage device is not used, the address sequence is located in a direction in which continuous reading is earlier than continuous reading which is currently being performed. A control unit for writing back data from the data area in the data holding unit to the main storage device.
請求項18に記載の発明によれば、制御部が、連続読み出しを実行する期間に、アドレスの順序に関して現在行っている連続読み出しよりも連続読み出しの早い方向に位置するデータ領域のデータを、当該データ領域が開放される前にデータバスの不使用期間(すなわち空き時間)を利用して主記憶装置へ予め書き戻す。それにより制御部は、連続読み出しを終了している可能性が高く、従って再び読み出しが行われる可能性の低いデータ領域を後に開放する時に、書き戻しを行う必要がないので、メモリアクセス速度が向上する。 According to the invention described in claim 18, the controller reads the data in the data area positioned in the direction of the continuous reading earlier than the current continuous reading with respect to the address order during the period of performing the continuous reading. Before the data area is released, the data is written back to the main storage device in advance using the non-use period of the data bus (that is, free time). This increases the memory access speed because the control unit does not need to perform write-back when releasing the data area that is likely to have completed the continuous read operation and is therefore unlikely to be read again later. I do.
請求項19に記載の発明は、請求項18記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続読み出しの早い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、前記オフセットアドレスについてキャッシュミスの有無を判定するキャッシュミス判定部と、前記データバスが使用中であるか否かを判定する転送ビジー判定部と、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うライトバック部とを備えるものである。 The invention according to claim 19 is the data memory cache device according to claim 18, wherein the control unit detects a pop access detection unit that detects the continuous read request from the arithmetic unit, and the pop access detection unit detects the pop access detection. An offset calculating unit that calculates an offset address that is an address shifted from the address output by the arithmetic unit at a predetermined interval in a direction in which the continuous reading is performed, when the unit detects the request for the continuous reading, A cache miss determining unit for determining whether there is a cache miss, a transfer busy determining unit for determining whether the data bus is in use, and the cache miss determining unit determining that there is no cache miss, and If the busy determination unit determines that the data bus is not used, the From the data area corresponding to Ttoadoresu those and a write back unit which performs write back of data to the main storage device.
請求項19に記載の発明によれば、ポップアクセス検出部が連続読み出しの要求を検出し、オフセット算出部がオフセットアドレスを算出し、キャッシュミス判定部がオフセットアドレスについてキャッシュミスの有無を判定し、転送ビジー判定部が、データバスが使用中であるか否かを判定し、ライトバック部が、キャッシュミス判定部の判定と転送ビジー判定部の判定とに応じて、オフセットアドレスに対応するデータ領域から主記憶装置へのデータの書き戻しを行う。このため制御部は、連続読み出しが終了したデータ領域である可能性の高いデータ領域のデータを、当該データ領域が開放される前にデータバスの不使用期間を利用して主記憶装置へ予め書き戻す処理を、容易にかつ適切に実現し得る。 According to the invention of claim 19, the pop access detection unit detects a request for continuous reading, the offset calculation unit calculates an offset address, the cache miss determination unit determines whether or not a cache miss has occurred for the offset address, A transfer busy determining unit determines whether or not the data bus is in use, and a write-back unit determines a data area corresponding to the offset address according to the determination of the cache miss determining unit and the determination of the transfer busy determining unit. Writes data back to the main storage device. Therefore, the control unit writes the data in the data area which is likely to be the data area for which continuous reading has been completed to the main storage device in advance using the unused period of the data bus before the data area is released. The returning process can be easily and appropriately realized.
請求項20に記載の発明は、請求項19記載のデータメモリキャッシュ装置であって、前記複数のデータ領域は、前記主記憶装置のアドレスの中位部分に対応づけられており、且つ前記中位部分の同一の値に1以上のデータ領域が対応しており、前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、前記データ保持部は、前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、前記制御部は、前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、前記オフセット算出部は、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続読み出しの早い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出し、前記キャッシュミス判定部は、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合にキャッシュミスが発生したと判定するものである。 The invention according to claim 20 is the data memory cache device according to claim 19, wherein the plurality of data areas are associated with a middle part of an address of the main storage device, and One or more data areas correspond to the same value of the portion, and each of the plurality of data areas is divided into a plurality of small areas associated with the lower part of the address. The data held in each of the areas is temporarily read and written to the main storage device, the data held in each of the plurality of small areas is temporarily read and written to the arithmetic unit, and the data holding unit includes: The image processing apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas, wherein the control unit outputs the arithmetic unit. An address extracting unit that extracts the upper part, the middle part, and the lower part from the dress, wherein the offset calculating unit detects the address when the pop access detecting unit detects the continuous read request. An address deviated from the address represented by the middle part and the high part extracted by the extraction unit at a predetermined interval in the direction in which the continuous reading is performed earlier is calculated as the offset address, and the cache miss determination unit calculates Comparing the value indicated by the tag associated with each of the one or more data areas corresponding to the middle part of the offset address with the upper part of the offset address, and if none of the values match, a cache miss occurs. Is determined to have occurred.
請求項20に記載の発明によれば、データ保持部が複数のタグ保持部を備え、アドレス抽出部が演算ユニットが出力したアドレスから各アドレス部分を抽出し、オフセット算出部が、アドレス抽出部が抽出したアドレス部分に基づいてオフセットアドレスを算出し、キャッシュミス判定部が、アドレス抽出部が抽出したアドレス部分とデータ領域に対応づけられたタグとに基づいてキャッシュミスの判定を行う。このため制御部は、オフセットアドレスの算出及びキャッシュミスの判定を容易に行うことができる。 According to the twentieth aspect, the data holding unit includes a plurality of tag holding units, the address extracting unit extracts each address portion from the address output by the arithmetic unit, and the offset calculating unit sets the address extracting unit. An offset address is calculated based on the extracted address portion, and the cache miss determining unit determines a cache miss based on the address portion extracted by the address extracting unit and the tag associated with the data area. Therefore, the control unit can easily calculate the offset address and determine the cache miss.
請求項21に記載の発明は、請求項16、17、19又は20記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、前記ライトバック部は、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、更に前記オフセットアドレスに対応するデータ領域に対応する前記スタックフラグが肯定側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うものである。
The invention according to
請求項21に記載の発明によれば、データ保持部がスタックフラグ保持部を備え、ライトバック部は、スタックフラグをも参照して、データの書き戻しを行うか否かを選択する。それにより、ライトバック部は、連続書き込み以外の書き込みのあったデータ領域、或いは連続読み出し以外の読み出しのあったデータ領域について、無用な書き戻しを行うことを回避することができる。 According to the twenty-first aspect, the data holding unit includes the stack flag holding unit, and the write-back unit also selects whether or not to perform data write-back with reference to the stack flag. Thereby, the write-back unit can avoid performing useless write-back on a data area where data other than continuous writing has been written or a data area where data has been read other than continuous reading.
請求項22に記載の発明は、請求項16、17、19、20又は21記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、前記ライトバック部は、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、更に前記オフセットアドレスに対応するデータ領域に対応する前記適正フラグが未開放を示す側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うものである。
The invention according to
請求項22に記載の発明によれば、データ保持部が適正フラグ保持部を備え、ライトバック部は、適正フラグをも参照して、データの書き戻しを行うか否かを選択する。それにより、ライトバック部は、既に開放されているデータ領域について無用な書き戻しを行うことを回避することができる。 According to the twenty-second aspect, the data holding unit includes the appropriate flag holding unit, and the write-back unit selects whether or not to perform data write-back with reference to the appropriate flag. Thus, the write-back unit can avoid performing useless write-back on the data area that has already been released.
請求項23に記載の発明は、演算ユニットと当該演算ユニットがアクセスする主記憶装置とに介在させて使用するためのデータメモリキャッシュ装置であって、前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続読み出しよりも連続読み出しの遅い方向に位置する前記データ保持部中のデータ領域へ前記主記憶装置からデータの読み込みを行う制御部とを備えるものである。
An invention according to
請求項23に記載の発明によれば、制御部が、連続読み出しを実行する期間に、以後において読み出しが行われることが期待されるデータ領域へ、データバスの不使用期間(すなわち空き時間)を利用して、予め主記憶装置からデータの読み込みを行う。それにより制御部は、データを読み出すべきデータ領域へ主記憶装置からデータを読み込むための時間を節減することができる。その結果、メモリアクセス速度が向上する。 According to the twenty-third aspect of the present invention, the control unit sets the non-use period (i.e., idle time) of the data bus to the data area where the reading is expected to be performed later during the period of performing the continuous reading. Using this, data is read from the main storage device in advance. Thus, the control unit can save time for reading data from the main storage device to the data area from which data is to be read. As a result, the memory access speed is improved.
請求項24に記載の発明は、請求項23記載のデータメモリキャッシュ装置であって、前記制御部は、前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続読み出しの遅い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、前記データバスが使用中であるか否かを判定する転送ビジー判定部と、前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行うリフィル部とを備えるものである。 According to a twenty-fourth aspect of the present invention, in the data memory cache device according to the twenty-third aspect, the control unit is configured to detect the continuous read request from the arithmetic unit and the pop access detection unit. An offset calculating unit that calculates an offset address, which is an address shifted from the address output by the arithmetic unit at a predetermined interval in a slower direction of the continuous reading when the unit detects the request for the continuous reading; and A transfer busy determination unit for determining whether or not the data bus is in use; and when the transfer busy determination unit determines that the data bus is not used, the transfer of the data from the main storage device to the data area corresponding to the offset address. And a refill unit for reading.
請求項24に記載の発明によれば、ポップアクセス検出部が連続読み込みの要求を検出し、オフセット算出部がオフセットアドレスを算出し、転送ビジー判定部が、データバスが使用中であるか否かを判定し、リフィル部が、転送ビジー判定部の判定に応じて、オフセットアドレスに対応するデータ領域へ主記憶装置からデータを読み込む。このため制御部は、読み出しが行われることが期待されるデータ領域へ、データバスの不使用期間を利用して、予め主記憶装置からデータを読み込む処理を、容易に実現し得る。
According to the invention described in
請求項25に記載の発明は、請求項24記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、前記リフィル部は、前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域に対応する前記スタックフラグが肯定的に設定されているときに限り、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行うものである。
The invention according to
請求項25に記載の発明によれば、データ保持部がスタックフラグ保持部を備え、リフィル部は、スタックフラグをも参照して、データの読み込みを行うか否かを選択する。それにより、リフィル部は、連続書き込みの対象とされなかったデータ領域、すなわち連続読み出しの対象とされることのないデータ領域について、無用な読み込みを行うことを回避することができる。 According to the twenty-fifth aspect, the data holding unit includes the stack flag holding unit, and the refill unit selects whether to read the data with reference to the stack flag. Thus, the refill unit can avoid performing unnecessary reading on a data area that has not been set as a target of continuous writing, that is, a data area that is not set as a target of continuous reading.
請求項26に記載の発明は、請求項24又は25記載のデータメモリキャッシュ装置であって、前記データ保持部は、前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、前記リフィル部は、前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域に対応する前記適正フラグが開放を示す側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行うものである。 According to a twenty-sixth aspect of the present invention, in the data memory cache device according to the twenty-fourth or twenty-fifth aspect, the data holding unit holds a plurality of appropriate flags indicating release or non-release of the plurality of data areas. A plurality of appropriate flag holding units, wherein the refill unit is configured to release the appropriate flag corresponding to the data area corresponding to the offset address when the transfer busy determining unit determines that the data bus is not used. Data is read from the main storage device to the data area corresponding to the offset address only when set to the indicated side.
請求項26に記載の発明によれば、データ保持部が適正フラグ保持部を備え、リフィル部は、適正フラグをも参照して、データの読み込みを行うか否かを選択する。それにより、リフィル部は、未開放のデータ領域について無用な読み込みを行うことを回避することができる。 According to the twenty-sixth aspect, the data holding unit includes the appropriate flag holding unit, and the refill unit refers to the appropriate flag and selects whether or not to read data. Thereby, the refill unit can avoid performing useless reading on the unreleased data area.
請求項27に記載の発明は、請求項24乃至26の何れかに記載のデータメモリキャッシュ装置であって、前記複数のデータ領域は、前記主記憶装置のアドレスの中位部分に対応づけられており、且つ前記中位部分の同一の値に1以上のデータ領域が対応しており、前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、前記データ保持部は、前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、前記制御部は、前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、前記オフセット算出部は、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続読み出しの遅い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出するものである。
The invention according to
請求項27に記載の発明によれば、データ保持部が複数のタグ保持部を備え、アドレス抽出部が演算ユニットが出力したアドレスから各アドレス部分を抽出し、オフセット算出部が、アドレス抽出部が抽出したアドレス部分に基づいてオフセットアドレスを算出する。このため制御部は、オフセットアドレスの算出を容易に行うことができる。 According to the twenty-seventh aspect, the data holding unit includes a plurality of tag holding units, the address extraction unit extracts each address portion from the address output by the arithmetic unit, and the offset calculation unit sets the address extraction unit. An offset address is calculated based on the extracted address portion. For this reason, the control unit can easily calculate the offset address.
請求項28に記載の発明は、請求項27記載のデータメモリキャッシュ装置であって、前記制御部は、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合に、前記オフセットアドレスについてキャッシュミスが発生したと判定するキャッシュミス判定部と、前記キャッシュミス検出部が前記キャッシュミスの発生を判定した場合に、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の何れかを開放するデータ領域開放部と、前記データ領域開放部が開放した前記データ領域に対応づけられたタグを、前記オフセットアドレスの前記上位部分に更新するタグ更新部とを更に備えるものである。
The invention according to
請求項28に記載の発明によれば、キャッシュミス判定部が、オフセットアドレス算出部が算出したオフセットアドレスと当該オフセットアドレスに対応するデータ領域に対応づけられたタグとに基づいて、オフセットアドレスについてキャッシュミスの判定を行い、データ領域開放部はオフセットアドレス算出部が算出したオフセットアドレスに基づいてデータ領域の開放を行い、タグ更新部が開放後のデータ領域に対応付けられたタグを更新する。このため制御部は、オフセットアドレスにキャッシュミスがあっても、オフセットアドレスに対応するデータ領域への主記憶装置からのデータの読み込みを行うことができる。
According to the invention described in
請求項29に記載の発明は、データメモリキャッシュシステムであって、請求項1乃至28の何れかに記載のデータメモリキャッシュ装置と、前記データメモリキャッシュ装置に接続された演算ユニットと、前記データメモリキャッシュ装置に接続され前記演算ユニットによってアクセスされる主記憶装置とを備えるものである。
An invention according to
請求項29に記載の発明によれば、データメモリキャッシュシステムが、本発明のデータメモリキャッシュ装置、当該装置に接続された演算ユニット、及び当該装置に接続されて演算ユニットによってアクセスされる主記憶装置とを備えるので、メモリアクセス速度が高められる。
According to the invention described in
以上に述べたように、本発明のデータメモリキャッシュ装置及びデータメモリキャッシュシステムによれば、メモリアクセス速度を高めることができる。 As described above, according to the data memory cache device and the data memory cache system of the present invention, the memory access speed can be increased.
本特許出願に係る発明(以後、「本発明」と適宜称する)の実施の形態について図を参照して説明する。 An embodiment of the invention according to the present patent application (hereinafter, appropriately referred to as “the present invention”) will be described with reference to the drawings.
(1.システムの構成)
本発明の第1の実施の形態によるデータメモリキャッシュ装置、及び当該装置を含むデータメモリキャッシュシステム(以後、特に区別するべき場合を除いて、各々を単に「キャッシュ装置」及び「キャッシュシステム」と称する)のブロック構成を図1に示す。命令メモリキャッシュ装置及び命令メモリキャッシュシステムについては本発明と直接関係しないので説明を省略する。
(1. System configuration)
A data memory cache device according to the first embodiment of the present invention and a data memory cache system including the device (hereinafter, each will be simply referred to as “cache device” and “cache system” unless otherwise specified. 1) shows the block configuration of FIG. Since the instruction memory cache device and the instruction memory cache system are not directly related to the present invention, the description is omitted.
本実施の形態によるキャッシュシステム100は、主要には、演算ユニット113、メモリマネジメントユニット115(以後、「MMU115」と適宜称する)、スタック対応データキャッシュユニット117(以後特に区別するべき場合を除いて単に「キャッシュユニット117」と適宜称する)、転送制御ユニット119、主記憶装置131を備えている。キャッシュユニット117は、本発明のデータメモリキャッシュ装置の一実施形態に該当する。
The
演算ユニット113は、通常MPUまたは(狭義の)CPUまたはプロセッサと呼ばれるもので、各種の演算命令、データ移動命令、制御命令その他の命令を命令メモリから取り出して実行する。以後、演算ユニット113の一例としてMPUを取り上げ、「MPU113」と適宜記載する。このことは当然ながら、本発明の演算ユニットをMPUに限定する趣旨ではない。
The
MPU113は特にメモリアドレスを記憶する専用レジスタSP(スタックポインタ)を有している。このスタックポインタが示すメモリ番地(メモリアドレス)をスタックトップと呼ぶ。またこのスタックポインタとして、専用のSP以外に、汎用のレジスタRm(レジスタm)を使うこともできる。このような実装は汎用CPUをJava(登録商標)仮想マシンとして使用する場合等で、特に有効である。
The
以後特に混同を生じない限り、「スタックポインタ(SP)」または「スタックポインタ(SP)アクセス」等の用語を、専用のSPレジスタを使う場合と、汎用のレジスタ(例えばRmやRnと表記する)を使用する場合とを特に区別せず、両方を含む意味で用いる。 Hereinafter, unless otherwise confused, terms such as “stack pointer (SP)” or “stack pointer (SP) access” are used when a dedicated SP register is used and when a general-purpose register is used (for example, Rm or Rn). Is not particularly distinguished from the case where is used, and is used in a meaning including both.
MPU113は、データ移動命令の一部として、push命令(プッシュ命令)、pop命令(ポップ命令)、load命令(ロード命令)、store命令(ストア命令)、及びその他の命令を準備している。push命令は、SPの内容をマイナス4(すなわち、4だけデクリメント)して、そのスタックトップにデータを4バイトライト(MPU113からメモリへ書き込み)する命令である。pop命令は、スタックトップからデータを例えば4バイトリード(メモリからMPU113へ読み出し)してSPの内容をプラス4する命令である。load命令は、スタックトップからの相対アドレスでメモリ読み出しを行う命令である。store命令は、スタックトップからの相対アドレスでメモリ書き込みを行う命令である。MPU113は、その他のデータ移動命令として、例えば、直接アドレス、レジスタ間接アドレス、レジスタ相対アドレス等、各種の方法で指定する任意のアドレスに直接ランダムにメモリアクセスする命令を準備している。
The
図2(a)、(b)、(c)、(d)の左側「命令」欄に、これらのデータ移動命令のうち、代表的なpush、pop、load、store命令の各命令形式を示す。push命令は、主記憶装置131の連続するアドレスへデータを書き込む命令の具体例である。またpop命令は、主記憶装置131の連続するアドレスからデータを読み出す命令の具体例である。図2に例示する命令形式は、汎用レジスタRmまたは汎用レジスタRnをスタックポインタとして使用している。また、この説明では、これらの命令によるメモリアクセスの単位を4バイトとし、push/pop命令でデータ移動の前後でスタックポインタの増減を行う単位値を4としたが、これは一例であって、どのような値であっても構わない。
2A, 2B, 2C, and 2D, the “instruction” column on the left side shows typical instruction formats of push, pop, load, and store among these data movement instructions. . The push instruction is a specific example of an instruction for writing data to consecutive addresses in the
図2(a)左側の「命令」欄はpush命令の命令形式を表している。この形式ではMPU113は、Rmレジスタをスタックポインタとして使用している。図2(a)右側の「動作」欄は、この命令の実行によって行われる動作を示している。
The “instruction” column on the left side of FIG. 2A indicates the instruction format of the push instruction. In this format, the
このpush命令が実行されるとまず、Rmの内容がマイナス4される。次にRnレジスタの内容がRm間接アドレス指定でメモリに書き込まれる。即ち、Rnレジスタの内容がRmレジスタの内容が示すアドレスのメモリに書き込まれる。そしてpush/pop修飾ビットがオンされる。このpush/pop修飾ビットの内容は、図1に示すように、制御ラインを通じて、MPU113からキャッシュユニット117にpush/pop命令が実行されたことを知らせるために使われる。
When this push instruction is executed, first, the content of Rm is decremented by four. Next, the contents of the Rn register are written to the memory by specifying the Rm indirect address. That is, the contents of the Rn register are written to the memory at the address indicated by the contents of the Rm register. Then, the push / pop modification bit is turned on. As shown in FIG. 1, the content of the push / pop modifier bit is used to notify the
図2(b)左側の「命令」欄はpop命令の命令形式を表している。この形式ではMPU113は、Rnレジスタをスタックポインタとして使用している。図2(b)右側の「動作」欄は、この命令の実行によって行われる動作を示している。
The “instruction” column on the left side of FIG. 2B indicates the instruction format of the pop instruction. In this format, the
このpop命令が実行されるとまず、push/pop修飾ビットがオンされる。push/pop修飾ビットの内容が、制御ラインを通じて、MPU113からキャッシュユニット117にpush/pop命令が実行されたことを知らせるために使われることは前記と同様である。次に、Rn間接アドレス指定でメモリの内容がRmレジスタに読み込まれる。即ち、Rnレジスタの内容が示すアドレスのメモリの内容がRmレジスタに読み込まれる。そして、Rnの内容がプラス4される(すなわち、4だけインクリメントされる)。
When this pop instruction is executed, first, a push / pop modification bit is turned on. As described above, the content of the push / pop modifier bit is used to notify the
図2(c)左側の「命令」欄はload命令の命令形式を表している。この形式ではMPU113は、Rnレジスタをスタックポインタとして使用している。図2(c)右側の「動作」欄は、この命令の実行によって行われる動作を示している。
The “instruction” column on the left side of FIG. 2C indicates the instruction format of the load instruction. In this format, the
このload命令が実行されると、まずSP相対修飾ビットがオンされる。このSP相対修飾ビットの内容は、図1に示すように、制御ラインを通じて、MPU113からキャッシュユニット117にSP相対アドレス指定でload/store命令が実行されたことを知らせるために使われる。次に、Rnレジスタの内容にオフセット値を加えた間接アドレス指定でメモリの内容がRmレジスタに読み込まれる。即ち、Rnレジスタの内容にオフセット値を加えた値が示すアドレスのメモリの内容がRmレジスタに読み込まれる。SPとして使用されているRnの内容がプラスマイナスされることはない。
When this load instruction is executed, first, the SP relative modification bit is turned on. As shown in FIG. 1, the contents of the SP relative modification bit are used to notify the
図2(d)左側の「命令」欄はstore命令の命令形式を表している。この形式ではMPU113は、Rmレジスタをスタックポインタとして使用している。図2(d)右側の「動作」欄は、この命令の実行によって行われる動作を示している。
The “instruction” column on the left side of FIG. 2D indicates the instruction format of the store instruction. In this format, the
このstore命令が実行されると、Rnレジスタの内容がRmレジスタの内容にオフセット値を加えた間接アドレス指定でメモリに書き込まれる。即ち、Rnレジスタの内容がRmレジスタの内容にオフセット値を加えた値が示すアドレスのメモリに書き込まれる。そしてSP相対修飾ビットがオンされる。SP相対修飾ビットの内容が、制御ラインを通じて、MPU113からキャッシュユニット117にSP相対アドレス指定でload/store命令が実行されたことを知らせるために使われることは前記と同様である。SPとして使用されているRmの内容がプラスマイナスされることはないことも前記と同様である。
When the store instruction is executed, the contents of the Rn register are written to the memory by indirect addressing by adding an offset value to the contents of the Rm register. That is, the contents of the Rn register are written to the memory at the address indicated by the value obtained by adding the offset value to the contents of the Rm register. Then, the SP relative modification bit is turned on. As described above, the content of the SP relative modification bit is used to notify the
これらの命令を含むデータ移動命令がMPU113によって実行されると、そのデータ移動命令が外部メモリにアクセスするものであるならば、MPU113はアクセス対象である外部メモリの論理アドレスを仮想アドレスバスに出力し、データアクセスがメモリからのデータの読み出しであるか書き込みであるかに応じてキャッシュリード要求またはキャッシュライト要求ビット信号線をそれぞれオンにする。データアクセスがメモリへのデータの書き込みであるならば、MPU113は、同時に書き込み対象となるデータをも32ビット幅のデータバスに出力する。仮想データバスに出力された論理アドレスはMMU115によって物理アドレスに変換され、実アドレスバスに出力される。これらのデータを受け取ったキャッシュユニット117は、データアクセスの対象であるメモリがキャッシュ上に存在するか否かを判定する。
When a data move instruction including these instructions is executed by the
以上説明したように本実施の形態で使用するMPUからメモリアクセスするために使用する制御信号線は、push/pop修飾、SP相対修飾、キャッシュリード要求、及びキャッシュライト要求を伝える4本(4ビット)である。MPU113によって実行される命令とその動作と各制御線の状態との取り得る組み合わせを図3に示す。
As described above, the control signal lines used to access the memory from the MPU used in the present embodiment are four (4 bit) for transmitting push / pop qualification, SP relative qualification, cache read request, and cache write request. ). FIG. 3 shows possible combinations of the instructions executed by the
図3(a)は、キャッシュリード要求とキャッシュライト要求がどちらもがオフ(0)である場合を示している。この場合には、push/pop修飾、SP相対修飾の如何に関わらず、キャッシュメモリのリードライトに関わる何等の動作も行われない。 FIG. 3A shows a case where both the cache read request and the cache write request are off (0). In this case, no operation related to read / write of the cache memory is performed regardless of the push / pop decoration and the SP relative decoration.
図3(b)は、キャッシュリード要求がオフ(0)、キャッシュライト要求がオン(1)、push/pop修飾とSP相対修飾のどちらもがオフ(0)である場合を示している。すなわち図3(b)は、メモリに対するランダムライトの命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3B shows a case where the cache read request is off (0), the cache write request is on (1), and both the push / pop qualification and the SP relative qualification are off (0). That is, FIG. 3B shows the operation when a random write instruction to the memory is executed and the state of the control signal line at that time.
図3(c)は、キャッシュリード要求がオフ(0)、キャッシュライト要求がオン(1)、push/pop修飾がオフ(0)、SP相対修飾がオン(1)である場合を示している。すなわち図3(c)は、メモリに対するSP相対ライト(store)命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3C shows a case where the cache read request is off (0), the cache write request is on (1), the push / pop modifier is off (0), and the SP relative modifier is on (1). . That is, FIG. 3C shows the operation when the SP relative write (store) instruction for the memory is executed and the state of the control signal line at that time.
図3(d)は、キャッシュリード要求がオフ(0)、キャッシュライト要求がオン(1)、push/pop修飾がオン(1)、SP相対修飾がオフ(0)である場合を示している。すなわち図3(d)は、メモリに対するpush命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3D shows a case where the cache read request is off (0), the cache write request is on (1), the push / pop qualification is on (1), and the SP relative qualification is off (0). . That is, FIG. 3D shows the operation when the push instruction for the memory is executed and the state of the control signal line at that time.
図3(e)は、キャッシュリード要求がオフ(0)、キャッシュライト要求がオン(1)、push/pop修飾とSP相対修飾のどちらもがオン(1)である場合を示している。通常このような状態は想定されていない。すなわち、通常においてはこのような状態は起らない。 FIG. 3E shows a case where the cache read request is off (0), the cache write request is on (1), and both the push / pop qualification and the SP relative qualification are on (1). Usually, such a state is not assumed. That is, such a state does not normally occur.
図3(f)は、キャッシュリード要求がオン(1)、キャッシュライト要求がオフ(0)、push/pop修飾とSP相対修飾のどちらもがオフ(0)である場合を示している。すなわち図3(f)は、メモリに対するランダムリードの命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3F shows a case where the cache read request is on (1), the cache write request is off (0), and both the push / pop qualification and the SP relative qualification are off (0). That is, FIG. 3F shows an operation when a random read instruction for the memory is executed and a state of the control signal line at that time.
図3(g)は、キャッシュリード要求がオン(1)、キャッシュライト要求がオフ(0)、push/pop修飾がオフ(0)、SP相対修飾がオン(1)である場合を示している。すなわち図3(g)は、メモリに対するSP相対リード(load)命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3G shows a case where the cache read request is on (1), the cache write request is off (0), the push / pop qualification is off (0), and the SP relative qualification is on (1). . That is, FIG. 3G shows the operation when the SP relative read (load) instruction for the memory is executed and the state of the control signal line at that time.
図3(h)は、キャッシュリード要求がオン(1)、キャッシュライト要求がオフ(0)、push/pop修飾がオン(1)、SP相対修飾がオフ(0)である場合を示している。すなわち図3(h)は、メモリに対するpop命令が実行された時の動作とその時の制御信号線の状態を示している。 FIG. 3H shows a case where the cache read request is on (1), the cache write request is off (0), the push / pop qualification is on (1), and the SP relative qualification is off (0). . That is, FIG. 3H shows the operation when the pop instruction for the memory is executed and the state of the control signal line at that time.
図3(i)は、キャッシュリード要求がオン(1)、キャッシュライト要求がオフ(0)、push/pop修飾とSP相対修飾のどちらもがオン(1)である場合を示している。通常このような状態は想定されていない。すなわち、通常においてはこのような状態は起らない。 FIG. 3 (i) shows a case where the cache read request is on (1), the cache write request is off (0), and both the push / pop qualification and the SP relative qualification are on (1). Usually, such a state is not assumed. That is, such a state does not normally occur.
図3(j)は、キャッシュリード要求とキャッシュライト要求のどちらもがオン(1)である場合を示している。push/pop修飾とSP相対修飾の如何に関わらず、通常このような状態は想定されておない。すなわち、通常においてはこのような状態は起こらない。 FIG. 3 (j) shows a case where both the cache read request and the cache write request are on (1). Generally, such a state is not assumed regardless of the push / pop modification and the SP relative modification. That is, such a state does not usually occur.
図4は、キャッシュユニット117の構成を示すブロック図である。キャッシュユニット117は、データ保持部300及び制御部200を備えている。データ保持部300の構成は図5に描かれる。本実施の形態によるキャッシュユニット117のデータ保持部300は、256セット、4ウエイの構成を有している。しかしながら、本発明のデータメモリキャッシュ装置は、この構成に限るものではなく、その他の任意の構成を採り得る。
FIG. 4 is a block diagram showing the configuration of the
図6は、図5に示したデータ保持部300に含まれるラインの構成を示す構成図である。図6に示すように、各ラインは、データを保持するためのデータ領域と、制御に使われる3種の制御ビット(フラグ)を保持するフラグ保持部と、とタグを保持するためのタグ保持部とを有している。
FIG. 6 is a configuration diagram showing a configuration of a line included in the
各データ領域は、主記憶装置131に対して一時に読み書きする16バイト(4ワード、128ビット)単位のデータを保持するためのもので、16バイトの記憶容量を有している。また、各データ領域は、MPU113に対して同時に読み書きする1ワード(4バイト)単位のデータを保持するための4つの小領域に分割されている。各タグ保持部は、20ビット幅のタグを保持する。各フラグ保持部は、各1ビットのvalidフラグ(適正フラグ)を保持する適正フラグ保持部、dirtyフラグ(ダーティフラグ)を保持するダーティフラグ保持部、及びstackフラグ(スタックフラグ)を保持するスタックフラグ保持部を有している。図7は、これら3種のフラグの取り得る組み合わせと、それらの組み合わせが示す意味とを示している。図7は、後述するキャッシュシステム100の動作説明の中で参照する。
Each data area holds 16-byte (4 words, 128 bits) data that is read and written to the
図4に戻って、制御部200はデータ保持部300を制御するためのものである。制御部200は、ランダムライト検出部5、ランダムリード検出部6、SP相対ライト検出部7、SP相対リード検出部8、プッシュアクセス検出部11、ポップアクセス検出部12、アドレス抽出部13、オフセット算出部14、転送ビジー判定部15、データ書き込み部21、データ読み出し部22、境界判定部23、キャッシュミス判定部24、ライン開放部25、タグ更新部26、フラグ設定部27、リフィル部28及びライトバック部29を、主要な要素として備えている。
Returning to FIG. 4, the
ランダムライト検出部5は、MPU113からのランダムライト命令の実行に伴うデータ書き込みの要求を検出する。より特定的には、ランダムライト検出部5は、push/pop修飾とSP相対修飾とがネゲートされ、キャッシュライト要求がアサートされているときに、ランダムライト命令の実行に伴うデータ書き込みの要求が有ると判断する。
The random write detection unit 5 detects a data write request accompanying execution of a random write instruction from the
ランダムリード検出部6は、MPU113からのランダムリード命令の実行に伴うデータ読み出しの要求を検出する。より特定的には、ランダムリード検出部6は、push/pop修飾とSP相対修飾とがネゲートされ、キャッシュリード要求がアサートされているときに、ランダムリード命令の実行に伴うデータ読み出しの要求が有ると判断する。
The random
SP相対ライト検出部7は、MPU113からのSP相対ライト命令の実行に伴うデータ書き込みの要求を検出する。より特定的には、プッシュアクセス検出部11は、SP相対修飾とキャッシュライト要求との双方がアサートされているときに、SP相対ライト命令の実行に伴うデータ書き込みの要求が有ると判断する。SP相対リード検出部8は、MPU113からのSP相対リード命令の実行に伴うデータ読み出しの要求を検出する。より特定的には、SP相対リード検出部8は、SP相対修飾とキャッシュリード要求との双方がアサートされているときに、SP相対リード命令の実行に伴うデータ読み込みの要求が有ると判断する。
The SP relative
プッシュアクセス検出部11は、MPU113からのpush命令の実行に伴うデータ書き込みの要求を検出する。より特定的には、プッシュアクセス検出部11は、push/pop修飾とキャッシュライト要求との双方がアサートされているときに、push命令の実行に伴うデータ書き込みの要求が有ると判断する。ポップアクセス検出部12は、MPU113からのpop命令の実行に伴うデータ読み出しの要求を検出する。より特定的には、ポップアクセス検出部12は、push/pop修飾とキャッシュリード要求との双方がアサートされているときに、pop命令の実行に伴うデータ読み込みの要求が有ると判断する。
The push
制御部200内の以下の各要素は、上述したランダムライト検出部5、ランダムリード検出部6、SP相対ライト検出部7、SP相対リード検出部8、プッシュアクセス検出部11及びポップアクセス検出部12による検出結果に基づいて、各命令に応じた動作を行う。
The following elements in the
アドレス抽出部13は、MPU113が出力する32ビットのアドレスから、各セット(図5)に対応付けられているアドレスの中位8ビット、タグと対比すべきアドレスの上位20ビット、各小領域(図6)に対応付けられている下位2ビットを抽出する。ここで下位2ビットは、アドレスの中位8ビットの下位側に隣接する2ビットであり、言い換えると最下位から3及び4ビット目に相当する部分である。
From the 32-bit address output from the
オフセット算出部14は、MPU113がpush命令又はpop命令を実行するときに、MPU113が出力するアドレスから、予め定められた間隔をもってずれたアドレスであるオフセットアドレスを算出するものである。オフセットアドレスについては後述する。
When the
転送ビジー判定部15は、キャッシュユニット117と主記憶装置131との間でデータを転送するためのデータバスが使用中であるか否かを判定する。より特定的には、転送ビジー判定部15は、転送制御ユニット119が出力する転送ビジー応答がアサートされているときに、データバスが使用中であると判断する。ここでデータバスは、転送制御ユニット119が介在する図1の例では転送データバスに相当する。
The transfer
データ書き込み部21は、MPU113からデータ書き込みの要求があったときに、MPU113が出力するアドレスに対応する小領域に、MPU113が出力するデータを書き込む。データ読み出し部22は、MPU113からデータ読み出しの要求があったときに、MPU113が出力するアドレスに対応する小領域からMPU113へ、データを読み出す。
The
境界判定部23は、MPU113がpush命令を実行するときに、MPU113が出力するアドレスに対応する小領域が、当該小領域が属するデータ領域の境界のうち、アドレスが進む方向の反対側の境界(以下において、「ライン境界」と適宜称する)に隣接するか否かを判定する。境界判定部23は、更に、MPU113がpop命令を実行するときに、MPU113が出力するアドレスに対応する小領域が、当該小領域が属するデータ領域の境界のうち、アドレスが進む方向の境界(以下において、「ライン境界」と適宜称する)に隣接するか否かを判定する。
When the
図6において、下方へ至るほどアドレスが上昇するものとすれば、push命令の実行に伴ってMPU113が出力するアドレスが下降する場合、すなわち図6においてアドレスが上方に移動する場合には、ライン境界はデータ領域のアドレスの高い方(図6において下方)に位置する。この場合、図6の右端にハッチングを付して示すように、データ領域に属する4つの小領域のうち、ライン境界に隣接する小領域は、最もアドレスの高い小領域(図6において最も下方に位置する小領域)に該当する。pop命令の実行に伴ってMPU113が出力するアドレスが上昇する場合、すなわち図6においてアドレスが下方に移動する場合には、ライン境界はデータ領域のアドレスの高い方(図6において下方)に位置する。この場合、図6の右端にハッチングを付して示すように、データ領域に属する4つの小領域のうち、ライン境界に隣接する小領域は、最もアドレスの高い小領域(図6において最も下方に位置する小領域)に該当する。すなわち、ライン境界及びライン境界に隣接する小領域は、push命令とpop命令との間で共通する。
In FIG. 6, assuming that the address rises downward, if the address output by the
キャッシュミス判定部24は、MPU113が出力するアドレスに対応するデータ領域について、キャッシュミスが発生しているか否かを判定する。MPU113は、オフセット算出部14がオフセットアドレスを算出する場合には、算出されたオフセットアドレスに対応するデータ領域についても、キャッシュミスが発生しているか否かを判定する。ライン開放部25は、キャッシュミスが判定されたデータ領域を開放する。以下において、データ領域の開放を、当分野の慣例に従って「ラインの開放」と適宜称する。また、データ領域はライン毎に1個ずつ設けられるので、データ領域を適宜「ライン」と称する。なお、ライン開放部25は、本発明のデータ領域開放部の具体例に該当する。
The cache miss
フラグ設定部27は、3種のフラグを肯定側又は否定側に設定する。フラグ設定部27は、図4に符号v、d、sで示すように、3種のフラグに対応した3種のフラグ設定部、すなわち適正フラグ設定部、ダーティフラグ設定部及びスタックフラグ設定部を有している。また、フラグ設定部27は、対応するライン毎に設けられても良い。
The
ライトバック部29は、MPU113が出力するアドレスに対応するデータ領域についてキャッシュミスが発生し、その結果当該データ領域が開放される時などにおいて、データ領域から主記憶装置131へデータの書き戻し(ライトバック)を行うものである。リフィル部28は、MPU113が出力するアドレスに対応するデータ領域についてキャッシュミスが発生し、その結果当該データ領域が開放された後などにおいて、主記憶装置131からデータ領域へのデータの読み込み(リフィル)を行うものである。タグ更新部26は、開放されたデータ領域に対応づけられたタグを、新たなアドレスで更新するものである。
The write-
(2.システムの動作)
以下に、既に引用した図1〜図7をも参照しつつ、本実施の形態によるキャッシュシステム100が行うキャッシュ制御について説明する。
(2. System operation)
The cache control performed by the
(2−1.ランダムリード)
図8は、MPU113がランダムリード命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。図8以下のシーケンス図は、キャッシュユニット117の動作の詳細をも同時に示すために、フローチャートを組み込んでいる。以下のシーケンス図において、矢印付きの破線は、MPU113、キャッシュユニット117及び主記憶装置131の間でやり取りされる信号を表している。
(2-1. Random read)
FIG. 8 is a sequence diagram showing an operation of the
MPU113がランダムリード命令の実行を開始すると、図1に示すMPU113はキャッシュリード要求をオンにし(すなわちアサートし)、同時にリードしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力する。また、MPU113は、SP相対修飾及びpush/pop修飾をオフにしたまま(すなわちネゲートしたまま)にする。キャッシュユニット117のランダムリード検出部6は、これらの信号を受信することにより、MPU113がランダムリード命令の実行にともなうデータ読み出し要求を行っていることを検出する。それにともない、キャッシュユニット117の制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュリード要求をオフにする(すなわちネゲートする)。なお、本明細書では、制御信号をアサートすることを、「オンする」と適宜表現し、ネゲートすることを、「オフする」と適宜表現する。
When the
MMU115は仮想アドレスバスの上位20ビットを物理アドレスの上位20ビットに変換し、実アドレスバスに出力する。仮想アドレスバスの下位12ビットはそのまま実アドレスバスに出力される。
The
上述したように、制御部200は、キャッシュリード要求信号を受け取るとまず、キャッシュビジー応答信号をオンにする。次に、ステップS1において、キャッシュユニット117のキャッシュミス判定部24は、アドレス抽出部13が抽出した実アドレスの中位8ビットをキーとして各ウエイ中の1つのセットを選択し、選択されたセットのタグの値を読み出す。
As described above, upon receiving the cache read request signal,
図5に例示したように、本実施の形態によるキャッシュユニット117は、256セット、4ウエイの構成を有するものと仮定している。従って、例えばアドレスバスの上位20ビットが2進数表現で「0001 1001 1100 0000 1111(16進数表現で0x19C0F)」であり、例えばアドレスバスの中位8ビットが2進数表現で「0010 1000(16進数表現で0x28、10進数表現で『40』)」であったとする。この場合には、キャッシュミス判定部24は、『セット40』に含まれる4つのラインのいずれかのラインを、キャッシュに使用する可能性のあるラインとして選択する。
As illustrated in FIG. 5, it is assumed that the
次にキャッシュミス判定部24は、実アドレスバスの上位20ビットと読み出したタグの値(20ビット)を比較し、一致したものがあればキャッシュはヒットした、すなわちキャッシュミスは発生していないと判断する(S1でYes)。上記の例では、アドレスバスの上位20ビットが「0x19C0F」であるので、セット40に含まれるラインに含まれるタグのいずれかの値がこれと同じ「0x19C0F」であるならば、キャッシュミス判定部24は、キャッシュがヒットしたと判定する。
Next, the cache
このキャッシュがヒットしたと判断された時(S1でYes)の動作(S2〜S4、S21、S24)を、図9(b)〜(g)「動作」の左欄「ランダムリード」に示す。また、キャッシュがヒットし(S1でYes)、且つこのラインのvalidフラグが1の時(S2でYes)の動作(S21、S24)を図9(b)〜(e)に示す。この時の状態は図7(e)〜(h)に相当する。この時のラインの内容は主記憶装置131の内容と一致しているか主記憶装置131の内容よりも新しいので、データ読み出し部22は、このラインに含まれる全16バイトから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S3)。その後、制御部200は、キャッシュビジー応答信号をオフにする。
The operations (S2 to S4, S21, S24) when it is determined that the cache hits (Yes in S1) are shown in the left column “random read” of “operation” in FIGS. 9B to 9G. 9B to 9E show the operations (S21, S24) when the cache hits (Yes in S1) and the valid flag of this line is 1 (Yes in S2). The state at this time corresponds to FIGS. 7 (e) to 7 (h). Since the contents of the line at this time match the contents of the
またこの時、stackフラグが1ならば、動作状態は図7(f)、(h)の状態に相当し、図9(c)、(e)に示す通り、フラグ設定部27はstackフラグを0にする(S3)。MPU113はキャッシュビジー応答信号がオフになったことを検出して、データバスに送り出されるデータを読み込む(S10)。
At this time, if the stack flag is 1, the operation state corresponds to the state shown in FIGS. 7F and 7H, and the
キャッシュはヒットしたがvalidフラグが0の時(S2でNo)の動作(S21、S24)を図9(f)、(g)に示す。この時の状態は図7(a)、(b)に相当する。この状態は、たまたまアドレスバスの上位20ビットの値とタグの内容は一致したが、既にラインは開放されており、実際にはキャッシュされていなかったことに相当する。即ちこの状態では、主記憶装置131の内容の方がラインの内容よりも新しいので、制御部200は、対応する主記憶装置131の内容をキャッシュメモリに読み込むリフィルを行うこと(S21)が必要になる。リフィル部28がリフィルを行った(S21)後、フラグ設定部27は、validフラグを1にセットし(S24)、もしもstackフラグが1になっていれば0にセットする(S3)。
The operations (S21, S24) when the cache hits but the valid flag is 0 (No in S2) are shown in FIGS. 9 (f) and 9 (g). The state at this time corresponds to FIGS. 7A and 7B. This state corresponds to the fact that the value of the upper 20 bits of the address bus coincides with the content of the tag, but the line has already been released and has not been actually cached. That is, in this state, since the content of the
以上の動作によって、図9(b)と同じ状態になるので、以後図9(b)と同様に、データ読み出し部22は、このラインに含まれる全16バイトから実アドレスバスの下位4ビットに該当するデータを読み出し(S4)、32ビット幅のデータバスに出力する。その後、制御部200は、キャッシュビジー応答信号をオフにする。なお、リフィル(S21)の詳細については、次のキャッシュミスについての説明の中で説明する。
By the above operation, the state becomes the same as that of FIG. 9B. Thereafter, similarly to FIG. 9B, the
一方、キャッシュミス判定部24は、実アドレスバスの上位20ビットと読み出したタグの値(20ビット)を比較した結果、選択したセットに含まれるいずれのウエイにも一致したものがなければ、キャッシュはヒットしなかった、すなわちキャッシュミスが生じていると判断する(S1)。この時の動作(S300、S21〜S23、S2、S3)を図9(a)「動作」の左欄「ランダムリード」に示す。
On the other hand, as a result of comparing the upper 20 bits of the real address bus with the read tag value (20 bits), if there is no match in any of the ways included in the selected set, the cache
キャッシュミスの発生が判定されると、まず最初に、ライン開放部25は同一セット内にある4つのラインから1つを選択し、ラインの開放を行う(S300)。開放するラインの選択(S31)には例えば、LRUアルゴリズム(Least Recently Used)」が使用される。これを実行するのが図5の各セットに含まれる「LRU式リプレーサ」である。すなわち、ライン開放部25は、LRU式リプレーサを用いてラインの選択を行う。このアルゴリズムは名前の通り、最近、最も使われていないもの、すなわち使われる頻度が少なかったものを開放する方法である。その内容は本発明の本質的部分と直接関係しないので説明を省略する。また必ずしもこのアルゴリズムに限るものではなく、他のアルゴリズムで開放するラインを決定しても勿論構わない。
When it is determined that a cache miss has occurred, first, the
次にこのようにして選択したラインの開放を行う。ラインを開放する動作は各ラインの状態、即ちその時そのラインの各フラグの値によって示される状態によって異なり、この内容は図10「動作」の右欄に示している。 Next, the line selected in this way is released. The operation of releasing the line depends on the state of each line, that is, the state indicated by the value of each flag of the line at that time, and the contents are shown in the right column of FIG.
図10(a)の状態はそのラインが主記憶装置131のキャッシュとして割り付けられていない、即ち開放されていることを意味する。このため、ライン開放部25は、このラインを改めで開放する必要はない(S31でNo)。この状態は通常validフラグが0であることで示される。
The state in FIG. 10A means that the line is not allocated as a cache of the
図10(b)、(c)の状態では、図7(e)、(f)に示すように、ラインの内容と主記憶装置131の内容は一致している(S32でYes、S33でNo)。このため、ライン開放部25は、ライトバックする必要はなく、只そのラインが開放されたことを示すためにvalidフラグを0にセットするだけで良い(S36)。ライン開放部25は、例えばフラグ設定部27を用いて各種フラグの設定を行うことができる。また図10(c)のようにstackフラグが1になっており、stack(スタック)に割り付けられていたことが示されているならば、ライン開放部25は、そのラインの開放に際し、stackフラグも0にセットする(S36)。
In the states of FIGS. 10B and 10C, as shown in FIGS. 7E and 7F, the content of the line matches the content of the main storage device 131 (Yes in S32, No in S33). ). For this reason, the
図10(d)、(e)の状態では、dirtyフラグが1になっており(S33でYes)、図7(g)、(h)に示すようにそのラインの内容は主記憶装置131の内容よりも新しく更新されている。このため、ライン開放部25は、ラインの内容を主記憶装置131にライトバックすることが必要になる。ライン開放部25は、例えばライトバック部29を起動して、ライトバックを実行することができる。このライトバックは、図1に示す転送制御ユニット119を使いることにより、転送データバスと外部データバスを介して高速且つ自動的に行われる。しかしながら、この方法についても本発明の本質と直接関係しないので説明を省略する。ライン開放部25は、ライトバックを行った後、一旦このラインが開放されたことを示すために、validフラグとdirtyフラグを0にセットする(S36)。
In the states of FIGS. 10D and 10E, the dirty flag is 1 (Yes in S33), and the contents of the line are stored in the
図10(e)に示すvalidフラグが1(S32でYes)、dirtyフラグが1で(S33でYes)、stackフラグも1である状態は、図7(h)の状態に相当する。この状態は、このラインがスタックに割り付けられていたことを意味する。したがって、この場合は前記と同様、ライン開放部25は、ラインを開放するに際しスタックへの割り付けを解除すると共にstackフラグも0にセットする(S36)。
A state in which the valid flag is 1 (Yes in S32), the dirty flag is 1 (Yes in S33), and the stack flag is 1 shown in FIG. 10E corresponds to the state in FIG. This state means that this line has been allocated to the stack. Therefore, in this case, the
図10(f)、(g)に示すvalidフラグが0である状態は、図7(a)〜(f)の状態に相当する。この状態では、たまたまタグの値は一致したが、既にこのラインはキャッシュとして使われていない、すなわち開放されているので、ライン開放部25はライトバックを行う必要はない。もしもstackフラグが1になっておれば、ライン開放部25は、ラインの開放に際しstackフラグを0にセットすることだけを実行する(S36)。
The states in which the valid flag shown in FIGS. 10F and 10G are 0 correspond to the states in FIGS. 7A to 7F. In this state, the values of the tags coincide with each other, but since this line has not been used as a cache, that is, has been released, the
以上で1つのラインの開放が終り、次に、この開放したラインをキャッシュとして利用するために、リフィル部28は、要求されたアドレスを含む16バイトの主記憶装置131の内容をこのラインにリフィルする。このリフィルも、図1に示す転送制御ユニット119を使い、転送データバスと外部データバスを介して高速且つ自動的に行われるが、この方法についても本発明の本質と直接関係しないので説明を省略する。
Thus, the release of one line is completed. Next, in order to use the released line as a cache, the
タグ更新部26は、リフィルが行われたラインに対応付けられたタグに、実アドレスの上位20ビットを書き込む(S22)。続いて、フラグ設定部27は、validフラグを1、dirtyフラグを0、stackフラグを0、即ち図7(e)の状態にセットする(S23)。
The
ステップS23が終了した状態は、図9(b)の状態と同じであるので、制御部200は、それ以後図9(b)と同じ動作を行う(S2〜S4)。即ち、データ読み出し部22は、タグの更新が行われたラインに含まれる全16バイトから実アドレスバスの下位4ビットに該当する小領域のデータを読み出し、32ビット幅のデータバスに出力する(S3)。その後、制御部200は、キャッシュビジー応答信号をオフにする。MPU113はキャッシュビジー応答信号がオフになったことを検知して、データバスを通じて送られるデータの内容を読み込む(S10)。
Since the state in which step S23 is completed is the same as the state in FIG. 9B, the
(2−2.ランダムライト)
図11は、MPU113がランダムライト命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。MPU113がランダムライト命令の実行を開始すると、図1に示すMPU113はキャッシュライト要求をオンにし、同時にライトしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力し、更にライトしたいデータを32ビット幅のデータバスに出力する。また、MPU113は、SP相対修飾及びpush/pop修飾をオフにしたままにする。キャッシュユニット117のランダムライト検出部5は、これらの信号を受信することにより、MPU113がランダムライト命令の実行にともなうデータ書き込み要求を行っていることを検出する。それにともない、制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュライト要求をオフにする。
(2-2. Random Write)
FIG. 11 is a sequence diagram showing an operation of the
続いてランダムリードと同様に、キャッシュミス判定部24は、セットとウエイの選択と、キャッシュヒットまたはキャッシュミスの判断とを行う(S1)。これについては既に説明したのでここでは説明を省略する。
Subsequently, similarly to the random read, the cache
キャッシュがヒットしたと判断された時(S1でYes)の動作(S2、S11、S12)を、図9(b)〜(g)「動作」の右欄「ランダムライト」に示す。また、キャッシュがヒットし(S1でYes)、且つこのラインのvalidフラグが1の時(S2でYes)の動作(S11、S12)を図9(b)〜(e)に示す。この時の状態は図7(e)〜(h)に相当する。この時のラインの内容は主記憶装置131の内容と一致しているか主記憶装置131の内容よりも新しいので、データ書き込み部21は、このラインの実アドレスバス下位4ビットに相当する領域に、データバスの内容、すなわちデータバスを通じて送られてきたデータを書き込む(S11)。続いて、フラグ設定部27は、まだdirtyフラグが1になっていなければ図9(b)、(c)に示すように、dirtyフラグを1にセットする(S12)。その後、制御部200は、キャッシュビジー応答信号をオフにする。
The operations (S2, S11, S12) when it is determined that the cache hits (Yes in S1) are shown in the right column “random write” of “operation” in FIGS. 9B to 9G. 9B to 9E show the operations (S11 and S12) when the cache hits (Yes in S1) and the valid flag of this line is 1 (Yes in S2). The state at this time corresponds to FIGS. 7 (e) to 7 (h). Since the content of the line at this time matches the content of the
またこの時、stackフラグが1ならば、動作状態は図7(f)、(h)の状態に相当する。この場合、図9(c)、(e)に示す通り、フラグ設定部27は、stackフラグを0にする。MPU113はキャッシュビジー応答信号がオフになったことを検出し、ランダムライトが終了したことを知る。
At this time, if the stack flag is 1, the operation state corresponds to the states shown in FIGS. In this case, as shown in FIGS. 9C and 9E, the
キャッシュはヒットしたがvalidフラグが0の時(S2でNo)の動作(S21、S24)を図9(f)、(g)に示す。この時の状態は図7(a)、(b)に相当する。この状態は、たまたまアドレスバスの上位20ビットの値とタグの内容は一致したが、既にラインは開放されており、実際にはキャッシュされていなかったことに相当する。即ち、この状態では、主記憶装置131の内容の方がラインの内容よりも新しいので、対応する主記憶装置131の内容をキャッシュメモリに読み込むリフィルを行うこと(S21)が必要になる。リフィル部28がリフィルを行った(S21)後、フラグ設定部27は、validフラグを1にセットする(S24)。次に、データ書き込み部21は、このラインの実アドレスバス下位4ビットに該当する領域にデータバスの内容を書き込む(S11)。その後、フラグ設定部27は、dirtyフラグを1にセットする(S12)。
The operations (S21, S24) when the cache hits but the valid flag is 0 (No in S2) are shown in FIGS. 9 (f) and 9 (g). The state at this time corresponds to FIGS. 7A and 7B. This state corresponds to the fact that the value of the upper 20 bits of the address bus coincides with the content of the tag, but the line has already been released and has not been actually cached. That is, in this state, since the content of the
もしも動作状態が、図7(b)の状態に相当し、stackフラグが1になっておれば、図9(g)に示す通り、制御部200は、ラインのスタックへの割り付けを解除する。すなわち、フラグ設定部27はstackフラグを0にセットする(S12)。
If the operation state corresponds to the state of FIG. 7B and the stack flag is 1, the
一方、ステップS1においてキャッシュミスと判断された時(S1でNo)の動作を図9(a)「動作」の右欄「ランダムライト」に示す。ライン開放部25は、新しくキャッシュに使用するラインを確保するためにアドレスバスの中位8ビットで選択したセットから、LRU式リプレーサが開放するラインを決定して、決定したラインを開放し(S300)、開放したラインを新たにキャッシュとして使用するために、リフィルを行う(S21)。この動作は既に説明したランダムリードにおけるライン開放と同じであるから、ここでは説明を省略する。
On the other hand, the operation when a cache miss is determined in step S1 (No in S1) is shown in the right column “random write” of “operation” in FIG. The
これらの動作によってラインのデータ領域の内容は主記憶装置131の内容と一致し、動作状態は図9(b)の状態になるので、制御部200は、以後図9(b)と同じ動作を行う。即ち、データ書き込み部21は、リフィルされたラインの実アドレスバス下位4ビットに該当する小領域にデータバスの内容を書き込む。続いて、制御部200はキャッシュビジー応答信号をオフにする。MPU113はキャッシュビジー応答信号がオフになったことを検出して、ランダムライトが終了したことを知る。
By these operations, the contents of the data area of the line match the contents of the
(2−3.SP相対リード)
図12は、MPU113がSP相対リード命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。MPU113がSP相対リード命令の実行を開始すると、MPU113はキャッシュリード要求をオンにし、同時にリードしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力する。同時にMPU113はSP相対修飾信号をオンにする。キャッシュユニット117のSP相対リード検出部8は、これらの信号を受信することにより、MPU113がSP相対リード命令の実行にともなうデータ読み出し要求を行っていることを検出する。この点において、SP相対リードは、前記ランダムリードとはその動作が異なる。それにともない、キャッシュユニット117の制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュリード要求をオフにする。
(2-3. SP relative read)
FIG. 12 is a sequence diagram showing the operation of the
MMU115は仮想アドレスバスの上位20ビットを物理アドレスの上位20ビットに変換し、実アドレスバスに出力する。仮想アドレスバスの下位12ビットはそのまま実アドレスバスに出力される。
The
上述したように、制御部200は、キャッシュリード要求信号を受け取るとまず、キャッシュビジー応答信号をオンにする。次にステップS1において、キャッシュミス判定部24は、アドレス抽出部13が抽出した実アドレスの中位8ビットをキーとして各ウエイ中の1つのセットを選択し、選択されたセットのタグの値を読み出す。キャッシュミス判定部24は、更に、キャッシュのヒット又はミスを判断する。これらの動作はランダムリードでの動作と同様である。
As described above, upon receiving the cache read request signal,
キャッシュがヒットし(S1でYes)、且つこのラインのvalidフラグが1(S2でYes)ならば、データ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200は、キャッシュビジー応答信号をオフにする。以上の動作を、図13(b)〜(e)「動作」の左欄「SP相対リード」に示す。MPU113は、キャッシュビジー応答信号がオフになったことを検出して、データバスの内容を読み込む(S10)。
If the cache hits (Yes in S1) and the valid flag of this line is 1 (Yes in S2), the
キャッシュはヒットした(S1でYes)が、validフラグが0(S2でNo)ならば、そのことは、前記の通り、たまたまアドレスバスの上位20ビットの値とあるラインのタグの内容が一致はしたが、既にそのラインは開放されており、キャッシュされていなかったことを意味する。従ってこの場合には、リフィル部28がリフィルを行った(S21)後、フラグ設定部27がvalidフラグを1にセットする(S24)。その後、制御部200は、図13(b)と同じ動作を行う。この時の動作を図13(f)、(g)の左欄「SP相対リード」に示す。
If the cache hits (Yes in S1), but the valid flag is 0 (No in S2), as described above, this means that the value of the upper 20 bits of the address bus coincides with the contents of the tag of a certain line. However, this means that the line has already been released and has not been cached. Therefore, in this case, after the
一方、キャッシュミス判定部24は、実アドレスバスの上位20ビットと読み出したタグの値(20ビット)を比較した結果、アドレスバスの中位8ビットの値によって選択したセット中のいずれのウエイにも一致したものがなければ、キャッシュはヒットしなかった(キャッシュミス)と判断し、同一セット内にある4つのラインから1つを選択してラインの開放を行う(S301)。ステップS301では、ステップS300(図8)とは異なり、フラグ設定部27はstackフラグを0にセットする(S36)ことなく、validフラグのみを0に設定する(S37)。その他においては、ステップS301の処理はステップS300と同様である。
On the other hand, as a result of comparing the upper 20 bits of the real address bus with the read tag value (20 bits), the cache
その後、リフィル部28は、開放されたラインに対して該当する主記憶装置131のメモリ領域からその内容をリフィルする(S21)。続いて、タグ更新部26は、リフィルされたラインに対応づけられたタグを更新する(S22)。その後、フラグ設定部27は、validフラグを1にセットする(S24)。その後、制御部200は図13(b)と同じ動作を行う。この時の動作を図13(a)の左欄「SP相対リード」に示す。
Thereafter, the
図13(a)〜(g)に示すいずれの状態でもstackフラグの設定は行われないので、stackフラグの状態は元の状態のまま維持される。この点においてもSP相対リードは、ランダムリードとはその動作を異にしている。 Since the stack flag is not set in any of the states shown in FIGS. 13A to 13G, the state of the stack flag is maintained in the original state. Also in this point, the operation of the SP relative read is different from that of the random read.
(2−4.SP相対ライト)
図14は、MPU113がSP相対ライト命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。MPU113がSP相対ライト命令の実行を開始すると、MPU113はキャッシュライト要求をオンにし、同時にリードしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力し、更にライトしたいデータを32ビット幅のデータバスに出力する。同時にMPU113はSP相対修飾信号をオンにする。キャッシュユニット117のSP相対ライト検出部7は、これらの信号を受信することにより、MPU113がSP相対ライト命令の実行にともなうデータ書き込み要求を行っていることを検出する。この点において、前記ランダムライト実行時の動作とは異なる。それにともない、キャッシュユニット117の制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュリード要求をオフにする。
(2-4. SP relative write)
FIG. 14 is a sequence diagram showing an operation of the
続けてキャッシュミス判定部24は、SP相対リードにおけるステップS1と同様の動作によって、セットとウエイの選択と、キャッシュヒットまたはキャッシュミスを判断する(S1)。キャッシュがヒットしたと判断された時(S1でNo)の動作を、図13(b)〜(g)「動作」の右欄「SP相対ライト」に示す。
Subsequently, the cache
キャッシュがヒットし(S1でYes)且つこのラインのvalidフラグが1(S2でYes)ならば、データ書き込み部21は、このラインの実アドレスバス下位4ビットに相当する領域にデータバスの内容を書き込む(S11)。その後、フラグ設定部27は、まだdirtyフラグが1になっていなければ図13(b)、(c)に示すように、dirtyフラグを1にセットする(S13)。その後、制御部200はキャッシュビジー応答信号をオフにする。この時の動作を図13(b)〜(e)「動作」の右欄「SP相対ライト」に示す。MPU113はキャッシュビジー応答信号がオフになったことを検出して、SP相対ライトの終了したことを知る。
If the cache hits (Yes in S1) and the valid flag of this line is 1 (Yes in S2), the
キャッシュはヒットした(S1でYes)がvalidフラグが0(S2でNo)ならば、そのことは、前記の通り、たまたまアドレスバスの上位20ビットの値とあるラインのタグの内容が一致はしたが、既にそのラインは開放されており、キャッシュされていなかったことを意味する。従ってこの場合には、リフィル部28がリフィルを行った(S21)後、フラグ設定部27がvalidフラグを1にセットする(S24)。その後、制御部200は、図13(b)と同じ動作を行う。この時の動作を図13(f)、(g)の右欄「SP相対ライト」に示す。
If the cache hits (Yes in S1) but the valid flag is 0 (No in S2), this means that the value of the upper 20 bits of the address bus coincided with the contents of the tag of a certain line as described above. Means that the line has already been released and not cached. Therefore, in this case, after the
一方、キャッシュミス判定部24は、実アドレスバスの上位20ビットと読み出したタグの値(20ビット)を比較した結果、アドレスバスの中位8ビットの値によって選択したセット中のいずれのウエイにも一致したものがなければ、キャッシュはヒットしなかった(キャッシュミス)と判断し、同一セット内にある4つのラインから1つを選択してラインの開放を行う(S301)。
On the other hand, as a result of comparing the upper 20 bits of the real address bus with the read tag value (20 bits), the cache
その後、リフィル部28は、開放されたラインに対して該当する主記憶装置131のメモリ領域からその内容をリフィルする(S21)。続いて、タグ更新部26は、リフィルされたラインに対応づけられたタグを更新する(S22)。その後、フラグ設定部27は、validフラグを1にセットする(S24)。その後、制御部200は図13(b)と同じ動作を行う。この時の動作を図13(a)の右欄「SP相対ライト」に示す。
Thereafter, the
図13(a)〜(g)に示すいずれの状態でもstackフラグの設定は行われないので、stackフラグの状態は元の状態のまま維持される。この点においてもSP相対ライトは、前記ランダムライトとはその動作を異にし、前記SP相対リードとは同じくしている。 Since the stack flag is not set in any of the states shown in FIGS. 13A to 13G, the state of the stack flag is maintained in the original state. Also in this regard, the operation of the SP relative write differs from that of the random write, and is the same as the SP relative read.
(2−5.pop)
図15は、MPU113がpop命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。MPU113がpop命令を実行すると、MPU113はキャッシュリード要求をオンにし、同時にpopしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力する。同時にMPU113はpush/pop修飾信号をオンにする。キャッシュユニット117のポップアクセス検出部12は、これらの信号を受信することにより、MPU113がpop命令の実行にともなうデータ読み出し要求を行っていることを検出する。この点において、popは、前記ランダムリード及びSP相対リードとは、その動作が異なる。それにともない、キャッシュユニット117の制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュリード要求とpush/pop修飾信号をオフにする。
(2-5. Pop)
FIG. 15 is a sequence diagram showing the operation of the
MMU115は仮想アドレスバスの上位20ビットを物理アドレスの上位20ビットに変換し、実アドレスバスに出力する。仮想アドレスバスの下位12ビットはそのまま実アドレスバスに出力される。
The
上述したように、制御部200は、キャッシュリード要求信号を受け取るとまず、キャッシュビジー応答信号をオンにする。次にステップS1において、キャッシュミス判定部24は、アドレス抽出部13が抽出した実アドレスの中位8ビットをキーとして各ウエイ中の1つのセットを選択し、選択されたセットのタグの値を読み出し、キャッシュのヒット又はミスを判定する。これらの動作はランダムリードやSP相対リードでの動作と同様であるから説明を省略する。
As described above, upon receiving the cache read request signal,
実アドレスバスの上位20ビットの値と選択したセット中の或るラインのタグの内容とが一致し(S1でYes;すなわちキャッシュがヒットし)、且つこのラインのvalidフラグが1(S2でYes)ならば、制御部200は図16(b)〜(e)の動作を行う。このとき、境界判定部23の判定(S51)により、実アドレスバスの第3ビット(下の桁から第4番目のビット、即ち2の3乗の桁を表すビット、以後同様)と第2ビット(下の桁から第3番目のビット、即ち2の2乗の桁を表すビット、以後同様)の両方が1(S51でYes)ならば、制御部200は図16(b)〜(e)の動作左欄「最上位アドレスからpop」の動作を行う。即ち、データ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200はキャッシュビジー応答信号をオフにする。
The value of the upper 20 bits of the real address bus matches the content of the tag of a certain line in the selected set (Yes in S1; that is, the cache hits), and the valid flag of this line is 1 (Yes in S2). ), The
次に、フラグ設定部27はこのラインのvalidフラグを0にし(S52)、このラインを開放する。最上位アドレスからデータがpopされたことによって、このスタックが空になったためである。フラグ設定部27はvalidフラグを0にセットして、ラインを開放するが、この時にライトバック部29はライトバックを行わない。このラインの内容は再度参照されることはなく、ライトバックして主記憶に保存する必要がないからである。
Next, the
また図16(b)、(d)の動作左欄「最上位アドレスからpop」に示す通り、このラインのstackフラグがオフになっていれば、フラグ設定部27はstackフラグをオンにする(S52)。このラインがスタックとして使用されていたことを記憶しておくためである。
16B and 16D, if the stack flag of this line is off, as shown in the operation left column “pop from the highest address” in FIGS. 16B and 16D, the
また図16(d)、(e)の動作左欄「最上位アドレスからpop」に示す通り、このラインのdirtyフラグがオンになっていれば、フラグ設定部27はdirtyフラグをオフにする(S52)。このラインは開放されるので、dirtyフラグは意味を持たないからである。また、フラグ設定部27は、ステップS52において、validフラグをオフすることなく、すなわちラインの開放を行うことなく、dirtyフラグのみをオフしてもよい。それにより、ステップS300又はS301により、対応するラインを開放する必要が後に生じたときに、ライトバック(S34)を禁止することができる(S33でNo)。
Also, as shown in the operation left column “pop from the highest address” in FIGS. 16D and 16E, when the dirty flag of this line is on, the
実アドレスバスの第3ビットと第2ビットのいずれか少なくとも一方が0(S51でNo)ならば、制御部200は、図16(b)〜(e)の動作右欄「最上位アドレス以外からpop」の動作を行う。即ち、データ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200はキャッシュビジー応答信号をオフにする。MPU113は、キャッシュビジー応答信号がオフになったことを検知して、32ビット幅データバスの内容であるデータを読み込む(S10)。この時、フラグ設定部27はフラグの操作等を行わない。
If at least one of the third bit and the second bit of the real address bus is 0 (No in S51), the
実アドレスバスの上位20ビットの値と選択したセット中の或るラインのタグの内容とが一致した(S1でYes)が、このラインのvalidフラグが0(S2でNo)ならば、制御部200は図16(f)(g)の動作を行う。この場合は、たまたま選択したセット中の或るラインのタグの内容と実アドレスバスの上位20ビットの値が一致したが、既にこのラインは開放されていたことに該当するので、リフィル部28はリフィルを行う(S21)。境界判定部23の判定(S55)により、実アドレスバスの第3ビットと第2ビットの両方が1(S55でYes)ならば、制御部200は図16(f)(g)の動作左欄「最上位アドレスからpop」の動作を行う。
If the value of the upper 20 bits of the real address bus matches the content of the tag of a certain line in the selected set (Yes in S1), but the valid flag of this line is 0 (No in S2), the control
即ち、リフィル部28は、このラインに対して主記憶装置から該当するアドレスに記憶される情報のリフィルを行い、フラグ設定部27はvalidフラグを1にする(S25)。そしてデータ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200はキャッシュビジー応答信号をオフにする。
That is, the
もしもこの時stackフラグが0ならば、フラグ設定部27はstackフラグを1にする(図16(f)動作左欄「最上位アドレスからpop」;S53)。更に、フラグ設定部27はvalidフラグを0に戻す(図16(f)(g)動作左欄「最上位アドレスからpop」;S53)。最上位アドレスからのpopによって、このラインを開放するためである。
At this time, if the stack flag is 0, the
実アドレスバスの第3ビットと第2ビットの何れか少なくとも一方が0(S55でNo)ならば、制御部200は図16(f)(g)の動作右欄「最上位アドレス以外からpop」の動作を行う。即ち、この場合においてもフラグ設定部27は、このラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを実行し(S21)、フラグ設定部27はvalidフラグを1にする(S25)。そしてデータ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200はキャッシュビジー応答信号をオフにする。その後にフラグ設定部27はフラグの操作等を行わない。なお、図15では、ステップS21及びS25の処理がステップS55の判定より前に実行される例を描いているが、ステップS55の後に、この判定の如何に拘わらず、ステップS21及びS25の処理を行っても良い。
If at least one of the third bit and the second bit of the real address bus is 0 (No in S55), the
実アドレスバスの上位20ビットの値と選択したセット中のラインのタグの内容とが一致するものがなければ(S1でNo)、キャッシュミス判定部24はキャッシュはミスしたと判断し、それに基づき制御部200は図16(a)の動作を行う。即ち、ライン開放部25は、このセットからLRUアルゴリズムによって1つのラインを開放し(S301)、リフィル部28は、そのラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを実行する。その後、タグ更新部26はリフィルされたラインに対応づけられたタグを更新する。続いて、フラグ設定部27は、当該ラインに対応するvalidフラグを1に、dirtyフラグを0にセットする(S25)。次に、データ読み出し部22は、このラインから実アドレスバスの下位4ビットに該当するデータを読み出し、32ビット幅のデータバスに出力する(S4)。その後、制御部200はキャッシュビジー応答信号をオフにする(以上、図16(a))。
If there is no match between the value of the upper 20 bits of the real address bus and the content of the tag of the line in the selected set (No in S1), the cache
更に、境界判定部23の判定(S56)により、実アドレスバスの第3ビットと第2ビットの両方が1(S56でYes)ならば、フラグ設定部27はstackフラグを1にする(図16(a)動作左欄「最上位アドレスからpop」;S54)。更にまたこの時は、フラグ設定部27はvalidフラグを0に戻す(図16(a)動作左欄「最上位アドレスからpop」;S54)。最上位アドレスからのpopによって、このラインを開放するためである。
Further, if both the third and second bits of the real address bus are 1 (Yes in S56) as determined by the boundary determination unit 23 (S56), the
以上のように、MPU113がpop命令を実行する場合に、データの読み出しの対象である小領域がライン境界にある(S51、S55、S56でYes)ときには、制御部200は、このラインが保持するデータを主記憶装置131へライトバックすることなく、このラインを開放する(すなわち、S52、S53、S54でv=0に設定する)。pop命令による読み出しによってもはや再度読み出すことのないデータを保持するラインは、開放しても支障のないものであり、且つこのラインが保持するデータは無用なデータである以上、主記憶装置131へライトバックする必要もないものである。このように制御部200は、無用なデータを保持するラインをデータのライトバックなしで開放するので、MPU113の動作に支障をもたらすことなく、メモリアクセス速度を向上させる。
As described above, when the
また、制御部200は、読み出しの対象である小領域がライン境界にない場合(S51、S55、S56でNo)にはライン開放を行わない。このため、MPU113はpop命令によるデータの読み出しを、ライン境界に隣接する小領域に対応するアドレスだけでなく、ライン境界に隣接しない小領域に対応するアドレスで終了させることができる。
In addition, when the small area to be read is not at the line boundary (No in S51, S55, and S56), the
また、既に述べたように、ステップS52において、validフラグを0に設定することなく、dirtyフラグを0に設定することも可能である。それにより、MPU113が他の命令を実行する際などにおいて、制御部200は、キャッシュミスに伴うライン開放(S300、S301)を行うときに、当該ラインのデータの主記憶装置131へのライトバック(S34)をスキップする。その結果、メモリアクセス速度が向上する。
Further, as described above, in step S52, the dirty flag can be set to 0 without setting the valid flag to 0. As a result, when the
図17に示すように、以上の動作の後或いは途中において、もしも転送ビジー応答信号がオフならば、転送データバスが空いているので、制御部200はもうすぐ必要となる可能性のあるメモリについて予めリフィルを実行する。それにより、メモリアクセス速度を更に高めることができる。具体的には、転送ビジー判定部15が転送ビジー応答信号がオフであることを検出すると(S61でYes)、制御部200は、ラインに含まれるタグの値とそのラインを含むセットによって示される実アドレスの上位28ビットが、現在のSPの実アドレスの上位28ビットよりも1または2大きなアドレスであるオフセットアドレスに対応するラインを1つ見付け、図18の動作右欄「SPが下方から近付いた」に示す動作を行う。すなわち、オフセット算出部14は、上記のオフセットアドレスを算出し、キャッシュミス判定部24はオフセットアドレスに対応するラインについてキャッシュミスが生じているか否かを判定する(S65)。
As shown in FIG. 17, after or during the above operation, if the transfer busy response signal is off, the transfer data bus is vacant, and the
キャッシュミス判定部24がこのようなラインを見付けることができ(S65でYes)、且つそのラインのvalidフラグが1(S67でYes)ならば、制御部200は何も行わない(図18動作右欄(b)〜(e))。
If the cache
キャッシュミス判定部24がこのようなラインを見付けることはできたが(S65でYes)、そのラインのvalidフラグが0であり(S67でNo)、且つそのラインがスタックに割り当てられていれば(S69でYes)、リフィル部28はそのラインのリフィルを行う(S21)。その後、フラグ設定部27は、validフラグを1にする(S70)(以上、図18動作右欄(g))。
Although the cache
キャッシュミス判定部24がこのようなラインを見付けることはできたが(S65でYes)、そのラインのvalidフラグが0であり(S67でNo)、且つそのラインがスタックに割り当てられていなければ(S69でNo)、制御部200は何も行わない(図18動作右欄(f))。
Although the cache
また、キャッシュミス判定部24がこのようなラインを見付けることができなければ(S65でNo)、アドレスの順序に関して現在のスタックポインタSPのすぐ上にあり、すぐにpopによって読み出される可能性の高い主記憶装置のメモリ領域がキャッシュされていないことになる。このため、制御部200は、実アドレスの上位28ビットが現在のSPの実アドレスの上位28ビットよりも1大きく、下位4ビットは0である主記憶装置の領域についてキャッシュ上にリフィルを実行する(図18動作右欄(a);S21)。
If the cache
具体的には、ライン開放部25は、現在のスタックポインタSPの実アドレスの上位28ビットよりも1大きいアドレスに対応するセットで、LRUによって開放するラインを決定し、決定したラインの開放を行う(S301)。その後、タグ更新部26がタグ更新を行い(S22)、フラグ設定部27がstackフラグを1へ設定する(S26)。次に、リフィル部28は、そのラインに実アドレスの上位28ビットが現在のSPの実アドレスの上位28ビットよりも1大きく、下位4ビットは0である主記憶装置のメモリ領域のリフィルを実行する(S21)。次に、フラグ設定部27はそのラインのvalidフラグを1に設定する(S70)。
Specifically, the
また同時に、図19に示すように、転送ビジー応答がオフであるときに(S61でYes)、オフセット算出部14はラインに含まれるタグの値とそのラインを含むセットによって示される実アドレスの上位28ビットが、現在のSPの実アドレスの上位28ビットよりも小さなアドレスである別のオフセットアドレスを算出する。キャッシュミス判定部24は、このオフセットアドレスに対応するラインを捜す(以上、S71)。キャッシュミス判定部24が、もしもそのようなラインを見付けることができたら(S71でYes)、制御部200は図10の動作左欄「SPが上方に移動」に示す動作を行う。
At the same time, as shown in FIG. 19, when the transfer busy response is off (Yes in S61), the offset calculating
即ち、キャッシュミス判定部24がこのようなラインを見付けることができ(S71でYes)、更にそのラインのvalidフラグ、dirtyフラグ、stackフラグがいずれも1であったならば(S73でYes)、ライトバック部29はそのラインのライトバックを行い(S75)、フラグ設定部27はdirtyフラグを0にする(S77)(以上、図10動作左欄(e))。
That is, if the cache
キャッシュミス判定部24がこのようなラインを見付けることができなかったか(S71でNo)、或いは見付けることができてもvalidフラグ、dirtyフラグ、stackフラグがいずれかが0であったならば(S73でNo)、制御部200は何も実行しない(図10動作左欄(a)〜(d)(f)(g))。
Whether such a line could not be found by the cache miss determination unit 24 (No in S71), or if any of the valid flag, the dirty flag, and the stack flag was 0 (S73). No), the
以上のように、制御部200は、pop命令に従って読み出しを終了しているラインのデータ、即ち再び読み出されることのないデータをライトバックする(S75)ので、当該ラインを後に開放する時(S300、S301)に、ライトバック(S34)を行う必要がない。それにより、メモリアクセス速度が向上する。
As described above, the
(2−6.push)
図20は、MPU113がpush命令を実行するときのキャッシュシステム100の動作を示すシーケンス図である。MPU113がpush命令を実行すると、MPU113はキャッシュライト要求信号をオンにし、同時にリードしたいメモリ領域を示す論理アドレスを仮想アドレスバスに出力し、更にライトしたいワードデータを32ビット幅のデータバスに出力する。同時にMPU113はpush/pop修飾信号をオンにする。キャッシュユニット117のプッシュアクセス検出部11は、これらの信号を受信することにより、MPU113がpush命令の実行にともなうデータ書き込み要求を行っていることを検出する。この点において、pushは、前記ランダムライト及びSP相対ライトとは、その動作が異なる。それにともない、キャッシュユニット117の制御部200は、キャッシュビジー応答をオンにする。MPU113はキャッシュビジー応答がオンになったことを確認してキャッシュライト要求とpush/pop修飾信号をオフにする。
(2-6. Push)
FIG. 20 is a sequence diagram showing the operation of the
続けてキャッシュミス判定部24は、popにおけるステップS1と同様の動作によって、セットとウエイの選択と、キャッシュヒットまたはキャッシュミスを判断する(S1)。これらの動作はランダムライトやSP相対ライトでの対応する動作と同様であるから説明を省略する。
Subsequently, the cache
実アドレスバスの上位20ビットの値と選択したセット中の或るラインのタグの内容とが一致し(S1でYes;すなわちキャッシュがヒットし)、且つこのラインのvalidフラグが1(S2でYes)ならば、制御部200は該当するラインにおいて、図21(b)〜(e)の動作左欄「最上位アドレスにpush」または動作右欄「最上位アドレス以外にpush」の動作を行う。このとき、境界判定部23の判定(S51)により、実アドレスバスの第3ビットと第2ビットの両方が1(S51でYes)ならば、制御部200は、図21(b)〜(e)の動作左欄「最上位アドレスにpush」の動作を行う。即ち、データ書き込み部21は32ビット幅のデータバスからライトすべきワードデータを読み込み、このラインの実アドレスバスの下位4ビットに該当する領域にライトする(S11)。その後、制御部200はキャッシュビジー応答信号をオフにする(以上、図21(b)〜(e)動作左欄「最上位アドレスにpush」)。
The value of the upper 20 bits of the real address bus matches the content of the tag of a certain line in the selected set (Yes in S1; that is, the cache hits), and the valid flag of this line is 1 (Yes in S2). ), The
次に、もしもこのラインのdirtyフラグが0ならば、フラグ設定部27はdirtyフラグを1にセットする(図21(b)(c)動作左欄「最上位アドレスにpush」;S15)。また、もしもこのラインのstackフラグが0ならば、フラグ設定部27は、stackフラグを1にセットする(図21(b)(d)動作左欄「最上位アドレスにpush」;S15)。その後、MPU113はキャッシュビジー応答信号がオフになったことを検出して、push命令による処理が完了したことを知る。
Next, if the dirty flag of this line is 0, the
実アドレスバスの第3ビットと第2ビットの何れか少なくとも一方が0ならば(S51でNo)、制御部200は、図21(b)〜(e)の動作右欄「最上位アドレス以外にpush」の動作を行う。即ち、データ書き込み部21は32ビット幅のデータバスからライトしたいワードデータを読み込み、このラインの実アドレスバスの下位4ビットに該当する領域にライトする(S11)。その後、制御部200はキャッシュビジー応答信号をオフにする(以上、図21(b)〜(e)動作右欄「最上位アドレス以外にpush」)。次に、もしもこのラインのdirtyフラグが0ならば、フラグ設定部27はdirtyフラグを1にセットする(図21(b)(c)動作右欄「最上位アドレス以外にpush」;S13)。フラグ設定部27は、その他のフラグ操作を行わない。MPU113は、キャッシュビジー応答信号がオフになったことを検出して、push命令による処理が完了したことを知る。
If at least one of the third bit and the second bit of the real address bus is 0 (No in S51), the
実アドレスバスの上位20ビットの値と選択したセット中の或るラインのタグの内容とが一致した(S1でYes)が、このラインのvalidフラグが0(S2でNo)ならば、制御部200は図21(f)(g)の動作を行う。この場合は、たまたま選択したセット中の或るラインのタグの内容と実アドレスバスの上位20ビットの値が一致したが、既にこのラインは開放されていたことに該当する。
If the value of the upper 20 bits of the real address bus matches the content of the tag of a certain line in the selected set (Yes in S1), but the valid flag of this line is 0 (No in S2), the control
境界判定部23の判定(S55)により、実アドレスバスの第3ビットと第2ビットの両方が1(S55でYes)ならば、図21(f)(g)の動作左欄「最上位アドレスにpush」の動作を行う。即ち、リフィル部28は、このラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを行わず、フラグ設定部27はvalidフラグを1にする(S24)。
If both the third bit and the second bit of the real address bus are 1 (Yes in S55) as a result of the determination (S55) by the
次に、データ書き込み部21は32ビット幅のデータバスからライトしたいワードデータを読み込み、このラインの実アドレスバスの下位4ビットに該当する領域にライトする(S11)。続いて、制御部200はキャッシュビジー応答信号をオフにする(以上、図21(f)(g)の動作左欄「最上位アドレスにpush」)。MPU113はキャッシュビジー応答信号がオフになったことを検出して、push命令による処理が完了したことを知る。フラグ設定部27は、dirtyフラグを1にセットする(図21(f)(g)の動作左欄「最上位アドレスにpush」;S15)。もしもこの時stackフラグが0ならば、フラグ設定部27はstackフラグを1にする(図21(f)動作左欄「最上位アドレスへpush」;S15)。
Next, the
ステップS55の判定において、実アドレスバスの第3ビットと第2ビットの何れか少なくとも一方が0(S55でNo)ならば、制御部200は図21(f)(g)の動作右欄「最上位アドレス以外へpush」の動作を行う。即ち、リフィル部28は、このラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを実行する(S21)。次に、フラグ設定部27はvalidフラグを1にする(S24)。続いて、データ書き込み部21は32ビット幅のデータバスからライトしたいワードデータを読み込み、このラインの実アドレスバスの下位4ビットに該当する領域にライトする(S11)。その後、制御部200はキャッシュビジー応答信号をオフにする。それに伴い、フラグ設定部27はdirtyフラグを1にセットする。
If it is determined in step S55 that at least one of the third bit and the second bit of the real address bus is 0 (No in S55), the
ステップS1の判定において、実アドレスバスの上位20ビットの値と選択したセット中のラインのタグの内容とが一致するものがなければ(S1においてNo)、キャッシュミス判定部24はキャッシュがミスしたと判断する。それに伴って、制御部200は図21(a)の動作を行う。即ち、ライン開放部25は、このセットからLRUアルゴリズムによって1つのラインを開放する(S301)。境界判定部23の判定(S56)により、実アドレスバスの第3ビットと第2ビットの両方が1(S56でYes)ならば、リフィル部28は、このラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを行わない。続いてタグ更新部26は、開放されたラインに対応づけられたタグを変更する(S22)。次に、フラグ設定部27は、validフラグを1に、dirtyフラグを0に、stackフラグを0にセットする(S27)。これによって図21(b)と同じ状態になるので、以後制御部200は図21(b)の動作を実行する。
If it is determined in step S1 that there is no match between the value of the upper 20 bits of the real address bus and the contents of the tag of the line in the selected set (No in S1), the cache
ステップS56の判定において、実アドレスバスの第3ビットと第2ビットの何れか少なくとも一方が0(S56でNo)ならば、リフィル部28は、このラインに対して主記憶装置から該当するアドレスに記憶している情報のリフィルを実行する(S21)。その後は、制御部200は、ステップS56の判定がYesの場合と同様に、ステップS22以下の処理を実行する。
If it is determined in step S56 that at least one of the third bit and the second bit of the real address bus is 0 (No in S56), the
以上のように、MPU113がpush命令を実行する場合に、データを書き込むべき小領域がライン境界にあるとき(S56でYes)には、制御部200はキャッシュミスに伴うライン開放(S301)の後に、無用なリフィル(S21)を行わない。このため、メモリアクセス速度が向上する。更に、データを書き込みを行うべき小領域がライン境界にない場合(S56でNo)にキャッシュミスが生じたときには、制御部200は、リフィル(S21)を行う。このため、MPU113はpush命令に伴うデータの連続書き込みを、ライン境界に隣接する小領域に対応するアドレスだけでなく、ライン境界に隣接しない小領域に対応するアドレスからも開始することができる。
As described above, when the
また、ラインが開放された場合(S301)だけでなく、validフラグがラインの開放を示す0である場合(S2でNo)にも、制御部200は、データを書き込むべき小領域の位置に応じて(S55)、リフィル(S21)を行うか否かを選択する。このため、ラインが既に開放されている場合にも、無用なリフィルが回避され、それによってメモリアクセス速度が更に向上する。
In addition to the case where the line is released (S301) and the case where the valid flag is 0 indicating that the line is released (No in S2), the
図22に示すように、以上の動作の後或いは途中、もしも転送ビジー応答信号がオフならば、転送データバスが空いているので、制御部200は当分の間必要となる可能性の低いメモリについて予めライトバックを実行する。具体的には、転送ビジー判定部15が転送ビジー応答信号がオフであることを検出すると(S61でYes)、制御部200は、MMU115のアドレス変換の単位である、ラインに含まれるタグの値の方が現在のSPの実アドレスの上位20ビットよりも大きいアドレスであるオフセットアドレスに対応するラインか、またはラインに含まれるタグの値とそのラインを含むセットによって示される実アドレスの上位28ビットが、現在のSPの実アドレスの上位28ビットよりも3以上大きなアドレス(同じく、オフセットアドレスと称する)に対応するラインを、1つ見付け図18の動作左欄「SPが下方に遠ざかった」に示す動作を行う。すなわち、オフセット算出部14は、上記のオフセットアドレスを算出し、キャッシュミス判定部24はオフセットアドレスに対応するラインについてキャッシュミスが生じているか否かを判定する(S81)。
As shown in FIG. 22, after or during the above operation, if the transfer busy response signal is off, since the transfer data bus is free, the
キャッシュミス判定部24がこのようなラインを見付けることはできた場合(S81でYes)であっても、そのラインのvalidフラグとdirtyフラグとstackフラグの何れか少なくとも1つが0(S73でNo)ならば、制御部200は何も行わない(図18動作左欄(b)〜(d)(f)(g))。キャッシュミス判定部24がこのようなラインを見付けることができ(S81でYes)、且つそのラインのvalidフラグとdirtyフラグとstackフラグの全てが1(S73でYes)ならば、ライトバック部29は、そのラインのライトバックを行う(S75)。続いて、フラグ設定部27は、dirtyフラグを0にする(S77)(以上、図18動作左欄(e))。これによって、その後にこのラインがLRUアルゴリズムによって開放されることになった時、改めてライトバックを行う必要がなく、処理を高速化することができる。
Even when the cache
キャッシュミス判定部24がこのようなラインを見付けることができなければ(S81でNo)、制御部200は何も行わない(図18動作左欄(a))。
If the cache
(3.動作例1)
本発明の実施の形態によるデータメモリキャッシュシステムの動作例について、MPU113としてC言語で記述されたプログラムを実行する汎用CPUが用いられた場合を例に、図23〜図29を使って詳細に説明する。
(3. Operation example 1)
An operation example of the data memory cache system according to the embodiment of the present invention will be described in detail with reference to FIGS. 23 to 29, assuming that a general-purpose CPU that executes a program described in C language is used as
C言語で記述されたプログラムは、例えば上位アドレスから下位アドレス方向に向けて成長するスタック構造を使用する。当該プログラムは、汎用CPU内に存在する専用スタックポインタ(SP)を使用し、同汎用CPU内に存在する汎用レジスタをフレームポインタ(FP)として使用し、このスタック構造にアクセスを実行する。この時のスタック構造の一例を図23に示す。この例には1つの関数の実行に関わるスタック構造だけを示している。実際には、既に実行された関数コール(呼び出し)の数に対応するスタック構造が、下方に積み重ねられた構造をしている。 A program written in the C language uses, for example, a stack structure that grows from an upper address to a lower address. The program uses a dedicated stack pointer (SP) existing in the general-purpose CPU, uses a general-purpose register existing in the general-purpose CPU as a frame pointer (FP), and executes access to this stack structure. An example of the stack structure at this time is shown in FIG. In this example, only a stack structure related to execution of one function is shown. Actually, a stack structure corresponding to the number of function calls (calls) already executed has a structure stacked below.
次に、この構造がC言語による新しい関数呼び出しでどのように生成(変化)されるかを説明する。C言語の関数が呼び出される時にはまず、関数を呼び出す側がスタックトップにpush命令を使い、関数側での処理に必要な引き数を生成する。この引き数を関数に引き渡すためである。この引き数を生成した直後のスタック構造を図24に示す。 Next, how this structure is generated (changed) by a new function call in the C language will be described. When a C-language function is called, first, the side that calls the function uses the push instruction at the top of the stack to generate arguments required for processing on the function side. This is to pass this argument to the function. FIG. 24 shows a stack structure immediately after the generation of the argument.
次に、関数呼び出しを実行する。この時、push命令を実行して関数からの戻りアドレスをスタックに退避する。この関数呼び出し実行直後のスタック構造を図25に示す。 Next, a function call is executed. At this time, a push instruction is executed, and the return address from the function is saved on the stack. FIG. 25 shows the stack structure immediately after executing this function call.
次にプログラムの実行は、呼び出された関数側に移行する。呼び出された関数側では最初に、push命令を実行し、フレームポインタをも含めた関数内部で使用するレジスタをスタックに退避する。このレジスタ退避直後のスタック構造を図26に示す。 Next, the execution of the program shifts to the called function side. The called function first executes a push instruction, and saves registers used in the function including the frame pointer to the stack. FIG. 26 shows the stack structure immediately after the register is saved.
次に呼び出された関数では、スタックポインタの値をフレームポインタに設定し、スタックフレームを生成するために、スタックポインタからスタックフレームのサイズを減算する。これによってスタックポインタはより下位アドレス側に移動し、このスタックポインタとフレームポインタの間にスタックフレームが生成される。スタックフレームが生成された直後のスタック構造を図27に示す。 Next, the called function sets the value of the stack pointer to the frame pointer, and subtracts the size of the stack frame from the stack pointer to generate a stack frame. As a result, the stack pointer moves to a lower address, and a stack frame is generated between the stack pointer and the frame pointer. FIG. 27 shows a stack structure immediately after a stack frame is generated.
呼び出された関数側では、次に、フレームポインタ相対リード・ライト命令、スタックポインタ相対リード・ライト命令、ランダムリード・ライト命令等を実行して、引き数にアクセスしたり、スタックフレームにアクセスし、必要な情報にアクセスして関数の処理を実行する。また必要なら、他の関数呼び出しを実行することもある。 Next, the called function executes a frame pointer relative read / write instruction, a stack pointer relative read / write instruction, a random read / write instruction, etc. to access an argument or access a stack frame. Access necessary information and execute function processing. It may also perform other function calls if necessary.
呼び出された関数側では、関数の処理を終了すると、使用していたスタックフレームを破棄するため、スタックポインタにスタックフレームのサイズを加算する。そしてpop命令を実行し、退避していたレジスタを復元する。この時のスタック構造は、関数呼び出し直後のスタック構造と完全に同じ状態に復元され、図25に示される。 Upon termination of the processing of the function, the called function adds the size of the stack frame to the stack pointer in order to discard the used stack frame. Then, the pop instruction is executed to restore the saved register. The stack structure at this time is restored to the same state as the stack structure immediately after the function call, and is shown in FIG.
次にpop命令を実行して、呼び出し側の関数へ戻るためのアドレスを取り出し、リタン命令によって、呼び出された関数から呼び出した関数にプログラム実行を復帰させる。この時のスタック構造は、関数に引き渡すための引き数を生成した直後のスタック構造と完全に同一となり、図24に示す。復帰した呼び出し関数側では、引き数列を廃棄するため、スタックポインタに引き数列の大きさを加算する。例えば図24の例では2掛けるワードサイズに相当する値である。 Next, a pop instruction is executed, an address for returning to the function on the calling side is taken out, and the program execution is returned from the called function to the called function by the return instruction. The stack structure at this time is completely the same as the stack structure immediately after the argument to be passed to the function is generated, and is shown in FIG. On the returning calling function side, the size of the argument sequence is added to the stack pointer in order to discard the argument sequence. For example, in the example of FIG. 24, the value is a value corresponding to two times the word size.
以上の処理によって、スタック構造は、関数呼び出し処理を開始する前の構造に復帰する。この時のスタック構造は図23に示す通りである。 By the above processing, the stack structure returns to the structure before starting the function call processing. The stack structure at this time is as shown in FIG.
以上の関数呼び出しに関わる一連の処理における、スタックフレーム生成直後のキャッシュラインの状態を図28に示す。図28に示す通り、スタックフレーム以外の部分はスタックとして使用され、そのためにラインのstackフラグは1が設定される。キャッシュラインの単位は16バイトであり、スタック構造の単位は4バイトであるので、スタックフレームとレジスタ退避スタックとの境界がキャッシュラインの境界と一致するとは限らない。 FIG. 28 shows the state of the cache line immediately after the generation of the stack frame in a series of processes related to the above function call. As shown in FIG. 28, a portion other than the stack frame is used as a stack, and therefore, the stack flag of the line is set to 1. Since the unit of the cache line is 16 bytes and the unit of the stack structure is 4 bytes, the boundary between the stack frame and the register save stack does not always coincide with the boundary of the cache line.
本発明によると、レジスタ退避スタックとスタックフレームとが同居しているラインでは、stackフラグが1に設定される。またスタックフレームと引き数列が同居しているラインではstackフラグが0に設定される。関数処理実行中に、引き数列やスタックフレームに対するアクセスを実行すると、通常これらのアクセスはランダムリード・ライト命令によって行われるため、1に設定されていたstackフラグも0に変化することが起ってくる。従って、レジスタ退避スタックとスタックフレームとが同居したラインや、引き数列と戻りアドレスが同居しているラインも、stackフラグは0に変化する。この時の各ラインのフラグの状態を図29に示す。 According to the present invention, the stack flag is set to 1 in a line where the register save stack and the stack frame coexist. The stack flag is set to 0 in a line where the stack frame and the argument string coexist. If an access is made to an argument sequence or a stack frame during execution of a function process, the access is normally performed by a random read / write instruction, so that the stack flag set to 1 also changes to 0. come. Accordingly, the stack flag also changes to 0 for the line where the register save stack and the stack frame coexist, and the line where the argument sequence and the return address coexist. FIG. 29 shows the state of the flag of each line at this time.
(4.動作例2)
本発明の実施の形態によるデータメモリキャッシュシステムの別の動作例について、MPU113としてJava(登録商標)言語で記述されたプログラムを実行する汎用CPUが用いられた場合を例に、図30〜図34を使って詳細に説明する。
(4. Operation example 2)
FIGS. 30 to 34 show another operation example of the data memory cache system according to the embodiment of the present invention in a case where a general-purpose CPU that executes a program described in the Java (registered trademark) language is used as
C言語で記述されたプログラムは、例えばC言語で記述されたインタープリタによって実行される。このインタープリタは、C言語で記述されたプログラムを実行するためのプログラムカウンタの他に、Java(登録商標)仮想マシンを実装するために必要なJava(登録商標)プログラムカウンタを有している。またスタック構造においても、C言語で記述されたプログラムを実行するためのスタック構造以外に、Java(登録商標)仮想マシンを実装するために必要なJava(登録商標)スタック構造を有している。 The program described in the C language is executed by, for example, an interpreter described in the C language. This interpreter has a Java (registered trademark) program counter necessary for implementing a Java (registered trademark) virtual machine in addition to a program counter for executing a program described in C language. The stack structure also has a Java (registered trademark) stack structure necessary for mounting a Java (registered trademark) virtual machine, in addition to a stack structure for executing a program described in C language.
Java(登録商標)スタック構造も例えば、上位アドレスから下位アドレス方向に向けて成長するスタック構造を使用することができる。このJava(登録商標)スタック構造では例えば、汎用CPU内に存在する汎用レジスタをスタックポインタ(SP)として使用し、このJava(登録商標)スタック構造にアクセスを実行する。 As the Java (registered trademark) stack structure, for example, a stack structure that grows from an upper address toward a lower address can be used. In the Java (registered trademark) stack structure, for example, a general-purpose register existing in a general-purpose CPU is used as a stack pointer (SP), and access is performed to the Java (registered trademark) stack structure.
Java(登録商標)スタック構造の一例を図30に示す。図30には、1つのメソッド(C言語における関数に相当する)の処理に対応するJava(登録商標)スタック構造が示されている。実際には、これまでに発生したメソッド呼び出し(コール:call)に相当する数のスタック構造が、下方に積み重ねられた構造をなしている。 FIG. 30 shows an example of the Java (registered trademark) stack structure. FIG. 30 shows a Java (registered trademark) stack structure corresponding to processing of one method (corresponding to a function in the C language). Actually, the number of stack structures corresponding to the method calls (calls) that have occurred so far is a structure that is stacked below.
次に、このスタック構造が、Java(登録商標)言語による新しいメソッド呼び出しによってどのように生成(変化)されるかを説明する。最初に、新しいメソッドを呼び出すメソッド呼び出し側が、スタックトップにpush命令を実行することによってメソッド内での処理に使用するための引き数を設定する。この引き数列生成直後のJava(登録商標)スタック構造を図31に示す。この引き数列は、呼び出されるメソッド側での処理で必要となる値を、メソッド呼び出し側から呼び出されるメソッド側に引き渡すために使用される。 Next, how this stack structure is generated (changed) by a new method call in the Java (registered trademark) language will be described. First, a method caller that calls a new method sets an argument to be used for processing in the method by executing a push instruction at the top of the stack. FIG. 31 shows a Java (registered trademark) stack structure immediately after the argument string generation. This argument string is used to pass a value required for processing on the called method side to the called method side from the method calling side.
次にメソッド呼び出しが実行される。メソッドからの戻りJava(登録商標)アドレスは、C言語スタックに退避される。このアドレスの退避はJava(登録商標)スタック構造とは直接関係しないので説明を省略する。このメソッド呼び出しによって、Java(登録商標)プログラムの制御は、呼び出されたメソッド側に移行する。呼び出されたJava(登録商標)メソッド側では、使用するレジスタの退避が必要であったならばこれらのレジスタの値をC言語スタックに退避する。このレジスタの退避もJava(登録商標)スタック構造とは直接関係しないので説明を省略する。 Next, the method call is executed. The return Java (registered trademark) address from the method is saved in the C language stack. The saving of this address is not directly related to the Java (registered trademark) stack structure, and therefore the description is omitted. By this method call, control of the Java (registered trademark) program shifts to the called method side. On the called Java (registered trademark) method side, if it is necessary to save registers to be used, the values of these registers are saved on the C language stack. The saving of this register is not directly related to the Java (registered trademark) stack structure, and therefore, the description is omitted.
次に、呼び出されたメソッドでは、自分自身が実行する処理で必要となるローカル変数のための領域を生成するために、Java(登録商標)スタックポインタの値からローカル変数の領域のサイズに相当する値を減算する。このローカル変数領域生成直後のJava(登録商標)スタック構造を図32に示す。 Next, in the called method, in order to generate an area for a local variable required in the processing executed by itself, the method corresponding to the size of the area of the local variable is obtained from the value of the Java (registered trademark) stack pointer. Subtract the value. FIG. 32 shows a Java (registered trademark) stack structure immediately after the generation of the local variable area.
呼び出されたメソッドでは、その後、Java(登録商標)スタックポインタ相対アドレス指定である、SP相対リード・ライト命令によって引き数やローカル変数にアクセスし、メソッドの処理を実行する。 In the called method, an argument or a local variable is accessed by an SP relative read / write instruction, which is a Java (registered trademark) stack pointer relative address designation, and the method is executed.
Java(登録商標)言語はスタック指向言語であるためJava(登録商標)命令でのオペランドは、必ずJava(登録商標)スタックポインタ相対として指定される。例えば加算(add)命令ではオペランドが明示的に指定されることはなく、Java(登録商標)スタックのトップとセカンドに自動的に設定される。従って、Java(登録商標)インタープリタはadd命令を実行するには、pop命令を2回実行することによってJava(登録商標)スタック中のオペランドスタックから2つの値を読み出し、加算を実行し、その結果をpush命令を実行することによってJava(登録商標)スタック中のオペランドスタックのトップに格納する。この処理を実行中のJava(登録商標)スタック構造を図33に示す。 Since the Java (registered trademark) language is a stack-oriented language, the operand in the Java (registered trademark) instruction is always specified as a relative to the Java (registered trademark) stack pointer. For example, in an addition (add) instruction, the operand is not explicitly specified, but is automatically set to the top and second of the Java (registered trademark) stack. Therefore, to execute the add instruction, the Java interpreter reads the two values from the operand stack in the Java stack by executing the pop instruction twice, and executes the addition. Is stored at the top of the operand stack in the Java (registered trademark) stack by executing a push instruction. FIG. 33 shows a Java (registered trademark) stack structure in which this processing is being executed.
呼び出されたメソッドでは必要に応じて、更に他のメソッドを呼び出すこともある。呼び出されたメソッドでの処理が終了した時点で、Java(登録商標)スタック中のオペランドスタックは空になる。そしてローカル変数領域と引き数列を破棄するため、Java(登録商標)スタックポインタにこれの合計サイズに相当する値を加算する。この時のJava(登録商標)スタック構造は、Java(登録商標)メソッド呼び出し処理を開始する前のJava(登録商標)スタック構造に復帰する。この時のJava(登録商標)スタック構造は図30に示される。 The called method may call another method as needed. When the processing in the called method ends, the operand stack in the Java (registered trademark) stack becomes empty. Then, in order to discard the local variable area and the argument sequence, a value corresponding to the total size thereof is added to the Java (registered trademark) stack pointer. At this time, the Java (registered trademark) stack structure returns to the Java (registered trademark) stack structure before starting the Java (registered trademark) method calling process. The Java (registered trademark) stack structure at this time is shown in FIG.
以上のJava(登録商標)メソッド呼び出し処理の実行における、処理実行中のキャッシュラインの状態を、図34に示す。図34に示す通り、このメソッド呼び出し処理のために生成したラインのstackフラグは1に設定される。また、Java(登録商標)スタックポインタがスタックボトムから遠ざかることによって、スタックポインタから離れたラインで転送ビジー応答信号がオフの時間中にライトバックが実行され、そのラインのdirtyフラグが0に設定された状態をも図34に示す。 FIG. 34 shows the state of the cache line during execution of the above-described Java (registered trademark) method invocation processing. As shown in FIG. 34, the stack flag of the line generated for this method calling process is set to 1. Further, as the Java (registered trademark) stack pointer moves away from the stack bottom, write-back is executed during a time when the transfer busy response signal is off at a line distant from the stack pointer, and the dirty flag of the line is set to 0. FIG. 34 also shows the state in which it is closed.
本発明のデータメモリキャッシュ装置及びデータメモリキャッシュシステムは、メモリアクセス速度を向上させるので、産業上有用である。 INDUSTRIAL APPLICABILITY The data memory cache device and the data memory cache system of the present invention improve the memory access speed, and are industrially useful.
5 ランダムライト検出部 6 ランダムリード検出部
7 SP相対ライト検出部 8 SP相対リード検出部
11 プッシュアクセス検出部 12 ポップアクセス検出部
21 データ書き込み部 22 データ読み出し部
23 境界判定部 24 キャッシュミス判定部
25 ライン開放部(データ領域開放部) 26 タグ更新部
27 フラグ検出部 28 リフィル部
29 ライトバック部 100 データメモリキャッシュシステム
113 演算ユニット(MPU) 115 メモリマネジメントユニット(MMU)
117 スタック対応データキャッシュユニット(データメモリキャッシュ装置)
119 転送制御ユニット 131 主記憶装置
200 制御部 300 データ保持部
910,920,930,940 スタックメモリ
913,923,933,943 スタックポインタ
5
117 Stack-compatible data cache unit (data memory cache device)
119
Claims (29)
データを保持するための複数のデータ領域を有し、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数のデータ領域の各々は複数の小領域に分割されており、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされるデータ保持部と、
前記演算ユニットから、前記主記憶装置の連続したアドレスへのデータの書き込みである連続書き込みの要求があり、且つ前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域にキャッシュミスが発生した場合に前記対象データ領域を開放した後に、前記対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域が、アドレスの順序に関して前記連続書き込みの早い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、前記主記憶装置から前記対象データ領域へのデータの読み込みを行わずに前記演算ユニットが出力するデータを前記対象小領域へ書き込み、前記対象小領域が前記データ領域境界に隣接しない場合には、前記主記憶装置から前記対象データ領域へのデータの読み込みを行った上で前記演算ユニットが出力するデータを前記対象小領域へ書き込む制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
It has a plurality of data areas for holding data, and the data held by each of the plurality of data areas is read and written to the main storage device at a time, and each of the plurality of data areas is a plurality of small areas. And a data holding unit that data held by each of the plurality of small areas is read and written to the arithmetic unit at a time,
A cache miss occurs in the target data area, which is a data area corresponding to an address output from the arithmetic unit, when the arithmetic unit requests continuous writing of data to continuous addresses in the main storage device. Then, after releasing the target data area, the target small area in the target data area, which is a small area corresponding to the address output by the arithmetic unit, is positioned in the early direction of the continuous writing with respect to the address order. In the case where the target data area is adjacent to a data area boundary, data output from the arithmetic unit without reading data from the main storage device to the target data area is transferred to the target small area. When writing, if the target small area is not adjacent to the data area boundary, the Data memory cache device and a control unit for writing the data to be output the arithmetic unit after performing the loading of data into the target data area to the target small area.
前記演算ユニットからの前記連続書き込みの要求を検出するプッシュアクセス検出部と、
前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記対象データ領域についてキャッシュミスの有無を判定するキャッシュミス判定部と、
前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、
前記キャッシュミス判定部が前記キャッシュミスの発生を判定した場合に、前記対象データ領域を開放するデータ領域開放部と、
前記データ領域開放部が前記対象データ領域を開放した場合に、前記境界判定部の判定が否定的であるときには、前記データ領域開放部が開放した前記対象データ領域へ前記主記憶装置からデータを読み込み、前記境界判定部の判定が肯定的であるときには、前記データ領域開放部が開放した前記対象データ領域へ前記主記憶装置からデータを読み込まないリフィル部と、
前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記演算ユニットが出力するデータを前記対象小領域に書き込むデータ書き込み部とを備える請求項1記載のデータメモリキャッシュ装置。 The control unit includes:
A push access detection unit that detects the request for the continuous writing from the arithmetic unit;
When the push access detection unit detects the request for continuous writing, a cache miss determination unit that determines whether there is a cache miss for the target data area;
When the push access detection unit detects the request for continuous writing, a boundary determination unit that determines whether the target small area is adjacent to the data area boundary,
A data area release unit that releases the target data area when the cache miss determination unit determines the occurrence of the cache miss;
When the data area release unit releases the target data area, when the determination of the boundary determination unit is negative, data is read from the main storage device to the target data area released by the data area release unit. A refill unit that does not read data from the main storage device to the target data area released by the data area release unit when the determination by the boundary determination unit is positive;
2. The data memory cache device according to claim 1, further comprising: a data writing unit that writes data output by the arithmetic unit to the target small area when the push access detection unit detects the request for continuous writing.
前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、
前記リフィル部は、前記対象データ領域に対応する適正フラグが開放を示す側に設定されている場合にも、前記境界判定部の判定が否定的であるときには、前記対象データ領域へ前記主記憶装置からデータを読み込み、前記境界判定部の判定が肯定的であるときには、前記対象データ領域へ前記主記憶装置からデータを読み込まない請求項2記載のデータメモリキャッシュ装置。 The data holding unit includes:
The apparatus further includes a plurality of appropriate flag holding units that hold a plurality of appropriate flags respectively indicating release or unopening of the plurality of data areas,
The refill unit is configured to return the main storage device to the target data area even when the appropriate flag corresponding to the target data area is set to a side indicating open, when the determination of the boundary determination unit is negative. 3. The data memory cache device according to claim 2, wherein data is read from the main storage device to the target data area when the boundary determination unit determines that the data is read.
前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、
前記制御部は、
前記境界判定部の判定が肯定的である場合には、前記データ書き込み部が前記データの書き込みを終了した後に、前記対象データ領域に対応するスタックフラグを肯定側に設定し、前記境界判定部の判定が否定的である場合には、前記データ書き込み部が前記データの書き込みを終了した後に、前記対象データ領域に対応するスタックフラグを変更しないスタックフラグ設定部を更に備える請求項2又は3記載のデータメモリキャッシュ装置。 The data holding unit includes:
Further comprising a plurality of stack flag holding unit holding a plurality of stack flags indicating whether the plurality of data areas are used for either continuous writing or continuous reading,
The control unit includes:
If the determination by the boundary determination unit is affirmative, after the data writing unit finishes writing the data, a stack flag corresponding to the target data area is set to a positive side, and the boundary determination unit determines 4. The stack flag setting unit according to claim 2, further comprising a stack flag setting unit that does not change a stack flag corresponding to the target data area after the data writing unit finishes writing the data when the determination is negative. Data memory cache device.
前記データ保持部は、
前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、
前記制御部は、
前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位側部分とを抽出するアドレス抽出部を更に備え、
前記キャッシュミス判定部は、前記アドレス抽出部が抽出した前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記アドレス抽出部が抽出した前記上位部分とを比較し、何れも一致しない場合に前記キャッシュミスが発生したと判定し、
前記境界判定部は、前記複数の小領域のうち前記アドレス抽出部が抽出した前記下位部分に対応する小領域が、アドレスの順序に関して当該小領域が属するデータ領域の前記連続書き込みの早い方向に位置する境界に隣接するか否かを判定することにより、前記対象小領域が前記データ領域境界に隣接するか否かを判定し、
前記データ領域開放部は、前記プッシュアクセス検出部が前記連続書き込みの要求を検出し、且つ前記キャッシュミス判定部が前記キャッシュミスの発生を判定した場合に、前記アドレス抽出部が抽出した前記中位部分に対応する前記1以上のデータ領域の何れかを開放することにより前記対象データ領域を開放し、
前記制御部は、
前記データ領域開放部が開放した前記データ領域に対応づけられたタグを、前記アドレス抽出部が抽出した前記上位部分に更新するタグ更新部を更に備え、
前記データ書き込み部は、前記アドレス抽出部が抽出した前記中位部分に対応し且つ前記アドレス抽出部が抽出した前記上位部分を保持するタグに対応づけられたデータ領域中の前記アドレス抽出部が抽出した前記下位部分に対応する小領域を前記対象小領域として、当該対象小領域へ前記演算ユニットが出力するデータを書き込む請求項2乃至4の何れかに記載のデータメモリキャッシュ装置。 The plurality of data areas are associated with a middle portion of an address of the main storage device, and each of the plurality of small regions is associated with a lower portion of an address of the main storage device, One or more data areas correspond to the same value in the middle part of the device address,
The data holding unit includes:
The apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas,
The control unit includes:
An address extraction unit that extracts the upper part, the middle part, and the lower part from an address output by the arithmetic unit,
The cache miss determination unit includes a value indicated by a tag associated with each of the one or more data areas corresponding to the middle portion extracted by the address extraction unit, and the upper portion extracted by the address extraction unit. Are compared, it is determined that the cache miss has occurred if none match,
The boundary determination unit is configured such that a small region corresponding to the lower part extracted by the address extraction unit among the plurality of small regions is located in an address order in an earlier direction of the continuous writing of the data region to which the small region belongs. Determining whether or not the target small area is adjacent to the data area boundary,
The data area release unit is configured to, when the push access detection unit detects the request for continuous writing, and when the cache miss determination unit determines the occurrence of the cache miss, extract the medium extracted by the address extraction unit. Releasing the target data area by releasing any of the one or more data areas corresponding to the portion;
The control unit includes:
A tag update unit that updates a tag associated with the data area released by the data area release unit to the upper part extracted by the address extraction unit,
The data writing unit is configured to extract the address extraction unit in a data area corresponding to the middle part extracted by the address extraction unit and associated with a tag holding the upper part extracted by the address extraction unit. 5. The data memory cache device according to claim 2, wherein the small area corresponding to the lower part is set as the target small area, and data output by the arithmetic unit is written to the target small area.
前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、
前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを行う場合に、前記データ保持部のうち前記連続読み出しが終了しているデータ領域を、前記連続読み出しが終了しているデータ領域が保持するデータを前記主記憶装置へ書き戻すことなく開放する制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
A data holding unit that is associated with an address of the main storage device and includes a plurality of data areas for holding data of the corresponding address;
When performing continuous reading, which is reading of data from the continuous addresses of the main storage device to the arithmetic unit, the data area in the data holding unit where the continuous reading is completed is terminated. A data memory cache device comprising: a control unit that releases data held in the data area without writing back to the main storage device.
前記制御部は、前記演算ユニットから、前記主記憶装置の連続したアドレスからのデータの読み出しである連続読み出しの要求があった場合に、前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域から前記演算ユニットへのデータの読み出しを行うとともに、前記対象小領域が、アドレスの順序に関して前記連続読み出しの遅い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、前記対象データ領域から前記主記憶装置へのデータの書き戻しを行うことなく前記対象データ領域を開放し、前記対象小領域が前記データ領域境界に隣接しない場合には、前記対象データ領域を開放しない請求項6記載のデータメモリキャッシュ装置。 Data held by each of the plurality of data areas is read and written to the main storage device at a time, and each of the plurality of data areas is divided into a plurality of small areas, and each of the plurality of small areas is The retained data is read and written to the operation unit at a time,
The control unit is a data area corresponding to an address output by the arithmetic unit when a request for continuous reading, which is reading of data from consecutive addresses in the main storage device, is issued from the arithmetic unit. Data is read from the target small area, which is a small area corresponding to the address output by the arithmetic unit in the data area, to the arithmetic unit, and the target small area is slow in the continuous reading with respect to the address order. In the case where it is adjacent to a data area boundary that is a boundary of the target data area located in the direction, the target data area is released without performing data write-back from the target data area to the main storage device, 7. The target data area is not released when the target small area is not adjacent to the data area boundary. Placing data memory cache device.
前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、
前記制御部は、前記対象データ領域に対応づけられた適正フラグを、開放を示す側に設定することにより、前記対象データ領域を開放する請求項7記載のデータメモリキャッシュ装置。 The data holding unit includes:
The apparatus further includes a plurality of appropriate flag holding units that hold a plurality of appropriate flags respectively indicating release or unopening of the plurality of data areas,
8. The data memory cache device according to claim 7, wherein the control unit releases the target data area by setting a proper flag associated with the target data area to a side indicating release.
前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域のデータを前記演算ユニットへ読み出すデータ読み出し部と、
前記境界判定部の判定が肯定的であるときには、前記データ読み出し部による前記データの読み出し後に、前記対象データ領域から前記主記憶装置へのデータの書き戻しを行うことなく前記対象データ領域に対応づけられた前記適正フラグを、開放を示す側に設定し、前記対象小領域が前記データ領域境界に隣接しない場合には、前記対象データ領域に対応づけられた前記適正フラグを変更しない適正フラグ設定部とを備える請求項8記載のデータメモリキャッシュ装置。 The control unit includes:
A pop access detection unit that detects the request for continuous reading from the arithmetic unit;
A boundary determination unit that determines whether the target small area is adjacent to the data area boundary when the pop access detection unit detects the request for continuous reading;
A data reading unit that reads data of the target small area to the arithmetic unit when the pop access detection unit detects the request for continuous reading;
When the determination by the boundary determination unit is affirmative, after the data is read by the data read unit, the data is associated with the target data area without writing back the data from the target data area to the main storage device. Setting the appropriate flag set to the open side, and when the target small area is not adjacent to the data area boundary, an appropriate flag setting unit that does not change the appropriate flag associated with the target data area 9. The data memory cache device according to claim 8, comprising:
データを保持するための複数のデータ領域を有し、前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数のデータ領域の各々は複数の小領域に分割されており、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされるデータ保持部と、
前記演算ユニットから、前記主記憶装置の連続したアドレスからのデータの読み出しである連続読み出しの要求があった場合に、前記演算ユニットが出力するアドレスに対応するデータ領域である対象データ領域中の前記演算ユニットが出力する前記アドレスに対応する小領域である対象小領域から前記演算ユニットへのデータの読み出しを行うとともに、前記対象小領域が、アドレスの順序に関して前記連続読み出しの遅い方向に位置する前記対象データ領域の境界であるデータ領域境界に隣接する場合には、その後前記対象データ領域を開放する時に前記対象データ領域から前記主記憶装置へのデータの書き戻しを禁止するための設定を行い、前記対象小領域が前記データ領域境界に隣接しない場合には、前記設定を行わない制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
It has a plurality of data areas for holding data, and the data held by each of the plurality of data areas is read and written to the main storage device at a time, and each of the plurality of data areas is a plurality of small areas. And a data holding unit that data held by each of the plurality of small areas is read and written to the arithmetic unit at a time,
When there is a continuous read request for reading data from consecutive addresses in the main storage device from the arithmetic unit, the target unit in the target data area, which is a data area corresponding to the address output by the arithmetic unit, Data is read from the target small area, which is a small area corresponding to the address output by the arithmetic unit, to the arithmetic unit, and the target small area is located in the slower direction of the continuous reading with respect to the address order. In the case of being adjacent to the data area boundary which is the boundary of the target data area, when the target data area is subsequently released, a setting is made to prohibit write-back of data from the target data area to the main storage device, When the target small area is not adjacent to the data area boundary, the control unit does not perform the setting. Data memory cache device to obtain.
前記複数のデータ領域が保持するデータと前記主記憶装置が対応するアドレスに保持するデータとの間の一致及び不一致をそれぞれ示す複数のダーティフラグを保持する複数のダーティフラグ保持部を更に備え、
前記制御部は、前記対象データ領域に対応するダーティフラグを前記一致を示す側に設定することにより前記設定を行う請求項10記載のデータメモリキャッシュ装置。 The data holding unit includes:
The apparatus further includes a plurality of dirty flag holding units that hold a plurality of dirty flags indicating match and mismatch between data held by the plurality of data areas and data held at an address corresponding to the main storage device, respectively.
11. The data memory cache device according to claim 10, wherein the control unit performs the setting by setting a dirty flag corresponding to the target data area to a side indicating the match.
前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域が前記データ領域境界に隣接するか否かを判定する境界判定部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記対象小領域のデータを前記演算ユニットへ読み出すデータ読み出し部と、
前記境界判定部の判定が肯定的であるときには、前記データ読み出し部による前記データの読み出し後に、前記対象データ領域に対応する前記ダーティフラグを前記一致を示す側に設定し、前記データ領域境界判定部の判定が否定的であるときには、前記対象データ領域に対応する前記ダーティフラグを変更しないダーティフラグ設定部とを備える請求項11記載のデータメモリキャッシュ装置。 The control unit includes:
A pop access detection unit that detects the request for continuous reading from the arithmetic unit;
A boundary determination unit that determines whether the target small area is adjacent to the data area boundary when the pop access detection unit detects the request for continuous reading;
A data reading unit that reads data of the target small area to the arithmetic unit when the pop access detection unit detects the request for continuous reading;
When the determination by the boundary determination unit is affirmative, after the data is read by the data reading unit, the dirty flag corresponding to the target data region is set to the side indicating the match, and the data region boundary determination unit 12. The data memory cache device according to claim 11, further comprising: a dirty flag setting unit that does not change the dirty flag corresponding to the target data area when the determination of the above is negative.
前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、
前記制御部は、
前記境界判定部の判定が肯定的である場合には、前記データ読み出し部が前記データの読み出しを終了した後に、前記対象データ領域に対応するスタックフラグを肯定側に設定し、前記境界判定部の判定が否定的である場合には、前記データ読み出し部が前記データの読み出しを終了した後に、前記対象データ領域に対応するスタックフラグを変更しないスタックフラグ設定部を更に備える請求項9又は12記載のデータメモリキャッシュ装置。 The data holding unit includes:
Further comprising a plurality of stack flag holding unit holding a plurality of stack flags indicating whether the plurality of data areas are used for either continuous writing or continuous reading,
The control unit includes:
If the determination by the boundary determination unit is positive, after the data reading unit finishes reading the data, the stack flag corresponding to the target data area is set to the positive side, and the boundary determination unit determines 13. The stack flag setting unit according to claim 9, further comprising a stack flag setting unit that does not change a stack flag corresponding to the target data area after the data reading unit finishes reading the data when the determination is negative. Data memory cache device.
前記データ保持部は、
前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、
前記制御部は、
前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、
前記境界判定部は、前記複数の小領域のうち前記アドレス抽出部が抽出した前記下位部分に対応する小領域が、アドレスの順序に関して当該小領域が属するデータ領域の前記連続読み出しの遅い方向に位置する境界に隣接するか否かを判定することにより、前記対象小領域が前記データ領域境界に隣接するか否かを判定し、
前記データ読み出し部は、前記アドレス抽出部が抽出した前記中位部分に対応し且つ前記アドレス抽出部が抽出した前記上位部分を示すタグに対応づけられたデータ領域中の前記アドレス抽出部が抽出した前記下位部分に対応する小領域を前記対象小領域として、当該対象小領域のデータを前記演算ユニットへ読み出す請求項9、12又は13記載のデータメモリキャッシュ装置。 The plurality of data areas are associated with a middle portion of an address of the main storage device, and each of the plurality of small regions is associated with a lower portion of an address of the main storage device, One or more data areas correspond to the same value in the middle part of the device address,
The data holding unit includes:
The apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas,
The control unit includes:
An address extraction unit that extracts the upper part, the middle part, and the lower part from an address output by the arithmetic unit,
The boundary determination unit may determine that, among the plurality of small regions, the small region corresponding to the lower part extracted by the address extraction unit is located in the slowest direction of the continuous reading of the data region to which the small region belongs with respect to the address order. Determining whether or not the target small area is adjacent to the data area boundary,
The data reading unit is extracted by the address extracting unit in a data area corresponding to the middle part extracted by the address extracting unit and associated with a tag indicating the upper part extracted by the address extracting unit. 14. The data memory cache device according to claim 9, 12 or 13, wherein a small area corresponding to the lower part is set as the target small area and data of the target small area is read out to the arithmetic unit.
前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、
前記演算ユニットから、前記主記憶装置の連続したアドレスへのデータの書き込みである連続書き込みを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続書き込みよりも連続書き込みの早い方向に位置する前記データ保持部中のデータ領域から前記主記憶装置へのデータの書き戻しを行う制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
A data holding unit that is associated with an address of the main storage device and includes a plurality of data areas for holding data of the corresponding address;
A period during which continuous writing is performed from the arithmetic unit to continuous addresses in the main storage device, and data is transferred between the data holding unit and the main storage device. During a period in which the data bus is not used, writing back data from the data area in the data holding unit, which is located in the direction of the continuous writing earlier than the continuous writing currently performed with respect to the address order, to the main storage device. A data memory cache device comprising:
前記演算ユニットからの前記連続書き込みの要求を検出するプッシュアクセス検出部と、
前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続書き込みの早い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、
前記オフセットアドレスについてキャッシュミスの有無を判定するキャッシュミス判定部と、
前記データバスが使用中であるか否かを判定する転送ビジー判定部と、
前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うライトバック部とを備える請求項15記載のデータメモリキャッシュ装置。 The control unit includes:
A push access detection unit that detects the request for the continuous writing from the arithmetic unit;
When the push access detection unit detects the request for continuous writing, an offset calculation unit that calculates an offset address that is an address shifted from the address output by the arithmetic unit at a predetermined interval in an earlier direction of the continuous writing,
A cache miss determining unit that determines whether there is a cache miss for the offset address,
A transfer busy determination unit that determines whether the data bus is in use;
When the cache miss determination unit determines that there is no cache miss and the transfer busy determination unit determines that the data bus is not used, the data transfer from the data area corresponding to the offset address to the main storage device is performed. The data memory cache device according to claim 15, further comprising: a write-back unit that performs write-back.
前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、
前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、
前記データ保持部は、
前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、
前記制御部は、
前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、
前記オフセット算出部は、前記プッシュアクセス検出部が前記連続書き込みの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続書き込みの早い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出し、
前記キャッシュミス判定部は、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合にキャッシュミスが発生したと判定する請求項16記載のデータメモリキャッシュ装置。 The plurality of data areas are associated with a middle part of the address of the main storage device, and one or more data areas correspond to the same value of the middle part,
Each of the plurality of data areas is divided into a plurality of small areas associated with the lower part of the address,
Data held by each of the plurality of data areas is read and written to the main storage device at a time, and data held by each of the plurality of small areas is read and written to the arithmetic unit at a time,
The data holding unit includes:
The apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas,
The control unit includes:
An address extraction unit that extracts the upper part, the middle part, and the lower part from an address output by the arithmetic unit,
The offset calculation unit, when the push access detection unit detects the request for continuous writing, determines whether the continuous writing is fast from the address represented by the middle part and the high order part extracted by the address extraction unit. An address shifted with a predetermined interval in the direction is calculated as the offset address,
The cache miss determination unit compares a value indicated by a tag associated with each of the one or more data areas corresponding to the middle part of the offset address with the upper part of the offset address, and 17. The data memory cache device according to claim 16, wherein it is determined that a cache miss has occurred when they do not match.
前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、
前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続読み出しよりも連続読み出しの早い方向に位置する前記データ保持部中のデータ領域から前記主記憶装置へデータの書き戻しを行う制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
A data holding unit that is associated with an address of the main storage device and includes a plurality of data areas for holding data of the corresponding address;
Data for transferring data between the data holding unit and the main storage device during a period in which a continuous read operation of reading data from a continuous address of the main storage device to the arithmetic unit is performed. Control for writing back data from the data area in the data holding unit, which is located in the direction of continuous reading earlier than the current continuous reading with respect to the address order, to the main storage device during the period when the bus is unused. And a data memory cache device.
前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続読み出しの早い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、
前記オフセットアドレスについてキャッシュミスの有無を判定するキャッシュミス判定部と、
前記データバスが使用中であるか否かを判定する転送ビジー判定部と、
前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行うライトバック部とを備える請求項18記載のデータメモリキャッシュ装置。 The control unit includes:
A pop access detection unit that detects the request for continuous reading from the arithmetic unit;
When the pop access detection unit detects the request for continuous reading, an offset calculation unit that calculates an offset address that is an address that is shifted from the address output by the arithmetic unit at a predetermined interval in an earlier direction of the continuous reading,
A cache miss determining unit that determines whether there is a cache miss for the offset address,
A transfer busy determination unit that determines whether the data bus is in use;
When the cache miss determination unit determines that there is no cache miss and the transfer busy determination unit determines that the data bus is not used, the data transfer from the data area corresponding to the offset address to the main storage device is performed. 19. The data memory cache device according to claim 18, further comprising: a write-back unit that performs write-back.
前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、
前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、
前記データ保持部は、
前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、
前記制御部は、
前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、
前記オフセット算出部は、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続読み出しの早い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出し、
前記キャッシュミス判定部は、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合にキャッシュミスが発生したと判定する請求項19記載のデータメモリキャッシュ装置。 The plurality of data areas are associated with a middle part of the address of the main storage device, and one or more data areas correspond to the same value of the middle part,
Each of the plurality of data areas is divided into a plurality of small areas associated with the lower part of the address,
Data held by each of the plurality of data areas is read and written to the main storage device at a time, and data held by each of the plurality of small areas is read and written to the arithmetic unit at a time,
The data holding unit includes:
The apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas,
The control unit includes:
An address extraction unit that extracts the upper part, the middle part, and the lower part from an address output by the arithmetic unit,
The offset calculation unit is configured to, when the pop access detection unit detects the request for continuous reading, start the continuous reading from the address represented by the middle part and the high order part extracted by the address extraction unit. An address shifted with a predetermined interval in the direction is calculated as the offset address,
The cache miss determination unit compares a value indicated by a tag associated with each of the one or more data areas corresponding to the middle part of the offset address with the upper part of the offset address, and 20. The data memory cache device according to claim 19, wherein when it does not match, it is determined that a cache miss has occurred.
前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、
前記ライトバック部は、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、更に前記オフセットアドレスに対応するデータ領域に対応する前記スタックフラグが肯定側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行う請求項16、17、19又は20記載のデータメモリキャッシュ装置。 The data holding unit includes:
Further comprising a plurality of stack flag holding unit holding a plurality of stack flags indicating whether the plurality of data areas are used for either continuous writing or continuous reading,
The write-back unit further corresponds to the data area corresponding to the offset address when the cache miss determination unit determines that there is no cache miss, and when the transfer busy determination unit determines that the data bus is not used. 21. The data memory according to claim 16, wherein write-back of data from the data area corresponding to the offset address to the main storage device is performed only when the stack flag is set to the positive side. Cache device.
前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、
前記ライトバック部は、前記キャッシュミス判定部が前記キャッシュミス無しと判定し、且つ前記転送ビジー判定部が前記データバスの不使用を判定した場合に、更に前記オフセットアドレスに対応するデータ領域に対応する前記適正フラグが未開放を示す側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域から前記主記憶装置へのデータの書き戻しを行う請求項16、17、19、20又は21記載のデータメモリキャッシュ装置。 The data holding unit includes:
The apparatus further includes a plurality of appropriate flag holding units that hold a plurality of appropriate flags respectively indicating release or unopening of the plurality of data areas,
The write-back unit further corresponds to the data area corresponding to the offset address when the cache miss determination unit determines that there is no cache miss, and when the transfer busy determination unit determines that the data bus is not used. 21. The write-back of data from the data area corresponding to the offset address to the main storage device is performed only when the appropriate flag is set to the side indicating the unreleased state. 22. The data memory cache device according to item 21.
前記主記憶装置のアドレスと対応づけられ、対応するアドレスのデータを保持するための複数のデータ領域を備えるデータ保持部と、
前記主記憶装置の連続したアドレスから前記演算ユニットへのデータの読み出しである連続読み出しを実行する期間であって、且つ前記データ保持部と前記主記憶装置との間でデータを転送するためのデータバスが不使用である期間に、アドレスの順序に関して現在行っている連続読み出しよりも連続読み出しの遅い方向に位置する前記データ保持部中のデータ領域へ前記主記憶装置からデータの読み込みを行う制御部とを備えるデータメモリキャッシュ装置。 A data memory cache device for use by being interposed between an arithmetic unit and a main storage device accessed by the arithmetic unit,
A data holding unit that is associated with an address of the main storage device and includes a plurality of data areas for holding data of the corresponding address;
Data for transferring data between the data holding unit and the main storage device during a period in which a continuous read operation of reading data from a continuous address of the main storage device to the arithmetic unit is performed. A control unit that reads data from the main storage device to a data area in the data holding unit that is located in a direction in which the continuous reading is performed later than the current continuous reading in the address order during a period in which the bus is not used. A data memory cache device comprising:
前記演算ユニットからの前記連続読み出しの要求を検出するポップアクセス検出部と、
前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記演算ユニットが出力するアドレスから前記連続読み出しの遅い方向へ所定間隔をもってずれたアドレスであるオフセットアドレスを算出するオフセット算出部と、
前記データバスが使用中であるか否かを判定する転送ビジー判定部と、
前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行うリフィル部とを備える請求項23記載のデータメモリキャッシュ装置。 The control unit includes:
A pop access detection unit that detects the request for continuous reading from the arithmetic unit;
When the pop access detection unit detects the request for continuous reading, an offset calculation unit that calculates an offset address that is an address shifted from the address output by the arithmetic unit at a predetermined interval in the slow direction of the continuous reading,
A transfer busy determination unit that determines whether the data bus is in use;
24. The data memory cache according to claim 23, further comprising: a refill unit that reads data from the main storage device into a data area corresponding to the offset address when the transfer busy determination unit determines that the data bus is not used. apparatus.
前記複数のデータ領域が連続書き込み又は連続読み出しの何れかに使用されたか否かをそれぞれ示す複数のスタックフラグを保持する複数のスタックフラグ保持部を更に備え、
前記リフィル部は、前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域に対応する前記スタックフラグが肯定的に設定されているときに限り、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行う請求項24記載のデータメモリキャッシュ装置。 The data holding unit includes:
Further comprising a plurality of stack flag holding unit holding a plurality of stack flags indicating whether the plurality of data areas are used for either continuous writing or continuous reading,
The refill unit, when the transfer busy determination unit determines that the data bus is not used, only when the stack flag corresponding to the data area corresponding to the offset address is set to a positive value, 25. The data memory cache device according to claim 24, wherein data is read from said main storage device to a data area corresponding to an offset address.
前記複数のデータ領域の開放又は未開放をそれぞれ示す複数の適正フラグを保持する複数の適正フラグ保持部を更に備え、
前記リフィル部は、前記転送ビジー判定部が前記データバスの不使用を判定した場合に、前記オフセットアドレスに対応するデータ領域に対応する前記適正フラグが開放を示す側に設定されているときに限り、前記オフセットアドレスに対応するデータ領域へ前記主記憶装置からデータの読み込みを行う請求項24又は25記載のデータメモリキャッシュ装置。 The data holding unit includes:
The apparatus further includes a plurality of appropriate flag holding units that hold a plurality of appropriate flags respectively indicating release or unopening of the plurality of data areas,
The refill unit is configured such that, when the transfer busy determination unit determines that the data bus is not used, the appropriate flag corresponding to the data area corresponding to the offset address is set to a side indicating release. 26. The data memory cache device according to claim 24, wherein data is read from the main storage device to a data area corresponding to the offset address.
前記複数のデータ領域の各々は、前記アドレスの下位部分に対応づけられた複数の小領域に分割されており、
前記複数のデータ領域の各々が保持するデータは前記主記憶装置に対して一時に読み書きされ、前記複数の小領域の各々が保持するデータは前記演算ユニットに対して一時に読み書きされ、
前記データ保持部は、
前記複数のデータ領域が保持するデータのアドレスの上位部分をそれぞれ示す複数のタグを保持する複数のタグ保持部を更に備え、
前記制御部は、
前記演算ユニットが出力するアドレスから前記上位部分と前記中位部分と前記下位部分とを抽出するアドレス抽出部を更に備え、
前記オフセット算出部は、前記ポップアクセス検出部が前記連続読み出しの要求を検出した場合に、前記アドレス抽出部が抽出した前記中位部分と前記上位部分とで表されるアドレスから前記連続読み出しの遅い方向へ定められた間隔をもってずれたアドレスを、前記オフセットアドレスとして算出する請求項24乃至26の何れかに記載のデータメモリキャッシュ装置。 The plurality of data areas are associated with a middle part of the address of the main storage device, and one or more data areas correspond to the same value of the middle part,
Each of the plurality of data areas is divided into a plurality of small areas associated with the lower part of the address,
Data held by each of the plurality of data areas is read and written to the main storage device at a time, and data held by each of the plurality of small areas is read and written to the arithmetic unit at a time,
The data holding unit includes:
The apparatus further includes a plurality of tag holding units that hold a plurality of tags each indicating an upper part of an address of data held by the plurality of data areas,
The control unit includes:
An address extraction unit that extracts the upper part, the middle part, and the lower part from an address output by the arithmetic unit,
The offset calculation unit, when the pop access detection unit detects the request for the continuous reading, performs the continuous reading from the address represented by the middle part and the high part extracted by the address extraction unit. 27. The data memory cache device according to claim 24, wherein an address shifted by a predetermined interval in a direction is calculated as the offset address.
前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の各々に対応づけられたタグが示す値と前記オフセットアドレスの前記上位部分とを比較し、何れも一致しない場合に、前記オフセットアドレスについてキャッシュミスが発生したと判定するキャッシュミス判定部と、
前記キャッシュミス検出部が前記キャッシュミスの発生を判定した場合に、前記オフセットアドレスの前記中位部分に対応する前記1以上のデータ領域の何れかを開放するデータ領域開放部と、
前記データ領域開放部が開放した前記データ領域に対応づけられたタグを、前記オフセットアドレスの前記上位部分に更新するタグ更新部とを更に備える請求項27記載のデータメモリキャッシュ装置。 The control unit includes:
A value indicated by a tag associated with each of the one or more data areas corresponding to the middle part of the offset address is compared with the upper part of the offset address. A cache miss determining unit that determines that a cache miss has occurred for the address;
A data area release unit that releases any one of the one or more data areas corresponding to the middle part of the offset address when the cache miss detection unit determines the occurrence of the cache miss;
28. The data memory cache device according to claim 27, further comprising: a tag updating unit that updates a tag associated with the data area released by the data area releasing unit to the upper part of the offset address.
前記データメモリキャッシュ装置に接続された演算ユニットと、
前記データメモリキャッシュ装置に接続され前記演算ユニットによってアクセスされる主記憶装置とを備えるデータメモリキャッシュシステム。 A data memory cache device according to any one of claims 1 to 28,
An arithmetic unit connected to the data memory cache device;
A main memory connected to the data memory cache and accessed by the arithmetic unit;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004078088A JP2004303232A (en) | 2003-03-20 | 2004-03-18 | Data memory cache device and data memory cache system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003078026 | 2003-03-20 | ||
JP2004078088A JP2004303232A (en) | 2003-03-20 | 2004-03-18 | Data memory cache device and data memory cache system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004303232A true JP2004303232A (en) | 2004-10-28 |
Family
ID=33421937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004078088A Pending JP2004303232A (en) | 2003-03-20 | 2004-03-18 | Data memory cache device and data memory cache system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004303232A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8031376B2 (en) * | 2007-03-19 | 2011-10-04 | Ricoh Company, Ltd. | Image processing apparatus |
US8112589B2 (en) | 2007-04-19 | 2012-02-07 | International Business Machines Corporation | System for caching data from a main memory with a plurality of cache states |
JP2015060376A (en) * | 2013-09-18 | 2015-03-30 | 富士通株式会社 | Cache memory control program, processor including cache memory, and cache memory control method |
CN113342265A (en) * | 2021-05-11 | 2021-09-03 | 中天恒星(上海)科技有限公司 | Cache management method and device, processor and computer device |
Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61127050A (en) * | 1984-11-26 | 1986-06-14 | Agency Of Ind Science & Technol | Memory control system |
JPS61235960A (en) * | 1985-04-12 | 1986-10-21 | Hitachi Ltd | Method for controlling cache memory |
JPS638851A (en) * | 1986-06-27 | 1988-01-14 | Yokogawa Hewlett Packard Ltd | Cache memory control system |
JPS6346556A (en) * | 1986-08-14 | 1988-02-27 | Nec Corp | Buffer memory device |
JPH01251248A (en) * | 1988-03-31 | 1989-10-06 | Toshiba Corp | Cache control system for stack data structure |
JPH0354649A (en) * | 1989-07-24 | 1991-03-08 | Oki Electric Ind Co Ltd | Buffer storage control system |
JPH0448358A (en) * | 1990-06-18 | 1992-02-18 | Nec Corp | Cache memory control system |
JPH04264641A (en) * | 1991-02-19 | 1992-09-21 | Nec Corp | Cache memory system |
JPH05143330A (en) * | 1991-07-26 | 1993-06-11 | Mitsubishi Electric Corp | Stack cache and control system thereof |
JPH0628253A (en) * | 1992-03-24 | 1994-02-04 | Nec Corp | Central processor |
JPH0784879A (en) * | 1993-09-09 | 1995-03-31 | Toshiba Corp | Cache memory device |
JPH07210463A (en) * | 1994-01-21 | 1995-08-11 | Hitachi Ltd | Cache memory system and data processor |
JPH07295881A (en) * | 1994-04-22 | 1995-11-10 | Hitachi Ltd | Cache device |
JPH08137748A (en) * | 1994-11-08 | 1996-05-31 | Toshiba Corp | Computer having copy back cache and copy back cashe control method |
JPH09231133A (en) * | 1996-02-21 | 1997-09-05 | Nec Corp | Cache memory device |
JPH10340228A (en) * | 1997-06-09 | 1998-12-22 | Nec Corp | Microprocessor |
US6151661A (en) * | 1994-03-03 | 2000-11-21 | International Business Machines Corporation | Cache memory storage space management system and method |
JP2001222467A (en) * | 2000-02-07 | 2001-08-17 | Matsushita Electric Ind Co Ltd | Cache device |
US7065613B1 (en) * | 2002-06-06 | 2006-06-20 | Maxtor Corporation | Method for reducing access to main memory using a stack cache |
-
2004
- 2004-03-18 JP JP2004078088A patent/JP2004303232A/en active Pending
Patent Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61127050A (en) * | 1984-11-26 | 1986-06-14 | Agency Of Ind Science & Technol | Memory control system |
JPS61235960A (en) * | 1985-04-12 | 1986-10-21 | Hitachi Ltd | Method for controlling cache memory |
JPS638851A (en) * | 1986-06-27 | 1988-01-14 | Yokogawa Hewlett Packard Ltd | Cache memory control system |
JPS6346556A (en) * | 1986-08-14 | 1988-02-27 | Nec Corp | Buffer memory device |
JPH01251248A (en) * | 1988-03-31 | 1989-10-06 | Toshiba Corp | Cache control system for stack data structure |
JPH0354649A (en) * | 1989-07-24 | 1991-03-08 | Oki Electric Ind Co Ltd | Buffer storage control system |
JPH0448358A (en) * | 1990-06-18 | 1992-02-18 | Nec Corp | Cache memory control system |
JPH04264641A (en) * | 1991-02-19 | 1992-09-21 | Nec Corp | Cache memory system |
JPH05143330A (en) * | 1991-07-26 | 1993-06-11 | Mitsubishi Electric Corp | Stack cache and control system thereof |
JPH0628253A (en) * | 1992-03-24 | 1994-02-04 | Nec Corp | Central processor |
JPH0784879A (en) * | 1993-09-09 | 1995-03-31 | Toshiba Corp | Cache memory device |
JPH07210463A (en) * | 1994-01-21 | 1995-08-11 | Hitachi Ltd | Cache memory system and data processor |
US6151661A (en) * | 1994-03-03 | 2000-11-21 | International Business Machines Corporation | Cache memory storage space management system and method |
JPH07295881A (en) * | 1994-04-22 | 1995-11-10 | Hitachi Ltd | Cache device |
JPH08137748A (en) * | 1994-11-08 | 1996-05-31 | Toshiba Corp | Computer having copy back cache and copy back cashe control method |
JPH09231133A (en) * | 1996-02-21 | 1997-09-05 | Nec Corp | Cache memory device |
JPH10340228A (en) * | 1997-06-09 | 1998-12-22 | Nec Corp | Microprocessor |
JP2001222467A (en) * | 2000-02-07 | 2001-08-17 | Matsushita Electric Ind Co Ltd | Cache device |
US7065613B1 (en) * | 2002-06-06 | 2006-06-20 | Maxtor Corporation | Method for reducing access to main memory using a stack cache |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8031376B2 (en) * | 2007-03-19 | 2011-10-04 | Ricoh Company, Ltd. | Image processing apparatus |
US8112589B2 (en) | 2007-04-19 | 2012-02-07 | International Business Machines Corporation | System for caching data from a main memory with a plurality of cache states |
JP2015060376A (en) * | 2013-09-18 | 2015-03-30 | 富士通株式会社 | Cache memory control program, processor including cache memory, and cache memory control method |
CN113342265A (en) * | 2021-05-11 | 2021-09-03 | 中天恒星(上海)科技有限公司 | Cache management method and device, processor and computer device |
CN113342265B (en) * | 2021-05-11 | 2023-11-24 | 中天恒星(上海)科技有限公司 | Cache management method and device, processor and computer device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6295594B1 (en) | Dynamic memory allocation suitable for stride-based prefetching | |
US5958040A (en) | Adaptive stream buffers | |
KR100339904B1 (en) | System and method for cache process | |
JPS61156346A (en) | Apparatus for forestalling memory hierarchy | |
JP4574712B2 (en) | Arithmetic processing apparatus, information processing apparatus and control method | |
JP2000250813A (en) | Data managing method for i/o cache memory | |
JP2009098934A (en) | Processor and cache memory | |
JP2002535777A (en) | High speed processor system, method of using the same, and recording medium | |
JPH1055307A (en) | Computer system | |
EP1467284A2 (en) | Data memory cache unit and data memory cache system | |
JP3236287B2 (en) | Multiprocessor system | |
JP2009512943A (en) | Multi-level translation index buffer (TLBs) field updates | |
US7260674B2 (en) | Programmable parallel lookup memory | |
JP2000148590A (en) | Device and method for locking cache | |
JP4113524B2 (en) | Cache memory system and control method thereof | |
JP5157424B2 (en) | Cache memory system and cache memory control method | |
JP3973129B2 (en) | Cache memory device and central processing unit using the same | |
JP2007058349A (en) | Cache system | |
JP2004303232A (en) | Data memory cache device and data memory cache system | |
US20010032297A1 (en) | Cache memory apparatus and data processing system | |
JP3964821B2 (en) | Processor, cache system and cache memory | |
JP2001222467A (en) | Cache device | |
JPH0830568A (en) | Cache control system for distributed memory type parallel computer | |
JPH11143774A (en) | Cache control mechanism | |
JP2637853B2 (en) | Cache memory device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061025 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100309 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100316 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100512 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101124 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110315 |