JPH0561649A - Divider circuit - Google Patents

Divider circuit

Info

Publication number
JPH0561649A
JPH0561649A JP3247000A JP24700091A JPH0561649A JP H0561649 A JPH0561649 A JP H0561649A JP 3247000 A JP3247000 A JP 3247000A JP 24700091 A JP24700091 A JP 24700091A JP H0561649 A JPH0561649 A JP H0561649A
Authority
JP
Japan
Prior art keywords
subtraction
register
dividend
divisor
circuit
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.)
Granted
Application number
JP3247000A
Other languages
Japanese (ja)
Other versions
JP3213982B2 (en
Inventor
Tsuneo Tsukagoshi
常雄 塚越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP24700091A priority Critical patent/JP3213982B2/en
Publication of JPH0561649A publication Critical patent/JPH0561649A/en
Application granted granted Critical
Publication of JP3213982B2 publication Critical patent/JP3213982B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To rapidly and efficiently execute division in which the number of digits in data is known like division to be used for the calculation of a centroid in fuzzy inference. CONSTITUTION:An OR value between the most significant bit(MSB) of a partial residual and an overflow signal from a subtractor is used for deciding the validity of subtraction, lower bits in a dividend register 2 are stored in a shift register 5 and outputted to the least significant bit(LSB) of the subtractor in each bit synchronously with subtraction shift. Since the size of the subtractor in a subtraction shift type divider can be reduced up to the number of bits of a divisor and the frequency of subtraction shift operation can be reduced up to the number of bits in a quotient, rapid division can be attained.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ファジィ推論の非ファ
ジィ化演算で行われる重心値算出の際の除算をデジタル
に実行する除算回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a division circuit for digitally executing division when calculating a centroid value performed by a defuzzification operation of fuzzy inference.

【0002】[0002]

【従来の技術】デジタル演算において、整数型の数値同
士の除算を行う場合、除数を被除数から繰り返し減算す
る、いわゆる、減算シフト型除算(文献1:「コンピュ
ータの高速演算方式」、堀越弥著、P215、近代科学
社)を行う場合がある。
2. Description of the Related Art In digital operation, when performing division of integer type numbers, so-called subtraction shift type division (reference 1: "Computer high-speed operation method", written by Yasushi Horikoshi), in which a divisor is repeatedly subtracted from a dividend. P215, Modern Science Co., Ltd.).

【0003】これは、被除数の最上位ビット(MSB)
と除数の最下位ビット(LSB)の桁を合わせて1回目
の除算を行う。減算可能なら、減算結果を部分剰余と
し、減算不可能なら、減算前の被除数を部分剰余とす
る。
This is the most significant bit (MSB) of the dividend
And the least significant bit (LSB) of the divisor are combined to perform the first division. If the subtraction is possible, the subtraction result is the partial remainder, and if the subtraction is not possible, the dividend before the subtraction is the partial remainder.

【0004】次に、除数を下位ビット側に1ビットずら
して、同様なことを行う。以下同様に、除数ビット分減
算シフトを行うと整数の除算結果が得られる。
Then, the divisor is shifted by 1 bit to the lower bit side, and the same operation is performed. Similarly, if a subtraction shift is performed by the divisor bit, an integer division result is obtained.

【0005】さらに減算シフトを続ければ、小数点以下
の演算結果を求めることができる。部分剰余は、各減算
シフトを行ったところまでの余りを表している。正確な
余りの求め方は、特公平3−37212号(文献2)に
詳しく述べられている。
By continuing the subtraction shift, the calculation result below the decimal point can be obtained. The partial remainder represents the remainder up to where each subtraction shift is performed. The exact method of obtaining the remainder is described in detail in Japanese Examined Patent Publication No. 3-37212 (Reference 2).

【0006】さて、ファジィ推論においては、推論の最
後に非ファジィ化演算を行い、ファジィ量を普通の(ク
リスプな)量に変換するが、その手法として、ファジィ
量の重心値を求めるのが一般的である。この場合、重心
値Gは次式で求められる。
In fuzzy inference, a defuzzification operation is performed at the end of inference to convert a fuzzy amount into a normal (crisp) amount. As a method, the centroid value of the fuzzy amount is generally obtained. Target. In this case, the center of gravity value G is calculated by the following equation.

【0007】 G=(ΣAi×Di)/ΣDi (1)G = (ΣAi × Di) / ΣDi (1)

【0008】ただし、Aiはメンバーシップ関数の台集
合(広がりを示す)の各要素、また、Diは、台集合の
各要素のグレードを示す。重心値Gは、分子分母の積和
演算の結果を除算して求める。一般的には、台集合の分
割数は16〜256程度の値をとり、要素やグレードは
4〜8ビット程度で表現している。
However, Ai represents each element of the base set (indicating the spread) of the membership function, and Di represents the grade of each element of the base set. The center-of-gravity value G is obtained by dividing the result of the product sum operation of the numerator and denominator. Generally, the number of divisions of the platform set takes a value of about 16 to 256, and elements and grades are expressed by about 4 to 8 bits.

【0009】文献1によれば、減算シフト型除算を汎用
的に行うためには、被除数の2倍の桁数をもつ被除数レ
ジスタ、除数レジスタ、減算器が必要である。(1)式
に従って、除算を行う場合、例えば、要素を8ビットで
表し(即ち分割数が256)、グレードも8ビットで表
現する場合、分母分子についてそれぞれ積和演算を行う
と、分子は24ビット、分母は16ビットで表現され
る。
According to Document 1, in order to perform the subtractive shift type division in general, a dividend register, a divisor register, and a subtracter having a digit number twice the dividend are required. When the division is performed according to the equation (1), for example, when the element is represented by 8 bits (that is, the number of divisions is 256) and the grade is also represented by 8 bits, when the sum of products operation is performed on each of the denominator numerator, the numerator becomes 24 The bit and denominator are represented by 16 bits.

【0010】従来型の除算器で演算する場合は、大きい
方の24ビットを扱える必要があるので、結局、被除数
(分子)用のレジスタ、除数レジスタ(分母用)及び減
算器ともに48桁必要になる。最終的には、除算シフト
を24回繰り返して整数型の商を得る。
When operating with a conventional divider, it is necessary to handle the larger 24 bits, so that the register for the dividend (numerator), the divisor register (for the denominator) and the subtracter need 48 digits. Become. Finally, the division shift is repeated 24 times to obtain an integer type quotient.

【0011】[0011]

【発明が解決しようとする課題】一方、ファジィ推論の
重心算出における除算は、次のような特徴を持つため、
従来型の除算器では、その構成において、多くの無駄な
演算を含んでいることになる。即ち、
On the other hand, since the division in the calculation of the center of gravity of fuzzy reasoning has the following characteristics,
A conventional divider has many wasteful operations in its configuration. That is,

【0012】被除数が24ビットであっても、除数は
16ビットしかないので、除算過程の中で減算シフトを
行う場合、少なくとも最初の16段分は除算不可能にな
ることが明白であるので、この16段分の減算シフトは
無駄な演算である。
Even if the dividend is 24 bits, since the divisor has only 16 bits, it is obvious that at least the first 16 stages cannot be divided when the subtraction shift is performed in the division process. This subtraction shift of 16 steps is a useless calculation.

【0013】被除数が24ビットの場合、従来法で
は、商フィールド用(24ビット)も含めて48ビット
のレジスタを用意している(被除数のMSBと除数のL
SBの桁を合わせて除算するので倍のサイズが必要)
が、商は8ビット以下であり、少なくとも商フィールド
用の上位16ビットは0とわかっているので結果的に無
駄になってしまう。レジスタだけではなく、減算器も商
フィールドの16ビット分は結果的にはなくても良い。
When the dividend is 24 bits, the conventional method prepares a register of 48 bits including the quotient field (24 bits) (MSB of dividend and L of divisor).
(Since SB digits are combined and divided, double size is required)
However, the quotient is 8 bits or less, and at least the upper 16 bits for the quotient field are known to be 0, which results in wasting. Not only the register but also the subtracter may not have 16 bits of the quotient field as a result.

【0014】本発明の目的は、このような無駄な演算を
省き、最低限の構成で、同等の演算結果を得ることがで
きる除算回路を提供することにある。
An object of the present invention is to provide a division circuit which can eliminate such a wasteful operation and can obtain an equivalent operation result with a minimum configuration.

【0015】[0015]

【課題を解決するための手段】上記目的を達成するた
め、本発明による除算回路においては、被除数を入力
し、除算演算の間、部分剰余を保持する被除数レジスタ
と、除数を入力し、除算演算の間、除数を保持する除数
レジスタと、前記被除数レジスタの値と前記除数レジス
タの値との減算を実行する減算回路と、減算可否を判別
する減算判別回路と、減算可能なら減算結果、減算不可
能なら減算前の被除数を次の減算用の部分剰余として被
除数レジスタに送る減算選択回路と、減算判別信号を順
次保持する商レジスタと、演算処理を制御するタイミン
グ制御回路とを備えた減算シフト型の除算回路であっ
て、被除数レジスタは、最上位ビットが減算判別回路に
接続されており、除数が被除数より大きいときに1を出
力する減算回路のオーバーフローの出力もまた減算判別
回路に接続されており、減算判別回路が被除数の最上位
ビットまたはオーバーフローのどちらかが1ならば減算
可能と判断するものである。
In order to achieve the above object, in a division circuit according to the present invention, a dividend is input, and a dividend register for holding a partial remainder during a division operation and a divisor are input to perform a division operation. During this period, a divisor register that holds the divisor, a subtraction circuit that performs subtraction between the value of the dividend register and the value of the divisor register, a subtraction determination circuit that determines whether subtraction is possible, a subtraction result if subtraction is possible, a subtraction result If possible, a subtraction shift type including a subtraction selection circuit that sends the dividend before subtraction to the dividend register as a partial remainder for the next subtraction, a quotient register that sequentially holds the subtraction determination signal, and a timing control circuit that controls arithmetic processing. Of the subtraction circuit, the most significant bit of which is connected to the subtraction determination circuit, and outputs 1 when the divisor is larger than the dividend. Is connected to also the subtraction discriminating circuit output flow, either subtraction determination circuit of the most significant bit or overflow of the dividend is what determines if 1 deductible and.

【0016】また、被除数を入力し、除算演算の間、部
分剰余を保持する被除数レジスタと、除数を入力し、除
算演算の間、除数を保持する除数レジスタと、前記被除
数レジスタの値と前記除数レジスタの値との減算を実行
する減算回路と、減算可否を判別する減算判別回路と、
減算可能なら減算結果、減算不可能なら減算前の被除数
を次の減算用の部分剰余として被除数レジスタに送る減
算選択回路と、減算判別信号を順次保持する商レジスタ
と、演算処理を制御するタイミング制御回路とを備えた
減算シフト型の除算回路であって、減算回路の桁数が除
数の桁数に等しく、被除数レジスタは、最上位ビットが
減算判別回路に接続され、被除数の最上位から除数ビッ
ト分レジスタに保持され、被除数の下位ビットが被除数
と除数の桁数の差の数分だけシフトレジスタで構成され
ており、被除数の上位ビットのレジスタの出力は、最上
位ビットを除いて減算器に接続されており、シフトレジ
スタのシリアル出力は、減算器の最下位ビットに接続さ
れており、減算を行う度に、シフトレジスタ内の上位ビ
ットから1ビットずつ出力するものである。
Further, a dividend register is input, and a dividend register that holds a partial remainder during a division operation; a divisor register that inputs a divisor and holds a divisor during a division operation; a value of the dividend register and the divisor; A subtraction circuit that performs subtraction with the value of the register, a subtraction determination circuit that determines whether or not subtraction is possible,
A subtraction selection circuit that sends the subtraction result as a subtraction result if it can be subtracted, or a dividend before subtraction as a partial remainder for the next subtraction if it cannot be subtracted, a quotient register that sequentially holds the subtraction determination signal, and timing control that controls arithmetic processing. A subtraction shift type division circuit including a circuit, the number of digits of the subtraction circuit is equal to the number of digits of the divisor, and the dividend register has the most significant bit connected to the subtraction determination circuit and the most significant bit of the dividend. It is held in the minute register, the lower bits of the dividend are made up of the shift register by the difference between the number of digits of the dividend and the number of digits of the divisor, and the output of the register of the upper bits of the dividend is output to the subtracter except for the most significant bit. Connected, the serial output of the shift register is connected to the least significant bit of the subtractor, and one bit from the upper bit in the shift register each time the subtraction is performed. One is intended to output.

【0017】[0017]

【作用】前述で明らかにした無駄なレジスタや演算を、
先ずは、削除する。次に、残りの構成で更に最適化を行
う。被除数がaビット、除数がbビット、商の整数部の
みでcビットとすれば、 a−b=c なる関係がある。
[Operation] The useless registers and operations made clear above are
First, delete it. Next, further optimization is performed with the remaining configuration. If the dividend is a bits, the divisor is b bits, and only the integer part of the quotient is c bits, there is a relationship of a−b = c.

【0018】そこで、まずは文献2で開示されているよ
うに、減算器の商フィールドを全部削除し、新たに、商
レジスタを必要なビット数分(cビット分)付加する。
これによって、減算器のサイズは被除数のビット数分
(aビット分)だけ用意すれば良い。
Therefore, as disclosed in Document 2, first, all the quotient fields of the subtractor are deleted, and new quotient registers are added by the required number of bits (c bits).
Accordingly, the size of the subtractor may be prepared by the number of bits of the dividend (a bits).

【0019】本発明では更に、次の点に改良を加えてい
る。即ち、減算するのは除数の方であり、最低限除数の
桁数分(bビット分)の減算器で減算可能なような構成
とした。これにより、被除数と除数の桁数の差の分(即
ちcビット分)の減算器を削除できる。この詳細を次に
示す。
The present invention further improves the following points. That is, it is the divisor that is subtracted, and the subtractor is configured so that it can be subtracted by at least the number of digits (b bits) of the divisor. This makes it possible to eliminate the subtractor for the difference between the dividend and the number of digits of the divisor (that is, for c bits). The details are shown below.

【0020】シフト減算を被除数の最上位ビットを除
く上位ビットから行い、減算可否を判別する際の、減算
器のオーバーフローの処理を次のようにすることで、被
除数の最上位ビットの減算を行わないで済むようにし
た。即ち、被除数の最上位ビットがもし1ならば、除数
が最大値をとったとしても、必ず減算可能である。そこ
で、最上位ビットは減算器に接続せずに、直接、減算判
別回路に接続する。
The most significant bit of the dividend is subtracted by performing shift subtraction from the upper bits of the dividend except for the most significant bit, and the overflow of the subtractor is determined in the following manner. I didn't have to. That is, if the most significant bit of the dividend is 1, it is always possible to subtract even if the divisor takes the maximum value. Therefore, the most significant bit is directly connected to the subtraction determination circuit without being connected to the subtractor.

【0021】また、被除数の最上位ビットが0の場合
は、減算器のオーバーフロー出力による判定を行う必要
があるので、減算器のオーバーフロー出力も減算判別回
路に接続する。
Further, when the most significant bit of the dividend is 0, it is necessary to make a judgment by the overflow output of the subtractor, so the overflow output of the subtractor is also connected to the subtraction judgment circuit.

【0022】従って、最上位ビットまたは減算器のオー
バーフロー出力のどちらかが1の場合は、減算可能とな
り、減算選択回路は、減算結果を次の演算の部分剰余に
する。両方とも0の場合は、減算不可能となり、減算前
の被除数を次の演算の部分剰余にする。このように、最
上位ビットの減算を省くことで減算器を1ビット分縮小
することができる。
Therefore, if either the most significant bit or the overflow output of the subtractor is 1, subtraction is possible, and the subtraction selection circuit makes the subtraction result the partial remainder of the next operation. When both are 0, the subtraction becomes impossible and the dividend before the subtraction is used as the partial remainder of the next operation. In this way, the subtractor can be reduced by one bit by omitting the subtraction of the most significant bit.

【0023】被除数の最上位ビットを除く上位ビット
から除数ビット分の減算を行う。この際、被除数は最上
位ビットから除数ビット分(bビット分)は、普通のレ
ジスタとし、下位cビット分は、シフトレジスタに保持
しておく。最初の減算のときには、すでに、シフトレジ
スタから上位ビットが出力されている。
The divisor bits are subtracted from the upper bits of the dividend excluding the most significant bit. At this time, the dividend is a normal register from the most significant bit to the divisor bit (b bits), and the lower c bits are held in the shift register. At the time of the first subtraction, the upper bits have already been output from the shift register.

【0024】減算後のシフト方法として、被除数の最上
位ビットを除くb−1ビット分を部分剰余の最上位ビッ
トに接続(即ち1ビット上位ビット側にワイヤ接続によ
ってシフト)し、部分剰余の最下位ビットにはシフトレ
ジスタの次のビットを入力する。これによって、減算は
常にbビット分でよく、結局シフトレジスタから2回目
以降に減算シフトによって供給されるc−1ビット分だ
け減算の数を減らすことができる。
As a shift method after the subtraction, b-1 bits excluding the most significant bit of the dividend are connected to the most significant bits of the partial remainder (that is, one bit is shifted to the upper bit side by wire connection), and the maximum of the partial remainder is changed. The next bit of the shift register is input to the lower bit. This allows the subtraction to be always b bits, and eventually the number of subtractions can be reduced by c-1 bits supplied from the shift register by the subtraction shift after the second time.

【0025】及びの方法を用いることによって、結
局、全体でcビット分の減算器を削除できることにな
り、除算回路の構成を縮小することができる。
By using the methods (1) and (2), after all, the subtractor for c bits can be deleted as a whole, and the configuration of the division circuit can be reduced.

【0026】[0026]

【実施例】以下に本発明の一実施例を図1に示す。これ
は、24ビットの被除数を16ビットの除数で除算し8
ビットの商を得る除算回路である。回路は、汎用デジタ
ルICの組み合わせで実現している。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the present invention is shown in FIG. This is the 24-bit dividend divided by the 16-bit divisor to obtain 8
It is a division circuit that obtains the quotient of bits. The circuit is realized by a combination of general-purpose digital ICs.

【0027】入力選択回路1は、除算器に被除数データ
をロードするためのものである。ロード信号が1のと
き、入力値を選択し、0のとき部分剰余を選択する。初
期ロード時に入力値を選択し、除算途中は常に部分剰余
を選択する。
The input selection circuit 1 is for loading the dividend data into the divider. When the load signal is 1, the input value is selected, and when it is 0, the partial remainder is selected. Select the input value at initial load, and always select the partial remainder during division.

【0028】被除数レジスタ2は、上位入力レジスタ3
(16ビット)がD型フリップフロップで構成されてお
り、クロックにより次の部分剰余を保持し、また、リセ
ットの入力で、保持したデータを零リセットする。
The dividend register 2 is the upper input register 3
(16 bits) is composed of a D-type flip-flop, holds the next partial remainder by a clock, and resets the held data to zero by a reset input.

【0029】被除数レジスタ2の下位入力レジスタ4
は、請求項2記載のものであるが、パラレルをシリアル
に変換するP/Sシフトレジスタ5で構成され、P/S
シフトレジスタ5の出力は、加算器6の最下位ビット
と、次の被除数の最下位ビットとして入力選択回路1の
両方に接続されている。
Lower input register 4 of dividend register 2
Is a P / S shift register 5 for converting parallel to serial, and the P / S
The output of the shift register 5 is connected to both the least significant bit of the adder 6 and the input selection circuit 1 as the least significant bit of the next dividend.

【0030】本除算器の減算は、一般的に2の補数(否
定して1加える)を加算することで行っている。従っ
て、除数の入力レジスタは、否定をとるためのインバー
ティングバッファ(16ビット)であり、減算部の中
は、加算器6で構成される。+1を行うために加算器の
キャリー入力に1を加える。また、減算のオーバーフロ
ーの検知には加算器のキャリー出力を用いる。
The subtraction of this divider is generally performed by adding a two's complement (negatively adding 1). Therefore, the input register of the divisor is an inverting buffer (16 bits) for taking the negation, and the adder 6 is included in the subtraction unit. Add 1 to the carry input of the adder to do a +1. The carry output of the adder is used to detect the subtraction overflow.

【0031】減算シフト演算のなかで、シフト演算その
ものは、被除数レジスタ2の出力の最上位ビットを除く
下位ビットを加算器6に接続し、加算器6の最下位ビッ
トには、先に述べたようにP/Sシフトレジスタ5から
1ビット補うことによって行っている。
In the subtraction shift operation, the shift operation itself connects the lower bits of the output of the dividend register 2 excluding the most significant bit to the adder 6, and the least significant bit of the adder 6 is as described above. As described above, the P / S shift register 5 is supplemented by 1 bit.

【0032】請求項1記載の除算判別回路7は、論理和
回路によって実現される。被除数レジスタの最上位ビッ
トと、加算器のキャリー出力とを、それぞれこの論理和
回路に入力している。除算判別回路7の出力は、1つ
は、減算選択回路8であるトライステートバッファのア
ウトプットイネーブル(OE)に、もう1つは商レジス
タ9であるS/Pシフトレジスタ10へ接続される。
The division determination circuit 7 according to claim 1 is realized by an OR circuit. The most significant bit of the dividend register and the carry output of the adder are input to the OR circuit. One of the outputs of the division determination circuit 7 is connected to the output enable (OE) of the tristate buffer which is the subtraction selection circuit 8, and the other is connected to the S / P shift register 10 which is the quotient register 9.

【0033】減算選択回路8は、減算判別回路7が減算
可能であるという1を出力すると、減算結果を次の部分
剰余とする。そのために、減算結果を接続しているバッ
ファの逆論理のアウトプットイネーブルが動作するよう
に減算判別出力を一旦否定回路で受けてからアウトプッ
トイネーブル(OE)に接続している。
When the subtraction selection circuit 8 outputs 1 indicating that subtraction is possible, the subtraction selection circuit 8 sets the subtraction result to the next partial remainder. Therefore, the subtraction determination output is once received by the NOT circuit and then connected to the output enable (OE) so that the inverse logic output enable of the buffer to which the subtraction result is connected operates.

【0034】また、減算判別回路7が減算不能であると
いう0を出力すると、減算前の部分剰余を次の部分剰余
とする。この場合減算前のデータを保持しているバッフ
ァが出力動作する。
When the subtraction determination circuit 7 outputs 0 indicating that subtraction is not possible, the partial remainder before subtraction is set as the next partial remainder. In this case, the buffer holding the data before the subtraction operates for output.

【0035】商レジスタ9は、シリアルをパラレルに変
換するS/Pシフトレジスタ10で減算シフトと同期し
て減算判別回路7の出力を保持していく。最初に保持し
たものが商の最上位ビット、最後が最下位ビットであ
る。減算シフトは、8段行われ、8ビットの商が得られ
る。
The quotient register 9 holds the output of the subtraction determination circuit 7 in synchronization with the subtraction shift in the S / P shift register 10 for converting serial into parallel. The first bit held is the most significant bit of the quotient, and the last bit is the least significant bit. The subtraction shift is performed in eight stages to obtain an 8-bit quotient.

【0036】図2は、本除算回路を動作させるタイミン
グ発生回路の出力を示すものである。図2を用いて、図
1の動作を説明する。
FIG. 2 shows the output of the timing generation circuit for operating this division circuit. The operation of FIG. 1 will be described with reference to FIG.

【0037】先ず、リセット信号が送られ、被除数
レジスタ2の上位ビット用のD型フリップフロップ回路
と、商レジスタ9のシフトレジスタを零クリアする。次
に入力データ用のロード信号が1になり、入力値選択
回路1は、入力した被除数の上位ビットを選択回路に送
る。
First, a reset signal is sent, and the D-type flip-flop circuit for higher bits of the dividend register 2 and the shift register of the quotient register 9 are cleared to zero. Next, the load signal for input data becomes 1, and the input value selection circuit 1 sends the upper bits of the input dividend to the selection circuit.

【0038】この状態では、上位入力レジスタ3の出力
は零を示し、一方、除数レジスタ11の出力は、始めか
ら同じ値(除数の否定)が出力されているので、演算開
始直前は、加算器6のキャリー出力が1になり、減算判
別回路7が減算不可を示す。
In this state, the output of the high-order input register 3 shows zero, while the output of the divisor register 11 has the same value (the negation of the divisor) from the beginning. The carry output of 6 becomes 1, and the subtraction determination circuit 7 indicates that subtraction is not possible.

【0039】それで、減算選択回路8は、減算結果でな
い方の値(今の場合入力ロードが1の間なので入力値)
が被除数レジスタ2の上位入力レジスタ3に送られてい
る。一方、下位入力レジスタ4であるP/Sシフトレジ
スタ5は、ロード信号(L)が0のとき、クロック入力
にかかわらずデータが保持される。ロードした時点で最
初のビット(即ち下位入力レジスタに入力したうちの最
大ビット)が出力されている。
Then, the subtraction selection circuit 8 outputs the value which is not the subtraction result (in this case, the input load is between 1 and the input value).
Are sent to the upper input register 3 of the dividend register 2. On the other hand, when the load signal (L) is 0, the P / S shift register 5, which is the lower input register 4, holds data regardless of clock input. At the time of loading, the first bit (that is, the maximum bit input to the lower input register) is output.

【0040】この状態で、初めのクロックが挿入され
る。上位入力レジスタ3は、入力値を保持し、1段目の
減算用データが出揃う。P/Sシフトレジスタ5は、す
でに最初のビットを出力しているので、初回のみクロッ
クを与えない。
In this state, the first clock is inserted. The high-order input register 3 holds the input value, and the subtraction data of the first stage are available. Since the P / S shift register 5 has already output the first bit, it does not give the clock only the first time.

【0041】加算器6からは、加算結果とキャリー出力
が出力される。減算判別回路7がキャリー出力と被除数
レジスタの最上位ビットによって減算の可否を判別し、
これによって減算選択回路が次の部分剰余を選択し、上
位入力レジスタ3に送り込む(しかし次のクロックが
挿入されるまで上位入力レジスタ3のデータは変更しな
い)。クロックの反転クロックで減算判別回路7の
出力を商レジスタ9であるS/Pシフトレジスタ10が
ラッチする。これが商の最上位ビットである。
The adder 6 outputs an addition result and a carry output. The subtraction determination circuit 7 determines whether or not subtraction is possible based on the carry output and the most significant bit of the dividend register,
As a result, the subtraction selection circuit selects the next partial remainder and sends it to the upper input register 3 (but the data in the upper input register 3 is not changed until the next clock is inserted). The S / P shift register 10, which is the quotient register 9, latches the output of the subtraction determination circuit 7 with the clock inverted clock. This is the most significant bit of the quotient.

【0042】次に、第2のクロックが挿入される。上
位入力レジスタ3は、クロックに同期して次の部分剰余
をラッチする。一方、P/Sシフトレジスタ4は、次の
段からクロックに同期して、1ビット出力される。加
算及び減算判別を行って商の次のビットを得る。
Next, the second clock is inserted. The upper input register 3 latches the next partial remainder in synchronization with the clock. On the other hand, the P / S shift register 4 outputs 1 bit in synchronization with the clock from the next stage. The addition and subtraction discrimination is performed to obtain the next bit of the quotient.

【0043】以後、第3から第8のクロックを順に送
り、同様な演算を行い、8ビットの商が商レジスタ9に
蓄積される。最後に、出力のクロックを受けて、商レ
ジスタから出力レジスタ12にパラレルデータとして転
送される。
After that, the third to eighth clocks are sequentially sent, the same operation is performed, and the 8-bit quotient is stored in the quotient register 9. Finally, the output clock is received and transferred from the quotient register to the output register 12 as parallel data.

【0044】図3に除算の一例を示す。被除数の上位1
6ビットは、D型フリップフロップに、下位8ビット
は、シフトレジスタに保持される。シフトレジスタに保
持された下位ビットは、減算シフトの段数毎に1ビット
ずつ出力している。
FIG. 3 shows an example of division. Highest 1 of dividend
The 6 bits are held in the D flip-flop, and the lower 8 bits are held in the shift register. The lower bits held in the shift register are output one bit for each number of stages of subtraction shift.

【0045】初段は、被除数最上位ビットが1なので減
算可能である。第2段は、部分剰余の最上位ビットも加
算のキャリー出力も両方0なので減算不可であり、前の
部分剰余を次の部分剰余となる。
At the first stage, since the most significant bit of the dividend is 1, subtraction is possible. In the second stage, since the most significant bit of the partial remainder and the carry output of addition are both 0, subtraction is not possible and the previous partial remainder becomes the next partial remainder.

【0046】以下、同様の演算を行い、各段毎に減算判
別出力を保持し、8段の減算シフトの後、8個の減算判
別出力を保持したものが商となっている、初段で得られ
たものが最上位ビット、8段目で得られたものが最下位
ビットである。
Thereafter, the same calculation is performed, the subtraction discrimination output is held for each stage, and after the subtraction shift of 8 stages, the holding of the eight subtraction discrimination outputs is the quotient, which is obtained in the first stage. The one obtained is the most significant bit, and the one obtained in the eighth stage is the least significant bit.

【0047】以上、本発明の一例として、24ビットの
被除数を16ビットの除数で割り、8ビットの商を得る
場合を示した。データサイズは、この例に限定されるも
のではなく、除数のビット数が被除数のビット数よりも
小さい場合には、除数のビット数に応じた効果が得られ
る。
As an example of the present invention, the case where the 24-bit dividend is divided by the 16-bit divisor to obtain the 8-bit quotient has been described above. The data size is not limited to this example, and when the number of bits of the divisor is smaller than the number of bits of the dividend, an effect according to the number of bits of the divisor is obtained.

【0048】[0048]

【発明の効果】以上のように本発明の除算回路によれ
ば、先の述べたファジィの重心演算における除算のよう
に、被除数及び除数及び商のデータサイズが限定されて
いる場合には、構成をコンパクト化するには有効であ
る。
As described above, according to the division circuit of the present invention, when the data size of the dividend, the divisor, and the quotient is limited as in the division in the fuzzy center-of-gravity operation described above, Is effective for making the compact.

【0049】また、従来方法では、被除数の2倍のデー
タサイズのレジスタ及び演算器を用意していたのに対し
て、本発明によれば、除数ビット数分の減算器で除算で
きる。実施例で述べた、被除数24ビット、除数16ビ
ットの除算の場合、従来は48ビットの減算器を用意し
ていたのに対して、本発明では除数ビット分、即ち、1
6ビットの減算器で済む。
Further, in the conventional method, a register and an arithmetic unit having a data size twice the dividend are prepared, whereas according to the present invention, division can be performed by a subtractor for the number of divisor bits. In the case of the division of the dividend of 24 bits and the divisor of 16 bits described in the embodiment, a 48-bit subtractor is conventionally prepared, but in the present invention, the divisor bit, that is, 1
A 6-bit subtractor is enough.

【0050】これにともない、入出力のレジスタも、従
来の被除数の倍のレジスタ数から大幅に減少させること
ができ、除数、被除数それぞれのビット数分のレジスタ
で済む。
Along with this, the number of registers for input and output can be greatly reduced from the conventional double number of the dividend, and the number of bits for each of the divisor and the dividend is sufficient.

【0051】また、動作クロックも従来方法では、24
段の減算シフトが必要だったため、24クロック必要だ
ったのに対し、本発明の減算シフト部では、商のビット
数分のクロック(上の実施例では8ビットの商を得るた
めに8クロック分)で済み、高速に除算を行うことがで
きる。
Also, the operation clock is 24 in the conventional method.
24 clocks are required because the subtraction shift of the stage is necessary, whereas the subtraction shift unit of the present invention uses clocks corresponding to the number of bits of the quotient (8 clocks to obtain the quotient of 8 bits in the above embodiment). ) Is sufficient, and division can be performed at high speed.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の除算回路の一実施例を示す図である。FIG. 1 is a diagram showing an embodiment of a divider circuit of the present invention.

【図2】本発明の除算回路を動作させるタイミング発生
回路の出力を示した図である。
FIG. 2 is a diagram showing an output of a timing generation circuit for operating a division circuit of the present invention.

【図3】本発明の除算回路の動作説明図である。FIG. 3 is an operation explanatory diagram of the divider circuit of the present invention.

【符号の説明】[Explanation of symbols]

1 入力選択回路 2 被除数レジスタ 3 上位入力レジスタ 4 下位入力レジスタ 5 P/Sシフトレジスタ 6 加算器 7 減算判別回路 8 減算選択回路 9 商レジスタ 10 S/Pシフトレジスタ 11 除数レジスタ 12 出力レジスタ 1 Input Selection Circuit 2 Dividend Register 3 Upper Input Register 4 Lower Input Register 5 P / S Shift Register 6 Adder 7 Subtraction Discrimination Circuit 8 Subtraction Selection Circuit 9 Quotation Register 10 S / P Shift Register 11 Divisor Register 12 Output Register

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 被除数を入力し、除算演算の間、部分剰
余を保持する被除数レジスタと、除数を入力し、除算演
算の間、除数を保持する除数レジスタと、前記被除数レ
ジスタの値と前記除数レジスタの値との減算を実行する
減算回路と、減算可否を判別する減算判別回路と、減算
可能なら減算結果、減算不可能なら減算前の被除数を次
の減算用の部分剰余として被除数レジスタに送る減算選
択回路と、減算判別信号を順次保持する商レジスタと、
演算処理を制御するタイミング制御回路とを備えた減算
シフト型の除算回路であって、 被除数レジスタは、最上位ビットが減算判別回路に接続
されており、除数が被除数より大きいときに1を出力す
る減算回路のオーバーフローの出力もまた減算判別回路
に接続されており、減算判別回路が被除数の最上位ビッ
トまたはオーバーフローのどちらかが1ならば減算可能
と判断するものであることを特徴とする除算回路。
1. A dividend register for inputting a dividend and holding a partial remainder during a division operation, a divisor register for inputting a divisor and holding a divisor during a division operation, a value of the dividend register and the divisor. A subtraction circuit that performs subtraction with the value of the register, a subtraction determination circuit that determines whether or not subtraction is possible, a subtraction result if subtraction is possible, and a dividend before subtraction is sent to the dividend register as the partial remainder for the next subtraction if subtraction is not possible A subtraction selection circuit, a quotient register that sequentially holds the subtraction determination signal,
A subtraction shift type division circuit including a timing control circuit for controlling arithmetic processing, wherein a dividend register has a most significant bit connected to a subtraction determination circuit, and outputs 1 when the divisor is larger than the dividend. The output of the overflow of the subtraction circuit is also connected to the subtraction determination circuit, and the subtraction determination circuit determines that subtraction is possible if either the most significant bit of the dividend or the overflow is 1. ..
【請求項2】 被除数を入力し、除算演算の間、部分剰
余を保持する被除数レジスタと、除数を入力し、除算演
算の間、除数を保持する除数レジスタと、前記被除数レ
ジスタの値と前記除数レジスタの値との減算を実行する
減算回路と、減算可否を判別する減算判別回路と、減算
可能なら減算結果、減算不可能なら減算前の被除数を次
の減算用の部分剰余として被除数レジスタに送る減算選
択回路と、減算判別信号を順次保持する商レジスタと、
演算処理を制御するタイミング制御回路とを備えた減算
シフト型の除算回路であって、 減算回路の桁数が除数の桁数に等しく、 被除数レジスタは、最上位ビットが減算判別回路に接続
され、被除数の最上位から除数ビット分レジスタに保持
され、被除数の下位ビットが被除数と除数の桁数の差の
数分だけシフトレジスタで構成されており、 被除数の上位ビットのレジスタの出力は、最上位ビット
を除いて減算器に接続されており、シフトレジスタのシ
リアル出力は、減算器の最下位ビットに接続されてお
り、減算を行う度に、シフトレジスタ内の上位ビットか
ら1ビットずつ出力するものであることを特徴とする除
算回路。
2. A dividend register for inputting a dividend and holding a partial remainder during a division operation, a divisor register for inputting a divisor and holding a divisor during a division operation, a value of the dividend register and the divisor. A subtraction circuit that performs subtraction with the value of the register, a subtraction determination circuit that determines whether or not subtraction is possible, a subtraction result if subtraction is possible, and a dividend before subtraction is sent to the dividend register as the partial remainder for the next subtraction if subtraction is not possible A subtraction selection circuit, a quotient register that sequentially holds the subtraction determination signal,
A subtraction shift type division circuit including a timing control circuit for controlling arithmetic processing, wherein the number of digits of the subtraction circuit is equal to the number of digits of the divisor, and the dividend register has the most significant bit connected to the subtraction determination circuit, The register is held from the most significant bit of the dividend up to the divisor bit, the lower bits of the dividend are made up of shift registers by the difference between the number of digits of the dividend and the number of digits of the divisor, and the output of the register of the most significant bit of the dividend is the most significant bit. It is connected to the subtracter except bits, the serial output of the shift register is connected to the least significant bit of the subtractor, and outputs one bit from the upper bit in the shift register each time the subtraction is performed. A division circuit characterized in that.
JP24700091A 1991-08-31 1991-08-31 Division circuit Expired - Fee Related JP3213982B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24700091A JP3213982B2 (en) 1991-08-31 1991-08-31 Division circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24700091A JP3213982B2 (en) 1991-08-31 1991-08-31 Division circuit

Publications (2)

Publication Number Publication Date
JPH0561649A true JPH0561649A (en) 1993-03-12
JP3213982B2 JP3213982B2 (en) 2001-10-02

Family

ID=17156888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24700091A Expired - Fee Related JP3213982B2 (en) 1991-08-31 1991-08-31 Division circuit

Country Status (1)

Country Link
JP (1) JP3213982B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008305335A (en) * 2007-06-11 2008-12-18 Sanyo Electric Co Ltd Division circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008305335A (en) * 2007-06-11 2008-12-18 Sanyo Electric Co Ltd Division circuit

Also Published As

Publication number Publication date
JP3213982B2 (en) 2001-10-02

Similar Documents

Publication Publication Date Title
JP2000259394A (en) Floating point multiplier
JP2585649B2 (en) Division circuit
JPH04283831A (en) Divider
JPH0317132B2 (en)
JPH1195982A (en) Circuit, method and system for arithmetic processing
EP0379998A2 (en) Divider for carrying out high speed arithmetic operation
JP3213982B2 (en) Division circuit
US4761757A (en) Carry-save-adder three binary dividing apparatus
JP3537378B2 (en) Adders and integrated circuits
JP2857505B2 (en) Division device
JPH0546363A (en) Divider
JP3028165B2 (en) High radix division control method and high radix divider
JPH0831024B2 (en) Arithmetic processor
JP2645422B2 (en) Floating point processor
JP3517162B2 (en) Division and square root arithmetic unit
JP2575856B2 (en) Arithmetic circuit
JP2777265B2 (en) High radix square root arithmetic unit
JP4042215B2 (en) Arithmetic processing apparatus and method
JP3233432B2 (en) Multiplier
JP2518532B2 (en) Subtractor shift type divider
JP3277497B2 (en) Divider
JPH0435777B2 (en)
JPS62200917A (en) Data conversion method
JPH0427587B2 (en)
JPH113210A (en) 3-input comparator, saturation arithmetic unit using the same and arithmetic method therefor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees