JP6060853B2 - Processor and processor processing method - Google Patents

Processor and processor processing method Download PDF

Info

Publication number
JP6060853B2
JP6060853B2 JP2013171051A JP2013171051A JP6060853B2 JP 6060853 B2 JP6060853 B2 JP 6060853B2 JP 2013171051 A JP2013171051 A JP 2013171051A JP 2013171051 A JP2013171051 A JP 2013171051A JP 6060853 B2 JP6060853 B2 JP 6060853B2
Authority
JP
Japan
Prior art keywords
unit
data
instruction
arithmetic
vector
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
JP2013171051A
Other languages
Japanese (ja)
Other versions
JP2015041176A (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 JP2013171051A priority Critical patent/JP6060853B2/en
Publication of JP2015041176A publication Critical patent/JP2015041176A/en
Application granted granted Critical
Publication of JP6060853B2 publication Critical patent/JP6060853B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)
  • Complex Calculations (AREA)

Description

本発明は、プロセッサおよびプロセッサの処理方法に関する。   The present invention relates to a processor and a processing method of the processor.

プロセッサのサイクル時間の短縮および命令処理レートの向上を小さい回路規模で実現する技術として、パイプラインがよく知られている。パイプラインは、スーパーコンピュータ、メインフレーム、および、組み込み用を含めた多数のプロセッサにおいて採用されている。   Pipeline is well known as a technique for realizing a reduction in processor cycle time and an improvement in instruction processing rate with a small circuit scale. Pipelines are employed in many processors including supercomputers, mainframes, and embedded.

例えば、パイプラインを採用した一般的なプロセッサの一例を図14に示す。図14に示すプロセッサ900は、nステージからなる命令の各ステージを実行するn個の論理回路901(901_1〜901_n)を備える。各クロックサイクルにおいて、論理回路901_1は、データを取得してステージ1の処理を実行する。次の各クロックサイクルにおいて、論理回路901_2は、論理回路901_1から送られてくるステージ1の処理結果に基づいて、ステージ2の処理を実行する。このようにして、各論理回路901は、前のステージの処理結果に基づき該当するステージの処理を実行し、処理を終了すると、次に送られてくる前のステージの処理結果に基づき該当するステージの処理を実行することを繰り返す。また、プロセッサ900は、各ステージの処理のタイミングを同期させるため、論理回路901間にレジスタ(図示せず)を設けるのが一般的である。これにより、プロセッサ900は、最も時間のかかるステージの処理時間を基準として次々とデータを論理回路901に送りこむことができ、命令の全ステージを処理してから次の命令を開始する場合に比べて、処理を高速化できる。さらに、このようなプロセッサ900において、ステージ段階数を増やして各ステージの処理時間を短縮することにより、少ない回路規模の増大で、プロセッサのサイクル時間をより短縮し、命令処理レートをより向上させることができる。   For example, FIG. 14 shows an example of a general processor that employs a pipeline. A processor 900 illustrated in FIG. 14 includes n logic circuits 901 (901_1 to 901_n) that execute each stage of an instruction including n stages. In each clock cycle, the logic circuit 901_1 acquires data and executes the processing of stage 1. In each next clock cycle, the logic circuit 901_2 performs the process of stage 2 based on the process result of stage 1 sent from the logic circuit 901_1. In this way, each logic circuit 901 executes the processing of the corresponding stage based on the processing result of the previous stage, and when the processing is completed, the corresponding stage based on the processing result of the previous stage sent next time. Repeat the process. Further, the processor 900 generally provides a register (not shown) between the logic circuits 901 in order to synchronize the processing timing of each stage. As a result, the processor 900 can send data to the logic circuit 901 one after another on the basis of the processing time of the most time-consuming stage, as compared with the case where the next instruction is started after processing all the stages of the instruction. , Can speed up the process. Further, in such a processor 900, by increasing the number of stage stages and shortening the processing time of each stage, the cycle time of the processor can be further shortened and the instruction processing rate can be further improved with a small increase in circuit scale. Can do.

また、このようなパイプライン動作によりベクトルデータを処理するプロセッサの一例が、特許文献1に記載されている。特許文献1に記載されたプロセッサでは、パイプライン制御部が、主記憶装置から読みだされたデータを整列してベクトルレジスタに書き込み、演算部が、ベクトルレジスタから次々と読み出されるデータしてパイプライン処理を用いて所定のベクトル演算を行う。   An example of a processor that processes vector data by such a pipeline operation is described in Patent Document 1. In the processor described in Patent Document 1, the pipeline control unit arranges the data read from the main storage device and writes the data to the vector register, and the arithmetic unit reads the data read from the vector register one after another as the pipeline. A predetermined vector operation is performed using the processing.

特開平8−305685号公報JP-A-8-305658

しかしながら、図14を参照して説明したプロセッサおよび特許文献1に記載されたプロセッサには、以下の課題がある。   However, the processor described with reference to FIG. 14 and the processor described in Patent Document 1 have the following problems.

上述したプロセッサにおいては、近年のサイクル時間の短縮およびプロセス技術の向上により、ステージ間においてレジスタ段階数が増え、セットアップやクロックスキュー等のオーバーヘッドが大きくなり、さらなるスピードアップが困難になってきている。また、上述したプロセッサにおいては、パイプラインの段階数をより深くステージの遅延をより少なくするため、ステージ間のバランスおよびパイプラインハザード時のフラッシュ処理を考慮する必要がある。そのため、回路設計が複雑になってきている。また、上述したプロセッサにおいては、パイプラインによる高速化に伴い消費電力が増大してきている。その一方で、プロセス技術の向上によりLSI(Large Scale Integration)に集積できる回路規模が増大するにつれ、少ない回路規模で高速化を実現出来るというパイプラインのメリットが薄れてきている。   In the above-described processor, due to the recent reduction in cycle time and improvement in process technology, the number of register stages increases between stages, and overheads such as setup and clock skew increase, making it difficult to further speed up. Further, in the above-described processor, in order to deepen the number of pipeline stages and reduce the delay of the stage, it is necessary to consider the balance between stages and the flush process at the time of pipeline hazard. For this reason, circuit design has become complicated. Further, in the above-described processor, power consumption is increasing with the speeding up by the pipeline. On the other hand, as the circuit scale that can be integrated into LSI (Large Scale Integration) increases due to the improvement of process technology, the merit of the pipeline that can realize high speed with a small circuit scale is diminishing.

本発明は、上述の課題を解決するためになされたもので、パイプラインにおけるステージ間のオーバヘッド、回路設計の複雑化および消費電力の増大を抑えながら、パイプラインと同等以上の高速化を実現するプロセッサを提供することを目的とする。   The present invention has been made to solve the above-described problems, and realizes a speed equal to or higher than that of a pipeline while suppressing the overhead between stages in the pipeline, the complexity of circuit design, and the increase in power consumption. An object is to provide a processor.

本発明のプロセッサは、主記憶装置から読み込まれる各データを保持するデータ保持部と、前記データに基づく一連の処理を終了してから次のデータに基づく前記一連の処理を開始する複数の演算器を用いて、前記各データに基づく一連の処理を並列に実行する演算部と、を備える。   The processor of the present invention includes a data holding unit that holds each data read from the main storage device, and a plurality of arithmetic units that start the series of processes based on the next data after finishing the series of processes based on the data And an arithmetic unit that executes a series of processes based on the respective data in parallel.

また、本発明のプロセッサの処理方法は、主記憶装置から読み込まれてデータ保持部に保持される各データに基づく一連の処理を終了してから次のデータに基づく前記一連の処理を開始する複数の演算器を用いて、前記各データに基づく一連の処理を並列に実行する。   Further, the processor processing method of the present invention includes a plurality of processes for starting the series of processes based on the next data after finishing a series of processes based on each data read from the main storage device and held in the data holding unit. A series of processing based on each data is executed in parallel using the computing unit.

本発明は、パイプラインにおけるステージ間のオーバヘッド、回路設計の複雑化および消費電力の増大を抑えながら、パイプラインと同等以上の高速化を実現するプロセッサを提供することができる。   The present invention can provide a processor that realizes a speed equal to or higher than that of a pipeline while suppressing overhead between stages in the pipeline, complexity of circuit design, and increase in power consumption.

本発明の第1の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 1st Embodiment of this invention. 本発明の第2の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 2nd Embodiment of this invention. 本発明の第3の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 3rd Embodiment of this invention. 本発明の第4の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 4th Embodiment of this invention. 本発明の第5の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 5th Embodiment of this invention. 本発明の第6の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 6th Embodiment of this invention. 本発明の第7の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 7th Embodiment of this invention. 本発明の第8の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 8th Embodiment of this invention. 本発明の第9の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 9th Embodiment of this invention. 本発明の第9の実施の形態としてのプロセッサの他の態様の構成を示すブロック図である。It is a block diagram which shows the structure of the other aspect of the processor as the 9th Embodiment of this invention. 本発明の第10の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 10th Embodiment of this invention. 本発明の第11の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 11th Embodiment of this invention. 本発明の第12の実施の形態としてのプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor as the 12th Embodiment of this invention. 関連技術のプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the processor of related technology.

以下、本発明の実施の形態について、図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(第1の実施の形態)
本発明の第1の実施の形態としてのプロセッサ1の構成を図1に示す。
(First embodiment)
FIG. 1 shows the configuration of the processor 1 as the first embodiment of the present invention.

図1において、プロセッサ1は、データ保持部11と、演算部12とを備える。   In FIG. 1, the processor 1 includes a data holding unit 11 and a calculation unit 12.

データ保持部11は、例えば、レジスタにより構成され、主記憶装置800から読み込まれる各データを保持する。なお、データ保持部11には、演算部12に対して連続的にデータを供給できるよう主記憶装置800から逐次データが読み込まれて保持されるものとする。   The data holding unit 11 is configured by a register, for example, and holds each data read from the main storage device 800. The data holding unit 11 sequentially reads and holds data from the main storage device 800 so that data can be continuously supplied to the arithmetic unit 12.

演算部12は、複数の演算器13を有する。演算部12は、これらの演算器13を用いて、データ保持部11に保持される各データに基づく一連の処理を並列に実行する。なお、図1には、4つの演算器13を示したが、本発明における演算部が有する演算器の数を限定するものではない。   The computing unit 12 includes a plurality of computing units 13. The computing unit 12 uses these computing units 13 to execute a series of processes based on each data held in the data holding unit 11 in parallel. Although four arithmetic units 13 are shown in FIG. 1, the number of arithmetic units included in the arithmetic unit in the present invention is not limited.

演算器13は、1つのデータに対する一連の処理の実行を終了してから、次のデータに対する一連の処理を開始する。   The arithmetic unit 13 ends the execution of a series of processes for one data and then starts a series of processes for the next data.

このように構成されたプロセッサ1は、演算器13によって、データ保持部11に保持されるあるデータに基づく一連の処理を進行中に、他の演算器13によって、他のデータに基づく一連の処理を開始することが可能である。そして、各演算器13は、1つのデータに対する一連の処理の実行を終了してから、次のデータに対する一連の処理を開始する。   In the processor 1 configured as described above, a series of processing based on other data is performed by another computing unit 13 while a series of processing based on certain data held in the data holding unit 11 is in progress by the computing unit 13. It is possible to start. Each computing unit 13 ends the execution of a series of processes for one data, and then starts a series of processes for the next data.

これにより、本発明の第1の実施の形態としてのプロセッサ1は、パイプラインにおけるステージ間のオーバヘッド、回路設計の複雑化および消費電力の増大を抑えながら、パイプラインと同等以上の高速化を実現することができる。   As a result, the processor 1 according to the first embodiment of the present invention achieves a speed equivalent to or higher than that of the pipeline while suppressing overhead between stages in the pipeline, complexity of circuit design, and increase in power consumption. can do.

その理由は、演算部が備える各演算器が、1つのデータに対する一連の処理を終了してから次のデータに対する一連の処理を開始し、並列に動作するからである。このように、本実施の形態における演算器は、一連の処理を1ステージで実行するので、複数ステージで実行する場合に比べて動作周波数を削減し、消費電力の増大を抑えることができる。また、本実施の形態における演算器は、一連の処理を1ステージで実行するので、ステージ間にレジスタを必要としない。したがって、本実施の形態では、ステージ間のレジスタ段階数増に伴うセットアップおよびクロックスキュー等のオーバーヘッドの問題が発生しない。また、本実施の形態では、ステージ間のバランスをとる必要がなく、パイプラインハザード時のフラッシュ処理を考慮する必要がない。したがって、本実施の形態としてのプロセッサは、回路設計が容易である。このように、本実施の形態は、パイプラインにおけるステージ段階数を増やす代わりに、演算部が有する演算器の数を増やすことにより、パイプラインにおける課題を回避している。なお、プロセス技術の向上によりLSIに集積できる回路規模が増大しているため、演算器の数を増やすことは比較的容易に実現可能である。その結果、本実施の形態は、演算器の数を増やすことにより並列に進行する一連の処理の数を増大させることができ、パイプラインにおける課題を回避しながら、高速化を実現することができる。   The reason is that each arithmetic unit included in the arithmetic unit starts a series of processes for the next data after completing a series of processes for one data, and operates in parallel. As described above, since the arithmetic unit in the present embodiment executes a series of processes in one stage, the operating frequency can be reduced and increase in power consumption can be suppressed as compared with the case where the arithmetic unit is executed in a plurality of stages. In addition, since the arithmetic unit in this embodiment executes a series of processes in one stage, no register is required between the stages. Therefore, in the present embodiment, overhead problems such as setup and clock skew associated with an increase in the number of register stages between stages do not occur. In this embodiment, it is not necessary to balance between stages, and it is not necessary to consider flush processing at the time of pipeline hazard. Therefore, the circuit design of the processor as this embodiment is easy. As described above, this embodiment avoids problems in the pipeline by increasing the number of arithmetic units included in the arithmetic unit instead of increasing the number of stage stages in the pipeline. Since the circuit scale that can be integrated into an LSI has increased due to the improvement in process technology, it is relatively easy to increase the number of arithmetic units. As a result, this embodiment can increase the number of a series of processes that proceed in parallel by increasing the number of computing units, and can achieve high speed while avoiding problems in the pipeline. .

(第2の実施の形態)
次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。本実施の形態では、ベクトルプロセッサに対して本発明のプロセッサを適用した一例について説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In this embodiment, an example in which the processor of the present invention is applied to a vector processor will be described.

まず、本発明の第2の実施の形態としてのベクトルプロセッサ2の構成を図2に示す。   First, FIG. 2 shows the configuration of a vector processor 2 as a second embodiment of the present invention.

図2において、ベクトルプロセッサ2は、ベクトルレジスタ部21と、演算部22とを備える。   In FIG. 2, the vector processor 2 includes a vector register unit 21 and a calculation unit 22.

ベクトルレジスタ部21は、本発明におけるデータ保持部の一実施形態を構成する。ベクトルレジスタ部21は、主記憶装置800から読み込まれるベクトルデータを保持する。例えば、ベクトルレジスタ部21は、複数のベクトルレジスタにより構成されている。   The vector register unit 21 constitutes an embodiment of the data holding unit in the present invention. The vector register unit 21 holds vector data read from the main storage device 800. For example, the vector register unit 21 includes a plurality of vector registers.

ここで、ベクトルレジスタ部21には、各演算部22に対して連続的にベクトルデータのデータ要素を供給できるよう主記憶装置800から逐次ベクトルデータが読み込まれて保持される。例えば、図2に示すように、主記憶装置800は複数のメモリ801およびメモリインタリーブ部802を有していてもよい。この場合、メモリインタリーブ部802は、複数のメモリ801に記憶されているベクトルデータをインタリーブしてベクトルレジスタ部21に保持してもよい。また、この場合、メモリインタリーブ部802は、演算部22によりベクトルレジスタ部21に書き戻された演算の結果を、メモリ801に書き戻してもよい。このような主記憶装置800には、ベクトルレジスタ部21との間でデータを入出力する公知の各種技術を適用可能である。なお、図2には、4つのメモリ801を示したが、本発明のプロセッサに接続される主記憶装置が有するメモリの数を限定するものではない。   Here, the vector register unit 21 sequentially reads and holds the vector data from the main storage device 800 so that the data elements of the vector data can be continuously supplied to the respective arithmetic units 22. For example, as illustrated in FIG. 2, the main storage device 800 may include a plurality of memories 801 and a memory interleave unit 802. In this case, the memory interleaving unit 802 may interleave vector data stored in the plurality of memories 801 and hold the vector data in the vector register unit 21. In this case, the memory interleaving unit 802 may write back the result of the calculation written back to the vector register unit 21 by the calculation unit 22 in the memory 801. Various known techniques for inputting / outputting data to / from the vector register unit 21 can be applied to such a main storage device 800. Although FIG. 2 shows four memories 801, the number of memories included in the main memory connected to the processor of the present invention is not limited.

演算部22は、n個の演算器23(23_1〜23_n)と、インタリーブ部24とを有する。ここで、nは、1以上の整数であり、1つの演算器23により1つのデータに基づく演算がパイプラインで処理されると仮定した場合の段階数nに等しい。なお、図2には、4つの演算器23を示したが、本発明における演算の段階数および演算部が有する演算器の数を限定するものではない。   The computing unit 22 includes n computing units 23 (23_1 to 23_n) and an interleaving unit 24. Here, n is an integer equal to or greater than 1, and is equal to the number of stages n when it is assumed that an operation based on one data is processed in a pipeline by one arithmetic unit 23. In FIG. 2, four arithmetic units 23 are shown, but the number of arithmetic steps and the number of arithmetic units included in the arithmetic unit in the present invention are not limited.

各演算器23は、ベクトルデータの各データ要素に対する演算を1ステージにまとめて実行する。つまり、各演算器23は、あるデータ要素に対する演算を終了してから次のデータに対する演算を開始する。なお、各演算器23には、後述のインタリーブ部24によりデータ要素が供給される。また、各演算器23は、演算の結果をインタリーブ部24に入力する。   Each computing unit 23 executes the computation for each data element of the vector data in one stage. That is, each arithmetic unit 23 ends the calculation for a certain data element and then starts the calculation for the next data. Each arithmetic unit 23 is supplied with a data element by an interleave unit 24 described later. Each computing unit 23 inputs the result of the computation to the interleaving unit 24.

図2の例では、各演算器23は、各データ要素に対して、浮動小数点加算演算における指数部比較、仮数部シフト、仮数部加算、および正規化を1ステージとして実行する。また、図2の例では、一連の処理(浮動小数点加算)が4段階からなるため、ベクトルプロセッサ2の演算部22は、4つの演算器23を有している。   In the example of FIG. 2, each arithmetic unit 23 executes exponent part comparison, mantissa part shift, mantissa part addition, and normalization in a floating-point addition operation as one stage for each data element. In the example of FIG. 2, since the series of processing (floating point addition) is composed of four stages, the arithmetic unit 22 of the vector processor 2 includes four arithmetic units 23.

インタリーブ部24は、ベクトルレジスタ部21から各演算器23に対してデータ要素をインタリーブする。すなわち、インタリーブ部24は、あるクロックサイクルでベクトルレジスタ部21から1つ目のデータ要素を演算器23_1に入力し、次のクロックサイクルで2つ目のデータ要素を演算器23_2に入力する。以降、インタリーブ部24は、3〜n個目の各データ要素を、続く各クロックサイクルで次々と、演算器23_3〜23_nに入力する。そして、インタリーブ部24は、n+1個目以降のデータ要素を、前のデータ要素に対する演算を終了した演算器23_1から順に逐次入力していく。   The interleaving unit 24 interleaves data elements from the vector register unit 21 to each computing unit 23. That is, the interleaving unit 24 inputs the first data element from the vector register unit 21 to the computing unit 23_1 in a certain clock cycle, and inputs the second data element to the computing unit 23_2 in the next clock cycle. Thereafter, the interleaving unit 24 inputs the third to nth data elements to the computing units 23_3 to 23_n one after another in each subsequent clock cycle. Then, the interleaving unit 24 sequentially inputs the (n + 1) th and subsequent data elements in order from the arithmetic unit 23_1 that has completed the operation on the previous data element.

なお、上述の浮動小数点加算では、各演算器23は、2つのオペランドを必要とする。この場合、インタリーブ部24は、ベクトルレジスタ部21から、2つのオペランドを含むデータ要素を次々と読み出して各演算器23に入力する。実際には、インタリーブ部24は、ベクトルレジスタ部21が有するあるベクトルレジスタの1つの要素および他のベクトルレジスタの1つの要素を2つのオペランドとして演算器23に入力してもよい。以下では、説明を簡単にするため、各演算器23にベクトルレジスタ部21から入力されるデータ要素は、演算に必要な数のオペランドを含むものとする。   In the above-described floating point addition, each computing unit 23 requires two operands. In this case, the interleave unit 24 reads data elements including two operands one after another from the vector register unit 21 and inputs them to each computing unit 23. Actually, the interleave unit 24 may input one element of a vector register included in the vector register unit 21 and one element of another vector register to the computing unit 23 as two operands. Hereinafter, in order to simplify the description, it is assumed that the data elements input from the vector register unit 21 to each computing unit 23 include the number of operands necessary for the computation.

また、インタリーブ部24は、各演算器23から入力される演算の結果をベクトルレジスタ部21に書き戻す。例えば、インタリーブ部24は、オペランドとなるデータ要素が保持されたベクトルレジスタとは異なるベクトルレジスタに結果データを書き戻してもよい。   Further, the interleave unit 24 writes back the result of the operation input from each calculator 23 to the vector register unit 21. For example, the interleave unit 24 may write the result data back into a vector register different from the vector register in which the data element that is the operand is held.

以上のように構成されたベクトルプロセッサ2の動作を以下に説明する。以下の説明では、各演算器23は、入力されるデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化の4段階を1ステージとして浮動小数点加算を実行するものとする。また、演算部22は、浮動小数点加算の段階数4に等しい4つの演算器23_1〜23_4を有するものとする。   The operation of the vector processor 2 configured as described above will be described below. In the following description, each computing unit 23 performs floating-point addition on the input data element with four stages of exponent part comparison, mantissa part shift, mantissa part addition, and normalization as one stage. To do. Further, it is assumed that the arithmetic unit 22 includes four arithmetic units 23_1 to 23_4 which are equal to the number of stages 4 of floating point addition.

最初のクロックサイクルで、インタリーブ部24は、ベクトルレジスタ部21から読み出された1つ目のデータ要素を、演算器23_1に入力する。演算器23_1は、入力されたデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化を行う。そして、演算器23_1は、4クロックサイクル後の5クロックサイクル目に、結果をインタリーブ部24に入力する。インタリーブ部24は、入力された結果データをベクトルレジスタ部21へ書き戻す。   In the first clock cycle, the interleave unit 24 inputs the first data element read from the vector register unit 21 to the calculator 23_1. The computing unit 23_1 performs exponent part comparison, mantissa shift, mantissa addition, and normalization on the input data element. Then, the arithmetic unit 23_1 inputs the result to the interleave unit 24 in the fifth clock cycle after the fourth clock cycle. The interleave unit 24 writes the input result data back to the vector register unit 21.

次に2クロックサイクル目で、インタリーブ部24は、ベクトルレジスタ部21から読み出された2つ目のデータ要素を、演算器23_2に入力する。演算器23_2は、入力されたデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化を行う。そして、演算器23_2は、4クロックサイクル後の6クロックサイクル目に、結果をインタリーブ部24に入力する。インタリーブ部24は、入力された結果データをベクトルレジスタ部21へ書き戻す。   Next, in the second clock cycle, the interleave unit 24 inputs the second data element read from the vector register unit 21 to the computing unit 23_2. The computing unit 23_2 performs exponent part comparison, mantissa shift, mantissa addition, and normalization on the input data element. Then, the arithmetic unit 23_2 inputs the result to the interleaving unit 24 in the sixth clock cycle after the fourth clock cycle. The interleave unit 24 writes the input result data back to the vector register unit 21.

次に3クロックサイクル目で、インタリーブ部24は、ベクトルレジスタ部21から読み出された3つ目のデータ要素を、演算器23_3に入力する。演算器23_3は、入力されたデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化を行う。そして、演算器23_3は、4クロックサイクル後の7クロックサイクル目に、結果をインタリーブ部24に入力する。インタリーブ部24は、入力された結果データをベクトルレジスタ部21へ書き戻す。   Next, in the third clock cycle, the interleave unit 24 inputs the third data element read from the vector register unit 21 to the calculator 23_3. The computing unit 23_3 performs exponent part comparison, mantissa shift, mantissa addition, and normalization on the input data element. The computing unit 23_3 inputs the result to the interleaving unit 24 in the seventh clock cycle after the fourth clock cycle. The interleave unit 24 writes the input result data back to the vector register unit 21.

次に4クロックサイクル目で、インタリーブ部24は、ベクトルレジスタ部21から読み出された4つ目のデータ要素を、演算器23_4に入力する。演算器23_4は、入力されたデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化を行う。そして、演算器23_4は、4クロックサイクル後の8クロックサイクル目に、結果をインタリーブ部24に入力する。インタリーブ部24は、入力された結果データをベクトルレジスタ部21へ書き戻す。   Next, in the fourth clock cycle, the interleave unit 24 inputs the fourth data element read from the vector register unit 21 to the computing unit 23_4. The computing unit 23_4 performs exponent part comparison, mantissa shift, mantissa addition, and normalization on the input data element. Then, the arithmetic unit 23_4 inputs the result to the interleaving unit 24 in the eighth clock cycle after the fourth clock cycle. The interleave unit 24 writes the input result data back to the vector register unit 21.

次に5クロックサイクル目で、インタリーブ部24は、ベクトルレジスタ部21から読み出された5つ目のデータ要素を、演算器23_1に入力する。この時、演算器23_1は1クロック目で入力されたデータ要素の浮動小数点加算を完了している。そこで、演算器23_1は、入力されたデータ要素に対して、指数部比較、仮数部シフト、仮数部加算、および正規化を行う。そして、演算器23_1は、4クロックサイクル後の9クロックサイクル目に、結果をインタリーブ部24に入力する。インタリーブ部24は、入力された結果データをベクトルレジスタ部21へ書き戻す。   Next, at the fifth clock cycle, the interleave unit 24 inputs the fifth data element read from the vector register unit 21 to the arithmetic unit 23_1. At this time, the arithmetic unit 23_1 has completed the floating-point addition of the data element input at the first clock. Therefore, the arithmetic unit 23_1 performs exponent part comparison, mantissa part shift, mantissa part addition, and normalization on the input data element. Then, the arithmetic unit 23_1 inputs the result to the interleave unit 24 in the ninth clock cycle after the fourth clock cycle. The interleave unit 24 writes the input result data back to the vector register unit 21.

以降、ベクトルプロセッサ2は、同様の動作を繰り返す。   Thereafter, the vector processor 2 repeats the same operation.

次に、本発明の第2の実施の形態の効果について述べる。   Next, the effect of the second exemplary embodiment of the present invention will be described.

本発明の第2の実施の形態としてのベクトルプロセッサは、パイプラインにおけるステージ間のオーバヘッド、回路設計の複雑化および消費電力の増大を抑えながら、n段階のパイプラインと同等の高速化を実現することができる。   The vector processor according to the second embodiment of the present invention achieves the same speed as an n-stage pipeline while suppressing the overhead between stages in the pipeline, the complexity of circuit design, and the increase in power consumption. be able to.

その理由は、演算部が、各演算器により実行される演算をパイプライン処理した場合の段階数と同数の演算器を有し、インタリーブ部が、各クロックサイクルでそれぞれの演算器にベクトルデータの要素を逐次供給するからである。そして、各演算器は、1つの要素に対する演算の一連の処理を1ステージとして実行するからである。これにより、本実施の形態のベクトルプロセッサは、ベクトル演算をパイプライン処理した場合と同様に各データ要素に対する演算を連続的に開始して並行して実行することになる。しかも、本実施の形態のベクトルプロセッサは、ベクトル演算をパイプライン処理する場合のようにステージ間のレジスタを必要としない。したがって、本実施の形態は、ステージ間におけるセットアップ、クロックスキュー等のオーバーヘッドがない。また、本実施の形態のベクトルプロセッサでは、その回路設計において、ステージ間のバランスやパイプラインハザードを考慮する必要がない。   The reason is that the arithmetic unit has the same number of stages as the number of stages when the operations executed by the respective arithmetic units are pipeline processed, and the interleave unit stores the vector data in each arithmetic unit in each clock cycle. This is because the elements are supplied sequentially. This is because each arithmetic unit executes a series of operations for one element as one stage. As a result, the vector processor according to the present embodiment starts operations for each data element continuously and executes them in parallel as in the case where the vector operations are pipelined. Moreover, the vector processor according to the present embodiment does not require registers between stages as in the case of pipeline processing of vector operations. Therefore, this embodiment has no overhead such as setup between stages and clock skew. In the vector processor of this embodiment, it is not necessary to consider the balance between stages and the pipeline hazard in the circuit design.

また、本実施の形態のベクトルプロセッサでは、同等のベクトル演算を1つの演算器を用いてn段のパイプラインで処理する場合と比較して、回路規模がn倍になるが、動作周波数が1/nとなる。ここで、プロセッサの消費電力が、動作周波数×回路規模×電圧×電圧に比例するとして、本実施の形態の消費電力は、パイプライン処理の場合とほぼ変わらない。   Further, in the vector processor of the present embodiment, the circuit scale is n times as compared with the case where equivalent vector operations are processed by an n-stage pipeline using one arithmetic unit, but the operating frequency is 1 / N. Here, assuming that the power consumption of the processor is proportional to the operating frequency × circuit scale × voltage × voltage, the power consumption of the present embodiment is almost the same as in the case of pipeline processing.

このように、本実施の形態は、パイプラインのステージ段階数を増やす代わりに、並列に実行可能な演算器数を増やすことにより、パイプラインにおける課題を回避しながら、パイプラインとほぼ変わらない消費電力で同等の高スループットを実現している。   In this way, this embodiment consumes almost the same as the pipeline while avoiding problems in the pipeline by increasing the number of arithmetic units that can be executed in parallel instead of increasing the number of stages in the pipeline. Equivalent high throughput with power.

(第3の実施の形態)
次に、本発明の第3の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第2の実施の形態に対して、ベクトルデータの要素毎に演算の種類を切り替え可能とした点が異なる。なお、本実施の形態の説明および各図面において、本発明の第2の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Third embodiment)
Next, a third embodiment of the present invention will be described in detail with reference to the drawings. This embodiment differs from the second embodiment of the present invention in that the type of calculation can be switched for each element of vector data. In the description of the present embodiment and each drawing, the same reference numerals are given to the same components as those in the second embodiment of the present invention, and the detailed description in the present embodiment is omitted.

本発明の第3の実施の形態としてのベクトルプロセッサ3の構成を図3に示す。図3において、ベクトルプロセッサ3は、ベクトルレジスタ部31と、演算部32とを備える。   The configuration of the vector processor 3 as the third embodiment of the present invention is shown in FIG. In FIG. 3, the vector processor 3 includes a vector register unit 31 and a calculation unit 32.

ベクトルレジスタ部31は、本発明におけるデータ保持部の一実施形態を構成する。ベクトルレジスタ部31は、例えば、複数のベクトルレジスタにより構成され、ベクトル命令と、ベクトルデータとを保持する。ベクトル命令およびベクトルデータは、主記憶装置800から読み込まれる。   The vector register unit 31 constitutes an embodiment of the data holding unit in the present invention. The vector register unit 31 is constituted by a plurality of vector registers, for example, and holds vector instructions and vector data. Vector instructions and vector data are read from the main storage device 800.

ベクトルデータは、演算に必要となる数のオペランドを含むデータ要素からなる。   Vector data consists of data elements including the number of operands necessary for the operation.

ベクトル命令は、ベクトルデータの各要素に対して行う演算種類を示す命令要素からなる。   The vector instruction is composed of instruction elements indicating types of operations performed on each element of vector data.

演算部32は、n個の演算器33(33_1〜33_n)と、インタリーブ部34とを有する。ここで、nは、1以上の整数であり、1つの演算器33による演算がパイプラインで処理されると仮定した場合の段階数nに等しい。なお、図3には、4つの演算器33を示したが、本発明における演算の段階数および演算部が有する演算器の数を限定するものではない。   The computing unit 32 includes n computing units 33 (33_1 to 33_n) and an interleaving unit 34. Here, n is an integer greater than or equal to 1, and is equal to the number of stages n when it is assumed that the operation by one arithmetic unit 33 is processed in the pipeline. In FIG. 3, four arithmetic units 33 are shown, but the number of arithmetic steps and the number of arithmetic units included in the arithmetic unit in the present invention are not limited.

各演算器33は、命令要素をデコードして演算の種類を特定し、特定した種類の演算をデータ要素に対して行う一連の処理を1ステージで実行する。例えば、各演算器33は、浮動小数点加算および浮動小数点乗算を選択的に実行可能となっていてもよい。   Each computing unit 33 decodes the instruction element to specify the type of operation, and executes a series of processes for performing the specified type of operation on the data element in one stage. For example, each computing unit 33 may be capable of selectively executing floating point addition and floating point multiplication.

なお、各演算器33には、後述のインタリーブ部34によりデータ要素および命令要素が供給される。また、各演算器33は、演算の結果をインタリーブ部34に入力する。   Each arithmetic unit 33 is supplied with a data element and an instruction element by an interleave unit 34 described later. Each computing unit 33 inputs the result of the computation to the interleave unit 34.

インタリーブ部34は、ベクトルレジスタ部31から各演算器33に対してデータ要素および命令要素を逐次供給する。すなわち、インタリーブ部34は、あるクロックサイクルで1つ目の命令要素および1つ目のデータ要素を演算器33_1に入力する。以降、インタリーブ部34は、2〜n個目の各命令要素および各データ要素を、続く各クロックサイクルで次々と、演算器33_2〜23_nに入力する。そして、インタリーブ部34は、以降の命令要素およびデータ要素を、前の命令要素およびデータ要素に基づく一連の処理を終了した演算器33_1から順に逐次供給していく。   The interleaving unit 34 sequentially supplies data elements and instruction elements from the vector register unit 31 to each computing unit 33. That is, the interleave unit 34 inputs the first instruction element and the first data element to the computing unit 33_1 in a certain clock cycle. Thereafter, the interleaving unit 34 inputs the second to n-th instruction elements and data elements to the computing units 33_2 to 23_n one after another in each subsequent clock cycle. Then, the interleave unit 34 sequentially supplies subsequent instruction elements and data elements sequentially from the arithmetic unit 33_1 that has completed a series of processes based on the previous instruction elements and data elements.

なお、浮動小数点加算または浮動小数点乗算の場合、各演算器33は、2つのオペランドを必要とする。そこで、インタリーブ部34は、ベクトルレジスタ部31から、命令要素、および、2つのオペランドを含むデータ要素を読み出して各演算器33に入力するものとする。   In the case of floating point addition or floating point multiplication, each arithmetic unit 33 requires two operands. Therefore, the interleave unit 34 reads out an instruction element and a data element including two operands from the vector register unit 31 and inputs them to each computing unit 33.

また、インタリーブ部34は、各演算器33から入力される演算の結果をベクトルレジスタ部31に書き戻す。なお、インタリーブ部34は、ベクトルレジスタ部31において、ベクトル命令およびオペランドとなるベクトルデータが保持されたベクトルレジスタとは異なるベクトルレジスタに演算の結果を書き戻す。   Further, the interleave unit 34 writes back the result of the calculation input from each calculator 33 to the vector register unit 31. The interleaving unit 34 writes back the operation result in a vector register different from the vector register in which the vector instruction and the vector data serving as the operand are stored in the vector register unit 31.

以上のように構成されたベクトルプロセッサ3の動作を以下に説明する。以下の説明では、各演算器33は、命令要素のデコードおよびデータ要素に対する浮動小数点乗算または浮動小数点加算を1ステージで実行するものとする。また、演算部32は、演算器33が行う処理の段階数4に等しい4つの演算器33_1〜33_4を有するものとする。   The operation of the vector processor 3 configured as described above will be described below. In the following description, it is assumed that each arithmetic unit 33 executes instruction element decoding and floating point multiplication or floating point addition on data elements in one stage. In addition, the calculation unit 32 includes four calculation units 33_1 to 33_4 that are equal to the number of stages 4 of processing performed by the calculation unit 33.

最初のクロックサイクルで、インタリーブ部34は、ベクトルレジスタ部31から読みだされた1つ目の命令要素および1つ目のデータ要素を、演算器33_1に入力する。演算器33_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_1は、4クロックサイクル後の5クロックサイクル目に、結果をインタリーブ部34に入力する。インタリーブ部34は、入力された結果データをベクトルレジスタ部31へ書き戻す。   In the first clock cycle, the interleave unit 34 inputs the first instruction element and the first data element read from the vector register unit 31 to the calculator 33_1. The computing unit 33_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 33_1 inputs the result to the interleave unit 34 in the fifth clock cycle after the fourth clock cycle. The interleave unit 34 writes the input result data back to the vector register unit 31.

2クロックサイクル目で、インタリーブ部34は、ベクトルレジスタ部31から読みだされた2つ目の命令要素および2つ目のデータ要素を、演算器33_2に入力する。演算器33_2は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_2は、4クロックサイクル後の6クロックサイクル目に、結果をインタリーブ部34に入力する。インタリーブ部34は、入力された結果データをベクトルレジスタ部31へ書き戻す。   In the second clock cycle, the interleave unit 34 inputs the second instruction element and the second data element read from the vector register unit 31 to the calculator 33_2. The computing unit 33_2 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. Then, the computing unit 33_2 inputs the result to the interleaving unit 34 in the sixth clock cycle after the fourth clock cycle. The interleave unit 34 writes the input result data back to the vector register unit 31.

3クロックサイクル目で、インタリーブ部34は、ベクトルレジスタ部31から読みだされた3つ目の命令要素および3つ目のデータ要素を、演算器33_3に入力する。演算器33_3は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_3は、4クロックサイクル後の7クロックサイクル目に、結果をインタリーブ部34に入力する。インタリーブ部34は、入力された結果データをベクトルレジスタ部31へ書き戻す。   In the third clock cycle, the interleave unit 34 inputs the third instruction element and the third data element read from the vector register unit 31 to the calculator 33_3. The computing unit 33_3 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 33_3 inputs the result to the interleaving unit 34 in the seventh clock cycle after the fourth clock cycle. The interleave unit 34 writes the input result data back to the vector register unit 31.

4クロックサイクル目で、インタリーブ部34は、ベクトルレジスタ部31から読みだされた4つ目の命令要素および4つ目のデータ要素を、演算器33_4に入力する。演算器33_4は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_4は、4クロックサイクル後の8クロックサイクル目に、結果をインタリーブ部34に入力する。インタリーブ部34は、入力された結果データをベクトルレジスタ部31へ書き戻す。   In the fourth clock cycle, the interleave unit 34 inputs the fourth instruction element and the fourth data element read from the vector register unit 31 to the computing unit 33_4. The computing unit 33_4 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 33_4 inputs the result to the interleaving unit 34 in the eighth clock cycle after the fourth clock cycle. The interleave unit 34 writes the input result data back to the vector register unit 31.

5クロックサイクル目で、インタリーブ部34は、ベクトルレジスタ部31から読みだされた5つ目の命令要素および5つ目のデータ要素を、演算器33_1に入力する。この時、演算器33_1は、1クロックサイクル目で入力されたデータ要素に対する演算を完了している。そこで、演算器33_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_1は、4クロックサイクル後の9クロックサイクル目に、結果をインタリーブ部34に入力する。インタリーブ部34は、入力された結果データをベクトルレジスタ部31へ書き戻す。   In the fifth clock cycle, the interleaving unit 34 inputs the fifth instruction element and the fifth data element read from the vector register unit 31 to the computing unit 33_1. At this time, the calculator 33_1 has completed the calculation for the data element input in the first clock cycle. Therefore, the arithmetic unit 33_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic unit 33_1 inputs the result to the interleave unit 34 in the ninth clock cycle after the fourth clock cycle. The interleave unit 34 writes the input result data back to the vector register unit 31.

以降、ベクトルプロセッサ3は、同様の動作を繰り返す。   Thereafter, the vector processor 3 repeats the same operation.

次に、本発明の第3の実施の形態の効果について述べる。   Next, effects of the third exemplary embodiment of the present invention will be described.

本発明の第3の実施の形態としてのベクトルプロセッサは、パイプラインにおける課題を回避しながら、n段階のパイプラインと同等の高速化を実現する際に、ベクトルデータの要素ごとに異なる演算を可能として柔軟性を増大させる。   The vector processor according to the third embodiment of the present invention can perform different operations for each element of vector data when realizing the high speed equivalent to the n-stage pipeline while avoiding the problems in the pipeline. As increasing flexibility.

その理由は、ベクトルレジスタ部が、ベクトルデータに加えてベクトル命令を保持し、インタリーブ部が、データ要素および命令要素をn個の演算器に逐次供給し、各演算器が、命令要素が示す種類の演算を選択してデータ要素に対して実行する一連の処理を1ステージで実行するからである。   The reason is that the vector register unit holds vector instructions in addition to vector data, the interleave unit sequentially supplies data elements and instruction elements to n arithmetic units, and each arithmetic unit is a type indicated by the instruction element. This is because a series of processes to be performed on the data element by selecting this operation is executed in one stage.

(第4の実施の形態)
次に、本発明の第4の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第3の実施の形態に対して、演算部が有する演算器数をN(Nは1以上の整数)倍とする点が異なる。なお、本実施の形態の説明および各図面において、本発明の第3の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the third embodiment of the present invention in that the number of arithmetic units included in the arithmetic unit is N (N is an integer of 1 or more) times. In the description of the present embodiment and each drawing, the same reference numerals are given to the same components as those of the third embodiment of the present invention, and the detailed description in the present embodiment will be omitted.

本発明の第4の実施の形態としてのベクトルプロセッサ4の構成を図4に示す。図4において、ベクトルプロセッサ4は、ベクトルレジスタ部31と、演算部42とを備える。   FIG. 4 shows the configuration of the vector processor 4 as the fourth embodiment of the present invention. In FIG. 4, the vector processor 4 includes a vector register unit 31 and a calculation unit 42.

演算部42は、n×N個の演算器33(33_1〜33_nN)と、インタリーブ部44とを有する。ここで、nは、1以上の整数であり、1つの演算器33による演算がパイプラインで処理されると仮定した場合の段階数nに等しい。また、Nは、1以上の整数である。なお、図4には、n=4、N=2の場合として8つの演算器33を示したが、本発明におけるn、Nの値および演算部が有する演算器の数を限定するものではない。   The computing unit 42 includes n × N computing units 33 (33_1 to 33_nN) and an interleaving unit 44. Here, n is an integer greater than or equal to 1, and is equal to the number of stages n when it is assumed that the operation by one arithmetic unit 33 is processed in the pipeline. N is an integer of 1 or more. In FIG. 4, eight arithmetic units 33 are shown as n = 4 and N = 2, but the values of n and N and the number of arithmetic units included in the arithmetic unit in the present invention are not limited. .

インタリーブ部44は、本発明の第3の実施の形態におけるインタリーブ部34と同様に構成される。ただし、ベクトルレジスタ部31から読み出される命令要素およびデータ要素を逐次供給する先となる演算器33の数が異なる。   The interleaving unit 44 is configured in the same manner as the interleaving unit 34 in the third embodiment of the present invention. However, the number of arithmetic units 33 to which instruction elements and data elements read from the vector register unit 31 are sequentially supplied is different.

具体的には、インタリーブ部44は、n×N個の演算器33に対して、ベクトルレジスタ部31から読み出されるデータ要素および命令要素を逐次供給する。すなわち、インタリーブ部44は、1つ目〜n×N個目までの各命令要素および各データ要素を、各クロックサイクルで次々と、演算器33_1〜33_nNに入力する。そして、インタリーブ部34は、n×N+1個目以降の命令要素およびデータ要素を、前のデータ要素および命令要素に基づく一連の処理を終了した演算器33_1から順に逐次入力していく。   Specifically, the interleave unit 44 sequentially supplies data elements and instruction elements read from the vector register unit 31 to the n × N arithmetic units 33. That is, the interleaving unit 44 inputs the first to n × Nth instruction elements and data elements to the arithmetic units 33_1 to 33_nN one after another in each clock cycle. Then, the interleaving unit 34 sequentially inputs the n × N + 1 and subsequent instruction elements and data elements in order from the arithmetic unit 33_1 that has completed a series of processes based on the previous data elements and instruction elements.

以上のように構成されたベクトルプロセッサ4の動作を以下に説明する。以下の説明では、各演算器33は、浮動小数点乗算または浮動小数点加算を1ステージで実行するものとする。また、演算部32は、各演算器33が行う処理の段階数4の2倍となる8つの演算器33_1〜33_8を有するものとする。   The operation of the vector processor 4 configured as described above will be described below. In the following description, each computing unit 33 performs floating point multiplication or floating point addition in one stage. The computing unit 32 includes eight computing units 33_1 to 33_8 that are twice the number of stages of processing 4 performed by each computing unit 33.

最初のクロックサイクルで、インタリーブ部44は、ベクトルレジスタ部31から読みだされた1つ目の命令要素および1つ目のデータ要素を、演算器33_1に入力する。演算器33_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_1は、8クロックサイクル後の9クロックサイクル目に、結果をインタリーブ部44に入力する。インタリーブ部44は、入力されたデータをベクトルレジスタ部31へ書き戻す。   In the first clock cycle, the interleave unit 44 inputs the first instruction element and the first data element read from the vector register unit 31 to the computing unit 33_1. The computing unit 33_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 33_1 inputs the result to the interleaving unit 44 in the ninth clock cycle after the eight clock cycles. The interleave unit 44 writes the input data back to the vector register unit 31.

以降、2クロックサイクル目〜8クロックサイクル目においても同様に、インタリーブ部44は、ベクトルレジスタ部31から読みだされた2つ目〜8つ目の命令要素およびデータ要素を、演算器33_2〜演算器33_8に逐次入力する。演算器33_2〜33_8は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算をそれぞれ実行する。そして、演算器33_2〜33_8は、8クロックサイクル後の10〜16クロックサイクル目に、結果をインタリーブ部44にそれぞれ入力する。インタリーブ部44は、入力されたデータをベクトルレジスタ部31へ書き戻す。   Thereafter, similarly in the second to eighth clock cycles, the interleaving unit 44 converts the second to eighth instruction elements and data elements read from the vector register unit 31 into the arithmetic units 33_2 to the arithmetic unit 33_2. The data is sequentially input to the device 33_8. The computing units 33_2 to 33_8 decode the input instruction element, and execute floating point addition or floating point multiplication on the data element according to the decoding result, respectively. Then, the computing units 33_2 to 33_8 input the results to the interleaving unit 44 at the 10th to 16th clock cycles after the 8th clock cycle. The interleave unit 44 writes the input data back to the vector register unit 31.

9クロックサイクル目で、インタリーブ部44は、ベクトルレジスタ部31から読みだされた9つ目の命令要素およびデータ要素を、演算器33_1に入力する。この時、演算器33_1は、1クロックサイクル目で入力されたデータ要素に対する演算を完了している。そこで、演算器33_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器33_1は、8クロックサイクル後の17クロックサイクル目に、結果をインタリーブ部44に入力する。インタリーブ部44は、入力されたデータをベクトルレジスタ部31へ書き戻す。   In the ninth clock cycle, the interleave unit 44 inputs the ninth instruction element and data element read from the vector register unit 31 to the computing unit 33_1. At this time, the calculator 33_1 has completed the calculation for the data element input in the first clock cycle. Therefore, the arithmetic unit 33_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 33_1 inputs the result to the interleaving unit 44 at the 17th clock cycle after 8 clock cycles. The interleave unit 44 writes the input data back to the vector register unit 31.

以降、ベクトルプロセッサ4は、同様の動作を繰り返す。   Thereafter, the vector processor 4 repeats the same operation.

次に、本発明の第4の実施の形態の効果について述べる。   Next, effects of the fourth exemplary embodiment of the present invention will be described.

本発明の第4の実施の形態としてのベクトルプロセッサは、パイプラインにおける課題を回避しながら、n段階のパイプラインよりさらなる高性能を実現する。   The vector processor according to the fourth embodiment of the present invention achieves higher performance than an n-stage pipeline while avoiding problems in the pipeline.

その理由は、演算部が、本発明の第3の実施の形態における演算器をn×N個有し、インタリーブ部が、n×N個の演算器に対してベクトル命令およびベクトルデータの各要素を逐次供給するからである。これにより、本実施の形態は、本発明の第3の実施の形態に対してクロックサイクルを1/Nにして動作周波数をN倍にすることができ、その結果、N倍のスループットを得られることになる。   The reason is that the arithmetic unit has n × N arithmetic units in the third embodiment of the present invention, and the interleave unit has elements of vector instructions and vector data for the n × N arithmetic units. It is because it supplies sequentially. Thereby, this embodiment can make the clock cycle 1 / N and the operating frequency N times that of the third embodiment of the present invention, and as a result, N times the throughput can be obtained. It will be.

(第5の実施の形態)
次に、本発明の第5の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第3の実施の形態に対して、ベクトルレジスタ部を分割して各分割部分を各演算器に対応させた点が異なる。なお、本実施の形態の説明および各図面において、本発明の第3の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Fifth embodiment)
Next, a fifth embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the third embodiment of the present invention in that the vector register section is divided and each divided portion is associated with each arithmetic unit. In the description of the present embodiment and each drawing, the same reference numerals are given to the same components as those of the third embodiment of the present invention, and the detailed description in the present embodiment will be omitted.

本発明の第5の実施の形態としてのベクトルプロセッサ5の構成を図5に示す。図5において、ベクトルプロセッサ5は、ベクトルレジスタ部51と、演算部52とを備える。   The configuration of the vector processor 5 as the fifth embodiment of the present invention is shown in FIG. In FIG. 5, the vector processor 5 includes a vector register unit 51 and a calculation unit 52.

ベクトルレジスタ部51は、本発明におけるデータ保持部の一実施形態を構成する。ベクトルレジスタ部51は、後述の演算部52が有する演算器53と同数であるn個の分割部55(55_1〜55_n)に分割されている。各分割部55には、主記憶装置800から読み込まれるベクトル命令およびベクトルデータがn個に分割されて保持される。   The vector register unit 51 constitutes an embodiment of the data holding unit in the present invention. The vector register unit 51 is divided into n division units 55 (55_1 to 55_n), which is the same number as the arithmetic units 53 included in the arithmetic unit 52 described later. In each division unit 55, vector instructions and vector data read from the main storage device 800 are divided into n pieces and held.

つまり、ベクトル命令およびベクトルデータの各要素数をmとすると、分割部55は、ベクトル命令およびベクトルデータのそれぞれm/n個の要素を保持する。例えば、n=4とすると、分割部55_1には、ベクトル命令およびベクトルデータの要素4i(i=0,1,・・・)番が保持される。、また、分割部55_2には、ベクトル命令およびベクトルデータの要素4i+1番が保持される。、分割部55_1には、ベクトル命令およびベクトルデータの要素4i+2番が保持される。、分割部55_3には、ベクトル命令およびベクトルデータの要素4i+3番が保持される。   That is, when the number of elements of the vector instruction and vector data is m, the dividing unit 55 holds m / n elements of the vector instruction and vector data. For example, when n = 4, the division unit 55_1 holds the element number 4i (i = 0, 1,...) Of the vector instruction and vector data. Further, the division unit 55_2 holds the element 4i + 1 of the vector instruction and vector data. The dividing unit 55_1 holds the element 4i + 2 of the vector instruction and vector data. The dividing unit 55_3 holds element 4i + 3 of the vector instruction and vector data.

また、各分割部55は、各演算器53に対応づけられる。   Each division unit 55 is associated with each computing unit 53.

演算部52は、n個の演算器53(53_1〜53_n)を有する。ここで、nは、1以上の整数であり、1つの演算器53による演算がパイプラインで処理されると仮定した場合の段階数nに等しい。なお、図5には、n=4の場合として4つの分割部55および4つの演算器53を示したが、本発明におけるnの値、ベクトルレジスタ部51の分割数、および、演算部が有する演算器の数を限定するものではない。   The computing unit 52 includes n computing units 53 (53_1 to 53_n). Here, n is an integer greater than or equal to 1, and is equal to the number of stages n when it is assumed that the calculation by one calculator 53 is processed in the pipeline. In FIG. 5, four division units 55 and four arithmetic units 53 are shown as n = 4, but the value of n, the number of divisions of the vector register unit 51, and the arithmetic unit in the present invention are included. The number of arithmetic units is not limited.

各演算器53は、本発明の第3の実施の形態における演算器33とほぼ同様に構成されるが、対応する分割部55からデータ要素および命令要素を取得する点が異なる。   Each computing unit 53 is configured in substantially the same manner as the computing unit 33 in the third embodiment of the present invention, except that the data element and the instruction element are acquired from the corresponding dividing unit 55.

なお、浮動小数点加算または浮動小数点乗算の場合、各演算器53は2つのオペランドを必要とする。この場合、各演算器53は、対応する分割部55から、命令要素、および、2つのオペランドを含むデータ要素を読み出すものとする。   In the case of floating-point addition or floating-point multiplication, each arithmetic unit 53 requires two operands. In this case, each computing unit 53 reads an instruction element and a data element including two operands from the corresponding dividing unit 55.

また、各演算器53は、演算の結果を、対応する分割部55に書き戻す。なお、各演算器53は、各分割部55において、データ要素および命令要素とは異なる場所に結果を書き戻すものとする。   Each computing unit 53 writes the result of the computation back to the corresponding dividing unit 55. Note that each computing unit 53 writes the result back to a location different from the data element and the instruction element in each division unit 55.

以上のように構成されたベクトルプロセッサ5の動作を以下に説明する。以下の説明では、各演算器53は、浮動小数点乗算または浮動小数点加算を1ステージで実行するものとする。また、演算部52は、各演算器53が行う処理の段階数4に等しい4つの演算器53_1〜53_4を有するものとする。また、ベクトルレジスタ部51は、演算器53と同数である4つの分割部55に分割されているものとする。   The operation of the vector processor 5 configured as described above will be described below. In the following description, each computing unit 53 performs floating point multiplication or floating point addition in one stage. The computing unit 52 includes four computing units 53_1 to 53_4 that are equal to the number of stages 4 of processing performed by each computing unit 53. Further, it is assumed that the vector register unit 51 is divided into four division units 55 that are the same number as the arithmetic units 53.

最初のクロックサイクルで、演算器53_1は、分割部55_1の1つ目の命令要素および1つ目のデータ要素を読み出す。演算器53_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器53_1は、1クロックサイクル後の2クロックサイクル目に、結果を分割部55_1へ書き戻す。   In the first clock cycle, the arithmetic unit 53_1 reads the first instruction element and the first data element of the dividing unit 55_1. The arithmetic unit 53_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic unit 53_1 writes the result back to the dividing unit 55_1 in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、演算器53_2は、分割部55_2の1つ目の命令要素および1つ目のデータ要素を読み出す。演算器53_2は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器53_2は、1クロックサイクル後の2クロックサイクル目に、結果を分割部55_2へ書き戻す。   Similarly, in the first clock cycle, the arithmetic unit 53_2 reads the first instruction element and the first data element of the dividing unit 55_2. The arithmetic unit 53_2 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 53_2 then writes the result back to the dividing unit 55_2 in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、演算器53_3は、分割部55_3の1つ目の命令要素および1つ目のデータ要素を読み出す。演算器53_3は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器53_3は、1クロックサイクル後の2クロックサイクル目に、結果を分割部55_3へ書き戻す。   Similarly, in the first clock cycle, the arithmetic unit 53_3 reads the first instruction element and the first data element of the dividing unit 55_3. The arithmetic unit 53_3 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 53_3 writes the result back to the dividing unit 55_3 in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、演算器53_4は、分割部55_4の1つ目の命令要素および1つ目のデータ要素を読み出す。演算器53_4は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器53_4は、1クロックサイクル後の2クロックサイクル目に、結果を分割部55_4へ書き戻す。   Similarly, in the first clock cycle, the arithmetic unit 53_4 reads the first instruction element and the first data element of the dividing unit 55_4. The arithmetic unit 53_4 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic unit 53_4 writes the result back to the dividing unit 55_4 in the second clock cycle after one clock cycle.

2クロックサイクル目で、演算器53_1〜53_4は、それぞれ、1クロックサイクル目で入力されたデータ要素に対する演算を完了している。そこで、演算器53_1〜53_4は、分割部55_1〜55_4のそれぞれ2つ目の命令要素およびデータ要素を読み出す。演算器53_1〜53_4は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器53_1〜53_4は、1クロックサイクル後の3クロックサイクル目に、結果を分割部55_1〜55_4へそれぞれ書き戻す。   In the second clock cycle, the calculators 53_1 to 53_4 each complete the calculation for the data element input in the first clock cycle. Therefore, the arithmetic units 53_1 to 53_4 read out the second command element and data element of the dividing units 55_1 to 55_4, respectively. The arithmetic units 53_1 to 53_4 decode the input instruction element, and execute floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic units 53_1 to 53_4 write the results back to the division units 55_1 to 55_4 in the third clock cycle after the first clock cycle.

以降、ベクトルプロセッサ5は、同様の動作を繰り返す。   Thereafter, the vector processor 5 repeats the same operation.

次に、本発明の第5の実施の形態の効果について述べる。   Next, effects of the fifth exemplary embodiment of the present invention will be described.

本発明の第5の実施の形態としてのベクトルプロセッサは、パイプラインにおける課題を回避しながら、n段のパイプラインと同等以上の性能を実現する際に、回路規模を削減するとともに消費電力をより削減することができる。   The vector processor according to the fifth embodiment of the present invention reduces the circuit scale and power consumption when realizing performance equal to or better than that of an n-stage pipeline while avoiding problems in the pipeline. Can be reduced.

その理由は、ベクトルレジスタ部が、演算器と同数であるn個の分割部に分割されて各演算器に対応付けられ、各分割部が、ベクトルデータを分割して保持し、各演算器が、対応する分割部から読み出される命令要素およびデータ要素に基づく一連の処理を1ステージで実行するからである。   The reason is that the vector register unit is divided into n number of division units, which is the same number as the arithmetic units, and is associated with each arithmetic unit, and each division unit divides and holds the vector data. This is because a series of processes based on the instruction elements and data elements read from the corresponding dividing units are executed in one stage.

これにより、本実施の形態は、本発明の第3の実施の形態においてn個の演算器を用いてn段のパイプラインと同等の性能を実現する際に必要としていたインタリーブ部を不要とする。そのため、本実施の形態は、本発明の第3の実施の形態より回路規模を削減することになる。また、本実施の形態は、ベクトルレジスタ部および演算器間のインタフェースのクロックサイクルをn倍にしている。その結果、本実施の形態は、本発明の第3の実施の形態より動作周波数を削減することができ、消費電力をさらに削減することになる。   As a result, the present embodiment eliminates the need for an interleaving unit, which is necessary when realizing performance equivalent to that of an n-stage pipeline using n arithmetic units in the third embodiment of the present invention. . Therefore, this embodiment reduces the circuit scale as compared with the third embodiment of the present invention. In this embodiment, the clock cycle of the interface between the vector register unit and the arithmetic unit is increased by n times. As a result, the present embodiment can reduce the operating frequency and further reduce the power consumption as compared with the third embodiment of the present invention.

(第6の実施の形態)
次に、本発明の第6の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第5の実施の形態に対して、ベクトルレジスタの要素数と同数の演算器を有する点が異なる。なお、本実施の形態の説明および各図面において、本発明の第5の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Sixth embodiment)
Next, a sixth embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the fifth embodiment of the present invention in that it has the same number of arithmetic units as the number of elements of the vector register. Note that, in the description of the present embodiment and each drawing, the same components as those in the fifth embodiment of the present invention are denoted by the same reference numerals, and detailed description in the present embodiment is omitted.

本発明の第6の実施の形態としてのベクトルプロセッサ6の構成を図6に示す。図6において、ベクトルプロセッサ6は、ベクトルレジスタ部61と、演算部62とを備える。   A configuration of a vector processor 6 as a sixth embodiment of the present invention is shown in FIG. In FIG. 6, the vector processor 6 includes a vector register unit 61 and a calculation unit 62.

ベクトルレジスタ部61は、m個の要素部66(66_〜66_m)からなる。各要素部66は、演算器63による演算に必要な数のオペランドを含むデータ要素と、対応する命令要素とを保持するものとする。   The vector register unit 61 includes m element units 66 (66_ to 66_m). Each element unit 66 holds a data element including the number of operands necessary for the calculation by the calculator 63 and a corresponding instruction element.

演算部62は、要素部66と同数のm個の演算器63(63_1〜63_m)を有する。   The computing unit 62 includes the same number m of computing units 63 (63_1 to 63_m) as the element unit 66.

各演算器63は、本発明の第5の実施の形態における演算器53とほぼ同様に構成されるが、対応する要素部66から、データ要素および命令要素を取得する点が異なる。   Each computing unit 63 is configured in substantially the same manner as the computing unit 53 in the fifth embodiment of the present invention, except that a data element and an instruction element are obtained from the corresponding element unit 66.

また、各演算器63は、演算の結果を、対応する要素部66に書き戻す。なお、各演算器63は、各要素部66において、データ要素および命令要素とは異なる場所に結果を書き戻すものとする。   Each computing unit 63 writes back the result of the computation in the corresponding element unit 66. Note that each computing unit 63 writes the result back to a location different from the data element and the instruction element in each element unit 66.

以上のように構成されたベクトルプロセッサ6の動作を以下に説明する。以下の説明では、各演算器63は、浮動小数点乗算または浮動小数点加算を1ステージで実行するものとする。   The operation of the vector processor 6 configured as described above will be described below. In the following description, each computing unit 63 performs floating point multiplication or floating point addition in one stage.

最初のクロックサイクルで、演算器63_1は、要素部66_1から命令要素およびデータ要素を読み出す。演算器63_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器63_1は、1クロックサイクル後の2クロックサイクル目に、結果を要素部66_1へ書き戻す。   In the first clock cycle, the arithmetic unit 63_1 reads the instruction element and the data element from the element unit 66_1. The arithmetic unit 63_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. The computing unit 63_1 then writes the result back to the element unit 66_1 in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、演算器63_2〜63_mは、要素部66_2〜66_mから命令要素およびデータ要素をそれぞれ読み出す。演算器63_2〜63_mは、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算をそれぞれ実行する。そして、演算器63_2〜63_mは、1クロックサイクル後の2クロックサイクル目に、結果を要素部66_2〜66_mへそれぞれ書き戻す。   Similarly, in the first clock cycle, the arithmetic units 63_2 to 63_m read the instruction element and the data element from the element units 66_2 to 66_m, respectively. The arithmetic units 63_2 to 63_m decode the input instruction element, and execute floating point addition or floating point multiplication on the data element according to the decoding result, respectively. Then, the computing units 63_2 to 63_m write back the results to the element units 66_2 to 66_m in the second clock cycle after the first clock cycle.

2クロックサイクル目で、演算器63_1〜63_mは、1クロックサイクル目で入力されたデータ要素に対する演算をそれぞれ完了している。そこで、演算器63_1〜63_mは、要素部66_1〜66_mから命令要素およびデータ要素をそれぞれ読み出す。演算器63_1〜63_mは、入力された命令をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器63_1〜63_mは、1クロックサイクル後の3クロックサイクル目に、結果を要素部66_1〜66_mへそれぞれの書き戻す。   In the second clock cycle, the calculators 63_1 to 63_m each complete the calculation for the data element input in the first clock cycle. Therefore, the arithmetic units 63_1 to 63_m read the instruction element and the data element from the element units 66_1 to 66_m, respectively. The arithmetic units 63_1 to 63_m decode the input instruction, and execute floating point addition or floating point multiplication on the data element according to the decoding result. Then, the computing units 63_1 to 63_m write the results back to the element units 66_1 to 66_m in the third clock cycle after the first clock cycle.

以降、ベクトルプロセッサ6は、同様の動作を繰り返す。   Thereafter, the vector processor 6 repeats the same operation.

次に、本発明の第6の実施の形態の効果について述べる。   Next, effects of the sixth exemplary embodiment of the present invention will be described.

本発明の第6の実施の形態としてのベクトルプロセッサは、パイプラインにおける課題を回避しながら、パイプラインと同等以上の高性能を実現することができる。   The vector processor according to the sixth embodiment of the present invention can achieve high performance equal to or higher than that of a pipeline while avoiding problems in the pipeline.

その理由は、演算部が、ベクトルレジスタ部の要素数mと同数の演算器を有し、各演算器が、対応する要素部から命令要素およびデータ要素を読み出して一連の処理を1ステージで実行するからである。   The reason is that the arithmetic unit has the same number of arithmetic units as the number m of elements in the vector register unit, and each arithmetic unit reads the instruction element and the data element from the corresponding element unit and executes a series of processes in one stage. Because it does.

これにより、本実施の形態は、n段階の処理を1ステージで行う演算器をm個備えるので、n段のパイプラインに対してm/n倍の性能を実現することができる。   Thus, since this embodiment includes m computing units that perform n stages of processing in one stage, m / n times performance can be realized with respect to an n stage pipeline.

(第7の実施の形態)
次に、本発明の第7の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第6の実施の形態に対して、ベクトルレジスタ部に保持されるデータの一部が各演算器にブロードキャストされる点が異なる。なお、本実施の形態の説明および各図面において、本発明の第6の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Seventh embodiment)
Next, a seventh embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the sixth embodiment of the present invention in that a part of data held in the vector register unit is broadcast to each arithmetic unit. Note that, in the description of the present embodiment and the respective drawings, the same components as those in the sixth embodiment of the present invention are denoted by the same reference numerals, and detailed description thereof will be omitted.

本発明の第7の実施の形態としてのベクトルプロセッサ7の構成を図7に示す。図7において、ベクトルプロセッサ7は、ベクトルレジスタ部71と、演算部72とを備える。   FIG. 7 shows the configuration of a vector processor 7 as a seventh embodiment of the present invention. In FIG. 7, the vector processor 7 includes a vector register unit 71 and a calculation unit 72.

ベクトルレジスタ部71は、m個の要素部66(66_〜66_m)と、ブロードキャスト部77とを含む。主記憶装置800から読み込まれるベクトルデータおよびベクトル命令は、m個の要素部66およびブロードキャスト部77に保持される。ブロードキャスト部77に保持されるベクトル命令およびベクトルデータは、後述の各演算器73にブロードキャストされる。   The vector register unit 71 includes m element units 66 (66_ to 66_m) and a broadcast unit 77. Vector data and vector instructions read from the main storage device 800 are held in the m element units 66 and the broadcast unit 77. The vector command and vector data held in the broadcast unit 77 are broadcast to each computing unit 73 described later.

演算部72は、要素部66と同数のm個の演算器73(73_1〜73_m)を有する。   The computing unit 72 includes the same number m of computing units 73 (73_1 to 73_m) as the element unit 66.

各演算器73は、データ要素および命令要素を、ブロードキャスト部77および対応する要素部66から取得して、命令要素の示す演算をデータ要素に対して実行する。このとき、各演算器73は、オペランドとなるデータ要素を、要素部66およびブロードキャスト部77のいずれかまたは両方から読み出してもよい。また、各演算器73は、命令要素を、要素部66およびブロードキャスト部77のいずれかから読み出せばよい。これにより、演算部72は、全ての演算器73で同一の命令を異なるオペランドに対して実行可能なる。あるいは、演算部72は、全ての演算器73で少なくとも1つの同一のオペランドを用いて異なる演算を実行可能となる。   Each computing unit 73 acquires the data element and the instruction element from the broadcast unit 77 and the corresponding element unit 66, and executes the operation indicated by the instruction element on the data element. At this time, each computing unit 73 may read out a data element as an operand from one or both of the element unit 66 and the broadcast unit 77. Each computing unit 73 may read the command element from either the element unit 66 or the broadcast unit 77. As a result, the arithmetic unit 72 can execute the same instruction on different operands in all the arithmetic units 73. Alternatively, the calculation unit 72 can execute different calculations using at least one identical operand in all the calculation units 73.

また、各演算器73は、演算の結果を、対応する要素部66に書き戻す。   Each computing unit 73 writes the result of the computation back to the corresponding element unit 66.

以上のように構成されたベクトルプロセッサ7の動作を以下に説明する。以下の説明では、各演算器73は、浮動小数点乗算または浮動小数点加算を1ステージで実行するものとする。また、以下の説明では、ブロードキャスト部77からは、命令要素およびオペランドの1つを表すデータ要素がブロードキャストされ、要素部66からは、オペランドの他方を表すデータ要素が読み出されるものとする。   The operation of the vector processor 7 configured as described above will be described below. In the following description, each computing unit 73 performs floating point multiplication or floating point addition in one stage. In the following description, it is assumed that a data element representing one of an instruction element and an operand is broadcast from the broadcast unit 77, and a data element representing the other of the operands is read from the element unit 66.

最初のクロックサイクルで、演算器73_1は、ブロードキャスト部77からブロードキャストされた命令要素およびデータ要素と、要素部66_1から読みだされたデータ要素を入力として得る。演算器73_1は、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算を実行する。そして、演算器73_1は、1クロックサイクル後の2クロックサイクル目に、結果を要素部66_1へ書き戻す。   In the first clock cycle, the arithmetic unit 73_1 receives the command element and data element broadcast from the broadcast unit 77 and the data element read from the element unit 66_1 as inputs. The arithmetic unit 73_1 decodes the input instruction element, and performs floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic unit 73_1 writes the result back to the element unit 66_1 in the second clock cycle after the first clock cycle.

同様に最初のクロックサイクルで、演算器73_2〜73_mは、ブロードキャスト部77からブロードキャストされた命令要素およびデータ要素と、要素部66_2〜66_mから読みだされたデータ要素をそれぞれ入力として得る。演算器73_2〜73_mは、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算をそれぞれ実行する。そして、演算器73_2〜73_mは、1クロックサイクル後の2クロックサイクル目に、結果を要素部66_2〜66_mへそれぞれ書き戻す。   Similarly, in the first clock cycle, the arithmetic units 73_2 to 73_m respectively receive the command element and data element broadcast from the broadcast unit 77 and the data element read from the element units 66_2 to 66_m as inputs. The arithmetic units 73_2 to 73_m decode the input instruction element, and execute floating point addition or floating point multiplication on the data element according to the decoding result, respectively. Then, the computing units 73_2 to 73_m write the results back to the element units 66_2 to 66_m in the second clock cycle after the first clock cycle.

2クロックサイクル目で、演算器73_1〜73_mは、1クロックサイクル目で入力されたデータ要素に対する一連の処理をそれぞれ完了している。そこで、演算器73_1〜73_mは、ブロードキャスト部77からブロードキャストされた命令要素およびデータ要素と、要素部66_1〜66_mから読みだされたデータ要素をそれぞれ入力として得る。演算器73_1〜73_mは、入力された命令要素をデコードし、デコード結果にしたがって、データ要素に対する浮動小数点加算または浮動小数点乗算をそれぞれ実行する。そして、演算器73_1〜73_mは、1クロックサイクル後の3クロックサイクル目に、結果を要素部66_1〜66_mへそれぞれ書き戻す。   In the second clock cycle, the arithmetic units 73_1 to 73_m each complete a series of processes for the data element input in the first clock cycle. Therefore, the arithmetic units 73_1 to 73_m obtain the command element and the data element broadcast from the broadcast unit 77 and the data element read from the element units 66_1 to 66_m as inputs. The computing units 73_1 to 73_m decode the input instruction element, and execute floating point addition or floating point multiplication on the data element according to the decoding result. Then, the arithmetic units 73_1 to 73_m write the results back to the element units 66_1 to 66_m in the third clock cycle after the first clock cycle.

以降、ベクトルプロセッサ7は、同様の動作を繰り返す。   Thereafter, the vector processor 7 repeats the same operation.

次に、本発明の第7の実施の形態の効果について述べる。   Next, effects of the seventh exemplary embodiment of the present invention will be described.

本発明の第7の実施の形態としてのベクトルプロセッサは、パイプラインにおける課題を回避しながらパイプラインと同等の性能を実現する際に、全ての演算において命令またはオペランドを同一とする演算を効率よく実行可能とする。   The vector processor according to the seventh embodiment of the present invention efficiently performs an operation that makes the instructions or operands the same in all operations when realizing performance equivalent to that of the pipeline while avoiding problems in the pipeline. Make it executable.

その理由は、ベクトルレジスタ部が、要素部およびブロードキャスト部を有し、各演算器が、ブロードキャスト部からブロードキャストされる命令要素またはデータ要素と、要素部から読み出される命令要素またはデータ要素とを用いて一連の処理を1ステージで実行するからである。これにより、本実施の形態は、全ての演算器において同一命令を実行したい場合や、全ての演算器において同一オペランドを用いたい場合に、メモリとのスループットが性能ネックになることを回避できることになる。   The reason is that the vector register unit has an element unit and a broadcast unit, and each arithmetic unit uses an instruction element or data element broadcast from the broadcast unit and an instruction element or data element read from the element unit. This is because a series of processing is executed in one stage. As a result, this embodiment can prevent the throughput with the memory from becoming a performance bottleneck when the same instruction is to be executed in all the arithmetic units or the same operand is to be used in all the arithmetic units. .

(第8の実施の形態)
次に、本発明の第8の実施の形態について図面を参照して詳細に説明する。本実施の形態では、スカラプロセッサに対して本発明のプロセッサを適用した一例について説明する。
(Eighth embodiment)
Next, an eighth embodiment of the present invention will be described in detail with reference to the drawings. In this embodiment, an example in which the processor of the present invention is applied to a scalar processor will be described.

まず、本発明の第8の実施の形態としてのスカラプロセッサ8の構成を図8に示す。   First, FIG. 8 shows a configuration of a scalar processor 8 as an eighth embodiment of the present invention.

図8において、スカラプロセッサ8は、命令キャッシュ部81と、演算部82とを備える。   In FIG. 8, the scalar processor 8 includes an instruction cache unit 81 and a calculation unit 82.

命令キャッシュ部81は、本発明におけるデータ保持部の一実施形態を構成する。命令キャッシュ部81は、主記憶装置800から読み込まれる命令を保持する。例えば命令キャッシュ部81は、複数の命令を保持可能なキャッシュとして構成されている。   The instruction cache unit 81 constitutes an embodiment of the data holding unit in the present invention. The instruction cache unit 81 holds an instruction read from the main storage device 800. For example, the instruction cache unit 81 is configured as a cache that can hold a plurality of instructions.

ここで、命令キャッシュ部81には、演算部82に対して連続的に命令を供給できるよう主記憶装置800から逐次命令が読み込まれて保持される。このような命令キャッシュ部81の構成には、公知の各種技術を適用可能である。   Here, the instruction cache unit 81 sequentially reads and holds instructions from the main storage device 800 so that instructions can be continuously supplied to the arithmetic unit 82. Various known techniques can be applied to the configuration of the instruction cache unit 81.

演算部82は、n個の演算器83(83_1〜83_n)と、インタリーブ部84とを有する。ここで、nは、1以上の整数であり、上述の命令をパイプラインで処理する場合の段階数nに等しい。例えば、1つの命令は、フェッチ、デコード、実行、メモリアクセス、および、ライトバックの5ステージのパイプラインで処理可能である。この場合、演算部82は、5個の演算器83を有する。なお、図8には、n=5として5つの演算器83を示したが、本発明における命令の段階数および演算部が有する演算器の数を限定するものではない。   The computing unit 82 includes n computing units 83 (83_1 to 83_n) and an interleaving unit 84. Here, n is an integer of 1 or more, and is equal to the number n of stages when the above-described instruction is processed in the pipeline. For example, one instruction can be processed in a 5-stage pipeline of fetch, decode, execute, memory access, and write back. In this case, the calculation unit 82 includes five calculation units 83. Although FIG. 8 shows five arithmetic units 83 with n = 5, the number of instruction stages and the number of arithmetic units included in the arithmetic unit in the present invention are not limited.

各演算器83は、命令キャッシュ部81から供給される1つの命令の各段階を1ステージにまとめて実行する。なお、各演算器83には、後述のインタリーブ部84により命令が供給される。また、各演算器83は、命令の結果をインタリーブ部84に入力する。   Each computing unit 83 executes each stage of one instruction supplied from the instruction cache unit 81 in one stage. An instruction is supplied to each computing unit 83 from an interleaving unit 84 described later. Each computing unit 83 inputs the result of the instruction to the interleave unit 84.

また、演算部82は、各演算器83間にフォワーディングパスを有する。各演算器83によって生成されるデータは、フォワーディングパスを介して次の演算器83に入力される。例えば、図8の例では、演算器83_1の実行段階の結果およびメモリアクセス段階の結果は、次の演算器83_2の実行段階へ入力される。   In addition, the arithmetic unit 82 has a forwarding path between the arithmetic units 83. Data generated by each computing unit 83 is input to the next computing unit 83 via the forwarding path. For example, in the example of FIG. 8, the result of the execution stage of the computing unit 83_1 and the result of the memory access stage are input to the execution stage of the next computing unit 83_2.

インタリーブ部84は、命令キャッシュ部81から各演算器83に対して命令を逐次供給する。すなわち、インタリーブ部84は、あるクロックサイクルで1つ目の命令を演算器83_1に入力し、次のクロックサイクルで2つ目の命令を演算器83_2に入力する。以降、インタリーブ部84は、3〜n個目の各命令を、続く各クロックサイクルで次々と、演算器83_3〜83_nに入力する。そして、インタリーブ部84は、n+1個目以降の命令を、前の命令に基づく一連の処理を終了した演算器83_1から順に逐次入力していく。   The interleaving unit 84 sequentially supplies instructions from the instruction cache unit 81 to each computing unit 83. That is, the interleave unit 84 inputs the first instruction to the computing unit 83_1 in a certain clock cycle, and inputs the second instruction to the computing unit 83_2 in the next clock cycle. Thereafter, the interleave unit 84 inputs the third to n-th instructions to the arithmetic units 83_3 to 83_n one after another in each subsequent clock cycle. Then, the interleave unit 84 sequentially inputs the (n + 1) th and subsequent instructions in order from the arithmetic unit 83_1 that has completed a series of processes based on the previous instruction.

また、インタリーブ部84は、各演算器83から入力される演算の結果をキャッシュ(不図示)に書き戻す。   Further, the interleave unit 84 writes back the result of the calculation input from each calculator 83 to a cache (not shown).

以上のように構成されたスカラプロセッサ8の動作を以下に説明する。以下の説明では、各演算器23は、フェッチ、デコード、実行、メモリアクセス、および、ライトバックの5段階を1ステージとして命令を実行するものとする。また、演算部82は、命令パイプラインの段階数5に等しい5つの演算器83_1〜83_5を有するものとする。   The operation of the scalar processor 8 configured as described above will be described below. In the following description, it is assumed that each arithmetic unit 23 executes an instruction with five stages of fetch, decode, execution, memory access, and write back as one stage. Further, it is assumed that the arithmetic unit 82 includes five arithmetic units 83_1 to 83_5 that are equal to the number of stages 5 in the instruction pipeline.

最初のクロックサイクルで、インタリーブ部84は、命令キャッシュ部81から読みだされた1つ目の命令を、演算器83_1に入力する。演算器83_1は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_2にフォワーディングされる。そして、演算器83_1は、5クロックサイクル後の6クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the first clock cycle, the interleave unit 84 inputs the first instruction read from the instruction cache unit 81 to the arithmetic unit 83_1. The arithmetic unit 83_1 fetches the input instruction and executes decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the arithmetic unit 83_2. The arithmetic unit 83_1 inputs the result to the interleave unit 84 in the sixth clock cycle after the fifth clock cycle. The interleaving unit 84 writes the input result data back to the cache.

2クロックサイクル目で、インタリーブ部84は、命令キャッシュ部81から読みだされた2つ目の命令を、演算器83_2に入力する。演算器83_2は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_3にフォワーディングされる。そして、演算器83_2は、5クロックサイクル後の7クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the second clock cycle, the interleave unit 84 inputs the second instruction read from the instruction cache unit 81 to the arithmetic unit 83_2. The arithmetic unit 83_2 fetches the input instruction and executes decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the computing unit 83_3. Then, the arithmetic unit 83_2 inputs the result to the interleave unit 84 at the seventh clock cycle after the fifth clock cycle. The interleaving unit 84 writes the input result data back to the cache.

3クロックサイクル目で、インタリーブ部84は、命令キャッシュ部81から読みだされた3つ目の命令を、演算器83_3に入力する。演算器83_3は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_4にフォワーディングされる。そして、演算器83_3は、5クロックサイクル後の8クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the third clock cycle, the interleave unit 84 inputs the third instruction read from the instruction cache unit 81 to the arithmetic unit 83_3. The arithmetic unit 83_3 fetches the input instruction and performs decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the computing unit 83_4. The arithmetic unit 83_3 inputs the result to the interleave unit 84 in the eighth clock cycle after the fifth clock cycle. The interleaving unit 84 writes the input result data back to the cache.

4クロックサイクル目で、インタリーブ部84は、命令キャッシュ部81から読みだされた4つ目の命令を、演算器83_4に入力する。演算器83_4は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_5にフォワーディングされる。そして、演算器83_4は、5クロックサイクル後の9クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the fourth clock cycle, the interleave unit 84 inputs the fourth instruction read from the instruction cache unit 81 to the arithmetic unit 83_4. The arithmetic unit 83_4 fetches the input instruction and executes decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the computing unit 83_5. The arithmetic unit 83_4 inputs the result to the interleave unit 84 in the ninth clock cycle after the fifth clock cycle. The interleaving unit 84 writes the input result data back to the cache.

5クロックサイクル目で、インタリーブ部84は、命令キャッシュ部81から読みだされた5つ目の命令を、演算器83_5に入力する。演算器83_5は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_1にフォワーディングされる。そして、演算器83_5は、5クロックサイクル後の10クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the fifth clock cycle, the interleave unit 84 inputs the fifth instruction read from the instruction cache unit 81 to the arithmetic unit 83_5. The arithmetic unit 83_5 fetches the input instruction and performs decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the arithmetic unit 83_1. The computing unit 83_5 inputs the result to the interleaving unit 84 at the 10th clock cycle after the 5th clock cycle. The interleaving unit 84 writes the input result data back to the cache.

6クロックサイクル目で、インタリーブ部84は、命令キャッシュ部81から読みだされた6つ目の命令を、演算器83_1に入力する。この時、演算器83_1は、1クロックサイクル目で入力された命令に基づく一連の処理を完了している。そこで、演算器83_1は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを実行する。実行段階の結果およびメモリアクセス段階の結果は、演算器83_2にフォワーディングされる。そして、演算器83_1は、5クロックサイクル後の11クロックサイクル目に、結果をインタリーブ部84に入力する。インタリーブ部84は、入力された結果データをキャッシュへ書き戻す。   In the sixth clock cycle, the interleave unit 84 inputs the sixth instruction read from the instruction cache unit 81 to the arithmetic unit 83_1. At this time, the arithmetic unit 83_1 has completed a series of processes based on the instruction input in the first clock cycle. Therefore, the arithmetic unit 83_1 fetches the input instruction and executes decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the arithmetic unit 83_2. The computing unit 83_1 inputs the result to the interleaving unit 84 in the 11th clock cycle after 5 clock cycles. The interleaving unit 84 writes the input result data back to the cache.

以降、スカラプロセッサ8は、同様の動作を繰り返す。   Thereafter, the scalar processor 8 repeats the same operation.

次に、本発明の第8の実施の形態の効果について述べる。   Next, effects of the eighth exemplary embodiment of the present invention will be described.

本発明の第8の実施の形態としてのスカラプロセッサは、パイプラインにおけるステージ間のオーバヘッド、回路設計の複雑化および消費電力の増大を抑えながら、n段階のパイプラインと同等の高速化を実現することができる。   The scalar processor according to the eighth embodiment of the present invention achieves the same speed as an n-stage pipeline while suppressing the overhead between stages in the pipeline, the complexity of circuit design, and the increase in power consumption. be able to.

その理由は、演算部が、各演算器により命令がパイプライン処理されると仮定した場合の段階数と同数の演算器を有し、インタリーブ部が、各クロックサイクルでそれぞれの演算器に命令を逐次供給するからである。そして、各演算器は、n段のパイプラインで実行していた命令を1ステージとして実行するからである。これにより、本実施の形態のスカラプロセッサは、命令をパイプライン処理した場合と同様に各命令を連続的に開始して並行して実行することになる。しかも、本実施の形態のスカラプロセッサは、命令をパイプライン処理する場合のようにステージ間のレジスタを必要としない。したがって、本実施の形態は、ステージ間におけるセットアップ、クロックスキュー等のオーバーヘッドがない。また、本実施の形態のスカラプロセッサでは、その回路設計において、ステージ間のバランスやパイプラインハザードを考慮する必要がない。   The reason is that the arithmetic unit has the same number of arithmetic units as the number of stages when it is assumed that the instruction is pipelined by each arithmetic unit, and the interleaving unit sends an instruction to each arithmetic unit in each clock cycle. It is because it supplies sequentially. This is because each arithmetic unit executes an instruction executed in the n-stage pipeline as one stage. As a result, the scalar processor according to the present embodiment starts each instruction continuously and executes it in parallel as in the case where the instructions are pipelined. Moreover, the scalar processor of this embodiment does not require registers between stages as in the case of pipeline processing of instructions. Therefore, this embodiment has no overhead such as setup between stages and clock skew. In the scalar processor of this embodiment, it is not necessary to consider the balance between stages and the pipeline hazard in the circuit design.

また、本実施の形態のスカラプロセッサでは、1つの演算器を用いて命令をn段のパイプラインで処理する場合と比較して、回路規模がn倍になるが、動作周波数が略1/nとなる。前述のように、プロセッサの消費電力が、動作周波数×回路規模×電圧×電圧に比例するとして、本実施の形態の消費電力は、パイプライン処理の場合とほぼ変わらない。   Further, in the scalar processor of the present embodiment, the circuit scale is n times as compared with the case where an instruction is processed by an n-stage pipeline using one arithmetic unit, but the operating frequency is approximately 1 / n. It becomes. As described above, assuming that the power consumption of the processor is proportional to the operating frequency × circuit scale × voltage × voltage, the power consumption of the present embodiment is almost the same as in the case of pipeline processing.

このように、本実施の形態は、パイプラインのステージ段階数を増やす代わりに、並列に実行可能な演算器数を増やすことにより、パイプラインにおける問題を回避しながら、パイプラインとほぼ変わらない消費電力で同等の高スループットを実現している。   In this way, this embodiment consumes almost the same as the pipeline while avoiding problems in the pipeline by increasing the number of arithmetic units that can be executed in parallel instead of increasing the number of stages in the pipeline. Equivalent high throughput with power.

(第9の実施の形態)
次に、本発明の第9の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第8の実施の形態に対して、演算部が有する演算器数をN(Nは1以上の整数)倍とする点が異なる。なお、本実施の形態の説明および各図面において、本発明の第8の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Ninth embodiment)
Next, a ninth embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the eighth embodiment of the present invention in that the number of arithmetic units included in the arithmetic unit is N (N is an integer of 1 or more) times. Note that, in the description of the present embodiment and the drawings, the same components as those in the eighth embodiment of the present invention are denoted by the same reference numerals, and detailed description in the present embodiment is omitted.

本発明の第9の実施の形態としてのスカラプロセッサ9の構成を図9に示す。図9において、スカラプロセッサ9は、命令キャッシュ部81と、演算部92とを備える。   FIG. 9 shows the configuration of the scalar processor 9 as the ninth embodiment of the present invention. In FIG. 9, the scalar processor 9 includes an instruction cache unit 81 and a calculation unit 92.

演算部92は、n×N個の演算器83(83_1〜83_nN)と、インタリーブ部94とを有する。ここで、nは、1以上の整数であり、命令をパイプライン処理する場合の段階数nに等しい。また、Nは、1以上の整数である。   The computing unit 92 includes n × N computing units 83 (83_1 to 83_nN) and an interleaving unit 94. Here, n is an integer of 1 or more, and is equal to the number n of stages when the instruction is pipelined. N is an integer of 1 or more.

インタリーブ部94は、本発明の第8の実施の形態におけるインタリーブ部84と同様に構成される。ただし、命令キャッシュ部81から読み出される命令を逐次供給する先となる演算器83の数が異なる。   Interleaving unit 94 is configured in the same manner as interleaving unit 84 in the eighth embodiment of the present invention. However, the number of arithmetic units 83 to which instructions read from the instruction cache unit 81 are sequentially supplied is different.

具体的にはインタリーブ部94は、命令キャッシュ部81から読み出される命令を、各クロックサイクルで次々と、n×N個の演算器83_1〜83_nNに入力する。そして、インタリーブ部94は、n×N+1個目以降の命令を、前の命令に基づく一連の処理を終了した演算器83_1から順に逐次入力していく。   Specifically, the interleave unit 94 inputs instructions read from the instruction cache unit 81 to n × N arithmetic units 83_1 to 83_nN one after another in each clock cycle. Then, the interleaving unit 94 sequentially inputs n × N + 1 and subsequent instructions from the arithmetic unit 83_1 that has completed a series of processes based on the previous instruction.

以上のように構成されたスカラプロセッサ9の動作を以下に説明する。以下の説明では、各演算器83は、フェッチ、デコード、実行、メモリアクセス、および、ライトバックの5段階を1ステージとして命令を処理するものとする。また、演算部92は、命令パイプラインの段階数5の2倍に等しい10個の演算器83_1〜83_10を有するものとする。   The operation of the scalar processor 9 configured as described above will be described below. In the following description, it is assumed that each arithmetic unit 83 processes an instruction with five stages of fetch, decode, execution, memory access, and write back as one stage. Further, it is assumed that the arithmetic unit 92 includes ten arithmetic units 83_1 to 83_10 that are equal to twice the number of stages of the instruction pipeline.

最初のクロックサイクルで、インタリーブ部94は、命令キャッシュ部81から読みだされた1つ目の命令を、演算器83_1に入力する。演算器83_1は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを行う。実行段階の結果およびメモリアクセス段階の結果は、次の演算器83_2にフォワーディングされる。そして、演算器83_1は、10クロックサイクル後の11クロックサイクル目に、結果をインタリーブ部94に入力する。インタリーブ部94は、入力された結果データをキャッシュへ書き戻す。   In the first clock cycle, the interleave unit 94 inputs the first instruction read from the instruction cache unit 81 to the arithmetic unit 83_1. The arithmetic unit 83_1 fetches the input instruction, and performs decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the next computing unit 83_2. Then, the arithmetic unit 83_1 inputs the result to the interleaving unit 94 in the 11th clock cycle after 10 clock cycles. The interleaving unit 94 writes the input result data back to the cache.

以降、2クロックサイクル目〜10クロックサイクル目においても同様に、インタリーブ部94は、命令キャッシュ部81から読みだされた命令を、演算器83_2〜83_10に逐次入力する。演算器83_2〜83_10は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックをそれぞれ行う。実行段階の結果およびメモリアクセス段階の結果は、それぞれ次の演算器83にフォワーディングされる。そして、演算器83_2〜83_10は、それぞれ10クロックサイクル後の12〜20クロックサイクル目に、結果をインタリーブ部94に入力する。インタリーブ部94は、入力された結果データをキャッシュへそれぞれ書き戻す。   Thereafter, similarly in the second clock cycle to the tenth clock cycle, the interleaving unit 94 sequentially inputs the instructions read from the instruction cache unit 81 to the arithmetic units 83_2 to 83_10. The arithmetic units 83_2 to 83_10 fetch input instructions and perform decoding, execution, memory access, and write back, respectively. The result of the execution stage and the result of the memory access stage are forwarded to the next computing unit 83, respectively. The arithmetic units 83_2 to 83_10 input the results to the interleaving unit 94 at 12th to 20th clock cycles after 10 clock cycles, respectively. The interleaving unit 94 writes the input result data back to the cache.

11クロックサイクル目で、インタリーブ部94は、命令キャッシュ部81から読みだされた11個目の命令を、演算器83_1に入力する。この時、演算器83_1は、1クロックサイクル目で入力された命令に基づく一連の処理を完了している。そこで、演算器83_1は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを行う。実行段階の結果およびメモリアクセス段階の結果は、次の演算器83_2にフォワーディングされる。そして、演算器83_1は、10クロックサイクル後の21クロックサイクル目に、結果をインタリーブ部94に入力する。インタリーブ部94は、入力された結果データをキャッシュへ書き戻す。   In the eleventh clock cycle, the interleave unit 94 inputs the eleventh instruction read from the instruction cache unit 81 to the arithmetic unit 83_1. At this time, the arithmetic unit 83_1 has completed a series of processes based on the instruction input in the first clock cycle. Therefore, the arithmetic unit 83_1 fetches the input instruction and performs decoding, execution, memory access, and write back. The result of the execution stage and the result of the memory access stage are forwarded to the next computing unit 83_2. Then, the arithmetic unit 83_1 inputs the result to the interleaving unit 94 at the 21st clock cycle after 10 clock cycles. The interleaving unit 94 writes the input result data back to the cache.

以降、スカラプロセッサ9は、同様の動作を繰り返す。   Thereafter, the scalar processor 9 repeats the same operation.

次に、本発明の第9の実施の形態の効果について述べる。   Next, effects of the ninth exemplary embodiment of the present invention will be described.

本発明の第9の実施の形態としてのスカラプロセッサは、パイプラインにおける課題を回避しながら、n段階のパイプラインよりさらなる高性能を実現する。   The scalar processor according to the ninth embodiment of the present invention achieves higher performance than the n-stage pipeline while avoiding problems in the pipeline.

その理由は、演算部が、本発明の第8の実施の形態における演算器をnのN倍個有し、インタリーブ部が、n×N個の演算器に対して命令を逐次入力するからである。これにより、本実施の形態は、本発明の第8の実施の形態に対してクロックサイクルを1/Nにして動作周波数をN倍にすることができ、その結果、本発明の第8の実施の形態に対してN倍のスループットを得られることになる。   The reason is that the arithmetic unit has N arithmetic units in the eighth embodiment of the present invention, and the interleave unit sequentially inputs instructions to the n × N arithmetic units. is there. As a result, the present embodiment can make the clock cycle 1 / N and the operating frequency N times that of the eighth embodiment of the present invention, and as a result, the eighth embodiment of the present invention. N times the throughput can be obtained.

なお、本発明の第8および第9の実施の形態において、命令キャッシュ部81に保持される命令が、依存関係がないよう制約されている場合について考える。例えば、コンパイル時に、主記憶装置800に、あらかじめ依存関係がないように制約された命令が格納されているようなケースが想定される。この場合、各実施の形態は、図10に示すように、演算器83間のフォワーディングパスを省略可能となる。これにより、本実施の形態は、回路を簡略化することができ、回路規模の削減および消費電力の削減という効果をさらに奏することができる。   In the eighth and ninth embodiments of the present invention, a case is considered in which the instructions held in the instruction cache unit 81 are restricted so as not to have a dependency relationship. For example, a case may be assumed in which instructions that are previously constrained so as to have no dependency are stored in the main storage device 800 during compilation. In this case, in each embodiment, as shown in FIG. 10, the forwarding path between the computing units 83 can be omitted. As a result, this embodiment can simplify the circuit, and can further achieve the effects of reducing the circuit scale and power consumption.

(第10の実施の形態)
次に、本発明の第10の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第9の実施の形態に対して、演算器の個数に合わせて命令キャッシュ部を分割した点が異なる。なお、本実施の形態の説明および各図面において、本発明の第9の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Tenth embodiment)
Next, a tenth embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the ninth embodiment of the present invention in that the instruction cache unit is divided according to the number of arithmetic units. Note that in the description of the present embodiment and the drawings, the same components as those in the ninth embodiment of the present invention are denoted by the same reference numerals, and detailed description thereof will be omitted.

本発明の第10の実施の形態としてのスカラプロセッサ100の構成を図11に示す。図11において、スカラプロセッサ100は、命令キャッシュ部101と、演算部102とを備える。   FIG. 11 shows the configuration of a scalar processor 100 as a tenth embodiment of the present invention. In FIG. 11, the scalar processor 100 includes an instruction cache unit 101 and a calculation unit 102.

命令キャッシュ部101は、本発明におけるデータ保持部の一実施形態を構成する。命令キャッシュ部101は、後述の演算部102が有する演算器103と同数であるn×N個の分割部105(105_1〜105_n)に分割される。分割部105は、主記憶装置800から読み込まれる命令を保持する。また、各分割部105は、n×N個の演算器103のいずれかに対応づけられる。   The instruction cache unit 101 constitutes an embodiment of a data holding unit in the present invention. The instruction cache unit 101 is divided into n × N division units 105 (105_1 to 105_n), which is the same number as the arithmetic units 103 included in the calculation unit 102 described later. The dividing unit 105 holds an instruction read from the main storage device 800. Each division unit 105 is associated with one of n × N computing units 103.

演算部102は、n×N個の演算器103(103_1〜103_nN)を有する。ここで、nは、1以上の整数であり、命令をパイプライン処理する場合の段階数nに等しい。また、Nは、1以上の整数である。なお、図11において、n=5、N=2の場合として10個の演算器103および10個の分割部105を示したが、本発明におけるn、Nの値、演算部が有する演算器の数、および、命令キャッシュ部の分割数を限定するものではない。   The computing unit 102 includes n × N computing units 103 (103_1 to 103_nN). Here, n is an integer of 1 or more, and is equal to the number n of stages when the instruction is pipelined. N is an integer of 1 or more. In FIG. 11, 10 arithmetic units 103 and 10 division units 105 are shown as n = 5 and N = 2, but the values of n and N in the present invention, the arithmetic units included in the arithmetic units, The number and the division number of the instruction cache unit are not limited.

各演算器103は、本発明の第9の実施の形態における演算器83とほぼ同様に構成されるが、対応する分割部105から命令を取得する点が異なる。また、各演算器103は、命令の結果をキャッシュ(不図示)に書き戻す。   Each computing unit 103 is configured in substantially the same manner as the computing unit 83 in the ninth embodiment of the present invention, except that an instruction is acquired from the corresponding dividing unit 105. Each computing unit 103 writes the result of the instruction back to a cache (not shown).

以上のように構成されたスカラプロセッサ100の動作を以下に説明する。以下の説明では、各演算器103は、フェッチ、デコード、実行、メモリアクセス、および、ライトバックの5段階を1ステージとして命令を処理するものとする。また、演算部102は、命令パイプラインの段階数5の2倍に等しい10個の演算器103_1〜103_10を有するものとする。また、命令キャッシュ部101は、演算器103と同数である10個の分割部105(105_1〜105_10)に分割されるものとする。   The operation of the scalar processor 100 configured as described above will be described below. In the following description, it is assumed that each arithmetic unit 103 processes an instruction with five stages of fetch, decode, execution, memory access, and write back as one stage. Further, it is assumed that the arithmetic unit 102 includes ten arithmetic units 103_1 to 103_10 that are equal to twice the number of stages of the instruction pipeline. The instruction cache unit 101 is divided into ten division units 105 (105_1 to 105_10), which is the same number as the arithmetic unit 103.

最初のクロックサイクルで、演算器103_1〜103_10は、分割部105_1〜105_10から読みだされた命令をそれぞれ入力として得る。演算器103_1〜103_10は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックをそれぞれ行う。そして、演算器103_1〜103_10は、1クロックサイクル後の2クロックサイクル目に、結果をキャッシュへそれぞれ書き戻す。   In the first clock cycle, the arithmetic units 103_1 to 103_10 respectively receive the instructions read from the dividing units 105_1 to 105_10 as inputs. The arithmetic units 103_1 to 103_10 fetch input instructions and perform decoding, execution, memory access, and write back, respectively. Then, the arithmetic units 103_1 to 103_10 respectively write back the results to the cache in the second clock cycle after the first clock cycle.

2クロックサイクル目で、演算器103_1〜103_10は、分割部105_1〜105_10から読みだされた命令をそれぞれ入力として得る。この時、演算器103_1〜103_10は、1クロックサイクル目で入力された命令に基づく一連の処理をそれぞれ完了している。そこで、演算器103_1〜103_10は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックをそれぞれ行う。そして、演算器103_1〜103_10は、1クロックサイクル後の3クロックサイクル目に、結果をキャッシュへそれぞれ書き戻す。   In the second clock cycle, the arithmetic units 103_1 to 103_10 respectively receive the instructions read from the dividing units 105_1 to 105_10 as inputs. At this time, the arithmetic units 103_1 to 103_10 each complete a series of processes based on the instruction input in the first clock cycle. Therefore, the arithmetic units 103_1 to 103_10 fetch the input instruction, and perform decoding, execution, memory access, and write back, respectively. Then, the arithmetic units 103_1 to 103_10 respectively write back the results to the cache in the third clock cycle after the first clock cycle.

以降、スカラプロセッサ100は、同様の動作を繰り返す。   Thereafter, the scalar processor 100 repeats the same operation.

次に、本発明の第10の実施の形態の効果について述べる。   Next, effects of the tenth embodiment of the present invention will be described.

本発明の第10の実施の形態としてのスカラプロセッサは、パイプラインにおける課題を回避しながら、n段のパイプラインと同等以上の性能を実現する際に、回路規模を削減するとともに消費電力をより削減することができる。   The scalar processor according to the tenth embodiment of the present invention reduces the circuit scale and power consumption when realizing performance equal to or better than that of an n-stage pipeline while avoiding problems in the pipeline. Can be reduced.

その理由は、命令キャッシュ部が、演算器と同数であるn×N個の分割部に分割され、各演算器が、各分割部から読み出される命令に基づく一連の処理を1ステージで実行するからである。   The reason is that the instruction cache unit is divided into n × N division units, which is the same number as the arithmetic units, and each arithmetic unit executes a series of processes based on instructions read from each division unit in one stage. It is.

これにより、本実施の形態は、本発明の第9の実施の形態においてn×N個の演算器を用いてn段のパイプラインと同等の性能を実現する際に必要としていたインタリーブ部を不要とする。そのため、本実施の形態は、本発明の第9の実施の形態に対して、回路規模を削減することになる。また、本実施の形態は、本発明の第9の実施の形態に対して、命令キャッシュ部および演算器間のインタフェースのクロックサイクルをn倍にしている。その結果、本実施の形態は、本発明の第9の実施の形態と同様の効果を得ながらさらに回路規模を削減し消費電力を削減することになる。   As a result, the present embodiment does not require the interleaving unit that is necessary in the ninth embodiment of the present invention to achieve performance equivalent to an n-stage pipeline using n × N arithmetic units. And Therefore, the present embodiment reduces the circuit scale as compared with the ninth embodiment of the present invention. Further, in this embodiment, the clock cycle of the interface between the instruction cache unit and the arithmetic unit is increased by n times as compared with the ninth embodiment of the present invention. As a result, the present embodiment further reduces the circuit scale and power consumption while obtaining the same effects as those of the ninth embodiment of the present invention.

(第11の実施の形態)
次に、本発明の第11の実施の形態について図面を参照して詳細に説明する。本実施の形態は、本発明の第10の実施の形態に対して、命令レジスタの個数と同数の演算器を有する点が異なる。なお、本実施の形態の説明および各図面において、本発明の第10の実施の形態と同一の構成には同一の符号を付して本実施の形態における詳細な説明を省略する。
(Eleventh embodiment)
Next, an eleventh embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is different from the tenth embodiment of the present invention in that it has the same number of arithmetic units as the number of instruction registers. Note that, in the description of the present embodiment and each drawing, the same components as those in the tenth embodiment of the present invention are denoted by the same reference numerals, and detailed description thereof will be omitted.

本発明の第11の実施の形態としてのスカラプロセッサ110の構成を図12に示す。図12において、スカラプロセッサ110は、M個の命令レジスタ111(111_1〜111_M)と、演算部112とを備える。   FIG. 12 shows the configuration of the scalar processor 110 according to the eleventh embodiment of the present invention. 12, the scalar processor 110 includes M instruction registers 111 (111_1 to 111_M) and an arithmetic unit 112.

M個の命令レジスタ111には、主記憶装置800から読み込まれる命令が保持される。   The M instruction registers 111 hold instructions read from the main storage device 800.

演算部112は、命令レジスタ111と同数のM個の演算器113(113_1〜113_M)を有する。   The arithmetic unit 112 includes the same number of M arithmetic units 113 (113_1 to 113_M) as the instruction register 111.

各演算器113は、本発明の第10の実施の形態における演算器103とほぼ同様に構成されるが、対応する命令レジスタ111から、命令を取得する点が異なる。また、各演算器113は、処理の結果をレジスタ(不図示)に書き戻す。   Each computing unit 113 is configured in substantially the same manner as the computing unit 103 in the tenth embodiment of the present invention, except that an instruction is acquired from the corresponding instruction register 111. Each computing unit 113 writes the processing result back to a register (not shown).

以上のように構成されたスカラプロセッサ110の動作を以下に説明する。以下の説明では、各演算器113は、フェッチ、デコード、実行、メモリアクセス、および、ライトバックの5段階を1ステージとして命令を処理するものとする。   The operation of the scalar processor 110 configured as described above will be described below. In the following description, it is assumed that each arithmetic unit 113 processes an instruction with five stages of fetch, decode, execution, memory access, and write back as one stage.

最初のクロックサイクルで、演算器113_1は、命令レジスタ111_1から読みだされた命令を入力として得る。演算器113_1は、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックを行う。そして、演算器113_1は、1クロックサイクル後の2クロックサイクル目に結果をレジスタへ書き戻す。   In the first clock cycle, the arithmetic unit 113_1 receives an instruction read from the instruction register 111_1 as an input. The arithmetic unit 113_1 fetches the input instruction and performs decoding, execution, memory access, and write back. Then, the arithmetic unit 113_1 writes the result back to the register in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、演算器113_2〜113_Mは、命令レジスタ111_2〜111_Mから読みだされた命令をそれぞれ入力として得る。演算器113_2〜113_Mは、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックをそれぞれ行う。そして、演算器113_2〜113_Mは、1クロックサイクル後の2クロックサイクル目に結果をレジスタへそれぞれ書き戻す。   Similarly, in the first clock cycle, the calculators 113_2 to 113_M respectively receive the instructions read from the instruction registers 111_2 to 111_M as inputs. The arithmetic units 113_2 to 113_M fetch the input instruction and perform decoding, execution, memory access, and write back, respectively. Then, the arithmetic units 113_2 to 113_M write the results back to the registers in the second clock cycle after the first clock cycle.

2クロックサイクル目で、演算器113_1〜113_Mは、命令レジスタ111_1〜111_Mから読みだされた命令をそれぞれ入力として得る。演算器113_1〜113_Mは、入力された命令をフェッチし、デコード、実行、メモリアクセス、およびライトバックをそれぞれ行う。そして、演算器113_1〜113_Mは、1クロックサイクル後の3クロックサイクル目に、結果をレジスタへそれぞれ書き戻す。   In the second clock cycle, the arithmetic units 113_1 to 113_M respectively receive the instructions read from the instruction registers 111_1 to 111_M as inputs. The arithmetic units 113_1 to 113_M fetch the input instruction and perform decoding, execution, memory access, and write back, respectively. Then, the arithmetic units 113_1 to 113_M write the results back to the registers in the third clock cycle after the first clock cycle.

以降、スカラプロセッサ110は、同様の動作を繰り返す。   Thereafter, the scalar processor 110 repeats the same operation.

次に、本発明の第11の実施の形態の効果について述べる。   Next, effects of the eleventh embodiment of the present invention will be described.

本発明の第11の実施の形態としてのスカラプロセッサは、パイプラインにおける課題を回避しながら、パイプラインと同等以上の高性能を実現することができる。   The scalar processor according to the eleventh embodiment of the present invention can achieve high performance equal to or higher than that of a pipeline while avoiding problems in the pipeline.

その理由は、演算部が、命令レジスタの個数Mと同数の演算器を有し、各演算器が、対応する命令レジスタから命令を読み出して一連の処理を1ステージで実行するからである。   This is because the arithmetic unit has the same number of arithmetic units as the number M of instruction registers, and each arithmetic unit reads an instruction from the corresponding instruction register and executes a series of processes in one stage.

このように、本実施の形態は、n段階の命令を1ステージで行う演算器をM個備えるので、n段のパイプラインに対してM/n倍の性能を実現することができる。   As described above, since this embodiment includes M arithmetic units that perform n-stage instructions in one stage, it is possible to realize M / n times performance with respect to an n-stage pipeline.

(第12の実施の形態)
次に、本発明の第12の実施の形態について図面を参照して詳細に説明する。本実施の形態では、本発明の第7の実施の形態における各演算器に、本発明の第11の実施の形態としてのスカラプロセッサを適用した例について説明する。なお、本実施の形態の説明および各図面において、本発明の第7および第11の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
(Twelfth embodiment)
Next, a twelfth embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, an example in which the scalar processor according to the eleventh embodiment of the present invention is applied to each arithmetic unit in the seventh embodiment of the present invention will be described. In the description of the present embodiment and the drawings, the same reference numerals are given to the same configurations and steps that operate in the same manner as in the seventh and eleventh embodiments of the present invention, and the details in the present embodiment. The detailed explanation is omitted.

本発明の第12の実施の形態としてのプロセッサ120の構成を図13に示す。図13において、プロセッサ120は、ベクトルレジスタ部71と、演算部122とを備える。   FIG. 13 shows the configuration of a processor 120 according to the twelfth embodiment of the present invention. In FIG. 13, the processor 120 includes a vector register unit 71 and a calculation unit 122.

演算部122は、ベクトルレジスタの要素数と同数のm個のスカラプロセッサ110(110_1〜110_m)を有する。各スカラプロセッサ110は、ベクトルデータおよびベクトル命令を、ブロードキャスト部77および対応する要素部66から取得して、各命令要素の示す演算を各データ要素に対して実行する。このとき、各スカラプロセッサ110は、M個の演算器113を用いて、ブロードキャストされたベクトルデータおよびベクトル命令のM個の要素に基づくM個の処理を実行可能である。たとえば、各スカラプロセッサ110は、要素部66およびブロードキャスト部77のいずれかまたは両方からオペランドとなるデータ要素を読み出してもよい。また、各演算器113は、命令要素を、要素部66およびブロードキャスト部77のいずれかから読み出せばよい。これにより、演算部122は、全てのスカラプロセッサ110で同一命令を異なるオペランドに対して演算することが可能となる。あるいは、演算部122は、全てのスカラプロセッサ110で少なくとも1つの同一のオペランドを用いて異なる演算を実行することが可能となる。   The calculation unit 122 includes m scalar processors 110 (110_1 to 110_m) having the same number as the number of elements of the vector register. Each scalar processor 110 acquires vector data and a vector instruction from the broadcast unit 77 and the corresponding element unit 66, and executes an operation indicated by each instruction element on each data element. At this time, each scalar processor 110 can execute M processes based on the broadcasted vector data and the M elements of the vector instruction using M computing units 113. For example, each scalar processor 110 may read a data element as an operand from either or both of the element unit 66 and the broadcast unit 77. Each computing unit 113 may read the command element from either the element unit 66 or the broadcast unit 77. Thereby, the arithmetic unit 122 can operate the same instruction on different operands in all the scalar processors 110. Alternatively, the arithmetic unit 122 can execute different operations using at least one identical operand in all the scalar processors 110.

以上のように構成されたプロセッサ120の動作を以下に説明する。なお、以下の説明では、ブロードキャスト部77からは、ベクトル命令およびオペランドの1つを表すベクトルデータがブロードキャストされ、要素部66からは、オペランドの他方を表すデータ要素が読み出されるものとする。   The operation of the processor 120 configured as described above will be described below. In the following description, it is assumed that the broadcast unit 77 broadcasts vector data representing one of a vector command and an operand, and the element unit 66 reads a data element representing the other of the operands.

最初のクロックサイクルで、スカラプロセッサ110_1は、ブロードキャスト部77からブロードキャストされたベクトル命令およびベクトルデータ、および、要素部66_1から読みだされた1つ目のデータ要素を入力として得る。スカラプロセッサ110_1は、入力された命令およびデータに基づく処理を、1クロックサイクル後の2クロックサイクル目に処理する。   In the first clock cycle, the scalar processor 110_1 receives the vector instruction and vector data broadcast from the broadcast unit 77 and the first data element read from the element unit 66_1 as inputs. The scalar processor 110_1 processes a process based on the input instruction and data in the second clock cycle after the first clock cycle.

同様に、最初のクロックサイクルで、スカラプロセッサ110_2〜110_mは、ブロードキャスト部77からブロードキャストされたベクトル命令およびベクトルデータ、および、要素部66_2〜66mから読みだされたデータ要素をそれぞれ入力として得る。スカラプロセッサ110_2〜110_mは、入力された命令およびデータに基づく処理を、1クロックサイクル後の2クロックサイクル目に処理する。   Similarly, in the first clock cycle, the scalar processors 110_2 to 110_m respectively receive the vector instruction and vector data broadcast from the broadcast unit 77 and the data elements read from the element units 66_2 to 66m as inputs. The scalar processors 110_2 to 110_m process the processing based on the input instruction and data in the second clock cycle after one clock cycle.

2クロックサイクル目で、スカラプロセッサ110_1〜110_mは、ブロードキャスト部77からブロードキャストされたベクトル命令およびベクトルデータ、および、要素部66_1〜66mから読みだされたデータ要素をそれぞれ入力として得る。スカラプロセッサ110_1〜110_mは、入力された命令およびデータに基づく処理を、1クロックサイクル後の3クロックサイクル目に処理する。   In the second clock cycle, the scalar processors 110_1 to 110_m respectively receive the vector command and vector data broadcast from the broadcast unit 77 and the data elements read from the element units 66_1 to 66m as inputs. The scalar processors 110_1 to 110_m process a process based on the input instruction and data in the third clock cycle after one clock cycle.

以降、プロセッサ120は、同様の動作を繰り返す。   Thereafter, the processor 120 repeats the same operation.

次に、本発明の第12の実施の形態の効果について述べる。   Next, effects of the twelfth embodiment of the present invention will be described.

本発明の第12の実施の形態としてのプロセッサは、パイプラインにおける課題を回避しながらパイプラインと同等以上の性能を実現する際に、命令またはオペランドを同一とする複数の演算を効率よく実行可能とする。   The processor according to the twelfth embodiment of the present invention can efficiently execute a plurality of operations with the same instruction or operand when realizing performance equal to or better than that of the pipeline while avoiding problems in the pipeline. And

その理由は、ベクトルレジスタ部が、要素部およびブロードキャスト部を有し、演算部が、要素部と同数の本発明の第11の実施の形態としてのスカラプロセッサを有し、各スカラプロセッサが、ブロードキャスト部からブロードキャストされるベクトル命令またはベクトルデータと、要素部から読み出される命令要素またはデータ要素とを用いて一連の処理を1ステージで実行するからである。これにより、本実施の形態は、全ての演算器において同一命令を実行したい場合や、全ての演算器において同一オペランドを用いたい場合に、メモリとのスループットが性能ネックになることを回避できることになる。   The reason is that the vector register unit has an element unit and a broadcast unit, the arithmetic unit has the same number of scalar processors as the eleventh embodiment of the present invention, and each scalar processor broadcasts. This is because a series of processing is executed in one stage using a vector command or vector data broadcast from the unit and a command element or data element read from the element unit. As a result, this embodiment can prevent the throughput with the memory from becoming a performance bottleneck when the same instruction is to be executed in all the arithmetic units or the same operand is to be used in all the arithmetic units. .

なお、上述した本発明の第2から第7の実施の形態において、ベクトルプロセッサにおいて各演算器が実行する浮動小数点演算が4段階からなる例を中心に説明したが、各演算器が実行する演算の種類およびその段階数を限定するものではない。   In the second to seventh embodiments of the present invention described above, the floating point arithmetic operation performed by each arithmetic unit in the vector processor has been described mainly with four stages. However, the arithmetic operation performed by each arithmetic unit is described. The type and the number of stages are not limited.

また、上述した本発明の第2の実施の形態において、ベクトルプロセッサにおいて各演算器が実行する一連の処理が浮動小数点加算である例を中心に説明したが、演算の種類を限定するものではない。   Further, in the above-described second embodiment of the present invention, the example in which the series of processing executed by each arithmetic unit in the vector processor is floating point addition has been mainly described, but the type of arithmetic is not limited. .

また、上述した本発明の第3から第7の実施の形態において、各演算器が、浮動小数点加算および浮動小数点乗算のいずれかを選択して実行可能である例を中心に説明したが、選択可能な演算の種類や種類数を限定するものではない。   Further, in the above-described third to seventh embodiments of the present invention, each arithmetic unit has been described mainly with respect to an example in which either a floating point addition or a floating point multiplication can be selected and executed. It does not limit the types and number of types of operations that can be performed.

また、上述した本発明の第8〜第11の実施の形態において、スカラプロセッサにおいて各演算器が実行する命令が5段階からなる例を中心に説明したが、命令の各段階の処理内容や段階数を限定するものではない。   Further, in the above-described eighth to eleventh embodiments of the present invention, description has been made centering on an example in which the instruction executed by each arithmetic unit in the scalar processor is composed of five stages. The number is not limited.

また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。   Moreover, each embodiment mentioned above can be implemented in combination as appropriate.

また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。   The present invention is not limited to the above-described embodiments, and can be implemented in various modes.

また、上述した各実施の形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
主記憶装置から読み込まれる各データを保持するデータ保持部と、
前記データに基づく一連の処理を終了してから次のデータに基づく前記一連の処理を開始する複数の演算器を用いて、前記各データに基づく一連の処理を並列に実行する演算部と、
を備えたプロセッサ。
(付記2)
前記演算部は、前記データ保持部に保持される各データを前記複数の演算器に対してインタリーブするインタリーブ部をさらに有することを特徴とする付記1に記載のプロセッサ。
(付記3)
前記データ保持部は、前記演算器の個数に分割されて各分割部分を各演算器に対応させ、
前記各演算器は、対応する前記分割部分に保持されたデータに基づいて、前記一連の処理を実行することを特徴とする付記1に記載のプロセッサ。
(付記4)
前記演算部は、前記一連の処理がn(nは1以上の整数)段階からなる場合、nのN(Nは1以上の整数)倍個の前記演算器を有することを特徴とする付記1から付記3のいずれか1つに記載のプロセッサ。
(付記5)
前記データ保持部は、前記各演算器に対してブロードキャストされるデータをさらに保持し、
前記各演算器は、前記ブロードキャストされるデータにさらに基づいて、前記一連の処理を実行することを特徴とする付記1から付記4のいずれか1つに記載のプロセッサ。
(付記6)
前記演算部は、前記各演算器において前記一連の処理において生成されるデータを他の演算器に入力するフォワーディングパスを前記演算器間に有することを特徴とする付記1から付記5のいずれか1つに記載のプロセッサ。
(付記7)
前記データ保持部は、データ要素からなるベクトルデータを保持するベクトルレジスタによって構成され、
前記各演算器は、前記データ要素に対する演算を前記一連の処理として実行することを特徴とする付記1から付記5のいずれか1つに記載のプロセッサ。
(付記8)
前記データ保持部は、前記各データ要素に対する演算の内容を表す命令要素からなるベクトル命令をさらに保持し、
前記各演算器は、前記各データ要素に対して対応する前記命令要素の示す演算を前記一連の処理として実行することを特徴とする付記7に記載のプロセッサ。
(付記9)
前記演算部は、前記ベクトルレジスタの要素数と同数の前記演算器を有し、
前記各演算器は、対応する前記データ要素に対して前記一連の処理を実行することを特徴とする付記7または付記8に記載のプロセッサ。
(付記10)
前記データ保持部は、前記各演算器に対する命令を表す情報を保持し、
前記各演算器は、前記命令に基づく一連の処理を終了してから次の命令に基づく一連の処理を開始することを特徴とする付記1から付記5のいずれか1つに記載のプロセッサ。
(付記11)
主記憶装置から読み込まれてデータ保持部に保持される各データに基づく一連の処理を終了してから次のデータに基づく前記一連の処理を開始する複数の演算器を用いて、前記各データに基づく一連の処理を並列に実行する、プロセッサの処理方法。
(付記12)
前記データ保持部に保持される各データを前記複数の演算器に対してインタリーブすることにより、前記各データに基づく一連の処理を並列に実行することを特徴とする付記11に記載のプロセッサの処理方法。
A part or all of each of the above-described embodiments can be described as in the following supplementary notes, but is not limited thereto.
(Appendix 1)
A data holding unit for holding each data read from the main storage device;
An arithmetic unit that executes a series of processes based on each data in parallel using a plurality of arithmetic units that start the series of processes based on the next data after finishing a series of processes based on the data;
With processor.
(Appendix 2)
The processor according to appendix 1, wherein the arithmetic unit further includes an interleaving unit that interleaves each data held in the data holding unit with respect to the plurality of arithmetic units.
(Appendix 3)
The data holding unit is divided into the number of the computing units, and each divided part is associated with each computing unit,
The processor according to appendix 1, wherein each of the arithmetic units executes the series of processing based on data held in the corresponding divided portion.
(Appendix 4)
The arithmetic unit includes N arithmetic units of N (N is an integer of 1 or more) times n when the series of processes includes n (n is an integer of 1 or more) stages. To 4. The processor according to any one of appendix 3.
(Appendix 5)
The data holding unit further holds data broadcast to the respective computing units,
The processor according to any one of Supplementary Note 1 to Supplementary Note 4, wherein each of the arithmetic units executes the series of processes based on the broadcast data.
(Appendix 6)
Any one of appendix 1 to appendix 5, wherein the computing unit includes a forwarding path between the computing units for inputting data generated in the series of processes in each computing unit to another computing unit. Processor described in 1.
(Appendix 7)
The data holding unit is configured by a vector register that holds vector data composed of data elements,
The processor according to any one of Supplementary Note 1 to Supplementary Note 5, wherein each of the computing units executes computation on the data element as the series of processes.
(Appendix 8)
The data holding unit further holds a vector instruction composed of instruction elements representing the contents of an operation on each data element,
The processor according to appendix 7, wherein each of the arithmetic units executes an operation indicated by the instruction element corresponding to each data element as the series of processes.
(Appendix 9)
The computing unit has the same number of computing units as the number of elements of the vector register,
9. The processor according to appendix 7 or appendix 8, wherein each of the arithmetic units executes the series of processes on the corresponding data element.
(Appendix 10)
The data holding unit holds information representing an instruction for each arithmetic unit,
The processor according to any one of appendix 1 to appendix 5, wherein each arithmetic unit ends a series of processes based on the instruction and then starts a series of processes based on a next instruction.
(Appendix 11)
Using a plurality of arithmetic units that start the series of processes based on the next data after completing a series of processes based on the data read from the main storage device and held in the data holding unit, A processing method of a processor that executes a series of processes based on parallel processing.
(Appendix 12)
The processor processing according to appendix 11, wherein a series of processing based on each data is executed in parallel by interleaving each data held in the data holding unit with respect to the plurality of arithmetic units. Method.

1、120 プロセッサ
2、3、4、5、6、7、 ベクトルプロセッサ
8、9、100、110 スカラプロセッサ
11 データ保持部
12、22、32、42、52、62、72、82、92、102、112、122 演算部
13、23、33、53、63、73、83、103、113 演算器
21、31、51、61、71 ベクトルレジスタ部
24、34、44、84、94 インタリーブ部
55、105 分割部
66 要素部
77 ブロードキャスト部
81、101 命令キャッシュ部
111 命令レジスタ
800 主記憶装置
801 メモリ
802 メモリインタリーブ部
900 プロセッサ
901 論理回路
1, 120 Processor 2, 3, 4, 5, 6, 7, Vector processor 8, 9, 100, 110 Scalar processor 11 Data holding unit 12, 22, 32, 42, 52, 62, 72, 82, 92, 102 , 112, 122 arithmetic unit 13, 23, 33, 53, 63, 73, 83, 103, 113 arithmetic unit 21, 31, 51, 61, 71 vector register unit 24, 34, 44, 84, 94 interleave unit 55, 105 Dividing unit 66 Element unit 77 Broadcasting unit 81, 101 Instruction cache unit 111 Instruction register 800 Main storage device 801 Memory 802 Memory interleaving unit 900 Processor 901 Logic circuit

Claims (7)

主記憶装置から読み込まれる、演算の対象となる1つ以上のベクトルデータと、前記ベクトルデータのそれぞれにおけるi個目(iは1以上、前記ベクトルデータの要素数以下の整数)のデータ要素に対する演算の内容を表す命令要素からなるベクトル命令とを保持するデータ保持部と、
前記データ要素に対して対応する前記命令要素の示す演算のための一連の処理を終了してから次のデータ要素に対して前記一連の処理を開始する複数の演算器を用いて、前記一連の処理を並列に実行する演算部と、
を備えたプロセッサ。
An operation on one or more vector data to be calculated, read from the main storage device, and an i-th data element (i is an integer equal to or more than 1 and equal to or less than the number of elements of the vector data) A data holding unit for holding a vector command composed of command elements representing the contents of
Using a plurality of arithmetic units that start the series of processes for the next data element after completing a series of processes for the operation indicated by the instruction element corresponding to the data element, An arithmetic unit that executes processing in parallel;
With processor.
前記演算部は、前記データ保持部に保持される、前記演算の対象となる1つ以上の前記ベクトルデータを、前記複数の演算器に対してインタリーブするインタリーブ部をさらに有することを特徴とする請求項1に記載のプロセッサ。 The arithmetic unit, the is held in the data holding unit, one or more of said vector data to be the arithmetic, and further comprising a interleaving unit for interleaving with respect to the plurality of arithmetic units The processor of claim 1. 前記データ保持部は、前記演算器の個数に分割されて各分割部分を各演算器に対応させ、
前記各演算器は、対応する前記分割部分に保持された前記データ要素に基づいて、前記一連の処理を実行することを特徴とする請求項1に記載のプロセッサ。
The data holding unit is divided into the number of the computing units, and each divided part is associated with each computing unit,
Wherein each operation unit, based on the data elements held in the divided portion corresponding processor of claim 1, characterized in that executing the series of processes.
前記演算部は、前記一連の処理がn(nは1以上の整数)段階からなる場合、nのN(Nは1以上の整数)倍個の前記演算器を有することを特徴とする請求項1から請求項3のいずれか1項に記載のプロセッサ。   The arithmetic unit includes, when the series of processes includes n (n is an integer equal to or greater than 1) stages, N arithmetic units of N (N is an integer equal to or greater than 1) times. The processor according to any one of claims 1 to 3. 前記データ保持部は、前記各演算器に対してブロードキャストされる前記ベクトルデータをさらに保持し、
前記各演算器は、前記ブロードキャストされる前記ベクトルデータにさらに基づいて、前記一連の処理を実行することを特徴とする請求項1から請求項4のいずれか1項に記載のプロセッサ。
The data holding unit further holds the vector data that is the broadcast for each calculator,
Wherein each operation unit is further based on the vector data that is the broadcast, the processor according to any one of claims 1 to 4, characterized in that executing the series of processes.
主記憶装置から読み込まれてデータ保持部に保持される、演算の対象となる1つ以上のベクトルデータと、前記ベクトルデータのそれぞれにおけるi個目(iは1以上、前記ベクトルデータの要素数以下の整数)のデータ要素に対する演算の内容を表す命令要素からなるベクトル命令とを用いて、
前記データ要素に対して対応する前記命令要素の示す演算のための一連の処理を終了してから次のデータ要素に対して前記一連の処理を開始する複数の演算器を用いて、前記一連の処理を並列に実行する、プロセッサの処理方法。
One or more vector data to be calculated, read from the main storage device and held in the data holding unit, and the i-th vector in each of the vector data (i is 1 or more and the number of elements of the vector data or less And a vector instruction consisting of instruction elements representing the contents of the operation on the data element of
Using a plurality of arithmetic units that start the series of processes for the next data element after completing a series of processes for the operation indicated by the instruction element corresponding to the data element, A processor processing method that executes processing in parallel.
前記データ保持部に保持される、前記演算の対象となる1つ以上の前記ベクトルデータおよび前記ベクトル命令を、前記複数の演算器に対してインタリーブすることにより、前記一連の処理を並列に実行することを特徴とする請求項6に記載のプロセッサの処理方法。 The series of processes are executed in parallel by interleaving the one or more vector data and the vector instruction to be subjected to the operation held in the data holding unit with respect to the plurality of computing units. The processor processing method according to claim 6 .
JP2013171051A 2013-08-21 2013-08-21 Processor and processor processing method Active JP6060853B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013171051A JP6060853B2 (en) 2013-08-21 2013-08-21 Processor and processor processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013171051A JP6060853B2 (en) 2013-08-21 2013-08-21 Processor and processor processing method

Publications (2)

Publication Number Publication Date
JP2015041176A JP2015041176A (en) 2015-03-02
JP6060853B2 true JP6060853B2 (en) 2017-01-18

Family

ID=52695320

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013171051A Active JP6060853B2 (en) 2013-08-21 2013-08-21 Processor and processor processing method

Country Status (1)

Country Link
JP (1) JP6060853B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0544083A3 (en) * 1991-11-26 1994-09-14 Ibm Interleaved risc-type parallel processor and processing methods
JPH07200542A (en) * 1993-12-28 1995-08-04 Fujitsu Ltd Vector processor
JP3971535B2 (en) * 1999-09-10 2007-09-05 株式会社リコー SIMD type processor
JP2011233085A (en) * 2010-04-30 2011-11-17 Toyota Motor Corp Processor, electronic control unit, and load distribution method

Also Published As

Publication number Publication date
JP2015041176A (en) 2015-03-02

Similar Documents

Publication Publication Date Title
JP6351682B2 (en) Apparatus and method
US8443170B2 (en) Apparatus and method for performing SIMD multiply-accumulate operations
US9355061B2 (en) Data processing apparatus and method for performing scan operations
JP6373425B2 (en) Instruction to shift multiple bits to the left and pull multiple 1s into multiple lower bits
CN109062608B (en) Vectorized read and write mask update instructions for recursive computation on independent data
JP5231800B2 (en) Semiconductor integrated circuit device and clock control method for semiconductor integrated circuit device
CN107533460B (en) Compact Finite Impulse Response (FIR) filter processor, method, system and instructions
US9513908B2 (en) Streaming memory transpose operations
US20230325195A1 (en) Replicating logic blocks to enable increased throughput with sequential enabling of input register blocks
TWI502490B (en) Method for processing addition instrutions, and apparatus and system for executing addition instructions
US20180307489A1 (en) Apparatus and method for performing multiply-and-accumulate-products operations
JP2013543175A (en) General logic operation method and apparatus
JP2010271818A (en) Device and method of instruction fusion calculation
US8949575B2 (en) Reversing processing order in half-pumped SIMD execution units to achieve K cycle issue-to-issue latency
US20180004515A1 (en) Processor and control method of processor
US20100115232A1 (en) Large integer support in vector operations
CN112074810B (en) Parallel processing apparatus
WO2019023910A1 (en) Data processing method and device
JP6060853B2 (en) Processor and processor processing method
JP2007200180A (en) Processor system
Glossner et al. HSA-enabled DSPs and accelerators
KR100636596B1 (en) Parallel Data Path Architecture for High Energy Efficient
JP5659772B2 (en) Arithmetic processing unit
JP2014164659A (en) Processor
WO2011086808A1 (en) Information processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150907

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151013

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160510

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160816

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161004

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161128

R150 Certificate of patent or registration of utility model

Ref document number: 6060853

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150