JP7363255B2 - Information processing device, information processing method, and program - Google Patents
Information processing device, information processing method, and program Download PDFInfo
- Publication number
- JP7363255B2 JP7363255B2 JP2019169294A JP2019169294A JP7363255B2 JP 7363255 B2 JP7363255 B2 JP 7363255B2 JP 2019169294 A JP2019169294 A JP 2019169294A JP 2019169294 A JP2019169294 A JP 2019169294A JP 7363255 B2 JP7363255 B2 JP 7363255B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- address
- entry
- instructions
- execution module
- 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
- 230000010365 information processing Effects 0.000 title claims description 73
- 238000003672 processing method Methods 0.000 title claims description 3
- 230000015654 memory Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 17
- 238000000034 method Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 4
- 230000007423 decrease Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Description
本発明は、情報処理装置などに用いられるキャッシュに関し、特に、命令を保存する命令キャッシュに関する。 The present invention relates to a cache used in an information processing device and the like, and particularly to an instruction cache for storing instructions.
情報処理装置は、具体的な命令を実行する実体として、プロセッサを含んでいる。プロセッサにおける命令の実行には、実行する命令とその命令で使用するデータとが、必要である。命令及びデータが供給されない場合、プロセッサは、命令及びデータの待ち状態となる。つまり、プロセッサの実行が停止する。プロセッサの実行効率を高めるためには、プロセッサの実行が停止しないように、命令とデータとをプロセッサに供給することが、重要である。 The information processing device includes a processor as an entity that executes specific instructions. The execution of an instruction in a processor requires the instruction to be executed and the data used by the instruction. If instructions and data are not provided, the processor waits for instructions and data. In other words, the processor stops executing. In order to increase the execution efficiency of a processor, it is important to supply instructions and data to the processor so that the execution of the processor does not stop.
命令に必要なデータについては、あらかじめ、プリフェッチ命令等を用いて、データキャッシュに保存することができる。しかし、命令は、分岐命令等がある。分岐命令は、分岐が発生するか否かに伴い、その命令の後に実行される命令が異なる。そのため、命令を命令キャッシュにプリフェッチすることは、難しい。 Data necessary for an instruction can be stored in a data cache in advance using a prefetch instruction or the like. However, the instructions include branch instructions and the like. The instruction executed after a branch instruction differs depending on whether a branch occurs or not. Therefore, it is difficult to prefetch instructions into the instruction cache.
なお、分岐命令で分岐するかどうかを予測する構成として、分岐予測器がある。しかし、分岐予測器に基づく予測は、あくまでも予測である。そのため、実際のプロセッサの動作は、必ずしも分岐予測器の予測どおり分岐するとは限らない。 Note that there is a branch predictor as a configuration for predicting whether or not a branch will be taken by a branch instruction. However, prediction based on a branch predictor is just a prediction. Therefore, actual processor operations do not necessarily branch as predicted by the branch predictor.
そこで、命令についてのキャッシュを実現するための技術が提案されている(例えば、特許文献1及び2を参照)。 Therefore, techniques for realizing caching of instructions have been proposed (see, for example, Patent Documents 1 and 2).
特許文献1は、コンパイラが生成した命令列の中に、命令をプリフェッチするための命令を挿入する技術を開示している。 Patent Document 1 discloses a technique for inserting an instruction for prefetching instructions into an instruction string generated by a compiler.
特許文献2は、特定のタスクを、キャッシュミスヒット率の低いコアに移動する技術を開示している。 Patent Document 2 discloses a technique for moving a specific task to a core with a low cache miss rate.
プロセッサが実行する命令には、頻繁に実行される命令が存在する。このような頻繁に実行される命令は、常に、命令キャッシュに配置されることが望ましい。 Among the instructions executed by a processor, there are instructions that are frequently executed. It is desirable that such frequently executed instructions are always placed in the instruction cache.
しかし、特許文献1に記載の技術は、命令キャッシュにおける命令の置き換えにおいて、命令を区別していない。 However, the technique described in Patent Document 1 does not distinguish between instructions when replacing instructions in the instruction cache.
そのため、特許文献1に記載の技術は、頻繁に実行される命令も、他の命令と同様に、命令キャッシュから追い出されてしまうという問題点があった。 Therefore, the technique described in Patent Document 1 has a problem in that frequently executed instructions are also evicted from the instruction cache like other instructions.
特許文献2に記載の技術は、特定のタスクとして、頻繁に実行される命令を含むタスクを用いると、キャッシュミスヒット率の低いコアのキャッシュに、頻繁に実行される命令を置くことができる。 In the technique described in Patent Document 2, when a task including frequently executed instructions is used as a specific task, the frequently executed instructions can be placed in the cache of a core with a low cache miss rate.
しかし、各コアは、動作が固定される場合は少ない。つまり、各コアにおけるキャッシュミスヒット率は、固定ではなく、常に変化する。 However, the operation of each core is rarely fixed. In other words, the cache miss rate in each core is not fixed and constantly changes.
特許文献2に記載の技術は、キャッシュミスヒット率が変化した場合に、コア間においてタスクを移動する動作が必要となる。この動作は、命令の実行とは異なる動作であり、プロセッサの実行効率を低下させる動作である。 The technology described in Patent Document 2 requires an operation to move tasks between cores when the cache miss rate changes. This operation is different from instruction execution, and is an operation that reduces the execution efficiency of the processor.
つまり、特許文献2に記載の技術は、各コアにおけるキャッシュミスヒット率の変化した場合に、プロセッサの実行効率が低下するという問題点があった。 In other words, the technique described in Patent Document 2 has a problem in that the execution efficiency of the processor decreases when the cache miss rate in each core changes.
本発明の目的は、上記問題点を解決し、命令キャッシュにおける所定の命令の置き換えを低減する情報処理装置などを提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and provide an information processing device that reduces the number of replacements of predetermined instructions in an instruction cache.
本発明の一形態における情報処理装置は、
命令を実行するプロセッサと、
プロセッサが実行する命令を保存する第1の命令記憶手段と、
第1の命令記憶手段において、優先的にキャッシュする命令を保存するアドレスの範囲を保存するアドレス記憶手段と
を含む実行モジュールと、
プロセッサが実行する命令のキャッシュとして、実行モジュールが保存する命令の複製を保存する第2の命令記憶手段と、
第2の命令記憶手段が保存した命令に関連するアドレスとして、実行モジュールにおける命令のアドレスを含むエントリを保存するエントリ記憶手段と、
エントリが保存するアドレスと、実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定するキャッシュ制御手段と
を含む命令キャッシュと
を含む。
An information processing device in one embodiment of the present invention includes:
a processor that executes instructions;
a first instruction storage means for storing instructions to be executed by the processor;
an execution module comprising: an address storage means for storing a range of addresses for storing instructions to be cached preferentially in the first instruction storage means;
a second instruction storage means for storing copies of instructions stored by the execution module as a cache of instructions executed by the processor;
Entry storage means for storing an entry containing an address of the instruction in the execution module as an address related to the instruction stored by the second instruction storage means;
an instruction cache comprising: a cache control means for determining an instruction to be replaced with a new instruction among instructions to be saved as a copy using an address to be saved by the entry and a range of addresses to be saved by the execution module;
本発明の別の形態における情報処理装置は、
上記情報処理装置と、
実行モジュールを生成するときに、
実行モジュールに含まれる命令の中で、優先的に命令キャッシュに保存する命令を指定する命令指定手段と、
実行モジュールにおいて、指定された命令を配置する実行モジュールにおけるアドレスを決定する命令配置決定手段と、
決定したアドレスに指定された命令を埋め込む命令埋め込み手段と
を含むローダをさらに含む。
An information processing device according to another embodiment of the present invention includes:
The above information processing device;
When generating an executable module,
an instruction specifying means for specifying an instruction to be preferentially stored in an instruction cache among instructions included in the execution module;
an instruction placement determining means for determining an address in the execution module to place a specified instruction in the execution module;
The method further includes a loader including an instruction embedding means for embedding the specified instruction at the determined address.
本発明の一形態における情報処理方法は、
命令を実行するプロセッサと、
プロセッサが実行する命令と、優先的にキャッシュする命令を保存するアドレスの範囲を保存する実行モジュールと、
命令キャッシュとを含む情報処理装置において、
命令キャッシュが
プロセッサが実行する命令のキャッシュとして、実行モジュールが保存する命令の複製を保存し、
保存した命令に関連するアドレスとして、実行モジュールにおける命令のアドレスを含むエントリを保存し、
エントリが保存するアドレスと、実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する。
An information processing method in one form of the present invention includes:
a processor that executes instructions;
an execution module that stores instructions to be executed by the processor and a range of addresses for storing instructions to be cached preferentially;
In an information processing device including an instruction cache,
The instruction cache stores copies of instructions stored by execution modules as a cache for instructions executed by the processor.
saving an entry containing the address of the instruction in the execution module as an address associated with the saved instruction;
Using the address saved by the entry and the range of addresses saved by the execution module, an instruction to be replaced with a new instruction among the instructions saved as a copy is determined.
本発明の一形態におけるプログラムは、
命令を実行するプロセッサを含む情報処理装置に、
プロセッサが実行する命令を保存し、
優先的にキャッシュする命令を保存するアドレスの範囲を保存する
実行モジュールとしての処理と、
プロセッサが実行する命令のキャッシュとして、実行モジュールが保存する命令の複製を保存し、
保存した命令に関連するアドレスとして、実行モジュールにおける命令のアドレスを含むエントリを保存し、
エントリが保存するアドレスと、実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する
命令キャッシュとしての処理と
を実行させる。
A program in one form of the present invention is
In an information processing device including a processor that executes instructions,
Stores the instructions that the processor executes,
Processing as an execution module that stores a range of addresses that store instructions to be cached with priority,
Stores a copy of the instructions stored by the execution module as a cache of instructions executed by the processor,
saving an entry containing the address of the instruction in the execution module as an address associated with the saved instruction;
Using the address stored by the entry and the range of addresses stored by the execution module, an instruction to be replaced with a new instruction is determined from among the instructions to be stored as a copy. Processing as an instruction cache is executed.
本発明に基づけば、命令キャッシュにおける所定の命令の置き換えを低減するとの効果を奏することができる。 According to the present invention, it is possible to reduce the number of replacements of predetermined instructions in the instruction cache.
次に、図面を参照して、本発明における実施形態について説明する。
なお、各図面は、本発明の実施形態を説明するためのものである。ただし、本発明は、各図面の記載に限られるわけではない。また、各図面の同様の構成には、同じ番号を付し、その繰り返しの説明を、省略する場合がある。また、以下の説明に用いる図面において、本発明の説明に関係しない部分の構成については、記載を省略し、図示しない場合もある。また、図面中の矢印の方向は、一例を示すものであり、ブロック間の信号の向きを限定するものではない。
Next, embodiments of the present invention will be described with reference to the drawings.
Note that each drawing is for explaining an embodiment of the present invention. However, the present invention is not limited to the description in each drawing. Further, similar configurations in each drawing may be designated by the same numbers, and repeated description thereof may be omitted. In addition, in the drawings used in the following explanation, the configuration of portions that are not related to the explanation of the present invention may be omitted and may not be illustrated. Furthermore, the directions of the arrows in the drawings are for illustrative purposes only, and do not limit the direction of signals between blocks.
なお、以下の説明に用いる命令は、1つの命令でもよく、複数の命令の組合せである命令列でもよい。例えば、各実施形態は、複数の命令用のパイプライン(wayとも呼ぶ)を備えていてもよい。ただし、以下の説明において、命令の構成を区別する必要がない場合は、単に「命令」と呼ぶ。 Note that the instruction used in the following explanation may be a single instruction, or may be an instruction sequence that is a combination of multiple instructions. For example, each embodiment may include a pipeline (also referred to as a way) for multiple instructions. However, in the following description, if there is no need to distinguish the structure of an instruction, it will simply be referred to as an "instruction."
また、以下の説明において、命令キャッシュにおいて置き換えを低減する対象となる命令(所定の命令)、つまり、命令キャッシュに優先的にキャッシュされる命令を、「優先命令」と呼ぶ。また、命令キャッシュおいて優先命令より優先的に置き換えられる命令を「非優先命令」と呼ぶ。 Furthermore, in the following description, an instruction (predetermined instruction) whose replacement is to be reduced in the instruction cache, that is, an instruction that is preferentially cached in the instruction cache is referred to as a "priority instruction." Further, an instruction that is replaced with priority over a priority instruction in the instruction cache is called a "non-priority instruction."
なお、優先命令は、任意である。例えば、優先命令は、所定の頻度より多く実行される命令である。あるいは、優先命令は、所定の間隔で実行される命令である。 Note that the priority command is arbitrary. For example, a priority instruction is an instruction that is executed more often than a predetermined frequency. Alternatively, priority instructions are instructions that are executed at predetermined intervals.
<第1の実施形態>
以下、図面を参照して、第1の実施形態について説明する。
<First embodiment>
The first embodiment will be described below with reference to the drawings.
[構成の説明]
図1は、第1の実施形態にかかる情報処理装置10の構成の一例を示すブロック図である。
[Configuration description]
FIG. 1 is a block diagram showing an example of the configuration of an
情報処理装置10は、命令キャッシュ100と、ローダ103と、実行モジュール120と、プロセッサ130とを含む。
実行モジュール120は、情報処理装置10のメモリ(図示せず)の上に生成され、プロセッサ130が実行する命令を含む。実行モジュール120は、その他の情報(例えば、実行に用いられるデータ)を含んでもよい。
The
プロセッサ130は、実行モジュール120に含まれる命令を実行する。その際、プロセッサ130は、命令のキャッシュとして、命令キャッシュ100を用いる。
なお、プロセッサ130は、命令キャッシュ100に加え、他のキャッシュ(例えば、データキャシュ)を用いてもよい。
Note that the
ローダ103は、実行モジュール120を生成する。
The
命令キャッシュ100は、実行モジュール120の命令の中で、プロセッサ130が実行する命令をキャッシュする。つまり、命令キャッシュ100は、命令のキャッシュとして、実行モジュール120に含まれる命令の複製を保存する。
The
そして、命令キャッシュ100は、後ほど説明するように、優先命令の置き換えを削減するように動作する。
The
続いて、図面を参照して、各構成の詳細を説明する。 Next, details of each configuration will be explained with reference to the drawings.
なお、プロセッサ130の構成及び動作は、一般的なプロセッサと同様のため、詳細な説明を省略する。
Note that the configuration and operation of the
(実行モジュール120)
実行モジュール120は、アドレス記憶部101と、命令記憶部124とを含む。
(Execution module 120)
命令記憶部124は、プロセッサ130が実行する命令を記憶する。図1に示されている命令記憶部124は、命令を記憶する構成の一例として、非優先命令記憶部121と、優先命令記憶部122とを含む。
The
非優先命令記憶部121は、非優先命令を保存する。
The non-priority
優先命令記憶部122は、優先命令を保存する。
The priority
アドレス記憶部101は、優先命令記憶部122のアドレスの範囲を保存する。
The
なお、アドレス記憶部101は、非優先命令記憶部121のアドレスの範囲を保存してもよい。この場合、以下の説明において、情報処理装置10は、優先命令のアドレスの範囲として、命令記憶部124のアドレスの範囲の中で、アドレス記憶部101が保存するアドレスの範囲を除いたアドレスの範囲を用いて動作すればよい。
Note that the
このように、命令記憶部124は、優先命令と、その他の命令(非優先命令)とを異なるアドレスの範囲に保存する。
In this way, the
図7は、実行モジュール120における領域の一例を示す図である。
FIG. 7 is a diagram showing an example of areas in the
図7に示されている実行モジュール120は、下限アドレス700と、上限アドレス701と、非優先命令領域702と、優先命令領域703とを含む。
The
なお、図7における領域などの配置は、一例である。実行モジュール120における領域などの配置は、図7に限定されない。例えば、下限アドレス700及び上限アドレス701は、最上位アドレスに配置されてもよい。
Note that the arrangement of regions and the like in FIG. 7 is an example. The arrangement of areas in the
優先命令領域703は、優先命令、つまり、命令キャッシュ100における置き換えを低減する命令を保存する領域である。
The
非優先命令領域702は、その他の命令(非優先命令)を保存する領域である。
The
下限アドレス700は、優先命令領域703の下限のアドレスを保存する。
The
上限アドレス701は、優先命令領域703の上限のアドレスを保存する。
The
下限アドレス700及び上限アドレス701が、アドレス記憶部101の一例である。
The
非優先命令領域702及び優先命令領域703が、命令記憶部124の一例である。
The
なお、命令記憶部124は、複数の非優先命令領域702及び優先命令領域703を含んでもよい。
Note that the
あるいは、非優先命令領域702及び優先命令領域703は、連続せずに、実行モジュール120において、離れたアドレスに配置されてもよい。
Alternatively, the
このように、実行モジュール120は、実行モジュール120における所定のアドレスの範囲を、非優先命令領域702及び優先命令領域703として用いればよい。
In this way, the
なお、命令記憶部124は、その他の領域を含んでもよい。
Note that the
また、アドレス記憶部101が保存するアドレスの範囲を示す情報は、アドレスの上限及び下限の組合せに限定されない。例えば、アドレス記憶部101は、アドレスの範囲として、アドレスの上限又は下限と、範囲の長さ又は容量とを保存してもよい。
Further, the information indicating the range of addresses stored in the
(ローダ103)
ローダ103は、所定のやり方に沿って、実行モジュール120を生成する。実行モジュール120の生成のやり方は、一般的なローダと同様のため、詳細な説明を省略する。
(Loader 103)
The
ただし、ローダ103は、実行モジュール120の生成の際に、実行モジュール120の所定のアドレスの範囲に、優先命令を配置する。
However, when generating the
なお、ローダ103がアドレスの範囲を取得するやり方は、任意である。例えば、ローダ103は、利用者から、所定のアドレスの範囲を取得してもよい。あるいは、ローダ103は、所定の規則に沿ってアドレスの範囲を生成してもよい。例えば、ローダ103は、実行モジュール120の容量の所定の比率の範囲を、アドレスの範囲として用いてもよい。
Note that the method by which the
ローダ103は、アドレスの範囲を、実行モジュール120のアドレス記憶部101に保存する。
The
以下、優先命令に関連する構成を説明する。 The configuration related to priority instructions will be explained below.
ローダ103は、命令指定部104と、命令配置決定部105と、命令埋め込み部106とを含む。
The
命令指定部104は、優先命令を指定する。
The
命令指定部104において、優先命令を指定するやり方は、限定されない。例えば、命令指定部104は、図示しない利用者が操作する装置から、優先命令に関する指定を取得してもよい。あるいは、命令指定部104は、所定の規則、情報処理装置10の構成、又は、実行モジュール120における実行内容を基に、優先命令を指定してもよい。
The method of specifying a priority instruction in the
命令配置決定部105は、実行モジュール120に含まれる命令を配置するアドレスを決定する。より詳細には、例えば、命令配置決定部105は、優先命令については、実行モジュール120の優先命令記憶部122に配置されるように、アドレスを決定する。また、命令配置決定部105は、非優先命令については、実行モジュール120の非優先命令記憶部121に配置されるようにアドレスを決定する。例えば、命令配置決定部105は、図7に示されている下限アドレス700及び上限アドレス701を用いて、命令を配置するアドレスを決定する。
The instruction
命令埋め込み部106は、命令配置決定部105が決定した実行モジュール120のアドレスに、命令を埋め込む。
The
上記のように構成されたローダ103は、優先命令を、実行モジュール120における優先命令記憶部122のアドレスの範囲に埋め込む。
The
上記のようなローダ103の動作の結果、命令キャッシュ100は、後ほど説明するように、実行モジュール120における命令のアドレスを用いて、優先命令であるか否かを判定できる。そして、命令キャッシュ100は、判定の結果を用いて、優先命令を命令キャッシュ100に残すような動作を実現できる。
As a result of the above-described operation of the
(命令キャッシュ100)
命令キャッシュ100は、キャッシュ制御部102と、命令記憶部111と、エントリ記憶部112とを含む。
(Instruction cache 100)
キャッシュ制御部102は、命令キャッシュ100における各構成を制御して、プロセッサ130が実行する命令のキャッシュを実現する。
The
命令記憶部111は、キャッシュ制御部102に制御されて、キャッシュとして、実行モジュール120に含まれる命令の中で、プロセッサ130が実行する命令を保存する。
The
なお、命令キャッシュ100が保存する命令は、実行モジュール120に保存されている命令である。そのため、命令キャッシュ100が保存する命令は、実行モジュール120が保存する命令の複製でもある。
Note that the instructions stored in the
エントリ記憶部112は、命令記憶部111が保存している命令(キャッシュしている命令)のアドレスに関連する情報(以下、「エントリ」と呼ぶ)を保存する。エントリについては、後ほど説明する。
The
以下の説明において、命令キャッシュ100は、複数の命令を保存しているとする。
In the following description, it is assumed that the
なお、命令キャッシュ100は、キャッシュとして、複数の命令を含む命令列(コマンド・アレイ)を保存してもよい。
Note that the
図2は、命令キャッシュ100の構成の一例を示す図である。なお、図2は、命令として命令列(コマンド・アレイ)を用いている場合の一例である。
FIG. 2 is a diagram showing an example of the configuration of the
図2に示されている命令キャッシュ100は、キャッシュ制御部200と、アドレスアレイ201と、データアレイ202とを含む。
キャッシュ制御部200は、図1におけるキャッシュ制御部102に相当する。
The
アドレスアレイ201は、エントリ記憶部112の一例であり、命令キャッシュ100に保存されている命令のアドレスに関連する情報(エントリ)を保存する。
The
データアレイ202は、命令記憶部111の一例であり、キャッシュとして、プロセッサ130が実行する命令を保存する。
The
図3は、エントリ310の構成の一例を示す図である。
FIG. 3 is a diagram showing an example of the configuration of the
エントリ310は、アドレス300と、Validビット301と、Priorityビット302とを含む。
アドレス300は、エントリ310に対応する命令のアドレス(実行モジュール120において配置されているアドレス)を保存する。なお、アドレス300は、その他のアドレス(例えば、対応する命令のデータアレイ202におけるアドレス)を、保存してもよい。
Address 300 stores the address of the instruction corresponding to entry 310 (the address located in execution module 120). Note that the
Validビット301は、エントリ310が有効であるか否かを示す情報である。
エントリ310が有効とは、エントリ310が実際の命令と関連付けられていることである。この場合、アドレス300は、有効なアドレスを保存している。エントリ310が無効とは、エントリ310が命令と関連付けられていないことである。
例えば、Validビット301が「1」の場合、エントリ310は有効である。Validビット301が「0」の場合、エントリ310は、有効ではない。なお、Validビット301は、1ビットの情報に限定されない。例えば、Validビット301は、1Byteの情報でもよい。
For example, if
キャッシュ制御部102は、エントリ310に対応した命令を命令記憶部111に保存した場合に、Validビット301を「有効(例えば、「1」)」に変更する。また、キャッシュ制御部102は、エントリ310を開放した場合に、Validビット301を「無効(例えば、「0」)」に変更する。
When the
Priorityビット302は、そのエントリ310に対応する命令が優先命令であるか否かを示す情報である。Priorityビット302も、1ビットに限られず、例えが、1Byteの情報でもよい。
The
キャッシュ制御部102は、命令をキャッシュする場合に、命令の実行モジュール120におけるアドレスと、アドレス記憶部101とを用いて、その命令が優先命令であるか否かを判定して、Priorityビット302を設定する。そして、キャッシュ制御部102は、命令を置き換える場合において、エントリ310に対応する命令が優先命令であるか否かの判定に、Priorityビット302を用いる。
When caching an instruction, the
ただし、キャッシュ制御部102は、命令を置き換える場合における命令が優先命令であるか否かの判定において、Priorityビット302を用いなくてもよい。例えば、キャッシュ制御部102は、命令を置き換える場合に、エントリに対応する命令の実行モジュール120におけるアドレス及びアドレス記憶部101を用いて、置き換える命令を判定してもよい。この場合、エントリ310は、Priorityビット302を含まなくてもよい。
However, the
なお、図3は、Validビット301を「V」、Priorityビット302を「P」を用いて表している。
Note that in FIG. 3, the
アドレスアレイ201(つまり、エントリ記憶部112)は、複数のwayに対応した命令を保存してもよい。 The address array 201 (that is, the entry storage unit 112) may store instructions corresponding to a plurality of ways.
図4は、4wayに対応したエントリ414の構成の一例を示す図である。
FIG. 4 is a diagram showing an example of the configuration of an
図4は、一例として、4wayの命令を示している。ただし、本実施形態におけるwayの数は、4に限られず、4未満でもよく、5以上でもよい。 FIG. 4 shows a 4-way instruction as an example. However, the number of ways in this embodiment is not limited to four, and may be less than four, or may be five or more.
図4に示されているエントリ414は、図3に示されたエントリ310に相当するエントリを4つ含む。
1つ目のエントリは、way0のエントリであり、アドレス400と、Validビット401と、Priorityビット402とを含む。
The first entry is a way0 entry and includes an
2つ目のエントリは、way1のエントリであり、アドレス403、Validビット404と、Priorityビット405とを含む。
The second entry is a way 1 entry, and includes an
3つ目のエントリは、way2のエントリであり、アドレス406と、Validビット407と、Priorityビット408とを含む。
The third entry is a way2 entry and includes an
4つ目のエントリは、way3のエントリであり、アドレス409と、Validビット410と、Priorityビット411とを含む。
The fourth entry is a way3 entry and includes an
さらに、図4に示されているエントリ414は、非優先エントリ412と、優先エントリ413とを含む。
Additionally, the
非優先エントリ412は、非優先命令に関連するエントリを示す情報(例えば、非優先命令に関連するエントリのwayの値)を保存する。
The
優先エントリ413は、優先命令に関連するエントリを示す情報(例えば、優先命令に関連するwayの値)を保存する。
The
なお、エントリ414は、その他の情報を含んでもよい。また、エントリ414は、上記の一部を含まなくてもよい。
Note that the
エントリ414が非優先エントリ412を含む場合、キャッシュ制御部102は、非優先エントリ412を用いて、非優先命令に対応するエントリがあるか否かの判定できる。なお、キャッシュ制御部102は、優先エントリ413に含まれないエントリを、非優先命令に対応するエントリを判定してもよい。
If the
このように、キャッシュ制御部102は、非優先エントリ412及び優先エントリ413のいずれかを用いて動作してもよい。そのため、エントリ414は、非優先エントリ412及び優先エントリ413のどちらかを含まなくてもよい。
In this way, the
なお、非優先エントリ412及び優先エントリ413のどちらにも含まれないエントリは、空エントリである。そこで、キャッシュ制御部102は、非優先エントリ412及び優先エントリ413を用いて空エントリを判定してもよい。この場合、エントリ414は、Validビット401、404、407及び410を含まなくてもよい。
Note that an entry that is not included in either the
なお、キャッシュ制御部102は、Priorityビット402、405、408及び411を用いて、非優先エントリ412及び優先エントリ413に情報を設定すればよい。
Note that the
ただし、キャッシュ制御部102は、各エントリに対応する命令の実行モジュール120におけるアドレスと、アドレス記憶部101とを用いて、非優先エントリ412及び優先エントリ413を設定してもよい。この場合、エントリ414は、Priorityビット402、405、408及び411を含まなくてもよい。
However, the
図5は、キャッシュ制御部102における命令を判定する動作を説明するための図である。
FIG. 5 is a diagram for explaining the operation of determining an instruction in the
図5に示されているキャッシュ制御部102の動作は、図7に示されている実行モジュール120を用いる場合、より詳細には、下限アドレス500及び上限アドレス501を用いる場合の動作の一例である。
The operation of the
なお、キャッシュ制御部102は、下限アドレス500及び上限アドレス501として、実行モジュール120が保存する下限アドレス700及び上限アドレス701を用いてもよい。あるいは、キャッシュ制御部102は、キャッシュ制御部102内に、実行モジュール120が保存する下限アドレス700及び上限アドレス701の複製を保存してもよい。
Note that the
まず、キャッシュ制御部102は、命令のアドレス(詳細には、命令に対応するエントリに含まれるアドレス)と、下限アドレス500及び上限アドレス501を比較する。
First, the
なお、キャッシュ制御部102は、比較器503を含み、比較器503を用いてアドレスを比較してもよい。あるいは、キャッシュ制御部102は、ソフトウェアの処理として、アドレスを比較してもよい。
Note that the
命令のアドレスが下限アドレス500及び上限アドレス501の範囲に含まれる場合、キャッシュ制御部102は、その命令を、優先命令(優先的に命令キャッシュ100に残す命令)と判定する。
If the address of the instruction is included in the range of the
命令のアドレスが下限アドレス500及び上限アドレス501の範囲に含まれない場合、キャッシュ制御部102は、その命令を、非優先命令(優先的には命令キャッシュ100に残さない命令)と判定する。
If the address of the instruction is not included in the range of the
図6は、キャッシュ制御部102における置き換える命令に決める動作の一例を示すフロー図である。命令の置き換えは、プロセッサ130が実行する命令が命令キャッシュ100にない場合(キャッシュミスの場合)に発生する。なお、キャッシュミスの判定などは、一般的なキャッシュと同様のため、詳細な説明を省略する。
FIG. 6 is a flow diagram illustrating an example of an operation in which the
キャッシュミスの命令など新たな命令をキャッシュに追加する場合に、キャッシュ制御部102は、以下で説明する動作を実行する。
When adding a new instruction such as a cache miss instruction to the cache, the
まず、キャッシュ制御部102は、空エントリ(未使用のエントリ)があるか否かを判定する(ステップS801)。例えば、キャッシュ制御部102は、図3に示したValidビット301、又は、図4に示したValidビット401、404、407、及び410を用いて、空エントリを判定すればよい。
First, the
空エントリがある場合(ステップS801でYes)、キャッシュ制御部102は、新しい命令用のエントリとして、その空エントリを使用する(ステップS803)。つまり、キャッシュ制御部102は、空エントリを用いて、新しい命令をキャッシュする。
If there is an empty entry (Yes in step S801), the
空エントリがない場合(ステップS801でNo)、キャッシュ制御部102は、非優先命令に対応するエントリがあるか否かを判定する(ステップS805)。例えば、キャッシュ制御部102は、図3に示されているPriorityビット302、又は、図4に示されている非優先エントリ412を用いて、判定すればよい。
If there is no empty entry (No in step S801), the
例えば、非優先エントリ412がway番号を保存している場合、キャッシュ制御部102は、非優先命令に対応するエントリがあると判定する。非優先エントリ412が、way番号を保存していない、又は、存在しないway番号を保存している場合、キャッシュ制御部102は、非優先命令に対応するエントリがないと判定する。
For example, if the
非優先命令に対応するエントリがある場合(ステップS805でYes)、キャッシュ制御部102は、そのエントリの中からいずれかのエントリを選択し、選択したエントリに対応する命令と新しい命令とを置き換える(ステップS807)。例えば、キャッシュ制御部102は、非優先エントリ412が保存しているway番号のエントリに対応する命令と新しい命令とを置き換える。なお、複数の非優先のエントリがある場合、キャッシュ制御部102は、所定の規則に沿って、エントリを選択する。
If there is an entry corresponding to a non-priority instruction (Yes in step S805), the
非優先命令に関連するエントリがない場合(ステップS805でNo)、キャッシュ制御部102は、優先命令に関連するエントリから、所定の規則に沿って、置き換えるエントリを選択する。そして、キャッシュ制御部102は、選択したエントリに関連する命令と新しい命令とを置き換える(ステップS809)。例えば、キャッシュ制御部102は、優先エントリ413が保存するway番号のエントリから1つのエントリを選択する。
If there is no entry related to the non-priority instruction (No in step S805), the
なお、エントリの選択に用いられる所定の規則は、任意である。例えば、所定の規則は、Least Recently Used(LRU)、又は、Least Frequency Used(LFU)でもよい。 Note that the predetermined rule used for selecting entries is arbitrary. For example, the predetermined rule may be Least Recently Used (LRU) or Least Frequency Used (LFU).
このように、空エントリがある場合には、情報処理装置10は、新しい命令のエントリとして、空エントリを用いる。空エントリがなく、優先命令に対応するエントリと、非優先命令に対応するエントリとがある場合、情報処理装置10は、上記の動作を基に、新しい命令のエントリとして、非優先命令に対応するエントリを選択する。そのため、情報処理装置10は、上記の動作を基に、優先命令を、非優先命令より命令キャッシュ100に残すことができる。
In this way, if there is an empty entry, the
このような動作に基づいて、情報処理装置10は、命令キャッシュ100における、所定の命令(例えば、利用頻度が多い命令)の置き換えを低減する。
Based on such operations, the
[効果の説明]
次に第1の実施形態にかかる情報処理装置10の効果について説明する。
[Explanation of effects]
Next, the effects of the
第1の実施形態かかる情報処理装置10は、命令キャッシュ100における所定の命令(例えば、優先命令)の置き換えを低減するとの効果を得ることができる。
The
その理由は、次のとおりである。 The reason is as follows.
情報処理装置10は、プロセッサ130と、命令キャッシュ100と、実行モジュール120とを含む。プロセッサ130は、命令を実行する。実行モジュール120は、命令記憶部124(第1の命令記憶部)と、アドレス記憶部101とを含む。命令記憶部124は、プロセッサ130が実行する命令を保存する。アドレス記憶部101は、命令記憶部124において、優先的にキャッシュする命令を保存するアドレスの範囲を保存する。命令キャッシュ100は、命令記憶部111(第2の命令記憶部)と、エントリ記憶部112と、キャッシュ制御部102とを含む。命令記憶部111は、プロセッサ130が実行する命令のキャッシュとして、実行モジュール120が保存する命令の複製を保存する。エントリ記憶部112は、命令記憶部111が保存した命令に関連するアドレスとして、実行モジュール120における命令のアドレスを含むエントリ310を保存する。キャッシュ制御部102は、エントリ310が保存するアドレスと、実行モジュール120が保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する。
上記のように、実行モジュール120は、優先的にキャッシュに保存する命令を、アドレス記憶部101が記憶するアドレスの範囲に保存している。
As described above, the
そのため、命令キャッシュ100は、命令の実行モジュール120におけるアドレスを用いて、キャッシュしている命令が優先的にキャッシュする命令であるか否かを判定できる。そして、命令キャッシュ100は、判定結果を用いて、優先的にキャッシュする命令を残すように、命令の置き換えを実行する。
Therefore, the
そのため、このように構成された情報処理装置10は、命令キャッシュ100及び実行モジュール120の構成を用いて、命令キャッシュ100における所定の命令の置き換えを低減するとの効果を奏することができる。
Therefore, the
さらに、情報処理装置10は、ローダ103を含む。
Furthermore, the
ローダ103は、命令指定部104と、命令配置決定部105と、命令埋め込み部106とを含む。命令指定部104は、実行モジュール120を生成するときに、実行モジュール120に含まれる命令の中で、優先的に命令キャッシュ100に保存する命令(優先命令)を指定する。命令配置決定部105は、実行モジュール120において、指定された命令を配置する実行モジュール120におけるアドレスを決定する。命令埋め込み部106は、決定したアドレスに指定された命令を埋め込む。
The
このように構成されたローダ103は、命令キャッシュ100が上記動作を実現できるように実行モジュール120を生成することができる。
The
このように、第1の実施形態にかかる情報処理装置10は、所定の命令(例えば、頻繁に実行される命令)の命令キャッシュ100における置き換えを低減する。つまり、第1の実施形態にかかる情報処理装置10は、特許文献1における問題点を解決できる。
In this way, the
また、第1の実施形態にかかる情報処理装置10は、コア間での移動なども必要としない。したがって、第1の実施形態にかかる情報処理装置10は、特許文献2に記載された技術における問題点を解決し、プロセッサ130の実行効率の低下を低減するとの効果も奏することができる。
Further, the
<第2の実施形態>
なお、命令キャッシュ100、ローダ103及び、実行モジュール120は、同じ装置に含まれなくてもよい。例えば、ローダ103は、情報処理装置10とは異なる装置に設けられてもよい。
<Second embodiment>
Note that the
あるいは、実行モジュール120の生成後、ローダ103は、削除されてもよい。
Alternatively, after generating the
次に、図面を参照して、第2の実施形態について説明する。 Next, a second embodiment will be described with reference to the drawings.
[構成の説明]
図8は、第2の実施形態にかかる情報処理装置11の構成の一例を示すブロック図である。
[Configuration description]
FIG. 8 is a block diagram showing an example of the configuration of the
情報処理装置11は、プロセッサ130と、命令キャッシュ100と、実行モジュール120とを含む。
プロセッサ130は、命令を実行する。
実行モジュール120は、図示しないローダ103と同様の構成を用いて生成される。
The
実行モジュール120は、アドレス記憶部101と、命令記憶部124(第1の命令記憶部)とを含む。
The
命令記憶部124は、命令を保存する。
The
アドレス記憶部101は、命令記憶部124が保存する命令の中で、優先命令が保存されているアドレスの範囲を保存する。
The
命令キャッシュ100は、命令記憶部111と、エントリ記憶部112と、キャッシュ制御部102とを含む。
命令記憶部111は、命令のキャッシュとして、命令の複製を保存する。
The
エントリ記憶部112は、命令記憶部111に保存された命令のアドレスを含むエントリ310を保存する。
The
キャッシュ制御部102は、アドレス記憶部101を用いて、命令記憶部124に保存されている命令が優先命令か否かを判定できる。
The
さらに、命令キャッシュ100が命令を置き換える場合においても、キャッシュ制御部102は、アドレス記憶部101及びエントリ記憶部112を用いて、置き換える命令として、非優先命令を選択できる。
Further, even when the
[効果の説明]
このように構成された第2の実施形態にかかる情報処理装置11は、第1の実施形態にかかる情報処理装置11と同様の効果を実現できる。
[Explanation of effects]
The
その理由は、次のとおりである。 The reason is as follows.
情報処理装置11は、プロセッサ130と、命令キャッシュ100と、実行モジュール120とを含む。プロセッサ130は、命令を実行する。実行モジュール120は、命令記憶部124(第1の命令記憶部)と、アドレス記憶部101とを含む。命令記憶部124は、プロセッサ130が実行する命令を保存する。アドレス記憶部101は、命令記憶部124において、優先的にキャッシュする命令を保存するアドレスの範囲を保存する。命令キャッシュ100は、命令記憶部111(第2の命令記憶部)と、エントリ記憶部112と、キャッシュ制御部102とを含む。命令記憶部111は、プロセッサ130が実行する命令のキャッシュとして、実行モジュール120が保存する命令の複製を保存する。エントリ記憶部112は、命令記憶部111が保存した命令に関連するアドレスとして、実行モジュール120における命令のアドレスを含むエントリ310を保存する。キャッシュ制御部102は、エントリ310が保存するアドレスと、実行モジュール120が保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する。
このように、情報処理装置11に含まれる命令キャッシュ100及び実行モジュール120に含まれ構成は、第1の実施形態における対応する構成と同様の機能を実現する。そのため、第2の実施形態にかかる情報処理装置11は、第1の実施形態にかかる情報処理装置10と同様の効果を実現できる。
In this way, the configurations included in the
なお、情報処理装置11は、第1の実施形態における最小構成でもある。
Note that the
[ハードウェア構成]
次に、情報処理装置10及び11のハードウェア構成について、情報処理装置10を用いて説明する。
[Hardware configuration]
Next, the hardware configurations of the
情報処理装置10の各構成部は、ハードウェア回路で構成されてもよい。
Each component of the
あるいは、情報処理装置10において、各構成部は、ネットワークを介して接続した複数の装置を用いて、構成されてもよい。
Alternatively, in the
あるいは、情報処理装置10において、複数の構成部は、1つのハードウェアで構成されてもよい。
Alternatively, in the
あるいは、情報処理装置10は、CPU(Central Processing Unit)と、ROM(Read Only Memory)と、RAM(Random Access Memory)とを含むコンピュータ装置として実現されてもよい。情報処理装置10は、上記構成に加え、さらに、入出力接続回路(IOC:Input and Output Circuit)を含むコンピュータ装置として実現されてもよい。情報処理装置10は、上記構成に加え、さらに、ネットワークインターフェース回路(NIC:Network Interface Circuit)を含むコンピュータ装置として実現されてもよい。
Alternatively, the
図9は、情報処理装置10のハードウェア構成の一例を示すブロック図である。なお、図9は、情報処理装置10のハードウェアの一例として、情報処理装置600を示す。
FIG. 9 is a block diagram showing an example of the hardware configuration of the
情報処理装置600は、CPU610と、ROM620と、RAM630と、内部記憶装置640と、IOC650と、NIC680とを含み、コンピュータ装置を構成している。
The
CPU610は、ROM620及び/又は内部記憶装置640からプログラムを読み込む。そして、CPU610は、読み込んだプログラムに基づいて、RAM630と、内部記憶装置640と、IOC650と、NIC680とを制御する。そして、CPU610を含むコンピュータは、これらの構成を制御し、図1に示されている、プロセッサ130、命令キャッシュ100、ローダ103、及び実行モジュール120としての各機能を実現する。
CPU610は、プロセッサ130の一例である。
CPU610は、各機能を実現する際に、RAM630又は内部記憶装置640を、プログラムの一時記憶媒体として使用してもよい。
The
また、CPU610は、コンピュータで読み取り可能にプログラムを記憶した記憶媒体690が含むプログラムを、図示しない記憶媒体読み取り装置を用いて読み込んでもよい。あるいは、CPU610は、NIC680を介して、図示しない外部の装置からプログラムを受け取り、RAM630又は内部記憶装置640に保存して、保存したプログラムを基に動作してもよい。
Further, the
なお、図示していないが、CPU610は、内蔵メモリを含んでもよい。この場合、内蔵メモリが、命令キャッシュ100として動作してもよい。
Although not shown, the
ROM620は、CPU610が実行するプログラム及び固定的なデータを記憶する。ROM620は、例えば、P-ROM(Programmable-ROM)又はフラッシュROMである。
The
RAM630は、CPU610が実行するプログラム及びデータを一時的に記憶する。RAM630は、例えば、D-RAM(Dynamic-RAM)である。
The
なお、RAM630が、実行モジュール120を保存してもよい。
Note that the
さらに、RAM630は、アクセス性能が異なる複数のメモリを含んでもよい。この場合、アクセス性能が高いメモリが、命令キャッシュ100として動作してもよい。
Furthermore,
内部記憶装置640は、情報処理装置600が長期的に保存するデータ及びプログラムを記憶する。また、内部記憶装置640は、CPU610の一時記憶装置として動作してもよい。内部記憶装置640は、例えば、ハードディスク装置、光磁気ディスク装置、SSD(Solid State Drive)又はディスクアレイ装置である。
The
なお、内部記憶装置640は、実行モジュール120を保存してもよい。
Note that the
ROM620と内部記憶装置640とは、不揮発性(non-transitory)の記憶媒体である。一方、RAM630は、揮発性(transitory)の記憶媒体である。そして、CPU610は、ROM620、内部記憶装置640、又は、RAM630に記憶されているプログラムを基に動作可能である。つまり、CPU610は、不揮発性記憶媒体又は揮発性記憶媒体を用いて動作可能である。
The
IOC650は、CPU610と、外部の装置とのデータを仲介する。図9は、外部の装置の一例として、入力機器660及び表示機器670を示す。IOC650は、例えば、IOインターフェースカード又はUSB(Universal Serial Bus)カードである。さらに、IOC650は、USBのような有線に限らず、無線を用いてもよい。
The
入力機器660は、情報処理装置600の操作者からの入力指示を受け取る機器である。入力機器660は、例えば、キーボード、マウス又はタッチパネルである。
The
表示機器670は、情報処理装置600の操作者に情報を表示する機器である。表示機器670は、例えば、液晶ディスプレイ、有機エレクトロルミネッセンス・ディスプレイ、又は、電子ペーパーである。
The
NIC680は、ネットワークを介した図示しない外部の装置とのデータのやり取りを中継する。NIC680は、例えば、LAN(Local Area Network)カードである。さらに、NIC680は、有線に限らず、無線を用いてもよい。
The
このように構成された情報処理装置600は、情報処理装置10と同様の効果を得ることができる。
The
その理由は、情報処理装置600のCPU610が、プログラムに基づいて情報処理装置10と同様の機能を実現できるためである。
The reason is that the
以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されるものではない。本願発明の構成及び詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. The configuration and details of the present invention can be modified in various ways that can be understood by those skilled in the art within the scope of the present invention.
10 情報処理装置
11 情報処理装置
100 命令キャッシュ
101 アドレス記憶部
102 キャッシュ制御部
103 ローダ
104 命令指定部
105 命令配置決定部
106 命令埋め込み部
111 命令記憶部
112 エントリ記憶部
120 実行モジュール
121 非優先命令記憶部
122 優先命令記憶部
124 命令記憶部
130 プロセッサ
200 キャッシュ制御部
201 アドレスアレイ
202 データアレイ
300 アドレス
301 Validビット
302 Priorityビット
310 エントリ
400 アドレス
401 Validビット
402 Priorityビット
403 アドレス
404 Validビット
405 Priorityビット
406 アドレス
407 Validビット
408 Priorityビット
409 アドレス
410 Validビット
411 Priorityビット
412 非優先エントリ
413 優先エントリ
414 エントリ
500 下限アドレス
501 上限アドレス
503 比較器
600 情報処理装置
610 CPU
620 ROM
630 RAM
640 内部記憶装置
650 IOC
660 入力機器
670 表示機器
680 NIC
690 記憶媒体
700 下限アドレス
701 上限アドレス
702 非優先命令領域
703 優先命令領域
10
620 ROM
630 RAM
640
660
690
Claims (8)
ローダによりメモリに生成され、
生成されるときに、
前記プロセッサが実行する命令を保存する第1の命令記憶手段と、
前記第1の命令記憶手段において、優先的にキャッシュする命令を保存するアドレスの範囲を保存するアドレス記憶手段と
を含むように生成される実行モジュールと、
前記プロセッサが実行する命令のキャッシュとして、前記実行モジュールが保存する命令の複製を保存する第2の命令記憶手段と、
前記第2の命令記憶手段が保存した命令に関連するアドレスとして、前記実行モジュールにおける命令のアドレスを含むエントリを保存するエントリ記憶手段と、
エントリが保存するアドレスと、前記実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定するキャッシュ制御手段と
を含む命令キャッシュと
を含む情報処理装置。 a processor that executes instructions;
generated in memory by the loader,
When generated,
a first instruction storage means for storing instructions to be executed by the processor;
an execution module generated to include, in the first instruction storage means, an address storage means for storing a range of addresses for storing instructions to be preferentially cached;
a second instruction storage means for storing copies of instructions stored by the execution module as a cache of instructions executed by the processor;
Entry storage means for storing an entry including an address of the instruction in the execution module as an address related to the instruction stored by the second instruction storage means;
an instruction cache comprising: a cache control means for determining an instruction to be replaced with a new instruction among instructions to be saved as a copy using an address to be saved by an entry and a range of addresses to be saved by the execution module; Information processing device.
前記エントリ記憶手段が保存するエントリにおいて、命令に関連しないエントリがある場合、命令に関連しないエントリを新たな命令のエントリとして決定し、
命令に関連しないエントリがない場合、前記アドレス記憶手段が保存するアドレスの範囲に含まれないアドレスを含むエントリに関連する命令を、新たな命令と置き換える命令と決定する
請求項1に記載の情報処理装置。 The cache control means,
If there is an entry unrelated to the instruction among the entries stored by the entry storage means, the entry unrelated to the instruction is determined as an entry of a new instruction;
Information processing according to claim 1, wherein if there is no entry unrelated to the instruction, an instruction related to an entry including an address that is not included in the range of addresses stored by the address storage means is determined to be an instruction to be replaced with a new instruction. Device.
エントリが有効であるか否かを示す情報を含み、
前記キャッシュ制御手段が、エントリが有効であるか否かの情報を用いてエントリが命令に関連するか否かを判定する
請求項2に記載の情報処理装置。 The entry is
Contains information indicating whether the entry is valid or not,
The information processing apparatus according to claim 2, wherein the cache control means determines whether an entry is related to an instruction using information as to whether the entry is valid or not.
前記第2の命令記憶手段に命令を複製するときに、前記実行モジュールにおける命令のアドレスと、前記アドレス記憶手段が保存するアドレスの範囲とを用いて、複製する命令が優先的にキャッシュする命令であるか否かを判定し、
エントリに判定の結果を保存し、
エントリに保存された判定の結果を用いて、置き換える命令を決定する
請求項1ないし3のいずれか1項に記載の情報処理装置。 When the cache control means copies an instruction to the second instruction storage means, the instruction to be copied is given priority by using the address of the instruction in the execution module and the range of addresses stored in the address storage means. Determine whether the instruction is to be cached in
Save the judgment result in the entry,
The information processing apparatus according to any one of claims 1 to 3, wherein a replacement instruction is determined using a determination result stored in an entry.
アドレスの範囲として、アドレスの範囲の下限アドレス及び上限アドレスを保存する
請求項1ないし4のいずれか1項に記載の情報処理装置。 The address storage means,
The information processing apparatus according to any one of claims 1 to 4, wherein a lower limit address and an upper limit address of the address range are stored as the address range.
前記ローダは、
前記実行モジュールを生成するときに、
前記実行モジュールに含まれる命令の中で、優先的に前記命令キャッシュに保存する命令を指定する命令指定手段と、
前記実行モジュールにおいて、指定された命令を配置する前記実行モジュールの前記第1の命令記憶手段におけるアドレスを決定し、決定したアドレスを前記アドレス記憶手段に記憶する命令配置決定手段と、
決定した前記第1の命令記憶手段のアドレスに指定された命令を埋め込む命令埋め込み手段と
を含む
請求項1ないし5のいずれか1項に記載の情報処理装置。 further comprising the loader;
The loader is
When generating the execution module,
an instruction specifying means for specifying an instruction to be preferentially stored in the instruction cache among instructions included in the execution module;
In the execution module, an instruction placement determining unit that determines an address in the first instruction storage unit of the execution module where a designated instruction is to be placed, and stores the determined address in the address storage unit ;
an instruction embedding means for embedding a specified instruction in the determined address of the first instruction storage means;
including
The information processing device according to any one of claims 1 to 5 .
ローダによりメモリに生成され、生成されるときに、前記プロセッサが実行する命令と、優先的にキャッシュする命令を保存するアドレスの範囲を保存するように生成される実行モジュールと、
命令キャッシュとを含む情報処理装置において、
前記命令キャッシュが
前記プロセッサが実行する命令のキャッシュとして、前記実行モジュールが保存する命令の複製を保存し、
保存した命令に関連するアドレスとして、前記実行モジュールにおける命令のアドレスを含むエントリを保存し、
エントリが保存するアドレスと、前記実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する
情報処理方法。 a processor that executes instructions;
an execution module that is generated in a memory by a loader and that, when generated, stores instructions to be executed by the processor and a range of addresses that store instructions to be cached preferentially;
In an information processing device including an instruction cache,
the instruction cache stores copies of instructions stored by the execution module as a cache for instructions executed by the processor;
saving an entry containing an address of the instruction in the execution module as an address associated with the saved instruction;
An information processing method in which an instruction to be replaced with a new instruction among instructions to be saved as a copy is determined using an address saved by an entry and a range of addresses saved by the execution module.
ローダによりメモリに生成され、
生成されるときに、
前記プロセッサが実行する命令を保存し、
優先的にキャッシュする命令を保存するアドレスの範囲を保存するように
実行モジュールを生成する処理と、
前記プロセッサが実行する命令のキャッシュとして、前記実行モジュールが保存する命令の複製を保存し、
保存した命令に関連するアドレスとして、前記実行モジュールにおける命令のアドレスを含むエントリを保存し、
エントリが保存するアドレスと、前記実行モジュールが保存するアドレスの範囲とを用いて、複製として保存する命令の中で、新たな命令と置き換える命令を決定する
命令キャッシュとしての処理と
を実行させるプログラム。 In an information processing device including a processor that executes instructions,
generated in memory by the loader,
When generated,
storing instructions to be executed by the processor;
Now saves a range of addresses for saving instructions to be cached preferentially
Processing to generate an executable module,
storing a copy of the instructions stored by the execution module as a cache of instructions executed by the processor;
saving an entry containing an address of the instruction in the execution module as an address associated with the saved instruction;
A program that executes processing as an instruction cache: determining an instruction to be replaced with a new instruction among instructions to be saved as a copy, using an address saved by an entry and a range of addresses saved by the execution module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019169294A JP7363255B2 (en) | 2019-09-18 | 2019-09-18 | Information processing device, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019169294A JP7363255B2 (en) | 2019-09-18 | 2019-09-18 | Information processing device, information processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021047591A JP2021047591A (en) | 2021-03-25 |
JP7363255B2 true JP7363255B2 (en) | 2023-10-18 |
Family
ID=74878481
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019169294A Active JP7363255B2 (en) | 2019-09-18 | 2019-09-18 | Information processing device, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7363255B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002163151A (en) | 2000-10-17 | 2002-06-07 | Arm Ltd | Data processor, lockdown controller in the same, and method for locking data value |
-
2019
- 2019-09-18 JP JP2019169294A patent/JP7363255B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002163151A (en) | 2000-10-17 | 2002-06-07 | Arm Ltd | Data processor, lockdown controller in the same, and method for locking data value |
Also Published As
Publication number | Publication date |
---|---|
JP2021047591A (en) | 2021-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8812817B2 (en) | Non-blocking data transfer via memory cache manipulation | |
US5829025A (en) | Computer system and method of allocating cache memories in a multilevel cache hierarchy utilizing a locality hint within an instruction | |
JP5528554B2 (en) | Block-based non-transparent cache | |
US20060143396A1 (en) | Method for programmer-controlled cache line eviction policy | |
KR101639943B1 (en) | Shared memory control method for facilitating shared memory of general purpose graphic processor as cache and general purpose graphic processor using same | |
US9195605B2 (en) | Data bus efficiency via cache line usurpation | |
JP5536655B2 (en) | Cache memory, memory system, and data copy method | |
JP5422652B2 (en) | Avoiding self-eviction due to dynamic memory allocation in flash memory storage | |
JP2005276199A (en) | Method to provide cache management command for dma controller | |
JP2006092169A (en) | Memory controller, memory device and control method for memory controller | |
JP2014203405A (en) | Information processing device, memory control device, data transfer control method, and data transfer control program | |
US9483400B2 (en) | Multiplexed memory for segments and pages | |
KR100505695B1 (en) | Cache memory device having dynamically-allocated or deallocated buffers, digital data processing system comprising it and method thereof | |
KR101168364B1 (en) | Coherent caching of local memory data | |
JP7363255B2 (en) | Information processing device, information processing method, and program | |
CN110347614B (en) | Storage space mapping algorithm, cache state machine, storage device, and storage medium | |
JP2011186558A (en) | Memory management device and method | |
JP2007304747A (en) | Computer system and memory access method | |
JP2009093559A (en) | Processor, information processing device and cache control method of processor | |
JPH07129464A (en) | Information processor | |
JP4792065B2 (en) | Data storage method | |
JP2011141754A (en) | Cache memory | |
JP4008946B2 (en) | Cache memory and control method thereof | |
JP2013109404A (en) | Information processing device | |
JPH11143774A (en) | Cache control mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20211015 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220815 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230620 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230711 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230824 |
|
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: 20230905 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230918 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7363255 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |