JPH06259231A - Integral divider - Google Patents

Integral divider

Info

Publication number
JPH06259231A
JPH06259231A JP5048160A JP4816093A JPH06259231A JP H06259231 A JPH06259231 A JP H06259231A JP 5048160 A JP5048160 A JP 5048160A JP 4816093 A JP4816093 A JP 4816093A JP H06259231 A JPH06259231 A JP H06259231A
Authority
JP
Japan
Prior art keywords
output
dividend
adder
bits
selector
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.)
Pending
Application number
JP5048160A
Other languages
Japanese (ja)
Inventor
Itaru Yamazaki
到 山崎
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5048160A priority Critical patent/JPH06259231A/en
Publication of JPH06259231A publication Critical patent/JPH06259231A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the number of times of arithmetic to be repeated in the same cycle and to perform arithmetic at much higher speed by defining difference between a value, which is provided by shifting a dividend for 1 or 2 bits, and a divisor as the next dividend when the difference between this dividend and this divisor can not be calculated. CONSTITUTION:A shift means 3 outputs a dividend Rj, value Rj' provided by shifting this value for 1 bit, and value Tj'' provided by shifting this value for 2 bits. Adders 10a and 10b calculate Rj-D and Rj'-D from the respective values Rj and Rj' and the complementary of 2 of a divisor D. A selector 11a outputs either of them which enables arithmetic as a next dividend Rj. An adder 10c similarly calculates Rj''-D and when the arithmetic is disabled at the adders 10a and 10b, a selector 11b defines this Rj''-D as the next dividend Rj and outputs a partial remainder Rj+1 to a latch 8. The latch 8 latches the Rj+1 and a carry output and returns to the shift means 3. The following calculation is similarly performed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、高速の演算が可能な繰
り返し型の整数型除算器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an iterative integer type divider capable of high speed operation.

【0002】[0002]

【従来の技術】図4は従来の繰り返し型の整数型除算器
の基本構成を示すブロック図である。被除数Rjまたは
部分剰余が第1の加算器50aの一方の入力端と第1の
セレクタ51aとに供給されている。除数Dの2の補数
が第1及び第2の加算器50a及び50bの各他方の入
力端に接続されている。第1の加算器50aの加算出力
及びキャリー出力は各々信号線55a及びキャリー信号
線57aを介して第1のセレクタ51aに接続されてい
る。第1のセレクタ51aの出力端は第2の加算器50
bの一方の入力端に接続されている。第2の加算器50
bの加算出力及びキャリー出力は各々信号線55b及び
キャリー信号線57bを介して第2のセレクタ51bに
接続されている。第2のセレクタ51bからそのサイク
ルの加算結果Rj+1が出力される。
2. Description of the Related Art FIG. 4 is a block diagram showing the basic structure of a conventional iterative integer type divider. The dividend Rj or the partial remainder is supplied to one input terminal of the first adder 50a and the first selector 51a. The 2's complement of the divisor D is connected to the other input end of each of the first and second adders 50a and 50b. The addition output and the carry output of the first adder 50a are connected to the first selector 51a via a signal line 55a and a carry signal line 57a, respectively. The output terminal of the first selector 51a is the second adder 50.
It is connected to one input end of b. Second adder 50
The addition output and the carry output of b are connected to the second selector 51b via the signal line 55b and the carry signal line 57b, respectively. The addition result Rj + 1 of the cycle is output from the second selector 51b.

【0003】図5は従来の繰り返し型の整数型除算器の
具体的構成を示すブロック図である。図5は説明の簡単
のために繰り返し型の整数型除算器の制御回路を除いた
データパス部のみの構成を示している。以下に、図5の
整数型除算器の動作について説明する。最初のサイクル
では被除数Rjの最上位ビットが信号線66aに供給さ
れ、以後のサイクルでは被除数を最上位ビットからサイ
クル毎に2ビットずつシフトアウトした値が信号線66
aに供給される。信号線66bには、除数の2の補数が
供給される。最初のサイクルでは、第1のセレクタ71
aが信号線66aの被除数Rjのうち最上位の1ビット
を選択し信号線64aに出力する。第1の加算器70a
はこの信号線64aの最上位の1ビットと信号線66b
の除数の2の補数とを加算する。第1の加算器70aに
おいて被除数または部分剰余から除数Dが引けない時に
は、キャリー出力が信号線77aに出力されない。この
場合、第2のセレクタ71bは信号線66bから供給さ
れる被除数または部分剰余の上位の2ビットを第2の加
算器70bの入力信号線76aに出力する。一方、キャ
リー出力が信号線77aに出力されると、出力信号線7
5aに加算結果が出力される。この場合には、第2のセ
レクタ71bはこの加算結果を1ビットシフトし、この
加算結果の最下位ビットに信号線66bの被除数Rjま
たは部分剰余の次の上位の1ビットを挿入し、信号線7
6aより第2の加算器70bに出力する。この後、第2
のセレクタ71bからの信号線76aの出力と信号線6
6bの除数の2の補数とが第2の加算器70bで加算さ
れる。第2の加算器70bにおいて、キャリー出力が信
号線77bに出力されない場合には、信号線76a上の
出力が第3のセレクタ71cで選択され信号線76cに
出力される。ラッチ72がこの加算結果をラッチする。
一方、キャリー出力が信号線77bに出力されると、第
3のセレクタ71cが第2の加算器70bの出力信号線
75bの加算結果を選択し、信号線76cに出力する。
第2のサイクルでは、第1のセレクタ71aはラッチ7
2の出力信号線78からの第1のサイクルの加算結果を
1ビットシフトし、その最下位ビットに信号線66aの
被除数または部分剰余の更に次の上位1ビットつまり最
上位ビットから3ビット下位のビットの信号を挿入し
て、信号線64aに出力する。以後、除算が終了するま
で前のサイクルと同じ動作が繰り返される。図5の従来
の繰り返し型の整数型除算器により8ビットの演算を行
なった場合の演算例を以下に示す。 被除数=10010011 除数=10010010 除数の2の補数=01101110 商=Q ADD0 ADD1 Q キャリー 1 第1サイクル 01101110 0 なし 10 01101110 0 なし 100 第2サイクル 01101110 0 なし 1001 01101110 0 なし 10010 第3サイクル 01101110 0 なし 100100 01101110 0 なし 1001001 第4サイクル 01101110 0 なし 10010011 01101110 1 あり
FIG. 5 is a block diagram showing a specific configuration of a conventional iterative integer type divider. FIG. 5 shows the configuration of only the data path unit excluding the control circuit of the repetitive integer type divider for the sake of simplicity. The operation of the integer divider of FIG. 5 will be described below. In the first cycle, the most significant bit of the dividend Rj is supplied to the signal line 66a, and in the subsequent cycles, the value obtained by shifting out the dividend from the most significant bit by 2 bits per cycle is the signal line 66.
is supplied to a. The two's complement of the divisor is supplied to the signal line 66b. In the first cycle, the first selector 71
a selects the most significant 1 bit of the dividend Rj of the signal line 66a and outputs it to the signal line 64a. First adder 70a
Is the most significant 1 bit of this signal line 64a and the signal line 66b.
And the two's complement of the divisor of. When the divisor D cannot be subtracted from the dividend or the partial remainder in the first adder 70a, the carry output is not output to the signal line 77a. In this case, the second selector 71b outputs the upper 2 bits of the dividend or the partial remainder supplied from the signal line 66b to the input signal line 76a of the second adder 70b. On the other hand, when the carry output is output to the signal line 77a, the output signal line 7
The addition result is output to 5a. In this case, the second selector 71b shifts this addition result by 1 bit, inserts the dividend Rj of the signal line 66b or the next higher 1 bit of the partial remainder into the least significant bit of this addition result, and 7
6a outputs to the second adder 70b. After this, the second
Of the signal line 76a from the selector 71b and the signal line 6
The 2's complement of the divisor of 6b is added by the second adder 70b. In the second adder 70b, when the carry output is not output to the signal line 77b, the output on the signal line 76a is selected by the third selector 71c and output to the signal line 76c. The latch 72 latches this addition result.
On the other hand, when the carry output is output to the signal line 77b, the third selector 71c selects the addition result of the output signal line 75b of the second adder 70b and outputs it to the signal line 76c.
In the second cycle, the first selector 71a operates the latch 7
The result of the addition of the first cycle from the second output signal line 78 is shifted by 1 bit, and the least significant bit is the next higher 1 bit of the dividend or partial remainder of the signal line 66a, that is, 3 bits lower than the most significant bit. A bit signal is inserted and output to the signal line 64a. After that, the same operation as the previous cycle is repeated until the division is completed. An example of operation when 8-bit operation is performed by the conventional iterative integer type divider of FIG. 5 is shown below. Dividend = 10010011 Divisor = 10010010 Two's complement of divisor = 01101110 Quotation = Q ADD0 ADD1 Q Carry 1 1st cycle 01101110 0 None 10 01101110 0 None 100 Second cycle 01101110 0 None 1001 01101110 0 None 10010 Third cycle 01101110 0 None 100100 01101110 0 None 1001001 4th cycle 01101110 0 None 10010011 01101110 1 Yes

【0004】演算の結果、第4サイクルの第2の加算器
70bではじめてキャリーがあり商Q=1が得られる。
商Qは00000001となり、余りは1となる。この
従来の整数型除算器により演算を行なうと、演算終了ま
で4サイクル必要である。
As a result of the operation, carry is present and the quotient Q = 1 is obtained for the first time in the second adder 70b in the fourth cycle.
The quotient Q is 00000001 and the remainder is 1. When an operation is performed by this conventional integer type divider, four cycles are required until the operation is completed.

【0005】[0005]

【発明が解決しようとする課題】従来の繰り返し型の整
数型除算器により多ビットの演算を行なう場合には、同
じサイクルタイム(同じ長さのクリテイカルパス)を用
いると多くのサイクル数つまり多くの演算の繰り返し回
数を必要とし、このため高速の演算を行なうことができ
ないという問題があった。
When performing a multi-bit operation by a conventional iterative integer type divider, if the same cycle time (critical path of the same length) is used, a large number of cycles, that is, a large number of cycles. However, there is a problem in that it is impossible to perform high-speed calculation.

【0006】本発明は、上記問題を解決するために成さ
れたものであり、同じサイクルタイムで繰り返しの演算
回数を少なくし、より高速に演算を行うことができる繰
り返し型の整数型除算器を提供することを目的とする。
The present invention has been made in order to solve the above problems, and provides an iterative integer type divider which can reduce the number of repetitive operations at the same cycle time and can perform operations at higher speed. The purpose is to provide.

【0007】[0007]

【課題を解決するための手段】本発明は、上記課題を解
決するために、被除数が入力され、先の演算サイクルで
得られたキャリー出力に基づいて前記被除数を上位ビッ
トから所定ビット同じタイミングでシフトして出力する
シフト手段と、このシフト手段によってシフトされた被
除数の下位ビットに、シフトするビット数に応じて被除
数を上位ビットから順次挿入し減算データを生成する挿
入手段と、シフトされる前記所定ビットの数に応じて並
列に配置され、前記減算データから除数を各ビット毎に
減算する複数の減算手段と、この複数の減算手段から出
力されるキャリー出力に応じて、減算手段の演算出力と
前記挿入手段が生成した減算データとのいずれかを選択
し出力する選択手段と、この選択手段の選択した出力を
保持しかつ次の演算サイクルの被除数としてこの出力を
前記シフト手段に送る第1の保持手段と、前記複数の減
算手段から出力されるキャリー出力を保持しかつ前記シ
フト手段に送る第2の保持手段と、前記複数の減算手段
の演算出力から必要な演算サイクルが完了したことを検
出する検出手段とを具備している。
In order to solve the above-mentioned problems, the present invention inputs a dividend, and based on the carry output obtained in the previous operation cycle, calculates the dividend at the same timing from a higher bit to a predetermined bit. Shifting means for shifting and outputting, inserting means for sequentially inserting the dividend in the lower bits of the dividend shifted by the shifting means from the upper bits in accordance with the number of bits to be shifted, and generating subtraction data; A plurality of subtracting means arranged in parallel according to the number of predetermined bits and subtracting the divisor for each bit from the subtraction data, and an arithmetic output of the subtracting means according to a carry output output from the plurality of subtracting means. Selecting means for selecting and outputting either of the subtraction data generated by the inserting means and the subtracting data generated by the inserting means; First holding means for sending this output to the shift means as the dividend of the cycle, second holding means for holding the carry output output from the plurality of subtraction means and sending it to the shift means, and the plurality of subtractions A detection means for detecting the completion of the required calculation cycle from the calculation output of the means.

【0008】[0008]

【作用】被除数Rjから除数Dを引くときに同じタイミ
ングで被除数Rjを1ビットシフトした値Rj′からも
除数Dを引いておく。また、被除数Rjを2ビットシフ
トした値Rj″を用意しておく。Rj―Dの演算で除数
Dが引けない場合であってRj′―Dの演算ができた場
合にはこの演算結果が次の被除数Rjとして用いられ
る。Rj′―Dの演算もできなかった場合には値Rj″
が次の演算に用いられる。従って、Rj―Dの演算が可
能な場合には商Qが1サイクルで2ビット得られ、一
方、Rj―Dの演算が不可能な場合には商Qが1サイク
ルで3ビット得られる。このように、本発明では、同じ
演算サイクルで被除数の複数ビットが同時に演算され
る。
When the divisor D is subtracted from the dividend Rj, the divisor D is also subtracted from the value Rj 'obtained by shifting the dividend Rj by 1 bit at the same timing. In addition, a value Rj ″ obtained by shifting the dividend Rj by 2 bits is prepared. When the divisor D cannot be subtracted by the operation of Rj-D and the operation of Rj′-D can be performed, this operation result is Is used as the dividend Rj of R. If the calculation of Rj'-D is not possible, the value Rj "
Is used for the next operation. Therefore, when the operation of Rj-D is possible, the quotient Q is 2 bits in one cycle, while when the operation of Rj-D is not possible, the quotient Q is 3 bits in one cycle. As described above, in the present invention, a plurality of bits of the dividend are simultaneously calculated in the same calculation cycle.

【0009】[0009]

【実施例】以下、本発明の実施例について図面を参照し
て詳細に説明する。 図1は本発明の繰り返し型の整数
型除算器の基本構成を示すブロック図である。シフト手
段3は入力端が被除数Rjに接続され、シフトしない被
除数Rj、被除数Rjを1ビットシフトした値Rj′及
び被除数Rjを2ビットシフトした値Rj″の各出力端
が各々第1の加算器(ADD0)10aの一端、第2の
加算器(ADD1)10bの一端及び第1のセレクタ1
1aに接続されている。シフト手段3は実際には同じタ
イミングで被除数RjからこれをNビットシフトした値
まで出力できる。第1の加算器10aと第2の加算器1
0bとは並列配置され、加算出力及びキャリー出力は各
々出力線5a、5b及び出力線6a、6bにより第1の
セレクタ11aに接続されている。加算器は実際にはN
個並列配置できる。第1のセレクタ11aの出力端は第
3の加算器(ADD2)10cの一方の入力端及び第2
のセレクタ11bに接続されている。第3の加算器10
cの加算出力及びキャリー出力は第2のセレクタ11b
に接続されている。除数Dの2の補数は第1、第2及び
第3の加算器10a、10b及び10cの各他方の入力
端に接続されている。部分剰余Rj+1が第2のセレク
タ11bからラッチ8へ出力される。このラッチ8は部
分剰余Rj+1及びキャリー出力をラッチした後シフト
手段3へ戻す。シフト手段3は部分剰余Rj+1、部分
剰余Rj+1を1ビットシフトした値Rj+1′及び部
分剰余Rj+1を2ビットシフトした値Rj+1″を出
力し、以下同じ演算が行なわれる。尚、説明の簡単のた
めに、図1には各部に供給されるタイミング信号が図示
されていない。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the basic configuration of an iterative integer type divider according to the present invention. An input terminal of the shift means 3 is connected to the dividend Rj, and an output terminal of the dividend Rj that is not shifted, a value Rj ′ obtained by shifting the dividend Rj by 1 bit, and a value Rj ″ obtained by shifting the dividend Rj by 2 bits is the first adder. One end of the (ADD0) 10a, one end of the second adder (ADD1) 10b, and the first selector 1
It is connected to 1a. The shift means 3 can actually output the dividend Rj up to a value obtained by shifting it by N bits at the same timing. First adder 10a and second adder 1
0b are arranged in parallel, and the addition output and the carry output are connected to the first selector 11a by the output lines 5a, 5b and the output lines 6a, 6b, respectively. The adder is actually N
Can be placed in parallel. The output terminal of the first selector 11a is connected to one input terminal of the third adder (ADD2) 10c and the second
Of the selector 11b. Third adder 10
The addition output and carry output of c are the second selector 11b.
It is connected to the. The two's complement of the divisor D is connected to the other input terminal of each of the first, second and third adders 10a, 10b and 10c. The partial remainder Rj + 1 is output from the second selector 11b to the latch 8. The latch 8 latches the partial remainder Rj + 1 and the carry output and then returns them to the shift means 3. The shift means 3 outputs a partial remainder Rj + 1, a value Rj + 1 ′ obtained by shifting the partial remainder Rj + 1 by 1 bit, and a value Rj + 1 ″ obtained by shifting the partial remainder Rj + 1 by 2 bits, and the same operation is performed thereafter. The timing signals supplied to the respective parts are not shown in FIG.

【0010】図2は本発明の繰り返し型の整数型除算器
の実施例の構成を示すブロック図である。この実施例で
は、N個の加算器20ー1・・・20ーNが並列に一段
に配置されている。第1のセレクタ21a、第1のラッ
チ22a,N+1ビットのバレルシフタ23a及び第2
のシフタ23bは図1のシフト手段3に対応する。第2
のシフタ23bの各出力がN個の加算器の一方の入力端
に接続され、除数Dの2の補数がN個の加算器の他方の
入力端に接続されている。21bは第2のセレクタであ
り、22bは被除数をラッチする第2のラッチであり、
22cはキャリーをラッチする第3のラッチである。N
個の加算器の演算出力は第2のセレクタ21bに接続さ
れ、キャリー出力は第2のセレクタ21b及び第3のラ
ッチ22cに接続されている。バレルシフタ23aはけ
た移動を一度に複数ビット行い、そのシフト量はをラッ
チ22cからのキャリー出力により制御される。被除数
Rjが第1のセレクタ21aに供給され、除数Dの2の
補数が各加算器20ー1・・・20ーNの一方の入力端
に供給されている。
FIG. 2 is a block diagram showing the configuration of an embodiment of the repetitive integer type divider of the present invention. In this embodiment, N adders 20-1 ... 20-N are arranged in parallel in one stage. The first selector 21a, the first latch 22a, the (N + 1) -bit barrel shifter 23a, and the second
The shifter 23b corresponds to the shift means 3 in FIG. Second
The output of the shifter 23b is connected to one input terminal of the N adders, and the 2's complement of the divisor D is connected to the other input terminal of the N adders. 21b is a second selector, 22b is a second latch for latching the dividend,
22c is a third latch for latching a carry. N
The operation output of each adder is connected to the second selector 21b, and the carry output is connected to the second selector 21b and the third latch 22c. The barrel shifter 23a carries out a plurality of bits of digit movement at a time, and the shift amount is controlled by the carry output from the latch 22c. The dividend Rj is supplied to the first selector 21a, and the two's complement of the divisor D is supplied to one input terminal of each adder 20-1 ... 20-N.

【0011】次に、図2の繰り返し型の整数型除算器の
演算動作について概略の説明をする。最初のサイクルで
は、第1のセレクタ21aが被除数Rjの信号を上位ビ
ットから選択して第1のラッチ22aに送る。第1のラ
ッチ22aはこれをラッチした後バレルシフタ23aに
送る。バレルシフタ23aは第1のラッチ22aから被
除数Rjの信号を受けとり、第3のラッチ22cからの
キャリー出力に応じてこれをシフトするが、最初のサイ
クルでは第3のラッチ22cからのキャリー出力がない
ので被除数Rjを何もシフトせずそのまま出力する。こ
こで、バレルシフタ23aから信号線19aに出力され
る信号は常に被除数(または部分剰余)の信号の上位の
N+1ビットの値である。バレルシフタ23aの出力は
信号線19aによりシフタ23aに送られ、同時に信号
線19bにより第1のセレクタ21aに戻され第1のラ
ッチ22aにラッチされる。最初のサイクルでは、第2
のシフタ23bから第1の加算器20ー1には最上位ビ
ットの信号が出力され、第2の加算器20ー2には最上
位ビットの信号と1ビット下位の信号とが出力され、第
3の加算器20ー3には最上位ビットの信号から2ビッ
ト下位の信号までが出力され、以下同様に、第N番目の
加算器には最上位ビットの信号からNビット下位の信号
までが出力される。この第2のシフタ23bは信号線2
4−N+1を介して第2のセレクタ21bにも被除数
(または部分剰余)を出力する。各加算器は第2のシフ
タ23bからの信号と信号線16bからの除数の2の補
数の信号とを加算する。各加算器の加算結果の信号は第
2のセレクタ21bに出力される。加算の結果、各加算
器にキャリー出力があれば、各加算器は各々の信号線2
7ー1・・・27ーNにより第2のセレクタ21b及び
第3のラッチ22cに出力する。第3のラッチ22cは
キャリー出力をラッチしかつバレルシフタ23aに送
る。第2のセレクタ21bは各加算器のキャリー出力信
号に応じて、各加算器の各加算結果の信号及びシフタ2
3bから信号線24−N+1を介して送られる被除数
(または部分剰余)の最上位ビットからNビット下位ま
での信号について選択を行なう。つまり、第2のセレク
タ21bにおいては、第1の加算器20ー1からキャリ
ーが出力されている場合には第1の加算器20ー1の加
算結果の信号が選択される。第1の加算器20ー1から
キャリーが出力されておらず第2の加算器20ー2から
キャリーが出力されている場合には第2の加算器20ー
2の加算結果の信号が選択される。第1の加算器20ー
1及び20ー2からキャリーが出力されておらず第3の
加算器20ー3からキャリーが出力されている場合には
第3の加算器20ー3の加算結果の信号が選択される。
第1、第2及び第3の加算器20ー1,20ー2及び2
0ー3からキャリーが出力されておらず第4の加算器2
0ー4からキャリーが出力されている場合には第4の加
算器20ー4の加算結果の信号が選択される。以下、キ
ャリー出力に応じて同様の選択が第2のセレクタ21b
において行なわれる。どの加算器からもキャリーが出力
されなかった場合には、第2のセレクタ21bはシフタ
23bからの被除数(または部分剰余)の最上位ビット
からNビット下位までの信号を選択する。第2のセレク
タ21bは選択した信号を第2のラッチ22aに送り、
第2のラッチ22aはこれをラッチしかつシフタ23b
に送る。
Next, the operation of the iterative integer type divider shown in FIG. 2 will be briefly described. In the first cycle, the first selector 21a selects the signal of the dividend Rj from the upper bits and sends it to the first latch 22a. The first latch 22a latches this and then sends it to the barrel shifter 23a. The barrel shifter 23a receives the signal of the dividend Rj from the first latch 22a and shifts it according to the carry output from the third latch 22c, but since there is no carry output from the third latch 22c in the first cycle. The dividend Rj is output as it is without any shifting. Here, the signal output from the barrel shifter 23a to the signal line 19a is always the upper N + 1-bit value of the dividend (or partial remainder) signal. The output of the barrel shifter 23a is sent to the shifter 23a by the signal line 19a, and at the same time, returned to the first selector 21a by the signal line 19b and latched by the first latch 22a. In the first cycle, the second
Shifter 23b outputs the signal of the most significant bit to the first adder 20-1, and outputs the signal of the most significant bit and the signal of one bit lower to the second adder 20-2. The signal of the most significant bit to the signal of 2 bits lower is output to the adder 20-3 of No. 3, and similarly, the signal of the most significant bit to the signal of N bits lower is output to the Nth adder. Is output. The second shifter 23b is connected to the signal line 2
The dividend (or partial remainder) is also output to the second selector 21b via 4-N + 1. Each adder adds the signal from the second shifter 23b and the 2's complement signal of the divisor from the signal line 16b. The signal of the addition result of each adder is output to the second selector 21b. As a result of addition, if each adder has a carry output, each adder has its own signal line 2
It outputs to the 2nd selector 21b and the 3rd latch 22c by 7-1 ... 27-N. The third latch 22c latches the carry output and sends it to the barrel shifter 23a. The second selector 21b responds to the carry output signal of each adder by adding the signal of each addition result of each adder and the shifter 2 to each other.
Selection is performed for signals from the most significant bit to the N least significant bits of the dividend (or partial remainder) sent from 3b via the signal line 24-N + 1. That is, in the second selector 21b, when the carry is output from the first adder 20-1, the signal of the addition result of the first adder 20-1 is selected. When the carry is not output from the first adder 20-1 and the carry is output from the second adder 20-2, the signal of the addition result of the second adder 20-2 is selected. It When the carry is not output from the first adders 20-1 and 20-2 and the carry is output from the third adder 20-3, the addition result of the third adder 20-3 is The signal is selected.
First, second and third adders 20-1, 20-2 and 2
No carry is output from 0-3 and the fourth adder 2
When the carry is output from 0-4, the signal of the addition result of the fourth adder 20-4 is selected. Hereinafter, the same selection is performed by the second selector 21b according to the carry output.
Performed in. When no carry is output from any of the adders, the second selector 21b selects the signal from the most significant bit to the N least significant bit of the dividend (or partial remainder) from the shifter 23b. The second selector 21b sends the selected signal to the second latch 22a,
The second latch 22a latches this and shifter 23b
Send to.

【0012】次のサイクルでは、バレルシフタ23aは
第3のラッチ22cから受け取ったキャリー信号に基づ
いて被除数のシフト量を決定する。例えば、第1及び第
2の加算器20ー1及び20ー2からキャリーが出力さ
れておらず、第3の加算器20ー3からキャリーが出力
されている場合には、バレルシフタ23aは第1のラッ
チ22aから供給される被除数を3ビットシフトする。
この結果、被除数の最上位ビットから4ビット下位から
N+4ビット下位までの値がバレルシフタ23aからシ
フタ23bに出力される。前のサイクルでどの加算器か
らもキャリーが出力されていない場合には、第1のラッ
チ22aから供給される被除数はバレルシフタ23aで
N+1ビットシフトされる。このシフト後の値つまり部
分剰余がバレルシフタ23aからシフタ23bに送られ
る。バレルシフタ23aから出力されたシフト後の部分
剰余は次のサイクルの演算のために第1のセレクタ21
aを介して第1のラッチ22aにラッチされる。第1の
加算器20ー1には第2のラッチ22bからの部分剰余
を1ビットシフトしシフタ23bの出力の最上位ビット
が挿入された値が入力される。第2の加算器20ー2に
は第2のラッチ22bからの部分剰余を2ビットシフト
しシフタ23bの出力の最上位ビットと1ビット下位の
ビットの信号が挿入された値が入力される。以下同様に
して第nの加算器20ーnには第2のラッチ22bから
の部分剰余をNビットシフトしシフタ23bの出力の最
上位ビットからNビット下位までのビットの信号が挿入
された値が入力される。この後のサイクルでは同じ動作
が繰り返される。
In the next cycle, the barrel shifter 23a determines the shift amount of the dividend based on the carry signal received from the third latch 22c. For example, when the carry is not output from the first and second adders 20-1 and 20-2 and the carry is output from the third adder 20-3, the barrel shifter 23a operates as the first shifter. The dividend supplied from the latch 22a is shifted by 3 bits.
As a result, values from the most significant bit of the dividend to the least significant 4 bits to the least significant number of N + 4 bits are output from the barrel shifter 23a to the shifter 23b. When no carry is output from any of the adders in the previous cycle, the dividend supplied from the first latch 22a is shifted by N + 1 bits in the barrel shifter 23a. The value after the shift, that is, the partial remainder is sent from the barrel shifter 23a to the shifter 23b. The partial remainder after shifting output from the barrel shifter 23a is used for the calculation of the next cycle by the first selector 21.
It is latched by the first latch 22a via a. A value obtained by shifting the partial remainder from the second latch 22b by 1 bit and inserting the most significant bit of the output of the shifter 23b is input to the first adder 20-1. To the second adder 20-2, the value obtained by shifting the partial remainder from the second latch 22b by 2 bits and inserting the signal of the most significant bit and the one bit lower bit of the output of the shifter 23b is input. Similarly, the value obtained by shifting the partial remainder from the second latch 22b by N bits and inserting the signal of the bits from the most significant bit to the N least significant bits of the output of the shifter 23b into the nth adder 20-n. Is entered. The same operation is repeated in the subsequent cycles.

【0013】図3は本発明の繰り返し型の整数型除算器
の具体的構成を示すブロック図である。図3及び以下に
示す演算例を参照して本発明の繰り返し型の整数型除算
器の演算動作について具体的に説明する。この例では、
加算器は2段に構成されている。被除数(演算例では
「10010011」)が入力線36aに与えられ、除数の2の
補数(演算例では「01101110」)が入力線36bに与え
られる。第一回目のサイクルでは、被除数Rjが第1の
セレクタ41aで選択され、第1のラッチ42aにラッ
チされる。バレルシフタ43bは第一回目のサイクルで
は何も行なわず第1のラッチ42aから入力された被除
数をそのまま出力する。バレルシフタ43bの出力は信
号線39bを介して第1のセレクタ41aに送られる。
バレルシフタ43bの出力の最上位ビットの信号(演算
例では「1 」)が第1の加算器40aに送られ、第1の
加算器40aがこの信号と除数の2の補数とを加算す
る。バレルシフタ43bの出力の最上位ビットと1ビッ
ト下位のビットの信号(演算例では「10」)が第2の加
算器40bに送られ、第2の加算器40bがこの信号と
除数の2の補数とを加算する。バレルシフタ43bの出
力の上位3ビットの信号(演算例では「100 」)が信号
線44cを介してバレルシフタ43bから直接に第2の
セレクタ41bに送られる。第1の加算器40a及び第
2の加算器40bのキャリー出力は第2のセレクタ41
b及びキャリー用の第3のラッチ42cに送られる。第
1の加算器40aの加算の結果、信号線47aにキャリ
ー出力があった場合には、第2のセレクタ41bは第1
の加算器40aの加算結果を選択する。第1の加算器4
0aにキャリー出力がなくかつ第2の加算器40bにキ
ャリー出力があった場合には、第2のセレクタ41bは
第2の加算器40bの加算結果を選択する。第1及び第
2の加算器40a及び40b共にキャリー出力がない場
合には信号線44cの信号が第2のセレクタ41bによ
り選択される。(演算例では、第1及び第2の加算器4
0a及び40bにキャリー出力は出力されていないの
で、バレルシフタ43bから被除数の上位3ビットの信
号「100 」が第3の加算器40cに出力される。)選択
された信号は第2のセレクタ41bから第3の加算器4
0c及び第3のセレクタ41cに出力される。第3の加
算器40cは第2のセレクタ41bからの信号(演算例
では「100 」)と除数の2の補数とを加算する。第3の
加算器40cのキャリー出力は第3のセレクタ41c及
び第3のラッチ42cに送られる。第3のセレクタ41
cは第3の加算器40cからキャリーが出力された場合
には第3の加算器40cの加算結果を選択し、キャリー
が出力されなかった場合には第2のセレクタ41bから
の信号を選択して、第2のラッチ42bに出力する。
(演算例では、このキャリーは出力されていない。)第
2及び第3のラッチ42b及び42cの出力は共にバレ
ルシフタ43bに送られる。
FIG. 3 is a block diagram showing a specific configuration of the repetitive integer type divider of the present invention. The arithmetic operation of the iterative integer type divider of the present invention will be specifically described with reference to FIG. 3 and the following arithmetic example. In this example,
The adder has two stages. The dividend (“10010011” in the calculation example) is given to the input line 36a, and the two's complement of the divisor (“01101110” in the calculation example) is given to the input line 36b. In the first cycle, the dividend Rj is selected by the first selector 41a and latched by the first latch 42a. The barrel shifter 43b does nothing in the first cycle and directly outputs the dividend input from the first latch 42a. The output of the barrel shifter 43b is sent to the first selector 41a via the signal line 39b.
The signal of the most significant bit (“1” in the calculation example) of the output of the barrel shifter 43b is sent to the first adder 40a, and the first adder 40a adds this signal and the two's complement of the divisor. The signal of the most significant bit and the one bit lower bit (“10” in the operation example) of the output of the barrel shifter 43b is sent to the second adder 40b, and the second adder 40b outputs this signal and the two's complement of the divisor. And are added. The signal of the upper 3 bits (“100” in the calculation example) of the output of the barrel shifter 43b is directly sent from the barrel shifter 43b to the second selector 41b via the signal line 44c. The carry outputs of the first adder 40a and the second adder 40b are the second selector 41
b and a third latch 42c for carry. As a result of the addition by the first adder 40a, if there is a carry output on the signal line 47a, the second selector 41b outputs the first output.
The addition result of the adder 40a is selected. First adder 4
If 0a has no carry output and second adder 40b has a carry output, second selector 41b selects the addition result of second adder 40b. When there is no carry output from both the first and second adders 40a and 40b, the signal on the signal line 44c is selected by the second selector 41b. (In the calculation example, the first and second adders 4
Since no carry output is output to 0a and 40b, the barrel shifter 43b outputs the signal "100" of the upper 3 bits of the dividend to the third adder 40c. ) The selected signal is output from the second selector 41b to the third adder 4
0c and the third selector 41c. The third adder 40c adds the signal (“100” in the calculation example) from the second selector 41b and the two's complement of the divisor. The carry output of the third adder 40c is sent to the third selector 41c and the third latch 42c. Third selector 41
c selects the addition result of the third adder 40c when the carry is output from the third adder 40c, and selects the signal from the second selector 41b when the carry is not output. And outputs it to the second latch 42b.
(In the calculation example, this carry is not output.) Both outputs of the second and third latches 42b and 42c are sent to the barrel shifter 43b.

【0014】第二回目のサイクルでは、第1のセレクタ
41aは第一回目のサイクルにおけるバレルシフタ43
bの出力信号を選択し、第1のラッチ42aがこれをラ
ッチしかつバレルシフタ43bに出力する。バレルシフ
タ43bは第3のラッチ42cの出力信号に応じてその
出力のシフト量を変える。つまり、バレルシフタ43b
は、第1の加算器40aにキャリー出力があった場合に
はその出力を1ビット左へシフトし、第1の加算器40
aにキャリー出力がなく第2の加算器40bにキャリー
出力があった場合にはその出力を2ビット左へシフト
し、第1及び第2の加算器40a及び40b共にキャリ
ー出力がない場合にはその出力を3ビット左へシフトす
る。バレルシフタ43bは、第1の加算器40aには、
第2のラッチ42bの出力信号(演算例では「100 」)
を1ビット左にシフトしその最下位ビットに第1のラッ
チ42aからの信号の最上位ビットの信号(演算例では
「1」)を挿入した値(演算例では「1001」)を出
力する。バレルシフタ43bは、第2の加算器40bに
は、第2のラッチ42bの出力信号を2ビット左にシフ
トしその下位2ビットに第1のラッチ42aからの信号
の最上位ビットと1ビット下位の信号(演算例では「1
0」)を挿入した値(演算例では「10010 」)を出力す
る。バレルシフタ43bは、第3の加算器40cには、
第2のラッチ42bの出力信号を3ビット左にシフトし
その下位3ビットに第1のラッチ42aからの信号の最
上位ビットから2ビット下位までの信号を挿入した値
(演算例では「100100」)を出力する。第1、第2及び
第3の加算器40a、40b及び40cで除数の2の補
数と加算が行なわれ、以後第一回目のサイクルに戻り、
除算が終了するまで同じ動作が繰り返される。(演算例
では、第1サイクル及び第2サイクル共に商Qは得られ
ずに、第3サイクルにおいてはじめて商Q=1、余り=
1が得られている。)図3の繰り返し型の整数型除算器
を使用した演算例を以下に示す。 被除数=10010011 除数=10010010 除数の2の補数=01101110 ADD0(40a) ADD1(40b) ADD2(40c) Q 1 10 第1サイクル 01101110 01101110 00 100 01101110 0 1001 10010 第2サイクル 01101110 01101110 00 100100 01101110 0 1001001 10010011 第3サイクル 01101110 01101110 01 1 01101110 0
In the second cycle, the first selector 41a operates as the barrel shifter 43 in the first cycle.
The output signal of b is selected, and the first latch 42a latches it and outputs it to the barrel shifter 43b. The barrel shifter 43b changes the shift amount of its output according to the output signal of the third latch 42c. That is, the barrel shifter 43b
Shifts the output of the first adder 40a to the left by one bit when the carry output is present in the first adder 40a.
If there is no carry output in a and there is a carry output in the second adder 40b, that output is shifted to the left by 2 bits, and if there is no carry output in both the first and second adders 40a and 40b. Shift its output 3 bits to the left. The barrel shifter 43b includes a first adder 40a,
Output signal of the second latch 42b (“100” in the calculation example)
Is shifted to the left by one bit, and the value (“1001” in the operation example) in which the signal of the most significant bit (“1” in the operation example) of the signal from the first latch 42a is inserted into the least significant bit is output. The barrel shifter 43b shifts the output signal of the second latch 42b to the left by 2 bits to the second adder 40b, and shifts the output signal of the second latch 42b to the left by 2 bits and shifts the most significant bit of the signal from the first latch 42a and 1 bit lower. Signal (1 in the calculation example
The value ("10010" in the calculation example) with "0") inserted is output. The barrel shifter 43b includes a third adder 40c,
A value obtained by shifting the output signal of the second latch 42b to the left by 3 bits and inserting the signals from the most significant bit to the lower 2 bits of the signal from the first latch 42a into the lower 3 bits (“100100” in the operation example). ) Is output. The first, second, and third adders 40a, 40b, and 40c perform the two's complement of the divisor and addition, and thereafter return to the first cycle,
The same operation is repeated until the division is completed. (In the calculation example, the quotient Q is not obtained in the first cycle and the second cycle, and the quotient Q = 1 and the remainder =
1 has been obtained. ) An example of operation using the iterative integer type divider of FIG. 3 is shown below. Dividend = 10010011 Divisor = 10010010 Two's complement of divisor = 01101110 ADD0 (40a) ADD1 (40b) ADD2 (40c) Q 1 10 1st cycle 01101110 01101110 00 100 01101110 0 1001 10010 2nd cycle 01101110 01101110 00 100100 01101110 0 1001001 10010011 Third cycle 01101110 01101110 01 1 01101110 0

【0015】[0015]

【発明の効果】以上説明したように、本発明の整数型除
算器によれば、従来の整数型除算器における動作速度と
ほぼ同じ動作速度で動作し、同じサイクルタイムで少な
い繰り返し演算サイクル数で演算を実行でき、そのため
従来と比べて高速の除算が可能となる。
As described above, according to the integer type divider of the present invention, the integer type divider operates at almost the same operation speed as that of the conventional integer type divider, and the number of repetitive operation cycles is reduced with the same cycle time. The operation can be executed, and thus the division can be performed at a higher speed than the conventional one.

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

【図1】本発明の繰り返し型の整数型除算器の基本構成
を示すブロック図。
FIG. 1 is a block diagram showing the basic configuration of a repetitive integer type divider according to the present invention.

【図2】本発明の繰り返し型の整数型除算器の実施例の
構成を示すブロック図。
FIG. 2 is a block diagram showing the configuration of an embodiment of an iterative integer type divider of the present invention.

【図3】本発明の繰り返し型の整数型除算器の具体的構
成を示すブロック図。
FIG. 3 is a block diagram showing a specific configuration of a repetitive integer type divider according to the present invention.

【図4】従来の繰り返し型の整数型除算器の基本構成を
示すブロック図。
FIG. 4 is a block diagram showing a basic configuration of a conventional iterative integer type divider.

【図5】従来の繰り返し型の整数型除算器の具体的構成
を示すブロック図。
FIG. 5 is a block diagram showing a specific configuration of a conventional iterative integer type divider.

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

10a ・・10d 、40a ・・40c 加算器 1c,11,11a,11b,12,60a,60c,60d セレクタ 1a,60b バレルシフタ 1d,8a,8b,12,50a ・・50c ラッチ 3 シフタ 10a ・ ・ 10d, 40a ・ ・ 40c Adder 1c, 11,11a, 11b, 12,60a, 60c, 60d Selector 1a, 60b Barrel shifter 1d, 8a, 8b, 12,50a ・ ・ 50c Latch 3 shifter

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 被除数が入力され、先の演算サイクルで
得られたキャリー出力に基づいて前記被除数を上位ビッ
トから所定ビット同じタイミングでシフトして出力する
シフト手段と、 このシフト手段によってシフトされた被除数の下位ビッ
トに、シフトするビット数に応じて被除数を上位ビット
から順次挿入し減算データを生成する挿入手段と、 シフトされる前記所定ビットの数に応じて並列に配置さ
れ、前記減算データから除数を各ビット毎に減算する複
数の減算手段と、 この複数の減算手段から出力されるキャリー出力に応じ
て、減算手段の演算出力と前記挿入手段が生成した減算
データとのいずれかを選択し出力する選択手段と、 この選択手段の選択した出力を保持しかつ次の演算サイ
クルの被除数としてこの出力を前記シフト手段に送る第
1の保持手段と、 前記複数の減算手段から出力されるキャリー出力を保持
しかつ前記シフト手段に送る第2の保持手段と、 前記複数の減算手段の演算出力から必要な演算サイクル
が完了したことを検出する検出手段と、 を具備したことを特徴とする整数型除算器。
1. A shift means for inputting a dividend and shifting the dividend from the upper bits at the same timing as a predetermined bit based on a carry output obtained in the previous operation cycle and outputting the dividend, the shift means shifting the dividend. Inserting means for sequentially inserting the dividend into the lower bits of the dividend according to the number of bits to be shifted and generating subtraction data from the higher bits, and the insertion means arranged in parallel according to the number of the predetermined bits to be shifted, from the subtraction data A plurality of subtracting means for subtracting the divisor for each bit, and either the arithmetic output of the subtracting means or the subtraction data generated by the inserting means is selected according to the carry output output from the plurality of subtracting means. Selecting means for outputting, and the shifting means for holding the output selected by the selecting means and for using this output as the dividend of the next operation cycle. A first holding means for sending, a second holding means for holding the carry output output from the plurality of subtracting means and sending to the shift means, and a necessary operation cycle is completed from the operation outputs of the plurality of subtracting means. An integer-type divider comprising: a detection unit that detects the above.
JP5048160A 1993-03-09 1993-03-09 Integral divider Pending JPH06259231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5048160A JPH06259231A (en) 1993-03-09 1993-03-09 Integral divider

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5048160A JPH06259231A (en) 1993-03-09 1993-03-09 Integral divider

Publications (1)

Publication Number Publication Date
JPH06259231A true JPH06259231A (en) 1994-09-16

Family

ID=12795639

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5048160A Pending JPH06259231A (en) 1993-03-09 1993-03-09 Integral divider

Country Status (1)

Country Link
JP (1) JPH06259231A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6650502B2 (en) 2000-01-28 2003-11-18 Alps Electric Co., Ltd. Thin-film magnetic head capable of narrowing track width and method of manufacturing the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6650502B2 (en) 2000-01-28 2003-11-18 Alps Electric Co., Ltd. Thin-film magnetic head capable of narrowing track width and method of manufacturing the same

Similar Documents

Publication Publication Date Title
EP0801345B1 (en) Circuit for modulo multiplication and exponentiation arithmetic
JPH1195981A (en) Multiplication circuit
GB2287331A (en) Electronic multiplying and adding apparatus.
US5812806A (en) Data driven information processor configuring each data packet with a multi-attribute tag having at least two components
JP2000353077A (en) Mutifold length arithmetic unit
JPH08221256A (en) Multiplier and product-sum arithmetic unit
JP3271120B2 (en) Device for fast multiplication of binary numbers
JPH0234054B2 (en)
JPH02194430A (en) Divider
JPH06259231A (en) Integral divider
US4879675A (en) Parity generator circuit and method
JPH08329038A (en) Data processor
US6275837B1 (en) Method for the implementation of an elementary modular operation according to the Montgomery method
JP3166781B2 (en) Adder circuit
US6470369B1 (en) Euclid mutual division arithmetic circuit and processing circuit
US5615141A (en) Multiplying apparatus
JPH07191830A (en) Arithmetic unit
JPS62237523A (en) Sorting circuit
JP3851025B2 (en) Division circuit
JPH03116327A (en) Multiplication system
EP0129039A1 (en) Improved multiplier architecture
JPH05224889A (en) Multiplier
JPH04246722A (en) Adder/subtracter
CN116149605A (en) Modulus multiplication circuit and method for calculating modulus multiplication
JP2003337694A (en) Shift circuit