JP3112662B2 - Multiplier - Google Patents
MultiplierInfo
- Publication number
- JP3112662B2 JP3112662B2 JP10174573A JP17457398A JP3112662B2 JP 3112662 B2 JP3112662 B2 JP 3112662B2 JP 10174573 A JP10174573 A JP 10174573A JP 17457398 A JP17457398 A JP 17457398A JP 3112662 B2 JP3112662 B2 JP 3112662B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- multiplier
- circuit
- bit
- bits
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、乗算器に関するも
のである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplier.
【0002】[0002]
【従来の技術】ディジタルデータを乗算する乗算器は、
単体のLSIとして用いられるほか、DSP(digital
signal processor)などのLSIへの内蔵用としても多
く用いられている。この種の乗算器は、乗算ビット幅の
増大や用途の多様化等に伴い、一層の高速化や、回路規
模、チップ面積の低減が求められ、種々の乗算方法を適
用した回路方式が提案されている。2. Description of the Related Art A multiplier for multiplying digital data includes:
In addition to being used as a single LSI, DSP (digital
It is also widely used for incorporation into LSIs such as signal processors. This type of multiplier is required to further increase the speed, reduce the circuit scale, and reduce the chip area with the increase of the multiplication bit width and diversification of applications, and a circuit system to which various multiplication methods are applied has been proposed. ing.
【0003】例えば、最も高速な乗算方法の一つであ
る、2ビットブースのリコード方式を用いた乗算方法
が、「日経エレクトロニクス」(1978年5月29日
号76頁〜89頁)に示されている。この乗算方法は、
以下のようなアルゴリズムによって乗算の高速化等を図
っている。例えば、mビット幅の乗数Yと、nビット幅
の被乗数Xとを乗算する場合、乗数Yは、2の補数表現
で以下のように表される。For example, one of the fastest multiplication methods, a multiplication method using a 2-bit booth recoding method is shown in "Nikkei Electronics" (May 29, 1978, pp. 76-89). ing. This multiplication method is
The following algorithm is used to speed up multiplication and the like. For example, when multiplying a multiplier Y having an m-bit width by a multiplicand X having an n-bit width, the multiplier Y is represented by a two's complement expression as follows.
【0004】 但し、ym =ys qは、mが偶数の場合q=m/2、奇数の場合q=(m
−1)/2また、y0 は、便宜上の値で、y0 =0 で
ある。[0004] Here, y m = y s q is such that when m is an even number, q = m / 2, and when m is an odd number, q = (m
-1) / 2 Further, y 0 is a value for convenience, and y 0 = 0.
【0005】そこで、XとYの積Pは、 となる。Therefore, the product P of X and Y is Becomes
【0006】ここで、Y2i,Y2i+1,Y2i+2は、それぞ
れ0または1の値をとるから、(Y 2i+Y2i+1−2Y
2i+2)は(表1)に示すように、0、±1、または±2
になり、各部分積は、0、±X、または±2Xの何れか
に22iを乗じたものになる。Here, Y2i, Y2i + 1, Y2i + 2Each
Since it takes a value of 0 or 1, (Y 2i+ Y2i + 1-2Y
2i + 2) Indicates 0, ± 1, or ± 2 as shown in (Table 1).
And each partial product is either 0, ± X, or ± 2X
To 22iMultiplied by
【0007】[0007]
【表1】 [Table 1]
【0008】そこで、各部分積を生成する回路は、主と
して被乗数±Xを2倍するために1ビットシフトするシ
フタと、仮数(0、±X、または±2X)を22i倍(重
み付け)するために2ビットずつシフトするシフタとか
ら構成することができる。また、部分積の総和を求める
回路の論理段数は、部分積の数が、q=m/2個(mが
偶数)、またはq=(m−1)/2個(mが奇数)とな
るので、2入力加算器を2分木状に接続する場合、概l
og2 m−1段(mが偶数)またはlog 2 (m−1)
−1段(mが奇数)になる。Therefore, the circuit for generating each partial product mainly includes
And shift one bit to double the multiplicand ± X
Lid and mantissa (0, ± X, or ± 2X)2iDouble (heavy
Shifter that shifts two bits at a time
Can be configured. Also find the sum of the partial products
The number of logical stages of the circuit is such that the number of partial products is q = m / 2 (m is
(Even number) or q = (m-1) / 2 (m is an odd number)
Therefore, when connecting a two-input adder in a binary tree form,
ogTwom-1 stage (m is an even number) or log Two(M-1)
-1 stage (m is an odd number).
【0009】また、2ビットブースのリコード方式以外
の高速乗算器として、冗長二進数による乗算器が特許公
開平03−017737により提案されている。上記の
ような乗算器では、例えば乗数が24ビットの場合、部
分積数が12個、論理段数が4段となる。一方、乗算速
度の高速化や回路規模の低減は、上記のような乗算アル
ゴリズムの性能向上によるものに限らず、論理素子レベ
ルでの回路の最適化などによっても図られている。As a high-speed multiplier other than the 2-bit booth recoding method, a multiplier using a redundant binary number is proposed in Japanese Patent Application Laid-Open No. 03-0177737. In the multiplier as described above, for example, when the multiplier is 24 bits, the number of partial products is 12, and the number of logical stages is 4. On the other hand, the increase of the multiplication speed and the reduction of the circuit scale are not limited to the improvement of the performance of the multiplication algorithm as described above, but also the optimization of the circuit at the logic element level.
【0010】すなわち、近年では、乗算器や乗算器を含
む論理回路は、多くの場合自動設計装置を用いて設計さ
れる。この種の装置においては、論理素子レベルの回路
情報をチップに実装される実装素子レベルの回路情報に
展開する際などに、回路の一部をより論理素子や論理段
数の少ない等価な回路に置換するなどして、冗長な回路
部分の削除等を行うようになっている。That is, in recent years, a multiplier and a logic circuit including the multiplier are often designed using an automatic design apparatus. In this type of device, when developing circuit information at the logic element level into circuit information at the mounting element level mounted on the chip, a part of the circuit is replaced with an equivalent circuit having a smaller number of logic elements and logic stages. For example, redundant circuit portions are deleted.
【0011】このような自動設計装置は、回路に要求さ
れる機能がハードウェア記述言語等により表された機能
記述情報が入力されると、これを、主として、機能のみ
が定義された仮想の機能素子から成る回路を表す、内部
表現形式の機能回路情報に変換し、さらに、実際に存在
する論理素子から成る回路を示す論理回路情報に変換し
た後、特定のテクノロジーで実装される実装素子が割り
付けられた回路を示す実装回路情報を生成するようにな
っている。In such an automatic design apparatus, when function description information in which a function required for a circuit is represented in a hardware description language or the like is input, the function is mainly converted into a virtual function in which only the function is defined. After converting to functional circuit information in an internal representation format that represents a circuit composed of elements, and then converting it to logic circuit information that indicates a circuit composed of actually existing logical elements, the mounted elements implemented with a specific technology are allocated The generated circuit information indicating the specified circuit is generated.
【0012】また、上記機能記述情報によって示される
機能に乗算が含まれる場合には、例えば、あらかじめハ
ードウェアマクロとしてライブラリに登録された所定の
ビット幅(4、8、17、32ビットなど)の汎用的な
乗算器が適用可能であれば、それが割り付けられたり、
ライブラリに登録されていない乗算器が必要な場合に
は、加算シフト型の乗算器などを構成する論理回路が新
たに生成されたりするようになっている。なお、乗数、
または被乗数の何れか一方が定数で、かつ、その値が2
のべき乗の場合には、通常、シフタを用いる回路が生成
されるようになっている。When the function indicated by the function description information includes multiplication, for example, a predetermined bit width (4, 8, 17, 32 bits, etc.) registered in a library as a hardware macro in advance If a general-purpose multiplier is applicable, it is assigned,
When a multiplier that is not registered in the library is required, a logic circuit that constitutes an addition-shift type multiplier or the like is newly generated. Note that the multiplier,
Alternatively, one of the multiplicands is a constant and the value is 2
In the case of exponentiation, a circuit using a shifter is usually generated.
【0013】ところで、乗数が2のべき乗でない定数で
ある場合、乗数における値が0のビットに対応する部分
積は全ビットの値が0になるので、そのような部分積を
生成する回路や、加算する回路は常に一定の信号状態に
なる。そこで、従来の自動設計装置では、一旦、乗数お
よび被乗数が変数である乗算回路と、定数を発生させる
回路とを生成した後、前述のように論理素子レベルでの
回路の最適化によって、例えば常に信号レベルが一定に
なる論理素子の削除等を行うようになっていた。When the multiplier is a constant that is not a power of 2, the partial product corresponding to a bit having a value of 0 in the multiplier has a value of all bits of 0. Therefore, a circuit for generating such a partial product, The adding circuit always has a constant signal state. Therefore, in the conventional automatic design device, after once generating a multiplication circuit in which the multiplier and the multiplicand are variables and a circuit for generating a constant, as described above, for example, by optimizing the circuit at the logic element level, for example, Deletion or the like of a logic element having a constant signal level has been performed.
【0014】[0014]
【発明が解決しようとする課題】しかしながら、従来の
自動設計装置においては、論理素子レベルでの回路の最
適化は、例えばあらかじめ設定された所定のパターンに
合致する回路部分だけが、より論理素子や論理段数の少
ない等価な回路に置換されることにより行われるため、
乗数または被乗数が定数である場合にこのような最適化
を行っても、必ずしも回路全体の論理素子数等が最少に
なるような回路を生成することはできないという問題点
を有していた。特に、部分積を加算するために2入力加
算器を2分木状に接続する場合、全ビットの値が0にな
る部分積の加算回路に関連する部分を省略すると、通
常、2分木のバランスが崩れるので、部分的な回路の置
換によって論理素子数や論理段数を最少にすることなど
が困難である。However, in the conventional automatic design apparatus, optimization of a circuit at a logic element level requires, for example, that only a circuit portion that matches a predetermined pattern set in advance has a larger logic element or circuit element. It is performed by replacing with an equivalent circuit with a small number of logic stages,
Even when such optimization is performed when the multiplier or the multiplicand is a constant, there is a problem that a circuit that minimizes the number of logic elements in the entire circuit cannot always be generated. In particular, when a two-input adder is connected in the form of a binary tree in order to add a partial product, if a portion related to a partial product addition circuit in which all bits have a value of 0 is omitted, usually a binary tree is used. Since the balance is lost, it is difficult to minimize the number of logic elements and the number of logic stages by partial circuit replacement.
【0015】本発明は上記の点に鑑み、乗数または被乗
数が定数である乗算を行う、論理素子数や論理段数が少
なくてLSI化に好適な高速乗算器の提供を目的として
いる。SUMMARY OF THE INVENTION In view of the above, it is an object of the present invention to provide a high-speed multiplier which performs multiplication in which a multiplier or a multiplicand is a constant, has a small number of logic elements and logic stages, and is suitable for LSI.
【0016】[0016]
【課題を解決するための手段】上記目的を達成するた
め、本発明は、nビットの数を表す信号Xとmビットの
定数を表す信号Aとを入力としてn+mビットの積Pを
出力する乗算器であって、前記定数Aの論理否定信号A
0と前記信号Xを入力として、その積を表す信号P0を
出力する乗算手段と、前記信号Xと前記信号P0を入力
として、X・(2m −1)−P0を演算し前記信号Pと
して出力する演算手段とを有することを特徴としてい
る。In order to achieve the above object, the present invention provides a multiplication that receives a signal X representing an n-bit number and a signal A representing an m-bit constant and outputs a product P of n + m bits. A logical NOT signal A of the constant A
A multiplying means for inputting 0 and the signal X and outputting a signal P0 representing the product thereof; inputting the signal X and the signal P0 to calculate X · (2m -1) -P0 and outputting the signal P Computing means for performing the operation.
【0017】また、nビットの数を表す信号Xとmビッ
トの定数を表す信号Aとを入力としてn+mビットのそ
の積Pを出力する乗算器であって、前記定数Aの論理否
定信号A0と前記信号Xを入力として、その積を表す信
号P0を出力する乗算手段と、前記信号Xを入力とし
て、X・(2m −1)を表す信号P01を出力する演算
手段と、前記信号P0と前記信号P01を入力として、
P01−P0の値を表す信号を出力する減算手段とを有
することを特徴としている。A multiplier which inputs a signal X representing an n-bit number and a signal A representing an m-bit constant and outputs a product P of n + m bits, wherein a logical NOT signal A0 of the constant A Multiplying means for receiving the signal X and outputting a signal P0 representing the product thereof; calculating means for receiving the signal X and outputting a signal P01 representing X · (2m -1); With the signal P01 as input,
A subtractor for outputting a signal representing the value of P01-P0.
【0018】また、nビットの数を表す信号Xとmビッ
トの定数を表す信号Aとを入力としてn+mビットのそ
の積Pを出力する乗算器であって、前記定数Aの論理否
定信号A0と前記信号Xを入力として、その積を表す信
号P0を出力する乗算手段と、前記信号P0を入力とし
て、前記信号P0の論理否定信号Q0を出力する論理否
定手段と、前記信号Xを入力として、X・(2m −1)
+1を表す信号Q6を出力する演算手段と、前記信号Q
0と前記信号Q6を入力として、前記信号Q0と前記信
号Q6の和を表す信号を前記信号Pとして出力する加算
手段とを有することを特徴としている。A multiplier which receives a signal X representing an n-bit number and a signal A representing an m-bit constant and outputs a product P of n + m bits, wherein a logical NOT signal A0 of the constant A Multiplying means for inputting the signal X and outputting a signal P0 representing the product thereof; logical negating means for receiving the signal P0 and outputting a logical NOT signal Q0 of the signal P0; and receiving the signal X as an input. X · (2m -1)
Arithmetic means for outputting a signal Q6 representing +1;
It is characterized in that there is provided an adder which receives 0 and the signal Q6 as inputs and outputs a signal representing the sum of the signal Q0 and the signal Q6 as the signal P.
【0019】[0019]
【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて説明する。 (実施例1)図1は論理回路の自動設計システムのハー
ドウェア構成の一例を示すブロック図である。Embodiments of the present invention will be described below with reference to the drawings. Embodiment 1 FIG. 1 is a block diagram showing an example of a hardware configuration of an automatic logic circuit design system.
【0020】同図において、入力装置11は、自動設計
システムに設計させようとする回路についての機能記述
情報などを入力するものである。この入力装置11とし
ては、キーボードや、マウス、ライトペン、カードリー
ダー、スケマティックエントリーシステムなどが用いら
れる。また、直接オペレータの操作によって入力するも
のに限らず、あらかじめ上記のような装置によって入力
された情報をファイルとして記憶する磁気ディスク装置
や、他の装置から送られる情報を受信するネットワーク
装置などを用いることもできる。In FIG. 1, an input device 11 is for inputting function description information and the like on a circuit to be designed by an automatic design system. As the input device 11, a keyboard, a mouse, a light pen, a card reader, a schematic entry system, or the like is used. Further, the present invention is not limited to a device directly input by an operator's operation, and a magnetic disk device that stores information input by the above-described device in advance as a file or a network device that receives information sent from another device is used. You can also.
【0021】中央処理装置12は、後述する種々の処理
を実行することにより、論理合成や回路最適化処理など
の回路設計処理を行うものである。出力装置13は、中
央処理装置12の設計処理結果である回路情報や、処理
に関する各種情報などを出力するものである。この出力
装置13としては、グラフィックディスプレイや、キャ
ラクタディスプレイ、プリンタ、プロッタなどが用いら
れる。また、入力装置11と同様に、磁気ディスク装置
やネットワーク装置なども用いることができる。The central processing unit 12 performs various processes described later to perform circuit design processing such as logic synthesis and circuit optimization processing. The output device 13 outputs circuit information, which is a design processing result of the central processing unit 12, and various information related to processing. As the output device 13, a graphic display, a character display, a printer, a plotter, or the like is used. Further, similarly to the input device 11, a magnetic disk device, a network device, or the like can be used.
【0022】記憶装置14は、例えば図2に示すよう
に、設計処理記憶部21、素子ライブラリ記憶部22、
および回路データ記憶部23を有し、入力装置11から
入力された情報や、回路設計処理に関するプログラムや
データなどを記憶するものである。より詳しくは、例え
ば、設計処理記憶部21には、前記中央処理装置12が
設計処理を実行するための種々の処理プログラムや、そ
れらの処理で適用される変換規則情報などが格納され
る。As shown in FIG. 2, for example, the storage device 14 includes a design processing storage unit 21, an element library storage unit 22,
And a circuit data storage unit 23 for storing information input from the input device 11, programs and data relating to circuit design processing, and the like. More specifically, for example, the design processing storage unit 21 stores various processing programs for the central processing unit 12 to execute the design processing, conversion rule information applied in the processing, and the like.
【0023】また、素子ライブラリ記憶部22には、機
能素子、論理素子、および実装素子などの機能や、面
積、遅延時間、駆動力等を示す情報が素子ライブラリと
して格納される。回路データ記憶部23には、入力装置
11から入力される機能記述情報や、回路設計処理によ
って生成される機能回路情報、論理回路情報、および実
装回路情報などが格納される。The element library storage unit 22 stores information such as functions such as functional elements, logic elements, and mounted elements, and information indicating an area, a delay time, a driving force, and the like as an element library. The circuit data storage unit 23 stores function description information input from the input device 11, function circuit information generated by circuit design processing, logic circuit information, mounted circuit information, and the like.
【0024】ここで、上記機能記述情報は、主として、
回路に要求される機能がハードウェア記述言語等により
表された情報である。また、機能回路情報は、主とし
て、機能のみが定義された仮想の機能素子から成る回路
を内部表現形式で表す情報である。論理回路情報は、製
造プロセスや設計手法などに殆ど依存しない論理レベル
の、実際に存在する論理素子から成る回路を示す情報で
ある。また、実装回路情報は、製造プロセスや設計手法
などに密に依存し、特定のテクノロジーで実装される実
装素子(例えば、CMOS型トランジスタによるスタン
ダードセルや、ゲートアレイのライブラリ中のセル、あ
るいはTTL、ECLなどの製造プロセスに依存する素
子)が割り付けられた回路を示す情報である。Here, the function description information mainly includes
The function required for the circuit is information expressed in a hardware description language or the like. The function circuit information is mainly information representing a circuit composed of virtual function elements in which only functions are defined in an internal representation format. The logic circuit information is information indicating a circuit composed of actually existing logic elements at a logic level that hardly depends on a manufacturing process, a design method, or the like. Further, the mounted circuit information is highly dependent on a manufacturing process, a design method, and the like, and is based on a mounted element (for example, a standard cell using a CMOS transistor, a cell in a library of a gate array, or a TTL, This is information indicating a circuit to which an element that depends on a manufacturing process such as ECL is allocated.
【0025】上記機能素子の一例を(表2)に示す。例
えば、複数ビットの加算器等は、複数ビット幅の2数を
加算等する機能素子を表す。コンパレータは、複数ビッ
ト幅の2数を比較する機能素子を表す。複数ビットのa
ndは、複数ビット幅の2つの信号の各ビットごとの論
理積を求める機能素子を表す。また、複数ビットのin
vは、複数ビット幅の信号の各ビットごとの論理否定を
求める機能素子を表す。An example of the above functional element is shown in (Table 2). For example, a multi-bit adder or the like represents a functional element that adds two numbers having a multi-bit width. The comparator represents a functional element that compares two numbers having a plurality of bit widths. Multi-bit a
nd represents a functional element for obtaining a logical product of each bit of two signals having a plurality of bit widths. Also, a multi-bit in
v represents a functional element that obtains logical negation for each bit of a signal having a plurality of bits.
【0026】また、リッパ、およびミキサは、変換処理
の過程において、複数ビットの信号を便宜上まとめて扱
ったり、分割したりすることを示す機能素子で、最終的
に実装素子から成る回路に変換され、全ての信号が1ビ
ットの信号ごとに扱われる際には、削除される機能素子
である。一般に、これらの機能素子に直接対応する、実
装素子から成る回路は存在せず、一旦それらの機能を実
現する論理素子から成る回路に展開された後に、実装素
子から成る回路に置き換えられる。The ripper and the mixer are functional elements indicating that a plurality of bits of signals are collectively handled or divided for the sake of convenience in the course of the conversion process, and are finally converted into a circuit composed of mounted elements. , Are all functional elements that are deleted when all signals are handled for each 1-bit signal. In general, there is no circuit composed of mounted elements that directly correspond to these functional elements, and once developed into a circuit composed of logic elements that realize those functions, it is replaced with a circuit composed of mounted elements.
【0027】[0027]
【表2】 [Table 2]
【0028】また、論理素子の一例を(表3)に示す。
表3で、例えば、1ビット同士の加算器は、ビット幅が
1ビットである2つの信号を加算する素子を表す。ま
た、1ビットのandは、ビット幅が1ビットである2
つ以上の信号の論理積を求める論理素子を表す。これら
の論理素子に対応する、実装素子から成る回路は、あら
かじめ定められており、設計処理の最終段階において置
き換えが行われる。An example of the logic element is shown in (Table 3).
In Table 3, for example, a 1-bit adder represents an element that adds two signals having a bit width of 1 bit. Also, 1-bit and is 2 bits whose bit width is 1 bit.
Represents a logic element for calculating the logical product of two or more signals. Circuits composed of mounting elements corresponding to these logic elements are predetermined, and are replaced in the final stage of the design processing.
【0029】[0029]
【表3】 [Table 3]
【0030】次に、回路データ記憶部23に格納される
機能記述情報や、機能回路情報の具体例について説明す
る。これらの情報は、例えばテキストデータとして格納
される。例えば図3(a)に示すような1ビット2入力
のandゲートと1ビット3入力の加算器とから成る回
路は、図3(b)に示すような機能記述情報として記述
される。また、この機能記述情報は、設計処理によっ
て、例えば図3(c)に示すような機能回路情報、また
は論理回路情報に変換される。なお、このように機能記
述情報が論理素子から構成される回路に直接対応する場
合には、機能回路情報と論理回路情報とは特に区別がな
い場合がある。Next, specific examples of function description information and function circuit information stored in the circuit data storage unit 23 will be described. These pieces of information are stored as, for example, text data. For example, a circuit composed of a 1-bit 2-input AND gate and a 1-bit 3-input adder as shown in FIG. 3A is described as function description information as shown in FIG. 3B. This function description information is converted into, for example, functional circuit information or logic circuit information as shown in FIG. When the function description information directly corresponds to a circuit composed of logic elements, the function circuit information and the logic circuit information may not be particularly distinguished.
【0031】この例では、機能回路情報は、個々の素子
を識別するための識別名31、および属性コード32と
属性値33との複数の対を含んでいる。各対の属性コー
ド32と属性値33とは“::”で対応づけられ、各対
は“;”で区切られ、識別名31は、“:::”によっ
て他のデータと区別されている。属性コード32として
は、“a_kind_of”、“input”、“ou
tput”等があり、それぞれ、対応する属性値33
が、素子の種類、入力信号、出力信号に関するものであ
ることを表している。In this example, the functional circuit information includes an identification name 31 for identifying each element, and a plurality of pairs of an attribute code 32 and an attribute value 33. The attribute code 32 and the attribute value 33 of each pair are associated with “::”, each pair is separated by “;”, and the identifier 31 is distinguished from other data by “:::”. . As the attribute code 32, “a_kind_of”, “input”, “ou”
put ", etc., and the corresponding attribute value 33
Indicates the type of element, input signal, and output signal.
【0032】すなわち、gate01の素子はadde
r(加算器)であり、その入力信号はsig1,sig
2,sig3、出力信号はsig4,sig5である一
方、gate02の素子はandであり、その入力信号
はsig6,sig7、出力信号はsig3であること
が表されている。また、gate01とgate02と
は信号sig3によって接続されていることが表されて
いる。That is, the element of gate01 is adde
r (adder) whose input signals are sig1, sig
2, sig3 and the output signal are sig4 and sig5, while the element of gate02 is and, the input signals are sig6 and sig7, and the output signal is sig3. Also, it is shown that gate01 and gate02 are connected by a signal sig3.
【0033】また、同様に、図4(a)に示すような、
機能素子である乗算器51と、値が130(16進表記
で82h)である8ビット幅の定数の乗数が入力される
信号線52と、8ビット幅の被乗数aが入力される信号
線53と、16ビット幅の乗算結果bが出力される信号
線54とから構成される回路は、図4(b)に示すよう
な機能記述情報として記述され、図4(c)に示すよう
な機能回路情報に変換される。なお、ここで、乗数、被
乗数の区別は変換処理における便宜上のものである。Similarly, as shown in FIG.
A multiplier 51 that is a functional element, a signal line 52 to which a multiplier of an 8-bit width constant having a value of 130 (82h in hexadecimal notation) is input, and a signal line 53 to which an 8-bit width multiplicand a is input A circuit composed of a signal line 54 to which a multiplication result b having a 16-bit width is output is described as function description information as shown in FIG. 4B, and a function as shown in FIG. Converted to circuit information. Here, the distinction between the multiplier and the multiplicand is for convenience in the conversion processing.
【0034】図4(b)の機能記述情報では、被乗数a
は、0ビットから7ビットまでの8ビット幅の信号であ
り、変数bは0ビットから15ビットまでの16ビット
幅の信号であり、この変数bの値は、被乗数aと、値が
130の8ビット幅の信号で表わされる乗数130との
積であることが示されている。また、図4(c)の機能
回路情報では、1行目で、機能素子の識別名がgate
1であり、その機能素子がmultiplier(乗算
器)であることが示され、2、4行目の記述では、記号
i1で示される信号は入力信号aで、ビット幅が8ビッ
トであることが示され、3、5行目の記述では、記号i
2で示される信号は入力信号で、ビット幅が8ビットで
値が130の定数であることが示され、6行目の記述で
は、記号oで示される信号は出力信号bで、ビット幅が
16ビットであることが示されている。In the function description information of FIG. 4B, the multiplicand a
Is a signal having an 8-bit width from 0 to 7 bits, a variable b is a signal having a 16-bit width from 0 bits to 15 bits, and the value of this variable b is represented by a multiplicand a and a value of 130 It is shown that the product is a product of a multiplier 130 and an 8-bit signal. In the functional circuit information of FIG. 4C, the identification name of the functional element is gate on the first line.
1 indicates that the functional element is a multiplier (multiplier), and in the description on the second and fourth lines, the signal indicated by the symbol i1 is the input signal a and the bit width is 8 bits. In the description on the third and fifth lines, the symbol i
The signal indicated by 2 is an input signal, which indicates that the bit width is 8 bits and the value is a constant of 130. In the description on the sixth line, the signal indicated by the symbol o is the output signal b and the bit width is It is shown to be 16 bits.
【0035】なお、以下の説明においては、簡単のため
に、情報の種類における機能記述情報、機能回路情報、
または論理回路情報の区別に関らず、図3(a)や図4
(a)のような模式図によって情報の内容を表す。ま
た、混同しない範囲で必要に応じて、乗数または被乗数
等の語は、これらの値、若しくは乗数または被乗数等を
表す信号を示す意味でも用い、回路の語は回路を示す情
報の意味でも用いる。In the following description, for simplicity, functional description information, functional circuit information,
3A or 4 regardless of the distinction of the logic circuit information.
The contents of the information are represented by a schematic diagram as shown in FIG. Words such as a multiplier and a multiplicand are also used to indicate a signal representing these values or a multiplier or a multiplicand, etc., and a word of a circuit is also used to indicate information indicating a circuit, as long as it is not confused.
【0036】また、以下の説明では、次のような表記を
用いる。数Xの最下位ビットから数えてaビット目から
bビット目(但しa>b)から成る(a−b+1)ビッ
ト幅の数をX(a:b)と表記する。また、数Xのaビ
ット目の値をX(a)と表す。さらに、関数を以下のよ
うに定義する。In the following description, the following notation is used. The number of (a−b + 1) bit widths from the ath bit to the bth bit (where a> b) counted from the least significant bit of the number X is expressed as X (a: b). The value of the a-th bit of the number X is represented as X (a). Further, the function is defined as follows.
【0037】kビット幅で表現された信号Yについて、
値が1であるビットの数をposibits(Y)、値
が0であるビットの数をnegabits(Y)と定義
する。また、最下位ビットから数えて、値が1である1
のビットの数がP個(但し、P<k)となるビットまで
のビット数をeffbitwidth(Y,P)と定義
する。また、これらの関数の値を求める処理は容易に実
現できるので、詳細な説明は省略する。For a signal Y expressed in k bits,
The number of bits having a value of 1 is defined as posibibits (Y), and the number of bits having a value of 0 is defined as negatives (Y). Also, counting from the least significant bit, 1
Is defined as effbitwidth (Y, P) until the number of bits becomes P (where P <k). Further, since the processing for obtaining the values of these functions can be easily realized, detailed description will be omitted.
【0038】次に、自動設計システムで行われる設計処
理について説明する。図5は設計処理のメインルーチン
を示すフローチャートである。ステップ41は、回路の
機能設計者が機能仕様に基づいて作成した機能記述情報
を入力装置11から入力し、回路データ記憶部23に格
納する処理である。なお、機能記述情報に限らず、例え
ば比較的簡単な回路部分についての機能回路情報や論理
回路情報などの入力も受け付けるようにしてもよい。Next, design processing performed by the automatic design system will be described. FIG. 5 is a flowchart showing the main routine of the design process. Step 41 is a process of inputting the function description information created by the function designer of the circuit based on the function specifications from the input device 11 and storing it in the circuit data storage unit 23. Not only the function description information but also input of, for example, functional circuit information or logic circuit information for a relatively simple circuit portion may be received.
【0039】ステップ42は、ステップ41で入力され
た機能記述情報を解釈し、機能素子から構成され、機能
記述情報で示された機能を有する回路を内部表現形式で
表した機能回路情報を生成して回路データ記憶部23に
格納する処理である。ステップ43は、機能回路情報に
含まれる全ての機能素子を論理素子に変換し、論理回路
情報として回路データ記憶部23に格納する処理であ
る。また、乗算器を含む回路に関して、機能素子レベル
での回路の最適化も行われる。このステップ43の詳細
な処理内容については後述する。In step 42, the function description information input in step 41 is interpreted to generate functional circuit information composed of functional elements and representing the circuit having the function indicated by the function description information in an internal representation form. This is a process of storing the data in the circuit data storage unit 23. Step 43 is a process of converting all the functional elements included in the functional circuit information into logic elements and storing the logic elements in the circuit data storage unit 23 as the logic circuit information. Further, with respect to the circuit including the multiplier, the circuit is optimized at the functional element level. The detailed processing content of this step 43 will be described later.
【0040】ステップ44は、論理回路情報に含まれる
全ての論理素子を、所定の変換規則情報に基づく素子変
換処理によって実装素子に割り付け、実装回路情報とし
て回路データ記憶部23に格納する処理である。また、
このステップで44では、論理素子を実装素子に割り付
ける過程で、論理素子レベルでの回路の最適化も行われ
る。Step 44 is a process of allocating all the logic elements included in the logic circuit information to the mounted elements by element conversion processing based on predetermined conversion rule information, and storing the allocated elements in the circuit data storage unit 23 as mounted circuit information. . Also,
In the step 44, in the process of allocating the logic elements to the mounting elements, the optimization of the circuit at the logic element level is also performed.
【0041】ステップ45は、実装回路情報等に基づい
て、回路図やネットリストを生成し、出力装置13に出
力する処理である。ここで、上記ネットリストは、例え
ば実装素子から構成される回路における実装素子の接続
関係を示す情報である。なお、上記ステップ42、およ
びステップ44で行われる処理については、それぞれ、
特開平3−15984号公報、または米国特許USP5
043914号公報に示されているものと同様なため、
詳細な説明を省略する。Step 45 is a process of generating a circuit diagram and a netlist based on the mounted circuit information and the like and outputting the generated circuit diagram and netlist to the output device 13. Here, the netlist is, for example, information indicating a connection relation of the mounting elements in a circuit including the mounting elements. Note that the processes performed in step 42 and step 44 are respectively described below.
JP-A-3-15984 or US Pat.
Because it is similar to that shown in Japanese Patent No. 043914,
Detailed description is omitted.
【0042】上記ステップ43では、詳しくは、図6に
示すような処理が行われる。ステップ81では、機能回
路情報に含まれる機能素子を1つ選択する。ステップ8
2、およびステップ83では、それぞれ、選択された機
能素子が加算器であるか、または乗算器であるかを判定
し、加算器であればステップ84、乗算器であればステ
ップ85、また、加算器でも乗算器でもなければステッ
プ86に移行する。In step 43, a process as shown in FIG. 6 is performed in detail. In step 81, one functional element included in the functional circuit information is selected. Step 8
In step 2 and step 83, it is determined whether the selected functional element is an adder or a multiplier. If the adder is an adder, step 84; if the multiplier, step 85; If it is neither a multiplier nor a multiplier, the process proceeds to step 86.
【0043】それぞれのステップ84〜86では、選択
された機能素子を他の機能素子、および/または論理素
子によって構成された同一の機能を有する回路の回路情
報を生成した後、ステップ87に移行する。ステップ8
7では、回路中に機能素子が含まれているかどうかを判
定し、含まれていれば、ステップ81に戻って同様の処
理を繰り返す一方、含まれていなければ、すなわち論理
素子だけから構成される回路に変換されていれば、メイ
ンルーチンにリターンする。In each of steps 84 to 86, after the selected functional element is generated as circuit information of a circuit having the same function constituted by another functional element and / or a logic element, the process proceeds to step 87. . Step 8
At 7, it is determined whether or not a functional element is included in the circuit. If the functional element is included, the process returns to step 81 and the same processing is repeated. If it has been converted to a circuit, the process returns to the main routine.
【0044】ここで、上記ステップ84〜86では、必
ずしも1回の処理で論理素子だけから構成される回路に
変換されずに、一旦、他の機能素子を含む回路に変換さ
れることがある。この場合には、ステップ87で機能素
子が含まれていると判定され、同様の変換処理が再帰的
に繰り返して行われることにより、最終的に論理回路だ
けによって構成された回路に変換される。具体的には、
例えば複数ビットの加算器は、ステップ84によって、
よりビット数の少ない加算器(機能素子)と、1ビット
の加算器(論理素子)とへの変換が繰り返されることに
より、1ビットの加算器だけから成る回路に変換され
る。また、減算器や除算器等は、ステップ86で加算器
等の機能素子と論理素子とから構成される回路に変換さ
れた後、加算器等がステップ84で1ビット同士の加算
器等に変換される。このように再帰的に変換処理を行う
ことにより、各処理の簡素化を図ることが容易になる。Here, in the above steps 84 to 86, there is a case where the processing is not always converted into a circuit composed of only logic elements by a single process, but is converted once into a circuit including other functional elements. In this case, it is determined in step 87 that a functional element is included, and the same conversion process is repeatedly performed recursively, so that the circuit is finally converted into a circuit composed of only logic circuits. In particular,
For example, the multi-bit adder may
By repeating the conversion into an adder (functional element) with a smaller number of bits and a 1-bit adder (logical element), the circuit is converted into a circuit consisting of only a 1-bit adder. Further, the subtractor and the divider are converted into a circuit composed of functional elements such as an adder and a logic element in step 86, and then the adder is converted into a 1-bit adder in step 84. Is done. By performing the conversion process recursively in this manner, it is easy to simplify each process.
【0045】上記ステップ83で「yes」と判定さ
れ、ステップ85で変換が行われる乗算器は、例えば図
7(a)〜(d)に示すような機能を有するものであ
る。各乗算器は、共に、mビット幅の信号で表わされた
乗数を、nビット幅の信号で表わされた被乗数に乗算
し、n+mビット幅の信号で表わされた積Pを出力する
機能を有する点で共通し、入力される乗数および被乗数
が、定数A、定数B、変数X、または変数Yの何れであ
るかが異なっている。ここで、簡単のために、定数Aは
正数として説明する。なお、定数Aが負数の場合、定数
Aを符号反転したA’についての乗算回路及びその乗算
結果を符号反転する回路の回路情報を生成することによ
り容易に対応可能である。また、変数Xは正負の値をと
り得るものとして説明するが、正数に限る場合には、後
述するビット幅合わせのための符号拡張において、0拡
張を行うようにしてもよい。The multiplier for which "yes" is determined in step 83 and conversion is performed in step 85 has, for example, the functions shown in FIGS. 7 (a) to 7 (d). Each of the multipliers multiplies the multiplier represented by the signal having the width of m bits by the multiplicand represented by the signal having the width of n bits, and outputs a product P represented by the signal having the width of n + m bits. They are common in that they have a function, and differ in whether the input multiplier and multiplicand are constant A, constant B, variable X, or variable Y. Here, for the sake of simplicity, the constant A will be described as a positive number. In addition, when the constant A is a negative number, it can be easily dealt with by generating circuit information of a multiplication circuit for A 'in which the sign of the constant A is inverted and a circuit for inverting the sign of the multiplication result. The variable X will be described as being able to take a positive or negative value. However, if the variable X is limited to a positive number, 0 extension may be performed in sign extension for bit width adjustment described later.
【0046】以下、上記ステップ85で行われる変換処
理を、図7に示す乗算器を例にあげ、図8のフローチャ
ートに基づいて詳細に説明する。この処理は、乗算器を
他の機能素子(乗算器、加算器など)や、論理素子から
構成される回路に変換する処理である。ステップ100
1では、乗数、および被乗数が何れも定数であるかどう
かを判定し、図7(a)に示すように何れも定数であれ
ば、ステップ1002に移行して積を算出し、その値を
2進数で表す信号を発生する回路に変換する。具体的に
は、被乗数X=4、乗数A=5の場合には、図9(a)
に示すように、値4×5=20(2進表現で‘1010
0’)を示す信号をP(4:0)として出力し、値0を
示す信号をP(n+m−1:5)として出力する回路に
変換する。Hereinafter, the conversion processing performed in step 85 will be described in detail with reference to the flowchart shown in FIG. 8 using the multiplier shown in FIG. 7 as an example. This process is a process of converting the multiplier into another functional element (a multiplier, an adder, or the like) or a circuit including a logic element. Step 100
In step 1, it is determined whether the multiplier and the multiplicand are both constants. If both are constants as shown in FIG. 7A, the process proceeds to step 1002 to calculate the product, and the values are set to 2 The signal is converted to a circuit that generates a signal represented by a base number. Specifically, when the multiplicand X = 4 and the multiplier A = 5, FIG.
As shown in the figure, the value 4 × 5 = 20 ('1010
0 ′) is output as P (4: 0), and a signal indicating the value 0 is converted to a circuit that outputs P (n + m−1: 5).
【0047】また、ステップ1001で少なくとも何れ
か一方が変数であると判定されると、ステップ1003
に移行して被乗数が定数であるかどうかを判定し、被乗
数が定数であればステップ1004で乗数と被乗数とを
入れ換えてからステップ1005に移行する一方、被乗
数が定数でなければ、そのままステップ1005に移行
する。すなわち、図7(b)に示すような乗算器の場合
には、図7(c)に示すような乗算器に変換され、少な
くとも被乗数は常に変数になるようにする。If it is determined in step 1001 that at least one of them is a variable, step 1003
Then, it is determined whether the multiplicand is a constant. If the multiplicand is a constant, the multiplier and the multiplicand are exchanged in step 1004, and then the process proceeds to step 1005. If the multiplicand is not a constant, the process directly proceeds to step 1005. Transition. That is, in the case of the multiplier as shown in FIG. 7B, it is converted into a multiplier as shown in FIG. 7C, and at least the multiplicand is always a variable.
【0048】ステップ1005、1007、1009で
は、乗数が特殊な定数、すなわち、値が0、1、または
2のべき乗数であるかどうかを判定し、0であれば、図
9(b)に示すように全ビットの値が0であることを示
す信号を出力する回路に変換する(ステップ100
6)。1であれば、図9(c)に示すように被乗数の値
を示す信号をそのままP(n−1:0)として出力する
とともに値がX(n−1)の信号をP(n+m−1:
n)として(符号拡張して)出力する回路に変換する
(ステップ1008)。また、2のべき乗数であれば、
例えば乗数が8(=23)である場合には、図9(d)
に示すように被乗数の値を示す信号をP(n+2:3)
として出力するとともに、値が0の信号をP(2:0)
として、また各ビットの値がX(n−1)の信号をP
(n+m−1:n+3)として(符号拡張して)出力す
る回路に変換する(ステップ1010)。なお、変数X
が正数に限定される場合には、前述のように上位ビット
を符号拡張せずに0拡張すればよい。In steps 1005, 1007, and 1009, it is determined whether the multiplier is a special constant, that is, whether the value is a power of 0, 1, or 2, and if it is 0, it is shown in FIG. 9B. To a circuit that outputs a signal indicating that the values of all bits are 0 (step 100)
6). If it is 1, the signal indicating the value of the multiplicand is output as it is as P (n-1: 0) as shown in FIG. 9C, and the signal having the value X (n-1) is output as P (n + m-1). :
n) is converted to a circuit that outputs (with sign extension) (step 1008). If it is a power of 2,
For example, when the multiplier is 8 (= 2 3 ), FIG.
The signal indicating the value of the multiplicand is represented by P (n + 2: 3) as shown in FIG.
And outputs a signal having a value of 0 as P (2: 0)
And a signal whose value of each bit is X (n-1) is P
It is converted into a circuit that outputs (with sign extension) as (n + m-1: n + 3) (step 1010). Note that the variable X
Is limited to a positive number, the upper bits may be 0-extended without sign extension as described above.
【0049】ステップ1011では、乗数が1ビットで
あるか、または2ビット以上であるかどうかを判定し、
例えば図10(a)に示すように1ビットであれば、ス
テップ1012に移行して、図10(b)に示すような
AND回路132…135から成る回路に変換する処理
を行う。なお、このステップ1011で1ビットである
と判定されるのは、乗数が変数である場合に限られる。
なぜならば、1ビットの定数であれば上記ステップ10
05、1007で「yes」と判定されるからである。
一方、2ビット以上であると判定されるのは、乗数が変
数である場合と定数である場合とが含まれる。In step 1011, it is determined whether the multiplier is 1 bit or more than 2 bits.
For example, if the bit is 1 bit as shown in FIG. 10A, the process proceeds to step 1012 to perform a process of converting into a circuit composed of AND circuits 132... 135 as shown in FIG. It is to be noted that the determination of 1 bit in step 1011 is limited only when the multiplier is a variable.
Because if it is a 1-bit constant, the above step 10
This is because “yes” is determined in 05 and 1007.
On the other hand, the determination as having two bits or more includes the case where the multiplier is a variable and the case where the multiplier is a constant.
【0050】ここで、上記ステップ1006、100
8、1010、1012で行われる回路の変換は、あら
かじめ設計処理記憶部21に記憶されている変換規則情
報に基づいて行われる。例えばステップ1012の変換
では、図10(c)に示す変換規則1が用いられ、図1
1に示すような処理により変換が行われる。まず、ステ
ップ71で、変換規則情報における「==>」の前に示
される条件節と、元の回路情報とを比較し、変換適用条
件を満たしていれば、信号線の名称などの対応付けを行
う。Here, the above steps 1006, 100
The conversion of the circuits performed in steps 8, 1010, and 1012 is performed based on conversion rule information stored in the design processing storage unit 21 in advance. For example, in the conversion in step 1012, the conversion rule 1 shown in FIG.
The conversion is performed by the processing shown in FIG. First, in step 71, the conditional clause shown before “==>” in the conversion rule information is compared with the original circuit information, and if the conversion application condition is satisfied, the correspondence of the signal line name and the like is determined. I do.
【0051】ステップ72では、元の機能素子である乗
算器を示す回路情報を回路データ記憶部23から削除す
る。ステップ73では、変換規則情報における「==
>」の後に示される結果節中の機能素子、または論理素
子を示す回路情報と、上記対応付けとに基づいて、変換
する回路を示す情報を生成し、回路データ記憶部23に
登録する。In step 72, the circuit information indicating the multiplier which is the original functional element is deleted from the circuit data storage unit 23. In step 73, “==
Based on the circuit information indicating the functional element or the logical element in the result section indicated after the “>” and the association, the information indicating the circuit to be converted is generated and registered in the circuit data storage unit 23.
【0052】ステップ74では、結果節中に未処理の機
能素子や論理素子が残っているかどうかを判定し、残っ
ていれば、上記ステップ73に戻る一方、残っていなけ
れば元の処理にリターンする。なお、上記変換規則1に
よって元の乗算器と等価な回路に変換できることの証明
については、他の変換規則についての証明とともに後に
示す。但し、このような変換規則情報に基づく具体的な
素子変換処理については、米国特許USP504391
4号公報に示されているので、詳細な説明は省略する。
また、変換規則情報は、実際には図10(c)に示すよ
うな内部表現形式で表されているが、以下の説明におい
ては、簡単のために原則として図10(a)(b)に示
すような模式図によって説明する。In step 74, it is determined whether an unprocessed functional element or logical element remains in the result section. If it is, the process returns to step 73. If not, the process returns to the original process. . The proof that conversion to a circuit equivalent to the original multiplier can be performed by the conversion rule 1 will be described later together with the proofs of other conversion rules. However, specific element conversion processing based on such conversion rule information is described in US Pat.
No. 4, the detailed description is omitted.
Further, the conversion rule information is actually represented in an internal representation format as shown in FIG. 10C, but in the following description, for the sake of simplicity, the conversion rule information is basically shown in FIGS. 10A and 10B. This will be described with reference to a schematic diagram as shown.
【0053】前記ステップ1011で、乗数が2ビット
以上であると判定された場合には、ステップ1013に
移行して、他の機能素子(ビット幅のより小さい乗算器
や加算器等)および/または論理素子から成る複数ビッ
ト幅の乗算器に変換する処理を行う。図12は、上記ス
テップ1013で行われる詳細な処理を示すフローチャ
ートである。この処理では、概略、以下のようにして部
分積数、および部分積和を求める回路の論理段数を少な
く抑えるようになっている。If it is determined in step 1011 that the multiplier is 2 bits or more, the process proceeds to step 1013, where another functional element (a multiplier or an adder having a smaller bit width) and / or A process of converting to a multi-bit-width multiplier composed of logic elements is performed. FIG. 12 is a flowchart showing the detailed processing performed in step 1013. In this processing, the number of partial products and the number of logical stages of the circuit for obtaining the sum of partial products are reduced as follows.
【0054】すなわち、乗数が定数である場合には、部
分積数を少なくするために、乗数、または乗数の全ビッ
トの論理否定をとった数における、値が1であるビット
に関してのみ部分積を求める回路に変換する。また、乗
数が定数である場合および変数である場合共に、部分積
和を求める回路の論理段数を少なくするために、加算器
が2分木状に接続される回路に変換する。That is, when the multiplier is a constant, the partial product is reduced only for the bit whose value is 1 in the multiplier or a number obtained by logically negating all bits of the multiplier in order to reduce the partial product number. Convert to the desired circuit. In both cases where the multiplier is a constant and a variable, in order to reduce the number of logic stages of the circuit for calculating the partial product sum, the adder is converted into a circuit connected in a binary tree.
【0055】まず、ステップ141では、乗数が変数で
あるかどうかを判定し、変数であれば、変数同士の乗算
であるので、ステップ142に移行し、図13に示す変
換規則2を適用して乗数のビット幅が約1/2の2つの
乗算器を含む回路に変換する。上記変換規則2は、ビッ
ト幅がmの乗数Yをビット幅がnの被乗数Xに乗算して
積Pを出力する乗算器191を、乗数Yの下位Kビット
Y1、および上位m−KビットY2をそれぞれ被乗数X
に乗算して部分積P1、P2を求める乗算器192、1
93と、これらの部分積P1、P2を加算する回路とか
ら構成される回路に変換することを示すものである。但
し、上記加算を行う回路は、部分積P1、P2の重複す
るビット以上のビットについてだけ加算すればよいの
で、部分積P1の上位nビットをそれよりも下位のKビ
ットから分割するリッパ194と、これを符号拡張した
信号R1を出力するミキサ195と、この信号R1と部
分積P2とを加算する加算器196とから構成される。First, in step 141, it is determined whether or not the multiplier is a variable. If the multiplier is a variable, the process proceeds to step 142 since the multiplication between the variables is performed, and the conversion rule 2 shown in FIG. The circuit is converted into a circuit including two multipliers each having a bit width of about 1/2 of the multiplier. The conversion rule 2 is that the multiplier 191 that multiplies the multiplier Y having the bit width m by the multiplicand X having the bit width n and outputs the product P includes the lower K bits Y1 and the upper m−K bits Y2 of the multiplier Y. To the multiplicand X
192, 1 to obtain partial products P1, P2
93 and a circuit configured to add these partial products P1 and P2. However, since the circuit for performing the above addition needs to add only the bits that are equal to or more than the overlapping bits of the partial products P1 and P2, a ripper 194 that divides the upper n bits of the partial product P1 from the K bits lower than that is used. And a mixer 195 for outputting a signal R1 obtained by sign-extending the signal R1, and an adder 196 for adding the signal R1 and the partial product P2.
【0056】より詳しくは、上記乗算器192は、乗数
Yの下位KビットY1=Y(K−1:0)を、被乗数X
(n−1:0)に乗算し、部分積としてn+Kビット幅
の信号P1(n+K−1:0)を出力する回路である。
また、乗算器193は、乗数Yの上位m−KビットY2
=Y(m−1:K)を、被乗数X(n−1:0)に乗算
し、部分積としてn+m−Kビット幅の信号P2(n+
m−K−1:0)を出力する回路である。More specifically, the multiplier 192 converts the lower K bits Y1 = Y (K-1: 0) of the multiplier Y into the multiplicand X
(N-1: 0), and outputs a signal P1 (n + K-1: 0) having an n + K bit width as a partial product.
Further, the multiplier 193 calculates the upper mK bits Y2 of the multiplier Y.
= Y (m-1: K) is multiplied by the multiplicand X (n-1: 0), and as a partial product, a signal P2 (n +
m−K−1: 0).
【0057】リッパ194は、上記信号P1(n+K−
1:0)を、その上位nビットの信号P1(n+K−
1:K)と下位Kビットの信号P1(K−1:0)とに
分割する回路である。後者の信号P1(K−1:0)
は、積Pの下位Kビットを示す信号P(K−1:0)と
して出力される。ミキサ195は、リッパ194から出
力される信号P1(n+K−1:K)の上位に、各ビッ
トの値がP1(n+k−1)であるm−Kビット幅の信
号を合成して(信号P1を符号拡張して)n+m−Kビ
ット幅の信号R1(n+m−K−1:0)を出力する回
路である。The ripper 194 outputs the signal P1 (n + K-
1: 0) is converted to the upper n-bit signal P1 (n + K−
1: K) and a lower-K bit signal P1 (K-1: 0). The latter signal P1 (K-1: 0)
Is output as a signal P (K−1: 0) indicating the lower K bits of the product P. The mixer 195 combines an m-K bit width signal whose value of each bit is P1 (n + k-1) on the upper side of the signal P1 (n + K-1: K) output from the ripper 194 (signal P1). This is a circuit that outputs a signal R1 (n + m−K−1: 0) having an n + m−K bit width by sign-extending.
【0058】加算器196は、上記信号P2(n+m−
K−1:0)と信号R1(n+m−K−1:0)とを加
算し、その和であるn+m−Kビット幅の信号R2(n
+m−K−1:0)を、積Pの上位n+m−Kビットを
示す信号P(n+m−1:K)として出力する回路であ
る。この変換規則2に基づいて変換された回路に含まれ
る乗算器192および/または乗算器193に入力され
る乗数のビット幅K、m−Kが2以上の場合(すなわち
変換後の乗算器も機能素子である場合)には、次のルー
プの処理でステップ142が実行される際に、さらにビ
ット幅の小さい乗算器を含む回路に変換される。また、
乗数のビット幅K、またはm−Kが1になった場合に
は、前記ステップ1012(図8)の処理でAND回路
(論理素子)から成る回路に変換される。The adder 196 outputs the signal P2 (n + m-
K-1: 0) and the signal R1 (n + m-K-1: 0) are added, and the sum of the signals R2 (n
+ M−K−1: 0) as a signal P (n + m−1: K) indicating the upper n + m−K bits of the product P. When the bit width K, m−K of the multiplier input to the multiplier 192 and / or the multiplier 193 included in the circuit converted based on the conversion rule 2 is 2 or more (that is, the converted multiplier also functions In the case where the element is an element, when step 142 is executed in the processing of the next loop, it is converted into a circuit including a multiplier with a smaller bit width. Also,
When the bit width K or m−K of the multiplier becomes 1, it is converted into a circuit composed of an AND circuit (logic element) in the processing of step 1012 (FIG. 8).
【0059】ここで、上記Kの値は、m/2以上の最小
整数、またはm/2以下の最大整数、すなわち、Kとm
−Kとの差m−2Kの絶対値が最小になる整数に設定す
るか、若しくは、Kまたはm−Kがm/2以上の最小の
2のべき乗数となるように設定することにより、加算器
をバランスのよい2分木状に接続して部分積和を求める
回路を構成する場合の論理段数を小さく抑えることがで
きる。Here, the value of K is a minimum integer equal to or greater than m / 2 or a maximum integer equal to or less than m / 2, that is, K and m
Addition is performed by setting the difference m−2K to the integer so that the absolute value of the difference m−2K is minimized, or by setting K or m−K to be a minimum power of 2 that is not less than m / 2. The number of logic stages can be reduced when a circuit for obtaining a partial product sum is formed by connecting the devices in a well-balanced binary tree.
【0060】図14は、上記ステップ142の処理を行
う構成をその機能に着目して示す構成図である。入力手
段241は、元の機能素子である乗算器191を示す回
路情報を回路データ記憶部23から読み出し、乗算器1
91の入力がmビットの乗数Y、およびnビットの被乗
数Xであることを示す情報を乗数分割手段242に出力
する。また、乗算器191の出力がm+nビットの積P
であることを示す情報を分割演算回路生成手段244に
出力する。FIG. 14 is a block diagram showing a configuration for performing the processing of step 142, focusing on its function. The input unit 241 reads circuit information indicating the multiplier 191 as the original functional element from the circuit data storage unit 23, and
The information indicating that the input of 91 is an m-bit multiplier Y and an n-bit multiplicand X is output to the multiplier division means 242. The output of the multiplier 191 is the product P of m + n bits.
Is output to the division operation circuit generation means 244.
【0061】乗数分割手段242は、まず、乗数Yを分
割するためのKの値を求め、乗数Yの下位Kビットの信
号Y1、被乗数X、および部分積P1を示す情報と、乗
数Yの上位m−Kビットの信号Y2、被乗数X、および
部分積P2を示す情報とを乗算モジュール生成手段24
3に出力する。また、部分積P1、P2をそれぞれ示す
情報を分割演算回路生成手段244に出力する。ここ
で、上記部分積の名称P1、P2は、図示しない割り付
け手段によって割り付けられる。The multiplier dividing means 242 first obtains the value of K for dividing the multiplier Y, and outputs information indicating the lower K-bit signal Y1, the multiplicand X, and the partial product P1 of the multiplier Y, and the higher order of the multiplier Y. The multiplication module generation unit 24 multiplies the m−K bit signal Y2, the multiplicand X, and information indicating the partial product P2 by
Output to 3. In addition, information indicating each of the partial products P1 and P2 is output to the division operation circuit generation unit 244. Here, the names P1 and P2 of the partial products are assigned by an assigning means (not shown).
【0062】乗算モジュール生成手段243は、信号Y
1を被乗数Xに乗算して部分積P1を求める乗算器19
2、および信号Y2を被乗数Xに乗算して部分積P2を
求める乗算器193を示す情報を生成し、出力手段24
5に出力する。分割演算回路生成手段244は、部分積
P1、P2を示す情報と積Pを示す情報とに基づいて、
部分積P1の下位Kビットを積Pの下位Kビットとして
出力するとともに部分積P1の上位n−Kビットと部分
積P2との和を積Pの上位n+m−Kビットとして出力
するリッパ194、ミキサ195、および加算器196
を示す情報を出力手段245に出力する。The multiplication module generating means 243 outputs the signal Y
A multiplier 19 for multiplying the multiplicand X by 1 to obtain a partial product P1
2 and the signal Y2 are multiplied by the multiplicand X to generate information indicating the multiplier 193 for obtaining the partial product P2.
5 is output. The division operation circuit generation means 244 calculates the partial product P1, P2 based on the information indicating the product P and the information indicating the product P.
A ripper 194 that outputs the lower K bits of the partial product P1 as the lower K bits of the product P and outputs the sum of the upper n−K bits of the partial product P1 and the partial product P2 as the upper n + m−K bits of the product P; 195 and adder 196
Is output to the output unit 245.
【0063】出力手段245は、乗算モジュール生成手
段243、および分割演算回路生成手段244から出力
された変換後の回路を示す回路情報を回路データ記憶部
23に格納する。なお、変数同士を乗算する乗算器の場
合には、上記のように分割によるものに限らず、従来の
自動設計システムと同様に、ライブラリに登録された汎
用的な乗算器を割り付けたり、2ビットブースのリコー
ド方式を適用した回路に変換するようにしてもよい。The output unit 245 stores the circuit information indicating the converted circuit output from the multiplication module generation unit 243 and the divided operation circuit generation unit 244 in the circuit data storage unit 23. Incidentally, in the case of a multiplier for multiplying variables, not only the division as described above, but also a general-purpose multiplier registered in a library or a 2-bit multiplier as in the conventional automatic design system. The circuit may be converted to a circuit to which the booth recoding method is applied.
【0064】前記ステップ141で、乗数が定数の乗数
Aであると判定された場合には、ステップ143に移行
して、次に乗数Aにおける値が1であるビットの数po
sibits(A)が2以下かどうかを判定し、2以下
であればステップ144に移行する。(なお、posi
bits(A)が1であれば、前記ステップ1008ま
たは1010で処理されるので、2以下と判定されるの
は2の場合だけである。)ここで、ステップ143で
は、mの値を判定するようにしてもよい。posibi
ts(A)が2であれば、被乗数Xをビット位置に応じ
てシフトした2つの値を加算する、すなわち値が1であ
るビットに関してのみ部分積を求める回路を構成するこ
とができる。そのような回路を1回の処理で生成するよ
うにしてもよいが、ここでは、再帰的な処理を利用して
個々の処理を簡単化するために、m−1ビットの乗算器
を有し、乗数Aを最上位の1ビットと下位m−1ビット
とに分割するとともに、被乗数Xと乗数Aの下位m−1
ビットとの積と、被乗数Xをシフトした値とを加算する
回路に変換する。ただし、乗数Aの最上位ビットが0で
あれば、積Pの最上位ビットを0にするだけでよいの
で、加算等のための回路は必要ない。If it is determined in step 141 that the multiplier is a constant multiplier A, the process proceeds to step 143, and the number po of bits whose value in the multiplier A is 1 is set to po.
It is determined whether or not sibits (A) is 2 or less, and if it is 2 or less, the process proceeds to step 144. (Note that posi
If bits (A) is 1, the processing is performed in the step 1008 or 1010, so that it is determined that it is 2 or less only in the case of 2. Here, in step 143, the value of m may be determined. posibi
If ts (A) is 2, a circuit that adds two values obtained by shifting the multiplicand X in accordance with the bit position, that is, a circuit that obtains a partial product only for bits having a value of 1 can be configured. Such a circuit may be generated in a single process, but here, in order to simplify each process by using a recursive process, an m-1 bit multiplier is provided. , The multiplier A is divided into the most significant 1 bit and the lower m-1 bits, and the multiplicand X and the lower m-1 of the multiplier A are divided.
The product is converted to a circuit that adds the product of the bit and the value obtained by shifting the multiplicand X. However, if the most significant bit of the multiplier A is 0, it is only necessary to set the most significant bit of the product P to 0, so that a circuit for addition or the like is not required.
【0065】そこで、ステップ144では、より詳しく
は図15に示すように、まず、ステップ161で乗数A
の最上位ビットの値が1であるかどうかを判定し、1で
ある場合にはステップ162に移行して、図16(a)
に示す変換規則3(a)を適用する一方、0である場合
にはステップ163に移行して、同図(b)に示す変換
規則3(b)を適用する。Therefore, in step 144, as shown in more detail in FIG.
It is determined whether or not the value of the most significant bit of is “1”. If the value is “1”, the process proceeds to step 162, and FIG.
While the conversion rule 3 (a) shown in FIG. 7 is applied, if the value is 0, the process shifts to step 163 to apply the conversion rule 3 (b) shown in FIG.
【0066】変換規則3(a)は、乗算器151を、乗
算器152と、リッパ153と、加算器154とから構
成される回路に変換することを示すものである。乗算器
152は、乗数Aの下位m−1ビットA3=A(m−
2:0)を被乗数X(n−1:0)に乗算してn+m−
1ビット幅の部分積P3(n+m−2:0)を求める。The conversion rule 3 (a) indicates that the multiplier 151 is to be converted into a circuit composed of a multiplier 152, a ripper 153, and an adder 154. The multiplier 152 calculates the lower m-1 bits A3 = A (m−
2: 0) is multiplied by the multiplicand X (n−1: 0) to obtain n + m−
A 1-bit partial product P3 (n + m-2: 0) is obtained.
【0067】リッパ153は、部分積P3(n+m−
2:0)を、上位nビットP3(n+m−2:m−1)
と下位m−1ビットP3(m−2:0)とに分割する。
加算器154は、上記P3(n+m−2:m−1)と被
乗数X(n−1:0)(論理的には、部分積としての、
乗数Aの最上位ビットと被乗数X(n−1:0)との
積)とを加算する。The ripper 153 has a partial product P3 (n + m−
2: 0) is replaced by the upper n bits P3 (n + m-2: m-1)
And lower m-1 bits P3 (m-2: 0).
The adder 154 calculates the above P3 (n + m-2: m-1) and the multiplicand X (n-1: 0) (logically, as a partial product,
The product of the most significant bit of the multiplier A and the multiplicand X (n−1: 0)) is added.
【0068】この処理が行われた場合には、上記乗算器
152についてのposibits(A3)の値は、1
になるので、次のループの処理における前記ステップ1
008、または1010(図8)の処理が行われる。こ
こで、上記変換規則3(a)は、例えば図17(a)に
示すような内部表現形式で設計処理記憶部21に格納さ
れている。同図において、「==>」の前に示される条
件節の「Gate」は、図16の乗算器151に対応し
ている。また、「==>」の後ろに示される結果節の
「Gate1」〜「Gate4」は、それぞれ乗算器1
52、リッパ153、または加算器154に対応してい
る。When this processing is performed, the value of posits (A3) for the multiplier 152 becomes 1
Therefore, the step 1 in the processing of the next loop
The processing of 008 or 1010 (FIG. 8) is performed. Here, the conversion rule 3 (a) is stored in the design processing storage unit 21 in an internal representation format as shown in FIG. 17A, for example. In the figure, “Gate” in the conditional clause shown before “==>” corresponds to the multiplier 151 in FIG. Also, “Gate1” to “Gate4” of the result clauses shown after “==>” are the multipliers 1 respectively.
52, the ripper 153, or the adder 154.
【0069】また、変換規則3(b)は、乗算器151
を、乗算器155を有し、乗数Aの下位m−1ビットA
3=A(m−2:0)を被乗数X(n−1:0)に乗算
し、得られたn+m−1ビット幅の部分積を積Pの下位
n+m−1ビットP(n+m−2:0)として出力する
とともに、値X(n−1)を積Pの最上位ビットP(n
+m−1)として出力する回路に変換することを示すも
のである。すなわち、この場合には、部分積の数を増加
させることなく、ビット幅の小さい乗算器を含む回路に
変換することができる。この処理が行われた場合には、
乗算器152についてのposibits(A3)の値
は、2のままになるので、次のループの処理で再度ステ
ップ144が実行され、ステップ163でさらにビット
幅の小さい乗算器を含む回路に変換されるか、またはス
テップ162で値が1のビットが1つである乗算器を含
む回路に変換される。The conversion rule 3 (b) is based on the multiplier 151
With a multiplier 155, and the lower m-1 bits A of the multiplier A
3 = A (m−2: 0) is multiplied by the multiplicand X (n−1: 0), and the obtained partial product of n + m−1 bits width is set to the lower n + m−1 bits P (n + m−2: 0) and outputs the value X (n-1) as the most significant bit P (n
+ M-1). That is, in this case, conversion to a circuit including a multiplier having a small bit width can be performed without increasing the number of partial products. When this process is performed,
Since the value of posibibits (A3) for the multiplier 152 remains 2, the step 144 is executed again in the processing of the next loop, and is converted to a circuit including a multiplier with a smaller bit width in the step 163. Alternatively, in step 162, the value is converted to a circuit including a multiplier having one bit having a value of one.
【0070】なお、上記のように乗数Aを最上位の1ビ
ットと下位m−1ビットとに分割するのに代えて、上位
m−1ビットと、最下位のビットとに分割するようにし
てもよい。図18は、上記ステップ144の処理を行う
構成をその機能に着目して示す構成図である。Note that instead of dividing the multiplier A into the most significant 1 bit and the lower m-1 bits as described above, the multiplier A is divided into the upper m-1 bits and the least significant bit. Is also good. FIG. 18 is a configuration diagram showing the configuration for performing the process of step 144, focusing on its function.
【0071】入力手段251は、元の機能素子である乗
算器151を示す回路情報を回路データ記憶部23から
読み出し、乗算器151の入力がmビットの乗数Aと、
nビットの被乗数Xであること、および出力がm+nビ
ットの積Pであることを示す情報を最上位ビット分離手
段252に出力する。最上位ビット分離手段252は、
乗数Aを最上位ビットA(m−1)と、それよりも下位
のビットA(m−2:0)とに分離し、最上位ビットA
(m−1)、被乗数X、および積Pを示す情報をビット
値判定手段253に出力するとともに、下位ビットA
(m−2:0)、および被乗数Xを示す情報を乗算モジ
ュール生成手段254に出力する。The input means 251 reads circuit information indicating the multiplier 151 as the original functional element from the circuit data storage unit 23, and the input of the multiplier 151 is an m-bit multiplier A,
Information indicating that it is an n-bit multiplicand X and that the output is a product P of m + n bits is output to the most significant bit separating means 252. The most significant bit separation means 252
The multiplier A is separated into the most significant bit A (m−1) and the lower bits A (m−2: 0), and
(M-1), information indicating the multiplicand X and the product P are output to the bit value determination means 253, and the lower bits A
(M−2: 0) and information indicating the multiplicand X are output to the multiplication module generation means 254.
【0072】ビット値判定手段253は、最上位ビット
A(m−1)の値が1であるか0であるかを判定し、判
定結果に応じて、下位ビットA(m−2:0)と被乗数
Xとの乗算結果が部分積P3、または積P(n+m−
2:0)であることを示す情報を乗算モジュール生成手
段254に出力する。さらに、最上位ビットA(m−
1)の値が1である場合には、被乗数X、積P、部分積
P3を示す情報を加算シフト演算回路生成手段255に
出力する一方、0である場合には、積Pの最上位ビット
P(n+m−1)を示す情報と被乗数Xの最上位ビット
X(n−1)の値を示す情報とを256に出力する。The bit value determining means 253 determines whether the value of the most significant bit A (m-1) is 1 or 0, and according to the determination result, the lower bit A (m-2: 0) Is multiplied by the multiplicand X and the partial product P3 or the product P (n + m−
2: 0) is output to the multiplication module generation means 254. Further, the most significant bit A (m-
If the value of 1) is 1, information indicating the multiplicand X, the product P, and the partial product P3 is output to the addition shift operation circuit generating means 255. If the value of 0 is 0, the most significant bit of the product P is output. Information indicating P (n + m-1) and information indicating the value of the most significant bit X (n-1) of the multiplicand X are output to 256.
【0073】乗算モジュール生成手段254は、乗数A
の下位ビットA(m−2:0)を被乗数Xに乗算して部
分積P3、または積P(n+m−2:0)として出力す
る乗算器152、155を示す情報を生成し、出力手段
257に出力する。加算シフト演算回路生成手段255
は、乗数Aの最上位ビットA(m−1)の値が1である
場合に、部分積P3を示す情報、被乗数Xを示す情報、
および積Pを示す情報に基づいて、部分積P3の下位m
ビットを積Pの下位m−1ビットP(m−2:0)とし
て出力するとともに部分積P3の上位nビットと被乗数
Xとの和を積Pの上位n+1ビットP(n+m−1:m
−1)として出力するリッパ153、および加算器15
4を示す情報を生成し、出力手段257に出力する。The multiplication module generating means 254 calculates the multiplier A
Multiplying the multiplicand X by the lower bit A (m−2: 0) of the multiplicand X and generating information indicating the multipliers 152 and 155 that output the partial product P3 or the product P (n + m−2: 0), and output means 257 Output to Addition shift operation circuit generation means 255
When the value of the most significant bit A (m-1) of the multiplier A is 1, information indicating the partial product P3, information indicating the multiplicand X,
And the lower order m of the partial product P3 based on the information indicating the product P
The bits are output as lower m-1 bits P (m-2: 0) of the product P, and the sum of the upper n bits of the partial product P3 and the multiplicand X is calculated as the upper n + 1 bits P (n + m-1: m) of the product P.
-1) ripper 153 and adder 15
4 is generated and output to the output unit 257.
【0074】一方、回路生成手段256は、乗数Aの最
上位ビットの値が0である場合に、積Pの最上位ビット
P(n+m−1)として値X(n−1)を出力する回路
を示す情報を生成し、出力手段257に出力する。出力
手段257は、各手段254〜256から出力された変
換後の回路を示す回路情報を回路データ記憶部23に格
納する。On the other hand, when the value of the most significant bit of the multiplier A is 0, the circuit generating means 256 outputs a value X (n-1) as the most significant bit P (n + m-1) of the product P. Is generated and output to the output unit 257. The output unit 257 stores the circuit information indicating the converted circuit output from each of the units 254 to 256 in the circuit data storage unit 23.
【0075】前記ステップ143で、定数の乗数Aにお
けるposibits(A)が2よりも大きいと判定さ
れた場合には、ステップ145に移行して、さらに、p
osibits(A)が、値が0であるビットの数ne
gabits(A)+1よりも大きいかどうかを判定す
る。ステップ145で、posibits(A)がne
gabits(A)+1よりも大きくないと判定された
場合には、ステップ146に移行して、乗数が変数であ
る場合の前記ステップ142と同様に、図13に示す変
換規則2を適用して、乗数Aを分割し、2つの乗算器を
含む回路に変換する。ただし、乗数が変数である場合に
比べて、乗数Aを分割するためのKの値として、乗数A
のビット幅mの約1/2ではなく、例えば、Lをpos
ibits(A)/2以上の最小整数としたときに、乗
数Aの下位ビットから数えて1のビットの数がL個とな
るような値effbitwidth(A,L)を用い
る。なお、上記Lの値は、前記Kの値と同様に、pos
ibits(A)/2以下の最大整数や、これに近い2
のべき乗数などでもよい。If it is determined in step 143 that posibibits (A) in the constant multiplier A is greater than 2, the flow shifts to step 145, where p
Osibits (A) is the number ne of bits having a value of 0
It is determined whether or not greater than gabits (A) +1. In step 145, posibibits (A) is ne
If it is determined that the value is not larger than gabits (A) +1, the process proceeds to step 146 to apply the conversion rule 2 shown in FIG. 13 as in step 142 when the multiplier is a variable. The multiplier A is divided and converted into a circuit including two multipliers. However, as compared with the case where the multiplier is a variable, the value of K for dividing the multiplier A is
Is not about 1/2 of the bit width m of L, for example, L is pos
When the minimum integer of ibits (A) / 2 or more is used, a value effbitwidth (A, L) is used such that the number of 1 bits counted from the lower bits of the multiplier A is L. Note that the value of L is equal to pos, similarly to the value of K.
ibits (A) / 2 or a maximum integer less than or equal to 2
It may be a power of.
【0076】このステップ146の処理が1回または2
回以上行われることにより乗数Aが分割されてposi
bits(A)が2以下になった乗算器は、前述のよう
に図8のステップ1006等、または図12のステップ
144により、値が1のビットだけについて部分積を求
める回路が生成されるので、値が1であるビットの数が
ほぼ等しくなるように分割することにより、加算器をバ
ランスのよい2分木状に接続して部分積和を求める回路
を構成する場合の論理段数を小さく抑えることができ
る。The processing in step 146 is performed once or two times.
The multiplier A is divided by performing the
As described above, in the multiplier in which bits (A) is 2 or less, a circuit for obtaining a partial product for only the bit whose value is 1 is generated by step 1006 in FIG. 8 or step 144 in FIG. Is divided so that the number of bits having a value of 1 is substantially equal to each other, so that the number of logic stages in the case where a circuit for obtaining a partial sum of products by connecting adders in a well-balanced binary tree is suppressed. be able to.
【0077】なお、posibits(A)が3の場合
には、乗数Aをどのように分割しても論理段数は2段に
なるので、ステップ143でposibits(A)が
3以下かどうかを判定し、3の場合にもステップ144
で乗数Aを最上位の1ビットと下位m−1ビットとに分
割するようにしてもよい。また、上記ステップ146の
処理を行う構成は、乗数Aを分割するためのKの値の決
めかたが異なる点を除いて、前記ステップ142に対応
する図14の構成と同じである。If posibibits (A) is 3, the number of logical stages becomes 2 no matter how the multiplier A is divided. Therefore, it is determined in step 143 whether posibibits (A) is 3 or less. Step 144 also in case of 3
May be used to divide the multiplier A into one most significant bit and lower m-1 bits. The configuration for performing the process of step 146 is the same as the configuration of FIG. 14 corresponding to step 142 except that the method of determining the value of K for dividing the multiplier A is different.
【0078】一方、ステップ145で、posibit
s(A)がnegabits(A)+1よりも大きいと
判定された場合には、ステップ147に移行し、図19
に示す変換規則4を適用して、乗数Aの全ビットの論理
否定をとった値を乗数A0として、この乗数A0と被乗
数Xとの積を求める乗算器を含む回路に変換する。上記
変換後の回路に含まれる乗算器は、論理否定をとること
によってposibits(A)の値とnegabit
s(A)の値とが逆転するので、次のループの処理で、
例えばステップ145において「no」と判定され、ス
テップ146で乗数A0を分割する変換が行われる。し
たがって、値が1であるビットの数が元の乗数Aよりも
少なくなるとともに、値が1のビットだけについて部分
積を求める回路が生成されるので、部分積を求める回路
の数、および部分積和を求める回路の論理段数が少なく
抑えられる。On the other hand, at step 145,
When it is determined that s (A) is larger than negatives (A) +1, the process proceeds to step 147, and FIG.
The conversion rule 4 shown in (1) is applied, and the value obtained by taking the logical negation of all bits of the multiplier A is set as the multiplier A0, and is converted into a circuit including a multiplier for obtaining the product of the multiplier A0 and the multiplicand X. The multiplier included in the circuit after the conversion performs a logical negation to obtain the value of the positives (A) and the negative
Since the value of s (A) is reversed, in the next loop processing,
For example, "no" is determined in step 145, and conversion for dividing the multiplier A0 is performed in step 146. Therefore, the number of bits having a value of 1 is smaller than the original multiplier A, and a circuit for obtaining a partial product for only the bit having a value of 1 is generated. The number of logic stages of the circuit for calculating the sum can be reduced.
【0079】ただし、乗数Aと被乗数Xとの積を求める
ために、乗数A0と被乗数Xとの積を補正する必要があ
る。上記変換規則4は、その補正のための回路も含む回
路に変換することを示すものである。すなわち、図19
において、171は、変換前の乗算器である。乗算器1
72は、上記乗数A0を被乗数Xに乗算し、n+mビッ
ト幅の積P0(=X・A0)を出力する。However, in order to find the product of the multiplier A and the multiplicand X, it is necessary to correct the product of the multiplier A0 and the multiplicand X. The conversion rule 4 indicates that conversion is performed to a circuit including a circuit for the correction. That is, FIG.
, 171 is a multiplier before conversion. Multiplier 1
72 multiplies the multiplicand X by the multiplier A0 and outputs a product P0 (= XA0) having an n + m bit width.
【0080】インバータ178は、積P0の全ビットの
論理否定をとり、n+mビット幅の信号を出力する。ミ
キサ173は、被乗数Xを上位nビット、値が0である
mビット幅の信号を下位mビットとして合成し、n+m
ビット幅の信号R2(=X・2m )を出力する。Inverter 178 performs a logical negation on all bits of product P0 and outputs a signal having a width of n + m bits. The mixer 173 combines the multiplicand X with the upper n bits and the m-bit width signal having a value of 0 as the lower m bits to obtain n + m
A bit width signal R2 (= X · 2 m ) is output.
【0081】ミキサ174は、各ビットの値が被乗数X
の最上位ビットの値X(n−1)であるmビット幅の信
号を上位mビット、上記被乗数Xの論理否定数を下位n
ビットとして合成し、n+mビット幅の信号を出力す
る。インバータ177は、ミキサ174からの出力の全
ビットの論理否定をとり、n+mビット幅の信号R3
(=−X−1)を出力する。The mixer 174 sets the value of each bit to the multiplicand X
The signal of m bit width which is the value of the most significant bit X (n-1) is the upper m bits, and the logical negation of the multiplicand X is the lower n bits.
The signals are synthesized as bits and a signal having a width of n + m bits is output. The inverter 177 performs a logical negation of all bits of the output from the mixer 174, and outputs a signal R3 having an n + m bit width.
(= −X−1) is output.
【0082】加算器175は、信号R2、信号R3、お
よび値が1のキャリーインを入力として、それらのn+
mビット幅の和R4(=X・(2m −1))を出力す
る。加算器176は、積P0の論理否定数、和R4、お
よび値が1のキャリーインを入力として、それらのn+
mビット幅の和R5(=X・(2m −1)−P0)を、
積Pとして出力する。The adder 175 receives the signal R2, the signal R3, and the carry-in having a value of 1 as inputs, and inputs n +
The sum R4 (= X · (2 m −1)) of m bit width is output. Adder 176 receives as inputs the logical negation of product P0, sum R4, and the carry-in value of 1, and n +
The m-bit width sum R5 (= XX (2 m -1) -P0) is expressed as
Output as product P.
【0083】なお、前記ステップ145の判定条件とし
ては、posibits(A)>negabits
(A)+1に限らず、posibits(A)≧m/2
などでもよい。また、上記補正のための各回路の規模を
考慮して、さらにposibits(A)の値が大きい
ときにだけ、ステップ147に移行するようにしてもよ
い。Note that the condition for determination in step 145 is that positives (A)> negatives
Not limited to (A) +1, but posibibits (A) ≧ m / 2
And so on. Further, in consideration of the scale of each circuit for the above correction, the process may proceed to step 147 only when the value of posibibits (A) is further large.
【0084】図20は、上記ステップ147の処理を行
う構成をその機能に着目して示す構成図である。入力手
段231は、元の機能素子である乗算器171を示す回
路情報を回路データ記憶部23から読み出し、乗算器1
71の入力がmビットの乗数Aと、nビットの被乗数X
であることを示す情報を論理否定手段232に出力す
る。また、上記被乗数Xを示す情報、および乗算器17
1の出力がm+mビットの積Pであることを示す情報を
論理否定演算回路生成手段234に出力する。FIG. 20 is a block diagram showing the configuration for performing the processing of step 147, focusing on its function. The input unit 231 reads circuit information indicating the multiplier 171 as the original functional element from the circuit data storage unit 23, and
The input of 71 is an m-bit multiplier A and an n-bit multiplicand X
Is output to the logical negation unit 232. Further, information indicating the multiplicand X and the multiplier 17
The information indicating that the output of 1 is the product P of m + m bits is output to the logical NOT operation circuit generating means 234.
【0085】論理否定手段232は、乗数Aの全ビット
の論理否定をとって乗数A0を出力するインバータ17
9を示す情報を出力手段235に出力するとともに、上
記乗数A0を示す情報、被乗数Xを示す情報、および乗
数A0と被乗数Xとの乗算結果が積P0であることを示
す情報を乗算モジュール生成手段233に出力する。ま
た、上記積P0を示す情報を論理否定演算回路生成手段
234にも出力する。The logical negation means 232 takes the logical negation of all bits of the multiplier A and outputs the multiplier A0.
9 is output to the output unit 235, and the information indicating the multiplier A0, the information indicating the multiplicand X, and the information indicating that the result of multiplication of the multiplier A0 and the multiplicand X is the product P0 are output to the multiplication module generation unit. 233. The information indicating the product P0 is also output to the logical NOT operation circuit generating means 234.
【0086】乗算モジュール生成手段233は、乗数A
0と被乗数Xとの積P0を求める乗算器172を示す情
報を生成し、出力手段235に出力する。論理否定演算
回路生成手段234は、上記積P0、および被乗数Xに
基づいて、被乗数Xと2m −1との積R4(=X・(2
m −1))から積P0を減算した信号R5(=X・(2
m −1)−P0)を求めることにより積P0を補正して
積Pを出力する各回路173〜178を示す情報を生成
し、出力手段235に出力する。The multiplier module generating means 233 calculates the multiplier A
The information indicating the multiplier 172 for obtaining the product P0 of 0 and the multiplicand X is generated and output to the output unit 235. Based on the product P0 and the multiplicand X, the logical NOT operation circuit generating means 234 calculates the product R4 of the multiplicand X and 2 m −1 (= X · (2
m- 1)) and a signal R5 (= X · (2
By calculating m- 1) -P0), information indicating the circuits 173 to 178 that correct the product P0 and output the product P is generated and output to the output unit 235.
【0087】出力手段235は、各手段232〜234
から出力された変換後の回路を示す回路情報を回路デー
タ記憶部23に格納する。以下、前記変換規則1〜4に
よって元の乗算器と等価な回路に変換できることを数式
を用いて証明する。 <変換規則1>(図10) 図10において、132、133、・・・・・、13
4、135は、それぞれ1ビット幅の変数の乗数Y
(0)と、各1ビット幅の被乗数X(0)、X(1)、
・・・・・、X(n−2)、X(n−1)とのそれぞれ
の論理積P(0)、P(1)、・・・・・、P(n−
2)、P(n−1)をとるAND回路である。Y(0)
=0 または 1であるから、 ここで、Y(0)およびPi は共に1ビットなので、X
i ・Y(0)=Xi and Y(0)である。The output means 235 includes the means 232 to 234
Is stored in the circuit data storage unit 23, which indicates the converted circuit output from the circuit. Hereinafter, it will be proved by using mathematical expressions that the circuit can be converted into a circuit equivalent to the original multiplier by the conversion rules 1 to 4. <Conversion Rule 1> (FIG. 10) In FIG. 10, 132, 133,..., 13
4, 135 are multipliers Y of 1-bit variable, respectively.
(0) and multiplicands X (0), X (1) each having a 1-bit width,
..., X (n−2), X (n−1) and their logical products P (0), P (1),.
2) An AND circuit that takes P (n-1). Y (0)
= 0 or 1, so Here, since Y (0) and Pi are both 1 bit, X
i · Y (0) = X i and Y (0).
【0088】よって、 P(i)=X(i) and Y(0) (0≦i
≦n−1) P(n)=0 <変換規則2>(図13) P=X・Y =X・Y(m−1:0) =X・{Y(m−1:K)・2K +Y(K−1:0)} =X・Y(m−1:K)・2K +X・Y(K−1:0) =P2(n+m−K−1:0)・2K +P1(n+K−1:0) =P2(n+m−K−1:0)・2K +P1(n+K−1:K)・2K +P1 (K−1:0) =P2(n+m−K−1:0)・2K +R1(n+m−K−1:0)・2K + P1(K−1:0)……(但しR1(n+m−K−1:n)=0)、 R1(n−1:0)=P1(n+K−1:K)) ={P2(n+m−K−1:0)+R1(n+m−K−1:0)}・2K +P 1(K−1:0) =R2(n+m−K−1:0)・2K +P1(K−1:0) よって、 P(K−1:0)=P1(K−1:0) P(n+m−1:K)=R2(n+m−K−1:0) なお、乗数が定数の乗数Aである場合も同じである。Therefore, P (i) = X (i) and Y (0) (0 ≦ i
≦ n−1) P (n) = 0 <Conversion Rule 2> (FIG. 13) P = X · Y = X · Y (m−1: 0) = X · : Y (m−1: K) · 2 K + Y (K−1: 0)} = XY (m−1: K) · 2K + XY (K−1: 0) = P2 (n + m−K−1: 0) · 2K + P1 ( n + K-1: 0) = P2 (n + m-K-1: 0) 2K + P1 (n + K-1: K) 2K + P1 (K-1: 0) = P2 (n + m-K-1: 0) 2K + R1 (n + m-K-1: 0) 2K + P1 (K-1: 0) (where R1 (n + m-K-1: n) = 0), R1 (n-1: 0) ) = P1 (n + K-1: K)) = {P2 (n + m-K-1: 0) + R1 (n + m-K-1: 0)}. 2K + P1 (K-1: 0) = R2 (n + m) -K-1: 0) · 2 K + P1 (K-1: 0) Thus, P (K-1 0) = P1 (K-1: 0) P (n + m-1: K) = R2 (n + m-K-1: 0) Note that it is also the case multiplier is a multiplier A constant.
【0089】 <変換規則3(a)>(図16(a)) P=X・A =X・A(m−1:0) =X・{A(m−1)・2 m-1+A(m−2:0)} =X・A(m−1)・2 m-1+X・A(m−2:0) ……(∵A(m−1)=1) =X・2 m-1+P3(n+m−2:0) =X・2 m-1+P3(n+m−2:m−1)・2 m-1+P3(m−2:0) =R1(n:0)・2 m-1+P3(m−2:0) よって、 P(m−2:0)=P3(m−2:0) P(n+m−1:m−1)=R1(n:0) <変換規則3(b)>(図16(b)) P=X・A =X・A(m−1:0) =X・{A(m−1)・2 m-1+A(m−2:0)} =X・A(m−2:0) ……(∵A(m−1)=0) =P3(n+m−2:0) よって、 P(n+m−2:0)=P3(n+m−2:0) P(n+m−1)=0 <変換規則4>(図19)以下、複数ビットの数Zにつ
いての全ビットの論理否定数を *Zで表す。<Conversion Rule 3 (a)> (FIG. 16A) P = X · A = X · A (m−1: 0) = X · {A (m−1) · 2 m−1 + A (M−2: 0)} = X · A (m−1) · 2 m−1 + X · A (m−2: 0)... (∵A (m−1) = 1) = X · 2 m −1 + P3 (n + m−2: 0) = X · 2 m−1 + P3 (n + m−2: m−1) · 2 m−1 + P3 (m−2: 0) = R1 (n: 0) · 2 m -1 + P3 (m-2: 0) Therefore, P (m-2: 0) = P3 (m-2: 0) P (n + m-1: m-1) = R1 (n: 0) <Conversion Rule 3 (B)> (FIG. 16 (b)) P = X · A = X · A (m−1: 0) = X · ΔA (m−1) · 2 m−1 + A (m−2: 0) == X · A (m−2: 0) ∵ (mA (m−1) = 0) = P3 (n + m−2: 0) Therefore, P (n + m−2: 0) = P3 n + m-2: 0) P (n + m-1) = 0 < conversion rule 4> (Fig. 19) or less, represented by the logic NOT number of all the bits of the number Z of a plurality of bits * Z.
【0090】定数Aについて −A = *A+1−2m ←→ *A+1 = 2m −A
が成立ち、また、nビット数Xに関して、(Xの2の補
数)= *X+1=−Xである。よって、 P=X・A =X・(2m − *A−1) =X・2m −X−X・ *A =X・2m +(Xの2の補数)+(X・ *Aの2の補数) X1=X・2m +(Xの2の補数),P0=X・ *Aであるから、 X・A=X1+(P0の2の補数) =X・2m +(Xの2の補数)+(P0の2の補数) であるから、 X・A=X・2m + *X+1+ *P0+1 前式の第一項X・2m はミキサ173によりR2として
求められる。Regarding the constant A, −A = * A + 1−2 m ← → * A + 1 = 2 m− A
Holds, and for the n-bit number X, (two's complement of X) = * X + 1 = −X. Therefore, P = X · A = X · (2 m− * A−1) = X · 2 m− XX− * A = X · 2 m + (2's complement of X) + (X · * A X1 = X · 2 m + (2's complement of X) and P0 = X · * A, X · A = X1 + (2's complement of P0) = X · 2 m + (X X · A = X · 2 m + * X + 1 + * P0 + 1 The first term X · 2 m in the above equation is obtained as R2 by the mixer 173.
【0091】第二項Xは、ミキサ174およびインバー
タ177により、符号拡張され、理論否定をとられてR
3として求められる。第四項P0は乗算器172および
インバータ178により求められる。また、第一項X・
2m と第二項Xと第三項あるいは第五項の1の加算は加
算器175によりR4として求められる。X・Aはn+
mビット数であるから、加算結果のn+m+1ビット目
の桁は考慮しなくてよい。The second term X is sign-extended by the mixer 174 and the inverter 177, logically negated, and R
It is required as 3. The fourth term P0 is obtained by the multiplier 172 and the inverter 178. In addition, the first term X
The addition of 2 m , the second term X, and the third term or the fifth term 1 is obtained by the adder 175 as R4. XA is n +
Since the number of bits is m, the digit of the (n + m + 1) th bit of the addition result need not be considered.
【0092】また、前記R4と前式第四項P0と第五項
あるいは第三項の1の加算は加算器176によりR5と
して求められる。X・Aはn+mビット数であるから、
加算結果のn+m+1ビット目の桁は考慮しなくてよ
い。よって、 P=X・A =P(n+m−1:0) =R5(n+m−1:0) 実施例1の論理回路の自動設計システムによれば、上記
のように、乗算器に入力される乗数が定数である場合、
乗数における値が1であるビットの総個数が3以上であ
れば、乗数を、値が1であるビットの数が等しくなるよ
うに分割することにより、部分積和を求める回路がバラ
ンスのよい二分木状に構成され、加算の論理段数が少な
く抑えられるとともに、乗算速度を高速にすることが可
能となる。The addition of R4, the fourth term P0 in the preceding equation, and the fifth or third term 1 is obtained as R5 by the adder 176. Since X · A is an n + m bit number,
The digit of the (n + m + 1) th bit of the addition result need not be considered. Therefore, P = XA = P (n + m-1: 0) = R5 (n + m-1: 0) According to the automatic logic circuit design system of the first embodiment, the signal is input to the multiplier as described above. If the multiplier is a constant,
If the total number of bits having a value of 1 in the multiplier is 3 or more, the circuit for obtaining the partial sum of products is divided by dividing the multiplier so that the number of bits having a value of 1 becomes equal. It is configured in a tree shape, and the number of logical stages of addition can be reduced, and the multiplication speed can be increased.
【0093】また、値が1であるビットの総個数が2以
下であれば、その値が1であるビットに関してのみ部分
積を求める回路が構成されることにより、部分積数が少
なく抑えられ、回路面積の削減が可能となる。また、値
が1であるビットの総個数が多ければ、乗数の論理否定
数と被乗数とを乗算する乗算器と、その乗算結果を補正
する回路とが構成されるとともに、上記乗算器が、前記
のように構成されることにより、部分積数や回路面積の
削減が可能となる。 (実施例2)前記実施例1における図8のステップ10
13、すなわち図12のステップ141〜147と同様
の処理を行う構成の変形例を図21に基づいて説明す
る。If the total number of bits having a value of 1 is 2 or less, a circuit for obtaining a partial product only for a bit having a value of 1 is constituted, so that the number of partial products can be reduced. The circuit area can be reduced. If the total number of bits having a value of 1 is large, a multiplier that multiplies the logical negation of the multiplier by the multiplicand and a circuit that corrects the multiplication result are configured. With this configuration, the number of partial products and the circuit area can be reduced. (Embodiment 2) Step 10 of FIG.
13, that is, a modification of the configuration that performs the same processing as in steps 141 to 147 of FIG. 12 will be described with reference to FIG. 21.
【0094】同図において、入力手段2901は、元の
機能素子である乗算器を示す回路情報を回路データ記憶
部23から読み出し、乗算器の入力がmビットの乗数A
またはYと、nビットの被乗数Xであること、および出
力がm+nビットの積Pであることを示す情報を論理否
定判定手段2902に出力する。論理否定判定手段29
02は、posibits(A)がnegabits
(A)+1よりも大きいかどうかを判定し、大きい場合
には、乗数AまたはY、被乗数X、および積Pを示す情
報を論理否定手段2904に出力する一方、大きくない
場合には、上記情報を乗数ビット幅判定手段2903に
出力する。In the figure, an input means 2901 reads circuit information indicating a multiplier which is an original functional element from a circuit data storage unit 23, and the input of the multiplier is an m-bit multiplier A
Alternatively, information indicating that Y is an n-bit multiplicand X and that the output is a product P of m + n bits is output to the logical negation determining means 2902. Logical NOT determining means 29
02: Posibits (A) is negative
(A) It is determined whether or not it is larger than +1. If it is larger, information indicating the multiplier A or Y, the multiplicand X, and the product P is output to the logical negation means 2904. Is output to the multiplier bit width determination means 2903.
【0095】乗数ビット幅判定手段2903は、乗数が
変数であるか、定数であってかつposibits
(A)が3以上であるか、または定数であってかつpo
sibits(A)が2以下であるかを判定し、前2者
の場合には、乗数AまたはY、被乗数X、および積Pを
示す情報を乗数分割手段2907に出力する一方、後者
の場合には、乗数A、被乗数X、および積Pを示す情報
を乗数最上位ビット分離手段2909に出力する。The multiplier bit width determining means 2903 determines whether the multiplier is a variable or a constant and
(A) is 3 or more or a constant and po
It is determined whether or not sibits (A) is 2 or less. In the case of the former two, the information indicating the multiplier A or Y, the multiplicand X, and the product P is output to the multiplier dividing means 2907. Outputs information indicating the multiplier A, the multiplicand X, and the product P to the multiplier most significant bit separating unit 2909.
【0096】その他の手段2904〜2913は、図1
4、18、20に示す各手段と、情報の伝達経路が多少
異なる点を除き、同様の機能を有するものなので、説明
を省略する。 (実施例3)前記実施例1における図8のステップ10
13で行われる処理の他の例を図22に基づいて説明す
る。The other means 2904 to 2913 are shown in FIG.
Since they have the same functions as those of the units 4, 18, and 20 except that the information transmission path is slightly different, the description is omitted. (Embodiment 3) Step 10 of FIG.
Another example of the process performed in step 13 will be described with reference to FIG.
【0097】この実施例では、乗数のビット幅が3以上
である場合には、乗数が定数であるか変数であるかに係
らず、乗数を約1/2のビット幅に分割する。また、乗
数のビット幅が2である場合には、乗数が定数であれ
ば、前記変換規則3(a)(b)(図15、16)を適
用して、値が1であるビットに関してのみ部分積を求め
る回路に変換する一方、乗数が変数であれば、乗数が1
ビットの2つの乗算器を含む回路を構成する。In this embodiment, when the bit width of the multiplier is 3 or more, the multiplier is divided into approximately 1/2 bit width regardless of whether the multiplier is a constant or a variable. When the bit width of the multiplier is 2, if the multiplier is a constant, the above conversion rule 3 (a) (b) (FIGS. 15 and 16) is applied, and only the bit whose value is 1 is applied. If the multiplier is a variable, the multiplier is 1
A circuit comprising two multipliers of bits is constructed.
【0098】まず、ステップ211では、乗数のビット
幅が3以上であるかどうかを判定し、3以上であれば、
ステップ212に移行し、前記変換規則2(図19)を
適用して乗数のビット幅が約1/2の2つの乗算器を含
む回路に変換する。また、乗数のビット幅が3以上でな
ければ、ステップ213に移行して、乗数が定数である
かどうかを判定する。乗数が定数であれば、ステップ2
14に移行し、前記変換規則3(a)(b)(図15、
16)を適用して乗数における値が1であるビットに関
してのみ部分積を求める回路に変換する。First, at step 211, it is determined whether or not the bit width of the multiplier is 3 or more.
In step 212, the conversion rule 2 (FIG. 19) is applied to convert the multiplier into a circuit including two multipliers having a bit width of about 1/2. If the bit width of the multiplier is not 3 or more, the process shifts to step 213 to determine whether the multiplier is a constant. If the multiplier is a constant, step 2
14, the conversion rules 3 (a) and (b) (FIG. 15,
16) is applied to convert to a circuit that obtains a partial product only for a bit having a value of 1 in the multiplier.
【0099】一方乗数が変数であれば、ステップ215
に移行し、図23に示す変換規則5を適用する。変換規
則5は、乗算器221を、乗算器222と、乗算器22
3と、リッパ224と、ミキサ225と、加算器226
とから構成される回路に変換することを示すものであ
る。On the other hand, if the multiplier is a variable, step 215
Then, the conversion rule 5 shown in FIG. 23 is applied. The conversion rule 5 is that the multiplier 221 includes the multiplier 222 and the multiplier 22
3, a ripper 224, a mixer 225, and an adder 226.
This indicates that the data is converted into a circuit composed of
【0100】上記乗算器222は、乗数A(1:0)の
下位1ビットA(0)を被乗数X(n−1:0)に乗算
してn+1ビット幅の部分積R1(n:0)を求める。
乗算器223は、乗数A(1:0)の上位1ビットA
(1)を被乗数X(n−1:0)に乗算してn+1ビッ
ト幅の部分積R2(n+1:1)を求める。リッパ22
4は、部分積R1(n:0)を、上位nビットR1
(n:1)と下位1ビットR(0)とに分割し、R
(0)を積P(0)として出力する。The multiplier 222 multiplies the lower one bit A (0) of the multiplier A (1: 0) by the multiplicand X (n−1: 0) to obtain a partial product R1 (n: 0) having an n + 1 bit width. Ask for.
The multiplier 223 outputs the upper one bit A of the multiplier A (1: 0).
(1) is multiplied by the multiplicand X (n-1: 0) to obtain a partial product R2 (n + 1: 1) having an n + 1 bit width. Ripper 22
4 represents the partial product R1 (n: 0) as the upper n bits R1
(N: 1) and lower one bit R (0),
(0) is output as the product P (0).
【0101】ミキサ225は、上記R1(n:1)を上
位側に1ビットだけ符号拡張した信号R3(n+1:
1)を出力する。加算器226は、この信号R3(n+
1:1)と部分積R2(n+1:1)とを加算し、和R
4(n+1:1)を積P(n+1:1)として出力す
る。上記変換規則5によって元の乗算器221と等価な
回路に変換できることの証明を以下に示す。 P=X・A =X・A(1:0) =X・{A(1)・2+A(0)} =X・A(1)・2+X・A(0) =R2(n:0)・2+R1(n:0) =R2(n:0)・2+R1(n:1)・2+R1(0) =R2(n:0)・2+R3(n:0)・2+R1(0) ……(但し、R3(n)=0)、R3(n−1:0)=R1(n:1)) =R4(n:0)・2+R1(0) よって、 P(0) =R1(0) P(n+1:1)=R4(n:0) この処理が行われた場合、乗算器222、223は、乗
数のビット幅が1ビットになるので、次のループの処理
で、前記変換規則1(図10)によってAND回路から
構成される回路に変換される。The mixer 225 outputs a signal R3 (n + 1: 1) obtained by sign-extending the above R1 (n: 1) by one bit to the upper side.
1) is output. The adder 226 outputs the signal R3 (n +
1: 1) and the partial product R2 (n + 1: 1), and the sum R
4 (n + 1: 1) is output as a product P (n + 1: 1). The proof that the conversion rule 5 can be converted into a circuit equivalent to the original multiplier 221 will be shown below. P = X · A = X · A (1: 0) = X · {A (1) · 2 + A (0)} = X · A (1) · 2 + X · A (0) = R2 (n: 0) · 2 + R1 (n: 0) = R2 (n: 0) · 2 + R1 (n: 1) · 2 + R1 (0) = R2 (n: 0) · 2 + R3 (n: 0) · 2 + R1 (0) (where R3 (N) = 0), R3 (n-1: 0) = R1 (n: 1)) = R4 (n: 0) .2 + R1 (0) Therefore, P (0) = R1 (0) P (n + 1: 1) = R4 (n: 0) When this process is performed, the multipliers 222 and 223 perform the next loop process because the multiplier has a bit width of 1 bit. Is converted into a circuit composed of an AND circuit.
【0102】本実施例3によれば、乗算器の乗数のビッ
ト幅が3以上であれば、乗数を分割することにより部分
積和を求める回路を二分木状に構成することが可能とな
り、乗算の論理段数が少なく乗算速度を高速にすること
が可能となる。また、乗数のビット幅が2以下でかつ乗
数が定数であれば、乗数で値が1であるビットに関して
のみ部分積を求める回路を生成することにより、部分積
数を削減することが可能となり、回路面積の削減が可能
となる。 (実施例4)前記実施例1におけるステップ144(図
12)および実施例3におけるステップ214(図2
2)においては、乗数Aにおいてposibits
(A)=2またはビット幅が2である乗算器に対して、
乗数Aの最上位ビットを分割する変換規則3を適用する
例を示したが、所定のKビット目と、それより上位ビッ
ト、および下位ビットの3つに分割する変換規則6を適
用してもよい。また、ステップ146(図12)または
ステップ212(図22)における変換規則2にも代え
て変換規則6を適用してもよい。この場合には、ステッ
プ143または211の判定を省略することもできる。According to the third embodiment, if the bit width of the multiplier of the multiplier is 3 or more, the circuit for obtaining the partial sum of products by dividing the multiplier can be formed in a binary tree. And the multiplication speed can be increased. Further, if the bit width of the multiplier is 2 or less and the multiplier is a constant, a circuit for obtaining a partial product only for bits having a value of 1 in the multiplier can be generated, thereby reducing the number of partial products. The circuit area can be reduced. (Embodiment 4) Step 144 (FIG. 12) in the first embodiment and step 214 (FIG. 2) in the third embodiment
In 2), in the multiplier A, posibibits
(A) = 2 or a multiplier having a bit width of 2
Although the example in which the conversion rule 3 for dividing the most significant bit of the multiplier A is applied has been described, the conversion rule 6 for dividing into the predetermined K-th bit, the higher-order bits, and the lower-order bits may be applied. Good. Also, conversion rule 6 may be applied instead of conversion rule 2 in step 146 (FIG. 12) or step 212 (FIG. 22). In this case, the determination in step 143 or 211 can be omitted.
【0103】すなわち、図24に示すように、まず、ス
テップ311で乗数AのKビット目A(K−1)の値が
1であるかどうかを判定し、1である場合にはステップ
312に移行して、図25(a)に示す変換規則6
(a)を適用する一方、0である場合にはステップ31
3に移行して、同図(b)に示す変換規則6(b)を適
用する。なお、上記Kの値は、例えば実施例1と同様に
設定すればよい。That is, as shown in FIG. 24, first, in step 311, it is determined whether or not the value of the K-th bit A (K−1) of the multiplier A is 1, and if it is 1, the process proceeds to step 312. The process is shifted to the conversion rule 6 shown in FIG.
While applying (a), if it is 0, step 31
3 and the conversion rule 6 (b) shown in FIG. The value of K may be set, for example, in the same manner as in the first embodiment.
【0104】変換規則6(a)は、乗算器281を、乗
算器282、283と、ミキサ284〜287と、加算
器288とから構成される回路に変換することを示すも
のである。乗算器282は、乗数Aにおける下位K−1
ビットA5(K−2:0)=A(K−2:0)を被乗数
X(n−1:0)に乗算して、n+K−1ビット幅の部
分積P5(n+K−2:0)を求める。The conversion rule 6 (a) indicates that the multiplier 281 is converted into a circuit composed of multipliers 282 and 283, mixers 284 to 287, and an adder 288. The multiplier 282 calculates the lower K−1 in the multiplier A.
The multiplicand X (n-1: 0) is multiplied by the bit A5 (K-2: 0) = A (K-2: 0) to obtain a partial product P5 (n + K-2: 0) having an n + K-1 bit width. Ask.
【0105】乗算器283は、乗数Aにおける上位m−
KビットA6(m−K−1:0)=A(m−1:K)を
被乗数X(n−1:0)に乗算して、n+m−Kビット
幅の部分積P6(n+m−K−1:0)を求める。ミキ
サ284は、部分積P5(n+K−2:0)を上位側に
m−K+1ビットだけ符号拡張した信号R1(n+m−
1:0)を出力する。The multiplier 283 calculates the upper m−
Multiply the multiplicand X (n-1: 0) by K bits A6 (mK-1: 0) = A (m-1: K) to obtain a partial product P6 (n + m-K- 1: 0). The mixer 284 outputs a signal R1 (n + m−) obtained by sign-extending the partial product P5 (n + K−2: 0) by m−K + 1 bits to the upper side.
1: 0) is output.
【0106】ミキサ285は、部分積P6の下位に、値
が0であるKビット幅の信号を合成した信号R2(n+
m−1:0)を出力する。ミキサ286は、被乗数X
(n−1:0)の下位に、値が0であるK−1ビット幅
の信号を合成した信号R3(n+K−2:0)を出力す
る。ミキサ287は、上記信号R3(n+K−2:0)
を上位側にm−K+1ビットだけ符号拡張した信号R4
(n+m−1:0)を出力する。The mixer 285 synthesizes a signal R2 (n +
m-1: 0). Mixer 286 provides multiplicand X
A signal R3 (n + K-2: 0) obtained by synthesizing a K-1 bit width signal having a value of 0 is output below (n-1: 0). The mixer 287 outputs the signal R3 (n + K−2: 0).
R4 obtained by sign-extending the upper side by m−K + 1 bits
(N + m-1: 0) is output.
【0107】加算器288は、上記信号R1(n+m−
1:0)と、信号R2(n+m−1:0)と、信号R4
(n+m−1:0)とを加算して積P(n+m−1:
0)を出力する。また、変換規則6(b)は、乗算器2
81を、乗算器282、283と、ミキサ284、28
7と、加算器289とから構成される回路に変換するこ
とを示すものである。The adder 288 outputs the signal R1 (n + m−
1: 0), a signal R2 (n + m-1: 0), and a signal R4
(N + m-1: 0) and the product P (n + m-1:
0) is output. The conversion rule 6 (b) indicates that the multiplier 2
81, multipliers 282 and 283 and mixers 284 and 28
7 and a circuit composed of an adder 289.
【0108】上記乗算器282、283、およびミキサ
284、287は、変換規則6(a)で示したものと同
じものである。加算器289は、信号R1(n+m−
1:0)と、信号R2(n+m−1:0)とを加算して
積P(n+m−1:0)を出力する。上記変換規則6
(a)(b)によって元の乗算器281と等価な回路に
変換できることの証明を以下に示す。The multipliers 282 and 283 and the mixers 284 and 287 are the same as those shown in the conversion rule 6 (a). The adder 289 outputs the signal R1 (n + m−
1: 0) and the signal R2 (n + m-1: 0) are added to output a product P (n + m-1: 0). Conversion rule 6 above
The proof that (a) and (b) can be converted into a circuit equivalent to the original multiplier 281 will be shown below.
【0109】 <変換規則6(a)> A(K−1)=1 であるから、 P=X・A =X・{A(m−1:K)・2K +A(K−1)・2 K-1+A(K−2:0) } =X・A(m−1:K)・2K +X・2 K-1+X・A(K−2:0) =X・A6(m−K−1:0)・2K +X・2 K-1+X・A5(K−2:0) =P6(n+m−K−1:0)・2K +R3(n+K−2:0)・2 K-1+P 5(n+K−2:0) =R2(n+m−1:0)・2K +R4(n+m−1:0)・2 K-1+R1( n+m−1:0) <変換規則6(b)> A(K−1)=0 であるから、 P=X・A =X・{A(m−1:K)・2 K+A(K−1)・2 K-1+A(K−2:0) } =X・A(m−1:K)・2 K+X・A(K−2:0) =X・A6(m−K−1:0)・2K +X・A5(K−2:0) =P6(n+m−K−1:0)・2K +P5(n+K−2:0) =R2(n+m−1:0)・2K +R1(n+m−1:0) (実施例5)前記実施例1におけるステップ144(図
12)、または実施例3におけるステップ214におい
ては、乗数Aにおいてposibits(A)=2また
はビット幅が2である乗算器に対して変換規則3を適用
する例を示したが、図26に示す変換規則7を適用して
もよい。<Conversion Rule 6 (a)> Since A (K−1) = 1, P = X · A = X · {A (m−1: K) · 2 K + A (K−1) · 2 K-1 + A (K-2: 0) = = X · A (m−1: K) · 2 K + X · 2 K-1 + X · A (K−2: 0) = X · A6 (m− K-1: 0) · 2 K + X · 2 K-1 + X · A5 (K-2: 0) = P6 (n + m-K-1: 0) · 2 K + R3 (n + K-2: 0) · 2 K -1 + P 5 (n + K -2: 0) = R2 (n + m-1: 0) · 2 K + R4 (n + m-1: 0) · 2 K-1 + R1 (n + m-1: 0) < conversion rule 6 (b )> A (K-1) = 0, then P = XA = X.DELTA.A (m-1: K) 2K + A (K-1) 2K-1 + A (K-2 : 0)} = X · A (m-1: K) · 2 K + X · A (K-2: 0) = X · A6 (m-K-1: 0 · 2 K + X · A5 ( K-2: 0) = P6 (n + m-K-1: 0) · 2 K + P5 (n + K-2: 0) = R2 (n + m-1: 0) · 2 K + R1 (n + m -1: 0) (Embodiment 5) In step 144 (FIG. 12) in the first embodiment or step 214 in the third embodiment, a multiplier whose posbits (A) = 2 or the bit width is 2 in the multiplier A Has been described above, the conversion rule 3 shown in FIG. 26 may be applied.
【0110】変換規則7は、乗算器271を、乗算器2
72と、ミキサ273、274と、加算器275とから
構成される回路に変換することを示すものである。乗算
器272は、乗数A(m−1:0)における値が1であ
るビットの桁K(0≦K≦m−1)について、乗数A
(m−1:0)のKビット目を0に設定したmビット幅
の乗数A7(m−1:0)を被乗数Xに乗算し、積P7
(n+m−1:0)を出力する。The conversion rule 7 is that the multiplier 271 is connected to the multiplier 2
72, a mixer 273, 274, and an adder 275. The multiplier 272 generates a multiplier A for a digit K (0 ≦ K ≦ m−1) of a bit having a value of 1 in the multiplier A (m−1: 0).
The multiplicand X is multiplied by a multiplier A7 (m-1: 0) having an m-bit width in which the K-th bit of (m-1: 0) is set to 0, and a product P7
(N + m-1: 0) is output.
【0111】ミキサ273は、被乗数Xを上位nビッ
ト、値が0であるK−1ビット幅の信号を下位K−1ビ
ットとして合成し、n+K−1ビット幅の信号R1(n
+K−2:0)を出力する。ミキサ274は、上記信号
R1(n+K−2:0)の上位に、各ビットの値がR1
(n+k−2)であるm−K+1ビット幅の信号を合成
して(信号R1を符号拡張して)n+mビット幅の信号
R2(n+m−1:0)を出力する。The mixer 273 combines the multiplicand X with the upper n bits and the K-1 bit width signal having a value of 0 as the lower K-1 bits, and generates an n + K-1 bit width signal R1 (n
+ K-2: 0). The mixer 274 sets the value of each bit to R1 (n + K-2: 0) above the signal R1 (n + K-2: 0).
A signal having a width of (m + K + 1), which is (n + k-2), is synthesized (the signal R1 is sign-extended) to output a signal R2 (n + m-1: 0) having a width of n + m.
【0112】加算器275は、積P7(n+m−1:
0)と信号R2(n+m−1:0)とを加算し、n+m
ビット幅の和R3(n+m−1:0)を積P(n+m−
1:0)として出力する。上記変換規則7によって元の
乗算器271と等価な回路に変換できることの証明を以
下に示す。A7(m−1:0)=A(m−1:0)−2
K-1 であるから、 P=X・A =X・{A7(m−1:0)+2 K-1} =X・2K +X・A7(m−1:0) =R1(n+K−2:0)+P7(n+m−1:0) =R2(n+m−1:0)+P7(n+m−1:0) =R3(n+m−1:0) この場合、乗算器272に入力される乗数A7(m−
1:0)のビット幅は、乗算器271に入力される乗数
A(m−1:0)のビット幅と等しいが、値が1である
ビットの数は減少するので、この処理が繰り返されるこ
とにより、やがて、前記ステップ1008、または10
10(図8)の処理が行われる。The adder 275 calculates the product P7 (n + m−1:
0) and the signal R2 (n + m-1: 0) are added to obtain n + m
The sum of bit widths R3 (n + m-1: 0) is multiplied by the product P (n + m-
1: 0). Proof that the conversion rule 7 can be converted to a circuit equivalent to the original multiplier 271 will be shown below. A7 (m-1: 0) = A (m-1: 0) -2
Since a K-1, P = X · A = X · {A7 (m-1: 0) +2 K-1} = X · 2 K + X · A7 (m-1: 0) = R1 (n + K-2 : 0) + P7 (n + m-1: 0) = R2 (n + m-1: 0) + P7 (n + m-1: 0) = R3 (n + m-1: 0) In this case, the multiplier A7 ( m-
The bit width of (1: 0) is equal to the bit width of the multiplier A (m−1: 0) input to the multiplier 271, but the number of bits having a value of 1 decreases, so this process is repeated. Eventually, in step 1008 or 10
10 (FIG. 8) is performed.
【0113】図27は、上記変換規則7による処理を行
う構成をその機能に着目して示す構成図である。入力手
段261は、元の機能素子である乗算器271を示す回
路情報を回路データ記憶部23から読み出し、乗算器2
71の入力がmビットの乗数A、およびnビットの被乗
数Xであることを示す情報を信号生成手段262に出力
する。また、被乗数Xを示す情報、および乗算器271
の出力がm+nビットの積Pであることを示す情報を演
算回路生成手段264に出力する。FIG. 27 is a configuration diagram showing a configuration for performing the process according to the above conversion rule 7 focusing on its function. The input unit 261 reads circuit information indicating the multiplier 271 as the original functional element from the circuit data storage unit 23,
The information indicating that the input of 71 is an m-bit multiplier A and an n-bit multiplicand X is output to the signal generation means 262. Further, information indicating the multiplicand X and the multiplier 271
Is output to the arithmetic circuit generating means 264, indicating that the output is a product P of m + n bits.
【0114】信号生成手段262は、乗数Aにおける値
が1であるKビット目(0≦K≦m−1)の値を0に設
定した乗数A7を示す情報と、被乗数Xを示す情報と、
その乗算結果が積P7であることを示す情報とを乗算モ
ジュール生成手段263に出力する。また、上記Kの値
を示す情報と、積P7を示す情報とを演算回路生成手段
264に出力する。The signal generation means 262 includes information indicating a multiplier A7 in which the value of the K-th bit (0 ≦ K ≦ m−1) whose value in the multiplier A is 1 is set to 0, information indicating a multiplicand X,
The result indicating that the multiplication result is the product P7 is output to the multiplication module generation means 263. Further, the information indicating the value of K and the information indicating the product P7 are output to the arithmetic circuit generating means 264.
【0115】乗算モジュール生成手段263は、前記信
号Xと前記信号A7との積P7を求める乗算器272を
示す情報を生成し、出力手段265に出力する。演算回
路生成手段264は、Kの値を示す情報、積P7を示す
情報、被乗数Xを示す情報、および積Pを示す情報に基
づいて、ミキサ276、274と加算器275とを示す
情報を出力手段265に出力する。The multiplication module generation means 263 generates information indicating the multiplier 272 for obtaining the product P7 of the signal X and the signal A7, and outputs the information to the output means 265. The arithmetic circuit generator 264 outputs information indicating the mixers 276 and 274 and the adder 275 based on information indicating the value of K, information indicating the product P7, information indicating the multiplicand X, and information indicating the product P. Output to means 265.
【0116】出力手段265は、乗算モジュール生成手
段263、および演算回路生成手段264から出力され
た変換後の回路を示す回路情報を回路データ記憶部23
に格納する。 (実施例6)前記変換規則4の他の例、およびそれらの
変換規則によって生成される乗算器の構成を説明する。
ここで、説明の簡単のために、変数Xが正数である場合
を示すが、正負の値をとり得る場合には、変換規則4と
同様に符号拡張してから論理否定をとったり、論理否定
をとってから符号拡張するようにすればよい。The output unit 265 stores the circuit information indicating the converted circuit output from the multiplication module generation unit 263 and the arithmetic circuit generation unit 264 in the circuit data storage unit 23.
To be stored. (Embodiment 6) Another example of the conversion rule 4 and a configuration of a multiplier generated by the conversion rule will be described.
Here, for the sake of simplicity, the case where the variable X is a positive number is shown. However, if the variable X can take a positive or negative value, the sign is extended and the logical negation or And then extend the sign.
【0117】図28(a)〜(c)は変換規則の結果節
を示すとともに、生成される乗算器の構成を示す。な
お、図28における各構成要素は、図19に示すものと
同一なので、同じ番号を付して説明を省略する。図28
(a)の乗算器は、加算器175のキャリーインとして
値1の信号を入力するのに代えて、ミキサ173に入力
されるmビットの信号として値1の信号を入力するよう
になっている。FIGS. 28A to 28C show the result clauses of the conversion rule and the configuration of the multiplier to be generated. Note that the components in FIG. 28 are the same as those shown in FIG. FIG.
The multiplier of (a) inputs a signal of value 1 as an m-bit signal input to the mixer 173 instead of inputting a signal of value 1 as carry-in of the adder 175. .
【0118】図28(b)の乗算器は、加算器176の
キャリーインとして値1の信号を入力するのに代えて、
同様に、ミキサ173に入力されるmビットの信号とし
て値1の信号を入力するようになっている。また、乗数
のビット幅mが2以上の場合には、図28(c)に示す
ように、加算器175、176共に値1の信号をキャリ
ーイン入力するのに代えて、ミキサ173に入力される
mビットの信号として値2の信号を入力するようにして
もよい。The multiplier shown in FIG. 28 (b) replaces the input of the signal of value 1 as the carry-in of the adder 176,
Similarly, a signal having a value of 1 is input as an m-bit signal input to the mixer 173. When the bit width m of the multiplier is 2 or more, as shown in FIG. 28 (c), both adders 175 and 176 input the signal of value 1 to the mixer 173 instead of carry-in input. Alternatively, a signal having a value of 2 may be input as an m-bit signal.
【0119】上記のように、積P0を補正して積Pを求
める演算は、種々の変形が可能である。上記何れの乗算
器においても、その中に含まれる乗算器は、乗数Aの全
ビットの論理否定をとった値を乗数A0として、この乗
数A0と被乗数Xとを乗算するものなので、posib
its(A)がm/2よりも大きい場合でも、部分積数
をm/2以下にして、回路面積の削減や乗算速度の向上
を図ることができる。As described above, the operation for correcting the product P0 to obtain the product P can be variously modified. In any of the above multipliers, the multiplier included therein multiplies the multiplier A0 and the multiplicand X by setting the value obtained by logically negating all the bits of the multiplier A as the multiplier A0.
Even when it (A) is greater than m / 2, the partial product number can be reduced to m / 2 or less, so that the circuit area can be reduced and the multiplication speed can be improved.
【0120】なお、上記各実施例においては、回路デー
タ記憶部23に格納される回路情報として、機能素子、
論理素子または実装素子などの素子を中心に、素子間の
入出力関係に着目して回路を表すデータ表現が用いられ
る例を説明したが、これに限らず、素子間のつながり、
すなわち信号を中心にしたデータ表現が用いられる場合
などでも、同様な変換規則に基づく回路の変換処理が可
能である。In each of the above embodiments, the circuit information stored in the circuit data storage unit 23 includes a functional element,
An example in which a data expression representing a circuit is used with an emphasis on an input / output relationship between elements with a focus on an element such as a logic element or a mounting element has been described.
That is, even when a data expression centering on a signal is used, a circuit conversion process based on a similar conversion rule can be performed.
【0121】また、変換処理は、上記のような変換規則
に基づく回路の変換処理に限らず、生成登録する回路デ
ータの各部分を特定の順序で逐次的に生成し登録する処
理でもよい。また、mビット幅の乗数とnビット幅の被
乗数との積Pがn+mビット幅である場合だけを説明し
たが、より一般的に任意のビット幅の積を求めることも
容易にできる。例えば積Pのビット幅lがn+mより小
さい場合は、乗算結果の下位からlビットをとればよ
く、n+mより大きい場合は、n+mビットの乗算結果
を下位のビットとし、上位のビットを符号拡張、または
0拡張すればよい。The conversion process is not limited to the circuit conversion process based on the above conversion rules, but may be a process of sequentially generating and registering each part of the circuit data to be generated and registered in a specific order. In addition, although only the case where the product P of the multiplier of m-bit width and the multiplicand of n-bit width is n + m-bit width has been described, more generally, the product of an arbitrary bit width can be easily obtained. For example, if the bit width 1 of the product P is smaller than n + m, it is sufficient to take l bits from the lower order of the multiplication result. Alternatively, it may be extended by 0.
【0122】[0122]
【発明の効果】以上説明したように、本発明によれば、
乗数における値が1であるビットに関してのみ、被乗数
との部分積を求める部分積演算回路等が形成されるの
で、回路規模の低減や乗算速度の高速化を容易に図るこ
とができる。また、値が1であるビットの数が略等しく
なるようにグループ分けされて、部分積和を加算する部
分積和演算回路が形成されるので、部分積和演算回路を
二分木状にバランスよく構成させることができ、回路の
論理段数も少なく抑えて一層乗算速度を速くすることが
容易になる。As described above, according to the present invention,
Since a partial product operation circuit or the like for obtaining a partial product with the multiplicand is formed only for bits having a value of 1 in the multiplier, the circuit scale can be reduced and the multiplication speed can be easily increased. In addition, since the partial product-sum operation circuit is formed so that the number of bits having the value of 1 is substantially equal to each other and the partial product-sum operation is added, the partial product-sum operation circuit is well-balanced in a binary tree shape. This makes it easy to increase the multiplication speed by reducing the number of logic stages in the circuit.
【0123】さらに、乗数における値が1であるビット
の数が多い場合でも、乗数の論理否定数について乗算を
行う回路が形成されるので、やはり、高速な乗算器や回
路規模の小さい乗算器を構成することが容易になるとい
う効果を奏する。Further, even when the number of bits having a value of 1 in the multiplier is large, a circuit for multiplying the logical negation of the multiplier is formed. Therefore, a high-speed multiplier or a multiplier having a small circuit size is required. There is an effect that the configuration becomes easy.
【図1】実施例1の自動設計システムのハードウェア構
成を示すブロック図である。FIG. 1 is a block diagram illustrating a hardware configuration of an automatic design system according to a first embodiment.
【図2】同、記憶装置の構成を示す説明図である。FIG. 2 is an explanatory diagram showing a configuration of the storage device.
【図3】同、回路データ記憶部に格納される、回路を表
すデータの例を示す説明図である。FIG. 3 is an explanatory diagram showing an example of data representing a circuit stored in a circuit data storage unit.
【図4】同、機能回路情報や機能記述情報の例を示す説
明図である。FIG. 4 is an explanatory diagram showing an example of functional circuit information and functional description information.
【図5】同、論理設計システムの処理を示すメインルー
チンのフローチャートである。FIG. 5 is a flowchart of a main routine showing processing of the logic design system.
【図6】同、図5におけるステップ43の詳細な処理を
示すフローチャートである。FIG. 6 is a flowchart showing a detailed process of step 43 in FIG. 5;
【図7】同、機能素子である乗算器の例を示す説明図で
ある。FIG. 7 is an explanatory diagram showing an example of a multiplier as a functional element.
【図8】同、図6におけるステップ85の詳細な処理を
示すフローチャートである。FIG. 8 is a flowchart showing a detailed process of step 85 in FIG. 6;
【図9】同、図8におけるステップ1002、100
6、1008、1010で生成される回路の例を示す回
路図である。FIG. 9 shows steps 1002 and 100 in FIG.
FIG. 6 is a circuit diagram illustrating an example of a circuit generated in 6, 1008, and 1010.
【図10】同、変換規則1を示す説明図である。FIG. 10 is an explanatory diagram showing a conversion rule 1;
【図11】同、具体的な変換処理の例を示すフローチャ
ートである。FIG. 11 is a flowchart showing an example of a specific conversion process.
【図12】同、図8におけるステップ1013の詳細な
処理を示すフローチャートである。FIG. 12 is a flowchart showing a detailed process of step 1013 in FIG. 8;
【図13】同、変換規則2を示す説明図である。FIG. 13 is an explanatory diagram showing a conversion rule 2;
【図14】同、図12におけるステップ142の処理を
行う構成をその機能に着目して示す構成図である。FIG. 14 is a configuration diagram showing the configuration for performing the processing of step 142 in FIG. 12, focusing on its function.
【図15】同、図12におけるステップ144の詳細な
処理を示すフローチャートである。FIG. 15 is a flowchart showing a detailed process of step 144 in FIG. 12;
【図16】同、変換規則3を示す説明図である。FIG. 16 is an explanatory diagram showing a conversion rule 3;
【図17】同、変換規則3の内部表現の例を示す説明図
である。FIG. 17 is an explanatory diagram showing an example of an internal expression of a conversion rule 3;
【図18】同、図12におけるステップ144の処理を
行う構成をその機能に着目して示す構成図である。18 is a configuration diagram showing a configuration for performing the processing of step 144 in FIG. 12, focusing on its function.
【図19】同、変換規則4を示す説明図である。FIG. 19 is an explanatory diagram showing a conversion rule 4.
【図20】同、図12におけるステップ147の処理を
行う構成をその機能に着目して示す構成図である。FIG. 20 is a configuration diagram showing the configuration for performing the processing of step 147 in FIG. 12, focusing on its function.
【図21】実施例2における、図12に示す実施例1の
ステップ141〜147と同様の処理を行う構成の変形
例を示す構成図である。FIG. 21 is a configuration diagram showing a modification of the configuration for performing the same processing as steps 141 to 147 of the first embodiment shown in FIG. 12 in the second embodiment.
【図22】実施例3における、図8に示す実施例1のス
テップ1013で行われる処理の他の例を示すフローチ
ャートである。FIG. 22 is a flowchart illustrating another example of the processing performed in step 1013 of the first embodiment illustrated in FIG. 8 according to the third embodiment.
【図23】同、変換規則5を示す説明図である。FIG. 23 is an explanatory diagram showing a conversion rule 5 according to the third embodiment.
【図24】実施例4における、図12に示す実施例1の
ステップ144で行われる処理の他の例を示すフローチ
ャートである。FIG. 24 is a flowchart illustrating another example of the processing performed in step 144 of the first exemplary embodiment illustrated in FIG. 12 according to the fourth exemplary embodiment.
【図25】同、変換規則6を示す説明図である。FIG. 25 is an explanatory diagram showing a conversion rule 6.
【図26】実施例5における変換規則7を示す説明図で
ある。FIG. 26 is an explanatory diagram showing a conversion rule 7 in the fifth embodiment.
【図27】同、変換規則7による処理を行う構成をその
機能に着目して示す構成図である。FIG. 27 is a configuration diagram showing a configuration for performing processing according to a conversion rule 7, focusing on its function.
【図28】実施例6における変換規則4の他の例、およ
びそれらの変換規則によって生成される乗算器の構成を
示す説明図である。FIG. 28 is an explanatory diagram showing another example of the conversion rule 4 in the sixth embodiment and a configuration of a multiplier generated by the conversion rule.
11 入力装置 12 中央処理装置 13 出力装置 14 記憶装置 21 設計処理記憶部 22 素子ライブラリ記憶部 23 回路データ記憶部 231 入力手段 232 論理否定手段 233 乗算モジュール生成手段 234 論理否定演算回路生成手段 235 出力手段 241 入力手段 242 乗数分割手段 243 乗算モジュール生成手段 244 分割演算回路生成手段 245 出力手段 251 入力手段 252 最上位ビット分離手段 253 ビット値判定手段 254 乗算モジュール生成手段 255 加算シフト演算回路生成手段 256 回路生成手段 257 出力手段 261 入力手段 262 信号生成手段 263 乗算モジュール生成手段 264 演算回路生成手段 265 出力手段 2901 入力手段 2902 論理否定判定手段 2903 乗数ビット幅判定手段 2904 論理否定手段 2905 論理否定演算回路生成手段 2906 乗算モジュール生成手段 2907 乗数分割手段 2908 分割演算回路生成手段 2909 乗数最上位ビット分離手段 2910 ビット値判定手段 2911 加算シフト演算回路生成手段 2912 回路生成手段 2913 出力手段 Reference Signs List 11 input device 12 central processing unit 13 output device 14 storage device 21 design processing storage unit 22 element library storage unit 23 circuit data storage unit 231 input unit 232 logical NOT unit 233 multiplication module generation unit 234 logical NOT operation circuit generation unit 235 output unit 241 input means 242 multiplier division means 243 multiplication module generation means 244 division operation circuit generation means 245 output means 251 input means 252 most significant bit separation means 253 bit value determination means 254 multiplication module generation means 255 addition shift operation circuit generation means 256 circuit generation Means 257 Output means 261 Input means 262 Signal generation means 263 Multiplication module generation means 264 Operation circuit generation means 265 Output means 2901 Input means 2902 Logical NOT determination means 2903 Multiplier bit Width determination means 2904 logical negation means 2905 logical negation operation circuit generation means 2906 multiplication module generation means 2907 multiplier division means 2908 division operation circuit generation means 2909 multiplier most significant bit separation means 2910 bit value determination means 2911 addition shift operation circuit generation means 2912 circuit Generation means 2913 Output means
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/52 310 G06F 7/38 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 7/52 310 G06F 7/38
Claims (4)
定数を表す信号Aとを入力としてn+mビットの積Pを
出力する乗算器であって、 前記定数Aの論理否定信号A0と前記信号Xを入力とし
て、その積を表す信号P0を出力する乗算手段と、 前記信号Xと前記信号P0を入力として、X・(2m −
1)−P0を演算し前記信号Pとして出力する演算手段
とを有することを特徴とする乗算器。1. A multiplier that receives a signal X representing an n-bit number and a signal A representing an m-bit constant and outputs a product P of n + m bits, wherein a logical NOT signal A0 of the constant A and as the input signal X, a multiplying means for outputting a signal P0 representing the product, as an input the signal P0 and the signals X, X · (2 m -
1) a multiplier for calculating -P0 and outputting the signal P.
定数を表す信号Aとを入力としてn+mビットのその積
Pを出力する乗算器であって、前記定数Aの論理否定信
号A0と前記信号Xを入力として、その積を表す信号P
0を出力する乗算手段と、 前記信号Xを入力として、X・(2m −1)を表す信号
P01を出力する演算手段と、 前記信号P0と前記信号P01を入力として、P01−
P0の値を表す信号を出力する減算手段とを有すること
を特徴とする乗算器。2. A multiplier for inputting a signal X representing an n-bit number and a signal A representing an m-bit constant, and outputting a product P of n + m bits. A signal P representing the product of the signal X as an input
A multiplying means for outputting 0, a calculating means for receiving the signal X as an input and outputting a signal P01 representing X · (2 m -1), and a P01- for receiving the signal P0 and the signal P01 as inputs.
A subtractor for outputting a signal representing the value of P0.
定数を表す信号Aとを入力としてn+mビットのその積
Pを出力する乗算器であって、 前記定数Aの論理否定信号A0と前記信号Xを入力とし
て、その積を表す信号P0を出力する乗算手段と、 前記信号P0を入力として、前記信号P0の論理否定信
号Q0を出力する論理否定手段と、 前記信号Xを入力として、X・(2m −1)+1を表す
信号Q6を出力する演算手段と、 前記信号Q0と前記信号Q6を入力として、前記信号Q
0と前記信号Q6の和を表す信号を前記信号Pとして出
力する加算手段とを有することを特徴とする乗算器。3. A multiplier for receiving a signal X representing an n-bit number and a signal A representing an m-bit constant and outputting a product P of n + m bits, wherein a logical NOT signal A0 of the constant A and A multiplication unit that receives the signal X and outputs a signal P0 representing the product thereof; a logic negation unit that receives the signal P0 and outputs a logical negation signal Q0 of the signal P0; An arithmetic means for outputting a signal Q6 representing X · (2 m -1) +1; the signal Q0 having the signal Q0 and the signal Q6 as inputs;
A multiplier that outputs, as the signal P, a signal representing the sum of 0 and the signal Q6.
定数を表す信号Aとを入力としてn+mビットのその積
Pを出力する乗算器であって、 前記定数Aの論理否定信号A0と前記信号Xを入力とし
て、その積を表す信号P0を出力する乗算手段と、 前記信号Xを入力として、前記信号Xの論理否定信号を
出力する第1の論理否定手段と、 前記信号P0を入力として、前記信号P0の論理否定信
号を出力する第2の論理否定手段と、 下位mビットのそれぞれに値0を、上位nビットに前記
信号Xを接続したn+mビットの信号と、下位nビット
に前記第1の論理否定手段の出力信号と、上位mビット
にそれぞれ値1を接続した信号と、キャリーインに1を
入力とする第1の加算手段と、 前記第1の論理否定手段の出力信号と、前記第1の加算
手段の出力信号と、キャリーインに1を入力として、そ
の出力を前記Pに接続した第2の加算手段とを有するこ
とを特徴とする乗算器。4. A multiplier which receives a signal X representing an n-bit number and a signal A representing an m-bit constant and outputs a product P of n + m bits, wherein a logical NOT signal A0 of the constant A and Multiplying means for receiving the signal X and outputting a signal P0 representing the product thereof; first logical negating means for receiving the signal X and outputting a logical NOT signal of the signal X; and receiving the signal P0 A second logical negation means for outputting a logical negation signal of the signal P0; a value 0 in each of lower m bits; a signal of n + m bits in which the signal X is connected to upper n bits; An output signal of the first logical negation unit, a signal having a value of 1 connected to each of the upper m bits, a first addition unit having carry-in input of 1, and an output signal of the first logical negation unit And the first processing An output signal of the means, as inputs 1 to the carry-in, a multiplier, characterized in that a second adder means connected to its output to the P.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10174573A JP3112662B2 (en) | 1998-06-22 | 1998-06-22 | Multiplier |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10174573A JP3112662B2 (en) | 1998-06-22 | 1998-06-22 | Multiplier |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4348269A Division JP2840169B2 (en) | 1992-12-28 | 1992-12-28 | Automatic logic circuit design method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10320179A JPH10320179A (en) | 1998-12-04 |
| JP3112662B2 true JP3112662B2 (en) | 2000-11-27 |
Family
ID=15980932
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10174573A Expired - Fee Related JP3112662B2 (en) | 1998-06-22 | 1998-06-22 | Multiplier |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3112662B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6746105B2 (en) | 1997-07-15 | 2004-06-08 | Silverbrook Research Pty. Ltd. | Thermally actuated ink jet printing mechanism having a series of thermal actuator units |
-
1998
- 1998-06-22 JP JP10174573A patent/JP3112662B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6746105B2 (en) | 1997-07-15 | 2004-06-08 | Silverbrook Research Pty. Ltd. | Thermally actuated ink jet printing mechanism having a series of thermal actuator units |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH10320179A (en) | 1998-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7188133B2 (en) | Floating point number storage method and floating point arithmetic device | |
| US5506799A (en) | Booth array multiplying circuit having carry correction | |
| US5222037A (en) | Floating-point processor for performing an arithmetic operation on fixed-point part data with high speed rounding of a result | |
| JP2972498B2 (en) | Automatic logic circuit design method, system and device thereof, and multiplier | |
| JP2840169B2 (en) | Automatic logic circuit design method and apparatus | |
| JP2608165B2 (en) | Method and apparatus for multiplying a real-time two's complement code in a digital signal processing system | |
| US5903470A (en) | Method and apparatus for automatically designing logic circuit, and multiplier | |
| JP3112662B2 (en) | Multiplier | |
| Kalaiselvi et al. | Exploration of low area-high speed by hybrid method of Radix-8 Booth encoding and Vedic multiplier | |
| US5710730A (en) | Divide to integer | |
| US7051062B2 (en) | Apparatus and method for adding multiple-bit binary-strings | |
| JP2645422B2 (en) | Floating point processor | |
| JP4163967B2 (en) | Floating point arithmetic unit | |
| JPH113210A (en) | Three-input comparator, saturation operation device using the same, and operation method thereof | |
| KR20010067226A (en) | Interpolation method and apparatus | |
| JP2537876B2 (en) | Rounding circuit | |
| JPH0823814B2 (en) | Multi-digit decimal to binary conversion apparatus and unified ratio decoder | |
| JPH06243194A (en) | Method and device for automatic logic circuit design | |
| JP4643951B2 (en) | CONVERTING DEVICE AND CONVERTING METHOD FOR CONVERTING RESIDUAL CONVERSION NUMBER TO BINARY NUMBER | |
| JP2000010763A (en) | Division circuit | |
| JP3201097B2 (en) | Multiplication prescription method in multiplier | |
| WO1996027831A1 (en) | Floating point conversion circuit | |
| JPH0659862A (en) | Multiplier | |
| JPH0612227A (en) | Binary number addition circuit | |
| JPH11203110A (en) | Divider |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080922 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080922 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090922 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090922 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100922 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110922 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |