JP2015210655A - Arithmetic processing unit and control method of arithmetic processing unit - Google Patents
Arithmetic processing unit and control method of arithmetic processing unit Download PDFInfo
- Publication number
- JP2015210655A JP2015210655A JP2014091636A JP2014091636A JP2015210655A JP 2015210655 A JP2015210655 A JP 2015210655A JP 2014091636 A JP2014091636 A JP 2014091636A JP 2014091636 A JP2014091636 A JP 2014091636A JP 2015210655 A JP2015210655 A JP 2015210655A
- Authority
- JP
- Japan
- Prior art keywords
- request
- cache
- control unit
- arithmetic processing
- processing
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、演算処理装置及び演算処理装置の制御方法に関する。 The present invention relates to an arithmetic processing device and a control method for the arithmetic processing device.
近年、演算性能向上のために、演算処理装置は、SIMD(Single Instruction Multiple Data)と呼ばれる処理を行うことがある。SIMDは、複数のデータに対する演算を1つの命令でまとめて処理する手法である。また、SIMDを用いた演算処理の性能向上のために、ロード・ストア処理も、SIMDに応じた拡張がなされることが好ましい。 In recent years, in order to improve calculation performance, an arithmetic processing apparatus sometimes performs processing called SIMD (Single Instruction Multiple Data). SIMD is a method for processing operations on a plurality of pieces of data in a single instruction. Also, in order to improve the performance of arithmetic processing using SIMD, it is preferable that the load / store processing is also expanded according to SIMD.
一般的なロード・ストア命令によるキャッシュアクセスリクエストは、1つのリクエストにつき1つのアドレスが指定される。演算処理装置に備えるキャッシュ制御部では、キャッシュアクセスリクエストで指定されたアドレスのデータに対して、ロード・ストア処理を行う。 For a cache access request by a general load / store instruction, one address is designated per request. The cache control unit provided in the arithmetic processing unit performs load / store processing on the data at the address specified by the cache access request.
これに対して、SIMD拡張したロード・ストア命令によるキャッシュアクセスリクエストでは、1つのリクエストにつき1つのアドレスと演算の対象となるデータの数を表す要素数とが指定される。そして、キャッシュ制御部では、指定されたアドレスから要素数分の連続したデータに対して、まとめてロード・ストア処理を行う。 On the other hand, in a cache access request by a load / store instruction expanded by SIMD, one address and the number of elements indicating the number of data to be operated are designated for each request. Then, the cache control unit collectively performs load / store processing on the continuous data for the number of elements from the designated address.
そして、一般的なロード・ストア命令又はSIMD拡張したロード・ストア命令のいずれであっても、1つのリクエストをキャッシュ制御部が備える1つの制御ポートに割り当て、その命令種、アドレス及びSIMDの要素数など各種制御信号を保持して処理を行っていた。 Whether a general load / store instruction or a SIMD-extended load / store instruction, one request is assigned to one control port provided in the cache control unit, its instruction type, address, and number of SIMD elements. For example, processing was performed while holding various control signals.
また、キャッシュアクセスリクエストには、プログラム上の命令順を示す情報であるIID(Instruction Identification)が付属する。キャッシュ制御部には、キャッシュヒットの判定を行う経路であるキャッシュ制御パイプラインを複数有する場合がある。キャッシュ制御パイプラインを複数有する演算処理装置では、異なるキャッシュ制御パイプラインを同時に複数のキャッシュアクセスリクエストが流れることが考えられる。この場合、キャッシュ制御部では、それぞれのキャッシュアクセスリクエストに付属したIIDの大小判定を行うことで、それらのリクエストの順序関係を判定する。キャッシュ制御部は、例えば、異なるキャッシュ制御パイプライン間で共有する単一資源獲得時に、リクエスト順序の判定結果を用いてより古いリクエストに獲得優先権を与えるなどの処理を行う。 The cache access request is accompanied by IID (Instruction Identification) that is information indicating the order of instructions on the program. The cache control unit may have a plurality of cache control pipelines that are paths for determining a cache hit. In an arithmetic processing unit having a plurality of cache control pipelines, a plurality of cache access requests may simultaneously flow through different cache control pipelines. In this case, the cache control unit determines the order relation of these requests by determining the size of the IID attached to each cache access request. For example, when acquiring a single resource shared between different cache control pipelines, the cache control unit performs processing such as giving an acquisition priority to an older request using the determination result of the request order.
さらに、SIMDによる演算処理の性能向上のために、インダイレクトロード・インダイレクトストア処理への対応が挙げられる。従来のSIMDを用いたロード・ストア処理では、処理対象となるデータは、メモリ上に連続して配置されていた。これに対して、インダイレクトロード・インダイレクトストア処理は、データが非連続に配置されていてもまとめてロード・ストア処理を行うことを可能とする技術である。 Furthermore, in order to improve the performance of arithmetic processing by SIMD, correspondence to indirect load / indirect store processing can be mentioned. In load / store processing using conventional SIMD, data to be processed is continuously arranged on a memory. On the other hand, indirect load / indirect store processing is a technique that enables load / store processing to be performed collectively even when data is discontinuously arranged.
例えば、それぞれの要素に対して、ロード・ストア命令を要素数分発行する従来技術がある。また、例えば、新たにインダイレクトロード・インダイレクトストア命令を定義し、1つの命令で複数要素のアドレスをそれぞれ並行して同時に複数のキャッシュアクセスリクエストを送信する従来技術がある。 For example, there is a conventional technique for issuing a load / store instruction for each element by the number of elements. Further, for example, there is a conventional technique in which a new indirect load / indirect store instruction is newly defined and a plurality of cache access requests are simultaneously transmitted in parallel with a plurality of element addresses by one instruction.
しかしながら、ロード・ストア命令を要素数分発行する従来技術では、要素数が増えるにしたがい使用するロード・ストア命令が増大し、演算処理装置の各資源を占有することとなり、性能向上が妨げられるおそれがある。 However, in the conventional technology that issues the load / store instructions for the number of elements, the load / store instructions to be used increase as the number of elements increases, which occupies each resource of the arithmetic processing unit, which may hinder performance improvement. There is.
また、並行して同時に複数のキャッシュアクセスリクエストを送信する従来技術では、制御ポートへリクエストを送信するためのアドレスバスやデータバスの幅を要素数分そなえる必要があり、演算処理装置内の回路量が増大する。そのため、演算処理装置の使用可能な回路量により同時に処理する要素数が制限されてしまい、性能向上が妨げられるおそれがある。 In addition, in the conventional technology that simultaneously transmits a plurality of cache access requests in parallel, it is necessary to provide the width of the address bus and data bus for transmitting requests to the control port by the number of elements. Will increase. For this reason, the number of elements that can be processed simultaneously is limited by the amount of circuit that can be used by the arithmetic processing unit, which may hinder performance improvement.
開示の技術は、上記に鑑みてなされたものであって、演算処理能力を向上させた演算処理装置及び演算処理装置の制御方法を提供することを目的とする。 The disclosed technology has been made in view of the above, and an object thereof is to provide an arithmetic processing device and an arithmetic processing device control method with improved arithmetic processing capability.
本願の開示する演算処理装置及び演算処理装置の制御方法は、複数のキャッシュアクセス要求を含む演算処理命令を取得し、前記演算処理命令に含まれる前記キャッシュアクセス要求を順次送信する命令制御部と、前記命令制御部から送信された前記キャッシュアクセス要求を受信し、各前記キャッシュアクセス要求により指示されたキャッシュへのアクセス処理を順次実行するキャッシュ制御部と、前記キャッシュ制御部による前記アクセス処理の処理結果を基に演算処理を行う演算制御部とを備える。 An arithmetic processing device and a control method for the arithmetic processing device disclosed in the present application include: an instruction control unit that acquires an arithmetic processing instruction including a plurality of cache access requests and sequentially transmits the cache access requests included in the arithmetic processing instruction; A cache control unit that receives the cache access request transmitted from the instruction control unit and sequentially executes an access process to the cache instructed by each cache access request; and a processing result of the access process by the cache control unit And an arithmetic control unit that performs arithmetic processing based on the above.
本願の開示する演算処理装置及び演算処理装置の制御方法の一つの態様によれば、演算処理能力を向上させることができるという効果を奏する。 According to one aspect of the arithmetic processing device and the control method for the arithmetic processing device disclosed in the present application, there is an effect that the arithmetic processing capability can be improved.
以下に、本願の開示する演算処理装置及び演算処理装置の制御方法の実施例を図面に基づいて詳細に説明する。なお、以下の実施例により本願の開示する演算処理装置及び演算処理装置の制御方法が限定されるものではない。 Embodiments of an arithmetic processing device and a control method for the arithmetic processing device disclosed in the present application will be described below in detail with reference to the drawings. The following embodiments do not limit the arithmetic processing device and the control method of the arithmetic processing device disclosed in the present application.
図1は、演算処理装置のブロック図である。また、図2は、キャッシュ制御部の詳細を表すブロック図である。本実施例では、演算処理装置としてCPU(Central Processing Unit)を例に説明する。 FIG. 1 is a block diagram of an arithmetic processing unit. FIG. 2 is a block diagram showing details of the cache control unit. In this embodiment, a CPU (Central Processing Unit) will be described as an example of the arithmetic processing device.
CPU1は、命令制御部11、演算制御部12、キャッシュ制御部13、二次キャッシュ制御部14及びメモリ制御部15を有する。そして、メモリ制御部15は、メモリ2と接続する。
The
命令制御部11は、プログラムから命令を取得する。そして、命令制御部11は、取得した命令にキャッシュアクセスリクエストであるか否かを判定する。キャッシュアクセスリクエストとは、例えば、メモリからキャッシュを介して演算制御部12へのデータの読み出しや演算制御部12からキャッシュを介してのデータの更新を要求するロード・ストアリクエストなどである。ここで、本実施例に係る命令は、複数のキャッシュアクセスリクエストを含ませることが可能であるように定義されている。
The
キャッシュアクセスリクエストである場合、命令制御部11は、そのキャッシュアクセスリクエストをキャッシュ制御部13へ送信する。以下では、キャッシュアクセスリクエストを、単に「リクエスト」と呼ぶ。
If it is a cache access request, the
ここで、命令制御部11は、後述するキャッシュ制御部13が有する2本のパイプライン132及び133に同時にリクエストを発行可能である。例えば、1つの命令に4つのリクエストが含まれている場合、命令制御部11は、2つのリクエストのそれぞれを各パイプライン132及び133に向けて送出し、続いて、残りの2つのリクエストそれぞれを各パイプライン132及び133に向けて送出する。
Here, the
このように、本実施例に係る命令制御部11は、1つのインダイレクト命令によるリクエストを順次キャッシュ制御部13へ送出する。すなわち、本実施例における命令制御部11は、1つのインダイレクト命令により複数のリクエストを処理できるので、インダイレクトロード・インダイレクトストア処理による命令数の増大を抑えることができ、性能の低下を回避できる。また、本実施例における命令制御部11とキャッシュ制御部13との間のバスは、従来のSIMD処理に用いていたバス数や幅が同じであり、回路量の増大を抑えることができる。
As described above, the
その後、命令制御部11は、リクエスト完了応答通知をキャッシュ制御部13から受信する。そして、リクエスト完了応答通知を受けて、命令制御部11は、キャッシュアクセスリクエストの完了を確定する。
Thereafter, the
また、命令制御部11は、演算命令の実行要求などを演算制御部12へ送出する。
In addition, the
次に、図2を参照して、キャッシュ制御部13について説明する。キャッシュ制御部13は、制御ポート管理部131、パイプライン132及び133、キャッシュRAM(Random Access Memory)134、ヒット判定回路135及び136、大小比較器137、並びに、メモリアクセス制御部138を有する。
Next, the
制御ポート管理部131は、複数の制御ポート30を有する。各制御ポート30は、パイプライン132及びパ133のそれぞれを介してキャッシュRAM134に接続する。以下では、パイプライン132及び133のそれぞれを区別しない場合、「パイプライン130」という。ここで、本実施例では、パイプライン130は、2本であるがこれは1本でもよい。また、可能であれば、CPU1は、3本以上のパイプライン130を有してもよい。
The control
制御ポート30は、命令制御部11から送出されたリクエストを受信する。そして、制御ポート30は、命令制御部11により指定されたパイプライン130にリクエストを投入する。ここで、投入先のパイプライン130に既に他のリクエストが投入され、その処理が終わっていない場合には、制御ポート30は、投入先のパイプライン130が処理を完了しリクエストが投入可能な状態となるまで、リクエストを保持しておく。例えば、制御ポート30は、キューなどを用いてリクエストを蓄積する。
The control port 30 receives a request sent from the
ここで、図3を参照して、制御ポート30が受信するリクエストのフォーマットについて説明する。図3は、命令制御部から送出されるリクエストのフォーマットの一例の図である。図3に示すように、リクエスト200は、request、address、IID、SIMD、indirect及びelementの各項目を有する。requestは、ロードやストアなどのアクセスの種類を表す。addressは、アクセス先のアドレスを表す。IIDは、そのリクエストが含まれる命令の識別子である。本実施例では、IIDは、命令に昇順に番号が連番で割り当てられ、命令順を示す。SIMDは、SIMDの要素数を表す。indirectは、インダイレクトアクセスか否かを示すフラグである。本実施例では、indirectが「0」であれば、インダイレクトロード処理又はインダイレクトストア処理の対象となっていないことを表す。また、indirectが「1」であれば、インダイレクトロード処理又はインダイレクトストア処理の対象となっているリクエストであることを表す。elementは、そのリクエストのSIMDの要素番号を表す。本実施例では、要素番号は、昇順に番号が連番で割り当てられている。
Here, the format of the request received by the control port 30 will be described with reference to FIG. FIG. 3 is a diagram illustrating an example of a format of a request sent from the instruction control unit. As shown in FIG. 3, the
さらに、制御ポート30は、図4に示すように、各リクエストに対応させてリクエストで指示されたロードやストアなどのキャッシュアクセスの現在の状態を表すステータスフラグを備えるエントリを記憶する。図4は、制御ポートが有するエントリの一例の図である。図4のリクエストの欄には、図3に示すフォーマットを有するリクエストが格納されている。また、statusの欄には、ステータスフラグがセットされている。ステータスフラグが「1」であれば、そのリクエストを受信し且つ未処理の状態を表す。ステータスフラグが「2」であれば、そのリクエストの処理が完了したことを表す。ステータスフラグが「0」であれば、そのリクエストに関するリクエスト完了応答通知が命令制御部11へ既に送られ、そのリクエストのエントリが解放された状態であることを表す。
Further, as shown in FIG. 4, the control port 30 stores an entry including a status flag indicating a current state of cache access such as load or store indicated by the request in association with each request. FIG. 4 is a diagram illustrating an example of entries included in the control port. In the request column of FIG. 4, a request having the format shown in FIG. 3 is stored. A status flag is set in the status column. If the status flag is “1”, this indicates that the request has been received and has not been processed. If the status flag is “2”, it indicates that the processing of the request has been completed. If the status flag is “0”, it indicates that a request completion response notification regarding the request has already been sent to the
すなわち、INDIRECT=0のリクエストを処理する場合は、制御ポート30は、リクエストを命令制御部131から受信すると、受信したリクエストに対応させて、値が「1」のステータスフラグを立てたエントリを1つ作成する。
That is, when processing a request with DIRECT = 0, when the request is received from the
次に、制御ポート30は、リクエストをパイプライン130へ投入し、ヒット判定回路135又は136から処理完了の通知を受けると、そのリクエストに対応するエントリのステータスフラグを「2」に変更する。これに対して、リクエストをパイプライン130へ投入後、ヒット判定回路135又は136から再投入の通知を受けた場合、制御ポート30は、リクエストをパイプライン130へ再投入し、ステータスフラグは「1」のまま維持する。
Next, when the control port 30 inputs a request to the pipeline 130 and receives a notification of processing completion from the hit
その後、制御ポート管理部131からリクエスト完了応答が命令制御部11へ送信されると、制御ポート30は、リクエスト完了応答に対応するリクエストのエントリを解放し、ステータスを「0」に変更する。
Thereafter, when a request completion response is transmitted from the control
INDIRECT=1のリクエストを処理する場合は、命令制御部131からキャッシュ制御部13に対して、SIMDの値の数のリクエストが同一IIDで発行され、制御ポート30は、受信したリクエストに対応させて、値が「1」のステータスフラグを立てたエントリをSIMDの値の数だけ作成する。制御ポート管理部131は、各制御ポート30における各リクエストのエントリを監視する。そして、いずれかのエントリのステータスフラグが2になると、制御ポート管理部131は、そのエントリに格納されているリクエストのIIDを取得する。次に、制御ポート管理部131は、取得したIIDを有する命令の要素数を取得する。その後、制御ポート管理部131は、同じIIDを有するリクエストを各制御ポート30が有するエントリから抽出する。そして、制御ポート管理部131は、抽出した各エントリのステータスフラグを確認する。
When processing a request with DIRECT = 1, the
抽出した各エントリのステータスフラグが全て「2」の場合、制御ポート管理部131は、リクエスト完了応答を命令制御部11へ送信する。これに対して、抽出した各エントリの中にステータスフラグが「1」のエントリが含まれている場合、制御ポート管理部131は、次にステータスフラグが「2」に変更されるまで待機する。
When all the status flags of the extracted entries are “2”, the control
ここで、本実施例では、制御ポート管理部131は、IIDが同じエントリのステータスフラグが全て「2」であればリクエスト完了応答を送信したが、各命令に含まれるリクエストの数、すなわち要素数を用いて確認を行ってもよい。例えば、以下のような処理で実現できる。制御ポート管理部131は、リクエストがインダイレクトアクセスである場合、リクエストを受信するとともに、そのリクエストを含む命令の要素数を命令制御部11から受信する。そして、制御ポート131は、IIDに対応させて要素数を記憶する。その後、制御ポート131は、IIDが同じエントリを抽出した際に、そのIIDに対応する要素数を取得し、抽出したエントリの数と取得した要素数とが一致するか否かを判定してもよい。
Here, in this embodiment, the control
そして、制御ポート管理部131は、リクエスト完了応答を送信後、ステータスフラグの判定のために抽出した各エントリのステータスフラグを「0」に変更するように各制御ポート30に指示する。
Then, after transmitting the request completion response, the control
パイプライン132及び133は、リクエストの投入を制御ポート30から受ける。そして、パイプライン132及び133は、キャッシュRAM134にリクエストを送る。また、パイプライン132は、リクエストをヒット判定回路135へ送る。また、パイプライン133は、リクエストをヒット判定回路136へ送る。さらに、パイプライン132及び133は、リクエストを大小比較器137へ送る。
キャッシュRAM134は、パイプライン132から受信したリクエストで指定されているアドレスにデータがある場合、指定されたアドレスからデータを取り出し、ヒット判定回路135へ出力する。また、キャッシュRAM134は、パイプライン133から受信したリクエストで指定されているアドレスからデータを取り出し、ヒット判定回路136へ出力する。
When there is data at the address specified by the request received from the
ヒット判定回路135は、制御ポート30から投入されたリクエストの入力をパイプライン132から受ける。また、ヒット判定回路135は、リクエストで指定されたアドレスにデータがある場合、キャッシュRAM134からデータを取得する。さらに、ヒット判定回路135は、パイプライン132及び133に投入されたリクエストの比較結果を大小比較器137から受ける。
The
次に、ヒット判定回路135は、パイプライン132から受信したリクエストのタグを用いて、キャッシュRAM134から取得したデータの中にヒットするデータがあるか否かを判定する。
Next, the
ヒットしたデータがある場合、ヒット判定回路135は、ヒットしたデータを演算制御部12へ送信する。以下では、ヒット判定回路135又は136によりデータがヒットしたと判定された場合を、「キャッシュヒット」という。また、ヒット判定回路135は、処理完了の通知をリクエストの投入元の制御ポート30へ送信する。
If there is hit data, the
一方、キャッシュヒットするデータがない場合、すなわち、キャッシュRAM134からデータが送出されない場合又はタグを用いた判定でデータがヒットしない場合、ヒット判定回路135は、以下の処理を行う。
On the other hand, when there is no data that hits the cache, that is, when data is not transmitted from the
ヒット判定回路135は、大小比較器137から入力された比較結果を参照する。比較結果がパイプライン132に投入されたリクエストの処理の実行を表す結果の場合、ヒット判定回路135は、リクエストに対応するデータ転送をメモリアクセス制御部138へ要求する。その後、ヒット判定回路135は、応答データのキャッシュRAM134への格納の通知をメモリアクセス制御部138から受信する。そして、ヒット判定回路135は、リクエストの再投入を制御ポート30に通知する。
The
逆に、比較結果がパイプライン133に投入されたリクエストの処理の実行を表す結果の場合、ヒット判定回路135は、リクエストの再投入の通知をリクエストの送信元である制御ポート30へ送信する。
On the other hand, when the comparison result is a result indicating execution of processing of a request input to the
ヒット判定回路136は、ヒット判定回路135と同様の動作を行うので、説明を省略する。ただし、ヒット判定回路136では、パイプライン132とパイプライン133との関係が逆になる。
Since the
大小比較器137は、リクエストの入力をパイプライン132及び133のそれぞれから受ける。そして、大小比較器137は、受信した各リクエストの要素番号を取得する。次に、大小比較器137は、取得した要素番号の大小を比較する。そして、大小比較器137は、要素番号が大きい方のリクエストの処理の実行を表す比較結果をヒット判定回路135及び136へ送信する。例えば、パイプライン132から入力されたリクエストの要素番号が、パイプライン133から入力されたリクエストの要素番号よりも大きい場合、大小比較器137は、パイプライン132から入力されたリクエストの処理の実行を表す比較結果を出力する。
The large /
メモリアクセス制御部138は、キャッシュミスが発生した場合、データの転送要求をヒット判定回路135又は136から受ける。そして、メモリアクセス制御部138は、データの転送要求の送信元でヒット判定が行われたリクエストについてのデータ転送要求を二次キャッシュ制御部14へ送信する。
When a cache miss occurs, the memory
その後、メモリアクセス制御部138は、二次キャッシュ制御部14からデータ転送要求に対する応答データを受信する。そして、メモリアクセス制御部138は、受信した応答データをキャッシュRAM134に格納する。その後、メモリアクセス制御部138は、ヒット判定回路135及び136の内のデータ転送要求の送信元に対して応答データの格納を通知する。
Thereafter, the memory
ここで、図5を参照して、パイプライン132及び133から入力されたリクエストのいずれもヒットしなかった場合の、ヒット判定回路135及び136、並びに、大小比較器137によるリクエスト間の調停処理について具体的に説明する。図5は、リクエスト間の調停処理を説明するための図である。図5に記載したヒット判定回路135及び136は、ヒット判定回路135及び136の詳細の一例である。この場合、ヒット判定回路135は、ヒット判定部351、AND回路352及び353を有する。また、ヒット判定回路136は、ヒット判定部361、AND回路362及び363を有する。また、AND回路352及び362における入力側の丸印は、入力の反転を示す。また、以下の説明では、キャッシュRAM134へのリクエストの送信などリクエスト間の調停処理に直接関係ない処理は説明を省略する。
Here, with reference to FIG. 5, arbitration processing between requests by the
命令制御部11は、IIDが「0」である命令XXXからリクエストA及びリクエストBを抽出する。そして、命令制御部11は、リクエストAに要素番号として「0」を割り当て、リクエストBに要素番号として「1」を割り当てる。図5では、「element#」に続く番号が要素番号を表す。
The
命令制御部11は、要素番号「0」のリクエストAを制御ポート31へ送出する。また、命令制御部11は、要素番号「1」のリクエストBを制御ポート32へ送出する。ここで、制御ポート31及び32は、図2の制御ポート30のいずれかである。
The
制御ポート31は、リクエストAをヒット判定部351及び大小比較器137へ送信する。また、制御ポート32は、リクエストBをヒット判定部361及び大小比較器137へ送信する。
The
ヒット判定部351は、リクエストAのヒット判定を行う。リクエストがヒットした場合、ヒット判定部351は、「0」をAND回路352及び353へ出力する。リクエストがヒットしない場合、ヒット判定部351は、「1」をAND回路352及び353へ出力する。ここでは、リクエストAがヒットしない場合であるので、ヒット判定部351は、「1」をAND回路352及び353へ出力する。
The
ヒット判定部361は、リクエストBのヒット判定を行う。リクエストがヒットした場合、ヒット判定部361は、「0」をAND回路362及び363へ出力する。リクエストがヒットしない場合、ヒット判定部361は、「1」をAND回路362及び363へ出力する。ここでは、リクエストBがヒットしない場合であるので、ヒット判定部361は、「0」をAND回路362及び363へ出力する。
The
大小比較器137は、リクエストA及びBを制御ポート31及び32から受信する。そして、大小比較器137は、リクエストAから要素番号「0」を取得する。また、大小比較器137は、リクエストBから要素番号「1」を取得する。次に、大小比較器137は、リクエストAの要素番号「0」とリクエストBの要素番号「1」を比較する。この場合、大小比較器137は、リクエストAの要素番号がリクエストBの要素番号より小さいと判定する。
The large /
そして、大小比較器137は、要素番号が小さい方のリクエストを、データ転送要求を実行するリクエストとする。さらに、大小比較器137は、ヒット判定回路135及び136のうち、データ転送要求を実行しないリクエストのヒット判定を行った方に「0」を出力し、他方に「1」を出力する。ここでは、大小比較器137は、リクエストAについてのデータ転送要求の実行を表す判定結果として「1」をAND回路352及び353へ出力する。また、大小比較器137は、リクエストAについてのデータ転送要求の実行を表す判定結果、すなわちリクエストBについてはデータ転送要求を実行しないことを表す判定結果として「0」をAND回路362及び363へ出力する。
The large /
AND回路352は、ヒット判定部351からの入力と大小比較器137からの入力を反転させた値との論理積を制御ポート31へ出力する。ここでは、AND回路352は、ヒット判定部351から入力された「1」と、大小比較器137からの入力を反転させた値である「0」の論理積である「0」を制御ポート31へ出力する。ここで、制御ポート31又は32への「0」の出力は、リクエストの処理継続を表す。
The AND
AND回路353は、ヒット判定部351からの入力と大小比較器137からの入力との論理積をメモリアクセス制御部138へ出力する。ここでは、ヒット判定部351及び大小比較器137のいずれからも「1」が入力されるので、AND回路352は、「1」をメモリアクセス制御部138へ出力する。
The AND
AND回路362は、ヒット判定部351からの入力と大小比較器137からの入力を反転させた値との論理積を制御ポート32へ出力する。ここでは、AND回路362は、ヒット判定部361から入力された「1」と、大小比較器137からの入力を反転させた値である「1」の論理積である「1」を制御ポート31へ出力する。制御ポート31又は32への「1」の出力は、リクエストの再投入を表す。
The AND
AND回路363は、ヒット判定部361からの入力と大小比較器137からの入力との論理積をメモリアクセス制御部138へ出力する。ここでは、ヒット判定部351から「1」の入力を受け、大小比較器137から「0」が入力されるので、AND回路352は、「0」をメモリアクセス制御部138へ出力する。
The AND
制御ポート31は、AND回路352から「0」の入力を受けると、リクエストAの処理が継続されていることを確認する。また、制御ポート32は、AND回路362から「1」の入力を受けると、リクエストBをパイプライン133へ再投入する。
When receiving “0” input from the AND
ここでは、双方がキャッシュミスした場合の調停処理についての説明であり、ヒット判定回路135及び136による調停結果を制御ポート30へ通知するまでの説明である。ただし、最終的には、ヒット判定回路135及び136は、以下の処理を行う。すなわち、リクエストの処理が継続する状態で、キャッシュにリクエストが指定するデータが登録された場合に、ヒット判定回路135及び136は、リクエストの送出元の制御ポート30にリクエストの再投入を指示する。また、リクエストがキャッシュヒットした場合、ヒット判定回路135及び136は、リクエストの送出元の制御ポート30にリクエストの処理完了の通知を行う。
Here, the description is about the arbitration process when both of them make a cache miss, and it is the explanation until the control port 30 is notified of the arbitration results by the
メモリアクセス制御部138は、AND回路353及び363から論理積の入力を受ける。そして、メモリアクセス制御部138は、「1」の値を入力した側のリクエストについてのデータ転送要求を二次キャッシュ制御部14へ出力する。ここでは、AND回路353から「1」の入力を受け、AND回路363から「0」の入力を受けるので、メモリアクセス制御部138は、リクエストAについてのデータ転送要求を二次キャッシュ制御部14へ出力する。
The memory
次に、図6を参照して、パイプライン132と133との間のデータ転送要求の調停における各処理のタイミングについて説明する。図6は、パイプライン間のデータ転送要求の調停のタイムチャートである。
Next, with reference to FIG. 6, the timing of each process in the arbitration of the data transfer request between the
図6は、左端に処理対象を記載する。一番下の欄はリクエストA及びBの双方を用いた大小比較を表す。また、図6は、左に進むにしたがい時間が時刻T1〜T9へ経過することを表す。また、ここでは、各パイプライン132及び133に投入されたリクエストに対して、P1〜P3の3サイクルでヒット判定の処理が行われる場合で説明する。
FIG. 6 describes the processing target at the left end. The bottom column represents a size comparison using both requests A and B. FIG. 6 shows that the time elapses from time T1 to time T9 as it moves to the left. Here, a case will be described in which hit determination processing is performed in three cycles P1 to P3 for the requests input to the
時刻T1で、リクエストAがパイプライン132に投入され、リクエストBがパイプライン133に投入される。
At time T1, request A is input to the
そして、時刻T3にあたるサイクルP2でリクエストA及びリクエストBのキャッシュヒットの判定が行われる。 Then, the cache hit of request A and request B is determined in cycle P2 corresponding to time T3.
その後、時刻T5で、リクエストAとリクエストBとの大小判定がなされる。ここでは、リクエストAがリクエストBより小さいと判定された場合で説明する。そこで、リクエストAについて、データ転送要求により二次キャッシュ又はメモリ2からのデータ取得であるメモリリクエストが行われる。また、リクエストBは、パイプライン133へ再投入される。
Thereafter, the request A and the request B are determined to be large and small at time T5. Here, a case where it is determined that request A is smaller than request B will be described. Therefore, for request A, a memory request for data acquisition from the secondary cache or the
その後、時刻T7における次のタイミングのサイクルP2でリクエストBのキャッシュミスが再度発生する。ここでは、リクエストA及びB以外のリクエストはない場合であるので、時刻T9で、リクエストBについて、データ転送要求により二次キャッシュ又はメモリ2からのデータ取得であるメモリリクエストが行われる。
Thereafter, the cache miss of the request B occurs again in the cycle P2 of the next timing at the time T7. Here, since there is no request other than the requests A and B, at time T9, a memory request for data acquisition from the secondary cache or the
このように、パイプライン132及び133間でキャッシュミスが競合した場合でも、若い番号が与えられたリクエストから順次データ転送要求が実行されることで、最終的に全てのリクエストのデータ転送が実行される。
As described above, even when a cache miss conflicts between the
図1に戻って説明を続ける。二次キャッシュ制御部14は、二次キャッシュを有する。二次キャッシュ制御部14は、データ転送要求をメモリアクセス制御部138から受信する。そして、二次キャッシュ制御部14は、自己が有する二次キャッシュにデータ転送要求で指定されたデータが格納されているか否かを判定する。格納されている場合、二次キャッシュ制御部14は、データ転送要求で指定されたデータを二次キャッシュから取得し、取得したデータを応答データとしてメモリアクセス制御部138へ送信する。
Returning to FIG. 1, the description will be continued. The secondary
これに対して、データ転送要求で指定されたデータが二次キャッシュに格納されていない場合、二次キャッシュ制御部14は、データ転送要求をメモリ制御部15に送信する。その後、二次キャッシュ制御部14は、応答データをメモリ制御部15から受信する。そして、二次キャッシュ制御部14は、受信した応答データをメモリアクセス制御部138へ送信する。
On the other hand, when the data specified by the data transfer request is not stored in the secondary cache, the secondary
メモリ制御部15は、データ転送要求を二次キャッシュ制御部14から受ける。そして、メモリ制御部15は、データ転送要求で指定されたデータをメモリ2から取得する。そして、メモリ制御部15は、取得したデータを二次キャッシュ制御部14へ送信する。
The
演算制御部12は、演算処理の実行要求などを命令制御部11から受信する。また、演算処理12は、データをキャッシュ制御部13から受信する。そして、演算制御部12は、キャッシュ制御部13から受信したデータを用いて演算処理などを実行する。ただし、実行する処理にキャッシュデータを用いない場合など、演算制御部12は、キャッシュ制御部13からのデータの受信を行わずに、処理を実行する場合もある。
The
次に、図7を参照して、本実施例に係る演算処理装置による命令処理の流れを説明する。図7は、実施例1に係る演算処理装置による命令処理のフローチャートである。以下では、ヒット判定回路135とヒット判定回路136とを区別せずに、「ヒット判定回路140」という。
Next, with reference to FIG. 7, the flow of instruction processing by the arithmetic processing unit according to this embodiment will be described. FIG. 7 is a flowchart of command processing performed by the arithmetic processing apparatus according to the first embodiment. Hereinafter, the
命令制御部11は、命令からリクエストを取得し、取得したリクエストを制御ポート30に発行する(ステップS101)。
The
制御ポート30は、リクエストを受信する(ステップS102)。そして、制御ポート30は、受信したリクエストのエントリのステータスフラグを「1」にする(status=1)(ステップS103)。 The control port 30 receives the request (step S102). Then, the control port 30 sets the status flag of the received request entry to “1” (status = 1) (step S103).
次に、制御ポート30は、リクエストをパイプライン130に投入する(ステップS104)。 Next, the control port 30 inputs the request to the pipeline 130 (step S104).
ヒット判定回路140は、リクエストがキャッシュヒットしたか否かを判定する(ステップS105)。キャッシュヒットしない場合(ステップS105:否定)、メモリアクセス制御部138は、データ転送要求を二次キャッシュ制御部14へ送信する(ステップS106)。そして、メモリアクセス制御部138は、二次キャッシュ制御部14から応答データを受信し、受信した応答データをキャッシュRAM134に登録する(ステップS107)。その後、ヒット判定回路140は、リクエストの再投入を制御ポート30へ通知する。制御ポート30は、ステップS104へ戻る。
The hit determination circuit 140 determines whether or not the request has a cache hit (step S105). If there is no cache hit (No at Step S105), the memory
これに対して、キャッシュヒットした場合(ステップS105:肯定)、ヒット判定回路140は、ロード・ストア処理を実行する(ステップS108)。 On the other hand, when a cache hit occurs (step S105: Yes), the hit determination circuit 140 executes a load / store process (step S108).
そして、ヒット判定回路140は、リクエストの処理完了を制御ポート30へ通知する。制御ポート30は、リクエストの処理完了の通知を受けて、該当するリクエストのエントリのステータスフラグを「2」に変更する(status=2)(ステップS109)。 The hit determination circuit 140 notifies the control port 30 of the completion of the request processing. In response to the notification of the completion of the request processing, the control port 30 changes the status flag of the entry of the corresponding request to “2” (status = 2) (step S109).
制御ポート管理部131は、ステータスフラグが「2」に変更されると、そのリクエストがインダイレクトアクセスでないか否か、すなわち、インダイレクトアクセスか否かを示すフラグが「0」(indirect=0)か否かを判定する(ステップS110)。リクエストがインダイレクトアクセスでない場合(ステップS110:肯定)、制御ポート管理部131は、ステップS113へ進む。
When the status flag is changed to “2”, the control
これに対して、リクエストがインダイレクトアクセスである場合(ステップS110:否定)、制御ポート管理部131は、そのリクエストを含む命令のIIDを取得する。次に、制御ポート管理部131は、全エントリを検索する(ステップS111)。そして、制御ポート管理部131は、取得したIIDと同じIIDを有する命令に含まれるリクエストの全エントリのステータスフラグが「2」(status=2)か否かを判定する(ステップS112)。
On the other hand, when the request is indirect access (No at Step S110), the control
ステータスフラグが「2」以外のエントリが含まれていた場合(ステップS112:否定)、制御ポート管理部131は、ステップS111に戻る。ここで、並行して他のリクエストについてもステップS101〜S109の処理が行われるため、ステップS111及び112を繰り返す間に、全エントリのステータスフラグが「2」に変わる。一方、全てのエントリのステータスフラグが「2」の場合(ステップS112:肯定)、制御ポート管理部131は、ステップS113へ進む。
If an entry other than the status flag “2” is included (No at Step S112), the control
そして、制御ポート管理部131は、リクエスト完了応答を命令制御部11へ送信する(ステップS113)。
Then, the control
そして、制御ポート30は、リクエスト完了応答が送信されたリクエストのエントリのステータスフラグを「0」に変える(status=0)(ステップS114)。 Then, the control port 30 changes the status flag of the entry of the request to which the request completion response is transmitted to “0” (status = 0) (step S114).
次に、図8を参照して、大小比較器による比較処理の流れを説明する。図8は、大小比較器による比較処理のフローチャートである。ここでは、リクエストAがパイプライン132に投入され、リクエストBがパイプライン133に投入された場合で説明する。図8では、リクエストAを単に「A」と表し、リクエストBを単に「B」と表す。
Next, with reference to FIG. 8, the flow of comparison processing by the size comparator will be described. FIG. 8 is a flowchart of the comparison process by the magnitude comparator. Here, a case where request A is input to the
大小比較器137は、リクエストAを含む命令のIID(以下では、「AのIID」という。)とリクエストBを含む命令のIID(以下では、「BのIID」という。)とが異なるか否かを判定する(ステップS201)。
The
IIDが異なる場合(ステップS201:肯定)、大小比較器137は、リクエストAのIIDがリクエストBのIIDよりも小さいか否かを判定する(ステップS202)。
When the IIDs are different (step S201: Yes), the
AのIIDがBのIIDよりも小さい場合(ステップS202:肯定)、大小比較器137は、リクエストデータ転送要求をヒット判定回路135へ指示する(ステップS204)。例えば、図5のような構成の場合、大小比較器137は、AND回路352及び353に「1」を出力する。この場合、大小比較器137は、AND回路362及び363に「0」を出力する。
When A's IID is smaller than B's IID (step S202: affirmative), the
これに対して、BのIIDがAのIIDよりも小さい場合(ステップS202:否定)、大小比較器137は、リクエストデータ転送要求をヒット判定回路136へ指示する(ステップS205)。例えば、図5のような構成の場合、大小比較器137は、AND回路362及び363に「1」を出力する。この場合、大小比較器137は、AND回路352及び353に「0」を出力する。
On the other hand, when the IID of B is smaller than the IID of A (No at Step S202), the
一方、IIDが同じ場合(ステップS201:否定)、大小比較器137は、リクエストAの要素番号がリクエストBの要素番号より小さいか否かを判定する(ステップS203)。
On the other hand, when the IID is the same (No at Step S201), the
リクエストAの要素番号がリクエストBの要素番号より小さい場合(ステップS203:肯定)、大小比較器137は、リクエストデータ転送要求をヒット判定回路135へ指示する(ステップS204)。例えば、図5のような構成の場合、大小比較器137は、AND回路352及び353に「1」を出力する。この場合、大小比較器137は、AND回路362及び363に「0」を出力する。
When the element number of request A is smaller than the element number of request B (step S203: Yes), the
これに対して、リクエストBの要素番号がリクエストAの要素番号より小さい場合(ステップS203:否定)、大小比較器137は、リクエストデータ転送要求をヒット判定回路136へ指示する(ステップS205)。例えば、図5のような構成の場合、大小比較器137は、AND回路362及び363に「1」を出力する。この場合、大小比較器137は、AND回路352及び353に「0」を出力する。
On the other hand, when the element number of the request B is smaller than the element number of the request A (No at Step S203), the
次に、図9を参照して、パイプライン間のデータ転送調停処理の流れについて説明する。図9は、パイプライン間のデータ転送調停処理のフローチャートである。ここでは、リクエストA及びBという2つのリクエストがあり、且つ、制御ポート30として、制御ポート#a及び#bという2つの制御ポートがある場合で説明する。 Next, the flow of data transfer arbitration between pipelines will be described with reference to FIG. FIG. 9 is a flowchart of a data transfer arbitration process between pipelines. Here, there will be described a case where there are two requests A and B, and there are two control ports #a and #b as the control port 30.
命令制御部11は、リクエストAを制御ポート#aに投入し、リクエストBを制御ポート#bに投入する(ステップS301)。
The
制御ポート#aは、リクエストAのエントリのステータスフラグを「1」にする(status=1)。また、制御ポート#bは、リクエストBのエントリのステータスフラグを「1」にする(status=1)(ステップS302)。 The control port #a sets the status flag of the entry of request A to “1” (status = 1). Further, the control port #b sets the status flag of the entry of the request B to “1” (status = 1) (step S302).
制御ポート#aは、リクエストAをパイプライン132に投入し、制御ポート#bは、リクエストBをパイプライン133に投入する(ステップS303)。
The control port #a inputs the request A into the
ヒット判定回路135は、リクエストAがキャッシュヒットしたか否かを判定する(ステップS304)。リクエストAがキャッシュヒットしない場合(ステップS304:否定)、ヒット判定回路136は、リクエストBがキャッシュヒットしたか否かを判定する(ステップS305)。リクエストBがキャッシュヒットした場合(ステップS305:肯定)、制御ポート#bは、リクエストBのエントリのステータスフラグを「2」にする(status=2)(ステップS306)。
The
メモリアクセス制御回路138は、リクエストAについてデータ転送要求を二次キャッシュ制御部14へ送信する(ステップS307)。
The memory
その後、メモリアクセス制御回路138は、リクエストAについてのデータ転送要求に対する応答データをキャッシュRAM134に登録する(ステップS308)。その後、処理は、ステップS303に戻る。
Thereafter, the memory
これに対して、リクエストBがキャッシュヒットしない場合(ステップS305:否定)、大小比較器137は、リクエストAの要素番号がリクエストBの要素番号より小さいか否か判定する(ステップS309)。
On the other hand, when the request B does not hit the cache (No at Step S305), the large /
リクエストAの要素番号がリクエストBの要素番号よりも小さい場合(ステップS309:肯定)、メモリアクセス制御回路138は、リクエストAについてデータ転送要求を二次キャッシュ制御部14へ送信する(ステップS310)。
When the element number of the request A is smaller than the element number of the request B (step S309: Yes), the memory
その後、メモリアクセス制御回路138は、リクエストAについてのデータ転送要求に対する応答データをキャッシュRAM134に登録する(ステップS311)。その後、処理は、ステップS303に戻る。
Thereafter, the memory
これに対して、リクエストBの要素番号がリクエストAの要素番号よりも小さい場合(ステップS309:否定)、メモリアクセス制御回路138は、リクエストBについてデータ転送要求を二次キャッシュ制御部14へ送信する(ステップS312)。
On the other hand, when the element number of request B is smaller than the element number of request A (step S309: No), the memory
その後、メモリアクセス制御回路138は、リクエストBについてのデータ転送要求に対する応答データをキャッシュRAM134に登録する(ステップS313)。その後、処理は、ステップS303に戻る。
Thereafter, the memory
一方、リクエストAがキャッシュヒットした場合(ステップS304:肯定)、ヒット判定回路136は、リクエストBがキャッシュヒットしたか否かを判定する(ステップS314)。リクエストBがキャッシュヒットしない場合(ステップS314:否定)、制御ポート#aは、リクエストAのエントリのステータスフラグを「2」にする(status=2)(ステップS315)。
On the other hand, when the request A has a cache hit (Yes at Step S304), the
メモリアクセス制御回路138は、リクエストBについてデータ転送要求を二次キャッシュ制御部14へ送信する(ステップS316)。
The memory
その後、メモリアクセス制御回路138は、リクエストBについてのデータ転送要求に対する応答データをキャッシュRAM134に登録する(ステップS317)。その後、処理は、ステップS303に戻る。
Thereafter, the memory
これに対して、リクエストBがキャッシュヒットした場合(ステップS314:肯定)、制御ポート#aは、リクエストAのエントリのステータスフラグを「2」にする(status=2)。また、制御ポート#bは、リクエストBのエントリのステータスフラグを「2」にする(status=2)(ステップS318)。 On the other hand, when the request B has a cache hit (step S314: affirmative), the control port #a sets the status flag of the entry of the request A to “2” (status = 2). Further, the control port #b sets the status flag of the entry of request B to “2” (status = 2) (step S318).
以上に説明したように、本実施例に係る演算処理装置は、インダイレクトアクセス処理において、1つの命令から複数のキャッシュアクセスリクエストを取り出し、パイプライン数ずつ順に取り出したキャッシュ命令アクセスリクエストを制御ポートに送る。これにより、インダイレクトアクセスを行う場合の命令数を抑えることができ、命令制御部の処理負荷を軽減することができる。 As described above, in the indirect access process, the arithmetic processing unit according to the present embodiment extracts a plurality of cache access requests from one instruction and uses the cache instruction access requests sequentially extracted by the number of pipelines as a control port. send. Thereby, the number of instructions when performing indirect access can be suppressed, and the processing load of the instruction control unit can be reduced.
また、命令制御部とキャッシュ制御部との間のバスなどの増加を抑えることができ、回路規模を小さく抑えることができる。また、回路規模の制限による並列に処理するキャッシュアクセスリクエストの数の制限を回避することができる。 In addition, an increase in the bus between the instruction control unit and the cache control unit can be suppressed, and the circuit scale can be reduced. Further, it is possible to avoid the limitation on the number of cache access requests processed in parallel due to the limitation on the circuit scale.
さらに、各リクエスト番号の要素番号の大小によりデータ転送要求の処理順の調停を行うので、命令番号が同じでも、適切にキャッシュアクセスリクエストを処理していくことができる。また、1つの命令に含まれるキャッシュアクセスリクエストの全ての処理が完了した後に、キャッシュ制御部から命令制御部へとリクエスト完了通知が送られるので、1つの命令についてのキャッシュアクセス処理の完了を適切に通知することができる。 Furthermore, since the processing order of data transfer requests is adjusted according to the size of the element number of each request number, cache access requests can be appropriately processed even if the command numbers are the same. In addition, after all processing of the cache access request included in one instruction is completed, a request completion notification is sent from the cache control unit to the instruction control unit, so that the cache access processing for one instruction is properly completed. You can be notified.
次に、実施例2について説明する。本実施例に係る演算処理装置は、キャッシュアクセスリクエストを要素番号の若い順に処理していくことが実施例1と異なる。本実施例に係る演算処理装置及びキャッシュ制御部も図1及び図2で表される。以下では、実施例1と同様の各部の機能については説明を省略する。 Next, Example 2 will be described. The arithmetic processing unit according to the present embodiment is different from the first embodiment in that cache access requests are processed in ascending order of element numbers. The arithmetic processing unit and the cache control unit according to this embodiment are also shown in FIGS. In the following, description of functions of the same parts as those in the first embodiment will be omitted.
まず、ヒット判定回路135及び136について説明するが、いずれも同じ機能を有するので、ここでは、ヒット判定回路135を例に説明する。
First, the
ヒット判定回路135は、パイプライン132に投入されたリクエストについてキャッシュヒットの判定を行う。ヒットしない場合、ヒット判定回路135は、実施例1と同様のデータ転送要求の調停処理の下にデータ転送要求を行う。そして、メモリアクセス制御部138により応答データがキャッシュRAM134に登録されると、ヒット判定回路135は、リクエストの再投入をリクエストの投入元の制御ポート30に指示する。
The
一方、キャッシュヒットした場合、ヒット判定回路135は、キャッシュヒットしたリクエストに対応する制御ポート30が有するエントリから、そのリクエストがインダイレクトアクセスか否かを判定する。インダイレクトアクセスでなければ、ヒット判定回路135は、そのままキャッシュヒットしたリクエストのロード・ストア処理を行う。そして、ヒット判定回路135は、処理したリクエストの処理完了をリクエストの投入元の制御ポート30に通知する。
On the other hand, when a cache hit occurs, the
これに対して、インダイレクトアクセスの場合、ヒット判定回路135は、キャッシュヒットしたリクエストに対応する制御ポート30が有するエントリから、そのリクエストの要素番号が「0」か否かを判定する。要素番号が「0」の場合、ヒット判定回路135は、そのリクエストの要素番号から1つ前の番号のリクエストのステータスフラグを参照する。
On the other hand, in the case of indirect access, the
ステータスフラグが「2」の場合、1つ前の番号のリクエストの処理が完了済みであるので、ヒット判定回路135は、キャッシュヒットしたリクエストのロード・ストア処理を行う。そして、ヒット判定回路135は、処理したリクエストの処理完了をリクエストの投入元の制御ポート30に通知する。
When the status flag is “2”, since the processing of the request with the previous number has been completed, the
ステータスフラグが「2」でない場合、1つ前の番号のリクエストの処理が完了していないので、ヒット判定回路135は、キャッシュヒットしたリクエストのロード・ストア処理は行わずにそのリクエストの再投入をリクエストの投入元の制御ポート30へ指示する。
If the status flag is not “2”, the processing of the request with the previous number has not been completed, so the hit
制御ポート管理部131は、リクエストの処理完了の通知をヒット判定回路135又は136から受けると、通知されたリクエストのエントリからインダイレクトアクセスか否かを判定する。そのリクエストがインダイレクトアクセスでなければ、そのまま、リクエスト完了応答を命令制御部11に通知する。その後、制御ポート管理部131は、そのクエストのエントリのステータスフラグを「0」に変更させる。
Upon receiving a request processing completion notification from the hit
一方、そのリクエストがインダイレクトアクセスの場合、制御ポート管理部131は、そのリクエストの要素番号が、そのリクエストが含まれる命令に含まれるキャッシュアクセスリクエストの要素数と同じか否かを判定する。以下では、リクエストが含まれる命令を、単に「命令」という。要素数と同じ、すなわち、そのリクエストの要素番号が命令が有するリクエストの要素番号の中で一番大きい番号の場合、制御ポート管理部131は、リクエスト完了応答を命令制御部11に通知する。
On the other hand, when the request is indirect access, the control
これに対して、そのリクエストの要素番号が命令の要素数と異なる場合、制御ポート管理部131は、その命令に含まれるリクエストで要素番号が要素数と同じリクエストの処理が完了するまで、そのリクエストについての処理を一時停止する。そして、要素番号が要素数と同じリクエストの処理の完了通知をヒット判定回路135又は136から受信すると、制御ポート管理部131は、リクエスト完了通知を命令制御部11へ送信する。その後、制御ポート管理部131は、その命令に含まれる全リクエストのエントリのステータスフラグを「0」に変更させる。
On the other hand, if the element number of the request is different from the number of elements of the command, the control
次に、図10を参照して、本実施例に係る演算処理装置による命令処理の流れを説明する。図10は、実施例2に係る演算処理装置による命令処理のフローチャートである。以下では、ヒット判定回路135とヒット判定回路136とを区別せずに、「ヒット判定回路140」という。
Next, with reference to FIG. 10, the flow of instruction processing by the arithmetic processing unit according to this embodiment will be described. FIG. 10 is a flowchart of command processing performed by the arithmetic processing apparatus according to the second embodiment. Hereinafter, the
命令制御部11は、命令からリクエストを取得し、取得したリクエストを制御ポート30に発行する(ステップS401)。
The
制御ポート30は、リクエストを受信する(ステップS402)。そして、制御ポート30は、受信したリクエストのエントリのステータスフラグを「1」にする(status=1)(ステップS403)。 The control port 30 receives the request (step S402). Then, the control port 30 sets the status flag of the received request entry to “1” (status = 1) (step S403).
次に、制御ポート30は、リクエストをパイプライン130に投入する(ステップS404)。 Next, the control port 30 inputs the request to the pipeline 130 (step S404).
ヒット判定回路140は、リクエストがキャッシュヒットしたか否かを判定する(ステップS405)。キャッシュヒットしない場合(ステップS405:否定)、メモリアクセス制御部138は、データ転送要求を二次キャッシュ制御部14へ送信する(ステップS406)。そして、メモリアクセス制御部138は、二次キャッシュ制御部14から応答データを受信し、受信した応答データをキャッシュRAM134に登録する(ステップS407)。その後、ヒット判定回路140は、リクエストの再投入を制御ポート30へ通知する。制御ポート30は、ステップS404へ戻る。
The hit determination circuit 140 determines whether or not the request has a cache hit (step S405). If there is no cache hit (No at Step S405), the memory
これに対して、キャッシュヒットした場合(ステップS405:肯定)、ヒット判定回路140は、リクエストがインダイレクトアクセスでない(indirect=0)か否かを判定する(ステップS408)。インダイレクトアクセスでない場合(ステップS408:肯定)、ヒット判定回路140は、ステップS412へ進む。 On the other hand, when a cache hit occurs (step S405: affirmative), the hit determination circuit 140 determines whether or not the request is not indirect access (indirect = 0) (step S408). If it is not indirect access (step S408: Yes), the hit determination circuit 140 proceeds to step S412.
一方、インダイレクトアクセスの場合(ステップS408:否定)、ヒット判定回路140は、リクエストの要素番号が「0」か否かを判定する(ステップS409)。リクエストの要素番号が「0」の場合(ステップS409:肯定)、ヒット判定回路140は、ステップS412へ進む。 On the other hand, in the case of indirect access (No at Step S408), the hit determination circuit 140 determines whether or not the element number of the request is “0” (Step S409). When the element number of the request is “0” (step S409: Yes), the hit determination circuit 140 proceeds to step S412.
これに対して、リクエストの要素番号が「0」でない場合(ステップS409:否定)、ヒット判定回路140は、リクエストの要素番号から1を減算した値(要素番号−1)を有する要素番号のステータスフラグを参照する(ステップS410)。そして、ヒット判定回路140は、ステータスフラグが「2」(status=2)か否かを判定する(ステップS411)。ステータスフラグが「2」の場合(ステップS411:肯定)、ヒット判定回路140は、ステップS412に進む。一方、ステータスフラグが「1」の場合(ステップS411:否定)、ヒット判定回路140は、リクエストの再投入を制御ポート30へ通知する。制御ポート30は、ステップS404へ戻る。 On the other hand, when the element number of the request is not “0” (step S409: No), the hit determination circuit 140 has a status of an element number having a value (element number−1) obtained by subtracting 1 from the element number of the request The flag is referenced (step S410). Then, the hit determination circuit 140 determines whether or not the status flag is “2” (status = 2) (step S411). When the status flag is “2” (step S411: Yes), the hit determination circuit 140 proceeds to step S412. On the other hand, when the status flag is “1” (No at Step S411), the hit determination circuit 140 notifies the control port 30 of request re-injection. The control port 30 returns to step S404.
そして、ヒット判定回路140は、ロード・ストア処理を実行する(ステップS412)。 Then, the hit determination circuit 140 executes load / store processing (step S412).
そして、ヒット判定回路140は、リクエストの処理完了を制御ポート30へ通知する。制御ポート30は、リクエストの処理完了の通知を受けて、該当するリクエストのエントリのステータスフラグを「2」に変更する(status=2)(ステップS413)。 The hit determination circuit 140 notifies the control port 30 of the completion of the request processing. The control port 30 receives the notification of the request processing completion and changes the status flag of the entry of the corresponding request to “2” (status = 2) (step S413).
制御ポート管理部131は、ステータスフラグが「2」に変更されると、そのリクエストがインダイレクトアクセスでないか否か、すなわち、インダイレクトアクセスか否かを示すフラグが「0」(indirect=0)か否かを判定する(ステップS414)。リクエストがインダイレクトアクセスでない場合(ステップS414:肯定)、制御ポート管理部131は、ステップS417へ進む。
When the status flag is changed to “2”, the control
これに対して、リクエストがインダイレクトアクセスである場合(ステップS414:否定)、制御ポート管理部131は、そのリクエストの要素番号が、そのリクエストを含む命令のキャッシュアクセスリクエストの要素数と同じか否かを判定する(ステップS415)。リクエストの要素番号が要素数と同じ場合(ステップS415:肯定)、制御ポート管理部131は、そのリクエストに関するリクエスト完了応答を命令制御部11へ送信する(ステップS417)。
On the other hand, when the request is indirect access (No at Step S414), the control
一方、リクエストの要素番号が要素数と異なる場合(ステップS415:否定)、制御ポート管理部131は、要素数が要素番号と一致するリクエスト、すなわち、最も要素番号が大きいリクエストについてのリクエスト完了応答を出力するまで待機する(ステップS416)。
On the other hand, when the element number of the request is different from the element number (step S415: No), the control
その後、制御ポート管理部131は、リクエスト完了応答に対応するリクエストのエントリのステータスフラグを「0」にする指示を制御ポート30へ送信する。制御ポート30は、制御ポート管理部131からの指示を受けて、指示されたリクエストのステータスフラグを「0」にする(status=0)(ステップS418)。
Thereafter, the control
以上に説明したように、本実施例に係る演算処理装置は、要素番号が若いリクエストから処理していく。これにより、要素番号が命令の要素数と一致するリクエストの処理が完了した時点で、その命令に含まれる全てのリクエストの処理が完了したことが確定される。そのため、演算処理装置は、命令に含まれる全てのリクエストのステータスを確認を行わずにリクエスト完了応答を送信するか否かを判定でき、処理の簡略化及び回路の簡素化を実現できる。 As described above, the arithmetic processing apparatus according to the present embodiment processes a request with a lower element number. Thereby, when the processing of the request whose element number matches the number of elements of the command is completed, it is determined that the processing of all the requests included in the command is completed. Therefore, the arithmetic processing unit can determine whether or not to transmit a request completion response without confirming the statuses of all requests included in the instruction, and can simplify the processing and the circuit.
1 CPU
2 メモリ
11 命令制御部
12 演算制御部
13 キャッシュ制御部
14 二次キャッシュ制御部
15 メモリ制御部
30 制御ポート
130,132,133 パイプライン
131 制御ポート管理部
134 キャッシュRAM
135,136,140 ヒット判定回路
137 大小比較器
138 メモリアクセス制御回路
1 CPU
2
135, 136, 140
Claims (7)
前記命令制御部から送信された前記キャッシュアクセス要求を受信し、各前記キャッシュアクセス要求により指示されたキャッシュへのアクセス処理を順次実行するキャッシュ制御部と、
前記キャッシュ制御部による前記アクセス処理の処理結果を基に演算処理を行う演算制御部と
を備えたことを特徴とする演算処理装置。 An instruction control unit that acquires an arithmetic processing instruction including a plurality of cache access requests and sequentially transmits the cache access requests included in the arithmetic processing instruction;
A cache control unit that receives the cache access request transmitted from the instruction control unit and sequentially executes a process of accessing the cache instructed by each cache access request;
An arithmetic processing unit comprising: an arithmetic control unit that performs arithmetic processing based on a processing result of the access processing by the cache control unit.
前記命令制御部は、前記キャッシュ制御部から処理完了の通知を受信すると前記演算処理命令におけるキャッシュアクセス要求の完了を確定する
ことを特徴とする請求項1に記載の演算処理装置。 When the cache control unit completes processing of all the cache access requests included in the arithmetic processing instruction transmitted from the instruction control unit, the cache control unit notifies the instruction control unit of the completion of processing,
The arithmetic processing apparatus according to claim 1, wherein the instruction control unit determines completion of a cache access request in the arithmetic processing instruction when receiving a processing completion notification from the cache control unit.
前記キャッシュ制御部は、番号が小さい順に前記キャッシュアクセス要求を処理し、最後の番号を有する前記キャッシュアクセス要求の処理が完了すると、前記命令制御部へ処理完了を通知する
ことを特徴とする請求項2に記載の演算処理装置。 The cache access requests included in the arithmetic processing instructions are numbered sequentially.
The cache control unit processes the cache access requests in ascending order of numbers, and notifies the instruction control unit of completion of processing when processing of the cache access request having the last number is completed. 2. The arithmetic processing apparatus according to 2.
前記命令制御部は、前記処理経路の数の前記キャッシュアクセス要求を同時に前記キャッシュ制御部に送信する
ことを特徴とする請求項1又は2に記載の演算処理装置。 The cache control unit has a plurality of cache access request processing paths,
The arithmetic processing apparatus according to claim 1, wherein the instruction control unit transmits the cache access requests for the number of processing paths to the cache control unit at the same time.
前記キャッシュ制御部は、前記演算処理命令の識別情報及び前記キャッシュアクセス要求の識別情報を基に、前記キャッシュアクセス要求の処理順を決定する
ことを特徴とする請求項1〜4のいずれか一つに記載の演算処理装置。 The instruction control unit transmits the arithmetic processing instruction identification information and the cache access request identification information added to the cache access request,
The cache control unit determines the processing order of the cache access request based on the identification information of the arithmetic processing instruction and the identification information of the cache access request. The arithmetic processing unit described in 1.
前記演算処理命令に含まれる前記キャッシュアクセス要求を順次取得し、
取得した前記キャッシュアクセス要求により指示されたキャッシュへのアクセス処理を順次実行し、
前記アクセス処理の処理結果を基に演算処理を行う
ことを特徴とする演算処理装置の制御方法。 Obtain an arithmetic processing instruction including multiple cache access requests,
Sequentially obtaining the cache access requests included in the arithmetic processing instructions;
Sequentially execute access processing to the cache instructed by the acquired cache access request,
An arithmetic processing unit that performs arithmetic processing based on the processing result of the access processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014091636A JP6287544B2 (en) | 2014-04-25 | 2014-04-25 | Arithmetic processing device and control method of arithmetic processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014091636A JP6287544B2 (en) | 2014-04-25 | 2014-04-25 | Arithmetic processing device and control method of arithmetic processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015210655A true JP2015210655A (en) | 2015-11-24 |
JP6287544B2 JP6287544B2 (en) | 2018-03-07 |
Family
ID=54612796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014091636A Active JP6287544B2 (en) | 2014-04-25 | 2014-04-25 | Arithmetic processing device and control method of arithmetic processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6287544B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04505225A (en) * | 1988-01-11 | 1992-09-10 | ディジタル イクイプメント コーポレーション | How to prefetch vector data from memory in a memory system designed for scalar processing |
JPH07182167A (en) * | 1993-10-29 | 1995-07-21 | Advanced Micro Devicds Inc | Loading/storing function unit of microprocessor and apparatus for information processing |
US5961628A (en) * | 1997-01-28 | 1999-10-05 | Samsung Electronics Co., Ltd. | Load and store unit for a vector processor |
US6591345B1 (en) * | 2000-11-28 | 2003-07-08 | Hewlett-Packard Development Company, L.P. | Method for ensuring maximum bandwidth on accesses to strided vectors in a bank-interleaved cache |
-
2014
- 2014-04-25 JP JP2014091636A patent/JP6287544B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04505225A (en) * | 1988-01-11 | 1992-09-10 | ディジタル イクイプメント コーポレーション | How to prefetch vector data from memory in a memory system designed for scalar processing |
JPH07182167A (en) * | 1993-10-29 | 1995-07-21 | Advanced Micro Devicds Inc | Loading/storing function unit of microprocessor and apparatus for information processing |
US5961628A (en) * | 1997-01-28 | 1999-10-05 | Samsung Electronics Co., Ltd. | Load and store unit for a vector processor |
US6591345B1 (en) * | 2000-11-28 | 2003-07-08 | Hewlett-Packard Development Company, L.P. | Method for ensuring maximum bandwidth on accesses to strided vectors in a bank-interleaved cache |
Also Published As
Publication number | Publication date |
---|---|
JP6287544B2 (en) | 2018-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7953915B2 (en) | Interrupt dispatching method in multi-core environment and multi-core processor | |
US9396154B2 (en) | Multi-core processor for managing data packets in communication network | |
US20140223060A1 (en) | Injecting Interrupts in Virtualized Computer Systems | |
US10838760B2 (en) | Systems and methods for interrupt distribution | |
CN107430566B (en) | Direct memory access descriptor handling | |
KR101400577B1 (en) | Method for multiplication of sparse matrix on the gpu | |
JP6170553B2 (en) | System and method for providing low latency for applications using heterogeneous processors | |
JP2019532427A (en) | GPU remote communication using trigger operation | |
EP3265909A1 (en) | Register renaming in multi-core block-based instruction set architecture | |
JP2015522196A5 (en) | ||
JP2013520748A5 (en) | ||
JP2018537800A5 (en) | ||
JP2016535887A (en) | Efficient hardware dispatch of concurrent functions in a multi-core processor, and associated processor system, method, and computer-readable medium | |
JPWO2011135759A1 (en) | Information processing apparatus and task switching method | |
US9774671B2 (en) | Parallel processing system and operation method of parallel processing system | |
EP3327570A1 (en) | Dual mode local data store | |
US20130024488A1 (en) | Semiconductor device | |
JP6287544B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
JP2016076025A (en) | Arithmetic processing device and method for controlling arithmetic processing device | |
CN114064123A (en) | Instruction processing method, device, equipment and storage medium | |
US20160328276A1 (en) | System, information processing device, and method | |
US9430421B2 (en) | Interrupt signal arbitration | |
CN107193768B (en) | Method and device for inquiring queue state | |
JP6256088B2 (en) | Vector processor, information processing apparatus, and overtaking control method | |
RU2016129483A (en) | ROUTING MESSAGES WITHOUT Saving State |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170110 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170831 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170912 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20171110 |
|
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: 20180109 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180122 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6287544 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |