JP2007164472A - Arithmetic device with queuing mechanism - Google Patents
Arithmetic device with queuing mechanism Download PDFInfo
- Publication number
- JP2007164472A JP2007164472A JP2005359815A JP2005359815A JP2007164472A JP 2007164472 A JP2007164472 A JP 2007164472A JP 2005359815 A JP2005359815 A JP 2005359815A JP 2005359815 A JP2005359815 A JP 2005359815A JP 2007164472 A JP2007164472 A JP 2007164472A
- Authority
- JP
- Japan
- Prior art keywords
- data
- field
- payload field
- payload
- input
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8007—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors single instruction multiple data [SIMD] multiprocessors
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
Abstract
Description
本発明は、プロセッサエレメント間又はパイプラインの各ステージを構成する機能ブロック間に待ち合わせ機構を有する演算装置に関する。 The present invention relates to an arithmetic unit having a waiting mechanism between processor elements or between functional blocks constituting each stage of a pipeline.
特許文献1には、複数のプロセッサエレメント(Processor Element:以後、PEと呼ぶ。)を行列状に配置し、各PEでの演算内容と各PE間の接続をプログラムにより変更することで、目的とするデータ処理を実現する演算装置が記載されている。
In
図8は、特許文献1に記載の演算装置を説明する図である。図8において、PE72及びPE73は、それぞれ入力61及び62に入力される値の乗算を実行し、PE71は入力61及び62に入力される値の加算を実行するようにプログラムされ、更に、PE72の出力がPE71の入力61に、PE73の出力がPE71の入力62に接続するようにプログラムされている。即ち、PE72の入力61に入力される値をaと、PE72の入力62に入力される値をbと、PE73の入力61に入力される値をcと、PE73の入力62に入力される値をdとすると、PE71の出力は、a*b+c*dとなる。
FIG. 8 is a diagram illustrating the arithmetic device described in
図8においては、PE72の入力61に値“3”、“5”、“7”が順に入力され、PE72の入力62に値“2”、“4”、“1”が順に入力され、PE73の入力61に値“1”、“4”、“4”が順に入力され、PE73の入力62に値“3”、“3”、“1”が順に入力されており、PE71からは、値“9”、“32”、“11”が順に出力されている。
In FIG. 8, values “3”, “5”, and “7” are sequentially input to the
特許文献1に記載の演算装置においては、各PEに入力される複数のデータ間のタイミングについて同期制御を行う必要がある。例えば、図8において、PE72の入力61に値“5”が入力されている間に、入力62に値“4”が入力されるように制御する必要があり、PE71の入力61に値“20”が入力されている間に、入力62に値“12”が入力されるように演算装置を制御する必要があり、この同期制御なしで演算装置は正しく動作しない。
In the arithmetic device described in
特許文献1には、この同期制御の構成は記載されていないが、演算装置全体での同期制御は演算装置の構成を複雑し、プログラミングにより同期を保障する場合にはプログラマの負担が重くなる。
また、RISCプロセッサのパイプラインにおいてもこれと似た問題がある。図9は、RISCプロセッサのパイプライン構造を示す図である。図9によると、RISCプロセッサは、命令フェッチ部81と、命令デコード部82と、命令実行部83と、ライトバック部84により4ステージのパイプラインを構成している。理想的なパイプライン構成においては、パイプラインに投入される各命令は、流れ作業のごとく順次実行されていくが、実際には、データハザードや制御ハザード等の種々のハザードにより、或いは、命令実行に数ステージ必要な命令の存在によりストールを行う必要がある。ストールとは、パイプラインのステージを構成する機能ブロック、つまり図9の例では、命令フェッチ部81、命令デコード部82、命令実行部83、ライトバック部84のいずれかでの処理を終了した命令が、次の機能ブロックでの処理に移れずに、次の機能ブロックでの処理が可能となるまで待ち合わせることをいい、例えば、ある命令のデコードが命令デコード部82で終了したとしても、先の命令の実行が命令実行部83で終了していない場合に発生する。
There is a similar problem in the RISC processor pipeline. FIG. 9 is a diagram showing the pipeline structure of the RISC processor. According to FIG. 9, in the RISC processor, an
このため、RISCプロセッサは、パイプライン制御部9を備えており、各部での処理状況に基づき、ストール即ち、処理の待機命令を各部に対して行う。
For this reason, the RISC processor includes a
上述したように、特許文献1の演算装置において、演算装置全体での同期制御は演算装置の構成を複雑し、プログラミングにより同期を保障する場合にはプログラマの負担が重くなる。
As described above, in the arithmetic device of
また、図9に示すパイプライン構造において、例えば、命令実行部93を複数にするといった、パイプラインステージの段数の変更を伴う設計変更を行う場合、パイプライン制御部9を含めたプロセッサ全体の設計変更が必要になるという問題がある。
Further, in the pipeline structure shown in FIG. 9, for example, when a design change involving a change in the number of pipeline stages, such as a plurality of instruction execution units 93, is performed, the entire processor including the
従って、本発明は、簡易な構成で、各PEに入力される複数のデータの待ち合わせを行い、プログラミングの際にはデータの同期について考慮する必要のない演算装置を提供することを目的とする。 Accordingly, an object of the present invention is to provide an arithmetic device that waits for a plurality of data input to each PE with a simple configuration and does not need to consider data synchronization when programming.
また、演算装置の設計変更を容易とするため、全体を管理制御するパイプライン制御部を必要としないパイプライン構成を有する演算装置を提供することも目的とする。 Another object of the present invention is to provide an arithmetic unit having a pipeline configuration that does not require a pipeline control unit for managing and controlling the whole in order to facilitate design changes of the arithmetic unit.
本発明における演算装置によれば、
1つ以上の第1のプロセッサエレメントと、1つ以上の第2のプロセッサエレメントと、待合せ手段とを有する演算装置であって、待合せ手段は、第1のプロセッサエレメントそれぞれが出力するデータを保持するペイロードフィールドと、ペイロードフィールドに対応し、対応するペイロードフィールドの有効状態又は無効状態を示すフラグフィールドを有し、フラグフィールドは、第1のプロセッサエレメントが、対応するペイロードフィールドにデータを書き込んだときに有効状態となり、該データを入力とする総ての第2のプロセッサエレメントが、ペイロードフィールドよりデータを読み出したときに無効状態となることを特徴とする。
According to the arithmetic device of the present invention,
An arithmetic device having one or more first processor elements, one or more second processor elements, and a waiting means, wherein the waiting means holds data output from each of the first processor elements. A payload field and a flag field corresponding to the payload field and indicating a valid state or invalid state of the corresponding payload field, and the flag field when the first processor element writes data to the corresponding payload field All the second processor elements that are in the valid state and input the data are in the invalid state when the data is read from the payload field.
本発明の演算装置における他の実施形態によれば、
第1のプロセッサエレメントは、フラグフィールドが無効状態のときにのみ、新たなデータを対応するペイロードフィールドに書き込むことも好ましい。
According to another embodiment of the arithmetic device of the present invention,
The first processor element also preferably writes new data to the corresponding payload field only when the flag field is in an invalid state.
また、本発明の演算装置における他の実施形態によれば、
フラグフィールドは、第2のプロセッサエレメントに対応し、対応する第2のプロセッサエレメントがペイロードフィールドのデータを読み出したか否かを示すフラグから構成され、第2のプロセッサエレメントは、入力とするデータが保持されているペイロードフィールドに対応するフラグフィールドの、自身に対応するフラグの総てが、データを読み出していないことを示している場合にのみ、入力とするデータを読み出すことも好ましい。
According to another embodiment of the arithmetic device of the present invention,
The flag field corresponds to the second processor element, and includes a flag indicating whether or not the corresponding second processor element has read the data in the payload field. The second processor element holds data to be input. It is also preferable to read out the input data only when all of the flags corresponding to the flag field corresponding to the payload field being read indicate that the data has not been read out.
更に、本発明の演算装置における他の実施形態によれば、
第2のプロセッサエレメントの各入力には、1つ以上のデータを保持するFIFOバッファが設けられ、ペイロードフィールドに新たに書き込まれたデータは、同時に該データを入力とする総ての第2のプロセッサエレメントのFIFOバッファに出力され、FIFOバッファは、保持しているデータがその容量に達したときにはフルフラグを有効に、それ以外の場合は無効に設定し、第1のプロセッサエレメントは、出力するデータを入力とする総てのFIFOバッファがフルフラグを無効に設定している場合にのみ、新たなデータをペイロードフィールドに書き込むことも好ましい。
Furthermore, according to another embodiment of the arithmetic unit of the present invention,
Each input of the second processor element is provided with a FIFO buffer that holds one or more data, and the newly written data in the payload field is all the second processors that receive the data at the same time. Is output to the FIFO buffer of the element. The FIFO buffer sets the full flag valid when the stored data reaches its capacity, otherwise invalid, and the first processor element outputs the data to be output. It is also preferable to write new data into the payload field only when all the input FIFO buffers have the full flag disabled.
更に、本発明の演算装置における他の実施形態によれば、
パイプラインを構成する各ステージの間に待合せ手段を有する演算装置であって、前記待合せ手段は、各ステージの出力である命令又はデータを保持するペイロードフィールドと、ペイロードフィールドの有効状態又は無効状態を示すフラグフィールドを有し、フラグフィールドは、ペイロードフィールドに命令又はデータが書き込まれたときに有効状態となり、ペイロードフィールドから命令又はデータが読み出されたときに無効状態となり、各ステージは、フラグフィールドが無効状態のときにのみ下流にある待合せ手段のペイロードフィールドに命令又はデータを書き込み、フラグフィールドが有効状態のときにのみ上流にある待合せ手段のペイロードフィールドから命令又はデータを読み出すことを特徴とする。
Furthermore, according to another embodiment of the arithmetic unit of the present invention,
An arithmetic unit having a queuing unit between each stage constituting a pipeline, wherein the queuing unit determines a payload field that holds an instruction or data that is an output of each stage, and a valid state or invalid state of the payload field. The flag field becomes valid when an instruction or data is written in the payload field, becomes invalid when an instruction or data is read from the payload field, and each stage has a flag field. The command or data is written to the payload field of the waiting means downstream only when the flag is invalid, and the command or data is read from the payload field of the waiting means upstream only when the flag field is valid. .
演算装置全体の同期制御や、入力データの同期を意識したプログラミングを行うことなく、データを入出力するプロセッサエレメント間での局所的な制御という簡易な構成で、各プロセッサエレメントへの入力データの同期を実現できる。また、各プロセッサエレメントの入力にFIFOバッファを設けることで、上流に位置するプロセッサエレメントが、待合せ手段にデータを書き込むサイクルの低減が可能となる。 Synchronize input data to each processor element with a simple configuration of local control between processor elements that input and output data, without performing synchronization control of the entire arithmetic unit or programming that is conscious of input data synchronization Can be realized. Further, by providing a FIFO buffer at the input of each processor element, it is possible to reduce the cycle in which the processor element located upstream writes data to the waiting means.
パイプライン構成を有する演算装置において、パイプライン制御部が必要なくなり、また、各ステージ間のストールの制御は局所的に独立して実行されるため、パイプラインのステージ数を増減させたとしても局所的な設計変更で対処できるという利点がある。 An arithmetic unit having a pipeline configuration eliminates the need for a pipeline control unit, and stall control between each stage is performed locally independently, so even if the number of pipeline stages is increased or decreased There is an advantage that it can be dealt with by a design change.
本発明を実施するための最良の実施形態について、以下では図面を用いて詳細に説明する。 The best mode for carrying out the present invention will be described in detail below with reference to the drawings.
図1は、本発明による演算装置が有する、PE間の接続構成を示す図である。図1のPEは、プログラムによりその演算内容が規定される。図1によると、各PEは、その入力を直接他のPEから取得するのではなく、必ず、待合せ部5を介して取得する。つまり、PE10、20及び30は、出力データを待合せ部5に書き込み、PE11、21及び31は、入力データを待合せ部5から読み出して取得する。尚、PEの行数及び列数は例示であり、本発明は、1以上の任意の行数及び2以上の任意の列数に適応可能である。
FIG. 1 is a diagram showing a connection configuration between PEs included in an arithmetic device according to the present invention. The operation content of the PE in FIG. 1 is defined by a program. According to FIG. 1, each PE does not acquire its input directly from another PE, but always acquires it via the queuing
図2は、待合せ部5の構成を示す図である。待合せ部5は、符号51〜5nで示すn個のレジスタを有し、各レジスタは、接続フラグフィールドと、状態フラグフィールドと、ペイロードフィールドを含んでいる。各レジスタにデータを書き込むPEは、プログラムにより、又は、ハードウェア構成により決定される。更に、各レジスタからデータを読み出すPEは、プログラムにより決定される。
FIG. 2 is a diagram illustrating a configuration of the
レジスタ51〜5nの接続フラグフィールドは、それぞれが、データの読出しを行うPEに対応する複数ビットからなり、実際にデータを読み出す必要があるPEに対応するビットに、例えば、“1”を設定し、それ以外のPEに対応するビットに“0”を設定する。実際にデータを読み出す必要があるPEは、プログラムに応じて決定され、当該プログラムの実行時に初期設定として接続フィールドに書き込まれる。
Each of the connection flag fields of the
レジスタ51〜5nのペイロードフィールドは、任意のビット長であり、PE間で入出力されるデータを保持する。状態フラグフィールドは、それぞれが、データの読出しを行うPEに対応する複数ビットからなり、例えば、ペイロードフィールドにデータが書き込まれたときに、総てのビットが“1”に設定される。また、当該ペイロードフィールドからデータが読み出されたときに、データの読み出しを行ったPEに対応するビット位置が“0”になるよう制御される。
The payload fields of the
データを読み出すPEは、状態フラグフィールドの自身に対応するビットが“1”である場合には、当該ペイロードフィールドに入力データが設定されていることを、“0”である場合には、当該ペイロードフィールドには未だ入力データが設定されていないことを認識する。状態フラグフィールドの値の設定、変更は、データの読出し及び書き込みを行うPEが行うことも、図示しない待合せ部5の制御部が行う構成とすることも可能である。また、接続フラグフィールドと、状態フラグフィールドの同一プロセッサエレメントに対応しているビット同士での論理積が総て“0”であることは、書き込んだデータを入力として使用するPEの総てがデータの読出しを行ったことを意味する。従って、ペイロードフィールドにデータを書き込むPEは、接続フラグフィールドと、状態フラグフィールドの同一PEに対応しているビット同士での論理積が総て“0”である場合にのみ、新しいデータのペイロードフィールドへの書き込みを行う。 The PE that reads data indicates that the input data is set in the payload field when the bit corresponding to itself in the status flag field is “1”, and indicates that the payload is “0”. Recognize that the input data is not yet set in the field. Setting or changing the value of the status flag field can be performed by a PE that reads and writes data, or can be configured by a control unit of the queuing unit 5 (not shown). In addition, the logical product of the bits corresponding to the same processor element in the connection flag field and the status flag field is all “0”, which means that all the PEs using the written data as input are data. Means that the data has been read. Therefore, the PE that writes data in the payload field is a new data payload field only when the logical product of the bits corresponding to the same PE in the connection flag field and the status flag field is all "0". Write to.
図3及び図4を用いて、PE間でのデータの入出力のための動作を具体的に説明する。図3は、説明に用いるPE間でのデータ入出力関係を示す図である。図3によると、PE10が出力するデータは、待合せ部5のレジスタ51に書き込まれてPE11及び21の入力となり、PE20が出力するデータは、待合せ部5のレジスタ52に書き込まれてPE11及び31の入力となり、PE30が出力するデータは、待合せ部5のレジスタ53に書き込まれてPE21及び31の入力となっている。
The operation for inputting / outputting data between PEs will be specifically described with reference to FIGS. 3 and 4. FIG. 3 is a diagram showing a data input / output relationship between PEs used for explanation. According to FIG. 3, the data output from the
図4は、図3の入出力関係での待合せ部5の接続フラグフィールドと、状態フラグフィールドの遷移を説明する図である。図3に示すように、図4のレジスタ51には、PE10が書き込みを行い、レジスタ52には、PE20が書き込みを行い、レジスタ53には、PE30が書き込みを行う。また、各レジスタの左側3ビットは接続フラグフィールドであり、右側3ビットは状態フラグフィールドであり、接続フラグフィールド及び状態フラグフィールドの第1ビットはPE11に対応し、第2ビットはPE21に対応し、第3ビットはPE31に対応している。
FIG. 4 is a diagram for explaining the transition of the connection flag field and the status flag field of the
図4(a)〜(d)の総てにおいて、レジスタ51の接続フラグフィールドの第1、2、3ビットは、それぞれ、“1”、“1”、“0”であり、これは、PE10が出力するデータが、PE11及び21の入力となることに対応している。同様に、レジスタ52の接続フラグフィールドの第1、2、3ビットは、それぞれ、“1”、“0”、“1”であり、これは、PE20が出力するデータが、PE11及び31の入力となることに対応し、レジスタ53の接続フラグフィールドの第1、2、3ビットは、それぞれ、“0”、“1”、“1”であり、これは、PE30が出力するデータが、PE21及び31の入力となることに対応している。
4A to 4D, the first, second, and third bits of the connection flag field of the
まず、PE10、20及び30のそれぞれが出力データを、待合せ部5の対応するレジスタに書き込んだものとする。図4(a)は、そのときの、各レジスタの状態を示し、総ての状態フラグフィールドの、総てのビットは、“1”に設定されている。
First, it is assumed that each of the
PE11、21及び31のそれぞれが、どのレジスタからデータを読み出すかは、プログラムにより決定される。つまり、PE11はレジスタ51及び52からデータを読出し、PE21はレジスタ51及び53からデータを読出し、PE31はレジスタ52及び53からデータを読出すことはプログラムにより決定され、例えばPE11は、レジスタ53には一切アクセスしないが、これとは異なり接続フラグフィールドの値によりPE自身が認識する構成とすることも可能である。
From which register each of the
図4(b)は、PE11がレジスタ51及び52からデータを読出し、PE21がレジスタ51及び53からデータを読出したときの各レジスタの状態を示している。図4(b)に示す様に、PE11がレジスタ51及び52からデータを読み出すことで、レジスタ51及び52の状態フラグフィールドのPE11に対応する第1ビットが“0”に変更され、PE21がレジスタ51及び53からデータを読み出すことで、レジスタ51及び53の状態フラグフィールドのPE21に対応する第2ビットが“0”に変更されている。
FIG. 4B shows the state of each register when the
図4(b)に示す状態において、レジスタ51の接続フラグフィールドと状態フラグフィールドの同じビット位置同士の論理積は、全ビット共“0”になり、これは、PE10が出力するデータを入力とするPEの総てが、つまり、PE11及び21がデータを読み出したことを意味し、従って、PE10は、レジスタ51に新しいデータの書き込みを行うことができる。
In the state shown in FIG. 4B, the logical product of the same bit positions of the connection flag field and the state flag field of the
一方、レジスタ52及び53の接続フラグフィールドと状態フラグフィールドの同じビット位置同士の論理積は、全ビット共“0”ではなく、これは、PE20とPE30が出力するデータを入力とするプロセッサエレメントの総てが、未だデータの読出しを行っていないことを意味し、従って、PE20、30は、新しいデータをレジスタ52、53に書き込むことはできない。
On the other hand, the logical product of the same bit positions in the connection flag field and the status flag field of the
図4(c)は、PE10がレジスタ51に新しいデータを書き込み、かつ、PE31がレジスタ52及び53からデータを読出したときの各レジスタの状態を示している。図4(c)に示す様に、PE10がレジスタ51にデータを書き込んだことで、レジスタ51の状態フラグフィールドは総て“1”となり、PE31がレジスタ52及び53からデータを読み出すことで、レジスタ52及び53の状態フラグフィールドのPE31に対応する第3ビットが“0”に変更されている。
FIG. 4C shows the state of each register when the
図4(c)の状態において、レジスタ52及び53の接続フラグフィールドと状態フラグフィールドの同じビット位置同士の論理積は、全ビット共“0”になり、従って、PE20及び30は、レジスタ52、53に新しいデータの書き込みを行うことができる。また、PE11は、レジスタ51、52の対応するビットである第1ビットが、それぞれ、“1”、“0”であるため、レジスタ51には既にデータは設定されているが、レジスタ52には未だデータが設定されていないこと、つまり、処理に必要なデータが揃っていないことを認識し、よって、データの読出しを行うことができないことを認識する。
In the state of FIG. 4C, the logical product of the same bit positions of the connection flag field and the status flag field of the
図4(d)は、PE20及び30がレジスタ52、53に新しいデータを書き込んだときの各レジスタの状態を示している。図4(d)に示す様に、PE20と30が、それぞれ、レジスタ52と53にデータを書き込んだことで、レジスタ52及び53の状態フラグフィールドは総て“1”となっている。
FIG. 4D shows the state of each register when the
図4(d)の状態において、レジスタ51〜53の接続フラグフィールドと状態フラグフィールドの同じビット位置同士の論理積は、全ビット共“0”とならないため、PE10、20及び30は新たなデータの書き込みを行うことはできない。また、PE11、21、31のデータの読出しについては、読出しを行う各レジスタの状態フラグフィールドの、自身に対応するビットが総て“1”であるため、PE11、21及び31はデータ読出しが可能であることを認識する。
In the state of FIG. 4D, since the logical product of the same bit positions of the connection flag field and the status flag field of the
図5は、待合せ部5の各レジスタの状態遷移図である。図5において、無効状態は、接続フラグフィールドと状態フラグフィールドの同じPEに対応するビット位置同士の論理積が総て“0”である場合であり、上流のPE、即ち、レジスタに書き込み行うPEは、無効状態のときにのみ新たなデータをペイロードフィールドに書き込むことができ、書き込むことで、有効状態に遷移する。有効状態である間は、上流にあるPEは新たなデータをペイロードフィールドに書き込むことはできない。
FIG. 5 is a state transition diagram of each register of the waiting
有効状態である場合において、下流にあるPE、即ち、レジスタから読み出しを行うPEがデータを読み出す度に、状態フラグフィールドの対応するビット位置が“0”に変更され、接続フラグフィールドと状態フラグフィールドの同じPEに対応するビット位置同士の論理積が総て“0”となった場合は、即ち、データを入力として使用する総ての下流にあるPEがデータの読出しを行ったときに無効状態に遷移する。 When it is in the valid state, every time the PE that is downstream, that is, the PE that reads from the register, reads the data, the corresponding bit position of the status flag field is changed to “0”, and the connection flag field and the status flag field When the logical product of the bit positions corresponding to the same PE of all becomes “0”, that is, when all the downstream PEs that use data as input read out the data. Transition to.
以上、装置全体の同期制御や、入力データの同期を意識したプログラミングを行うことなく、データを入出力するPE間での局所的な制御という簡易な構成で、各PEへの入力データの同期を実現できる。 As described above, synchronization of input data to each PE can be achieved with a simple configuration of local control between PEs that input and output data without performing synchronization control of the entire device or programming that is conscious of synchronization of input data. realizable.
上述した待合せ部5では、接続フラグフィールドを設けてデータの読出しを行うPEを示し、データを書き込んだ場合には状態フラグフィールドに総て“1”を設定していたが、接続フラグフィールドを設けず、データを書き込んだ場合には状態フラグフィールドのデータの読み出しを行うPEに対応するビットのみに“1”を設定する構成でも良い。いずれの構成にしても、接続フラグフィールド及び/又は状態フラグフィールドの各ビットによりデータの読出しを行うPEの読出し状態を管理することで、1つのレジスタのデータを複数のPEへの入力データとして分岐させることができる。
In the
また、PEが出力するデータを、2つ以上のPEの入力としない場合、即ち、PEが1行の構成では、接続フラグフィールドは必要なく、状態フラグフィールドは1ビットのみ設ければよい。 In addition, when the data output by the PE is not input to two or more PEs, that is, in the configuration of one PE, the connection flag field is not necessary, and only one bit of the status flag field may be provided.
また、図3に示す構成において、例えば、PE10が、あるサイクルにてデータを書き込んだ場合、次のサイクルでは、PE11及び21がデータを読み出すことは可能であるが、PE10がデータを書き込むことはできず、従って、PE10は、最短でも2サイクルに1度の割合でしかデータを書き込むことはできない。このため、各PEの各入力部分にFIFOバッファを配置する。
In the configuration shown in FIG. 3, for example, when the
図6は、FIFOバッファを配置した構成図であり、図3のうち、PE10、11及び21に関する部分のみを表示している。
FIG. 6 is a configuration diagram in which a FIFO buffer is arranged, and only the portions related to
図6によると、PE11は、FIFOバッファ110から入力データを取得し、PE21は、FIFOバッファ210から入力データを取得する。FIFOバッファ110及びFIFOバッファ210は、1つ以上のデータを保持することが可能であり、データ出力が可能な場合には、それぞれ、出力可能フラグ111、211を有効に設定する。PE11及び21は、演算に必要な入力に対応する総てのFIFOバッファの出力可能フラグが有効に設定されている場合に、FIFOバッファからデータを読み出して演算を開始する。
According to FIG. 6, the
PE10がレジスタ51にデータを書き込むと、書き込まれたデータは、同時にFIFOバッファ110及び210へ出力されるように構成されている。尚、レジスタ51の接続フラグフィールド及び/又は状態フラグフィールドは、既に説明したのと同様の構成であり、FIFOバッファにデータ出力することで、状態フラグフィールドの対応するビットは“0”に変更される。
When the
FIFOバッファ110及び210は、それぞれ、保持している値がその容量に達し、新たな入力が不可となった場合それぞれFULLフラグ111、211を有効に設定し、それ以外の場合、即ち新たな入力が可能な場合にはFULLフラグ111、211を無効に設定する。
The FIFO buffers 110 and 210 respectively set the
PE10は、PE10が出力するデータを入力とする総てのFIFOバッファのFULLフラグが無効である場合にのみデータをレジスタ51に書き込む。
The
以上、PE11、21の入力にFIFOバッファ111、211を設けることで、上流に位置するPE10が、待合せ部5にデータを書き込むサイクルの低減が可能となる。
As described above, by providing the FIFO buffers 111 and 211 at the inputs of the
続いて、図7を用いて、本発明による演算装置の他の実施形態を説明する。図7によると、パイプラインの各ステージを構成する命令フェッチ部81と、命令デコード部82と、命令実行部83と、ライトバック部84との間に待合せ部4が挿入されている。尚、4ステージのパイプライン構成を用いて説明するがステージ数は例示で有り、本発明は、任意のステージ数のパイプラインに適用可能である。
Next, another embodiment of the arithmetic device according to the present invention will be described with reference to FIG. According to FIG. 7, the queuing
パイプライン構成は、図1に示す演算装置で行数が1の場合と同等であるため、本実施形態の待合せ部4は、図2に示す待合せ部5の接続フラグフィールドを省略し、かつ、状態フラグフィールドを1ビットとしたもので良い。以後、状態フラグフィールドに値“1”が設定されている状態を有効状態と、値“0”が設定されている状態を無効状態と呼ぶ。
Since the pipeline configuration is equivalent to the case where the number of rows is 1 in the arithmetic unit shown in FIG. 1, the queuing
パイプラインを構成する各機能ブロックは、処理結果、例えば、命令フェッチ部81であればフェッチした命令を、命令デコード部82であればデコードした命令を、命令実行部83であれば実行結果データを、下流にある待合せ部4のペイロードフィールドに書き込み、書き込みにより待合せ部4の状態フラグフィールドは有効状態に設定される。また、各機能ブロックは、上流のステージでの処理が終了したことを、上流にある待合せ部4の状態フラグフィールドが有効状態であることにより認識し、有効状態である場合にのみ待合せ部4のペイロードフィールドから命令又はデータを読み込んで処理を開始する。また、待合せ部4の状態フラグフィールドは、対応するペイロードフィールドから命令又はデータが読み出されることで無効状態に設定される。パイプラインを構成する各機能ブロックは、下流にある待合せ部4の状態フラグフィールドが無効状態である場合にのみ、ペイロードフィールドへのデータ又は命令の書き込みを行うことをできる。
Each functional block constituting the pipeline receives the processing result, for example, the fetched instruction for the instruction fetch
例えば、図7に示す演算装置において、
add R0、#1、R1
を実行することを考える。ここで、addは符号無し加算命令であり、上記演算は、レジスタR0に格納されている値と、即値“1”を加算して、結果をレジスタR1に格納することを示している。
For example, in the arithmetic unit shown in FIG.
add R0, # 1, R1
Think about performing. Here, add is an unsigned addition instruction, and the above operation indicates that the value stored in the register R0 and the immediate value “1” are added and the result is stored in the register R1.
まず、命令フェッチ部81は、下流にある待合わせ部4が無効状態である場合に、図示しない命令メモリから命令をフェッチし、フェッチした命令を待合わせ部4のペイロードフィールドに書き込む。書き込みにより待合せ部4の状態フラグフィールドは有効状態に設定されるが、有効状態に設定するのは、命令フェッチ部81であっても、待合せ部4自身であっても良い。
First, the instruction fetch
デコード部82は、上流にある待合わせ部4の状態フラグフィールドが有効状態となったため、ペイロードフィールドにある命令のデコードを行う。これにより上流にある待合わせ部4の状態フラグフィールドは無効状態に設定されるが、無効状態に設定するのは、デコード部82であっても、待合せ部4自身であっても良い。また、デコード部82は、下流にある待合わせ部4が無効状態である場合、デコード結果を待合わせ部4のペイロードフィールドに書き込む。有効状態である場合は、無効状態になるまで待機して、無効状態になった後にデコード結果を書き込む。書き込みにより、待合せ部4の状態フラグフィールドは有効状態になる。ここで、本例においてデコード結果とは、命令実行部83に加算を行わせるためのマイクロコードと、レジスタR0が保持する値と、即値である“1”と、演算結果を格納するレジスタR1を指定する値である。
The
命令実行部83は、上流にある待合わせ部4の状態フラグフィールドが有効状態となったため、上流にある待合せ部4のペイロードフィールドに格納されたマイクロコードに基づき、自身を加算動作に設定する。続いて、上流にある待合せ部4のペイロードフィールドに格納された値の加算を行う。最後に、命令実行部83は、下流にある待合わせ部4が無効状態である場合に、加算の結果と、上流にある待合せ部4のペイロードフィールドに格納されたレジスタR1を指定する値とを、下流にある待合わせ部4のペイロードフィールドに書き込む。命令実行部83からの書き込みにより、待合せ部4の状態フラグフィールドは有効状態になる。
The
ライトバック部84は、上流にある待合わせ部4の状態フラグフィールドが有効状態となったため、上流にある待合せ部4のペイロードフィールドに格納された加算結果の値を、同じくペイロードフィールドで指定されているレジスタR1に格納する。
Since the status flag field of the
以上の構成によりパイプライン制御ユニットが必要なくなり、また、各機能ブロック間のストールの制御は局所的に独立して実行されるため、パイプラインの段数を増減させたとしても局所的な設計変更で対処できるという利点がある。 The above configuration eliminates the need for a pipeline control unit, and stall control between each functional block is performed locally independently, so even if the number of pipeline stages is increased or decreased, local design changes are possible. There is an advantage that it can cope.
尚、以上の説明における待合せ部4又は5の、接続フラグフィールド及び状態フラグフィールドに書き込まれる値、即ち“1”又は“0”は例示であり説明で使用した値に限定されるものではない。
Note that the values written in the connection flag field and the status flag field of the
10、20、30、11、21、31、71、72、73 プロセッサエレメント
4、5 待合せ部
9 パイプライン制御部
51、52、53、5n レジスタ
61、62 入力
81 命令フェッチ部
82 命令デコード部
83 命令実行部
84 ライトバック部
110、210 FIFOバッファ
111、211 出力可能フラグ
112、212 FULLフラグ
10, 20, 30, 11, 21, 31, 71, 72, 73
Claims (5)
待合せ手段は、第1のプロセッサエレメントそれぞれが出力するデータを保持するペイロードフィールドと、ペイロードフィールドに対応し、対応するペイロードフィールドの有効状態又は無効状態を示すフラグフィールドを有し、
フラグフィールドは、第1のプロセッサエレメントが、対応するペイロードフィールドにデータを書き込んだときに有効状態となり、該データを入力とする総ての第2のプロセッサエレメントが、ペイロードフィールドよりデータを読み出したときに無効状態となること、
を特徴とする演算装置。 An arithmetic device having one or more first processor elements, one or more second processor elements, and a waiting means,
The queuing means has a payload field that holds data output by each of the first processor elements, and a flag field that corresponds to the payload field and indicates a valid state or invalid state of the corresponding payload field,
The flag field becomes valid when the first processor element writes data to the corresponding payload field, and all the second processor elements that receive the data read data from the payload field. To become invalid,
An arithmetic unit characterized by the above.
を特徴とする請求項1に記載の演算装置。 The first processor element writes new data to the corresponding payload field only when the flag field is invalid;
The arithmetic unit according to claim 1, wherein:
第2のプロセッサエレメントは、入力とするデータが保持されているペイロードフィールドに対応するフラグフィールドの、自身に対応するフラグの総てが、データを読み出していないことを示している場合にのみ、入力とするデータを読み出すこと、
を特徴とする請求項2に記載の演算装置。 The flag field corresponds to the second processor element, and includes a flag indicating whether or not the corresponding second processor element has read the data in the payload field.
The second processor element inputs only when all the flags corresponding to itself in the flag field corresponding to the payload field holding the input data indicate that the data is not read out. To read the data
The arithmetic unit according to claim 2, wherein:
FIFOバッファは、保持しているデータがその容量に達したときにはフルフラグを有効に、それ以外の場合は無効に設定し、
第1のプロセッサエレメントは、出力するデータを入力とする総てのFIFOバッファがフルフラグを無効に設定している場合にのみ、新たなデータをペイロードフィールドに書き込むこと、
を特徴とする請求項1に記載の演算装置。 Each input of the second processor element is provided with a FIFO buffer that holds one or more data, and the newly written data in the payload field is all the second processors that receive the data at the same time. Output to the FIFO buffer of the element,
The FIFO buffer enables the full flag when the stored data reaches its capacity, and disables it otherwise.
The first processor element writes new data to the payload field only when all FIFO buffers that receive output data have the full flag disabled.
The arithmetic unit according to claim 1, wherein:
前記待合せ手段は、各ステージの出力である命令又はデータを保持するペイロードフィールドと、ペイロードフィールドの有効状態又は無効状態を示すフラグフィールドを有し、フラグフィールドは、ペイロードフィールドに命令又はデータが書き込まれたときに有効状態となり、ペイロードフィールドから命令又はデータが読み出されたときに無効状態となり、
各ステージは、フラグフィールドが無効状態のときにのみ下流にある待合せ手段のペイロードフィールドに命令又はデータを書き込み、フラグフィールドが有効状態のときにのみ上流にある待合せ手段のペイロードフィールドから命令又はデータを読み出すこと、
を特徴とする演算装置。
An arithmetic unit having a waiting means between each stage constituting a pipeline,
The queuing means has a payload field that holds an instruction or data that is an output of each stage, and a flag field that indicates a valid state or invalid state of the payload field, and the instruction or data is written to the payload field in the flag field. Becomes invalid when an instruction or data is read from the payload field,
Each stage writes an instruction or data into the payload field of the queuing means downstream only when the flag field is in an invalid state, and writes an instruction or data from the payload field of the queuing means upstream only when the flag field is valid. Reading,
An arithmetic unit characterized by the above.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005359815A JP2007164472A (en) | 2005-12-14 | 2005-12-14 | Arithmetic device with queuing mechanism |
PCT/JP2006/323920 WO2007069464A1 (en) | 2005-12-14 | 2006-11-30 | Arithmetic unit with waiting mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005359815A JP2007164472A (en) | 2005-12-14 | 2005-12-14 | Arithmetic device with queuing mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007164472A true JP2007164472A (en) | 2007-06-28 |
Family
ID=38162775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005359815A Withdrawn JP2007164472A (en) | 2005-12-14 | 2005-12-14 | Arithmetic device with queuing mechanism |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2007164472A (en) |
WO (1) | WO2007069464A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0281254A (en) * | 1988-09-19 | 1990-03-22 | Hitachi Ltd | Multi-processor controller |
JP3308770B2 (en) * | 1994-07-22 | 2002-07-29 | 三菱電機株式会社 | Information processing apparatus and calculation method in information processing apparatus |
JP3674515B2 (en) * | 2000-02-25 | 2005-07-20 | 日本電気株式会社 | Array type processor |
JP2001306532A (en) * | 2000-04-19 | 2001-11-02 | Internatl Business Mach Corp <Ibm> | Data processor and multiprocessor system |
CA2503620A1 (en) * | 2002-10-31 | 2004-05-21 | Lockheed Martin Corporation | Programmable circuit and related computing machine and method |
-
2005
- 2005-12-14 JP JP2005359815A patent/JP2007164472A/en not_active Withdrawn
-
2006
- 2006-11-30 WO PCT/JP2006/323920 patent/WO2007069464A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2007069464A1 (en) | 2007-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8601239B2 (en) | Extended register addressing using prefix instruction | |
JP5382735B2 (en) | Thread scheduling in processors | |
WO2007140428A2 (en) | Multi-threaded processor with deferred thread output control | |
JP2007164472A (en) | Arithmetic device with queuing mechanism | |
KR100636596B1 (en) | Parallel Data Path Architecture for High Energy Efficient | |
JP2003005954A (en) | Data processor and method for controlling the same | |
JP2009054032A (en) | Parallel processor | |
JP2001216275A (en) | Image processor and image processing method | |
JPH0651984A (en) | Microprocessor | |
US20060149936A1 (en) | Processor core interface for external hardware modules and methods thereof | |
US20050114626A1 (en) | Very long instruction word architecture | |
JPH07244588A (en) | Data processor | |
JP5311008B2 (en) | Signal processor and semiconductor device | |
JP4151497B2 (en) | Pipeline processing equipment | |
JP2012168888A (en) | Processor | |
JPH1173318A (en) | Microprocessor | |
JP2011065522A (en) | Vector processor, vector processing method, and program | |
JP2002351658A (en) | Arithmetic processor | |
JP5263497B2 (en) | Signal processor and semiconductor device | |
JP2005134987A (en) | Pipeline arithmetic processor | |
JP2020140290A (en) | Central processing unit | |
JP2007156557A (en) | Parallel processor | |
JPH0997180A (en) | Programmable controller | |
JPH03164945A (en) | Data processor | |
JP2007065999A (en) | Encoding system for instruction code and cpu |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20090303 |