JP4597075B2 - Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph - Google Patents

Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph Download PDF

Info

Publication number
JP4597075B2
JP4597075B2 JP2006063741A JP2006063741A JP4597075B2 JP 4597075 B2 JP4597075 B2 JP 4597075B2 JP 2006063741 A JP2006063741 A JP 2006063741A JP 2006063741 A JP2006063741 A JP 2006063741A JP 4597075 B2 JP4597075 B2 JP 4597075B2
Authority
JP
Japan
Prior art keywords
sign
input
function
dividend
arithmetic
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
JP2006063741A
Other languages
Japanese (ja)
Other versions
JP2007241694A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2006063741A priority Critical patent/JP4597075B2/en
Publication of JP2007241694A publication Critical patent/JP2007241694A/en
Application granted granted Critical
Publication of JP4597075B2 publication Critical patent/JP4597075B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、リコンフィギュラブル回路への演算マッピング方法、リコンフィギュラブル回路、及びリコンフィギュラブル回路の動作を設定するために必要なデータフローグラフに関する。   The present invention relates to an operation mapping method to a reconfigurable circuit, a reconfigurable circuit, and a data flow graph necessary for setting the operation of the reconfigurable circuit.

最近、携帯電話、GPS、VICSなど、無線通信が広く普及し、無線機の種類も増えている。これらの無線機またはその機能をすべてハードウエアで実装すると、コストや実装面積が嵩む。そこで、ハードウエアとしては汎用的な能力を有する回路を搭載しておき、それにロードするソフトウエアを切り替えることで多様な機能を実現する「ソフトウエア無線機」という考え方がある。   Recently, wireless communications such as mobile phones, GPS, and VICS have become widespread, and the types of wireless devices are increasing. If these radios or their functions are all implemented by hardware, the cost and mounting area increase. Therefore, there is a concept of “software radio” that implements various functions by installing a circuit having general-purpose capability as hardware and switching software loaded thereon.

ソフトウエア無線機を実現する回路として、FPGA(Field Programmable Gate Array)やDSP(Digital Signal Processor)がある。特許文献1には、FPGAを動的に
再構成することで、回路構成の再利用を図る方法が提案されている。動的変更が可能なタイプの回路を以下リコンフィギュラブル回路という。
Circuits that implement a software defined radio include an FPGA (Field Programmable Gate Array) and a DSP (Digital Signal Processor). Patent Document 1 proposes a method of reusing a circuit configuration by dynamically reconfiguring an FPGA. The type of circuit that can be dynamically changed is hereinafter referred to as a reconfigurable circuit.

FPGAはLSI製造後に回路データを書き込んで比較的自由に回路構成を設計することが可能であり、専用ハードウェアの設計に利用されている。FPGAは、論理回路の真理値表を格納するためのルックアップテーブル(LUT)と出力用のフリップフロップからなる基本セルと、その基本セル間を結ぶプログラマブルな配線リソースとを含む。FPGAでは、LUTに格納するデータと配線データを書き込むことで目的とする論理演算を実現できる。しかし、FPGAでLSIを設計した場合、ASIC(Application Specific IC)による設計と比べると、実装面積が非常に大きくなり、コスト高になる。そこで
、FPGAを動的に構成することによって、回路構成の再利用を計る方法が提案されている(例えば、特許文献1参照)。
特開平10−256383号公報
The FPGA can design circuit configuration relatively freely by writing circuit data after the LSI is manufactured, and is used for designing dedicated hardware. The FPGA includes a lookup table (LUT) for storing a truth table of a logic circuit, a basic cell composed of an output flip-flop, and a programmable wiring resource connecting the basic cells. In the FPGA, a target logical operation can be realized by writing data stored in the LUT and wiring data. However, when an LSI is designed using an FPGA, the mounting area is very large and the cost is high as compared with an ASIC (Application Specific IC) design. In view of this, there has been proposed a method of measuring the reuse of the circuit configuration by dynamically configuring the FPGA (see, for example, Patent Document 1).
Japanese Patent Laid-Open No. 10-256383

例えば衛星放送では、季節などにより、放送モードを切り替えて画質の調整などを行うことがある。衛星放送受信機では、放送モードごとに複数の回路を予めハードウェア上に作り込んでおき、放送モードに合わせて選択器で回路を切り替えて受信している。従って、受信機の他の放送モード用の回路はその間遊んでいることになる。モード切替のように、複数の専用回路を切り替えて使用し、その切替間隔が比較的長い場合、複数の専用回路を作り込む代わりに、切替時にLSIを瞬時に再構成することにすれば、回路構造を簡単にして汎用性を高め同時に実装コストを抑えることができる。このようなニーズに応えるべく、動的に再構成可能なLSIに製造業界の関心が高まってきている。特に、携帯電話やPDA(Personal Digital Assistant)などのモバイル端末に搭載されるLSIは小型化が必要であり、LSIを動的に再構成し、用途に合わせて適宜機能を切り替えることができれば、LSIの実装面積を小さく抑えることができる。   For example, in satellite broadcasting, image quality may be adjusted by switching broadcast modes depending on the season. In the satellite broadcast 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 and versatility can be improved, and at the same time the mounting cost can be reduced. In order to meet such needs, the manufacturing industry has become increasingly interested in dynamically reconfigurable LSIs. In particular, LSIs mounted on mobile terminals such as mobile phones and PDAs (Personal Digital Assistants) need to be miniaturized. If LSIs can be dynamically reconfigured and functions can be switched appropriately according to the application, The mounting area can be kept small.

FPGAは回路構成の設計自由度が高く、汎用的である反面、全ての基本セル間の接続を可能とするため、多数のスイッチとスイッチのON/OFFを制御するための制御回路を含む必要があり、必然的に制御回路の実装面積が大きくなる。また、基本セル間の接続に複雑な配線パターンをとるため、配線が長くなる傾向がある。さらに1本の配線に多く
のスイッチが接続される構造であるため、遅延が大きくなる。そのため、FPGAによるLSIは、試作や実験のために利用されるにとどまることが多く、実装効率、性能コストなどを考えると、量産には適していない。さらに、FPGAによるLSIでは、多数のLUT方式の基本セルに設定データを送る必要があるため、回路のコンフィギュレーションにはかなりの時間を要する。そのため、瞬時に回路構成の切替が必要な用途にはFPGAによるLSIは適していない。
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. Moreover, since a complicated wiring pattern is used for connection between basic cells, the wiring tends to be long. Furthermore, the delay is increased 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 and performance cost. Furthermore, in the LSI based on the FPGA, it is necessary to send setting data to a large number of basic cells of the LUT method, so that considerable time is required for circuit configuration. For this reason, FPGA LSIs are not suitable for applications that require instantaneous switching of the circuit configuration.

それらの課題を解決するため、近年、ALU(Arithmetic Logic Unit)と呼ばれる基
本演算機能を複数有する多機能素子を用いたリコンフィギュラブルプロセッサの開発が進められている。リコンフィギュラブルプロセッサでは、コマンドデータが設定されることにより、ALU回路の演算機能構成と接続部が制御され、全体として所期の演算処理回路を実現することが可能となる。コマンドデータは、一般にC言語等の高級プログラム言語で記述されたソースプログラムからDFG(Data Flow Graph)と呼ばれるデータフロー
を作成し、その情報をもとに作成される。
In order to solve these problems, in recent years, a reconfigurable processor using a multi-functional element called ALU (Arithmetic Logic Unit) having a plurality of basic arithmetic functions has been developed. In the reconfigurable processor, the command data is set to control the arithmetic function configuration and the connection part of the ALU circuit, so that the desired arithmetic processing circuit can be realized as a whole. Command data is generally created based on the data flow called DFG (Data Flow Graph) created from a source program written in a high-level programming language such as C language.

しかし、従来のデータフロー作成方法では、演算を汎用に行うことを想定しており、1つの演算が必要とするALUの数が多く、回路規模が大きくなり、それだけ回路の処理時間が長くなるという問題があった。   However, in the conventional data flow creation method, it is assumed that the calculation is performed for general purposes, and the number of ALUs required for one calculation is large, the circuit scale is increased, and the processing time of the circuit is increased accordingly. There was a problem.

本発明はこうした状況に鑑みてなされたものであり、リコンフィギュラブル回路において、回路規模の縮小化と処理時間の短縮化等に貢献するリコンフィギュラブル回路への演算マッピング方法と、それを利用したリコンフィギュラブル回路を提供することを目的とする。   The present invention has been made in view of such a situation, and in a reconfigurable circuit, an operation mapping method to a reconfigurable circuit that contributes to a reduction in circuit scale and a reduction in processing time, and the like are used. An object is to provide a reconfigurable circuit.

上記目的を達成するため、本発明の第1の観点に係るリコンフィギュラブル回路への演算マッピング方法は、
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能をマッピングする演算マッピング方法であって、
前記所期の演算機能の入力の有効ビット数を指定するビット数指定手段に基づいて、前記所期の演算機能の入力の有効ビット数を判定する有効ビット数判定ステップと、
前記有効ビット数判定ステップで判定された有効ビット数に基づいて、前記所期の演算機能を前記リコンフィギュラブル回路にマッピングするマッピングステップと、
を備えることを特徴とする。
In order to achieve the above object, an operation mapping method to a reconfigurable circuit according to the first aspect of the present invention includes:
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, there is an operation mapping method for mapping an intended operation function,
An effective bit number determination step for determining the effective bit number of the input of the intended arithmetic function based on the bit number designation means for designating the effective bit number of the input of the intended arithmetic function;
A mapping step of mapping the intended arithmetic function to the reconfigurable circuit based on the effective bit number determined in the effective bit number determining step;
It is characterized by providing.

本発明の第2の観点に係るリコンフィギュラブル回路への演算マッピング方法は、
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能をマッピングする演算マッピング方法であって、
前記所期の演算機能の入力の符号を指定する符号指定手段に基づいて、前記所期の演算機能の入力の符号を判定する符号判定ステップと、
前記符号判定ステップで判定された符号に基づいて、前記所期の演算機能を前記リコンフィギュラブル回路にマッピングするマッピングステップと、
を備えることを特徴とする。
The operation mapping method to the reconfigurable circuit according to the second aspect of the present invention is as follows:
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, there is an operation mapping method for mapping an intended operation function,
A sign determination step for determining a sign of an input of the expected arithmetic function based on a sign specifying means for specifying a sign of the input of the expected arithmetic function;
A mapping step for mapping the intended arithmetic function to the reconfigurable circuit based on the code determined in the code determination step;
It is characterized by providing.

好ましくは、前記所期の演算機能の入力の有効ビット数を指定するビット数指定手段及び入力の符号を指定する符号指定手段に基づいて、前記所期の演算機能の入力の有効ビット数を判定する有効ビット数判定ステップと、前記所期の演算機能の入力の符号を判定する符号判定ステップとを備え、
前記マッピングステップは、前記有効ビット数判定ステップで判定された有効ビット数及び前記符号判定ステップで判定された符号に基づいて、前記所期の演算機能を前記リコンフィギュラブル回路にマッピングする、
ことを特徴とする。
Preferably, the effective bit number of the input of the intended arithmetic function is determined based on a bit number specifying means for specifying the effective bit number of the input of the intended arithmetic function and a sign specifying means for specifying the sign of the input An effective bit number determining step, and a code determining step for determining a sign of an input of the intended arithmetic function,
The mapping step maps the expected arithmetic function to the reconfigurable circuit based on the effective bit number determined in the effective bit number determination step and the code determined in the code determination step.
It is characterized by that.

特に、前記所期の演算機能は、除算又は剰余算を含み、
前記マッピングステップは、前記除算又は剰余算を、前記除算又は剰余算の被除数の有効ビット数分の減算の繰り返しを含む処理にマッピングする、
ことを特徴とする。
In particular, the intended calculation function includes division or remainder calculation,
The mapping step maps the division or remainder calculation to a process including repetition of subtraction for the effective bit number of the dividend of the division or remainder calculation.
It is characterized by that.

好ましくは、前記所期の演算機能の入力の有効ビット数を指定するビット数指定手段は、前記所期の演算機能をプログラム言語で表現したソースプログラムである。   Preferably, the number-of-bits designating means for designating an effective number of input bits of the intended arithmetic function is a source program that expresses the intended arithmetic function in a programming language.

なお、前記有効ビット数判定ステップは、前記ソースプログラムのコメントの記載に基づいて、入力の有効ビット数を判定することを特徴とする。   The effective bit number determining step determines the effective bit number of the input based on the comment description of the source program.

好ましくは、前記所期の演算機能の入力の符号を指定する符号指定手段は、前記所期の演算機能をプログラム言語で表現したソースプログラムである。   Preferably, the code designating means for designating an input code of the intended arithmetic function is a source program expressing the intended arithmetic function in a program language.

なお、前記符号判定ステップは、前記ソースプログラムのコメントの記載に基づいて、入力の符号を判定することを特徴とする。   The code determination step is characterized in that an input code is determined based on a description of a comment of the source program.

本発明の第3の観点に係るリコンフィギュラブル回路は、
前記第1の観点に係るいずれかのリコンフィギュラブル回路への演算マッピング方法、又は前記第2の観点に係るいずれかのリコンフィギュラブル回路への演算マッピング方法の結果から得られたデータにしたがって動作することを特徴とする。
A reconfigurable circuit according to a third aspect of the present invention is:
Operate according to data obtained from the result of the operation mapping method to any one of the reconfigurable circuits according to the first aspect or the operation mapping method to any one of the reconfigurable circuits according to the second aspect It is characterized by doing.

本発明の第4の観点に係るデータフローグラフは、
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能の動作を設定するために必要なデータフローグラフであって、
前記所期の演算機能が、該演算の入力のビット数に応じた繰り返し演算に分解される場合に、前記所期の演算機能をプログラム言語で表現したソースプログラムに基づいて判定される、前記所期の演算機能の入力の有効ビット数に対応して、前記繰り返し演算の繰り返し回数を削減したことを特徴とする。
The data flow graph according to the fourth aspect of the present invention is:
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, a data flow graph necessary for setting the operation of the expected calculation function,
When the desired calculation function is decomposed into repetitive calculations according to the number of input bits of the calculation, the predetermined calculation function is determined based on a source program expressing the calculation function in a programming language. The number of repetitions of the repetitive operation is reduced in correspondence with the number of effective bits input to the operation function of the period.

本発明の第5の観点に係るデータフローグラフは、
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能の動作を設定するために必要なデータフローグラフであって、
前記所期の演算機能の入力の符号が正負いずれの場合にも対応して処理されるように、前記所期の演算機能が前記入力の符号判定処理を含む場合に、
前記所期の演算機能をプログラム言語で表現したソースプログラムに基づいて判定される、前記所期の演算機能の入力の符号に対応して、前記符号判定処理を省略したことを特徴とする。
The data flow graph according to the fifth aspect of the present invention is:
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, a data flow graph necessary for setting the operation of the expected calculation function,
In the case where the intended arithmetic function includes the input sign determination process so that the sign of the input of the intended arithmetic function is processed corresponding to either positive or negative,
The code determination process is omitted corresponding to the input code of the expected calculation function, which is determined based on a source program expressing the expected calculation function in a programming language.

本発明のリコンフィギュラブル回路への演算マッピング方法によれば、従来、演算を汎
用の処理にマッピングしていたために無効になっていた演算回路を削減することができるため、同じ演算処理を行う回路規模を小型化でき、消費電力を削減するとともに、演算処理を高速化することができる。
According to the operation mapping method to the reconfigurable circuit of the present invention, it is possible to reduce the number of operation circuits that have been invalidated because the operations are conventionally mapped to general-purpose processing. The scale can be reduced, power consumption can be reduced, and calculation processing can be speeded up.

本発明に係るリコンフィギュラブル回路への演算マッピング方法と、リコンフィギュラブル回路の一実施の形態について、図を参照して説明する。図1は、本発明の一実施の形態に係るリコンフィギュラブル回路を含む処理装置の構成を示すブロック図である。図1に示すように、処理装置10は、集積回路装置26を備える。集積回路装置26は、回路構成を再構成可能とする機能を有する。集積回路装置26は1チップとして構成され、リコンフィギュラブル回路1、設定部14、制御部18、内部状態保持回路20、出力回路22および経路部24を備える。リコンフィギュラブル回路1は、設定を変更することにより、機能の変更を可能とする。   An operation mapping method to a reconfigurable circuit and an embodiment of the reconfigurable circuit according to the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a processing apparatus including a reconfigurable circuit according to an embodiment of the present invention. As shown in FIG. 1, the processing apparatus 10 includes an integrated circuit device 26. The integrated circuit device 26 has a function that makes it possible to reconfigure the circuit configuration. The integrated circuit device 26 is configured as one chip, and includes a reconfigurable circuit 1, a setting unit 14, a control unit 18, an internal state holding circuit 20, an output circuit 22, and a path unit 24. The reconfigurable circuit 1 can change the function by changing the setting.

設定部14は、第1設定部14a、第2設定部14b、第3設定部14c、第4設定部14dおよび選択器16を有し、リコンフィギュラブル回路1に所期の回路を構成するための設定データ40を供給する。経路部24は、フィードバックパスとして機能し、リコンフィギュラブル回路1の出力を、リコンフィギュラブル回路1の入力に接続する。内部状態保持回路20および出力回路22は、例えばデータフリップフロップ(D−FF)などの順序回路あるいはメモリで構成され、リコンフィギュラブル回路1の出力を受ける。内部状態保持回路20は経路部24に接続されている。リコンフィギュラブル回路1は組合せ回路、またはD−FFのような状態保持を含む順序回路として構成される。   The setting unit 14 includes a first setting unit 14a, a second setting unit 14b, a third setting unit 14c, a fourth setting unit 14d, and a selector 16, and configures an intended circuit in the reconfigurable circuit 1. The setting data 40 is supplied. The path unit 24 functions as a feedback path, and connects the output of the reconfigurable circuit 1 to the input of the reconfigurable circuit 1. The internal state holding circuit 20 and the output circuit 22 are configured by a sequential circuit such as a data flip-flop (D-FF) or a memory, for example, and receive the output of the reconfigurable circuit 1. The internal state holding circuit 20 is connected to the path unit 24. The reconfigurable circuit 1 is configured as a combinational circuit or a sequential circuit including state holding such as D-FF.

図2は、ALUアレイを用いたリコンフィギュラブル回路1の構成例を示す図である。図2に示すように、リコンフィギュラブル回路1は、機能の変更が可能なALU(算術論理演算ユニット)などを含む演算部である論理回路2の集合体を複数備えた構造を有し、また、それぞれの集合体の間に設けられて、集合体間の論理回路2の接続を選択的に確立可能な少なくとも1つの接続部3を有する。   FIG. 2 is a diagram illustrating a configuration example of the reconfigurable circuit 1 using an ALU array. As shown in FIG. 2, the reconfigurable circuit 1 has a structure including a plurality of sets of logic circuits 2 that are operation units including an ALU (arithmetic logic operation unit) and the like whose functions can be changed. And having at least one connection portion 3 provided between the respective assemblies and capable of selectively establishing the connection of the logic circuit 2 between the assemblies.

リコンフィギュラブル回路1において、演算機能を選択的に実行可能な複数の論理回路2がマトリックス状に配列されて、図2の例では、X段Y列のALUアレイを構成し、各段に配列された複数の論理回路2が集合体を構成して、前段の集合体における処理結果が、接続部3において選択的に確立される接続にしたがって後段の集合体に引き渡される。上段から下段への論理回路間のデータ渡しは、論理回路間の接続切替を行う接続スイッチに接続データセットを設定することで、下段のどの論理回路2にデータを渡すかが定められる。動作時には、構成情報に従って演算処理し、結果を出力する。   In the reconfigurable circuit 1, a plurality of logic circuits 2 that can selectively execute an arithmetic function are arranged in a matrix, and in the example of FIG. 2, an ALU array of X stages and Y columns is configured and arranged in each stage. The plurality of logic circuits 2 thus configured constitute an aggregate, and the processing result in the upstream aggregate is delivered to the downstream aggregate according to the connection selectively established in the connection unit 3. The data transfer between the logic circuits from the upper stage to the lower stage is determined to which logic circuit 2 in the lower stage the data is transferred by setting a connection data set in a connection switch for switching the connection between the logic circuits. During operation, arithmetic processing is performed according to the configuration information and the result is output.

各論理回路2の機能と、論理回路2間の接続関係は、図1に示す設定部14により供給される設定データ40に基づいて設定される。設定データ40は、以下の手順で生成される。   The function of each logic circuit 2 and the connection relationship between the logic circuits 2 are set based on setting data 40 supplied by the setting unit 14 shown in FIG. The setting data 40 is generated by the following procedure.

集積回路装置26により実現されるべき演算機能を記載したソースプログラム36が、記憶部34に保持されている。ソースプログラム36は、信号処理回路または信号処理アルゴリズムなどをC言語などの高級言語で記述したものである。コンパイル部30は、記憶部34に格納されたソースプログラム36をコンパイルし、データフローグラフ(DFG)38に変換して記憶部34に格納する。データフローグラフ38は、入力変数および定数による入力データから出力データに至る演算ないしはデータの流れをグラフ構造で表現したものである。ここで、コンパイル部30は、リコンフィギュラブル回路1における論理回路2の集合体の接続制限に応じて、データフローグラフ38を生成する。   A source program 36 that describes arithmetic functions to be realized by the integrated circuit device 26 is held in the storage unit 34. The source program 36 describes a signal processing circuit or a signal processing algorithm in a high-level language such as C language. The compiling unit 30 compiles the source program 36 stored in the storage unit 34, converts it into a data flow graph (DFG) 38, and stores it in the storage unit 34. The data flow graph 38 is a graph structure representing operations or data flow from input data to output data by input variables and constants. Here, the compiling unit 30 generates the data flow graph 38 according to the connection restriction of the assembly of the logic circuits 2 in the reconfigurable circuit 1.

設定データ生成部32は、データフローグラフ38から設定データ40を生成する。設定データ40は、データフローグラフ38をリコンフィギュラブル回路1にマッピングするためのデータであり、リコンフィギュラブル回路1における論理回路2の機能や論理回路間の接続関係を定める。   The setting data generation unit 32 generates setting data 40 from the data flow graph 38. The setting data 40 is data for mapping the data flow graph 38 to the reconfigurable circuit 1, and defines the function of the logic circuit 2 in the reconfigurable circuit 1 and the connection relationship between the logic circuits.

リコンフィギュラブル回路1は、論理回路2をマトリクス状に配列した汎用のプロセッサと見ることができる。データフローグラフ38及び設定データ40は、プロセッサに指令するプログラム等の一種に相当すると考えられる。   The reconfigurable circuit 1 can be regarded as a general-purpose processor in which logic circuits 2 are arranged in a matrix. The data flow graph 38 and the setting data 40 are considered to correspond to a kind of program or the like for instructing the processor.

(実施の形態1)
実施の形態1では、除算を例にとって、本発明のリコンフィギュラブル回路1への演算マッピング方法を説明する。図3は、実施の形態に係るマッピング方法の例として、除算のソースプログラム36の一例を示す。
(Embodiment 1)
In the first embodiment, an operation mapping method to the reconfigurable circuit 1 of the present invention will be described by taking division as an example. FIG. 3 shows an example of the division source program 36 as an example of the mapping method according to the embodiment.

除算を論理演算回路で実現する一つの方法として、論理回路に除算機能を組み込み、除算命令を論理回路に与えて除算を行う方法がある。しかし、除算は回路規模が大きく、例えば、全ての論理回路に除算機能を備えると回路規模が膨大となるとともに、一つの演算手段の信号遅延が大きくなり、結果としてリコンフィギュラブル回路全体の回路規模の増大と、演算速度の低下につながる。   As one method for realizing division by a logical operation circuit, there is a method in which a division function is incorporated in a logic circuit and a division instruction is given to the logic circuit to perform division. However, division has a large circuit scale. For example, if all logic circuits have a division function, the circuit scale becomes enormous and the signal delay of one arithmetic means increases, resulting in the circuit scale of the entire reconfigurable circuit. Leads to an increase in the calculation speed and a decrease in calculation speed.

これを解決する方法として、除算をいわゆる筆算の計算方法に分解し、一つの論理回路には簡単な命令のみ持たせて除算を実現する方法がある。但し、この場合は必要な論理回路の段数が多くなる。また、筆算の計算方法による除算の規則性を利用して、一定パターンの演算を一つの演算手段に割り当てる方法が考えられる。   As a method for solving this problem, there is a method of dividing the division into a so-called handwriting calculation method and realizing the division by giving only a simple instruction to one logic circuit. However, in this case, the number of necessary logic circuits increases. In addition, a method of assigning a certain pattern of computation to one computing means using the regularity of division by the calculation method of writing can be considered.

図4は、多段の減算で構成する筆算の演算方法に除算を分解したときの、減算一段の処理を表すデータグラフの例である。図4等においては、データフローグラフ38を視覚的に理解しやすいように、丸や四角及びその中の記号と矢印線を用いて図面として表しているが、処理装置10の内部では、データフローグラフ38は、論理回路2を表すノードの番号とその演算処理内容、及びノード間の入出力関係などを示すデータ形式で表現される。   FIG. 4 is an example of a data graph representing one-stage subtraction processing when division is decomposed into a calculation method of writing composed of multi-stage subtraction. In FIG. 4 and the like, the data flow graph 38 is represented as a drawing using circles, squares, symbols therein and arrow lines so that the data flow graph 38 can be easily understood visually. The graph 38 is expressed in a data format indicating the number of the node representing the logic circuit 2, the contents of the arithmetic processing, the input / output relationship between the nodes, and the like.

図4(a)において、入力Pで表される変数xは被除数であり、入力Qで表される変数yは除数である。変数x及びyは2進数表示の整数であり、2の補数で表現されている。変数x及びyは正数であることが条件となっている。また、出力Rで表される変数retは減算一段の処理結果であり、次の減算一段の被除数となる数と、最下位ビットに、この桁の除算結果が記録される。   In FIG. 4A, the variable x represented by the input P is a dividend, and the variable y represented by the input Q is a divisor. Variables x and y are integers in binary notation and are expressed in two's complement. The condition is that the variables x and y are positive numbers. The variable ret represented by the output R is the result of the subtraction one-stage process, and the division result of this digit is recorded in the number and the least significant bit of the next subtraction dividend.

除算を構成する減算一段は次のように行われる。まず、被除数xを1ビット左にシフトする(ステップA1)。1ビットシフトした被除数から除数yを減算する(ステップA2)。減算した結果に1(入力A7)を加える(ステップA5)。その間に、1ビット左にシフトした被除数はそのまま保持される(ステップA3、ステップA4)。mov命令は、入力をそのまま出力に伝える演算(保持回路)である。   The subtraction stage constituting the division is performed as follows. First, the dividend x is shifted to the left by 1 bit (step A1). The divisor y is subtracted from the dividend shifted by 1 bit (step A2). 1 (input A7) is added to the subtraction result (step A5). In the meantime, the dividend shifted to the left by 1 bit is held as it is (step A3, step A4). The mov instruction is an operation (holding circuit) that directly transfers an input to an output.

ステップA2の結果はまた、ステップA6に入力される。ステップA6では、「0」(入力A8)より大きいかどうかを判断する。ステップA2の結果が正であればステップA6の結果は真であり、ステップA2の結果が正でなければステップA6の結果は偽である。ステップA6の出力の破線は、その値が真理値であることを表す。   The result of step A2 is also input to step A6. In step A6, it is determined whether or not it is larger than “0” (input A8). If the result of step A2 is positive, the result of step A6 is true, and if the result of step A2 is not positive, the result of step A6 is false. The broken line at the output of step A6 indicates that the value is a truth value.

ステップA9の「merge」は、破線入力の真偽に応じて、2つの実線入力のいずれ
かを選択する論理演算を表す。破線入力が真の場合は、実線入力のうちTで示される入力を選択する。
“Merge” in step A9 represents a logical operation for selecting one of the two solid line inputs in accordance with the truth of the broken line input. When the broken line input is true, the input indicated by T is selected from the solid line inputs.

ステップA9では、ステップA6の結果によって、ステップA4の結果かステップA5の結果を選択する。ステップA6の結果が真であれば、ステップA5の結果、すなわち1ビットシフトした被除数から除数yを減算して1を加えた数を選択する。ステップA6の結果が偽であれば、ステップA4の結果、すなわち1ビットシフトした被除数を選択する。   In step A9, the result of step A4 or the result of step A5 is selected according to the result of step A6. If the result of step A6 is true, a result obtained by subtracting the divisor y from the result of step A5, that is, the dividend shifted by 1 bit, and adding 1 is selected. If the result of step A6 is false, the result of step A4, that is, the dividend shifted by 1 bit is selected.

被除数を1ビット左にシフトした値から除数を減算した結果が正であれば(除数を引くことができれば)、最下位ビットに1が記録され、その上位ビットには除数を減算した結果が残っている。被除数を1ビット左にシフトした値から除数を減算した結果が正でなければ、1ビット左にシフトした被除数が出力Rとなり、最下位ビットは0である。したがって、出力Rの最下位ビットがその段の商であり、上位ビットには次の段の被除数が残っており、図4(a)は筆算の演算方法に除算を分解したときの、減算一段の処理を表している。   If the result of subtracting the divisor from the value obtained by shifting the dividend to the left by 1 bit is positive (if the divisor can be subtracted), 1 is recorded in the least significant bit, and the result of subtracting the divisor remains in the upper bit ing. If the result of subtracting the divisor from the value obtained by shifting the dividend to the left by 1 bit is not positive, the dividend shifted by 1 bit to the left becomes the output R, and the least significant bit is 0. Therefore, the least significant bit of the output R is the quotient of the stage, and the dividend of the next stage remains in the upper bit, and FIG. 4A shows one subtraction stage when division is decomposed into the calculation method of writing. Represents the process.

図4(b)は、図4(a)の処理をまとめてdiv_x(ステップB1)で表すことを示す。div_xは図4(a)のステップA1〜A9に分解されることを表す。   FIG. 4B shows that the processes of FIG. 4A are collectively expressed as div_x (step B1). div_x represents being decomposed into steps A1 to A9 in FIG.

図3にもどって、このソースプログラム36の1行目は、コメント欄である。2行目は、被除数xを除数yで除した商を、変数retに代入することを表す。1行目のコメントは、2行目の除算において、被除数が正で有効ビット数が5であり、除数が負で有効ビット数が6であることを表す。   Returning to FIG. 3, the first line of the source program 36 is a comment field. The second line indicates that the quotient obtained by dividing the dividend x by the divisor y is substituted into the variable ret. The comment on the first line indicates that in the division on the second line, the dividend is positive and the number of effective bits is 5, the divisor is negative and the number of effective bits is 6.

図3は、除算における被除数と除数の有効ビット数及び符号を表す例である。ソースプログラム36において、被除数と除数の有効ビット数及び符号をどのように表すかは任意である。例えば、変数の型宣言文の変数の後に/と符号つき整数を追加することによって、変数の有効ビット数と符号を表現することができる。   FIG. 3 is an example showing the dividend, the effective number of bits and the sign of the divisor in division. In the source program 36, how the dividend and the effective bit number and sign of the divisor are expressed is arbitrary. For example, the effective bit number and sign of a variable can be expressed by adding / and a signed integer after the variable of the variable type declaration statement.

処理装置10のコンパイル部30は、例えば図3に示すソースプログラム36のコメント欄に記載された情報を読み取って、除算における被除数と除数の有効ビット数及び符号を判断する。そして、被除数と除数の有効ビット数及び符号に応じたデータフローグラフ(DFG)38を生成する。   The compiling unit 30 of the processing device 10 reads the information described in the comment column of the source program 36 shown in FIG. 3, for example, and determines the dividend in division and the effective bit number and sign of the divisor. Then, a data flow graph (DFG) 38 corresponding to the dividend, the number of effective bits of the divisor, and the sign is generated.

その他、コンパイル部30は、例えば前述の変数の型宣言文の変数の後に追加された情報を読み取って、除算における被除数と除数の有効ビット数及び符号を判断してもよい。また、コンパイル部30がソースプログラム36をコンパイルするときに、有効ビット数又は符号によってデータフローグラフ38の構成が変わる可能性のある変数について、その変数の有効ビット数又は符号の情報をオペレータに入力させ、入力された情報に基づいてその変数の有効ビット数又は符号を判断するように構成してもよい。あるいは、その変数の有効ビット数又は符号の情報を、ソースプログラム36とは別のファイルから読み込むように構成することもできる。その場合、ファイルから読み込む変数の有効ビット数又は符号の情報は、コンパイル部30に与える指示の一種で、広い意味でソースプログラム36の一部とも考えられる。   In addition, for example, the compiling unit 30 may read information added after the variable of the above-described variable type declaration statement, and determine the dividend and the effective bit number and sign of the divisor in the division. In addition, when the compiling unit 30 compiles the source program 36, for the variable whose configuration of the data flow graph 38 may change depending on the number of valid bits or the sign, the information on the number of valid bits or the sign of the variable is input to the operator. The effective bit number or sign of the variable may be determined based on the input information. Alternatively, the effective bit number or sign information of the variable may be read from a file different from the source program 36. In this case, the effective bit number or sign information of the variable read from the file is a kind of instruction given to the compiling unit 30 and can be considered as a part of the source program 36 in a broad sense.

図5は、除算における被除数の有効ビット数を考慮して、除算の処理を展開したフローチャートである。図5において、x_BITが被除数xの有効ビット数を表す。図5のフローチャートの各変数は、図3のソースプログラム36に対応している。図6は、図5のフローチャートにおける変数の内容の例を示す。図6では、例として被除数を29、除数
を−5としている。図6のステップは、図5のステップ(C1等)に対応している。また、十進数であることを示すdを付した数以外は二進数表示である。図6では、被除数xと除数yは8ビットである。内部変数$x及び$yは16ビットであるが、図6では上位のビットを省略して記載している。
FIG. 5 is a flowchart in which division processing is developed in consideration of the number of effective bits of the dividend in division. In FIG. 5, x_BIT represents the number of effective bits of the dividend x. Each variable in the flowchart of FIG. 5 corresponds to the source program 36 of FIG. FIG. 6 shows an example of the contents of variables in the flowchart of FIG. In FIG. 6, the dividend is 29 and the divisor is −5 as an example. The steps in FIG. 6 correspond to the steps (C1 etc.) in FIG. Also, the numbers other than the numbers with d indicating decimal numbers are binary numbers. In FIG. 6, the dividend x and the divisor y are 8 bits. The internal variables $ x and $ y are 16 bits, but the upper bits are omitted in FIG.

入力である被除数xと除数yを倍精度の変数$x及び$yに代入し、商の符号を定める変数$signをまず1(正)とする(ステップC1)。図6の例では、$xが11101(十進数の29)、$yが11111011(十進数の−5)である。被除数xが正であるか否かを判定し(ステップC2)、被除数xが正でなければ(ステップC2;No)、$xを−xにし(すなわち正に反転し)、商の符号$signを−1(負)に設定する(ステップC3)。被除数が正であれば(ステップC2;Yes)、ステップC1の設定のままである。図6の例では、xが正なのでステップC3は実行されない。   The dividend x and divisor y as inputs are substituted into the double precision variables $ x and $ y, and the variable $ sign for determining the sign of the quotient is first set to 1 (positive) (step C1). In the example of FIG. 6, $ x is 11101 (decimal 29) and $ y is 11111011 (decimal -5). It is determined whether the dividend x is positive (step C2). If the dividend x is not positive (step C2; No), $ x is set to -x (that is, inverted to positive), and the sign of the quotient $ sign Is set to -1 (negative) (step C3). If the dividend is positive (step C2; Yes), the setting of step C1 is maintained. In the example of FIG. 6, step C3 is not executed because x is positive.

次に、除数yが正であるか否かを判定し(ステップC4)、除数yが正でなければ(ステップC4;No)、$yを−y(すなわち正に反転)し、商の符号$signを反転する(ステップC5)。図6の例では、yが十進数の−5なので、$yは101(十進数の5)となり、$signは−1となる。ステップC3で$signを負にしている場合は、被除数及び除数が負であるから商は正であり、$signを正(+1)とする。除数が正であれば(ステップC4;Yes)、$y及び$signの符号反転は行わない。   Next, it is determined whether or not the divisor y is positive (step C4). If the divisor y is not positive (step C4; No), $ y is -y (that is, inverted to positive), and the sign of the quotient $ Sign is inverted (step C5). In the example of FIG. 6, since y is a decimal number of -5, $ y is 101 (decimal number 5), and $ sign is -1. If $ sign is negative in step C3, the dividend and the divisor are negative, so the quotient is positive, and $ sign is positive (+1). If the divisor is positive (step C4; Yes), the sign inversion of $ y and $ sign is not performed.

次に、変数$xを1ビット左にシフトし、商の符号$signが負ならば、1を加える(ステップC6)。これは、最終的に変数$xの下位ビットにセットされる商と被除数(の余り)とを隔てる1ビットを空けて、そのビットに商の符号を設定するものである。図6では、商と被除数(の余り)とを隔てる1ビットをSで表す。商が正の場合はSは0であり、商が負の場合はSは1に設定される。図6の例では、商は負なのでSは1である。図6では、見やすいようにSのまま表示している。   Next, the variable $ x is shifted to the left by 1 bit, and if the sign of the quotient $ sign is negative, 1 is added (step C6). In this method, one bit separating the quotient finally set in the lower bits of the variable $ x and the dividend (remainder) is left, and the sign of the quotient is set in that bit. In FIG. 6, 1 bit separating the quotient from the dividend (the remainder) is represented by S. If the quotient is positive, S is 0, and if the quotient is negative, S is set to 1. In the example of FIG. 6, since the quotient is negative, S is 1. In FIG. 6, it is displayed as S for easy viewing.

ついで、変数$xと桁を合わせるために、変数$yを被除数xの有効ビット数+1ビットだけ左にシフトする(ステップC7)。図6の例ではxの有効ビット数が5なので、$yは6ビット左にシフトされて、0101000000となる。   Next, in order to align the digit with the variable $ x, the variable $ y is shifted to the left by the effective bit number of the dividend x + 1 bit (step C7). In the example of FIG. 6, since the number of effective bits of x is 5, $ y is shifted to the left by 6 bits to become 0101000000.

次に、ステップC9を被除数xの有効ビット数だけ繰り返す(ステップC8、C9、C10)。ステップC9は、$xを被除数、$yを除数として、図4(b)に示すdiv_xの処理を行う。図6の例では、div_xの処理を5回繰り返す。図6のステップC8、C9、C10の(1)〜(5)に、各回のステップC9の処理における$xの結果が示されている。各欄の上段は、div_xの入力$xを1ビット左にシフトした状態を示す。各欄の下段は、除数$yを引いて、1を加えた結果を示す。下段の空欄は、$yを引いた結果が正でないことを示す。その場合は、div_xの入力$xを1ビット左にシフトした値がそのまま、次の回の処理に渡される。   Next, step C9 is repeated for the number of effective bits of the dividend x (steps C8, C9, C10). In step C9, the process of div_x shown in FIG. 4B is performed with $ x as a dividend and $ y as a divisor. In the example of FIG. 6, the process of div_x is repeated 5 times. Steps C8, C9, and C10 in FIG. 6 show the result of $ x in each process of Step C9. The upper part of each column shows a state where the input $ x of div_x is shifted to the left by 1 bit. The lower part of each column shows the result of subtracting the divisor $ y and adding 1. The blank at the bottom indicates that the result of subtracting $ y is not positive. In this case, the value obtained by shifting the input $ x of div_x to the left by 1 bit is passed to the next processing as it is.

div_x(ステップC9)の1回目と2回目では、$xは$yより小さいので、それぞれ1ビット左にシフトされた$xがそのまま、次の処理に渡される。3回目では、$xは$yより大きくなり、$yを減算した残りに1を加えた値が次の処理に渡される。4回目では、$xは$yより小さく、$xは1ビット左にシフトされただけとなる。5回目では、$xは$yより大きくなり、$yを減算した残りに1を加えた値が出力される。div_xを5回繰り返した結果、$xの下位5ビット(Sの右)は00101となり、商の絶対値(29/5=5)となっている。なお、記号Sの左側には除算の余りが示されている。   In the first and second div_x (step C9), since $ x is smaller than $ y, $ x shifted to the left by 1 bit is passed to the next processing as it is. At the third time, $ x becomes larger than $ y, and a value obtained by adding 1 to the remainder obtained by subtracting $ y is passed to the next processing. In the fourth time, $ x is smaller than $ y, and $ x is only shifted 1 bit to the left. At the fifth time, $ x becomes larger than $ y, and a value obtained by adding 1 to the remainder obtained by subtracting $ y is output. As a result of repeating div_x five times, the lower 5 bits (right of S) of $ x are 00101, which is the absolute value of the quotient (29/5 = 5). The remainder of the division is shown on the left side of the symbol S.

$xから除算の商だけを取り出すために、2x_BIT−1とビットごとの論理積(&)を
とって変数retに代入する(ステップC11)。変数retは、被除数x及び除数yと同じ精度(図6の例では8ビット)である。図6の例ではx_BITは5なので、2−1(十進)=11111(二進)となって、$xの下位5ビット(00101)を取り出すことになる。
In order to extract only the quotient of division from $ x, the logical product (&) of 2 x_BIT −1 and each bit is taken and substituted into the variable ret (step C11). The variable ret has the same precision as the dividend x and the divisor y (8 bits in the example of FIG. 6). In the example of FIG. 6, since x_BIT is 5, 2 5 −1 (decimal) = 11111 (binary), and the lower 5 bits (00101) of $ x are extracted.

また、$xに設定した商の符号を取り出して、$signとする(ステップC11)。Sのビット位置は、下位からx_BIT+1ビット目になっているので、$xと2x_BIT
との論理和をとれば、商の符号を表すビットを取り出すことができる。
Further, the sign of the quotient set to $ x is taken out and set to $ sign (step C11). Since the bit position of S is the x_BIT + 1 bit from the lower order, $ x and 2 x_BIT
The bit representing the sign of the quotient can be taken out.

最後に、商の符号$signが0でない(商が負である)場合は(ステップC12;No)、変数retの符号を反転する(ステップC13)。$signが0の(商が正である)場合は(ステップC12;Yes)、商retの符号は反転しない。図6の例では、$signは1なので、retは符号反転されて11111011(十進数の−5)となる。   Finally, when the sign of the quotient $ sign is not 0 (the quotient is negative) (step C12; No), the sign of the variable ret is inverted (step C13). If $ sign is 0 (the quotient is positive) (step C12; Yes), the sign of the quotient ret is not inverted. In the example of FIG. 6, since $ sign is 1, the sign of the ret is inverted to 11111011 (decimal number −5).

以上、説明したように、被除数の有効ビット数を考慮すると、除算を筆算に分解した減算処理の繰り返し数を、有効ビット数分だけに削減することができる。有効ビット数を考慮しない場合には、例えば被除数及び除数が8ビットとすると、除数を8ビットシフトして、最大の7回の減算処理を繰り返す必要がある(最上位ビットは符号を表すので、最大有効ビットは7である)。   As described above, when the number of effective bits of the dividend is taken into consideration, the number of repetitions of subtraction processing obtained by dividing division into strokes can be reduced to the number of effective bits. When the number of effective bits is not considered, for example, when the dividend and the divisor are 8 bits, it is necessary to shift the divisor by 8 bits and repeat the maximum of 7 subtraction processes (since the most significant bit represents a sign, The maximum valid bit is 7).

図6の例では、理解を容易にするため、被除数及び除数を8ビットとしたが、例えば、被除数が16ビットあるいは32ビットの場合には、減算の繰り返し数が最大17又は31となって、有効ビット数を考慮した場合との減算繰り返し数の差が大きく、演算を実効する回路規模と処理時間の差が大きいものとなる。   In the example of FIG. 6, for easy understanding, the dividend and the divisor are 8 bits. However, for example, when the dividend is 16 bits or 32 bits, the maximum number of subtractions is 17 or 31, The difference in the number of subtraction repetitions from when the number of effective bits is taken into consideration is large, and the difference between the circuit scale for performing the operation and the processing time is large.

図7は、図5のフローチャートで表される処理を、図3の例に適用した場合のデータフローグラフ38の例を示す。図7において、入力P、P1、P2は被除数xを表す。入力Q、Q1、Q2は除数yを表す。出力Rは除算の商retを表す。処理の途中の定数や、一時記憶なども、演算と同じDを付した番号で示す。以下、定数等も含めてステップと呼ぶ。   FIG. 7 shows an example of the data flow graph 38 when the processing represented by the flowchart of FIG. 5 is applied to the example of FIG. In FIG. 7, inputs P, P1, and P2 represent the dividend x. Inputs Q, Q1, and Q2 represent the divisor y. The output R represents the division quotient ret. Constants in the middle of processing, temporary storage, and the like are also indicated by numbers with the same D as the calculation. In the following, steps including constants are called steps.

図7のステップD1〜D11は、商の符号(図5では$sign)を決定する処理を表す。入力P2(被除数x)の符号判定(ステップD3、D4)の結果に応じて、1(ステップD5)か−1(ステップD1、D2)を選択する(ステップD6)。そして、入力Q2(除数y)の符号判定(ステップD9、D10)の結果に応じて、ステップD6の結果(ステップD8)か、その符号反転(ステップD7)を選択する(ステップD11)。ステップD11の結果は、入力P2及びQ2が同符号の場合は1、異符号(又はいずれかが0)の場合は−1となる。   Steps D1 to D11 in FIG. 7 represent processing for determining the sign of the quotient ($ sign in FIG. 5). Either 1 (step D5) or -1 (steps D1 and D2) is selected (step D6) according to the result of the sign determination (steps D3 and D4) of the input P2 (dividend x). Then, the result of step D6 (step D8) or its sign inversion (step D7) is selected (step D11) according to the result of the sign determination (steps D9 and D10) of the input Q2 (divisor y). The result of step D11 is 1 if the inputs P2 and Q2 have the same sign, and -1 if the inputs P2 and Q2 have different signs (or any one is 0).

ステップD12〜D14は、被除数を正にする処理である。入力P2の符号判定(ステップD3、D4)の結果(ステップD12)に応じて、入力P又は入力P1の符号反転(ステップD13)を選択する(ステップD14)。   Steps D12 to D14 are processes for making the dividend positive. Depending on the result (step D12) of the sign determination (steps D3 and D4) of the input P2, the input P or the sign inversion of the input P1 (step D13) is selected (step D14).

ステップD15、D16(及びD10)は、除数を正にする処理である。入力Q2の符号判定(ステップD10)の結果に応じて、入力Q又は入力Q1の符号反転(ステップD15)を選択する(ステップD16)。   Steps D15 and D16 (and D10) are processes for making the divisor positive. Depending on the result of the sign determination (step D10) of the input Q2, the input Q or the sign inversion of the input Q1 (step D15) is selected (step D16).

ステップD17〜D23は、被除数を1ビット左にシフトして、最下位ビットに商の符号を設定する処理である。正数にされた被除数を1ビット左にシフトする(ステップD1
7)。$signが1の場合は(ステップD18、D19;真)、その数を選択する(ステップD23;T)。$signが−1の場合は(ステップD19;偽)、ステップD17の結果に1を加えた(最下位ビットを1にした)数(ステップD21)を選択する(ステップD23)。ここでは、図6のSで表される符号は、商が正の場合は0、商が負の場合は1に設定される。
Steps D17 to D23 are processes for shifting the dividend to the left by one bit and setting the sign of the quotient in the least significant bit. The dividend converted to a positive number is shifted to the left by 1 bit (step D1
7). When $ sign is 1 (steps D18 and D19; true), the number is selected (step D23; T). When $ sign is −1 (step D19; false), the number (step D21) in which 1 is added to the result of step D17 (the least significant bit is set to 1) is selected (step D23). Here, the sign represented by S in FIG. 6 is set to 0 when the quotient is positive and to 1 when the quotient is negative.

その間に、除数を被除数の有効ビット数+1ビットだけ左にシフトする(ステップD24、D25)。図3の例では、被除数の有効ビット数が5であるから、6ビット左にシフトする。図7では、4ビット左シフト(ステップD24)と、2ビット左シフト(ステップD25)の2ステップで行っている。これは、シフトビット数が2のべき乗であるという論理回路の特性によるものである。   In the meantime, the divisor is shifted to the left by the effective bit number of the dividend + 1 bit (steps D24 and D25). In the example of FIG. 3, since the effective number of bits of the dividend is 5, it is shifted to the left by 6 bits. In FIG. 7, the shift is performed in two steps, that is, a 4-bit left shift (step D24) and a 2-bit left shift (step D25). This is due to the characteristic of the logic circuit that the number of shift bits is a power of two.

そして、div_xの処理を被除数の有効ビット数分繰り返し実行する(ステップD26〜D35)。ステップD25の結果を一旦B(ステップD28)に出力し、ステップD34の入力B(ステップD35)としているが、ステップD32の下にもう一段mov演算を加えた構成でもよく、除算の結果は同じである。   Then, the process of div_x is repeatedly executed for the number of effective bits of the dividend (steps D26 to D35). The result of step D25 is temporarily output to B (step D28) and used as input B (step D35) of step D34. However, a configuration in which another mov operation is added below step D32 may be used, and the result of division is the same. is there.

最後のdiv_x(ステップD34)の結果から商となる部分を取り出す(ステップD36、D37)。この例では、有効ビット数が5なので、25−1=31とのビットごとの論理積をとる。その間に、商の符号を表すビット(図6のS)を演算結果から取り出す(ステップD38、D39)。商の符号を表すビットが0(商が正)である場合は(ステップD42;真)、ステップD37の結果をそのまま(ステップD41)選択する(ステップD44;T)。商の符号を表すビットが1(商が負)の場合は(ステップD42;偽)、ステップD37の結果を符号反転した(ステップD40)値を選択する。   A quotient portion is extracted from the result of the last div_x (step D34) (steps D36 and D37). In this example, since the number of effective bits is 5, the logical product for each bit of 25-1 = 31 is calculated. Meanwhile, a bit representing the sign of the quotient (S in FIG. 6) is extracted from the calculation result (steps D38 and D39). If the bit representing the sign of the quotient is 0 (the quotient is positive) (step D42; true), the result of step D37 is selected as it is (step D41) (step D44; T). If the bit representing the sign of the quotient is 1 (the quotient is negative) (step D42; false), the value obtained by inverting the sign of the result of step D37 (step D40) is selected.

以上、説明したとおり、ソースプログラム36に記載された被除数の有効ビット数を判定し、有効ビット数を減算の繰り返し数に反映して、div_xの繰り返し数を削減したデータフローグラフ38を生成することができる。この有効ビット数を反映したデータフローグラフ38を用いて、リコンフィギュラブル回路1に演算をマッピングすることによって、その演算に使用されるリコンフィギュラブル回路1の規模を縮小し、同時に処理速度を向上し、消費電力も低減できる。   As described above, the effective bit number of the dividend described in the source program 36 is determined, the effective bit number is reflected in the subtraction repetition number, and the data flow graph 38 in which the div_x repetition number is reduced is generated. Can do. By mapping the operation to the reconfigurable circuit 1 using the data flow graph 38 reflecting the number of effective bits, the scale of the reconfigurable circuit 1 used for the operation is reduced and the processing speed is simultaneously improved. In addition, power consumption can be reduced.

さらに、被除数及び除数の符号を判定して、データフローグラフ38に反映する場合について説明する。図8は、除算における被除数と除数の有効ビット数及び符号を考慮して、除算の処理を展開したフローチャートである。図5のフローチャートに比べて、被除数及び除数の符号判定と、それぞれの正数への変換、及び商の符号設定と符号判定の処理が省略されている。図8のフローチャートは図3のソースプログラム36に基づいている。図8のフローチャートでは、被除数は正数で有効ビット数が5、除数は負数で有効ビット数が6である。   Furthermore, a case where the dividend and the sign of the divisor are determined and reflected in the data flow graph 38 will be described. FIG. 8 is a flowchart in which division processing is developed in consideration of the dividend in division, the number of effective bits of the divisor, and the sign. Compared with the flowchart of FIG. 5, the processes of dividend and divisor sign determination, conversion to positive numbers, quotient sign setting and sign determination are omitted. The flowchart of FIG. 8 is based on the source program 36 of FIG. In the flowchart of FIG. 8, the dividend is a positive number and the number of effective bits is 5, and the divisor is a negative number and the number of effective bits is 6.

図3のソースプログラム36の例では、1行目のコメント欄の記載から、被除数は正数で有効ビット数が5、除数は負数で有効ビット数が6であることを、コンパイル部30が判断できる。そこで、図8のフローチャートで示すように、初めからxを1ビット左にシフトして1を加えた値を$xに代入し、yを符号反転して被除数の有効ビット数+1ビットだけ左にシフトした値を$yに代入することができる(ステップE1)。   In the example of the source program 36 in FIG. 3, the compiling unit 30 determines that the dividend is a positive number and the effective number of bits is 5 and the divisor is a negative number and the effective number of bits is 6 from the description in the comment field on the first line. it can. Therefore, as shown in the flowchart of FIG. 8, x is shifted to the left by 1 bit from the beginning, and a value obtained by adding 1 is substituted into $ x, and y is inverted, and the effective number of dividends + 1 bits to the left The shifted value can be substituted for $ y (step E1).

本実施の形態の方法によれば、被除数と除数の符号を指定するので、商の符号をdiv_xの結果から取り出す処理と、商の符号を判定する処理を省略することができる。その結果図8のフローチャートは、図5のステップC11の後半とステップC12に相当する処理がない。図8のステップE2〜E4は、図5のステップC8〜C10と同じである。
また、図8のステップE5は、図5のステップC11の前半と同じであり、ステップE6は、図5のステップC13と同じである。
According to the method of the present embodiment, since the dividend and the sign of the divisor are specified, it is possible to omit the process of extracting the quotient code from the result of div_x and the process of determining the quotient sign. As a result, the flowchart of FIG. 8 does not have processing corresponding to the latter half of step C11 and step C12 of FIG. Steps E2 to E4 in FIG. 8 are the same as steps C8 to C10 in FIG.
Further, step E5 in FIG. 8 is the same as the first half of step C11 in FIG. 5, and step E6 is the same as step C13 in FIG.

図9は、図8のフローチャートで表される処理を、図3の例に適用した場合のデータフローグラフ(DFG)38の例を示す。図9のDFG38は、図7のDFG38に比べて、被除数及び除数の符号判定と、商の符号設定及び商の符号判定処理が省略されている。   FIG. 9 shows an example of a data flow graph (DFG) 38 when the process represented by the flowchart of FIG. 8 is applied to the example of FIG. Compared to the DFG 38 in FIG. 7, the DFG 38 in FIG. 9 omits dividend and divisor sign determination, quotient code setting, and quotient sign determination processing.

被除数xは、1ビット左にシフトされて(ステップF1)、商の符号を表すビットとして1が加算される(ステップF2、F3)。除数yは、符号反転されて(ステップF4)、被除数の有効ビット数+1ビット(6ビット)だけ左にシフトされる(ステップF5)。   The dividend x is shifted to the left by 1 bit (step F1), and 1 is added as a bit representing the sign of the quotient (steps F2 and F3). The divisor y is sign-inverted (step F4) and shifted to the left by the effective bit number of the dividend + 1 bit (6 bits) (step F5).

ステップF6〜F15は、図7のステップD26〜D35と同様である。最後のdiv_x(ステップF14)の結果から商となる部分を取り出す(ステップF16、F17)。この例では、有効ビット数が5なので、25−1=31とのビットごとの論理積をとる。商が負であることが分かっているので、ステップF17の結果を符号反転して(ステップF18)除算の商retを得る。   Steps F6 to F15 are the same as steps D26 to D35 in FIG. The part which becomes the quotient is taken out from the result of the last div_x (step F14) (steps F16 and F17). In this example, since the number of effective bits is 5, the logical product for each bit of 25-1 = 31 is calculated. Since it is known that the quotient is negative, the result of step F17 is inverted (step F18) to obtain a quotient ret for division.

以上、説明したとおり、被除数及び除数の符号をソースプログラム36の記載から判定して、データフローグラフ38に反映することによって、さらに論理回路の規模を縮小し、処理時間を短縮することができ、消費電力も低減できる。   As described above, the dividend and the sign of the divisor are determined from the description of the source program 36 and reflected in the data flow graph 38, whereby the scale of the logic circuit can be further reduced and the processing time can be shortened. Power consumption can also be reduced.

(実施の形態2)
実施の形態2では、剰余算を例にとって、本発明のリコンフィギュラブル回路1への演算マッピング方法を説明する。図10は、実施の形態2に係るマッピング方法の例として、剰余算のソースプログラム36の一例を示す図である。
(Embodiment 2)
In the second embodiment, an arithmetic mapping method to the reconfigurable circuit 1 of the present invention will be described by taking a remainder calculation as an example. FIG. 10 is a diagram illustrating an example of a remainder source program 36 as an example of the mapping method according to the second embodiment.

剰余算についても筆算の計算方法に分解し、一つの論理回路には簡単な命令のみ持たせて剰余算を実現する方法がある。また、筆算の計算方法による除算の規則性を利用して、一定パターンの演算を一つの演算手段に割り当てる方法が考えられる。   There is also a method of realizing the remainder calculation by dividing the remainder calculation into the calculation method of the handwriting calculation and having only a simple instruction in one logic circuit. In addition, a method of assigning a certain pattern of computation to one computing means using the regularity of division by the calculation method of writing can be considered.

図11は、多段の減算で構成する筆算の演算方法に剰余算を分解したときの、減算一段の処理を表すデータグラフの例である。図11(a)において、入力Pで表される変数xは被除数であり、入力Qで表される変数yは除数である。変数x及びyは2進数表示の整数であり、2の補数で表現されている。変数x及びyは正数であることが条件となっている。また、出力Rで表される変数retは減算一段の処理結果であり、次の減算一段の被除数となる数(この段における剰余)が格納される。   FIG. 11 is an example of a data graph representing a single-stage subtraction process when the remainder calculation is decomposed into a calculation method of writing composed of multi-stage subtraction. In FIG. 11A, a variable x represented by an input P is a dividend, and a variable y represented by an input Q is a divisor. Variables x and y are integers in binary notation and are expressed in two's complement. The condition is that the variables x and y are positive numbers. The variable ret represented by the output R is a processing result of one subtraction stage, and stores a number (remainder at this stage) that becomes a dividend of the next subtraction stage.

剰余算を構成する減算一段は次のように行われる。まず、被除数xをステップG3、G4、G5の3つの論理回路に入力する(ステップG1)。また除数yをステップG4およびG5の2つの論理回路に入力する(ステップG2)。ステップG3では、入力をそのまま保持してステップG6の入力とする。ステップG4では、被除数xから除数yを減算する。ステップG5では、被除数xと除数yの大小を比較する。被除数xが除数yより大きければ、ステップG5の結果は真であり、被除数xが除数y以下であれば偽である。ステップG5の出力の破線は、その値が真理値であることを表す。   The subtraction stage constituting the remainder calculation is performed as follows. First, the dividend x is input to three logic circuits of steps G3, G4, and G5 (step G1). The divisor y is input to the two logic circuits of steps G4 and G5 (step G2). In step G3, the input is held as it is and used as the input in step G6. In step G4, the divisor y is subtracted from the dividend x. In step G5, the dividend x is compared with the divisor y. The result of step G5 is true if the dividend x is greater than the divisor y, and false if the dividend x is less than or equal to the divisor y. The broken line at the output of step G5 indicates that the value is a truth value.

ステップG6では、ステップG5の判定結果に応じてステップG3の出力(被除数x)とステップG4の出力(被除数xから除数yを減算した結果)のいずれかを選択して出力Rとする。ステップG6の「merge」は、破線入力の真偽に応じて、2つの実線入力のいずれかを選択する論理演算を表す。破線入力が真の場合は、実線入力のうちTで示さ
れる入力を選択する。
In Step G6, either the output of Step G3 (dividend x) or the output of Step G4 (the result of subtracting the divisor y from the dividend x) is selected as the output R according to the determination result of Step G5. “Merge” in step G6 represents a logical operation for selecting one of the two solid line inputs in accordance with the truth of the broken line input. When the broken line input is true, the input indicated by T is selected from the solid line inputs.

剰余算を構成する減算一段の処理では、被除数xが除数yより大きければ、被除数xから除数yを減算し、被除数xが除数y以下であれば、被除数xがそのまま出力される。次の減算一段に入力する前に、除数yを1ビット右にシフトする(図11には現れない)。   In the one-stage subtraction process constituting the remainder calculation, if the dividend x is larger than the divisor y, the divisor y is subtracted from the dividend x. If the dividend x is less than or equal to the divisor y, the dividend x is output as it is. The divisor y is shifted one bit to the right before entering the next subtraction stage (not shown in FIG. 11).

図11(b)は、図11(a)の処理をまとめてmod_y(ステップH1)で表すことを示す。mod_yは図11(a)のステップG1〜G6に分解されることを表す。   FIG. 11B shows that the processes of FIG. 11A are collectively expressed as mod_y (step H1). mod_y represents the decomposition into steps G1 to G6 in FIG.

図10にもどって、このソースプログラム36の1行目は、コメント欄である。2行目は、被除数xを除数yで除した剰余を、変数retに代入することを表す。1行目のコメントは、2行目の剰余算において、被除数が正で有効ビット数が5であり、除数が負で有効ビット数が6であることを表す。   Returning to FIG. 10, the first line of the source program 36 is a comment field. The second line indicates that the remainder obtained by dividing the dividend x by the divisor y is substituted into the variable ret. The comment on the first line indicates that in the remainder calculation on the second line, the dividend is positive and the number of effective bits is 5, the divisor is negative and the number of effective bits is 6.

図10は、剰余算における被除数と除数の有効ビット数及び符号を表す例である。ソースプログラム36において、被除数と除数の有効ビット数及び符号をどのように表すかは任意である。例えば、変数の型宣言文の変数の後に/と符号つき整数を追加することによって、変数の有効ビット数と符号を表現することができる。   FIG. 10 is an example showing the dividend, the effective number of bits of the divisor, and the sign in the remainder calculation. In the source program 36, how the dividend and the effective bit number and sign of the divisor are expressed is arbitrary. For example, the effective bit number and sign of a variable can be expressed by adding / and a signed integer after the variable of the variable type declaration statement.

処理装置10のコンパイル部30は、例えば図10に示すソースプログラム36のコメント欄に記載された情報を読み取って、剰余算における被除数と除数の有効ビット数及び符号を判断する。そして、被除数と除数の有効ビット数及び符号に応じたデータフローグラフ(DFG)38を生成する。   For example, the compiling unit 30 of the processing device 10 reads information described in the comment column of the source program 36 illustrated in FIG. 10 and determines the dividend and the effective bit number and sign of the divisor in the remainder calculation. Then, a data flow graph (DFG) 38 corresponding to the dividend, the number of effective bits of the divisor, and the sign is generated.

図12は、剰余算における被除数の有効ビット数を考慮して、剰余算の処理を展開したフローチャートである。図12において、x_BITが被除数xの有効ビット数を表す。図5のフローチャートの各変数は、図10のソースプログラム36に対応している。図13は、図12のフローチャートにおける変数の内容の例を示す。図13では、例として被除数を29、除数を−5としている。図13のステップは、図12のステップ(J1等)に対応している。また、十進数であることを示すdを付した数以外は二進数表示である。図13では、被除数xと除数yは8ビットである。内部変数$x及び$yは16ビットであるが、図13では上位のビットを省略して記載している。図13の例では、除数の絶対値が小さく被除数の有効ビット数が5で、除数を左にビットシフトしても8ビットに収まっているが、一般には除数が8ビットであると、演算の変数としては最大15ビット必要である。   FIG. 12 is a flowchart in which the remainder calculation process is developed in consideration of the number of effective bits of the dividend in the remainder calculation. In FIG. 12, x_BIT represents the number of effective bits of the dividend x. Each variable in the flowchart of FIG. 5 corresponds to the source program 36 of FIG. FIG. 13 shows an example of the contents of variables in the flowchart of FIG. In FIG. 13, the dividend is 29 and the divisor is −5 as an example. The steps in FIG. 13 correspond to the steps in FIG. 12 (J1 etc.). Also, the numbers other than the numbers with d indicating decimal numbers are binary numbers. In FIG. 13, the dividend x and the divisor y are 8 bits. The internal variables $ x and $ y are 16 bits, but the upper bits are omitted in FIG. In the example of FIG. 13, the absolute value of the divisor is small and the effective bit number of the dividend is 5, and even if the divisor is bit-shifted to the left, it remains within 8 bits. However, in general, when the divisor is 8 bits, A variable requires a maximum of 15 bits.

倍精度の変数$yに除数yの値を代入する(ステップJ1)。除数yの符号を判断し(ステップJ2)、除数yが正でなければ(ステップJ2;No)、変数$yを−yとする(ステップJ3)。除数yが正ならば(ステップJ2;Yes)、変数$yはyのままである。図13の例では、変数$yに十進数の−5が代入され(ステップJ1)、変数yが負なので、符号反転されて十進数の5になっている(ステップJ3)。図13では、被除数xを表すために、ステップJ1の行に変数$xとして十進数の29が記されている。   The value of the divisor y is substituted into the double precision variable $ y (step J1). The sign of the divisor y is determined (step J2). If the divisor y is not positive (step J2; No), the variable $ y is set to -y (step J3). If the divisor y is positive (step J2; Yes), the variable $ y remains y. In the example of FIG. 13, the decimal number -5 is substituted into the variable $ y (step J1), and since the variable y is negative, the sign is inverted to become the decimal number 5 (step J3). In FIG. 13, in order to represent the dividend x, the decimal number 29 is written as the variable $ x in the line of Step J1.

被除数xを1ビット左にシフトして、倍精度の変数$xに代入する(ステップJ4)。除算の場合と同様に、$xの最下位ビットは剰余の符号を表す。剰余の符号は、剰余が0である場合(すなわち割り切れる場合)を除いて、被除数の符号と同じである。変数$xの符号を判断し(ステップJ5)、変数$xが正でなければ(ステップJ5;No)、$xの符号を反転し、$xに1を加算する(ステップJ6)。すなわち、被除数を正にして、剰余の符号が負であることを示すために、最下位ビットを1にする。変数$xが正であれば(ステップJ5;Yes)、$xは被除数を1ビット左にシフトした値のままで、最
下位ビットは0である。図13では、被除数xは正なので、符号反転は行われていない。また、被除数の範囲を見やすくするために、$xの最下位ビットをSとして記載している。この場合、Sは0である。
The dividend x is shifted to the left by 1 bit and assigned to the double precision variable $ x (step J4). As in the case of division, the least significant bit of $ x represents the sign of the remainder. The sign of the remainder is the same as the sign of the dividend except when the remainder is 0 (ie, divisible). The sign of variable $ x is determined (step J5). If variable $ x is not positive (step J5; No), the sign of $ x is inverted and 1 is added to $ x (step J6). That is, the least significant bit is set to 1 to indicate that the dividend is positive and the sign of the remainder is negative. If the variable $ x is positive (step J5; Yes), $ x remains the value obtained by shifting the dividend to the left by 1 bit, and the least significant bit is 0. In FIG. 13, since the dividend x is positive, no sign inversion is performed. Further, the least significant bit of $ x is described as S in order to make the dividend range easy to see. In this case, S is 0.

変数$xと桁を合わせるために、変数$yを被除数xの有効ビット数(x_BIT)左にシフトする(ステップJ7)。図13の例では、被除数の有効ビット数が5なので、$
yは5ビット左にシフトされている(ステップJ7)。
In order to match the digit with the variable $ x, the variable $ y is shifted to the left of the effective bit number (x_BIT) of the dividend x (step J7). In the example of FIG. 13, since the number of effective bits of the dividend is 5, $
y is shifted left by 5 bits (step J7).

次に、ステップJ9を被除数xの有効ビット数−1だけ繰り返す(ステップJ8、J9、J10)。ステップJ9は、$xを被除数、$yを除数として、図11に示すmod_yの処理を行った後、$yを1ビット右にシフトする。   Next, step J9 is repeated by the effective bit number -1 of the dividend x (steps J8, J9, J10). Step J9 performs the mod_y process shown in FIG. 11 with $ x as the dividend and $ y as the divisor, and then shifts $ y to the right by 1 bit.

図13の例では、mod_yの処理を4回繰り返す。図13のステップJ8、J9、J10の(1)〜(4)に、各回のステップJ9の処理における$xの結果が示されている。各欄の上段は、mod_yの入力$xと$yを示す。各欄の下段は、被除数$xから除数$yを減算した場合はその結果を示す。$xの下段の空欄は、$xから$yを減算した結果が正でないことを示す。その場合は、$xの値がそのまま、次の回の処理に渡される。また、$yを1ビット右にシフトした結果を下段に示す。   In the example of FIG. 13, the mod_y process is repeated four times. Steps J8, J9, and J10 (1) to (4) in FIG. 13 show the result of $ x in each processing of step J9. The upper part of each column shows mod_y inputs $ x and $ y. The lower part of each column shows the result when the divisor $ y is subtracted from the dividend $ x. The blank in the lower row of $ x indicates that the result of subtracting $ y from $ x is not positive. In that case, the value of $ x is passed to the next processing as it is. The result of shifting $ y to the right by 1 bit is shown in the lower part.

mod_y(ステップJ9)の1回目と2回目では、$xは$yより小さいので、$xがそのまま、次回の処理に渡される。3回目では、$xは$yより大きくなり、$yを減算した値が次の処理に渡される。4回目では、$xは$yより小さく、$xはそのままとなる。   In the first and second mod_y (step J9), since $ x is smaller than $ y, $ x is passed to the next processing as it is. In the third time, $ x becomes larger than $ y, and the value obtained by subtracting $ y is passed to the next processing. In the fourth time, $ x is smaller than $ y, and $ x remains as it is.

さらに、もう一度mod_yの処理を行って、$xを1ビット右にシフトした値を変数retとする(ステップJ11)。また、変数$xの最下位ビットを取り出して、変数$signとする(ステップJ11)。   Further, mod_y is processed once again, and a value obtained by shifting $ x to the right by 1 bit is set as a variable ret (step J11). Further, the least significant bit of the variable $ x is extracted and set as a variable $ sign (step J11).

図13の例では、ステップJ11(mod_yの5回目)では、$xは$yより大きくなり、$yを減算した値が$xとなる。mod_yを5回繰り返した結果、$xの剰余の符号の上位ビット(Sの左)は0000100(十進数の4)となり、剰余となっている(29/(−5)=−5余り4)。retは$xの結果を1ビット右にシフトした値00000100(十進数の4)となる。また、$signは0である。   In the example of FIG. 13, in step J11 (the fifth mod_y), $ x is greater than $ y, and the value obtained by subtracting $ y is $ x. As a result of repeating mod_y five times, the upper bit (left of S) of the remainder code of $ x is 0000100 (decimal number 4), which is a remainder (29 / (− 5) = − 5 remainder 4) . ret is a value 00000100 (decimal number 4) obtained by shifting the result of $ x to the right by 1 bit. Also, $ sign is 0.

最後に、剰余の符号$signが0でない(剰余が負である)場合は(ステップJ12;No)、変数retの符号を反転する(ステップJ13)。$signが0の(剰余が正である)場合は(ステップJ12;Yes)、変数retの符号は反転しない。図6の例では、$signは0なので、retは符号反転されない。   Finally, when the remainder sign $ sign is not 0 (the remainder is negative) (step J12; No), the sign of the variable ret is inverted (step J13). When $ sign is 0 (the remainder is positive) (step J12; Yes), the sign of the variable ret is not reversed. In the example of FIG. 6, since $ sign is 0, ret is not inverted in sign.

以上、説明したように、被除数の有効ビット数を考慮すると、剰余算を筆算に分解した減算処理の繰り返し数を、有効ビット数分だけに削減することができる。有効ビット数を考慮しない場合には、被除数及び除数が8ビットとすると、除数を7ビットシフトして、最大の7回の減算処理を繰り返す必要がある(最上位ビットは符号を表すので、最大有効ビットは7である)。   As described above, when the number of effective bits of the dividend is taken into consideration, the number of repetitions of subtraction processing obtained by dividing the remainder calculation into handwriting can be reduced to the number of effective bits. If the effective number of bits is not taken into consideration, if the dividend and the divisor are 8 bits, the divisor needs to be shifted by 7 bits and the maximum 7 subtractions must be repeated (the most significant bit represents the sign, so the maximum The valid bit is 7).

図13の例では、理解を容易にするため、被除数及び除数を8ビットとしたが、例えば、被除数が16ビットあるいは32ビットの場合には、減算の繰り返し数が最大17又は31となって、有効ビット数を考慮した場合との減算繰り返し数の差が大きく、演算を実効する回路規模と処理時間の差が大きいものとなる。   In the example of FIG. 13, for easy understanding, the dividend and the divisor are 8 bits. For example, when the dividend is 16 bits or 32 bits, the maximum number of subtractions is 17 or 31, The difference in the number of subtraction repetitions from when the number of effective bits is taken into consideration is large, and the difference between the circuit scale for performing the operation and the processing time is large.

図14は、図12のフローチャートで表される処理を、図10の例に適用した場合のデータフローグラフ38の例を示す。図14において、入力Pは被除数xを表す。入力Q、Q1、Q2は除数yを表す。出力Rは除算の剰余retを表す。処理の途中の定数や、一時記憶なども、演算と同じKを付した番号で示す。以下、定数等も含めてステップと呼ぶ。   FIG. 14 shows an example of the data flow graph 38 when the processing represented by the flowchart of FIG. 12 is applied to the example of FIG. In FIG. 14, the input P represents the dividend x. Inputs Q, Q1, and Q2 represent the divisor y. The output R represents the remainder ret of the division. Constants in the middle of processing, temporary storage, and the like are also indicated by the numbers with the same K as the calculation. In the following, steps including constants are called steps.

図14のステップK1〜K3は、除数を正にする処理である。入力Q2の符号判定(ステップK2)の結果に応じて、入力Q又は入力Q1の符号反転(ステップK1)を選択する(ステップK3)。   Steps K1 to K3 in FIG. 14 are processes for making the divisor positive. Depending on the result of the sign determination (step K2) of the input Q2, the input Q or the sign inversion (step K1) of the input Q1 is selected (step K3).

ステップK4〜K12は、被除数を正にして、剰余の符号を決定する処理を表す。入力P(被除数x)を1ビット左にシフトして(ステップK4)、ステップK5とK6に入力する。ステップK5では符号を反転し、1を加える(ステップK7、K9)。ステップK6では値を保持して、ステップK10とK11に入力する。ステップK10はその値を保持する。ステップK11は被除数の符号を判定する。符号判定(ステップK8、K11)の結果に応じて、入力Pを1ビット左にシフトした値(ステップK4、K6、K10)か、符号を反転して1を加えた値(ステップK5、K9)を選択する(ステップK12)。ステップK12の結果は、入力Pが正の場合は1ビット左にシフトした値で最下位ビットが0、入力Pが正でない場合は1ビット左にシフトして符号反転し、最下位ビットを1にした値となる。   Steps K4 to K12 represent processing for determining the sign of the remainder with the dividend being positive. The input P (dividend x) is shifted one bit to the left (step K4) and input to steps K5 and K6. In step K5, the sign is inverted and 1 is added (steps K7 and K9). In step K6, the value is held and input to steps K10 and K11. Step K10 holds the value. Step K11 determines the sign of the dividend. A value obtained by shifting the input P to the left by 1 bit (steps K4, K6, K10) or a value obtained by inverting the sign and adding 1 (steps K5, K9) according to the result of the sign determination (steps K8, K11) Is selected (step K12). The result of step K12 is that when the input P is positive, the value is shifted to the left by 1 bit and the least significant bit is 0. When the input P is not positive, it is shifted to the left by 1 bit and the sign is inverted. It becomes the value made.

その間に、除数を被除数の有効ビット数だけ左にシフトする(ステップK13、K14)。図10の例では、被除数の有効ビット数が5であるから、5ビット左にシフトする。図14では、4ビット左シフト(ステップK13)と、1ビット左シフト(ステップK14)の2ステップで行っている。これは、シフトビット数が2のべき乗であるという論理回路の特性によるものである。   Meanwhile, the divisor is shifted to the left by the number of effective bits of the dividend (steps K13 and K14). In the example of FIG. 10, since the effective bit number of the dividend is 5, the shift is performed to the left by 5 bits. In FIG. 14, the shift is performed in two steps, that is, a 4-bit left shift (step K13) and a 1-bit left shift (step K14). This is due to the characteristic of the logic circuit that the number of shift bits is a power of two.

そして、mod_yの処理と、同時に除数を1ビット右にシフトする処理を被除数の有効ビット数−1だけ繰り返す(ステップK15〜K22)。さらに1回、mod_yの処理を行う(ステップK23)。   Then, the process of mod_y and the process of shifting the divisor to the right by 1 bit are repeated by the effective bit number-1 of the dividend (steps K15 to K22). Further, mod_y is processed once (step K23).

最後のmod_y(ステップK23)の結果から剰余となる部分を取り出す(ステップK25〜K31)。ステップK23の結果を1ビット右にシフトし(ステップK26)、その値と(ステップK29)、その値を符号反転した値(ステップK30)を用意する。その間にステップK23の結果の最下位ビットを取り出して(ステップK25)、その値が0であるか否かを判定する(ステップK27)。そして、ステップK27の結果が真(剰余が正)ならば、ステップK29の出力を選択し、ステップK27の結果が偽(剰余が負)ならば、ステップK30の出力を選択して、剰余ret(出力R)とする(ステップK31)。   A surplus part is extracted from the result of the last mod_y (step K23) (steps K25 to K31). The result of step K23 is shifted to the right by 1 bit (step K26), its value (step K29), and a value obtained by inverting the sign of that value (step K30) are prepared. In the meantime, the least significant bit of the result of step K23 is extracted (step K25), and it is determined whether or not the value is 0 (step K27). If the result of step K27 is true (the remainder is positive), the output of step K29 is selected. If the result of step K27 is false (the remainder is negative), the output of step K30 is selected and the remainder ret ( Output R) (step K31).

以上、説明したとおり、ソースプログラム36に記載された被除数の有効ビット数を判定し、有効ビット数を減算の繰り返し数に反映して、mod_yの繰り返し数を削減したデータフローグラフ38を生成することができる。この有効ビット数を反映したデータフローグラフ38を用いて、リコンフィギュラブル回路1に演算をマッピングすることによって、その演算に使用されるリコンフィギュラブル回路1の規模を縮小し、同時に処理速度を向上し、消費電力も低減できる。   As described above, the effective bit number of the dividend described in the source program 36 is determined, the effective bit number is reflected in the repetition number of subtraction, and the data flow graph 38 in which the repetition number of mod_y is reduced is generated. Can do. By mapping the operation to the reconfigurable circuit 1 using the data flow graph 38 reflecting the number of effective bits, the scale of the reconfigurable circuit 1 used for the operation is reduced and the processing speed is simultaneously improved. In addition, power consumption can be reduced.

さらに、被除数及び除数の符号を判定して、データフローグラフ38に反映する場合について説明する。図15は、剰余算における被除数と除数の有効ビット数及び符号を考慮して、剰余算の処理を展開したフローチャートである。図12のフローチャートに比べて
、被除数及び除数の符号判定と、それぞれの正数への変換、及び剰余の符号設定と符号判定の処理が省略されている。図15のフローチャートは図10のソースプログラム36に基づいている。図15のフローチャートでは、被除数は正数で有効ビット数が5、除数は負数で有効ビット数が6である。
Furthermore, a case where the dividend and the sign of the divisor are determined and reflected in the data flow graph 38 will be described. FIG. 15 is a flowchart in which the remainder calculation process is developed in consideration of the dividend in the remainder calculation, the effective number of bits of the divisor, and the sign. Compared with the flowchart of FIG. 12, the determination of the dividend and the sign of the divisor, the conversion to the respective positive numbers, and the sign setting of the remainder and the sign determination are omitted. The flowchart of FIG. 15 is based on the source program 36 of FIG. In the flowchart of FIG. 15, the dividend is a positive number and the number of effective bits is 5, and the divisor is a negative number and the number of effective bits is 6.

図10のソースプログラム36の例では、1行目のコメント欄の記載から、被除数は正数で有効ビット数が5、除数は負数で有効ビット数が6であることを、コンパイル部30が判断できる。そこで、図15のフローチャートで示すように、初めから除数yを符号反転して$yに代入し(ステップL1)、被除数xを1ビット左にシフトした値を$xに代入する(ステップL2)。$xの符号判定と符号反転処理(図12のステップJ5、J6)は省略されている。$yを被除数の有効ビット数だけ左にシフトする処理から、mod_y及び$yの1ビット右シフトを繰り返す処理(ステップL3〜L6)は、図12のステップJ7〜J10と同じである。   In the example of the source program 36 in FIG. 10, the compiling unit 30 determines that the dividend is a positive number and the effective number of bits is 5, and the divisor is a negative number and the effective number of bits is 6, from the description in the comment field on the first line. it can. Therefore, as shown in the flowchart of FIG. 15, the divisor y is inverted from the beginning and substituted into $ y (step L1), and the value obtained by shifting the dividend x to the left by 1 bit is substituted into $ x (step L2). . The sign determination of $ x and the sign inversion process (steps J5 and J6 in FIG. 12) are omitted. From the process of shifting $ y to the left by the effective bit number of the dividend, the process of repeating mod_y and 1-bit right shift of $ y (steps L3 to L6) is the same as steps J7 to J10 of FIG.

図10の例では、剰余は正であることが分かっているので、最後にmod_yの処理のもう1回行い、結果を1ビット右にシフトして剰余retを得る(ステップL7)。   In the example of FIG. 10, since it is known that the remainder is positive, the process of mod_y is performed once again, and the result is shifted to the right by 1 bit to obtain the remainder ret (step L7).

本実施の形態の方法によれば、被除数と除数の符号を指定するので、剰余の符号をmod_yの結果から取り出す処理と、剰余の符号を判定する処理を省略することができる。その結果図15のフローチャートは、図12のステップJ11の3行目からステップJ13に相当する処理がない。   According to the method of the present embodiment, since the dividend and the sign of the divisor are specified, it is possible to omit the process of extracting the remainder code from the result of mod_y and the process of determining the remainder code. As a result, the flowchart of FIG. 15 does not have processing corresponding to step J13 from the third line of step J11 of FIG.

図16は、図15のフローチャートで表される処理を、図10の例に適用した場合のデータフローグラフ(DFG)38の例を示す。図16のDFG38は、図14のDFG38に比べて、被除数及び除数の符号判定と、剰余の符号設定及び剰余の符号判定処理が省略されている。   FIG. 16 shows an example of a data flow graph (DFG) 38 when the process represented by the flowchart of FIG. 15 is applied to the example of FIG. Compared to the DFG 38 in FIG. 14, the DFG 38 in FIG. 16 omits dividend and divisor sign determination, remainder code setting, and remainder sign determination processing.

除数yは負数なので、符号反転されて(ステップM1)、被除数の有効ビット数(5ビット)だけ左にシフトされる(ステップM2)。被除数xは、1ビット左にシフトされる(ステップM3)。被除数xは正数で、剰余の符号を表すビットは0なので、そのままmod_yの処理(ステップM5)に入力される。被除数xが負数の場合は、1ビット左シフトした後に、符号反転及び1を加算する処理が加わる。   Since the divisor y is a negative number, the sign is inverted (step M1) and shifted to the left by the effective number of bits (5 bits) of the dividend (step M2). The dividend x is shifted to the left by 1 bit (step M3). Since the dividend x is a positive number and the bit representing the remainder sign is 0, it is directly input to the mod_y process (step M5). When the dividend x is a negative number, a sign inversion and a process of adding 1 are added after shifting by 1 bit to the left.

ステップM4〜M12は、図14のステップK15〜K23と同様である。最後のmod_y(ステップM12)の結果を1ビット右にシフトして(ステップM13)除算の剰余retを得る。この例では、図14のステップK24、K25及びK27〜K31は不要である。剰余の符号が負である場合は、剰余の符号反転処理が加わる。   Steps M4 to M12 are the same as steps K15 to K23 in FIG. The result of the last mod_y (step M12) is shifted to the right by 1 bit (step M13) to obtain a remainder ret of division. In this example, steps K24, K25 and K27 to K31 in FIG. 14 are not necessary. When the sign of the remainder is negative, the sign inversion process of the remainder is added.

以上、説明したとおり、被除数及び除数の符号をソースプログラム36の記載から判定して、データフローグラフ38に反映することによって、さらに論理回路の規模を縮小し、処理時間を短縮することができ、消費電力も低減できる。   As described above, the dividend and the sign of the divisor are determined from the description of the source program 36 and reflected in the data flow graph 38, whereby the scale of the logic circuit can be further reduced and the processing time can be shortened. Power consumption can also be reduced.

実施の形態1では除算を例に、実施の形態2では剰余算を例にして本発明の演算マッピング方法について説明したが、本発明の演算マッピング方法は、除算又は剰余算に限られず、演算数の有効ビット数又は符号を利用して、リコンフィギュラブル回路1にマッピングするデータフローを縮小できる演算に適用することができる。例えば、乗算を筆算に分解した加算処理の繰り返し数を、有効ビット数分だけに削減することができる。また、乗算についても符号の判定と符号反転処理を削減することができる。   Although the operation mapping method of the present invention has been described by taking division as an example in the first embodiment and remainder calculation as an example in the second embodiment, the operation mapping method of the present invention is not limited to division or remainder calculation, and the number of operations This can be applied to an operation that can reduce the data flow mapped to the reconfigurable circuit 1 by using the effective bit number or sign. For example, it is possible to reduce the number of repetitions of addition processing, which is a decomposition of multiplication into strokes, to the number of effective bits. Also, with regard to multiplication, it is possible to reduce code determination and code inversion processing.

なお、上記の例では、整数型の変数について説明したが、浮動小数点型の変数について
も、その仮数部の有効ビット数又は符号をソースプログラム36の記載から判定し、それに基づいてリコンフィギュラブル回路1にマッピングする演算処理を削減することができる。
In the above example, the integer type variable has been described. However, also for the floating point type variable, the effective bit number or sign of the mantissa part is determined from the description of the source program 36, and the reconfigurable circuit is based on the determination. The arithmetic processing mapped to 1 can be reduced.

また、上記の例では、入力の有効ビット数、又は有効ビット数及び符号を判定する場合について説明したが、入力の符号のみを判定して、演算処理の符号判定及び符号反転などの処理を削減したデータフローグラフ38を生成してもよい。   In the above example, the case of determining the number of input effective bits, or the number of effective bits and the sign has been described. However, only the input code is determined, and processing such as code determination and sign inversion of arithmetic processing is reduced. The data flow graph 38 may be generated.

その他、前記のハードウエア構成やフローチャートは一例であり、任意に変更及び修正が可能である。   In addition, the hardware configuration and the flowchart described above are merely examples, and can be arbitrarily changed and modified.

本発明の実施の形態に係るリコンフィギュラブル回路を備える処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of a processing apparatus provided with the reconfigurable circuit which concerns on embodiment of this invention. 本発明の実施の形態に係るリコンフィギュラブル回路の構成の例を示すブロック図である。It is a block diagram which shows the example of a structure of the reconfigurable circuit which concerns on embodiment of this invention. 本発明の演算マッピング方法の説明に用いる除算のソースプログラムの一例を示す図である。It is a figure which shows an example of the source program of the division used for description of the operation mapping method of this invention. 多段の減算で構成する筆算の演算方法に除算を分解したときの、減算一段の処理を表すデータグラフの例である。It is an example of the data graph showing the process of one step of subtraction when division is decomposed | disassembled into the calculation method of the pen calculation comprised by multistage subtraction. 除算における被除数の有効ビット数を考慮して、除算の処理を展開したフローチャートである。It is the flowchart which expanded the process of the division in consideration of the effective bit number of the dividend in the division. 図5のフローチャートにおける変数の内容の例を示す図である。It is a figure which shows the example of the content of the variable in the flowchart of FIG. 図5のフローチャートで表される処理を、図3の例に適用した場合のデータフローグラフの例を示す図である。FIG. 6 is a diagram illustrating an example of a data flow graph when the process represented by the flowchart of FIG. 5 is applied to the example of FIG. 3. 除算における被除数と除数の有効ビット数及び符号を考慮して、除算の処理を展開したフローチャートである。It is the flowchart which expanded the process of the division in consideration of the dividend in the division, the effective bit number of the divisor, and the sign. 図8のフローチャートで表される処理を、図3の例に適用した場合のデータフローグラフの例を示す図である。It is a figure which shows the example of a data flow graph at the time of applying the process represented by the flowchart of FIG. 8 to the example of FIG. 本発明の演算マッピング方法の説明に用いる剰余算のソースプログラムの一例を示す図である。It is a figure which shows an example of the source program of the remainder calculation used for description of the operation mapping method of this invention. 多段の減算で構成する筆算の演算方法に剰余算を分解したときの、減算一段の処理を表すデータグラフの例である。It is an example of the data graph showing the process of subtraction one step when decomposing remainder calculation into the calculation method of the pen calculation comprised by multistage subtraction. 剰余算における被除数の有効ビット数を考慮して、剰余算の処理を展開したフローチャートである。It is the flowchart which expanded the process of remainder calculation in consideration of the number of effective bits of the dividend in remainder calculation. 図12のフローチャートにおける変数の内容の例を示す図である。It is a figure which shows the example of the content of the variable in the flowchart of FIG. 図12のフローチャートで表される処理を、図10の例に適用した場合のデータフローグラフの例を示す図である。It is a figure which shows the example of a data flow graph at the time of applying the process represented by the flowchart of FIG. 12 to the example of FIG. 剰余算における被除数と除数の有効ビット数及び符号を考慮して、剰余算の処理を展開したフローチャートである。It is the flowchart which expanded the process of the remainder calculation in consideration of the dividend in the remainder calculation, the effective bit number of the divisor, and the sign. 図15のフローチャートで表される処理を、図10の例に適用した場合のデータフローグラフの例を示す図である。It is a figure which shows the example of a data flow graph at the time of applying the process represented by the flowchart of FIG. 15 to the example of FIG.

符号の説明Explanation of symbols

1 リコンフィギュラブル回路
2 論理回路
3 接続部
10 処理装置
30 コンパイル部
32 設定データ生成部
34 記憶部
36 ソースプログラム
38 データフローグラフ
40 設定データ
1 Reconfigurable circuit
2 logic circuit
3 connections
10 Processing device
30 Compilation section
32 Setting data generator
34 Memory
36 Source program
38 Data flow graph
40 Setting data

Claims (10)

それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能をマッピングする演算マッピング方法であって、
前記所期の演算機能の入力の有効ビット数を指定するビット数指定手段に基づいて、前記所期の演算機能の入力の有効ビット数を判定する有効ビット数判定ステップと、
前記有効ビット数判定ステップで判定された有効ビット数に基づいて、前記所期の演算機能を前記リコンフィギュラブル回路にマッピングするマッピングステップと、
を備えることを特徴とする演算マッピング方法。
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, there is an operation mapping method for mapping an intended operation function,
An effective bit number determination step for determining the effective bit number of the input of the intended arithmetic function based on the bit number designation means for designating the effective bit number of the input of the intended arithmetic function;
A mapping step of mapping the intended arithmetic function to the reconfigurable circuit based on the effective bit number determined in the effective bit number determining step;
An operation mapping method comprising:
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能をマッピングする演算マッピング方法であって、
前記所期の演算機能の入力の符号を指定する符号指定手段に基づいて、前記所期の演算機能の入力の符号を判定する符号判定ステップと、
前記符号判定ステップで判定された符号に基づいて、前記所期の演算機能を前記リコンフィギュラブル回路にマッピングするマッピングステップと、
を備えることを特徴とする演算マッピング方法。
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, there is an operation mapping method for mapping an intended operation function,
A sign determination step for determining a sign of an input of the expected arithmetic function based on a sign specifying means for specifying a sign of the input of the expected arithmetic function;
A mapping step for mapping the intended arithmetic function to the reconfigurable circuit based on the code determined in the code determination step;
An operation mapping method comprising:
前記所期の演算機能は、除算又は剰余算を含み、
前記マッピングステップは、前記除算又は剰余算を、前記除算又は剰余算の被除数の有効ビット数分の減算の繰り返しを含む処理にマッピングする、
ことを特徴とする請求項1に記載の演算マッピング方法。
The intended calculation function includes division or remainder calculation,
The mapping step maps the division or remainder calculation to a process including repetition of subtraction for the effective bit number of the dividend of the division or remainder calculation.
The operation mapping method according to claim 1, wherein:
前記所期の演算機能の入力の有効ビット数を指定するビット数指定手段は、前記所期の演算機能をプログラム言語で表現したソースプログラムであることを特徴とする請求項1又は3に記載の演算マッピング方法。   The number-of-bits designating means for designating a valid number of input bits of the intended arithmetic function is a source program expressing the intended arithmetic function in a programming language. Operation mapping method. 前記有効ビット数判定ステップは、前記ソースプログラムのコメントの記載に基づいて、入力の有効ビット数を判定することを特徴とする請求項4に記載の演算マッピング方法。   5. The operation mapping method according to claim 4, wherein the effective bit number determination step determines an effective bit number of an input based on a description of a comment of the source program. 前記所期の演算機能の入力の符号を指定する符号指定手段は、前記所期の演算機能をプログラム言語で表現したソースプログラムであることを特徴とする請求項2に記載の演算マッピング方法。   3. The operation mapping method according to claim 2, wherein the code designating means for designating an input code of the desired operation function is a source program expressing the desired operation function in a program language. 前記符号判定ステップは、前記ソースプログラムのコメントの記載に基づいて、入力の符号を判定することを特徴とする請求項6に記載の演算マッピング方法。   The operation mapping method according to claim 6, wherein the code determination step determines an input code based on a comment description of the source program. 請求項1乃至7のいずれかに記載の演算マッピング方法の結果から得られたデータにしたがって動作することを特徴とするリコンフィギュラブル回路。   A reconfigurable circuit which operates according to data obtained from the result of the operation mapping method according to claim 1. それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能の動作を設定するために必要なデータフローグラフであって、
前記所期の演算機能が、該演算の入力のビット数に応じた繰り返し演算に分解される場合に、前記所期の演算機能をプログラム言語で表現したソースプログラムに基づいて判定される、前記所期の演算機能の入力の有効ビット数に対応して、前記繰り返し演算の繰り
返し回数を削減したことを特徴とするデータフローグラフ。
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, a data flow graph necessary for setting the operation of the expected calculation function,
When the desired calculation function is decomposed into repetitive calculations according to the number of input bits of the calculation, the predetermined calculation function is determined based on a source program expressing the calculation function in a programming language. A data flow graph, wherein the number of repetitions of the repetitive operation is reduced in correspondence with the number of valid bits of the input of the operation function of the period.
それぞれが複数の算術論理演算機能を選択的に実行可能な複数の論理回路から構成される演算部と、前記複数の論理回路の間の接続関係を保持する接続部と、を備えるリコンフィギュラブル回路に、所期の演算機能の動作を設定するために必要なデータフローグラフであって、
前記所期の演算機能の入力の符号が正負いずれの場合にも対応して処理されるように、前記所期の演算機能が前記入力の符号判定処理を含む場合に、前記所期の演算機能をプログラム言語で表現したソースプログラムに基づいて判定される、前記所期の演算機能の入力の符号に対応して、前記符号判定処理を省略したことを特徴とするデータフローグラフ。
A reconfigurable circuit comprising: an arithmetic unit composed of a plurality of logic circuits each capable of selectively executing a plurality of arithmetic logic operation functions; and a connection unit for maintaining a connection relationship between the plurality of logic circuits. In addition, a data flow graph necessary for setting the operation of the expected calculation function,
When the expected calculation function includes the input sign determination process so that the input sign of the expected calculation function is processed corresponding to either positive or negative, the expected calculation function A data flow graph in which the code determination process is omitted corresponding to a code of an input of the intended arithmetic function, which is determined based on a source program expressed in a program language.
JP2006063741A 2006-03-09 2006-03-09 Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph Active JP4597075B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006063741A JP4597075B2 (en) 2006-03-09 2006-03-09 Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006063741A JP4597075B2 (en) 2006-03-09 2006-03-09 Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph

Publications (2)

Publication Number Publication Date
JP2007241694A JP2007241694A (en) 2007-09-20
JP4597075B2 true JP4597075B2 (en) 2010-12-15

Family

ID=38587172

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006063741A Active JP4597075B2 (en) 2006-03-09 2006-03-09 Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph

Country Status (1)

Country Link
JP (1) JP4597075B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5025521B2 (en) * 2008-02-15 2012-09-12 株式会社東芝 Semiconductor device
CN111930680B (en) * 2020-09-17 2021-02-23 北京清微智能科技有限公司 Reconfigurable array mapping method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002175179A (en) * 2000-12-07 2002-06-21 Matsushita Electric Ind Co Ltd Integer dividing method and integer dividing device
JP2004220377A (en) * 2003-01-15 2004-08-05 Sanyo Electric Co Ltd Reconfigurable circuit, and integrated circuit device and data conversion device capable of using it
JP2004302856A (en) * 2003-03-31 2004-10-28 Sanyo Electric Co Ltd Integrated circuit device and data configuring device for device thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002175179A (en) * 2000-12-07 2002-06-21 Matsushita Electric Ind Co Ltd Integer dividing method and integer dividing device
JP2004220377A (en) * 2003-01-15 2004-08-05 Sanyo Electric Co Ltd Reconfigurable circuit, and integrated circuit device and data conversion device capable of using it
JP2004302856A (en) * 2003-03-31 2004-10-28 Sanyo Electric Co Ltd Integrated circuit device and data configuring device for device thereof

Also Published As

Publication number Publication date
JP2007241694A (en) 2007-09-20

Similar Documents

Publication Publication Date Title
US7171535B2 (en) Serial operation pipeline, arithmetic device, arithmetic-logic circuit and operation method using the serial operation pipeline
EP3327566B1 (en) Encoding and decoding variable length instructions
JP4275013B2 (en) Data flow graph processing device, processing device, reconfigurable circuit.
JP4597075B2 (en) Operation mapping method to reconfigurable circuit, reconfigurable circuit, and data flow graph
CN111047034A (en) On-site programmable neural network array based on multiplier-adder unit
JP4011007B2 (en) Integrated circuit device and processing device having reconfigurable circuit
CN111931441A (en) Method, device and medium for establishing FPGA rapid carry chain time sequence model
US11836460B2 (en) Error bounded multiplication by invariant rationals
JP4413052B2 (en) Data flow graph processing apparatus and processing apparatus
JP4553615B2 (en) Processing equipment
JP4260197B2 (en) Processing equipment
JP3896083B2 (en) Reconfigurable circuit and integrated circuit device using it
JP4669781B2 (en) Processing equipment
JP4601567B2 (en) Data flow graph generation method and processing apparatus
JP4357326B2 (en) Reconfigurable circuit and processing device
JP2004220377A (en) Reconfigurable circuit, and integrated circuit device and data conversion device capable of using it
JP4330472B2 (en) Processing equipment
JP5116499B2 (en) Arithmetic processing circuit
US6544806B1 (en) Fast computation of truth tables
JP4553614B2 (en) Processing equipment
Conde et al. Reconfigurable block floating point processing elements in Virtex platforms
JP2007172285A (en) Reconfigurable circuit and processor
JP4562678B2 (en) Data flow graph reconstruction device, setting data generation device for reconfigurable circuit, and processing device
JP5115307B2 (en) Semiconductor integrated circuit
JP2010086041A (en) Multiplication method, processor, and arithmetic unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081110

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

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

R151 Written notification of patent or utility model registration

Ref document number: 4597075

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

Year of fee payment: 3