JP4413052B2 - Data flow graph processing apparatus and processing apparatus - Google Patents
Data flow graph processing apparatus and processing apparatus Download PDFInfo
- Publication number
- JP4413052B2 JP4413052B2 JP2004086774A JP2004086774A JP4413052B2 JP 4413052 B2 JP4413052 B2 JP 4413052B2 JP 2004086774 A JP2004086774 A JP 2004086774A JP 2004086774 A JP2004086774 A JP 2004086774A JP 4413052 B2 JP4413052 B2 JP 4413052B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- node
- data
- flow graph
- data flow
- 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.)
- Expired - Lifetime
Links
- 238000012545 processing Methods 0.000 title claims description 68
- 230000006870 function Effects 0.000 claims description 35
- 230000003542 behavioural effect Effects 0.000 claims 1
- 238000000034 method Methods 0.000 description 21
- 238000004422 calculation algorithm Methods 0.000 description 15
- 238000004364 calculation method Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 238000013461 design Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 108091023043 Alu Element Proteins 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Description
この発明は、機能の変更が可能なリコンフィギュラブル回路に関し、特にリコンフィギュラブル回路の動作設定に必要なデータフローグラフを処理する技術に関する。 The present invention relates to a reconfigurable circuit whose function can be changed, and more particularly to a technique for processing a data flow graph necessary for setting the operation of the reconfigurable circuit.
近年、アプリケーションに応じてハードウェアの動作を変更可能なリコンフィギュラブルプロセッサの開発が進められている。リコンフィギュラブルプロセッサを実現するためのアーキテクチャとしては、DSP(Digital Signal Processor)や、FPGA(Field Programmable Gate Array)を用いる方法が存在する。 In recent years, development of reconfigurable processors capable of changing hardware operations in accordance with applications has been underway. As an architecture for realizing a reconfigurable processor, there are methods using a DSP (Digital Signal Processor) and an FPGA (Field Programmable Gate Array).
FPGA(Field Programmable Gate Array)はLSI製造後に回路データを書き込んで比較的自由に回路構成を設計することが可能であり、専用ハードウエアの設計に利用されている。FPGAは、論理回路の真理値表を格納するためのルックアップテーブル(LUT)と出力用のフリップフロップからなる基本セルと、その基本セル間を結ぶプログラマブルな配線リソースとを含む。FPGAでは、LUTに格納するデータと配線データを書き込むことで目的とする論理演算を実現できる。しかし、FPGAでLSIを設計した場合、ASIC(Application Specific IC)による設計と比べると、実装面積が非常に大きくなり、コスト高になる。そこで、FPGAを動的に再構成することで、回路構成の再利用を図る方法が提案されている(例えば、特許文献1参照。)。
例えば衛星放送では、季節などにより、放送モードを切り替えて画質の調整などを行うこともある。受信機では、放送モードごとに複数の回路を予めハードウェア上に作り込んでおき、放送モードに合わせて選択器で回路を切り替えて受信している。したがって、受信機の他の放送モード用の回路はその間、遊んでいることになる。モード切り替えのように、複数の専用回路を切り替えて使用し、その切り替え間隔が比較的長い場合、複数の専用回路を作り込む代わりに、切り替え時にLSIを瞬時に再構成することにすれば、回路構造をシンプルにして汎用性を高め、同時に実装コストを抑えることができる。このようなニーズに応えるべく、動的に再構成可能なLSIに製造業界の関心が集まっている。特に、携帯電話やPDA(Personal Data Assistance)などのモバイル端末に搭載されるLSIは小型化が必須であり、LSIを動的に再構成し、用途に合わせて適宜機能を切り替えることができれば、LSIの実装面積を抑えることができる。 For example, in satellite broadcasting, image quality may be adjusted by switching broadcast modes depending on the season. In the receiver, a plurality of circuits are built in hardware for each broadcast mode in advance, and the circuit is switched by a selector according to the broadcast mode for reception. Therefore, the other broadcast mode circuits of the receiver are idle during that time. When switching and using multiple dedicated circuits, such as mode switching, and the switching interval is relatively long, instead of creating multiple dedicated circuits, the LSI can be reconfigured instantaneously at the time of switching. The structure can be simplified to improve versatility, and at the same time the mounting cost can be reduced. In order to meet such needs, the manufacturing industry has attracted attention to dynamically reconfigurable LSIs. In particular, LSIs mounted on mobile terminals such as mobile phones and PDAs (Personal Data Assistance) must be downsized, and if LSIs can be dynamically reconfigured and functions can be switched appropriately according to the application, Mounting area can be reduced.
FPGAは回路構成の設計自由度が高く、汎用的である反面、全ての基本セル間の接続を可能とするため、多数のスイッチとスイッチのON/OFFを制御するための制御回路を含む必要があり、必然的に制御回路の実装面積が大きくなる。また、基本セル間の接続に複雑な配線パターンをとるため、配線が長くなる傾向があり、さらに1本の配線に多くのスイッチが接続される構造のため、遅延が大きくなる。そのため、FPGAによるLSIは、試作や実験のために利用されるにとどまることが多く、実装効率、性能、コストなどを考えると、量産には適していない。さらに、FPGAでは、多数のLUT方式の基本セルに構成情報を送る必要があるため、回路のコンフィグレーションにはかなりの時間がかかる。そのため、瞬時に回路構成の切り替えが必要な用途にはFPGAは適していない。 The FPGA has a high degree of design freedom in circuit configuration and is general-purpose. On the other hand, to enable connection between all the basic cells, it is necessary to include a control circuit for controlling ON / OFF of the switches. This inevitably increases the mounting area of the control circuit. Further, since a complicated wiring pattern is used for the connection between the basic cells, the wiring tends to be long, and the delay increases because of the structure in which many switches are connected to one wiring. For this reason, FPGA based LSIs are often used only for trial manufacture and experiments, and are not suitable for mass production in view of mounting efficiency, performance, cost, and the like. Furthermore, in the FPGA, it is necessary to send configuration information to a large number of basic cells of the LUT method, so that it takes a considerable time to configure the circuit. For this reason, the FPGA is not suitable for applications that require instantaneous switching of the circuit configuration.
それらの課題を解決するため、近年、ALU(Arithmetic Logic Unit)と呼ばれる基本演算機能を複数持つ多機能素子を多段に並べたALUアレイの検討が行われるようになった。ALUアレイでは、処理が上段から下段の一方向に流れるので、水平方向のALUを結ぶ配線は基本的には不要である。そのため、FPGAと比較して回路規模を小さくすることが可能となる。 In order to solve these problems, in recent years, an ALU array called ALU (Arithmetic Logic Unit) in which multi-functional elements having a plurality of basic arithmetic functions are arranged in multiple stages has been studied. In the ALU array, processing flows in one direction from the upper stage to the lower stage, so that wiring that connects the ALUs in the horizontal direction is basically unnecessary. Therefore, the circuit scale can be reduced as compared with the FPGA.
ALUアレイでは、コマンドデータによりALU回路の演算機能構成と前後段のALUを接続する接続部の配線が制御され、所期の演算処理を実行することができる。コマンドデータは、一般にC言語等の高級プログラム言語で記述されたソースプログラムからデータフローグラフ(DFG:Data Flow Graph)を作成し、その情報をもとに作成される。 In the ALU array, the arithmetic function configuration of the ALU circuit and the wiring of the connection part connecting the preceding and succeeding ALUs are controlled by command data, and the intended arithmetic processing can be executed. The command data is generally created based on the data flow graph (DFG: Data Flow Graph) created from a source program written in a high-level program language such as C language.
ALUは、加算演算やシフト演算などの演算機能をそれぞれ実行する複数の基本演算素子を備えて構成される。ALUが基本演算素子を多く持つことは、それだけALUアレイの演算能力を高め、演算処理の汎用性を高めることができる。一方で、ALUの基本演算素子の数を増やすことは、それだけALUの回路規模が大きくなるという欠点もある。 The ALU includes a plurality of basic arithmetic elements that respectively perform arithmetic functions such as addition operation and shift operation. An ALU having many basic arithmetic elements can increase the arithmetic performance of the ALU array and increase the versatility of arithmetic processing. On the other hand, increasing the number of basic arithmetic elements of the ALU has a drawback that the circuit scale of the ALU increases accordingly.
例えば、乗算演算機能を実行する基本演算素子をALUに作りこんだ場合、その基本演算素子の回路規模が大きくなるため、ALUアレイ全体の回路規模が増大する。一方、乗算演算素子を有しないALUアレイで乗算演算を実行する場合、加算演算やシフト演算などを組み合わせたDFGを作成して、ALUアレイにマッピングすることになる。この場合、DFGが非常に大きくなり、乗算処理に時間がかかり、処理の高速性が損なわれるとともに、ALUアレイの消費電力が増加する。 For example, when a basic arithmetic element that executes a multiplication operation function is built in an ALU, the circuit scale of the basic arithmetic element increases, and the circuit scale of the entire ALU array increases. On the other hand, when a multiplication operation is executed with an ALU array that does not have a multiplication operation element, a DFG combining an addition operation, a shift operation, and the like is created and mapped to the ALU array. In this case, the DFG becomes very large, the multiplication process takes time, the high-speed processing is impaired, and the power consumption of the ALU array increases.
本発明はこうした状況に鑑みてなされたもので、その目的は、効率よくデータフローグラフを作成し、また効率よくデータフローグラフを実行するリコンフィギュラブル回路および処理装置に関する技術を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide a technique relating to a reconfigurable circuit and a processing apparatus that efficiently create a data flow graph and efficiently execute the data flow graph. .
本発明のある態様は、それぞれが複数の演算機能を選択的に実行可能な論理回路の多段配列と、前段の論理回路の出力と後段の論理回路の入力の接続関係を設定する接続部とを備えたリコンフィギュラブル回路に対して供給するデータフローグラフを処理するデータフローグラフ処理装置であって、処理の動作を記述した動作記述をもとに、演算間の実行順序の依存関係を表現するデータフローグラフを生成する手段と、リコンフィギュラブル回路における基本演算で構成されるデータフローの一群を1つのノードに置換する手段と、置換するデータフローの一群に含まれるノードと同一段に位置するノードに演算が割り当てられていない場合に、同一段に位置するノードを削除する手段と、を備えることを特徴とする。
An aspect of the present invention includes a multi-stage arrangement of logic circuits each capable of selectively executing a plurality of arithmetic functions, and a connection unit that sets a connection relationship between an output of a preceding logic circuit and an input of a succeeding logic circuit. A data flow graph processing apparatus for processing a data flow graph supplied to a reconfigurable circuit provided, and expressing a dependency of execution order between operations on the basis of an operation description describing the operation of the processing A means for generating a data flow graph, a means for replacing a group of data flows composed of basic operations in a reconfigurable circuit with one node, and a node included in the group of data flows to be replaced are located at the same stage Means for deleting a node located in the same stage when no operation is assigned to the node to be operated.
本発明の別の態様は、それぞれが複数の演算機能を選択的に実行可能な論理回路の多段配列と、前段の論理回路の出力と後段の論理回路の入力の接続関係を設定する接続部とを備えたリコンフィギュラブル回路と、前記リコンフィギュラブル回路に対して供給するデータフローグラフを処理するデータフローグラフ処理部とを備え、前記データフローグラフ処理部は、処理の動作を記述した動作記述をもとに、演算間の実行順序の依存関係を表現するデータフローグラフを生成する手段と、リコンフィギュラブル回路における基本演算で構成されるデータフローの一群を1つのノードに置換する手段と、置換するデータフローの一群に含まれるノードと同一段に位置するノードに演算が割り当てられていない場合に、同一段に位置するノードを削除する手段と、を備えることを特徴とする。
Another aspect of the present invention includes a multi-stage arrangement of logic circuits each capable of selectively executing a plurality of arithmetic functions, and a connection unit that sets a connection relationship between an output of the preceding logic circuit and an input of the succeeding logic circuit. And a data flow graph processing unit for processing a data flow graph supplied to the reconfigurable circuit, wherein the data flow graph processing unit describes an operation description describing a processing operation Based on the above, means for generating a data flow graph expressing the dependency of execution order between operations, means for replacing a group of data flows composed of basic operations in a reconfigurable circuit with one node, and A node located in the same stage when no operation is assigned to the node located in the same stage as the node included in the group of data flows to be replaced Characterized in that it comprises means for deleting, the.
なお、以上の構成要素の任意の組み合わせ、本発明の表現を方法、装置、システム、コンピュータプログラムとして表現したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above components and the expression of the present invention expressed as a method, apparatus, system, and computer program are also effective as an aspect of the present invention.
本発明によれば、リコンフィギュラブル回路の動作設定に必要なデータフローグラフを効率的に処理する技術を提供することができる。
ADVANTAGE OF THE INVENTION According to this invention, the technique which processes efficiently the data flow graph required for the operation | movement setting of a reconfigurable circuit can be provided.
図1は、実施の形態に係る処理装置10の構成図である。処理装置10は、回路構成を再構成可能とする機能を有する集積回路装置26を備える。集積回路装置26は1チップとして構成され、リコンフィギュラブル回路12、設定部14、制御部18、内部状態保持回路20、出力回路22、第1フィードバック経路24、遅延保持回路27および第2フィードバック経路29を備える。リコンフィギュラブル回路12は設定を変更することにより、機能の変更を可能とする。リコンフィギュラブル回路12は組合せ回路または順序回路等の論理回路として構成される。第1フィードバック経路24および第2フィードバック経路29は、フィードバックパスとして機能し、リコンフィギュラブル回路12の出力を、リコンフィギュラブル回路12の入力に接続する。
FIG. 1 is a configuration diagram of a
リコンフィギュラブル回路12は、それぞれが複数の演算機能を選択的に実行可能な論理回路の多段配列と、前段の論理回路の出力と後段の論理回路の入力の接続関係を設定可能な接続部とを備える。構造的には、複数の論理回路列の間に、論理回路列間の接続用結線を設定する接続部が設けられる。リコンフィギュラブル回路12は、複数段に配列された各論理回路の機能、および論理回路間の接続を任意に設定することで、機能の変更を可能とする。本実施の形態における論理回路は、演算機能のそれぞれを実行する基本演算素子の複数個を所定の規則の下で接続する組合せ用結線を有して構成される。
The
設定部14は、リコンフィギュラブル回路12に所期の回路を構成するための設定データ40を供給する。設定部14は、プログラムカウンタのカウント値に基づいて記憶したデータを出力するコマンドメモリとして構成されてもよい。この場合、制御部18がプログラムカウンタの出力を制御する。この場合、設定データ40はコマンドメモリから出力されるコマンドデータであってよい。
The
内部状態保持回路20は、例えばデータフリップフロップ(DFF)などの順序回路として構成され、リコンフィギュラブル回路12の出力を受け付ける。内部状態保持回路20は第1フィードバック経路24に接続されており、リコンフィギュラブル回路12の出力を直接リコンフィギュラブル回路12の入力にフィードバックさせる。また内部状態保持回路20は、リコンフィギュラブル回路12の出力を遅延保持回路27に供給する。内部状態保持回路20は選択器を有し、選択器は、制御部からの選択指示をもとに、第1フィードバック経路24に送り出すデータ、および遅延保持回路27に供給するデータを選択する。なお、選択器は、同一のデータを第1フィードバック経路24および遅延保持回路27の双方に送り出してもよい。
The internal
遅延保持回路27はメモリであって、リコンフィギュラブル回路12から出力される出力データを格納するための複数のRAMにより構成される。遅延保持回路27は、リコンフィギュラブル回路12の出力データを任意の時間遅延させる機能をもつ。この例では、遅延保持回路27が、内部状態保持回路20から出力されるデータを格納しているが、リコンフィギュラブル回路12から直接出力されるデータを格納してもよい。遅延保持回路27は、制御部18からのW/Rイネーブル信号およびアドレス信号に基づいて、データの書込/読出を行う。遅延保持回路27は第2フィードバック経路29に接続されており、制御部18からの読出指示に基づいて、所期のタイミングでデータをリコンフィギュラブル回路12の入力にフィードバックさせる。なお、設定部14がコマンドメモリとして構成されている場合、コマンドメモリから供給されるコマンドデータで、遅延保持回路27のデータの書込/読出を行ってもよい。
The
出力回路22は、例えばデータフリップフロップ(DFF)などの順序回路として構成され、リコンフィギュラブル回路12から出力されるデータを外部に出力する。この例では、出力回路22が、遅延保持回路27から出力されるデータを受け付けているが、リコンフィギュラブル回路12から直接出力されるデータを受け付けてもよく、また内部状態保持回路20から出力されるデータを受け付けてもよい。
The
処理装置10においては、リコンフィギュラブル回路12の出力をリコンフィギュラブル回路12の入力にフィードバックする経路が、第1フィードバック経路24および第2フィードバック経路29の2系統存在する。第1フィードバック経路24は、遅延保持回路27を介さないために、リコンフィギュラブル回路12の出力データを高速にフィードバック処理することが可能である。一方、第2フィードバック経路29は、制御部18からの指示により所期のタイミングでデータ信号をリコンフィギュラブル回路12に供給することができる。このように、第1フィードバック経路24または第2フィードバック経路29は、リコンフィギュラブル回路12上に再構成する回路に応じて適宜使い分けられる。
In the
リコンフィギュラブル回路12は、機能の変更が可能な論理回路を有して構成される。複数の論理回路は、マトリックス状に配置された構造をとってもよい。各論理回路の機能と、論理回路間の接続関係は、設定部14により供給される設定データ40に基づいて設定される。また、論理回路内において、基本演算素子同士を接続する組合せ用結線も、設定データ40に基づいて設定される。設定データ40は、以下の手順で生成される。
The
集積回路装置26により実現されるべきプログラム36が、記憶部34に保持されている。プログラム36は、回路における処理の動作を記述した動作記述を示し、信号処理回路または信号処理アルゴリズムなどをC言語などの高級言語で記述したものである。コンパイル部30は、記憶部34に格納されたプログラム36をコンパイルし、データフローグラフ(DFG)38に変換して記憶部34に格納する。データフローグラフ38は、回路における演算間の実行順序の依存関係を表現し、入力変数および定数の演算の流れをグラフ構造で示したものである。一般に、データフローグラフ38は、上から下に向かって演算が進むように作成される。
A
本実施の形態では、論理回路が複数の基本演算素子を有して、それぞれの演算機能を実行する。一般的に用いる演算としては、加算演算や減算演算など様々なものをあげることができるが、そのうちの一つに乗算演算がある。リコンフィギュラブル回路12の汎用性という観点からは、各論理回路が乗算を実行する基本演算素子を備えることが好ましいが、実際には乗算用の演算素子は、他の加算演算などの演算素子と比較すると、回路規模が非常に大きい。そのため、論理回路は、乗算用の基本演算素子を持たずに構成され、データフローグラフ38中の乗算演算は、筆算アルゴリズムやBoothアルゴリズムなどを用いて加算やビットシフトなどで演算できる形態に展開する必要がある。乗算演算の展開は、コンパイル部30により実行される。
In the present embodiment, the logic circuit has a plurality of basic arithmetic elements and executes respective arithmetic functions. As operations that are generally used, various operations such as addition operations and subtraction operations can be given, and one of them is a multiplication operation. From the viewpoint of versatility of the
データフローグラフ処理部31は、コンパイル部30により生成されたデータフローグラフ38から、所定の規則を有するデータフローの一群を探索する。このデータフローの一群は、演算ノード間に所定の接続関係を有するノードの集合であって、予め記憶部34において登録されている。データフローグラフ処理部31は、所定のデータフローの一群を探索して、その一群を構成するノード数よりも少ない数のノードに置換する。このとき、ノード数を減らす観点から、1つのノードに置換することが好ましい。
The data flow
なお、データフローの一群から置換されたノードは、リコンフィギュラブル回路12の論理回路で処理可能なノードである必要がある。これに対応して、論理回路は、置換されたノードを処理するために、自身のもつ複数の基本演算素子を所定の順序で組み合わせるための組合せ用結線を有して構成される。これにより、論理回路は基本演算素子の数を増やすことなく、組合せ用結線をもつことで、複数の基本演算素子により実行される新たな演算機能をもつことができる。言い換えると、論理回路における複数の基本演算素子の可能な組合せに応じて、所定の規則を有するデータフローの一群を予め登録し、データフローグラフ処理部31が、1つの論理回路において実行可能なデータフローの一群を探索して、1つのノードに置換するすることが可能となる。
Note that the node replaced from the group of data flows needs to be a node that can be processed by the logic circuit of the
設定データ生成部32は、データフローグラフ38から設定データ40を生成する。設定データ40は、データフローグラフ38をリコンフィギュラブル回路12にマッピングするためのデータであり、リコンフィギュラブル回路12における論理回路の機能や論理回路間の接続関係を定める。設定データ生成部32が、1つの生成すべき回路を分割してできる複数の回路の設定データ40を生成してもよい。
The setting
図2は、1つの生成すべきターゲット回路42を分割してできる複数の回路の設定データ40について説明するための図である。1つのターゲット回路42を分割して生成される回路を、「分割回路」と呼ぶ。この例では、1つのターゲット回路42が、4つの分割回路、すなわち分割回路A、分割回路B、分割回路C、分割回路Dに分割されている。ターゲット回路42は、データフローグラフ38における演算の流れにしたがって分割される。データフローグラフ38において、上から下に向かう方向に演算の流れが表現される場合、そのデータフローグラフ38を上から所定の間隔で切り取り、その切り取った部分を分割回路として設定する。流れにしたがって切り取る間隔は、リコンフィギュラブル回路12における論理回路の段数以下に定められる。ターゲット回路42は、データフローグラフ38の横方向で分割されてもよい。横方向に分割する幅は、リコンフィギュラブル回路12における論理回路の1段当たりの個数以下に定められる。
FIG. 2 is a diagram for explaining setting
特に、生成すべきターゲット回路42がリコンフィギュラブル回路12よりも大きい場合に、設定データ生成部32は、リコンフィギュラブル回路12にマッピングできる大きさになるように、ターゲット回路42を分割することが好ましい。リコンフィギュラブル回路12へのマッピングは、一度に、例えば1回のクロックで実行することができる。したがって、この場合、4つの分割回路は、4クロックで生成することができる。設定データ生成部32は、リコンフィギュラブル回路12における論理回路の配列構造とデータフローグラフ38によって、ターゲット回路42の分割方法を定める。リコンフィギュラブル回路12の配列構造は、制御部18から設定データ生成部32に伝えられてもよく、また予め記憶部34に記録されていてもよい。また、制御部18が、ターゲット回路42の分割方法を設定データ生成部32に指示してもよい。
In particular, when the
以上の手順を実行することにより、記憶部34は、リコンフィギュラブル回路12を所期の回路として構成するための複数の設定データ40を記憶する。複数の設定データ40は、分割回路Aを構成するための設定データ40a、分割回路Bを構成するための設定データ40b、分割回路Cを構成するための設定データ40c、および分割回路Dを構成するための設定データ40dである。既述のごとく、複数の設定データ40は、1つのターゲット回路42を分割した複数の分割回路をそれぞれ表現したものである。各設定データ40を供給することにより、リコンフィギュラブル回路12上に分割回路を1クロックで構成することができる。このように、リコンフィギュラブル回路12の回路規模に応じて、生成すべきターゲット回路42の設定データ40を生成することにより、汎用性の高い処理装置10を実現することが可能となる。別の視点からみると、実施の形態の処理装置10によれば、回路規模の小さいリコンフィギュラブル回路12を用いて、所望の回路を再構成することが可能となる。
By executing the above procedure, the
図3は、リコンフィギュラブル回路12の一般的な構成を示す。リコンフィギュラブル回路12は、それぞれが複数の演算機能を選択的に実行可能な論理回路の多段配列と、前段の論理回路の出力と後段の論理回路の入力の接続関係を任意に設定可能な接続部52とを備える。リコンフィギュラブル回路12では、論理回路の多段配列構造により、上段から下段に向かって演算が進められる。なお、本明細書および特許請求の範囲において「多段」とは、複数の段を意味する。
FIG. 3 shows a general configuration of the
リコンフィギュラブル回路12は、論理回路としてALU(Arithmetic Logic Unit)を有している。ALUは、複数種類の多ビット演算を選択的に実行可能な算術論理回路であって、論理和、論理積、ビットシフト、加算、減算などの複数種類の多ビット演算を設定により選択的に実行できる。各ALUは、複数の演算機能を設定するためのセレクタを有して構成されている。実施の形態において、ALUは、乗算を実行する機能は有していない。乗算用の演算素子の回路規模が大きいためであり、したがって、乗算演算は、加算やビットシフト、ビット積演算などを組み合わせることで処理されることになる。図示の例では、ALUが、2つの入力端子と1つの出力端子を有して構成される。
The
リコンフィギュラブル回路12は、縦方向にX個、横方向にY個のALUが配置されたX段Y列のALUアレイとして構成される。ここでは、縦方向に3個、横方向に6個のALUが配置された3段6列のALUアレイを示している。リコンフィギュラブル回路12は、接続部52およびALU列53を備える。ALU列53は複数段に設けられ、接続部52は前後段のALU列53の間に設けられて、前段のALUの出力と後段のALUの入力の接続関係を設定する。
The
図3に示す例では、第1段のALU列53aと第2段のALU列53bの間に、第2段を構成する接続部52bが設けられ、第2段のALU列53bと第3段のALU列53cの間に、第3段を構成する接続部52cが設けられる。なお、第1段を構成する接続部52aは、第1段のALU列53aの上側に設けられる。
In the example shown in FIG. 3, a
第1段のALU11、ALU12、・・・、ALU16には、入力変数や定数が入力され、設定された所定の演算がなされる。演算結果の出力は、第2段の接続部52bに設定された接続にしたがって、第2段のALU21、ALU22、・・・、ALU26に入力される。第2段の接続部52bにおいては、第1段のALU列53aの出力と第2段のALU列53bの入力の間で任意の接続関係、あるいは予め定められた接続関係の組合せの中から選択された接続関係を実現できるように接続用結線が構成されており、設定により所期の結線が有効となる。第2段のALU21、ALU22、・・・、ALU26には、ALU列53aの出力が入力され、設定された所定の演算がなされる。演算結果の出力は、第3段の接続部52cの接続用結線において設定された接続にしたがって、第3段のALU31、ALU32、・・・、ALU36に入力される。
Input variables and constants are input to the first-
最終段となる第3段のALU列53cからの出力データは、内部状態保持回路20に出力される。内部状態保持回路20および/または遅延保持回路27は、第1フィードバック経路24および/または第2フィードバック経路29を介して、出力データを接続部52aに入力する。接続部52aは、接続用結線を設定し、第1段のALU11、ALU12、・・・、ALU16にデータを供給する。
Output data from the third-
図4は、データフローグラフ38の構造を説明するための図である。データフローグラフ38においては、入力される変数や定数の演算の流れが段階的にグラフ構造で表現されている。図中、演算子は丸印で示されている。“>>”は右へのビットシフトを示し、“<<”は左へのビットシフトを示し、“+”は加算を示し、“−”は減算を示す。設定データ生成部32は、このデータフローグラフ38をリコンフィギュラブル回路12にマッピングするための設定データ40を生成する。特にデータフローグラフ38をリコンフィギュラブル回路12にマッピングしきれない場合に、データフローグラフ38を複数の領域に分割して、分割回路の設定データ40を生成する。データフローグラフ38による演算の流れを回路上で実現するべく、設定データ40は、演算機能を割り当てる論理回路を特定し、また論理回路間の接続関係を定め、さらに入力変数や入力定数などを定義したデータとなる。したがって、設定データ40は、各論理回路の機能を選択するセレクタに供給する選択情報、接続部52の結線を設定する接続情報、必要な変数データや定数データなどを含んで構成される。
FIG. 4 is a diagram for explaining the structure of the
なお、本実施の形態においては、複数の演算機能を選択的に実行可能な論理回路が、乗算演算を実行するための基本演算素子を有していないため、乗算演算は、コンパイル部30により、論理回路が有する基本演算素子で処理できる加算、ビットシフトなどの演算に展開されて、設定データ40が生成されることになる。
In this embodiment, since the logic circuit that can selectively execute a plurality of arithmetic functions does not have a basic arithmetic element for executing a multiplication operation, the multiplication operation is performed by the compiling
図1に戻って、回路の構成時、制御部18は、1つのターゲット回路42を構成するための複数の設定データ40を記憶部34から選択して読み出す。ここでは制御部18が、図2に示すターゲット回路42を構成するための設定データ40、すなわち分割回路Aの設定データ40a、分割回路Bの設定データ40b、分割回路Cの設定データ40cおよび分割回路Dの設定データ40dを記憶部34から読み出し、設定部14に供給する。設定部14は、各設定データ40を格納する。
Returning to FIG. 1, at the time of circuit configuration, the
設定部14がコマンドメモリとして構成されている場合、制御部18は設定部14に対してプログラムカウンタ値を与え、設定部14は、そのカウンタ値に応じて格納した設定データを、コマンドデータとしてリコンフィギュラブル回路12に設定する。なお、設定部14は、キャッシュメモリや他の種類のメモリを有して構成されてもよい。なお、本例においては、制御部18が記憶部34から設定データ40を受けて、その設定データを設定部14に供給する構成について説明するが、制御部18を介さずに、予め設定部14に設定データを格納しておいてもよい。この場合、制御部18は、設定部14に予め格納された複数の設定データの中からターゲット回路42に応じた設定データがリコンフィギュラブル回路12に供給されるように、設定部14のデータ読出しを制御する。
When the
設定部14は、設定データ40をリコンフィギュラブル回路12に設定し、リコンフィギュラブル回路12に回路を逐次再構成させる。これにより、リコンフィギュラブル回路12は、所期の演算を実行できる。リコンフィギュラブル回路12は、基本セルとして高性能の演算能力のあるALUを用いており、またリコンフィギュラブル回路12および設定部14を1チップ上に構成することから、コンフィグレーションを高速に、例えば1クロックで実現することができる。制御部18はクロック機能を有し、クロック信号は、出力回路22および遅延保持回路27に供給される。また制御部18は4進カウンタを含み、カウント信号を設定部14に供給してもよい。
The setting
<リコンフィギュラブル回路の動作の説明>
以下では、図5から図10を用いて、リコンフィギュラブル回路12による回路構成機能の基本動作の説明を行う。以下に示すリコンフィギュラブル回路12の基本動作を前提として、かかるリコンフィギュラブル回路12の動作設定に必要なデータフローグラフの処理方法を図11以降の図面を用いて説明する。
<Description of operation of reconfigurable circuit>
Hereinafter, the basic operation of the circuit configuration function of the
図5は、前後7点を利用する7タップからなるFIRフィルタ回路を示す。以下、このFIR(Finite Impulse Response)フィルタ回路を、実施の形態における処理装置10で実現する具体例を示す。このFIRフィルタ回路の係数は、図5の例では、対称に設定されている。
FIG. 5 shows a 7-tap FIR filter circuit using front and rear 7 points. Hereinafter, a specific example in which the FIR (Finite Impulse Response) filter circuit is realized by the
図6は、図5で示すFIRフィルタ回路を置き換えた回路を示す。回路の置き換えは、フィルタ係数の対称性を利用している。 FIG. 6 shows a circuit in which the FIR filter circuit shown in FIG. 5 is replaced. The circuit replacement uses the symmetry of the filter coefficient.
図7は、図6で示すFIRフィルタ回路をさらに置き換えた回路を示す。ここでは、フィルタ係数に着目した置き換えを行っている。具体的には、係数1/16を1/2×1/2×1/2×1/2に、2/16を1/2×1/2×1/2に、8/16を1/2に置き換えている。係数1/2の演算はデータを右に1ビットシフトすることで実現できる。1ビットシフタは、複数ビットシフタと比べて、ALU内において非常に小さいスペースで形成することができる。
FIG. 7 shows a circuit in which the FIR filter circuit shown in FIG. 6 is further replaced. Here, the replacement is performed focusing on the filter coefficient. Specifically, the
図8は、図7に示すFIRフィルタ回路をコンパイルして作成したデータフローグラフ38aを示す。図中、“+”は加算を示し、“>>1”は1ビットのシフトを示し、“MOV”はスルー用のパスを示す。図示のごとく、データフローグラフ38aは、7段の演算子で構成される。
FIG. 8 shows a
図9は、リコンフィギュラブル回路12の一例を示す。このリコンフィギュラブル回路12は、2段4列のALUを含んで構成される。
FIG. 9 shows an example of the
図10は、図8に示すデータフローグラフ38aを、図9のリコンフィギュラブル回路12を用いて実現する例を示す。データフローグラフ38aが7段4列で構成され、リコンフィギュラブル回路12が2段で構成されていることから、データフローグラフ38aは、上下方向に4つに分割される。なお、左右方向については、リコンフィギュラブル回路12の列数が、データフローグラフ38aの列数以下であるため、分割する必要はない。なお、ここではリコンフィギュラブル回路12の列数とデータフローグラフ38aの列数とが等しい場合が示されている。分割したデータフローグラフは、リコンフィギュラブル回路12上に1クロックで構成されることが可能である。
FIG. 10 shows an example in which the
まず、設定部14が、データフローグラフ38aの第1段および第2段の内容を、設定データ40aによりリコンフィギュラブル回路12上に構成する。これにより、第1分割回路がリコンフィギュラブル回路12に構成される。続いて、設定部14が、データフローグラフ38aの第3段および第4段の内容を、設定データ40bによりリコンフィギュラブル回路12上に構成する。これにより、第2分割回路がリコンフィギュラブル回路12に構成される。続いて、設定部14が、データフローグラフ38aの第5段および第6段の内容を、設定データ40cによりリコンフィギュラブル回路12上に構成する。これにより、第3分割回路がリコンフィギュラブル回路12に構成される。最後に、設定部14が、データフローグラフ38aの第7段および第8段(MOV)の内容を、設定データ40dによりリコンフィギュラブル回路12上に構成する。これにより、第4分割回路がリコンフィギュラブル回路12に構成される。第1分割回路から第3分割回路における出力結果は、次の分割回路の入力としてフィードバックされる。
First, the setting
この例において、ALUは、“+”、“>>1”、“MOV”の3種類のみで実現することができる。複数ビットのシフトを、1ビットシフタを複数回利用することにより表現することとしたため、必要とされるALUの機能を非常に少なくすることができる。これにより、リコンフィギュラブル回路12の回路規模を小さくできる。なお、当然のことながら、図7に示すデータフローグラフをリコンフィギュラブル回路12上に構成することも可能である。以上が、リコンフィギュラブル回路12の基本動作である。
In this example, the ALU can be realized with only three types of “+”, “>> 1”, and “MOV”. Since the multi-bit shift is expressed by using the 1-bit shifter a plurality of times, the required ALU functions can be greatly reduced. Thereby, the circuit scale of the
<データフローグラフの処理機能の説明>
以下では、乗算演算を実行する場合の実施の形態にかかる処理装置10の処理について説明する。既述したように、本実施の形態の処理装置10では、ALUに乗算用の基本演算素子を持たせるのではなく、乗算演算を、もともとALUに基本演算素子として組み込まれている加算演算やビットシフト演算などのノードに展開することで、乗算演算用のデータフローグラフ(DFG)を実行する。本実施の形態では、複数のノードからなるデータフローの一群を1つのノードに置換することで、DFGの大きさを小さくし、リコンフィギュラブル回路12における演算処理を効率よく実行することが可能となり、回路規模の削減および低消費電力化を実現することが可能となる。
<Description of data flow graph processing function>
Below, the process of the
乗算のアルゴリズムとして代表的なものに、筆算アルゴリズムやBoothアルゴリズムがある。以下では、乗算用のプログラム36が、筆算アルゴリズムで作成されている場合を例にとる。
Typical examples of multiplication algorithms include a writing algorithm and a Booth algorithm. In the following, a case where the
図11は、mビットの被乗数xとnビットの乗数yの筆算アルゴリズムのフローチャートを示す。ここでは、乗数yが正の場合を想定する。この演算処理を実行するために、mビットの被乗数レジスタ、nビットの乗数レジスタ、m+nビットの積レジスタが存在するものとする。演算前に乗数yの符号を判定し、正ならば積レジスタの右nビット分に乗数yを設定し、左mビット分に0を初期値として設定する。乗数yが負ならば絶対値を乗数yとする。 FIG. 11 shows a flowchart of a writing algorithm of an m-bit multiplicand x and an n-bit multiplier y. Here, it is assumed that the multiplier y is positive. In order to execute this arithmetic processing, an m-bit multiplicand register, an n-bit multiplier register, and an m + n-bit product register are present. The sign of the multiplier y is determined before the operation. If it is positive, the multiplier y is set for the right n bits of the product register, and 0 is set as the initial value for the left m bits. If the multiplier y is negative, the absolute value is taken as the multiplier y.
繰返し回数rを初期値0に設定して(S10)、積レジスタのLSB(Least Significant Bit)が1であるかどうかを判定する(S11)。積レジスタのLSBが1の場合(S11のY)、被乗数xを積レジスタの左mビット分に加算して、その加算結果を積レジスタの左mビット分に格納し(S12)、積レジスタを1ビット右にシフトする(S13)。これにより、乗数yのLSBについての乗算処理を実行する。なお、積レジスタのLSBが0の場合(S11のN)、同様に積レジスタを1ビット右にシフトする(S13)。LSBが0の場合は、乗数yのLSBと被乗数との乗算結果が0となるため、単に積レジスタを1ビット右シフトするだけでよい。このとき、積レジスタのMSB(Most Significant Bit)には、1ビット右シフトする前のMSBと同じ数値を入れる。繰返し回数rを1インクリメントし(S14)、rがnに等しくなったかどうかを判定する(S15)。rがnに等しくなるとは、乗数yの全ビットについての筆算を完了した場合である。rがn未満である場合(S15のN)、S11からS14のステップを繰り返し、積レジスタのLSBの乗算処理を逐次実行していく。右に1ビットシフトを行うことは(S13)、乗数yのビットをLSBから順次ずらしながら、下位のビットから逐次乗算を行っていくことに相当する。rがnに等しくなった場合(S15のY)、積レジスタに格納された値が乗算結果となり、本フローを終了する。なお、乗数yが負の場合は、このフローを(n−1)回、つまり(乗数yのビット数−1)回繰り返し、最後に被乗数xの符号反転した値を積レジスタの左mビット分に加算する。この時オーバーフロー分は切り捨てて、積レジスタの左mビット分に格納し、次に積レジスタを1ビット右シフトする。 The number of repetitions r is set to an initial value 0 (S10), and it is determined whether or not the LSB (Least Significant Bit) of the product register is 1 (S11). When the LSB of the product register is 1 (Y in S11), the multiplicand x is added to the left m bits of the product register, and the addition result is stored in the left m bits of the product register (S12). Shift right one bit (S13). As a result, the multiplication process for the LSB of the multiplier y is executed. If the LSB of the product register is 0 (N in S11), the product register is similarly shifted to the right by 1 bit (S13). When the LSB is 0, the multiplication result of the LSB of the multiplier y and the multiplicand is 0, so the product register need only be shifted right by 1 bit. At this time, the MSB (Most Significant Bit) of the product register is set to the same numerical value as the MSB before the right shift by 1 bit. The repeat count r is incremented by 1 (S14), and it is determined whether r is equal to n (S15). The case where r is equal to n is a case where writing for all the bits of the multiplier y is completed. When r is less than n (N in S15), the steps from S11 to S14 are repeated, and the LSB multiplication process of the product register is sequentially executed. Performing a 1-bit shift to the right (S13) is equivalent to sequentially performing multiplication from the lower bits while sequentially shifting the bits of the multiplier y from the LSB. When r becomes equal to n (Y in S15), the value stored in the product register becomes the multiplication result, and this flow ends. If the multiplier y is negative, this flow is repeated (n-1) times, that is, (the number of bits of the multiplier y-1) times, and finally the sign-inverted value of the multiplicand x is obtained for the left m bits of the product register. Add to. At this time, the overflow is rounded down and stored in the left m bits of the product register, and then the product register is shifted right by 1 bit.
図12は、2進数表示した4ビット×4ビットの具体的な処理動作の一例を示す。この処理動作は、図11に示すフローチャートに基づいている。図12では、乗数yが正である場合を示し、被乗数xを1011(10進表示では−5)、乗数yを0111(10進表示では7)とする。初期設定として、積レジスタansに00000111を設定すると、図12に示すように筆算アルゴリズムにより乗算結果を得ることができる。 FIG. 12 shows an example of a specific processing operation of 4 bits × 4 bits expressed in binary. This processing operation is based on the flowchart shown in FIG. FIG. 12 shows a case where the multiplier y is positive. The multiplicand x is 1011 (−5 in decimal display) and the multiplier y is 0111 (7 in decimal display). When 00000111 is set in the product register ans as an initial setting, a multiplication result can be obtained by a writing algorithm as shown in FIG.
図13は、2進数表示した4ビット×4ビットの具体的な処理動作の別の例を示す。この処理動作は、図11に示すフローチャートに基づいている。図13では、乗数yが負である場合を示し、被乗数xを1011(10進表示では−5)、乗数yを1111(10進表示では−1)とする。初期設定として、積レジスタansに00001111を設定すると、図12に示すように筆算アルゴリズムにより乗算結果を得ることができる。なお、乗数yが負であるため、S11〜S13の処理を3回繰り返した後、所定の負符号処理を実行することで、乗算演算が終了する。 FIG. 13 shows another example of a specific processing operation of 4 bits × 4 bits expressed in binary. This processing operation is based on the flowchart shown in FIG. FIG. 13 shows a case where the multiplier y is negative, and the multiplicand x is 1011 (−5 in decimal display) and the multiplier y is 1111 (−1 in decimal display). As an initial setting, when 00001111 is set in the product register ans, a multiplication result can be obtained by a writing algorithm as shown in FIG. Since the multiplier y is negative, the multiplication operation is completed by executing the predetermined negative sign process after repeating the processes of S11 to S13 three times.
図14は、筆算アルゴリズムを用いて被乗数24ビット×乗数4ビットの計算をするDFGを示す。このDFGは、ALUに含まれる基本演算素子(基本演算ノード)で実行できるようにコンパイル部30により展開されたものである。図14の中の最上段における「1:_Ghissann_ver3_9_1_0_0.y」は乗数4ビットの入力(y系統)を示し、「2:_Ghissann_ver3_9_1_0_0.x」は被乗数24ビットの入力(x系統)を示す。また最終段における「_Ghissann_ver3_9_1_0_0.ans」は乗算結果を示す。図14の中の「add」ノードは加算演算、「bgt」ノードは大小比較演算(<)で、1段目の「1:bgt:20」は「y<0」を表している。「neg」ノードは符号反転演算、「lsl」は左シフト演算で、1段目の「6:lsl:20」は4ビット左シフト「<<4」を表している。「mbgt」ノードは「bgt」ノードの条件により2入力のどちらか一方を選択する選択演算で、破線が条件データを表している。「asr」ノードは右シフト演算、「bne」ノードは等価比較演算(!=)、「mbne」ノードは「bne」ノードの条件により2入力のどちらか一方を選択する選択演算(マージ演算)で、破線が条件データを表している。「nop」ノードは演算を行わない、データスルーのためのノードである。図14より24ビット×4ビットの計算には、ノードが20段必要であり、また、基本演算ノードの数は65個必要なことがわかる。
FIG. 14 shows a DFG that calculates a multiplicand of 24 bits × multiplier of 4 bits using a writing algorithm. This DFG is developed by the compiling
図15は、図14に示すデータフローグラフにおいて、所定の規則を有するデータフローの一群を点線で囲った図を示す。このDFGにおいては、所定の規則にしたがって配列されたノード群70が4つ存在している。このデータフローの一群、すなわちノードの一群は、使用する複数の演算機能が同一であり、且つ、演算機能の実行順序も等しいという性質を有している。データフローグラフ処理部31(図1参照)が、図15に示すDFGから、所定の規則を有するノード群を探索する。
FIG. 15 shows a diagram in which a group of data flows having a predetermined rule is surrounded by a dotted line in the data flow graph shown in FIG. In this DFG, there are four
図16は、図15に示すノード群70のDFGを示す。既述したように、このノード群70は、乗算演算の過程において用いられる。図16に示すDFGは、右1ビットシフト演算、加算演算、nop(信号スルー)、1とのビット積演算、1との等価比較演算とマージ演算とから構成されている。本実施の形態では、このノード群70を、1つの新たなノード「mul_t」として置き換える。したがって、ノードmul_tは、複数の基本演算で構成されたノードとなる。図15に示すように、被乗数24ビット×乗数4ビットの乗算のDFGには、ノードmul_tの構造を有するDFGが4つ存在する。
FIG. 16 shows the DFG of the
なお、ノードmul_tは、1つのALUにおいて演算処理することが可能である。そのために、ALUでは、右ビットシフト演算素子、加算演算素子、ビット積演算素子、等価比較演算素子とマージ演算素子の複数の基本演算素子を、ノード群70の配置関係を実現するように接続する組合せ用結線が設けられる。この組合せ用結線は、既存の基本演算素子を接続するだけであるため、回路規模はそれほど大きくならない。ALUが、例えば加算演算のみを実行する場合には、ALU内のセレクタにより加算演算素子が選択されるが、ノードmul_tの演算を実行する場合には、ALU内の組合せ用結線で必要な複数の基本演算素子をリンクすることで、ノード群70の演算処理を実行することになる。
Note that the node mul_t can perform arithmetic processing in one ALU. For this purpose, in the ALU, a plurality of basic arithmetic elements such as a right bit shift arithmetic element, an addition arithmetic element, a bit product arithmetic element, an equivalent comparison arithmetic element, and a merge arithmetic element are connected so as to realize the arrangement relationship of the
図17は、データフローグラフ処理部31の構成を示す。データフローグラフ処理部31は、ノード群探索部60、ノード置換部61およびDFG再構成部62を備える。実施の形態におけるデータフローグラフ処理機能は、処理装置10において、CPU、メモリ、メモリにロードされたDFG処理用プログラムなどによって実現され、ここではそれらの連携によって実現される機能ブロックを描いている。DFG処理用プログラムは、処理装置10に内蔵されていてもよく、また記録媒体に格納された形態で外部から供給されるものであってもよい。したがってこれらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者に理解されるところである。
FIG. 17 shows the configuration of the data flow
ノード群探索部60は、コンパイル部30により生成されたDFGから、所定の規則を有するデータフローの一群、すなわち所定の規則を有するノード群70を探索する。図15の例では、点線で囲ったノード群に所定の規則性が認められるため、ノード群探索部60は、4つのノード群70をDFGから見つけることになる。
The node
ノード置換部61は、探索したノード群70を所定数のノードに置換する。置換するノードの数および段数は、ノード群70に含まれるノード数よりも少なく、且つ、ノード群70の段数よりも少なくすることが好ましい。上記したように、本実施の形態では、ノード置換部61が、ノード群70を、1つのノードmul_tに置換する。
The
図18は、ノードの置換を行った後のDFGを示す。4段にて構成されていたノード群70(図16参照)が、1つのノードmul_tに置き換えられている状態が示される。 FIG. 18 shows the DFG after node replacement. A state in which the node group 70 (see FIG. 16) configured in four stages is replaced with one node mul_t is shown.
DFG再構成部62は、置換されたノードmul_tを用いて、DFGを再構成する。DFG再構成部62は、ノード群70に含まれるノードと同一段に位置するノードに演算が割り当てられていない場合、すなわちnopノードが割り当てられている場合に、同一段に位置するnopノードを削除する。これにより、DFGを小さく再構成することができる。さらに、DFG再構成部62は、x入力系統の符号反転ノードの入れ替えを行い、2系統あるx入力系統を1系統に統合する。これにより、DFGをさらに小さく再構成することができる。
The
図19は、ノード群70に含まれるノードと同一段に位置するnopノードを削除したDFGを示す。4段分のノード群70を1つのノードmul_tに置換したため、被乗数であるx入力系統のnopノードが1つのノードmul_tにつき3段分余ることになる。図18と比較すると、10段分のnopノードを削除することができ、DFGを小さくすることができる。
FIG. 19 shows a DFG from which the nop node located at the same stage as the nodes included in the
図20は、x入力系統の2系統のうちの1つに存在する符号反転ノード(−1×)を、同じ系統の最後に配置されているnopノードと入れ替えた状態を示す。 FIG. 20 shows a state in which the sign inversion node (−1 ×) existing in one of the two systems of the x input system is replaced with the nop node arranged at the end of the same system.
x入力系統の右側の系統の2段目にある4ビット左シフト演算を同じ系統の1段目のnopノードと入れ替えるか、または左側の系統の1段目にある4ビット左シフト演算を同じ系統の2段目のnopノードと入れ替えると、2つの系統において、符号反転ノード(−1×)より上のノードのシーケンスが全く同じになることがわかる。 Replace the 4-bit left shift operation at the second stage of the right system of the x input system with the first stage nop node of the same system, or the 4-bit left shift operation at the first stage of the left system of the same system It can be seen that in the two systems, the sequence of the nodes above the sign inversion node (−1 ×) is exactly the same in the two systems.
図21は、右側の系統の2段目にある4ビット左シフト演算を同じ系統の1段目のnopノードと入れ替えた後のDFGを示す。図21より、2系統あるx入力系統を1系統に統合可能であることがわかる。 FIG. 21 shows the DFG after the 4-bit left shift operation in the second stage of the right system is replaced with the first stage nop node of the same system. FIG. 21 shows that two x input systems can be integrated into one system.
図22は、x入力系統を1系統に統合した後のDFGを示す。図22より、ノードmul_tを使用すると被乗数24ビット×乗数4ビットの乗算を、8段のALU列で実行できる。図14のDFGでは20段必要であったことと比較すると、段数は、0.4(=8/20)倍で済むことになる。また、図22より、ノードの数は15個となり、図14のDFGでは65個必要であったことと比較すると、0.23(=15/65)倍のノード数で済む。これにより、DFGの段数を減らすことができ、リコンフィギュラブル回路12における回路再構成回数を少なくできるとともに、回路再構成にともなう消費電力を低減することが可能となる。
FIG. 22 shows the DFG after the x input system is integrated into one system. As shown in FIG. 22, when the node mul_t is used, multiplication of
図23は、図22のy系統の上2段分の条件処理部分をビット積演算ノードに置き換えた状態を示す。ビット積演算は、乗数yに対して、ビットが全て1の値を用いる。例えば、y=3の場合、図22の条件処理部分ではyが正数なのでF(false)となり「3=0011」がマージノードから出力される。図23のビット積演算では「(3=0011)&(1111)=0011」となり、結果として図22の条件処理部分からの出力と同じとなる。また、y=−3の場合、図13の条件処理部分ではyが負数なのでT(true)となり「16+(−3)=13=1101」がマージノードから出力される。図23のビット積演算では「(−3=1101)&(1111)=1101」となり、結果として図22の条件処理部分からの出力と同じとなる。ビット積演算ノードを用いることで、図22のy系統の上2段分の条件処理をしているDFGに比べてDFGの段数を1段減らすことができる。 FIG. 23 shows a state where the condition processing part for the upper two stages of the y system in FIG. 22 is replaced with a bit product operation node. The bit product operation uses a value in which all bits are 1 with respect to the multiplier y. For example, in the case of y = 3, since y is a positive number in the condition processing part of FIG. 22, it becomes F (false) and “3 = 0011” is output from the merge node. In the bit product operation of FIG. 23, “(3 = 0011) & (1111) = 0011” is obtained, which is the same as the output from the condition processing portion of FIG. In the case of y = -3, since y is a negative number in the condition processing part of FIG. 13, T (true) is obtained and “16 + (− 3) = 13 = 1101” is output from the merge node. In the bit product operation of FIG. 23, “(−3 = 11101) & (1111) = 11101” is obtained, which is the same as the output from the condition processing portion of FIG. By using the bit product operation node, the number of stages of the DFG can be reduced by one compared to the DFG that performs the condition processing for the upper two stages of the y system in FIG.
図24は、被乗数8ビット×乗数8ビットの乗算のDFGを示す。この場合は、8つのmul_tが必要となる。なお、図23に示したDFGと同様に、y系統の上2段分の条件処理部分を、ビット積演算ノードに置換することは可能である。
FIG. 24 shows a DFG of multiplication of
図25は、被乗数4ビット×乗数24ビットの乗算のDFGを示す。この場合は、24個のmul_tが必要となり、また、1段目の加算で2の24乗を加えることになる。以上のDFGから、ノードmul_tは乗数の数だけ必要であることが分かる。被乗数と乗数とを入れ替えることによって、被乗数24ビット×乗数4ビットと、被乗数4ビット×乗数24ビットの演算結果は同じになるが、乗数のビット数が小さい方が効率的にDFGを作成することができる。このように、乗数のビット数が被乗数のビット数よりも大きい場合には、乗数と被乗数とを入れ替えて、DFGを作成することが好ましい。
FIG. 25 shows a DFG of multiplication of
図26は、筆算アルゴリズムの別の例を示す。図26では、1例として4ビット(2進表示で1011)×4ビット(2進表示で1111)の乗算を示す。十進表示では11×15である。この例では、乗算演算を所定の桁で分割して、分割した桁ごとに並列処理を行うこととを目的とする。乗算演算を並列で処理することにより、DFGの段数を少なくすることができ、効率的な演算処理を実現することが可能となる。以下では、乗数を2進表示した場合の乗算演算を奇数桁と偶数桁に分割する。乗数yの奇数ビットの乗算と偶数ビットの乗算を並列に行い、最後にそれらの乗算結果を加算しても演算結果は同じとなることを利用している。 FIG. 26 shows another example of the writing algorithm. FIG. 26 shows an example of multiplication of 4 bits (1011 in binary display) × 4 bits (1111 in binary display). The decimal display is 11 × 15. In this example, an object is to divide a multiplication operation by a predetermined digit and perform parallel processing for each divided digit. By performing multiplication operations in parallel, the number of DFG stages can be reduced, and efficient calculation processing can be realized. In the following, the multiplication operation when the multiplier is displayed in binary is divided into odd and even digits. Even if the multiplication of odd bits and the multiplication of even bits of the multiplier y is performed in parallel, and finally the multiplication results are added, the operation result is the same.
図27は、偶数桁と奇数桁に分割した場合のノード群70のDFGを示す。図27に示すDFGは、右2ビットシフト演算、加算演算、nop(信号スルー)、1とのビット積演算、1との等価比較演算とマージ演算とから構成されている。以下では、このノード群70を、1つの新たなノード「mul_t2」として置き換える。したがって、ノードmul_t2は、上記した複数の基本演算で構成されたノードとなる。
FIG. 27 shows the DFG of the
ノードmul_t2は、図16に示すノードmul_tと同様に、1つのALUにおいて演算処理することが可能である。そのために、ALUでは、右2ビットシフト演算素子、加算演算素子、ビット積演算素子、等価比較演算素子とマージ演算素子の複数の基本演算素子を、ノードmul_t2の配置関係を実現するように接続する組合せ用結線が設けられる。この組合せ用結線は、既存の基本演算素子を接続するだけであるため、回路規模はそれほど大きくならない。ノードmul_t2の演算を実行する場合には、ALU内の組合せ用結線で必要な複数の基本演算素子をリンクすることで、ノード群70の演算処理を実行することになる。
Similarly to the node mul_t illustrated in FIG. 16, the node mul_t2 can perform arithmetic processing in one ALU. Therefore, in the ALU, a plurality of basic arithmetic elements such as a right 2-bit shift arithmetic element, an addition arithmetic element, a bit product arithmetic element, an equivalent comparison arithmetic element, and a merge arithmetic element are connected so as to realize the arrangement relationship of the nodes mul_t2. Combination wiring is provided. Since this combination connection only connects the existing basic arithmetic elements, the circuit scale is not so large. When the operation of the node mul_t2 is executed, the operation processing of the
図28は、乗算演算をmul_tで実現したDFGを示す。被乗数xを10ビット、乗数yを10ビットとする。DFGをmul_tで実現した場合、ノード数が37個、段数は19段となる。 FIG. 28 shows a DFG in which multiplication operation is realized by mul_t. The multiplicand x is 10 bits and the multiplier y is 10 bits. When DFG is realized by mul_t, the number of nodes is 37 and the number of stages is 19.
図29は、乗算演算をmul_t2で実現したDFGを示す。図28との比較のため、被乗数xを10ビット、乗数yを10ビットとする。DFGをmul_t2で実現した場合、ノード数が34個、段数は13段となる。したがって、10ビット×10ビットの乗算演算の場合は、mul_t2で乗算演算を実現することで、DFGの規模を小さくすることが可能となる。 FIG. 29 shows a DFG in which multiplication operation is realized by mul_t2. For comparison with FIG. 28, the multiplicand x is 10 bits and the multiplier y is 10 bits. When DFG is realized by mul_t2, the number of nodes is 34 and the number of stages is 13. Therefore, in the case of a 10-bit × 10-bit multiplication operation, the scale of the DFG can be reduced by realizing the multiplication operation with mul_t2.
以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの各構成要素や各処理プロセスの組み合わせにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. The embodiments are exemplifications, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are within the scope of the present invention. .
例えば、実施の形態では乗算演算を処理する例について説明したが、それ以外に、よく用いられる除算演算についても、同様に処理することが可能である。このように、DFG上によく出現する演算であって、且つその演算を単独で実行する演算素子の回路規模が大きいものについては、所定の規則をもつノード群を別のノードに置換することで、DFGを小さくし、処理装置10の処理高速性を実現することが可能である。
For example, in the embodiment, an example in which a multiplication operation is processed has been described, but other than that, a commonly used division operation can be processed in the same manner. In this way, for operations that frequently appear on the DFG and that have a large circuit scale of arithmetic elements that execute the operations alone, a node group having a predetermined rule can be replaced with another node. It is possible to reduce the DFG and realize the processing speed of the
リコンフィギュラブル回路12におけるALUの配列は、縦方向にのみ接続を許した多段配列に限らず、横方向の接続も許した、メッシュ状の配列であってもよい。また、上記の説明では、段を飛ばして論理回路を接続する接続用結線は設けられていないが、このような段を飛ばす接続用結線を設ける構成としてもよい。
The arrangement of ALUs in the
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
10・・・処理装置、12・・・リコンフィギュラブル回路、14・・・設定部、18・・・制御部、26・・・集積回路装置、30・・・コンパイル部、31・・・データフローグラフ処理部、32・・・設定データ生成部、34・・・記憶部、36・・・プログラム、38・・・データフローグラフ、40・・・設定データ、52・・・接続部、53・・・ALU列、60・・・ノード群探索部、61・・・ノード置換部、62・・・DFG再構成部、70・・・ノード群。
DESCRIPTION OF
Claims (1)
処理の動作を記述した動作記述をもとに、演算間の実行順序の依存関係を表現するデータフローグラフを生成する手段と、
リコンフィギュラブル回路における基本演算で構成されるデータフローの一群を1つのノードに置換する手段と、
置換するデータフローの一群に含まれるノードと同一段に位置するノードに演算が割り当てられていない場合に、同一段に位置するノードを削除する手段と、
を備えることを特徴とするデータフローグラフ処理装置。
A reconfigurable circuit having a multi-stage arrangement of logic circuits each capable of selectively executing a plurality of arithmetic functions, and a connection section for setting a connection relationship between an output of a preceding logic circuit and an input of a succeeding logic circuit A data flow graph processing apparatus for processing a data flow graph to be supplied to the data flow graph;
Means for generating a data flow graph expressing the dependency of execution order between operations based on a behavioral description describing the behavior of processing;
Means for replacing a group of data flows composed of basic operations in a reconfigurable circuit with one node;
Means for deleting a node located at the same stage when an operation is not assigned to a node located at the same stage as a node included in the group of data flows to be replaced;
A data flow graph processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004086774A JP4413052B2 (en) | 2004-03-24 | 2004-03-24 | Data flow graph processing apparatus and processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004086774A JP4413052B2 (en) | 2004-03-24 | 2004-03-24 | Data flow graph processing apparatus and processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005275698A JP2005275698A (en) | 2005-10-06 |
JP4413052B2 true JP4413052B2 (en) | 2010-02-10 |
Family
ID=35175327
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004086774A Expired - Lifetime JP4413052B2 (en) | 2004-03-24 | 2004-03-24 | Data flow graph processing apparatus and processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4413052B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4562678B2 (en) * | 2006-03-30 | 2010-10-13 | 三洋電機株式会社 | Data flow graph reconstruction device, setting data generation device for reconfigurable circuit, and processing device |
JP2008283382A (en) * | 2007-05-09 | 2008-11-20 | Sanyo Electric Co Ltd | Signal processor |
CN113094030B (en) * | 2021-02-09 | 2024-12-31 | 北京清微智能科技有限公司 | A reconfigurable chip easy compilation method and system |
-
2004
- 2004-03-24 JP JP2004086774A patent/JP4413052B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2005275698A (en) | 2005-10-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7171535B2 (en) | Serial operation pipeline, arithmetic device, arithmetic-logic circuit and operation method using the serial operation pipeline | |
EP1271474B1 (en) | Function block | |
JP4275013B2 (en) | Data flow graph processing device, processing device, reconfigurable circuit. | |
CN110609804A (en) | Semiconductor device and method of controlling semiconductor device | |
JP4484756B2 (en) | Reconfigurable circuit and processing device | |
JP4011007B2 (en) | Integrated circuit device and processing device having reconfigurable circuit | |
JP4413052B2 (en) | Data flow graph processing apparatus and processing apparatus | |
JP4553615B2 (en) | Processing equipment | |
JP4260197B2 (en) | Processing equipment | |
JP4562678B2 (en) | Data flow graph reconstruction device, setting data generation device for reconfigurable circuit, and processing device | |
JP4357326B2 (en) | Reconfigurable circuit and processing device | |
JP4330472B2 (en) | Processing equipment | |
JP4208751B2 (en) | Data flow graph processing device. | |
JP5116499B2 (en) | Arithmetic processing circuit | |
JP2010086041A (en) | Multiplication method, processor, and arithmetic unit | |
JP4748944B2 (en) | Processing equipment | |
JP4562679B2 (en) | Data flow graph generator | |
JP4553614B2 (en) | Processing equipment | |
JP2005128709A (en) | Processing device equipped with reconfigurable circuit | |
JP2007188528A (en) | Processor | |
JP2007241694A (en) | Arithmetic mapping method to reconfigurable circuit, reconfigurable circuit and data flow graph | |
JP4610236B2 (en) | Setting data generator | |
JP2010134713A (en) | Arithmetic processing apparatus and conversion device | |
JPH11282651A (en) | Parallel multiplier | |
JP2004221997A (en) | Reconfigurable circuit and integrated circuit capable of using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061116 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090507 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090706 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090825 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090928 |
|
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: 20091020 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20091117 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121127 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4413052 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121127 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131127 Year of fee payment: 4 |
|
EXPY | Cancellation because of completion of term |