JP5170050B2 - Hardware processor, hardware processor control method, and information processing apparatus - Google Patents

Hardware processor, hardware processor control method, and information processing apparatus Download PDF

Info

Publication number
JP5170050B2
JP5170050B2 JP2009226191A JP2009226191A JP5170050B2 JP 5170050 B2 JP5170050 B2 JP 5170050B2 JP 2009226191 A JP2009226191 A JP 2009226191A JP 2009226191 A JP2009226191 A JP 2009226191A JP 5170050 B2 JP5170050 B2 JP 5170050B2
Authority
JP
Japan
Prior art keywords
instruction
prefetch
arithmetic
hardware processor
reservation station
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
Application number
JP2009226191A
Other languages
Japanese (ja)
Other versions
JP2011076314A (en
Inventor
真太郎 百瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2009226191A priority Critical patent/JP5170050B2/en
Publication of JP2011076314A publication Critical patent/JP2011076314A/en
Application granted granted Critical
Publication of JP5170050B2 publication Critical patent/JP5170050B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、プリフェッチ命令を生成するハードウェアプロセッサおよびハードウェアプロセッサ制御方法並びに情報処理装置に関するものであって、特に、演算命令に基づいてプリフェッチ命令を生成するハードウェアプロセッサおよびハードウェアプロセッサ制御方法並びに情報処理装置に関するものである。   The present invention relates to a hardware processor that generates a prefetch instruction, a hardware processor control method, and an information processing apparatus, and more particularly to a hardware processor that generates a prefetch instruction based on an arithmetic instruction, a hardware processor control method, and The present invention relates to an information processing apparatus.

関連技術であるハードウェアプロセッサによりプリフェッチを生成する場合において、(1)メモリアクセスパターン解析による予測に基づきプリフェッチを生成する方式や、(2)ロードアドレスに基づき次のメモリアクセスアドレスを予測することにより、プリフェッチを生成する方式等が採用されていた。ところが、このような予測に依存することにより、ハードウェアプロセッサがプリフェッチを生成した後に、キャッシュミス(命令処理に必要なデータがキャッシュメモリに存在せず、キャッシュメモリからデータを読み込むことができない状態)を発生させるという問題があった。   When prefetch is generated by a hardware processor that is a related technique, (1) a method for generating prefetch based on prediction by memory access pattern analysis, or (2) prediction of the next memory access address based on load address A method for generating prefetches has been adopted. However, depending on such prediction, a cache miss occurs after the hardware processor generates prefetch (the data required for instruction processing does not exist in the cache memory, and data cannot be read from the cache memory). There was a problem of generating.

そこで、キャッシュミスを起こしたロード命令に対し、そのデータ転送列が連続するアドレスである場合にもメモリアクセスレイテンシを短縮して、キャッシュミスによる性能低下を軽減するために、キャッシュミスを起こしたロード命令の転送要求アドレスを履歴として記憶することで、連続するアドレスに対するキャッシュミスロードを検出し、後続のアドレスのデータに対するプリフェッチを発行する手法が、特許文献1で提案されている。   Therefore, in order to reduce the memory access latency and reduce the performance degradation due to the cache miss even when the data transfer sequence is a continuous address for the load instruction that caused the cache miss, the load that caused the cache miss is reduced. Patent Document 1 proposes a technique for detecting a cache misload for consecutive addresses by issuing an instruction transfer request address as a history and issuing a prefetch for data at subsequent addresses.

特開2002−297379号公報JP 2002-297379 A

しかしながら、特許文献1により提案された手法により、キャッシュミスによる性能低下を軽減するようなサポート機能を備えたとしても、プロセッサのキャッシュミスの発生自体を防ぐことができないという問題がある。
また、上記ハードウェアプロセッサでは、データ予測に基づくためキャッシュミスが発生し、発行されたプリフェッチが有効に機能せず、ロード命令が無駄になるという問題がある。
However, even if a support function that reduces performance degradation due to a cache miss is provided by the technique proposed in Patent Document 1, there is a problem in that the occurrence of a cache miss of the processor itself cannot be prevented.
Further, the hardware processor has a problem that a cache miss occurs due to the data prediction, the issued prefetch does not function effectively, and the load instruction is wasted.

更に、上記ハードウェアプロセッサでは、データ予測の失敗により生成されたプリフェッチにより、キャッシュ中の有効なデータが排除されてしまう問題、データ予測の失敗により生成されたプリフェッチにより必要以上にメモリ帯域が使用されることによるメモリ帯域利用効率の低下という問題がある。   Furthermore, in the hardware processor described above, there is a problem that valid data in the cache is excluded due to the prefetch generated due to the data prediction failure, and the memory bandwidth is used more than necessary due to the prefetch generated due to the data prediction failure. As a result, there is a problem that the memory bandwidth utilization efficiency decreases.

そこで、本発明は、上記事情に鑑み、キャッシュ中の有効なデータが排除されてしまうことがなく、メモリ帯域利用効率に優れ、ハードウェアプロセッサにより生成される全てのプリフェッチ命令を有効に活用することができるハードウェアプロセッサおよびハードウェアプロセッサ制御方法並びに情報処理装置を提供することを目的とするものである。   Therefore, in view of the above circumstances, the present invention does not eliminate valid data in the cache, is excellent in memory bandwidth utilization efficiency, and effectively utilizes all prefetch instructions generated by a hardware processor. An object of the present invention is to provide a hardware processor, a hardware processor control method, and an information processing apparatus that can perform the above processing.

前述の課題を解決するため、本発明によるハードウェアプロセッサおよびハードウェアプロセッサ制御方法並びに情報処理装置は、次のような特徴的な構成を採用している。下記(1)、(5)及び(6)なる番号は請求項の項番号にそれぞれ対応している。
(1)データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する演算命令発行部と、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を送信するプリフェッチ命令生成部と、
前記プリフェッチ命令生成部により送信された演算命令を受け付け、かつ該演算命令を処理する演算命令リザベーションステーション部と、
前記プリフェッチ命令生成部により送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するプリフェッチリザベーションステーション部とを有するハードウェアプロセッサ。
(5)データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する命令発行部を備えるハードウェアプロセッサのハードウェアプロセッサ制御方法において、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を異なるリザベーションステーション部に送信するステップと、
前記送信された演算命令を受け付け、かつ該演算命令を処理するステップと、
前記送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するステップを有するハードウェアプロセッサ制御方法。
(6)データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する命令発行部と備えるハードウェアプロセッサを有する情報処理装置において、
前記ハードウェアプロセッサが、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を送信するプリフェッチ命令生成部と、
前記プリフェッチ命令生成部により送信された演算命令を受け付け、かつ該演算命令を処理行する演算命令リザベーションステーション部と、
前記プリフェッチ命令生成部により送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するプリフェッチリザベーションステーション部とを備えるものであって、
前記情報処理装置の備える主記憶メモリにアクセスすることにより、前記演算命令および前記プリフェッチ命令を処理する情報処理装置。
In order to solve the above-described problems, the hardware processor, the hardware processor control method, and the information processing apparatus according to the present invention employ the following characteristic configuration. The numbers (1), (5) and (6) below correspond to the item numbers in the claims.
(1) an arithmetic instruction issuing unit for issuing an arithmetic instruction including a load instruction for reading data and a store instruction for writing data;
A prefetch instruction generator that accepts an arithmetic instruction issued by the instruction issuing unit, generates a prefetch instruction based on the arithmetic instruction, and transmits the arithmetic instruction and the prefetch instruction;
An arithmetic instruction reservation station that accepts an arithmetic instruction transmitted by the prefetch instruction generator and processes the arithmetic instruction;
A hardware processor having a prefetch reservation station unit that receives a prefetch instruction transmitted by the prefetch instruction generation unit and processes the prefetch instruction in parallel with the operation instruction.
(5) In a hardware processor control method of a hardware processor comprising an instruction issuing unit that issues an operation instruction including a load instruction for reading data and a store instruction for writing data,
Receiving an operation instruction issued by the instruction issuing unit, generating a prefetch instruction based on the operation instruction, and transmitting the operation instruction and the prefetch instruction to different reservation station units;
Receiving the transmitted operation instruction and processing the operation instruction;
A hardware processor control method comprising the steps of receiving the transmitted prefetch instruction and processing the prefetch instruction in parallel with the operation instruction.
(6) In an information processing apparatus having a hardware processor and an instruction issuing unit that issues an operation instruction including a load instruction for reading data and a store instruction for writing data,
The hardware processor is
A prefetch instruction generator that accepts an arithmetic instruction issued by the instruction issuing unit, generates a prefetch instruction based on the arithmetic instruction, and transmits the arithmetic instruction and the prefetch instruction;
An arithmetic instruction reservation station that accepts an arithmetic instruction transmitted by the prefetch instruction generator and processes the arithmetic instruction;
A prefetch reservation station that accepts a prefetch instruction transmitted by the prefetch instruction generation unit and processes the prefetch instruction in parallel with the operation instruction;
An information processing apparatus that processes the arithmetic instruction and the prefetch instruction by accessing a main memory included in the information processing apparatus.

本発明のハードウェアプロセッサおよびハードウェアプロセッサ制御方法並びに情報処理装置によれば、キャッシュ中の有効なデータが排除されてしまうことがなく、メモリ帯域利用効率に優れ、ハードウェアプロセッサにより生成される全てのプリフェッチ命令を有効に活用することができる。   According to the hardware processor, the hardware processor control method, and the information processing apparatus of the present invention, effective data in the cache is not excluded, memory bandwidth utilization efficiency is excellent, and everything generated by the hardware processor The prefetch instruction can be effectively used.

本発明の実施形態における情報処理装置を示すブロック図The block diagram which shows the information processing apparatus in embodiment of this invention 本発明の実施形態における演算命令およびプリフェッチ命令を処理するハードウェアプロセッサの一部を示すブロック図1 is a block diagram showing a part of a hardware processor that processes arithmetic instructions and prefetch instructions in an embodiment of the present invention;

発明の実施の形態となる情報処理装置1について、図面を参照しつつ説明する。図1は、本発明の実施形態による情報処理装置1の構成を示すブロック図である。本発明の実施形態によるハードウェアプロセッサ10は、命令発行部11と、プリフェッチ命令生成部12と、演算命令リザベーションステーション部13と、プリフェッチリザベーションステーション部14と、キャッシュユニット15と、演算部16とを備えるものであって、主記憶メモリ20および指示部40と接続されている。
また、命令発行部11には、プログラム30と指示部40が接続されている。キャッシュユニット15は、キャッシュ制御部およびキャッシュメモリを備えるものである。
An information processing apparatus 1 according to an embodiment of the invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of an information processing apparatus 1 according to an embodiment of the present invention. The hardware processor 10 according to the embodiment of the present invention includes an instruction issue unit 11, a prefetch instruction generation unit 12, an operation instruction reservation station unit 13, a prefetch reservation station unit 14, a cache unit 15, and an operation unit 16. The main memory 20 and the instruction unit 40 are connected.
The command issuing unit 11 is connected with a program 30 and an instruction unit 40. The cache unit 15 includes a cache control unit and a cache memory.

命令発行部11は、プログラム30中の命令語(例えば、コンパイル済みのアセンブラコード)に基づき、実行命令(演算命令)が発行される。命令発行部11から発行された命令は、プリフェッチ命令生成部12へ送信される。   The instruction issuing unit 11 issues an execution instruction (arithmetic instruction) based on an instruction word in the program 30 (for example, a compiled assembler code). The instruction issued from the instruction issuing unit 11 is transmitted to the prefetch instruction generating unit 12.

命令発行部11は、プログラム30中の命令語を受信すると、その命令語に従って、プリフェッチ命令生成部12および演算命令リザベーションステーション部13を介して演算部16に対して演算命令やアクセス命令を発行する。
演算部16は、演算命令リザベーションステーション部13による制御に基づいて主記憶メモリ20からロードしたデータ等について、命令発行部11から発行される演算命令に基づいて演算処理を実行する。また、演算部16は、演算命令リザベーションステーション部13およびプリフェッチリザベーションステーション部14により処理された演算命令およびプリフェッチなどのデータに基づいて演算処理を実行する。
When the instruction issuing unit 11 receives an instruction word in the program 30, the instruction issuing unit 11 issues an arithmetic instruction or an access instruction to the arithmetic unit 16 via the prefetch instruction generating unit 12 and the arithmetic instruction reservation station unit 13 according to the instruction word. .
The arithmetic unit 16 executes arithmetic processing on the data loaded from the main memory 20 based on the control by the arithmetic instruction reservation station unit 13 based on the arithmetic instruction issued from the instruction issuing unit 11. In addition, the arithmetic unit 16 executes arithmetic processing based on arithmetic instructions and data such as prefetch processed by the arithmetic instruction reservation station unit 13 and the prefetch reservation station unit 14.

プリフェッチ命令生成部12は、受信した全ての演算命令を演算命令リザベーションステーション部13へ送信すると共に、受取った演算命令中から、ロード系、及びストア系命令に該当するメモリアクセス系命令がターゲットとするデータをプリフェッチするプリフェッチ命令を生成し、プリフェッチリザベーションステーション部14へそのプリフェッチ命令を送信する。プリフェッチ命令生成部12は、受信した全ての演算命令に基づきプリフェッチ命令を生成する。   The prefetch instruction generation unit 12 transmits all received arithmetic instructions to the arithmetic instruction reservation station unit 13 and targets memory access instructions corresponding to load and store instructions from the received arithmetic instructions. A prefetch instruction for prefetching data is generated, and the prefetch instruction is transmitted to the prefetch reservation station unit 14. The prefetch instruction generation unit 12 generates a prefetch instruction based on all the received operation instructions.

演算命令リザベーションステーション部13は、全ての演算命令をプリフェッチ命令生成部12から受信する。例えば、演算命令リザベーションステーション部13は、ハードウェアプロセッサ10が、インオーダ型プロセッサにおいては演算命令の発行順に従い命令を処理してもよい。また、演算命令リザベーションステーション部13は、ハードウェアプロセッサ10が、アウトオブオーダ型プロセッサにおいては、各命令のアドレス依存関係等をチェックすることにより、発行可能な命令を先行命令の完了を待たずに処理する。インオーダ型プロセッサおよびアウトオブオーダ型プロセッサについては、当業者にとってよく知られており、方式そのものは本発明と直接関係しないため、その詳細については省略する。   The operation instruction reservation station unit 13 receives all operation instructions from the prefetch instruction generation unit 12. For example, in the operation instruction reservation station unit 13, the hardware processor 10 may process instructions in the order of operation instructions in the in-order type processor. In addition, the arithmetic instruction reservation station unit 13 allows the hardware processor 10 to check the address dependency relationship of each instruction in the out-of-order processor without waiting for completion of the preceding instruction. To process. The in-order type processor and the out-of-order type processor are well known to those skilled in the art, and since the method itself is not directly related to the present invention, its details are omitted.

プリフェッチリザベーションステーション部14は、プリフェッチ命令生成部12により生成されたプリフェッチ命令を受信し、演算命令リザベーションステーション13と平行して、プリフェッチ命令を処理するものである。
これにより、演算命令リザベーションステーション部13において、処理待ちとなっているメモリアクセス系命令に対して、先行してターゲットデータをプリフェッチすることが可能となる。
The prefetch reservation station unit 14 receives the prefetch instruction generated by the prefetch instruction generation unit 12 and processes the prefetch instruction in parallel with the operation instruction reservation station 13.
As a result, the arithmetic instruction reservation station unit 13 can prefetch target data in advance with respect to a memory access system instruction waiting for processing.

プリフェッチリザベーションステーション部14は、ハードウェアプロセッサ10が、インオーダ型プロセッサの際、演算命令を逐次実行するため、プリフェッチ命令よりも先に演算命令リザベーションステーション部13の対応メモリアクセス系命令が実行されることは無い。
しかし、プリフェッチリザベーションステーション部14は、ハードウェアプロセッサ10が、アウトオブオーダ型プロセッサの際、プリフェッチ命令が実行される前に、演算命令リザベーションステーション部13の対応メモリアクセス系命令が実行される可能性がある。この場合、プリフェッチリザベーションステーション部14は、実際のメモリアクセス系命令より後にプリフェッチ命令が実行されないようにするため、演算命令リザベーションステーション部13から、プリフェッチリザベーションステーション部14へキャンセル信号を送り、当該メモリアクセス系命令に対応するプリフェッチ命令を破棄することを可能とする。
When the hardware processor 10 is an in-order processor, the prefetch reservation station unit 14 sequentially executes operation instructions, so that the corresponding memory access system instruction of the operation instruction reservation station unit 13 is executed before the prefetch instruction. There is no.
However, when the hardware processor 10 is an out-of-order processor, the prefetch reservation station unit 14 may execute the corresponding memory access system instruction of the arithmetic instruction reservation station unit 13 before the prefetch instruction is executed. There is. In this case, the prefetch reservation station unit 14 sends a cancel signal from the operation instruction reservation station unit 13 to the prefetch reservation station unit 14 in order to prevent the prefetch instruction from being executed after the actual memory access system instruction. A prefetch instruction corresponding to a system instruction can be discarded.

演算命令リザベーションステーション部13およびプリフェッチリザベーションステーション部14から、演算部16に対する命令に基づき、キャッシュユニット15及び主記憶メモリ20へのアクセス制御を行なう。
キャッシュユニット15については、当業者にとってよく知られているように、一次キャッシュメモリや二次キャッシュメモリ等のように、演算部16、及び主記憶メモリ20の間にキャッシュを階層構造的に配置して構成することも可能である。
本実施の形態における各階層の複数のキャッシュメモリに対する制御については、各キャッシュメモリ毎に個別に制御する方式や、複数のキャッシュメモリを一括して制御する方式等が考えられる。
Based on an instruction to the arithmetic unit 16 from the arithmetic instruction reservation station unit 13 and the prefetch reservation station unit 14, access control to the cache unit 15 and the main memory 20 is performed.
As is well known to those skilled in the art, the cache unit 15 has caches arranged hierarchically between the arithmetic unit 16 and the main memory 20 such as a primary cache memory and a secondary cache memory. It is also possible to configure.
With respect to the control of a plurality of cache memories in each layer in the present embodiment, a method of controlling each cache memory individually, a method of controlling a plurality of cache memories in a batch, or the like can be considered.

なお、記憶装置としてのキャッシュユニット15、及び主記憶メモリ20については、当業者によって広く知られている一般的な記憶方式のものを利用することができる。それらの詳しい構成については説明を省略する。
プログラム30中の命令語は、例えば、コンパイル済みのアセンブラコードである。
As the cache unit 15 and the main memory 20 as a storage device, a general storage method widely known by those skilled in the art can be used. Description of the detailed configuration thereof is omitted.
The instruction word in the program 30 is, for example, compiled assembler code.

本実施の形態において、指示部40で指示する動作モード情報は、プログラム30の実行中(すなわち、ハードウェアプロセッサ10の動作中)に動的に変更することが可能である。
指示部40は、ハードウェア又はソフトウェアの何れによる指示であっても実現することが可能であって、例えば、プログラム30中の命令語におけるアクセス命令語中のキャッシュ利用指定に基づいて、キャッシュ利用有/キャッシュ利用無のアクセス命令を演算命令リザベーションステーション部13およびプリフェッチリザベーションステーション部14に送信するように制御するよう指示することができる。
In the present embodiment, the operation mode information instructed by the instruction unit 40 can be dynamically changed during the execution of the program 30 (that is, during the operation of the hardware processor 10).
The instruction unit 40 can be realized by any instruction by hardware or software. For example, based on the cache use designation in the access instruction word in the instruction word in the program 30, the cache use enable It is possible to instruct the control to transmit the access instruction without using the cache to the operation instruction reservation station unit 13 and the prefetch reservation station unit 14.

なお、ハードウェアプロセッサ10は、演算命令とプリフェッチ命令間の処理開始、及び処理完了を監視することにより、演算命令の処理開始後に、対応するプリフェッチ命令が処理されないよう制御することも可能とする。
また、ハードウェアプロセッサ10は、関連技術として前述したハードウェアプリフェッチのように、プリフェッチ命令に基づく予測を行わないものである。
Note that the hardware processor 10 can also control the corresponding prefetch instruction not to be processed after the start of the processing of the arithmetic instruction by monitoring the processing start and processing completion between the arithmetic instruction and the prefetch instruction.
Further, the hardware processor 10 does not perform prediction based on a prefetch instruction as in the hardware prefetch described above as a related technique.

このように、本発明の実施形態であるハードウェアプロセッサ10は、関連技術として前述したハードウェアプリフェッチ機構のように、メモリアクセスパターン解析に基づくものや、ロードアドレスに基づき次のメモリアクセスアドレスを予測するものとは異なる。   As described above, the hardware processor 10 according to the embodiment of the present invention predicts the next memory access address based on the memory access pattern analysis or the load address as in the hardware prefetch mechanism described above as the related technology. It is different from what you do.

本発明の実施形態におけるハードウェアプロセッサ10では、何らかの予測に基づくため、発行したプリフェッチが有効に機能せず、ロードデータが無駄になる場合が多いだけでなく、予測失敗のプリフェッチにより、キャッシュ中の有効なデータが追い出される問題や、予測失敗のプリフェッチによりメモリ帯域が使われることによるメモリ帯域利用効率低下の問題を解消することができる。   The hardware processor 10 according to the embodiment of the present invention is based on some prediction, so that the issued prefetch function does not function effectively and load data is often wasted. It is possible to solve the problem that effective data is evicted and the problem that the memory bandwidth usage efficiency is lowered due to the memory bandwidth being used due to the prefetch of the prediction failure.

ここで、ハードウェアプロセッサ10が、プリフェッチ命令を生成、実行するため説明を、図2を参照しながら、詳細に説明する。
ハードウェアプロセッサ10は、ロードおよびストア命令が発行され、発行された命令が演算命令リザベーションステーション部13中で処理待ち(または命令バッファ)となっている間に、それらロード、及びストア命令のターゲットとなるデータをプリフェッチ命令生成部12が、自動的にプリフェッチ命令を生成し、演算部16の演算命令の処理前にターゲットデータをキャッシュへ格納する。これにより、ロード、及びストアのキャッシュミスペナルティを軽減する。
具体的には、命令実行順序保証機能を有するハードウェアプロセッサ10は、関連技術として前述したように、何らかの予測機構に基づくものではなく、順序保証に基づく演算命令発行を発行する。図2に示すように処理待ちになっているロード(LD)およびストア命令(ST)に対して、ターゲットとなるデータを先行してプリフェッチ(PFTCH)を実行するものである(ADD(加算)については、プリフェッチしない)。このように、プリフェッチが予測に基づくものではなく、必要なデータを対象としたものとする。
Here, a description will be given in detail with reference to FIG. 2 for the hardware processor 10 to generate and execute a prefetch instruction.
The hardware processor 10 issues load and store instructions, and while the issued instructions are waiting for processing in the operation instruction reservation station unit 13 (or instruction buffer), The prefetch instruction generation unit 12 automatically generates a prefetch instruction and stores the target data in the cache before processing the arithmetic instruction of the arithmetic unit 16. This reduces load and store cache miss penalties.
Specifically, the hardware processor 10 having the instruction execution order guarantee function issues an operation instruction issue based on the order guarantee, not based on any prediction mechanism, as described above as the related art. As shown in FIG. 2, prefetch (PFTCH) is executed in advance of target data for load (LD) and store instructions (ST) waiting for processing (ADD (addition)). Does not prefetch). As described above, it is assumed that the prefetch is not based on the prediction but the necessary data is targeted.

ハードウェアプロセッサ10は、ロード、及びストア時のキャッシュミス軽減、不要データのプリフェッチによるキャッシュの汚染防止、及び不要データのプリフェッチによるメモリ帯域利用効率低下回避を実現する。また、ハードウェアプロセッサ10は、ロード系(LD)、及びストア系(ST)の主記憶メモリ20へのアクセス系命令は、メモリ操作の順序保証が必要であり、一般に先行ストアのデータを後続ロードが読み出す場合、後続ロードは先行する当該ストアを追い越すことができない。   The hardware processor 10 realizes reduction of cache misses during loading and storing, prevention of cache contamination due to prefetching of unnecessary data, and avoidance of lowering of memory bandwidth utilization efficiency due to prefetching of unnecessary data. Further, the hardware processor 10 requires the order of the memory operation for the access system instructions to the main memory 20 of the load system (LD) and the store system (ST), and generally the subsequent store data is subsequently loaded. , The subsequent load cannot overtake the preceding store.

しかしながら、本発明の実施形態では、ストアアドレスに基づきこれをプリフェッチすることにより、ストアキャッシュミスペナルティ回避、及び後続ロードのキャッシュミスペナルティ回避が可能である。
また、ハードウェアプロセッサ10は、上述したロード、及びストア間にアドレスの重複が無い場合は、プリフェッチリザベーションステーション部14に対して発行された全てのロード、及びストア命令のプリフェッチ命令化および処理が可能である。
However, in the embodiment of the present invention, it is possible to avoid the store cache miss penalty and avoid the cache miss penalty of the subsequent load by prefetching this based on the store address.
Further, when there is no duplication of addresses between the load and store described above, the hardware processor 10 can convert all the load and store instructions issued to the prefetch reservation station unit 14 into prefetch instructions and process them. It is.

更に、ハードウェアプロセッサ10は、本機構によりプリフェッチ実行中のターゲットデータに対して、ターゲットアドレスが同一の後続ロード、及びストア命令のプリフェッチは発行しない機構を有するものとし、プリフェッチ実行中の同一データのメモリアクセスの重複を回避することができる。   Further, the hardware processor 10 has a mechanism that does not issue a preload of a subsequent load and a store instruction having the same target address to the target data that is being prefetched by this mechanism. Duplicate memory access can be avoided.

以上により、本発明のハードウェアプロセッサ10によれば、命令発行部11が発行した演算命令を受け付け、演算命令に基づきプリフェッチ命令を生成し、演算命令およびプリフェッチ命令を送信するプリフェッチ命令生成部12と、プリフェッチ命令生成部12により送信された演算命令を受け付け、かつ演算命令を処理する演算命令リザベーションステーション部13と、プリフェッチ命令生成部12により送信されたプリフェッチ命令を受け付け、かつプリフェッチ命令を前記演算命令と平行して処理するプリフェッチリザベーションステーション部14と、を備えることにより、データ予測に基づくプリフェッチではないため、キャッシュ中の有効なデータが排除されてしまう問題、データ予測の失敗により生成されたプリフェッチにより必要以上にメモリ帯域が使用されることによるメモリ帯域利用効率の低下に関する問題が解消され、ハードウェアプロセッサにより生成される全てのプリフェッチ命令が有効に活用することができる。   As described above, according to the hardware processor 10 of the present invention, the prefetch instruction generating unit 12 that receives the arithmetic instruction issued by the instruction issuing unit 11, generates the prefetch instruction based on the arithmetic instruction, and transmits the arithmetic instruction and the prefetch instruction. The arithmetic instruction reservation station 13 for receiving the arithmetic instruction transmitted from the prefetch instruction generator 12 and processing the arithmetic instruction, the prefetch instruction transmitted by the prefetch instruction generator 12, and receiving the prefetch instruction as the arithmetic instruction The prefetch reservation station 14 that performs processing in parallel with the data processing, the prefetching is not based on data prediction, and therefore there is a problem that valid data in the cache is excluded, and the prefetch generated due to data prediction failure. Memory bandwidth than necessary by that addresses the issue regarding reduction in the memory bandwidth utilization due to being used, all prefetch instructions generated by hardware processor can be utilized effectively.

また、本発明の実施形態におけるハードウェアプロセッサ10によれば、第一の効果として、実際の主記憶メモリ20への演算命令に基づきプリフェッチ命令を生成する点が特徴的であり、関連技術として前述したハードウェアプリフェッチ機構は、メモリアクセスパターン解析に基づき、メモリアクセス予測に基づきプリフェッチを行なうため、予測失敗が起こる場合があるが、本発明の実施形態におけるハードウェアプロセッサ10は、予測に基づくプリフェッチではないため、ハードウェアより生成される全てのプリフェッチが有効なものとなる。   In addition, according to the hardware processor 10 of the embodiment of the present invention, as a first effect, it is characteristic that a prefetch instruction is generated based on an operation instruction to the actual main memory 20, and the related technique is described above. Since the hardware prefetch mechanism performs prefetch based on memory access prediction based on memory access pattern analysis, a prediction failure may occur. However, the hardware processor 10 according to the embodiment of the present invention does not perform prefetch based on prediction. Therefore, all prefetches generated from hardware are valid.

また、第二の効果として、主記憶メモリ20に記録されたアクセスレイテンシの長いプロセッサにおいては、キャッシュミス時のペナルティが大きいものとなっても、回避することができる。第三の効果としては、関連技術として前述したハードウェアプロセッサのプリフェッチでは予測に基づくプリフェッチであったが、本発明のプリフェッチは予測に基づくものではないので、予測失敗のプリフェッチによるメモリ負荷増大の回避、及び予測失敗のプリフェッチによるキャッシュ汚染防止が期待される。   As a second effect, in a processor with a long access latency recorded in the main memory 20, even if the penalty at the time of a cache miss becomes large, it can be avoided. As a third effect, the hardware processor prefetch described above as related technology was based on prediction, but the prefetch of the present invention is not based on prediction, so avoiding an increase in memory load due to prediction failure prefetching. In addition, it is expected to prevent cache pollution due to prefetch of prediction failure.

以上、本発明の好適実施例の構成を説明した。しかし、斯かる実施例は、本発明の単なる例示に過ぎず、何ら本発明を限定するものではないことに留意されたい。本発明の要旨を逸脱することなく、特定用途に応じて種々の変形変更が可能であることが、当業者には容易に理解できよう。例えば、本発明の実施態様は、課題を解決するための手段における構成(1)、(5)及び(6)に加え、次のような構成として表現できる。下記(2)−(4)なる番号は、請求項の項番号にそれぞれ対応している。
(2)前記プロセッサが、インオーダ型プロセッサである際、
前記演算命令リザベーションステーション部が、前記演算命令の受け付ける順に、該演算命令を処理する上記(1)のハードウェアプロセッサ。
(3)前記プロセッサが、アウトオーダ型プロセッサである際、
前記演算命令リザベーションステーション部が、前記演算命令の依存関係に基づいて、該演算命令を処理する上記(1)のハードウェアプロセッサ。
(4)前記プリフェッチリザベーションステーション部は、前記演算命令リザベーションステーション部において処理待ちとなっている演算命令に対して、先行してプリフェッチを処理する上記(1)から(3)のいずれか1項のハードウェアプロセッサ。
The configuration of the preferred embodiment of the present invention has been described above. However, it should be noted that such examples are merely illustrative of the invention and do not limit the invention in any way. Those skilled in the art will readily understand that various modifications and changes can be made according to a specific application without departing from the gist of the present invention. For example, the embodiment of the present invention can be expressed as the following configuration in addition to the configurations (1), (5), and (6) in the means for solving the problems. The numbers (2) to (4) below correspond to the item numbers in the claims.
(2) When the processor is an in-order processor,
The hardware processor according to (1), wherein the arithmetic instruction reservation station unit processes the arithmetic instructions in the order in which the arithmetic instructions are received.
(3) When the processor is an out-order processor,
The hardware processor according to (1), wherein the operation instruction reservation station unit processes the operation instruction based on the dependency relationship of the operation instruction.
(4) The prefetch reservation station unit processes prefetch in advance with respect to an operation instruction waiting for processing in the operation instruction reservation station unit, according to any one of (1) to (3) above Hardware processor.

1 情報処理装置
10 ハードウェアプロセッサ
11 命令発行部
12 プリフェッチ命令生成部
13 演算命令リザベーションステーション部
14 プリフェッチリザベーションステーション部
15 キャッシュユニット
16 演算部
20 主記憶メモリ
30 プログラム
40 指示部

DESCRIPTION OF SYMBOLS 1 Information processing apparatus 10 Hardware processor 11 Instruction issuing part 12 Prefetch instruction generation part 13 Arithmetic instruction reservation station part 14 Prefetch reservation station part 15 Cache unit 16 Operation part 20 Main memory 30 Program 40 Instruction part

Claims (6)

データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する演算命令発行部と、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を送信するプリフェッチ命令生成部と、
前記プリフェッチ命令生成部により送信された演算命令を受け付け、かつ該演算命令を処理する演算命令リザベーションステーション部と、
前記プリフェッチ命令生成部により送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するプリフェッチリザベーションステーション部と
を有するハードウェアプロセッサ。
An arithmetic instruction issuing unit for issuing an arithmetic instruction including a load instruction for reading data and a store instruction for writing data;
A prefetch instruction generator that accepts an arithmetic instruction issued by the instruction issuing unit, generates a prefetch instruction based on the arithmetic instruction, and transmits the arithmetic instruction and the prefetch instruction;
An arithmetic instruction reservation station that accepts an arithmetic instruction transmitted by the prefetch instruction generator and processes the arithmetic instruction;
A hardware processor comprising: a prefetch reservation station that receives a prefetch instruction transmitted by the prefetch instruction generation unit and processes the prefetch instruction in parallel with the operation instruction.
前記プロセッサが、インオーダ型プロセッサである際、
前記演算命令リザベーションステーション部が、前記演算命令の受け付ける順に、該演算命令を処理する請求項1記載のハードウェアプロセッサ。
When the processor is an in-order processor,
The hardware processor according to claim 1, wherein the arithmetic instruction reservation station unit processes the arithmetic instructions in the order in which the arithmetic instructions are received.
前記プロセッサが、アウトオーダ型プロセッサである際、
前記演算命令リザベーションステーション部が、前記演算命令の依存関係に基づいて、該演算命令を処理する請求項1記載のハードウェアプロセッサ。
When the processor is an out-order processor,
The hardware processor according to claim 1, wherein the arithmetic instruction reservation station unit processes the arithmetic instruction based on a dependency relationship of the arithmetic instruction.
前記プリフェッチリザベーションステーション部は、前記演算命令リザベーションステーション部において処理待ちとなっている演算命令に対して、先行してプリフェッチを処理する請求項1から3いずれか1項記載のハードウェアプロセッサ。   The hardware processor according to any one of claims 1 to 3, wherein the prefetch reservation station unit performs prefetch processing in advance on an arithmetic instruction waiting for processing in the arithmetic instruction reservation station unit. データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する命令発行部を備えるハードウェアプロセッサのハードウェアプロセッサ制御方法において、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を異なるリザベーションステーション部に送信するステップと、
前記送信された演算命令を受け付け、かつ該演算命令を処理するステップと、
前記送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するステップを有するハードウェアプロセッサ制御方法。
In a hardware processor control method of a hardware processor including an instruction issuing unit that issues an operation instruction including a load instruction for reading data and a store instruction for writing data,
Receiving an operation instruction issued by the instruction issuing unit, generating a prefetch instruction based on the operation instruction, and transmitting the operation instruction and the prefetch instruction to different reservation station units;
Receiving the transmitted operation instruction and processing the operation instruction;
A hardware processor control method comprising the steps of receiving the transmitted prefetch instruction and processing the prefetch instruction in parallel with the operation instruction.
データを読み込むロード命令及びデータを書き込むストア命令を含む演算命令を発行する命令発行部と備えるハードウェアプロセッサを有する情報処理装置において、
前記ハードウェアプロセッサが、
前記命令発行部が発行した演算命令を受け付け、前記演算命令に基づきプリフェッチ命令を生成し、前記演算命令および前記プリフェッチ命令を送信するプリフェッチ命令生成部と、
前記プリフェッチ命令生成部により送信された演算命令を受け付け、かつ該演算命令を処理行する演算命令リザベーションステーション部と、
前記プリフェッチ命令生成部により送信されたプリフェッチ命令を受け付け、かつ該プリフェッチ命令を前記演算命令と平行して処理するプリフェッチリザベーションステーション部とを備えるものであって、
前記情報処理装置の備える主記憶メモリにアクセスすることにより、前記演算命令および前記プリフェッチ命令を処理する情報処理装置。
In an information processing apparatus having a hardware processor including an instruction issuing unit that issues an operation instruction including a load instruction for reading data and a store instruction for writing data,
The hardware processor is
A prefetch instruction generator that accepts an arithmetic instruction issued by the instruction issuing unit, generates a prefetch instruction based on the arithmetic instruction, and transmits the arithmetic instruction and the prefetch instruction;
An arithmetic instruction reservation station that accepts an arithmetic instruction transmitted by the prefetch instruction generator and processes the arithmetic instruction;
A prefetch reservation station that accepts a prefetch instruction transmitted by the prefetch instruction generation unit and processes the prefetch instruction in parallel with the operation instruction;
An information processing apparatus that processes the arithmetic instruction and the prefetch instruction by accessing a main memory included in the information processing apparatus.
JP2009226191A 2009-09-30 2009-09-30 Hardware processor, hardware processor control method, and information processing apparatus Active JP5170050B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009226191A JP5170050B2 (en) 2009-09-30 2009-09-30 Hardware processor, hardware processor control method, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009226191A JP5170050B2 (en) 2009-09-30 2009-09-30 Hardware processor, hardware processor control method, and information processing apparatus

Publications (2)

Publication Number Publication Date
JP2011076314A JP2011076314A (en) 2011-04-14
JP5170050B2 true JP5170050B2 (en) 2013-03-27

Family

ID=44020238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009226191A Active JP5170050B2 (en) 2009-09-30 2009-09-30 Hardware processor, hardware processor control method, and information processing apparatus

Country Status (1)

Country Link
JP (1) JP5170050B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10042749B2 (en) 2015-11-10 2018-08-07 International Business Machines Corporation Prefetch insensitive transactional memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04365133A (en) * 1991-06-13 1992-12-17 Fujitsu Ltd Preload instruction executing device and program correcting device
US6134710A (en) * 1998-06-26 2000-10-17 International Business Machines Corp. Adaptive method and system to minimize the effect of long cache misses
JP4030314B2 (en) * 2002-01-29 2008-01-09 富士通株式会社 Arithmetic processing unit
JP5076616B2 (en) * 2007-04-24 2012-11-21 富士通株式会社 Processor and prefetch control method

Also Published As

Publication number Publication date
JP2011076314A (en) 2011-04-14

Similar Documents

Publication Publication Date Title
US8255631B2 (en) Priority-based prefetch requests scheduling and throttling
US10884739B2 (en) Systems and methods for load canceling in a processor that is connected to an external interconnect fabric
US8140768B2 (en) Jump starting prefetch streams across page boundaries
US8225070B2 (en) Information processing apparatus and cache memory control method
JP3739491B2 (en) Harmonized software control of Harvard architecture cache memory using prefetch instructions
JP5444889B2 (en) Arithmetic processing device and control method of arithmetic processing device
JP7160956B2 (en) Selective execution of advance branch prediction based on branch instruction type
JP2005276199A (en) Method to provide cache management command for dma controller
JP2006518053A (en) Prefetch generation by speculatively executing code through hardware scout threading
US10031852B2 (en) Arithmetic processing apparatus and control method of the arithmetic processing apparatus
WO2009054959A1 (en) Coherent dram prefetcher
JP2007207246A (en) Self prefetching l2 cache mechanism for instruction line
US20180196675A1 (en) Processor and instruction code generation device
KR100988334B1 (en) Cache control apparatus, and information processing apparatus
JP5170050B2 (en) Hardware processor, hardware processor control method, and information processing apparatus
JP4504134B2 (en) System control apparatus, speculative fetch method, and information processing apparatus
US11687460B2 (en) Network cache injection for coherent GPUs
US11474946B2 (en) Calculator and calculation method
JP4374956B2 (en) Cache memory control device and cache memory control method
JP2008015668A (en) Task management device
JP2006285727A (en) Cache memory device
JP5116275B2 (en) Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus
JP2008257508A (en) Cache control method, cache device, and microcomputer
JP3718667B2 (en) Information processing apparatus and information processing unit
US20070239939A1 (en) Apparatus for Performing Stream Prefetch within a Multiprocessor System

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120809

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: 20121204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121217

R150 Certificate of patent or registration of utility model

Ref document number: 5170050

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150