JP5116275B2 - Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus - Google Patents
Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus Download PDFInfo
- Publication number
- JP5116275B2 JP5116275B2 JP2006268007A JP2006268007A JP5116275B2 JP 5116275 B2 JP5116275 B2 JP 5116275B2 JP 2006268007 A JP2006268007 A JP 2006268007A JP 2006268007 A JP2006268007 A JP 2006268007A JP 5116275 B2 JP5116275 B2 JP 5116275B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- cache miss
- cache
- load instruction
- program counter
- 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.)
- Active
Links
Images
Landscapes
- Advance Control (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、演算処理装置、情報処理装置及び演算処理装置の制御方法に関する。 The present invention relates to an arithmetic processing device, an information processing device, and a control method for the arithmetic processing device .
従来から、メインメモリから読み出したデータをプロセッサで処理する情報処理システムにおいて、プロセッサとメインメモリとの間に高速のキャッシュメモリを配し、頻繁に読み書きを行うデータをキャッシュメモリに配置することによって、データ読み書きにかかるメモリアクセスの遅延(メモリレイテンシ)を回避するキャッシュ技術が利用されてきた。 Conventionally, in an information processing system in which data read from a main memory is processed by a processor, a high-speed cache memory is arranged between the processor and the main memory, and data that is frequently read and written is arranged in the cache memory. Cache technology that avoids memory access delay (memory latency) for data reading and writing has been used.
かかるキャッシュ技術は、読み出し対象(ロード対象)のデータがキャッシュメモリに存在する場合(キャッシュヒット)は、キャッシュメモリから必要データを読み出すことによって高速にデータ読み出しを実行することができ、メモリレイテンシを回避する。しかし、ロード対象のデータがキャッシュメモリに存在しなかった場合(キャッシュミス)には、メインメモリから必要データを取得することとなるために、メモリレイテンシを回避することができない。 With this cache technology, when data to be read (load target) exists in the cache memory (cache hit), data can be read at high speed by reading the necessary data from the cache memory, avoiding memory latency. To do. However, if the data to be loaded does not exist in the cache memory (cache miss), the necessary data is acquired from the main memory, so that memory latency cannot be avoided.
ところで、近年の研究結果によれば、大部分のキャッシュミスは比較的少数のロード命令によって引き起こされていることが判明した。この大部分のキャッシュミスを引き起こす比較的少数のロード命令をDelinquent Loadという。例えば、非特許文献1には、このDelinquent Loadを含む命令列を別スレッドとして先行して実行することによって、ロード命令によるキャッシュミスによるメインメモリへのアクセスから発生するメモリレイテンシの影響を軽減することによって、プロセッサシステムの性能向上を図る技術が考案されている。
By the way, according to recent research results, it has been found that most cache misses are caused by a relatively small number of load instructions. A relatively small number of load instructions that cause most cache misses are called Delinquent Load. For example, Non-Patent
しかしながら、上記非特許文献1に代表される従来技術では、Delinquent Loadを先行して別スレッドとして実行するために、当該スレッドを組み立てるためのハードウェア及びマルチスレッド機構が必要であり、実現に際しては回路が複雑かつ回路規模が大規模になるという問題点を有していた。
However, in the prior art represented by the above
本発明は、上記問題点(課題)を解消するためになされたものであって、マルチスレッド機構等の特別なハードウェアを必要とせず、簡単かつ小規模な回路でロード命令のキャッシュミスによるメインメモリへのアクセスから発生するメモリレイテンシの影響を軽減し、情報処理システム全体の性能向上を図ることが可能な演算処理装置、情報処理装置及び演算処理装置の制御方法を提供することを目的とする。 The present invention has been made to solve the above problems (problems), and does not require special hardware such as a multi-thread mechanism. An object of the present invention is to provide an arithmetic processing device, an information processing device, and a control method for the arithmetic processing device capable of reducing the influence of memory latency caused by accessing the memory and improving the performance of the entire information processing system. .
上述した問題を解決し、目的を達成するため、本発明は、主記憶装置との間にキャッシュ装置が配置される情報処理装置であって、前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶部を備えたことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides an information processing apparatus in which a cache device is arranged between a main storage device and the cache according to a load instruction for reading data from the main storage device. A load instruction storage unit for storing the load instruction in an identifiable manner when a cache miss occurs in the apparatus is provided.
また、本発明は、上記発明において、前記ロード命令記憶部は、前記キャッシュ装置においてキャッシュミスが発生したロード命令毎に該キャッシュミスが発生した回数を記憶することを特徴とする。 Further, the present invention is characterized in that, in the above-mentioned invention, the load instruction storage unit stores the number of times the cache miss has occurred for each load instruction in which a cache miss has occurred in the cache device.
また、本発明は、上記発明において、前記主記憶装置へデータを書き込むストア命令に応じて該主記憶装置へデータを書き込む際に、該ストア命令に対応するロード命令を識別し、該ロード命令が前記ロード命令記憶部に記憶されるか否かを判定するロード命令記憶判定部と、前記ロード命令記憶判定部により前記ロード命令記憶部に記憶されると判定されたロード命令がキャッシュミスを発生した回数が所定閾値を超えるか否かを判定するキャッシュミス回数判定部と、前記キャッシュミス回数判定部によりキャッシュミスが発生した回数が所定閾値を超えると判定されたロード命令が読み出し対象とするデータ若しくは該データを識別するデータ識別子をキャッシュするデータ記憶部とを備えたことを特徴とする。 According to the present invention, in the above invention, when writing data to the main storage device in response to a store instruction for writing data to the main storage device, the load instruction corresponding to the store instruction is identified, and the load instruction is A load instruction storage determination unit that determines whether or not to be stored in the load instruction storage unit, and a load instruction that is determined to be stored in the load instruction storage unit by the load instruction storage determination unit has caused a cache miss A cache miss number determination unit that determines whether or not the number of times exceeds a predetermined threshold, and data to be read by a load instruction that is determined by the cache miss number determination unit that the number of occurrences of a cache miss exceeds a predetermined threshold, or And a data storage unit that caches a data identifier for identifying the data.
また、本発明は、主記憶装置との間にキャッシュ装置が配置される情報処理装置においてロード命令を制御する命令制御機構であって、前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶部を備えたことを特徴とする。 The present invention also provides an instruction control mechanism for controlling a load instruction in an information processing device in which a cache device is arranged between the main storage device and the cache device according to a load instruction for reading data from the main storage device. A load instruction storage unit for storing the load instruction in an identifiable manner when a cache miss occurs is provided.
また、本発明は、主記憶装置との間にキャッシュ装置が配置される情報処理装置においてロード命令を制御する命令制御方法であって、前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶工程を含んだことを特徴とする。 The present invention also relates to an instruction control method for controlling a load instruction in an information processing device in which a cache device is arranged between the main storage device and the cache device according to a load instruction for reading data from the main storage device. A load instruction storing step of storing the load instruction in an identifiable manner when a cache miss occurs is included.
本発明によれば、キャッシュミスが発生したロード命令を識別可能に専用バッファに記憶するので、キャッシュミスが発生したロード命令を特定し、キャッシュミスの発生を事前に予測することができるという効果を奏する。 According to the present invention, since the load instruction in which the cache miss has occurred is stored in the dedicated buffer in an identifiable manner, the load instruction in which the cache miss has occurred can be identified and the occurrence of the cache miss can be predicted in advance. Play.
また、本発明によれば、キャッシュミスが発生したロード命令をキャッシュミスが発生した回数とともに専用バッファに記憶するので、キャッシュミスがより発生する可能性が高いロード命令を把握し、キャッシュミスの発生を事前に予測することができるという効果を奏する。 In addition, according to the present invention, since the load instruction in which a cache miss has occurred is stored in the dedicated buffer together with the number of times the cache miss has occurred, the load instruction that is more likely to cause a cache miss is grasped, and the occurrence of a cache miss has occurred. There is an effect that can be predicted in advance.
また、本発明によれば、キャッシュミスが発生した回数が所定の閾値を超えると判定されたキャッシュミスが発生する可能性が高いロード命令が読み出し対象とするデータ若しくは該データを識別するデータ識別子を記憶するデータ記憶部を備えたので、このデータ記憶部を参照することによってロード命令のキャッシュミスの発生によるメモリレイテンシを抑制することが可能となるという効果を奏する。 Further, according to the present invention, the load instruction that is highly likely to cause a cache miss that is determined that the number of occurrences of the cache miss exceeds a predetermined threshold value or the data identifier that identifies the data is read. Since the data storage unit for storing is provided, the memory latency due to the occurrence of a cache miss of the load instruction can be suppressed by referring to the data storage unit.
以下に添付図面を参照し、本発明の演算処理装置、情報処理装置及び演算処理装置の制御方法に係る実施例を詳細に説明する。なお、以下に実施例1及び2を説明するに先立って、本発明がなされるに至った前提である従来技術の問題点及び本発明の特徴点について説明する。なお、以下では、プロセッサをCPU(Central Processing Unit)とした場合を示すこととするが、これに限らず、MPU(Micro Processing Unit)、MCU(Micro Controller Unit)などの各種処理装置であってもよい。 With reference to the accompanying drawings, the processing unit of the present invention, an embodiment will be described in detail according to the method of controlling an information processing apparatus and the processing unit. Prior to the description of the first and second embodiments, problems of the prior art and features of the present invention, which are preconditions for the present invention, will be described. In the following, a case where the processor is a CPU (Central Processing Unit) is shown, but the present invention is not limited to this, and various processing devices such as an MPU (Micro Processing Unit) and MCU (Micro Controller Unit) may be used. Good.
先ず、本発明がなされるに至った前提である従来技術の問題点について説明する。図1は、従来技術の問題点を示す図である。同図に示すように、情報処理装置であるCPUの処理主体であるCPUコアからデータを一次蓄積可能な高速メモリであるキャッシュメモリに対して、キャッシュミスを発生しやすいロード命令であるDelinquent Loadによりデータのロードが要求される。これに対し、当該ロード命令がDelinquent Loadであるとキャッシュメモリにおいてキャッシュミスが発生する。キャッシュミスが発生したため、キャッシュメモリは、メインメモリに対して当該データのロードを要求することとなる。なお、データのロードとは、メインメモリ又はキャッシュメモリからのデータの読み出しのことである。 First, the problems of the prior art, which is the premise that the present invention has been made, will be described. FIG. 1 is a diagram illustrating a problem of the prior art. As shown in the figure, Delinquent Load, a load instruction that is prone to cache misses, is applied to the cache memory, which is a high-speed memory that can primarily store data from the CPU core that is the processing subject of the CPU that is the information processing device. A data load is required. On the other hand, if the load instruction is Delinquent Load, a cache miss occurs in the cache memory. Since a cache miss has occurred, the cache memory requests the main memory to load the data. Note that data loading refers to reading data from the main memory or the cache memory.
キャッシュメモリは、メモリアクセスの速度が高速であるため、CPUコアの処理に比べてもメモリアクセスが遅延を発生することはない。しかし、メインメモリは、近時のCPUコアの処理速度の向上に比べて依然としてメモリアクセスの速度が遅く、CPUコアの処理速度に追随できずメモリアクセスがデータロード完了の待ちによる遅延を発生させてしまう。このため、あるデータをCPUコアへロードするためには、メインメモリからロードするよりもキャッシュメモリからロードする方が、CPUの処理効率の観点から有利である。 Since the cache memory has a high memory access speed, the memory access does not cause a delay compared to the processing of the CPU core. However, the main memory still has a slower memory access speed than the recent CPU core processing speed improvement, and cannot keep up with the CPU core processing speed, causing the memory access to delay due to the completion of data loading. End up. For this reason, in order to load certain data into the CPU core, loading from the cache memory is more advantageous than loading from the main memory from the viewpoint of processing efficiency of the CPU.
そこで、データをCPUコアへロードする場合には、メインメモリから読み出したデータを一旦キャッシュメモリへ記憶しておき、再度該データをCPUコアへロードする場合は、メインメモリからではなくキャッシュメモリからデータをロードすることによって、メモリアクセスの速度を向上させる技術が利用されている。 Therefore, when data is loaded into the CPU core, the data read from the main memory is temporarily stored in the cache memory, and when the data is loaded again into the CPU core, the data is loaded from the cache memory instead of from the main memory. A technique for improving the speed of memory access by loading the memory is used.
しかし、キャッシュメモリは記憶容量に制限があるため、CPUコアへ一度ロードした全てのデータを記憶しておくことは不可能であり、FIFO(First In First Out)、LIFO(Last In Last Out)、LFU(Least Frequently Used method)等の所定のアルゴリズムに従って一部のデータが消去される。このために、消去されたデータは、キャッシュメモリを参照しても該キャッシュメモリからロードすることは不可能であり、メインメモリから再度ロードすることとなる。これをキャッシュミスと呼ぶ。 However, because the cache memory has a limited storage capacity, it is impossible to store all the data once loaded into the CPU core, such as FIFO (First In First Out), LIFO (Last In Last Out), Some data is erased in accordance with a predetermined algorithm such as LFU (Least Frequently Used method). For this reason, the erased data cannot be loaded from the cache memory by referring to the cache memory, and is loaded again from the main memory. This is called a cache miss.
CPUにおいて、所定のアルゴリズムにより実行順序が定められた処理手順が順次実行される過程でCPUコアが実行するデータのロード命令のうち、ある種のロード命令は、この所定のアルゴリズムの特性上、一度ロードしたデータが再度ロードされる際にはキャッシュメモリから消去されており、再度メインメモリからロードしなければならないロード命令がある。これをDelinquent Loadと呼ぶが、Delinquent Loadはキャッシュミスを発生しやすいロード命令である。 Among the data load instructions executed by the CPU core in the process of sequentially executing the processing procedure whose execution order is determined by the predetermined algorithm in the CPU, certain load instructions are once due to the characteristics of the predetermined algorithm. When the loaded data is reloaded, there is a load instruction that is erased from the cache memory and must be loaded from the main memory again. This is called Delinquent Load, but Delinquent Load is a load instruction that easily causes a cache miss.
従って、Delinquent Loadがキャッシュメモリからデータロードを実行しようとすると、必ずキャッシュミスが発生することとなり、必要データをメインメモリにアクセスして取得することとなる。Delinquent Loadに対して必ずメインメモリへのアクセスが発生することとなり、メモリレイテンシが発生し、CPUの処理効率の低下を招いていた。 Therefore, when Delinquent Load tries to load data from the cache memory, a cache miss always occurs and the necessary data is accessed and acquired. For Delinquent Load, access to the main memory always occurs, resulting in memory latency and a reduction in CPU processing efficiency.
本発明は、上記した問題点(課題)を解消するためになされたものであって、Delinquent Loadによってメモリレイテンシが発生してCPUの処理効率が低下することのないDelinquent Load制御機構及びDelinquent Load制御方法を提供することを目的としている。 The present invention has been made to solve the above-described problems (problems), and a Delinquent Load control mechanism and a Delinquent Load control in which memory latency is not caused by Delinquent Load and the processing efficiency of the CPU does not decrease. It aims to provide a method.
次に、上記の目的を達成するためになされた本発明の特徴を説明する。図2は、本発明の特徴を示す図である。同図に示すように、Delinquent Loadによってキャッシュメモリからデータをロードしようとすると、キャッシュミスが発生する。ここで、通常のキャッシュメモリと同様に高速アクセス可能なDelinquent Load専用キャッシュメモリを設ける。この、Delinquent Load専用キャッシュメモリから当該Delinquent Loadがロード対象とするデータが消去されることはない。 Next, features of the present invention made to achieve the above object will be described. FIG. 2 is a diagram showing features of the present invention. As shown in the figure, a cache miss occurs when attempting to load data from cache memory by Delinquent Load. Here, a dedicated cache memory for Delinquent Load that can be accessed at high speed is provided in the same way as a normal cache memory. The data targeted for loading by the Delinquent Load is not erased from the Delinquent Load dedicated cache memory.
よって、Delinquent Loadがデータをロードする際には、Delinquent Load専用キャッシュメモリからデータをロードすることによって、キャッシュミスが発生せず、必ずキャッシュヒットすることになる。このようにすることによって、Delinquent Loadに対するデータロードに際してメインメモリへのアクセスを全く必要とせず、メモリレイテンシの発生を回避することが可能となる。そして、延いては、CPUの処理効率の低下を防止することが可能となる。 Therefore, when data is loaded by Delinquent Load, data is loaded from the cache memory dedicated to Delinquent Load, so that a cache miss does not occur and a cache hit always occurs. By doing so, it is not necessary to access the main memory at the time of data loading for Delinquent Load, and it is possible to avoid occurrence of memory latency. As a result, it is possible to prevent a decrease in processing efficiency of the CPU.
以下に図3〜7を参照して、本発明の実施例1を説明する。実施例1は、前述のDelinquent Load専用キャッシュメモリとして、CSDB(Corresponding Store Data Buffer)を採用した場合を示すこととする。Corresponding Storeは、ロード命令に対応するストア命令のことである。従って、CSDBは、ロード命令に対応するストア命令のストアデータを格納するデータバッファである。なお、データのロードとは、キャッシュメモリであるキャッシュ記憶部102又はメインメモリである外部の主記憶部からのデータの読み出しを言う。また、データのストアとは、キャッシュ記憶部102又は外部の主記憶部へのデータの書き込みを言う。
先ず、実施例1の情報処理装置の構成について説明する。図3は、実施例1の情報処理装置の構成を示す機能ブロック図である。図4は、実施例1の情報処理装置のDLT部のDelinquent Load Tableのテーブルイメージを示す図である。図5は、実施例1の情報処理装置のCSDB部のCorresponding Store Data Bufferのテーブルイメージを示す図である。 First, the configuration of the information processing apparatus according to the first embodiment will be described. FIG. 3 is a functional block diagram illustrating the configuration of the information processing apparatus according to the first embodiment. FIG. 4 is a diagram illustrating a table image of the Delinquent Load Table in the DLT unit of the information processing apparatus according to the first embodiment. FIG. 5 is a table image of the Corresponding Store Data Buffer in the CSDB unit of the information processing apparatus according to the first embodiment.
同3に示すように、情報処理装置100は、CPUコアである主処理部101と、キャッシュメモリであるキャッシュ記憶部102と、CSDB部103と、DLT部104と、CSI部105とを有する。
As shown in FIG. 3, the
主処理部101は、情報処理装置100におけるキャッシュ記憶部102又は外部の主記憶装置からロードしたデータに基づき各種演算を実行し、演算結果をキャッシュ記憶部102及び外部の主記憶装置へストアする処理を実行する。
The
CSDB部103は、図5に示すように、Delinquent Loadに対応するストア命令が指定するオペランドアドレスVij(i、jは自然数)及び該Vijに対応付けられるデータDATAijを格納するデータバッファである。主処理部101は、オペランドアドレスVAを指定してロード命令を実行する際、先ず、このCSDB部103を参照して指定されたオペランドアドレスに一致するオペランドアドレスVAijが存在するか否かを確認する。ロード命令が指定するオペランドアドレスVAijに一致するオペランドアドレスがCSDB103に存在する場合に、このオペランドアドレスに対応するデータDATAijを該CSDB103からロードすることになる。
As shown in FIG. 5, the
DLT(Delinquent Load Table)部104は、Delinquent Loadを識別し、保持する機構である。具体的には、図4に示すように、Load識別子であるプログラムカウンタPC1にはオペランドアドレスVA11、VA12、・・・、VA1n及びキャッシュミス回数N1が対応付けられて格納されている。また、Load識別子であるプログラムカウンタPCi(iは自然数)には、オペランドアドレスVAi1、・・・、VAim(mは自然数)及びキャッシュミス回数Niがそれぞれ対応付けられて格納されている。
A DLT (Delinquent Load Table)
DLT部104には、主処理部101からキャッシュ記憶部102へロード命令によりデータのロードが指示されたとき、該ロード命令がオペランドアドレスと共に主処理部101によって記憶される。また、主処理部101からキャッシュ記憶部102へロード命令によりデータのロードが指示された場合に、該キャッシュ記憶部102においてキャッシュミスが発生したとき、主処理部101によってキャッシュミス回数に1が加算される。
When the
なお、各プログラムカウンタPCiに対応付けられて格納されるオペランドアドレスVAimの個数は、プログラムカウンタPCi毎に応じて異なる。また、各プログラムカウンタPCiに対応付けられて格納されるキャッシュミス回数Niは、プログラムカウンタPCi単位でカウントアップされた数値を保持する変数である。即ち、キャッシュミス回数は、同一のLoad識別子に対応付けられるオペランドアドレスであれば、オペランドアドレスの別は問わずカウントされるものである。 Note that the number of operand addresses VA im stored in association with each program counter PC i differs depending on the program counter PC i . The number of cache misses N i stored in association with each program counter PC i is a variable that holds a numerical value counted up in units of program counter PC i . That is, the number of cache misses is counted regardless of the operand address if the operand address is associated with the same Load identifier.
CSI(Corresponding Store Identifier)部105は、Delinquent Loadのロード対象のメモリデータを生成したストア命令(Corresponding Store)を識別する機構である。主処理部101によってオペランドアドレスを指定してストア命令が指示されたときに、DLT部104を参照して該オペランドアドレスが該DLT部104に記憶されるか否かを判定する。さらに、該オペランドアドレスが該DLT部104に記憶されると判定された場合に、該オペランドアドレスに対応付けられているキャッシュミス回数が所与の閾値M(Mは自然数)を超えるか否かを判定する。所与の閾値Mを超えると判定されたオペランドアドレスVAijに対応するLoad識別子で識別されるロード命令が対象とするデータは、Delinquent Loadが対象とするデータとして、オペランドアドレスVAijと共にCSDB部103に記憶されることとなる。
A CSI (Corresponding Store Identifier)
次に、実施例1の情報処理装置のCSI部の論理回路について説明する。図6は、実施例1の情報処理装置のCSI部の論理回路を示す回路図である。同図に示すように、CSI部105は、一致判定ゲート105aと、比較判定ゲート105bと、ANDゲート105cとを有する。
Next, a logic circuit of the CSI unit of the information processing apparatus according to the first embodiment will be described. FIG. 6 is a circuit diagram illustrating a logic circuit of the CSI unit of the information processing apparatus according to the first embodiment. As shown in the figure, the
主処理部101からオペランドアドレスVAを指定したストア命令Store VAがCSI部105に対して出力されると、先ず一致判定ゲート105aがDLT部104を参照して、VAに一致するオペランドアドレスが記憶されているか否かを判定する。そして、VAに一致するオペランドアドレスVAijがDLT部104に存在する場合に、比較判定ゲート105bは、該オペランドアドレスVAijに対応付けられて記憶されているキャッシュミス回数Niと所与の閾値Mとを比較し、Ni>Mであるか否かを判定する。そして、一致判定ゲート105aにより一致するオペランドアドレスが存在すると判定され、かつ比較判定ゲート105bによりNi>Mであると判定された場合に、ANDゲート105cによりオペランドアドレスVAij及び該オペランドアドレスVAijによって特定される実データであるDATAijがCSDB部103に記憶されることとなる。
When the store instruction Store VA specifying the operand address VA is output from the
次に、実施例1の情報処理装置における処理を説明する。図7は、実施例1の情報処理装置における処理を示すタイミングチャートである。なお、図7に示す各ステップはパイプ処理における1ステップを示す。同図に示すように、先ず、主処理部101から命令フェッチの実行(ステップS101)、命令デコードの実行(ステップS102)、アドレス計算の実行(ステップS103)、CSDBアクセスの実行(ステップS104)、キャッシュアクセスの実行(ステップS105)が行われる。 Next, processing in the information processing apparatus according to the first embodiment will be described. FIG. 7 is a timing chart illustrating processing in the information processing apparatus according to the first embodiment. Each step shown in FIG. 7 represents one step in pipe processing. As shown in the figure, first, instruction fetch from the main processing unit 101 (step S101), instruction decode (step S102), address calculation (step S103), CSDB access (step S104), Cache access is executed (step S105).
続いて、DLT104へLoad命令が追加される(ステップS106)。また、ステップS105のキャッシュアクセスにおいてキャッシュミスが発生した場合に、主記憶アクセスが実行される(ステップS107)。このステップS107の主記憶アクセスが終了すると、主処理部101においてレジスタライトが実行される(ステップS108)。これらステップS101〜ステップS108の処理は、図示するように第一段階のLoad命令に係る処理である。 Subsequently, a Load command is added to the DLT 104 (step S106). Further, when a cache miss occurs in the cache access in step S105, main memory access is executed (step S107). When the main memory access in step S107 is completed, register write is executed in the main processing unit 101 (step S108). The processes in steps S101 to S108 are processes related to the first stage Load command as shown in the figure.
ステップS108が終了すると、続いて主処理部101において命令フェッチの実行(ステップS109)、命令デコードの実行(ステップS110)、アドレス計算の実行(ステップS111)、DLTアクセスの実行(ステップS112)が行われる。ステップS111のアドレス計算の終了に続いて主記憶アクセスが実行され(ステップS113)、ステップS112のDLTアクセス終了に続いてCSDB更新が実行される(ステップS114)。なお、ステップS113の処理及びステップS114の処理は平行して実行されてもよいものである。これらステップS109〜ステップS114の処理は、図示するように第二段階のStore命令に係る処理である。
When step S108 ends, the
ステップS114が終了すると、続いて主処理部101において、第三段階のLoad命令に係る命令フェッチの実行(ステップS115)、命令デコードの実行(ステップS116)、アドレス計算の実行(ステップS117)、CSDBアクセスの実行(ステップS118)が実行される。ステップS118の実行時には、既にCSDBに当該Load命令のロード対象であるデータがステップS114で記憶されているので、CSDBから当該データの読み出しに成功する。続いて、CSDBから読み出しに成功したデータを主処理部101のレジスタにライトする(ステップS119)。
When step S114 ends, the
上記したように、実施例1では、一度ロード命令によりキャッシュミスが発生し、Delinquent Loadとされたロード命令がロード対象とするデータをCSDBに記憶させ、次回の同一のロード命令の実行時においてCSDBに記憶される該データを読み出してロードするので、キャッスミスによるメモリアクセスのメモリレイテンシの発生を抑制することが可能となる。 As described above, in the first embodiment, a cache miss occurs once due to the load instruction, and the load target data stored in the CSDB is stored in the CSDB at the next execution of the same load instruction. Since the data stored in is read and loaded, it is possible to suppress the occurrence of memory latency in memory access due to a cast miss.
以下に図8及び9を参照して、本発明の実施例2を説明する。実施例2は、基本的には実施例1と同一であり、以下の実施例2の説明では、実施例1との差異部分について説明する。実施例2では、前述のDelinquent Load専用キャッシュメモリとして、CSAB(Corresponding Store Address Buffer)を採用した場合を示すこととする。Corresponding Storeは、ロード命令に対応するストア命令のことである。従って、CSABは、Delinquent Load命令に対応するストア命令に対応するロード命令を特定するアドレスを格納するアドレスバッファである。 A second embodiment of the present invention will be described below with reference to FIGS. The second embodiment is basically the same as the first embodiment, and in the following description of the second embodiment, differences from the first embodiment will be described. In the second embodiment, a case where a CAB (Corresponding Store Address Buffer) is adopted as the above-described Delinquent Load dedicated cache memory is shown. Corresponding Store is a store instruction corresponding to a load instruction. Accordingly, the CSAB is an address buffer that stores an address for specifying a load instruction corresponding to a store instruction corresponding to a Delinquent Load instruction.
先ず、実施例2の情報処理装置の構成について説明する。図8は、実施例2の情報処理装置の構成を示す機能ブロック図である。図9は、実施例2の情報処理装置のCSAB部のCorresponding Store Address Bufferのテーブルイメージを示す図である。なお、実施例2の情報処理装置のDLT部のDelinquent Load Tableは、実施例1と同様である。 First, the configuration of the information processing apparatus according to the second embodiment will be described. FIG. 8 is a functional block diagram illustrating the configuration of the information processing apparatus according to the second embodiment. FIG. 9 is a diagram illustrating a table image of the Corresponding Store Address Buffer of the CTAB unit of the information processing apparatus according to the second embodiment. Note that the Delinquent Load Table of the DLT unit of the information processing apparatus of the second embodiment is the same as that of the first embodiment.
同3に示すように、情報処理装置100は、CPUコアである主処理部101と、キャッシュメモリであるキャッシュ記憶部102と、CSAB部106と、DLT部104と、CSI部105とを有する。
As shown in FIG. 3, the
CSAB部106は、図9に示すように、Delinquent Loadに対応するストア命令に対応するLoad識別子であるプログラムカウンタPCi(iは自然数)及び該ストア命令が指定するオペランドアドレスVij(jは自然数)を格納するアドレスバッファである。主処理部101は、プログラムカウンタPCを指定してロード命令を実行する際、先ず、このCSAB部106を参照して指定されたプログラムカウンタPCに一致するプログラムカウンタが記憶されているか否かを判定する。ここで一致するプログラムカウンタPCが検出された場合には、Delinquent Loadの再実行が近づいたと判断する。
As shown in FIG. 9, the CAB unit 106 includes a program counter PC i (i is a natural number) that is a load identifier corresponding to a store instruction corresponding to a Delinquent Load and an operand address V ij (j is a natural number) specified by the store instruction. ) Is stored. When the
次に、CSDB部106は、先に一致が検出されたプログラムカウンタPCに対応付けられているオペランドアドレスVAijで特定されるデータを主記憶部(メインメモリ)からプリフェッチするようにキャッシュ記憶部(キャッシュメモリ)102へ要求することとなる。 Next, the CSDB unit 106 pre-fetches data specified by the operand address VA ij associated with the program counter PC for which a match is detected previously from the main storage unit (main memory) ( (Cache memory) 102 is requested.
次に、実施例2の情報処理装置のCSI部の論理回路について説明する。図10は、実施例2の情報処理装置のCSI部の論理回路を示す回路図である。同図に示すように、CSI部105は、一致判定ゲート105aと、比較判定ゲート105bと、ANDゲート105cとを有する。
Next, a logic circuit of the CSI unit of the information processing apparatus according to the second embodiment will be described. FIG. 10 is a circuit diagram illustrating a logic circuit of the CSI unit of the information processing apparatus according to the second embodiment. As shown in the figure, the
CSI部105は、Delinquent Loadのロード対象のメモリデータを生成したストア命令(Corresponding Store)を識別する機構である。主処理部101によってオペランドアドレスを指定してストア命令が指示されたときに、DLT部104を参照して該オペランドアドレスが該DLT部104に記憶されるか否かを判定する。さらに、該オペランドアドレスが該DLT部104に記憶されると判定された場合に、該オペランドアドレスに対応付けられているキャッシュミス回数が所与の閾値M(Mは自然数)を超えるか否かを判定する。所与の閾値Mを超えると判定されたオペランドアドレスVAijに対応するLoad識別子であるプログラムカウンタPCiで識別されるロード命令のLoad識別子であるプログラムカウンタPCiはDelinquent LoadとしてオペランドアドレスVAijと共にCSAB部106に記憶されることとなる。
The
次に、実施例2の情報処理装置における処理を説明する。図11は、実施例2の情報処理装置における処理を示すタイミングチャートである。なお、図11に示す各ステップはパイプ処理における1ステップを示す。同図に示すように、先ず、主処理部101から命令フェッチの実行(ステップS201)、命令デコードの実行(ステップS202)、アドレス計算の実行(ステップS203)、キャッシュアクセスの実行(ステップS204)が行われる。
Next, processing in the information processing apparatus according to the second embodiment will be described. FIG. 11 is a timing chart illustrating processing in the information processing apparatus according to the second embodiment. Each step shown in FIG. 11 represents one step in pipe processing. As shown in the figure, first, instruction fetch execution (step S201), instruction decode execution (step S202), address calculation execution (step S203), and cache access execution (step S204) from the
続いて、DLT104へLoad命令が追加される(ステップS205)。また、ステップS204のキャッシュアクセスにおいてキャッシュミスが発生した場合に、主記憶アクセスが実行される(ステップS206)。このステップS206の主記憶アクセスが終了すると、主処理部101においてレジスタライトが実行される(ステップS207)。これらステップS201〜ステップS207の処理は、図示するように第一段階のLoad命令に係る処理である。 Subsequently, a Load command is added to the DLT 104 (step S205). Further, when a cache miss occurs in the cache access in step S204, main memory access is executed (step S206). When the main memory access in step S206 is completed, register write is executed in the main processing unit 101 (step S207). The processes in steps S201 to S207 are processes related to the first stage Load command as shown in the figure.
ステップS207が終了すると、続いて主処理部101において命令フェッチの実行(ステップS208)、命令デコードの実行(ステップS209)、アドレス計算の実行(ステップS210)、DLTアクセスの実行(ステップS211)が行われる。ステップS210のアドレス計算の終了に続いて主記憶アクセスが実行され(ステップS212)、ステップS211のDLTアクセス終了に続いてCSAB更新が実行される(ステップS213)。なお、ステップS212の処理及びステップS213の処理は平行して実行されてもよいものである。これらステップS208〜ステップS213の処理は、図示するように第二段階のStore命令に係る処理である。
When step S207 ends, the
ステップS213が終了すると、続いて主処理部101において、第三段階のLoad命令に係る命令フェッチの実行(ステップS214)、命令デコードの実行(ステップS215)、アドレス計算の実行(ステップS216)、キャッシュアクセスの実行(ステップS217)が行われる。
When step S213 is completed, the
一方で、ステップS214の命令フェッチと同時に、CSABアクセスが実行され(ステップS218)、ステップS218の終了に続いて主記憶アクセスが実行される(ステップS219)。 On the other hand, simultaneously with the instruction fetch in step S214, a CSAB access is executed (step S218), and the main memory access is executed following the end of step S218 (step S219).
ステップS219のメモリアクセスが終了すると、先のステップS217のキャッシュアクセスに基づいて、キャッシュ記憶部102から当該データの読み出しに成功することとなる。続いて、キャッシュ記憶部102から読み出しに成功したデータを主処理部101のレジスタにライトする(ステップS220)。
When the memory access in step S219 ends, the data is successfully read from the
上記したように、実施例2では、一度ロード命令によりキャッシュミスが発生し、Delinquent Loadとされたロード命令がロード対象のデータを特定するオペランドアドレスを該ロード命令のプログラムカウンタPCと共にCSABに記憶させる。そして、次回の同一のロード命令の実行時における命令フェッチと平行してCSABに記憶されるオペランドアドレスに基づいて必要とするデータのプリフェッチを要求するので、Delinquent Loadの実行が近づいたことを予測して、予め必要とするデータをキャッシュメモリに記憶させておくことができ、キャッスミスによるメモリアクセスのメモリレイテンシの発生を抑制することが可能となる。 As described above, in the second embodiment, a cache miss occurs once due to the load instruction, and the operand address that specifies the data to be loaded by the load instruction determined to be Delinquent Load is stored in the CTAB together with the program counter PC of the load instruction. . Then, since the prefetch of the required data is requested based on the operand address stored in the CSAB in parallel with the instruction fetch at the next execution of the same load instruction, it is predicted that the execution of Delinquent Load is approaching. Thus, necessary data can be stored in the cache memory in advance, and it is possible to suppress the occurrence of memory latency in memory access due to a miss.
かかる実施例2に示した方法は、ステップS215及びステップS216の処理時間が長ければ長いほど優位性を発揮する。これは、ステップS216の処理が終了するか否かに関わらず、ステップS214の命令フェッチと同時に、先行してステップS218のCSABアクセスを実行してメモリアクセスし、必要とするデータを先行してキャッシュメモリにプリフェッチさせておくことが可能となるためである。 The method shown in the second embodiment exhibits superiority as the processing time of step S215 and step S216 is longer. Regardless of whether or not the processing of step S216 is completed, at the same time as the instruction fetch of step S214, the CAB access of step S218 is executed in advance to perform memory access, and the necessary data is cached in advance. This is because the memory can be prefetched.
上記実施例1及び2で示したCPUコアに相当する主処理部101、CSDB部103、DLT部104、CSI部105及びCSAB部106が命令制御機構に相当し、命令制御機構にキャッシュ記憶部102を含めたものが情報処理装置に相当する。
The
以上、本発明の実施例を説明したが、本発明は、これに限られるものではなく、特許請求の範囲に記載した技術的思想の範囲内で、更に種々の異なる実施例で実施されてもよいものである。また、実施例に記載した効果は、これに限定されるものではない。 As mentioned above, although the Example of this invention was described, this invention is not limited to this, In the range of the technical idea described in the claim, even if it implements in a various different Example, it is. It ’s good. Moreover, the effect described in the Example is not limited to this.
(付記1)主記憶装置との間にキャッシュ装置が配置される情報処理装置であって、
前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶部を備えたことを特徴とする情報処理装置。
(Appendix 1) An information processing apparatus in which a cache device is arranged between the main storage device and
An information processing apparatus comprising: a load instruction storage unit for storing a load instruction in an identifiable manner when a cache miss occurs in the cache apparatus due to a load instruction for reading data from the main storage device.
(付記2)前記ロード命令記憶部は、前記キャッシュ装置においてキャッシュミスが発生したロード命令毎に該キャッシュミスが発生した回数を記憶することを特徴とする付記1記載の情報処理装置。
(Supplementary note 2) The information processing apparatus according to
(付記3)前記主記憶装置へデータを書き込むストア命令に応じて該主記憶装置へデータを書き込む際に、該ストア命令に対応するロード命令を識別し、該ロード命令が前記ロード命令記憶部に記憶されるか否かを判定するロード命令記憶判定部と、
前記ロード命令記憶判定部により前記ロード命令記憶部に記憶されると判定されたロード命令がキャッシュミスを発生した回数が所定閾値を超えるか否かを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部によりキャッシュミスが発生した回数が所定閾値を超えると判定されたロード命令が読み出し対象とするデータ若しくは該データを識別するデータ識別子をキャッシュするデータ記憶部と
を備えたことを特徴とする付記2記載の情報処理装置。
(Supplementary Note 3) When writing data to the main storage device in response to a store instruction for writing data to the main storage device, the load instruction corresponding to the store instruction is identified, and the load instruction is stored in the load instruction storage unit. A load instruction storage determination unit for determining whether or not to be stored;
A cache miss number determination unit that determines whether or not the number of times that the load instruction determined to be stored in the load instruction storage unit by the load instruction storage determination unit has caused a cache miss exceeds a predetermined threshold;
A data storage unit that caches data to be read or a data identifier that identifies the load instruction that is determined by the cache miss number determination unit that the number of times that a cache miss has occurred exceeds a predetermined threshold. The information processing apparatus according to supplementary note 2, which is characterized.
(付記4)前記主記憶装置からデータを読み出すロード命令実行時に、前記データ記憶部から該ロード命令が読み出し対象とするデータを読み出すことを特徴とする付記3記載の情報処理装置。 (Supplementary note 4) The information processing apparatus according to supplementary note 3, wherein when the load instruction for reading data from the main storage device is executed, data to be read by the load instruction is read from the data storage unit.
(付記5)前記主記憶装置からデータを読み出すロード命令実行前に、前記データ記憶部から該ロード命令が読み出し対象とするデータを、該データを識別するデータ識別子に基づいて前記主記憶装置から前記キャッシュ装置へ予め読み出しておくことを特徴とする付記3記載の情報処理装置。 (Supplementary Note 5) Before executing a load instruction for reading data from the main storage device, the data to be read by the load instruction from the data storage unit is read from the main storage device based on a data identifier for identifying the data. The information processing apparatus according to appendix 3, wherein the information is read out in advance to a cache apparatus.
(付記6)主記憶装置との間にキャッシュ装置が配置される情報処理装置においてロード命令を制御する命令制御機構であって、
前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶部を備えたことを特徴とする命令制御機構。
(Appendix 6) An instruction control mechanism for controlling a load instruction in an information processing apparatus in which a cache device is arranged between the main storage device,
An instruction control mechanism comprising: a load instruction storage unit for storing a load instruction in an identifiable manner when a cache miss occurs in the cache device by a load instruction for reading data from the main storage device.
(付記7)前記ロード命令記憶部は、前記キャッシュ装置においてキャッシュミスが発生したロード命令毎に該キャッシュミスが発生した回数を記憶することを特徴とする付記6記載の命令制御機構。 (Supplementary note 7) The instruction control mechanism according to supplementary note 6, wherein the load instruction storage unit stores the number of times a cache miss has occurred for each load instruction in which a cache miss has occurred in the cache device.
(付記8)前記主記憶装置へデータを書き込むストア命令に応じて該主記憶装置へデータを書き込む際に、該ストア命令に対応するロード命令を識別し、該ロード命令が前記ロード命令記憶部に記憶されるか否かを判定するロード命令記憶判定部と、
前記ロード命令記憶判定部により前記ロード命令記憶部に記憶されると判定されたロード命令がキャッシュミスを発生した回数が所定閾値を超えるか否かを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部によりキャッシュミスが発生した回数が所定閾値を超えると判定されたロード命令が読み出し対象とするデータ若しくは該データを識別するデータ識別子をキャッシュするデータ記憶部と
を備えたことを特徴とする付記7記載の命令制御機構。
(Supplementary Note 8) When writing data to the main storage device in response to a store instruction for writing data to the main storage device, the load instruction corresponding to the store instruction is identified, and the load instruction is stored in the load instruction storage unit. A load instruction storage determination unit for determining whether or not to be stored;
A cache miss number determination unit that determines whether or not the number of times that the load instruction determined to be stored in the load instruction storage unit by the load instruction storage determination unit has caused a cache miss exceeds a predetermined threshold;
A data storage unit that caches data to be read or a data identifier that identifies the load instruction that is determined by the cache miss number determination unit that the number of times that a cache miss has occurred exceeds a predetermined threshold. The instruction control mechanism according to appendix 7, which is characterized in that.
(付記9)主記憶装置との間にキャッシュ装置が配置される情報処理装置においてロード命令を制御する命令制御方法であって、
前記主記憶装置からデータを読み出すロード命令により前記キャッシュ装置においてキャッシュミスが発生した場合に該ロード命令を識別可能に記憶するロード命令記憶工程を含んだことを特徴とする命令制御方法。
(Supplementary note 9) An instruction control method for controlling a load instruction in an information processing device in which a cache device is arranged between the main storage device,
An instruction control method comprising a load instruction storing step of storing a load instruction in an identifiable manner when a cache miss occurs in the cache apparatus by a load instruction for reading data from the main storage device.
(付記10)前記ロード命令記憶工程は、前記キャッシュ装置においてキャッシュミスが発生したロード命令毎に該キャッシュミスが発生した回数を記憶することを特徴とする付記9記載の命令制御方法。 (Supplementary note 10) The instruction control method according to supplementary note 9, wherein the load instruction storing step stores the number of times the cache miss has occurred for each load instruction in which a cache miss has occurred in the cache device.
(付記11)前記主記憶装置へデータを書き込むストア命令に応じて該主記憶装置へデータを書き込む際に、該ストア命令に対応するロード命令を識別し、該ロード命令が前記キャッシュミス記憶工程で記憶されたか否かを判定するロード命令記憶判定工程と、
前記ロード命令記憶判定工程により前記キャッシュミス記憶工程で記憶されたと判定されたロード命令がキャッシュミスを発生した回数が所定閾値を超えるか否かを判定するキャッシュミス回数判定工程と、
前記キャッシュミス回数判定工程によりキャッシュミスが発生した回数が所定閾値を超えると判定されたロード命令が読み出し対象とするデータ若しくは該データを識別するデータ識別子をキャッシュするデータ記憶工程と
を含んだことを特徴とする付記10記載の命令制御方法。
(Supplementary Note 11) When writing data to the main storage device in response to a store instruction for writing data to the main storage device, the load instruction corresponding to the store instruction is identified, and the load instruction is stored in the cache miss storage step. A load instruction storage determination step for determining whether or not it has been stored;
A cache miss number determination step of determining whether or not the number of times that the load instruction that has been determined to be stored in the cache miss storage step by the load instruction storage determination step causes a cache miss exceeds a predetermined threshold;
A data storage step for caching data to be read or a data identifier for identifying the data to be read by the load instruction determined that the number of occurrences of the cache miss exceeds a predetermined threshold in the cache miss number determination step. The instruction control method according to appendix 10, which is characterized by the following.
本発明は、特別なハードウェアを必要とせず、簡単かつ小規模な回路でロード命令のキャッシュミスによるメインメモリへのアクセスから発生するメモリレイテンシの影響を軽減したい場合に有用であり、特に、Delinquent Loadのキャッシュミスによるメモリレイテンシの影響を低減したい場合に有効である。 The present invention is useful when it is desired to reduce the influence of memory latency caused by accessing a main memory due to a cache miss of a load instruction in a simple and small circuit without requiring special hardware, and in particular, Delinquent This is effective when you want to reduce the impact of memory latency due to Load cache misses.
100 情報処理装置
101 主処理部
102 キャッシュ記憶部
103 CSDB部
104 DLT部
105 CSI部
105a 一致判定ゲート
105b 大小判定ゲート
105c ANDゲート
106 CSAD部
DESCRIPTION OF
Claims (5)
前記キャッシュメモリからデータを読み出すロード命令を実行する命令処理部と、
前記命令処理部が実行した前記ロード命令により前記キャッシュメモリにおいてキャッシュミスが発生した場合、キャッシュミスを発生したロード命令を識別するプログラムカウンタ情報と、前記プログラムカウンタ情報に対応する一つ又は複数のオペランドアドレスと、前記一つ又は複数のオペランドアドレスに対するロード命令がキャッシュミスを発生したキャッシュミス回数とを、キャッシュミスを発生したロード命令毎に記憶する命令記憶部と、
前記キャッシュメモリにデータを書き込むストア命令を実行する場合、前記ストア命令に対応するロード命令を識別するプログラムカウンタ情報が、前記命令記憶部に記憶されているかを判定する記憶判定部と、
前記記憶判定部が前記命令記憶部に記憶されていると判定したプログラムカウンタ情報に対応するキャッシュミス回数が、所定値を超えているかを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部が、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令のオペランドアドレスと、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令に対応するストア命令が書き込むデータとの組を保持するデータ記憶部と
を有することを特徴とする演算処理装置。 Cache memory to hold data,
An instruction processing unit for executing a load instruction for reading data from the cache memory;
When a cache miss occurs in the cache memory due to the load instruction executed by the instruction processing unit, program counter information for identifying a load instruction in which a cache miss has occurred, and one or more operands corresponding to the program counter information An instruction storage unit that stores an address and the number of cache misses in which a load instruction for the one or more operand addresses has caused a cache miss for each load instruction in which a cache miss has occurred ;
A storage determination unit that determines whether program counter information for identifying a load instruction corresponding to the store instruction is stored in the instruction storage unit when executing a store instruction to write data to the cache memory;
A cache miss number determination unit that determines whether or not the cache miss number corresponding to the program counter information determined by the storage determination unit to be stored in the instruction storage unit exceeds a predetermined value;
The cache miss number determination unit includes an operand address of a load instruction identified by program counter information determined that the cache miss number exceeds a predetermined value, and program counter information determined that the cache miss number exceeds a predetermined value. An arithmetic processing unit comprising: a data storage unit that holds a set of data to be written by a store instruction corresponding to an identified load instruction .
前記キャッシュメモリからデータを読み出すロード命令を実行する命令処理部と、
前記命令処理部が実行した前記ロード命令により前記キャッシュメモリにおいてキャッシュミスが発生した場合、キャッシュミスを発生したロード命令を識別するプログラムカウンタ情報と、前記プログラムカウンタ情報に対応する一つ又は複数のオペランドアドレスと、前記一つ又は複数のオペランドアドレスに対するロード命令がキャッシュミスを発生したキャッシュミス回数とを、キャッシュミスを発生したロード命令毎に記憶する命令記憶部と、
前記キャッシュメモリにデータを書き込むストア命令を実行する場合、前記ストア命令に対応するロード命令を識別するプログラムカウンタ情報が、前記命令記憶部に記憶されているかを判定する記憶判定部と、
前記記憶判定部が前記命令記憶部に記憶されていると判定したプログラムカウンタ情報に対応するキャッシュミス回数が、所定値を超えているかを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部が、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報と、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令に対応するストア命令のオペランドアドレスとの組を保持するデータ記憶部と
を有することを特徴とする演算処理装置。 Cache memory to hold data,
An instruction processing unit for executing a load instruction for reading data from the cache memory;
When a cache miss occurs in the cache memory due to the load instruction executed by the instruction processing unit, program counter information for identifying a load instruction in which a cache miss has occurred, and one or more operands corresponding to the program counter information An instruction storage unit that stores an address and the number of cache misses in which a load instruction for the one or more operand addresses has caused a cache miss for each load instruction in which a cache miss has occurred ;
A storage determination unit that determines whether program counter information for identifying a load instruction corresponding to the store instruction is stored in the instruction storage unit when executing a store instruction to write data to the cache memory;
A cache miss number determination unit that determines whether or not the cache miss number corresponding to the program counter information determined by the storage determination unit to be stored in the instruction storage unit exceeds a predetermined value;
The store corresponding to the load instruction identified by the program counter information determined by the cache miss number determination unit that the cache miss number exceeds a predetermined value and the program counter information determined that the cache miss number exceeds a predetermined value An arithmetic processing unit comprising: a data storage unit that holds a pair with an operand address of an instruction .
前記演算処理装置は、
データを保持するキャッシュメモリと、
前記主記憶装置又は前記キャッシュメモリからデータを読み出すロード命令を実行して前記キャッシュメモリでキャッシュミスが発生した場合、キャッシュミスを発生したロード命令を識別するプログラムカウンタ情報と、前記プログラムカウンタ情報に対応する一つ又は複数のオペランドアドレスと、前記一つ又は複数のオペランドアドレスに対するロード命令がキャッシュミスを発生したキャッシュミス回数とを、キャッシュミスを発生したロード命令毎に記憶する命令記憶部と、
前記キャッシュメモリにデータを書き込むストア命令を実行する場合、前記ストア命令に対応するロード命令を識別するプログラムカウンタ情報が、前記命令記憶部に記憶されているかを判定する記憶判定部と、
前記記憶判定部が前記命令記憶部に記憶されていると判定したプログラムカウンタ情報に対応するキャッシュミス回数が、所定値を超えているかを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部が、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令のオペランドアドレスと、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令に対応するストア命令が書き込むデータとの組を保持するデータ記憶部と
を有することを特徴とする情報処理装置。 In an information processing apparatus having a main storage device and an arithmetic processing device connected to the main storage device,
The arithmetic processing unit includes:
Cache memory to hold data,
When a load instruction for reading data from the main memory or the cache memory is executed and a cache miss occurs in the cache memory, program counter information for identifying the load instruction in which the cache miss has occurred, and corresponding to the program counter information An instruction storage unit that stores, for each load instruction in which a cache miss has occurred, and one or more operand addresses that perform, and a cache miss number in which the load instruction for the one or more operand addresses has generated a cache miss ;
A storage determination unit that determines whether program counter information for identifying a load instruction corresponding to the store instruction is stored in the instruction storage unit when executing a store instruction to write data to the cache memory;
A cache miss number determination unit that determines whether or not the cache miss number corresponding to the program counter information determined by the storage determination unit to be stored in the instruction storage unit exceeds a predetermined value;
The cache miss number determination unit includes an operand address of a load instruction identified by program counter information determined that the cache miss number exceeds a predetermined value, and program counter information determined that the cache miss number exceeds a predetermined value. An information processing apparatus comprising: a data storage unit that holds a pair with data to be written by a store instruction corresponding to an identified load instruction .
前記演算処理装置は、
データを保持するキャッシュメモリと、
前記主記憶装置又は前記キャッシュメモリからデータを読み出すロード命令を実行して前記キャッシュメモリでキャッシュミスが発生した場合、キャッシュミスを発生したロード命令を識別するプログラムカウンタ情報と、前記プログラムカウンタ情報に対応する一つ又は複数のオペランドアドレスと、前記一つ又は複数のオペランドアドレスに対するロード命令がキャッシュミスを発生したキャッシュミス回数とを、キャッシュミスを発生したロード命令毎に記憶する命令記憶部と、
前記キャッシュメモリにデータを書き込むストア命令を実行する場合、前記ストア命令に対応するロード命令を識別するプログラムカウンタ情報が、前記命令記憶部に記憶されているかを判定する記憶判定部と、
前記記憶判定部が前記命令記憶部に記憶されていると判定したプログラムカウンタ情報に対応するキャッシュミス回数が、所定値を超えているかを判定するキャッシュミス回数判定部と、
前記キャッシュミス回数判定部が、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報と、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令に対応するストア命令のオペランドアドレスとの組を保持するデータ記憶部と
を有することを特徴とする情報処理装置。 In an information processing apparatus having a main storage device and an arithmetic processing device connected to the main storage device,
The arithmetic processing unit includes:
Cache memory to hold data,
When a load instruction for reading data from the main memory or the cache memory is executed and a cache miss occurs in the cache memory, program counter information for identifying the load instruction in which the cache miss has occurred, and corresponding to the program counter information An instruction storage unit that stores, for each load instruction in which a cache miss has occurred, and one or more operand addresses that perform, and a cache miss number in which the load instruction for the one or more operand addresses has generated a cache miss ;
A storage determination unit that determines whether program counter information for identifying a load instruction corresponding to the store instruction is stored in the instruction storage unit when executing a store instruction to write data to the cache memory;
A cache miss number determination unit that determines whether or not the cache miss number corresponding to the program counter information determined by the storage determination unit to be stored in the instruction storage unit exceeds a predetermined value;
The store corresponding to the load instruction identified by the program counter information determined by the cache miss number determination unit that the cache miss number exceeds a predetermined value and the program counter information determined that the cache miss number exceeds a predetermined value An information processing apparatus comprising: a data storage unit that holds a pair with an operand address of an instruction .
前記演算処理装置が有する命令処理部が、前記キャッシュメモリからデータを読み出すロード命令を実行し、
前記命令処理部が実行した前記ロード命令により前記キャッシュメモリにおいてキャッシュミスが発生した場合、キャッシュミスを発生したロード命令を識別するプログラムカウンタ情報と、前記プログラムカウンタ情報に対応する一つ又は複数のオペランドアドレスと、前記一つ又は複数のオペランドアドレスに対するロード命令がキャッシュミスを発生したキャッシュミス回数とを、前記演算処理装置が有する命令記憶部が、キャッシュミスを発生したロード命令毎に記憶し、
前記演算処理装置が有する記憶判定部が、前記キャッシュメモリにデータを書き込むストア命令を実行する場合、前記ストア命令に対応するロード命令を識別するプログラムカウンタ情報が、前記命令記憶部に記憶されているかを判定し、
前記演算処理装置が有するキャッシュミス回数判定部が、前記命令記憶部に記憶されていると判定したプログラムカウンタ情報に対応するキャッシュミス回数が、所定値を超えているかを判定し、
前記演算処理装置が有するデータ記憶部が、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令のオペランドアドレスと、前記キャッシュミス回数が所定値を超えると判定したプログラムカウンタ情報で識別されるロード命令に対応するストア命令が書き込むデータとの組を保持する
ことを特徴とする演算処理装置の制御方法。 In an arithmetic processing unit having a cache memory for holding data,
The instruction processing unit included in the arithmetic processing unit executes a load instruction for reading data from the cache memory,
When a cache miss occurs in the cache memory due to the load instruction executed by the instruction processing unit, program counter information for identifying a load instruction in which a cache miss has occurred, and one or more operands corresponding to the program counter information The instruction storage unit of the arithmetic processing unit stores the address and the number of cache misses in which the load instruction for the one or more operand addresses has caused a cache miss for each load instruction in which a cache miss has occurred ,
When the storage determination unit included in the arithmetic processing unit executes a store instruction that writes data to the cache memory, is program counter information that identifies a load instruction corresponding to the store instruction stored in the instruction storage unit? Determine
The cache miss number determination unit included in the arithmetic processing unit determines whether the cache miss number corresponding to the program counter information determined to be stored in the instruction storage unit exceeds a predetermined value,
The data storage unit of the arithmetic processing unit determines the operand address of the load instruction identified by the program counter information determined that the number of cache misses exceeds a predetermined value, and the program determined that the number of cache misses exceeds a predetermined value A control method for an arithmetic processing unit, characterized by holding a pair with data written by a store instruction corresponding to a load instruction identified by counter information .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006268007A JP5116275B2 (en) | 2006-09-29 | 2006-09-29 | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006268007A JP5116275B2 (en) | 2006-09-29 | 2006-09-29 | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008090411A JP2008090411A (en) | 2008-04-17 |
JP5116275B2 true JP5116275B2 (en) | 2013-01-09 |
Family
ID=39374526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006268007A Active JP5116275B2 (en) | 2006-09-29 | 2006-09-29 | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5116275B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8452946B2 (en) * | 2009-12-17 | 2013-05-28 | Intel Corporation | Methods and apparatuses for efficient load processing using buffers |
JP6039772B1 (en) * | 2015-09-16 | 2016-12-07 | 株式会社東芝 | Memory system |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001134439A (en) * | 1999-11-05 | 2001-05-18 | Seiko Epson Corp | Cache predicting preload device and microcomputer and electronics |
JP3498673B2 (en) * | 2000-04-05 | 2004-02-16 | 日本電気株式会社 | Storage device |
JP3873589B2 (en) * | 2000-07-12 | 2007-01-24 | 株式会社日立製作所 | Processor system |
JP3594081B2 (en) * | 2001-01-23 | 2004-11-24 | 日本電気株式会社 | Information processing equipment |
JP3969009B2 (en) * | 2001-03-29 | 2007-08-29 | 株式会社日立製作所 | Hardware prefetch system |
JP4030314B2 (en) * | 2002-01-29 | 2008-01-09 | 富士通株式会社 | Arithmetic processing unit |
US20050071438A1 (en) * | 2003-09-30 | 2005-03-31 | Shih-Wei Liao | Methods and apparatuses for compiler-creating helper threads for multi-threading |
JP4532931B2 (en) * | 2004-02-25 | 2010-08-25 | 株式会社日立製作所 | Processor and prefetch control method |
-
2006
- 2006-09-29 JP JP2006268007A patent/JP5116275B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2008090411A (en) | 2008-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7383391B2 (en) | Prefetch mechanism based on page table attributes | |
JP4486750B2 (en) | Shared cache structure for temporary and non-temporary instructions | |
JP3640355B2 (en) | Instruction prefetch method and system for cache control | |
US6105111A (en) | Method and apparatus for providing a cache management technique | |
US8706969B2 (en) | Variable line size prefetcher for multiple memory requestors | |
CN107479860B (en) | Processor chip and instruction cache prefetching method | |
JP3739491B2 (en) | Harmonized software control of Harvard architecture cache memory using prefetch instructions | |
US20150134933A1 (en) | Adaptive prefetching in a data processing apparatus | |
US9396117B2 (en) | Instruction cache power reduction | |
US20090106499A1 (en) | Processor with prefetch function | |
CN108463808B (en) | Event triggered programmable prefetcher | |
US20080140934A1 (en) | Store-Through L2 Cache Mode | |
WO2005088455A2 (en) | Cache memory prefetcher | |
KR100234647B1 (en) | Data processing system with instruction prefetch | |
TW201621671A (en) | Dynamically updating hardware prefetch trait to exclusive or shared in multi-memory access agent | |
US9003123B2 (en) | Data processing apparatus and method for reducing storage requirements for temporary storage of data | |
US11010306B2 (en) | Apparatus and method for managing a cache hierarchy | |
JP5793061B2 (en) | Cache memory device, cache control method, and microprocessor system | |
CN108874691B (en) | Data prefetching method and memory controller | |
CN108874690B (en) | Data prefetching implementation method and processor | |
JP5116275B2 (en) | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus | |
US20230315471A1 (en) | Method and system for hardware-assisted pre-execution | |
JP4504134B2 (en) | System control apparatus, speculative fetch method, and information processing apparatus | |
CN112395000B (en) | Data preloading method and instruction processing device | |
JP6016689B2 (en) | Semiconductor device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090518 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120228 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120501 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120612 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120828 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120912 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20120918 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20121009 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121016 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5116275 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151026 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |