JP2705162B2 - Arithmetic processing unit - Google Patents

Arithmetic processing unit

Info

Publication number
JP2705162B2
JP2705162B2 JP63301192A JP30119288A JP2705162B2 JP 2705162 B2 JP2705162 B2 JP 2705162B2 JP 63301192 A JP63301192 A JP 63301192A JP 30119288 A JP30119288 A JP 30119288A JP 2705162 B2 JP2705162 B2 JP 2705162B2
Authority
JP
Japan
Prior art keywords
data
register
input
arithmetic
display
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
Application number
JP63301192A
Other languages
Japanese (ja)
Other versions
JPH02146621A (en
Inventor
仁志 山下
明 三好
保 西山
茂郎 國信
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63301192A priority Critical patent/JP2705162B2/en
Publication of JPH02146621A publication Critical patent/JPH02146621A/en
Application granted granted Critical
Publication of JP2705162B2 publication Critical patent/JP2705162B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、複数の演算要素を有する演算処理装置に関
するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic processing device having a plurality of arithmetic elements.

従来の技術 第3図に従来の複数の演算要素を有する演算処理装置
の構成を示す。第3図は、例えば浮動小数点演算プロセ
ッサのデータパス部であり、1はマルチポートのデータ
メモリ、2は加減算器、3は乗算器、4は乗算器を用い
て除算或いは開平を行なう際、除数の逆数或いは開平を
行なう数の平方根の逆数を出力するROM、5,6,7,8,9,10,
11,12,13,14,15はそれぞれ2進のデータを保持するレジ
スタ、16はデータメモリと外部とのデータ入出力部であ
る。これらの演算器は通常全て普通の2進体系で構成さ
れている。
2. Description of the Related Art FIG. 3 shows a configuration of a conventional arithmetic processing device having a plurality of arithmetic elements. FIG. 3 shows, for example, a data path section of a floating-point arithmetic processor, wherein 1 is a multiport data memory, 2 is an adder / subtractor, 3 is a multiplier, and 4 is a divisor when performing division or square root using a multiplier. ROM that outputs the reciprocal of the reciprocal of the square root of the number to be square rooted, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, and 15 are registers for holding binary data, respectively, and 16 is a data input / output unit between the data memory and the outside. All of these arithmetic units are usually constituted by an ordinary binary system.

以上のように構成された従来の演算処理装置におい
て、データの流れを詳細に説明する。
The data flow in the conventional arithmetic processing device configured as described above will be described in detail.

まず加減算を行なう場合、データメモリ1からレジス
タ5及びレジスタ6にデータが取り込まれ、レジスタ5
とレジスタ6から2つのデータが2進体系で加減算器2
に入力される。ここで通常の2進体系による演算処理が
行なわれた後、その結果が2進体系でレジスタ10に書き
込まれデータメモリ1に送られる。
First, when performing addition / subtraction, data is fetched from the data memory 1 into the registers 5 and 6 and
And the two data from the register 6 are in the binary system,
Is input to Here, after a normal binary arithmetic processing is performed, the result is written in a register 10 in a binary system and sent to the data memory 1.

次に乗算を行なう場合、データメモリ1からレジスタ
7及びレジスタ8にデータが取り込まれ、レジスタ7と
レジスタ8から2つのデータが2進体系で乗算器3に入
力される。ここで通常の2進体系による演算処理が行な
われた後、その結果が2進体系でレジスタ11に書き込ま
れデータメモリ1に送られる。
Next, when performing multiplication, data is taken into the register 7 and the register 8 from the data memory 1, and two data from the register 7 and the register 8 are input to the multiplier 3 in a binary system. Here, after the normal binary system arithmetic processing is performed, the result is written to the register 11 in the binary system and sent to the data memory 1.

さらに除算を行なう場合、除算第1ステップでは、デ
ータメモリ1から2つのデータが出力され、被除数はレ
ジスタ13に除数はレジスタ9及びレジスタ14に取り込ま
れ、レジスタ9から2進体系でROM4にデータが入力され
る。ここで除算はニュートンラプソン法の利用により乗
算器3を用いてROM4から読み出した除数の逆数R0から Ri=Ri-1*(2−Ri-1*Y) [Y:除数] という演算を数回行なって、ROM4から読み出した除数の
逆数の精度を高め、最終的に Z=Ri*X [X:被除数] という演算で結果を出す。ここではレジスタ9のデータ
の逆数がROM4より読み出されレジスタ12に書き込まれ
る。除算第2ステップでは、レジスタ12のデータとレジ
スタ14のデータがレジスタ7とレジスタ8に取り込まれ
2進体系で乗算器3に入力されて、通常の2進体系によ
る演算処理が行なわれ、その結果がレジスタ11に取り込
まれる。除算第3ステップでは、レジスタ11のデータだ
けがレジスタ6に取り込まれ2進体系で加減算器2に入
力されて2からの減算を行ない、その結果がレジスタ10
に書き込まれる。除算第4ステップでは、レジスタ10の
データとレジスタ12のデータがレジスタ7とレジスタ8
に取り込まれ2進体系で乗算器3に入力されて、通常の
2進体系による演算処理が行なわれ、その結果がレジス
タ11に書き込まれる。除算第5ステップでは、レジスタ
11のデータはレジスタ7とレジスタ15に、レジスタ14の
データがレジスタ8に取り込まれ2進体系で乗算器3に
入力されて、通常の2進体系による演算処理が行なわ
れ、その結果がレジスタ11に書き込まれる。除算第6ス
テップでは、レジスタ11のデータだけがレジスタ6に取
り込まれ2進体系で加減算器2に入力されて2からの減
算を行ない、その結果がレジスタ10に書き込まれる。除
算第7ステップでは、レジスタ10のデータとレジスタ15
のデータがレジスタ7とレジスタ8に取り込まれ、2進
体系で乗算器3に入力されて、通常の2進体系による演
算処理が行なわれ、その結果がレジスタ11に書き込まれ
る。除算第8ステップでは、レジスタ11のデータはレジ
スタ7とレジスタ15に、レジスタ14のデータがレジスタ
8に取り込まれ2進体系で乗算器3に入力されて、通常
の2進体系による演算処理が行なわれ、その結果がレジ
スタ11に書き込まれる。このように第5ステップから第
7ステップまでの繰り返し乗算を数回行なってROM4から
読み出した除数の逆数の精度を高め、最終ステップにお
いてレジスタ11のデータとレジスタ13の被除数データが
レジスタ7とレジスタ8に取り込まれ2進体系で乗算器
3に入力されて、通常の2進体系による演算処理が行な
われた後、除算の結果が2進体系でレジスタ11に書き込
まれデータメモリ1に送られる。
When performing further division, in the first division step, two data are output from the data memory 1, the dividend is taken into the register 13 and the divisor is taken into the register 9 and the register 14, and the data is read from the register 9 into the ROM 4 in a binary system. Is entered. Here division from the reciprocal R 0 of the divisor read from ROM4 using multiplier 3 by the use of Newton Raphson method R i = R i-1 * (2-R i-1 * Y) [Y: Divisor that By performing the operation several times, the precision of the reciprocal of the divisor read from the ROM 4 is increased, and finally, a result is obtained by the following operation: Z = R i * X [X: dividend]. Here, the reciprocal of the data in the register 9 is read from the ROM 4 and written into the register 12. In the second division step, the data of the register 12 and the data of the register 14 are taken into the registers 7 and 8 and input to the multiplier 3 in a binary system, and the arithmetic processing in the normal binary system is performed. Is taken into the register 11. In the third step of division, only the data of the register 11 is taken into the register 6 and input to the adder / subtractor 2 in a binary system to perform subtraction from 2, and the result is stored in the register 10
Is written to. In the fourth division step, the data of the register 10 and the data of the register 12 are
Is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is written in the register 11. In the fifth step of division, register
The data of 11 is fetched into the registers 7 and 15 and the data of the register 14 is fetched into the register 8 and input to the multiplier 3 in a binary system. Is written to. In the sixth division step, only the data in the register 11 is fetched into the register 6 and input to the adder / subtractor 2 in a binary system to perform subtraction from 2, and the result is written into the register 10. In the seventh step of the division, the data of the register 10 and the register 15
Is taken into the registers 7 and 8, input to the multiplier 3 in a binary system, the arithmetic processing in the normal binary system is performed, and the result is written in the register 11. In the eighth step of the division, the data of the register 11 is taken into the registers 7 and 15 and the data of the register 14 is taken into the register 8 and inputted to the multiplier 3 in a binary system. And the result is written to the register 11. In this way, the repetition of the fifth step to the seventh step is repeated several times to increase the precision of the reciprocal of the divisor read from the ROM 4. In the final step, the data of the register 11 and the dividend data of the register 13 are stored in the registers 7 and 8 After being input to the multiplier 3 in a binary system and subjected to arithmetic processing in a normal binary system, the result of the division is written in a register 11 in a binary system and sent to the data memory 1.

また開平を行なう場合、開平第1ステップでは、デー
タメモリ1からデータが出力され、そのデータはレジス
タ9とレジスタ14に取り込まれ、レジスタ9から2進体
系でROM4にデータが入力される。ここで開平はニュート
ンラプソン法の利用により乗算器3を用いてROM4から読
み出した開平を行なう数の平方根の逆数R0から Ri=Ri-1*(3−Ri-1 2*Y)/2 という演算を数回行なって、ROM4から読み出した開平を
行なう数の平方根の逆数の精度を高め、最終的に Z=Ri*Y という演算で結果を出す。ここではレジスタ9のデータ
の逆数がROM4より読み出されレジスタ12に書き込まれ
る。
When square rooting is performed, in the square rooting first step, data is output from the data memory 1, the data is fetched into the register 9 and the register 14, and the data is input from the register 9 to the ROM 4 in a binary system. Here, the square root is the reciprocal of the square root of the square root number to be squared read from the ROM 4 using the multiplier 3 by using the Newton-Raphson method, from R 0 to Ri = R i-1 * (3-R i-1 2 * Y). The operation of / 2 is performed several times to increase the precision of the reciprocal of the square root of the number of square roots to be extracted from ROM4, and finally, the result is obtained by the operation of Z = R i * Y. Here, the reciprocal of the data in the register 9 is read from the ROM 4 and written into the register 12.

開平第2ステップでは、レジスタ12のデータとレジス
タ14のデータがレジスタ7とレジスタ8に取り込まれ2
進体系で乗算器3に入力されて、通常の2進体系による
演算処理が行なわれ、その結果がレジスタ11に取り込ま
れる。
In the square root second step, the data of the register 12 and the data of the register 14 are taken into the registers 7 and 8,
The data is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is taken into the register 11.

開平第3ステップでは、レジスタ11のデータとレジス
タ12のデータがレジスタ7とレジスタ8に取り込まれ2
進体系で乗算器3に入力されて、通常の2進体系による
演算処理が行なわれ、その結果がレジスタ11に取り込ま
れる。
In the third step of the square root, the data of the register 11 and the data of the register 12 are taken into the registers 7 and 8,
The data is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is taken into the register 11.

開平第4ステップでは、レジスタ11のデータだけがレ
ジスタ6に取り込まれ2進体系で加減算器2に入力され
て3からの減算を行ない1ビット右シフトした後、その
結果がレジスタ10に書き込まれる。
In the fourth step of the square root, only the data of the register 11 is taken into the register 6, input to the adder / subtractor 2 in a binary system, subtracted from 3, shifted right by one bit, and the result is written into the register 10.

開平第5ステップでは、レジスタ10のデータとレジス
タ12のデータがレジスタ7とレジスタ8に取り込まれ2
進体系で乗算器3に入力されて、通常の2進体系による
演算処理が行なわれ、その結果がレジスタ11に書き込ま
れる。
In the fifth square root step, the data of the register 10 and the data of the register 12 are fetched into the registers 7 and 8,
The data is input to the multiplier 3 in the binary system, the arithmetic processing is performed in the normal binary system, and the result is written in the register 11.

開平第6ステップでは、レジスタ11のデータはレジス
タ7とレジスタ15に、レジスタ14のデータがレジスタ8
に取り込まれ2進体系で乗算器3に入力されて、通常の
2進体系による演算処理が行なわれ、その結果がレジス
タ11に書き込まれる。
In the sixth square root step, the data of the register 11 is stored in the registers 7 and 15 and the data of the register 14 is stored in the register 8.
Is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is written in the register 11.

開平第7ステップでは、レジスタ11のデータとレジス
タ15のデータがレジスタ7とレジスタ8に取り込まれ2
進体系で乗算器3に入力されて、通常の2進体系による
演算処理が行なわれ、その結果がレジスタ11に取り込ま
れる。
In the square rooting seventh step, the data of the register 11 and the data of the register 15 are taken into the registers 7 and 8,
The data is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is taken into the register 11.

開平第8ステップでは、レジスタ11のデータだけがレ
ジスタ6に取り込まれ2進体系で加減算器2に入力され
て3からの減算を行ない1ビット右シフトした後、その
結果がレジスタ10に書き込まれる。
In the eighth step of the square root, only the data in the register 11 is taken into the register 6, input to the adder / subtractor 2 in a binary system, subtracted from 3, shifted right by 1 bit, and the result is written into the register 10.

開平第9ステップでは、レジスタ10のデータとレジス
タ15のデータがレジスタ7とレジスタ8に取り込まれ2
進体系で乗算器3に入力されて、通常の2進体系による
演算処理が行なわれ、その結果がレジスタ11に取り込ま
れる。
In the ninth square root step, the data of the register 10 and the data of the register 15 are taken into the registers 7 and 8,
The data is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is taken into the register 11.

開平第10ステップでは、レジスタ11のデータはレジス
タ7とレジスタ15に、レジスタ14のデータがレジスタ8
に取り込まれ2進体系で乗算器3に入力されて、通常の
2進体系による演算処理が行なわれ、その結果がレジス
タ11に書き込まれる。
In the tenth square root step, the data of the register 11 is stored in the registers 7 and 15 and the data of the register 14 is stored in the register 8.
Is input to the multiplier 3 in a binary system, the arithmetic processing is performed in a normal binary system, and the result is written in the register 11.

このように第6ステップから第9ステップまでの繰り
返し乗算を数回行なってROM4から読み出した開平を行な
う数の平方根の逆数の精度を高め、最終ステップにおい
てレジスタ11のデータとレジスタ14のデータがレジスタ
7とレジスタ8に取り込まれ2進体系で乗算器3に入力
されて、通常の2進体系による演算処理が行なわれた
後、開平の結果が2進体系でレジスタ11に書き込まれデ
ータメモリ1に送られる。
In this manner, the accuracy of the reciprocal of the square root of the number of square roots read out from the ROM 4 is increased by performing the repetitive multiplications from the sixth step to the ninth step several times, and the data in the register 11 and the data in the register 14 7 and are taken into the register 8 and input to the multiplier 3 in the binary system. After the arithmetic processing in the ordinary binary system is performed, the result of the square root is written in the register 11 in the binary system and is stored in the data memory 1. Sent.

ここで加減算及び乗算をそれぞれ1マシンサイクルと
すると、除算を考えた場合、ROMの精度にもよるがROMの
精度を上げるために3回の繰り返し乗算を行なうとする
と、各サイクルにおいて、 1 Y −−>R0 2 R0*Y 3 R0*Y 4 R0*(2−R0*Y)=R1 5 R1*Y 6 2−R1*Y 7 R1*(2−R1*Y)=R2 8 R2*Y 9 2−R2*Y 10 R2*(2−R2*Y)=R3 11 R3*X のような演算を行なうこととなり、11サイクルの演算時
間が必要となる。
Here, assuming that addition and subtraction and multiplication are each one machine cycle, in consideration of division, if repetition of multiplication is performed three times in order to increase the accuracy of the ROM, depending on the accuracy of the ROM, 1 Y − -> R 0 2 R 0 * Y 3 R 0 * Y 4 R 0 * (2-R 0 * Y) = R 1 5 R 1 * Y 6 2-R 1 * Y 7 R 1 * (2-R 1 * Y) = R 2 8 R 2 * Y 9 2-R 2 * Y 10 R 2 * (2-R 2 * Y) = R 3 11 R 3 * calculation that the result of performing, such as X, the 11 cycles Calculation time is required.

また開平を考えた場合、ROMの精度にもよるがROMの精
度を上げるために3回の繰り返し乗算を行なうとする
と、各サイクルにおいて、 1 Y −−>R0 2 R0*Y 3 2−R0 2*Y 4 (3−R0 2*Y)/2 5 R0*(3−R0*Y)/2=R1 6 R1*Y 7 R1 2*Y 8 (3−R1 2*Y)/2 9 R1*(3−R1 2*Y)/2=R2 10 R2*Y 11 R2 2*Y 12 (3−R2 2*Y)/2 13 R2*(3−R2 2*Y)/2=R3 14 R3*Y のような演算を行なうこととなり、14サイクルの演算時
間が必要となる。
Also when considering No. and depending on the accuracy of the ROM and performs iterative multiplication of 3 times to increase the accuracy of the ROM, in each cycle, 1 Y -> R 0 2 R 0 * Y 3 2- R 0 2 * Y 4 (3 -R 0 2 * Y) / 2 5 R 0 * (3-R 0 * Y) / 2 = R 1 6 R 1 * Y 7 R 1 2 * Y 8 (3-R 1 2 * Y) / 2 9 R 1 * (3-R 1 2 * Y) / 2 = R 2 10 R 2 * Y 11 R 2 2 * Y 12 (3-R 2 2 * Y) / 2 13 R 2 * (3-R 2 2 * Y) / 2 = R 3 14 R 3 * calculation that the result of performing, such as Y, is required calculation time of 14 cycles.

また、文献名:(S.Kuninobu et al.:アイ、イ、イ、
イ プロシーディング 第8回 コンピュータ演算シン
ポジウム(IEEE Proc.8th Sympo.on Computer Arithmet
ic)PP.80−86,1987)によれば、乗算器においては、入
出力を普通の2進体系とし、内部論理として冗長度の存
するSD表示を用いることによって、ゲート段数を減らし
てトランジスタ数を削減し、配線もより単純なものとし
て高速化を図ることができる。
References: (S. Kuninobu et al .: Eye, Lee, Lee,
B Proceeding The 8th Computer Arithmetic Symposium (IEEE Proc. 8th Sympo.on Computer Arithmet
ic) According to PP.80-86, 1987), in the multiplier, the input / output is a normal binary system, and the SD display with redundancy is used as internal logic to reduce the number of gate stages and reduce the number of transistors. , And the speed can be increased with a simpler wiring.

発明が解決しようとする課題 前記した内部論理としてSD数体系を用いた乗算器を用
いて除算叉は開平等の繰り返し乗算を用いた演算を考え
た場合、この乗算器の乗算結果はSD数体系となるため、
このSD体系を2進体系に変換した後に前記乗算器に入力
しなければならず、演算処理の高速性を阻害していた。
Problems to be Solved by the Invention When considering an operation using repetitive multiplication such as division or square root equalization using a multiplier using an SD number system as the internal logic described above, the multiplication result of this multiplier is an SD number system. Because
This SD system must be converted into a binary system and then input to the multiplier, which hinders high-speed arithmetic processing.

また、繰り返し乗算を用いる除算叉は開平等のアルゴ
リズムにおいて、入力されるデータから定数を引くとい
う処理等は加減算器を用いて実施していたため、減算処
理等の高速性を阻害していた。
In addition, in an algorithm of division or square root equalization using iterative multiplication, a process of subtracting a constant from input data is performed using an adder / subtractor, which hinders high-speed processing such as a subtraction process.

本発明はかかる点に鑑み、演算時間を短縮する高速な
演算処理装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and has as its object to provide a high-speed arithmetic processing device that reduces the arithmetic time.

課題を解決するための手段 本発明の第1の演算処理装置は、第1の入力データ、
第2の入力データのうち一方のデータが符号付デジット
による数体系を用いたデータである2数の入力データを
入力し、前記数体系で表現された乗算結果を出力する乗
算手段と、前記数体系で表現された乗算結果と第3の入
力データを演算し、前記数体系で表現された演算結果を
出力する演算手段とを備え、前記数体系で表現された演
算結果を前記数体系のまま前記乗算手段の入力データと
して入力する構成である。
Means for Solving the Problems A first arithmetic processing device according to the present invention includes first input data,
Multiplication means for inputting two input data in which one of the second input data is data using a signed digit system, and outputting a multiplication result expressed in the number system; Operating means for operating a multiplication result expressed in a system and third input data, and outputting an operation result expressed in the number system, wherein the operation result expressed in the number system remains unchanged in the number system It is configured to input as input data of the multiplying means.

また、本発明の第2の演算処理装置は、各桁が2ビッ
トで構成される符号付デジットによる数体系で表現され
たデータを出力する第1の演算手段と、前記第1の演算
手段から出力されるデータを入力し、上位桁部分は前記
2ビットの内一方のビットのみ論理反転を行い、下位桁
部分は他方のビットのみ論理反転を行い、前記数体系で
表現されたデータを出力する第2の演算手段とを備えた
構成である。
Further, the second arithmetic processing device of the present invention comprises: a first arithmetic means for outputting data expressed in a numerical system by a signed digit in which each digit is composed of 2 bits; Data to be output is input, and the upper digit portion performs logical inversion of only one of the two bits, and the lower digit portion performs logical inversion of only the other bit, and outputs data expressed in the numerical system. This is a configuration including a second arithmetic unit.

作用 本発明の第1の演算処理装置は、前記した構成によ
り、符号付デジットによる数体系を用いた乗算手段を用
いて繰り返し乗算を用いた演算を行う場合、乗算手段の
乗算結果に対して、所定の演算を施した後は符号付デジ
ットによる数体系を用いたデータであるが、このデータ
を2進に変換することなくそのまま乗算手段に入力する
ことができることとなる。
Effect The first arithmetic processing device of the present invention, when performing an arithmetic operation using repetitive multiplication using a multiplication unit using a number system with a signed digit according to the configuration described above, performs multiplication on the multiplication result of the multiplication unit. After performing a predetermined operation, the data is data using a numerical system using signed digits, but this data can be directly input to the multiplication means without being converted into binary.

また本発明の第2の演算処理装置は、前記した構成に
より、入力されるデータから定数を引くという処理等を
符号付デジットによる数体系の特徴を生かしてビット操
作により行ったため、加減算器を用いる必要が無いこと
となる。
In addition, the second arithmetic processing device of the present invention employs an adder / subtractor because the above-described configuration performs a process of subtracting a constant from input data by a bit operation taking advantage of a characteristic of a number system using signed digits. There is no need.

実施例 第1図に本発明の実施例を示す。1はマルチポートの
データメモリ、2は加減算器、3は乗算器、4は乗算器
を用いて除算或いは開平を行なう際に用いる演算回路、
5は乗算器を用いて除算或は開平を行なう際、除数の逆
数或いは開平を行なう数の平方根の逆数を出力するRO
M、6,7,9,10,11,13,14,15はそれぞれ2進のデータを保
持するレジスタ、8,12はそれぞれ冗長度の存するSD表示
のデータを保持するレジスタ、16はデータメモリと外部
との入出力部である。
Embodiment FIG. 1 shows an embodiment of the present invention. 1 is a multiport data memory, 2 is an adder / subtracter, 3 is a multiplier, 4 is an arithmetic circuit used when performing division or square root using a multiplier,
5 is an RO that outputs the reciprocal of the divisor or the square root of the number to be squared when performing division or square root using a multiplier.
M, 6, 7, 9, 10, 11, 13, 14, 15 are registers for holding binary data, 8, 12 are registers for holding SD display data with redundancy, and 16 is data memory. And an external input / output unit.

これは、従来例を示した第3図の構成と異なり、乗算
器3及び演算回路4では内部論理に冗長度の存するSD表
示を用いており、乗算器3及び演算回路4を使用した演
算結果がデータメモリに送られる場合は、正負2つのデ
ータとして加減算器2に送られ減算を行なって通常の2
進のデータに変換してからデータメモリに送る。また乗
算器3を用いた除算或いは開平において、繰り返し乗算
に冗長度の存するSD表示の特徴を生かすため、即ち乗算
結果を2進のデータに変換しないでそのまま次の乗算に
利用できるように、乗算器内部のリコード部を冗長度の
存するSD表示に適応させ、加えてレジスタ8,12を冗長度
の存するSD表示に適応させることによって、上記内部論
理の特徴を生かすようなデータパス構成(1つの冗長度
の存するSD表示のデータは2つのデータパスを使用す
る。)となっている。
This is different from the configuration shown in FIG. 3 which shows the conventional example, in which the multiplier 3 and the arithmetic circuit 4 use the SD display with redundancy in the internal logic, and the arithmetic result using the multiplier 3 and the arithmetic circuit 4 is used. Is sent to the adder / subtractor 2 as positive / negative two data to perform subtraction, and the
And then send it to the data memory. In addition, in the division or square root using the multiplier 3, in order to make use of the feature of SD display having redundancy in the repetitive multiplication, that is, the multiplication result is not converted to binary data and can be used as it is for the next multiplication. By adapting the internal recoding unit to the SD display with redundancy and by adapting the registers 8 and 12 to the SD display with redundancy, a data path configuration (one SD display data having redundancy uses two data paths.)

以下、データの流れについて詳細に説明する。 Hereinafter, the data flow will be described in detail.

まず加減算を行なう場合、データメモリ1からレジス
タ6及びレジスタ7にデータが取り込まれ、レジスタ6
とレジスタ7から2つのデータが2進体系で加減算器2
に入力される。ここで通常の2進体系による演算処理が
行われた後、その結果が2進体系でレジスタ11に書き込
まれデータメモリ1に送られる。
First, when performing addition / subtraction, data is fetched from the data memory 1 into the registers 6 and 7 and
And two data from the register 7 in a binary system with an adder / subtracter 2
Is input to Here, after the arithmetic processing in the ordinary binary system is performed, the result is written in the register 11 in the binary system and sent to the data memory 1.

次に乗算を行なう場合、データメモリ1からレジスタ
8及びレジスタ9にデータが取り込まれ、レジスタ8と
レジスタ9から2つのデータが2進体系で乗算器3に入
力される。ここでレジスタ8は冗長度の存するSD表示に
適応したレジスタであるから、テータメモリ1やROM5か
ら2進のデータがくるとき、乗算器3に入力されるデー
タの負の値を表わすビットは0になる。入力された2つ
のデータは乗算器3の内部で冗長度の存するSD表示によ
る演算処理が行なわれた後その結果が演算回路4(乗算
モード)を通ってレジスタ12に冗長度の存するSD表示の
ままで保持される。その後正負の2つのデータとして2
進体系でレジスタ6及びレジスタ7に取り込まれて加減
算器2に入力される。ここで通常の2進体系による減算
処理(冗長度の存するSD表示から2進表示のデータに変
換)が行なわれた後、乗算の結果が2進体系でレジスタ
11に書き込まれデータメモリ1に送られる。ここで加減
算器及び乗算器に要する演算時間をそれぞれ1マシンサ
イクルとすると、乗算の場合は2サイクルの演算時間が
必要となる。
Next, when performing multiplication, data is taken into the register 8 and the register 9 from the data memory 1, and two data from the register 8 and the register 9 are input to the multiplier 3 in a binary system. Here, since the register 8 is a register adapted to the SD display having redundancy, when binary data comes from the data memory 1 or the ROM 5, the bit representing the negative value of the data input to the multiplier 3 is 0. become. The two input data are subjected to arithmetic processing by the SD display with redundancy inside the multiplier 3 and the result is passed through the arithmetic circuit 4 (multiplication mode) to the register 12 where the SD display with redundancy is displayed. It is kept as it is. Then, as two positive and negative data, 2
The data is taken into the register 6 and the register 7 in a hexadecimal system and input to the adder / subtractor 2. After performing the subtraction process (converting from SD display with redundancy to binary display data) using the ordinary binary system, the result of the multiplication is registered in the binary system.
11 is sent to the data memory 1. Here, assuming that the operation time required for the adder / subtracter and the multiplier is one machine cycle, two cycles of operation time are required for multiplication.

さらに除算を行なう場合、除算第1ステップでは、デ
ータメモリ1から2つのデータが出力され、被除数はレ
ジスタ14に除数はレジスタ10及びレジスタ15に取り込ま
れ、レジスタ10から2進体系でROM5にデータが入力され
る。ここではレジスタ10のデータの逆数がROM5より読み
出されレジスタ13に書き込まれる。除算第2ステップで
は、レジスタ13のデータとレジスタ15のデータがレジス
タ8とレジスタ9に取り込まれ2進体系で乗算器3に入
力されて、 R0*Y という演算が冗長度の存するSD表示により行なわれ、そ
の結果が演算回路4で 2−R0Y [ はその結果が冗長度の存するSD表示であるこ
を示す。]のように処理され(除算モード)、レジスタ
12に冗長度の存するSD表示のままで保持される。除算第
3ステップでは、レジスタ12のデータとレジスタ13のデ
ータがレジスタ8とレジスタ9に取り込まれ、レジスタ
8からは冗長度の存するSD表示、レジスタ9からは2進
体系で乗算器3に入力され、 R0*(2−R0*Y)=R1 という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。除算第4ステップで
は、レジスタ12のデータとレジスタ15のデータがレジス
タ8とレジスタ9に取り込まれ、レジスタ8からは冗長
度の存するSD表示、レジスタ9からは2進体系で乗算器
3に入力され、 Ri *Y という演算が冗長度の存するSD表示により行なわれ、そ
の結果が演算回路4で 2−Ri *Y のように処理され(除算モード)、レジスタ12に冗長度
の存するSD表示のままで保持される。この動作と並行し
て、レジスタ12からのデータは正負の2つのデータとし
て2進体系でレジスタ6及びレジスタ7に取り込まれて
加減算器2に入力される。ここで通常の2進体系による
減算処理(冗長度の存するSD表示から2進表示のデータ
に変換)が行なわれた後、その結果が2進体系でレジス
タ11に書き込まれる。除算第5ステップでは、レジスタ
12のデータとレジスタ11のデータがレジスタ8とレジス
タ9に取り込まれ、レジスタ8からは冗長度の存するSD
表示、レジスタ9からは2進体系で乗算器3に入力さ
れ、 R1*(2−R1*Y)=R2 という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。除算第6ステップで
は、レジスタ12のデータとレジスタ15のデータがレジス
タ8とレジスタ9に取り込まれ、レジスタ8からは冗長
度の存するSD表示、レジスタ9からは2進体系で乗算器
3に入力され、 R2Y という演算が冗長度の存するSD表示により行なわれ、そ
の結果が演算回路4で 2−R2Y のように処理され(除算モード)、レジスタ12に冗長度
の存するSD表示のままで保持される。この動作と並行し
て、レジスタ12からのデータは正負の2つのデータとし
て2進体系でレジスタ6及びレジスタ7に取り込まれて
加減算器2に入力される。ここで通常の2進体系による
減算処理(冗長度の存するSD表示から2進表示のデータ
に変換)が行なわれた後、その結果が2進体系でレジス
タ11に書き込まれる。このように第4ステップから第5
ステップまでの繰り返し乗算を数回行なってROM5から読
み出した除数の逆数の精度を高め、最終の前のステップ
においてレジスタ12のデータとレジスタ14の被除数デー
タがレジスタ8とレジスタ9に取り込まれ、レジスタ8
からは冗長度の存するSD表示、レジスタ9からは2進体
系で乗算器3に入力されて Ri *X という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。最終ステップでは、
レジスタ12からのデータは正負の2つのデータとして2
進体系でレジスタ6及びレジスタ7に取り込まれて加減
算器2に入力される。ここで通常の2進体系による減算
処理(冗長度の存するSD表示から2進表示のデータに変
換)が行なわれた後、その結果が2進体系でレジスタ11
に書き込まれデータメモリ1に送られる。
When performing further division, in the first step of division, two data are output from the data memory 1, the dividend is stored in the register 14, the divisor is captured in the register 10 and the register 15, and the data is stored in the ROM 5 in a binary system from the register 10. Is entered. Here, the reciprocal of the data in the register 10 is read from the ROM 5 and written into the register 13. Divided by the second step, the data of the data and the register 15 of the register 13 is inputted to the multiplier 3 in binary systems incorporated in the register 8 and the register 9, the SD display operation that R 0 * Y is presence of redundancy And the result is calculated by the arithmetic circuit 4 as 2-R 0 * Y [ Indicates that the result is an SD display with redundancy. ] (Divide mode) and register
The SD display with redundancy in 12 is kept as it is. In the third step of the division, the data of the register 12 and the data of the register 13 are taken into the registers 8 and 9, the SD display with redundancy is provided from the register 8, and the data is inputted to the multiplier 3 from the register 9 in a binary system. , R 0 * ( 2−R 0 * Y ) = R 1 is performed by the SD display with redundancy, and is passed through the arithmetic circuit 4 (multiplication mode) to the register 12 while the SD display with redundancy remains as it is. Will be retained. In the fourth step of division, the data of the register 12 and the data of the register 15 are fetched into the registers 8 and 9, and the SD display with redundancy exists from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. , R i * Y are performed by the SD display with redundancy, and the result is processed in the arithmetic circuit 4 as 2- R i * Y (divide mode), and the SD display with redundancy in the register 12 is performed. It is kept as it is. In parallel with this operation, the data from the register 12 is taken into the register 6 and the register 7 in a binary system as two data of positive and negative, and is inputted to the adder / subtractor 2. Here, after a subtraction process (conversion from SD display with redundancy) to binary display data is performed in a normal binary system, the result is written into the register 11 in a binary system. In the fifth step of division, register
The data of the register 12 and the data of the register 11 are taken into the register 8 and the register 9, and the SD from which the redundancy exists
The display and the register 9 are input to the multiplier 3 in a binary system, and the operation of R 1 * ( 2-R 1 * Y ) = R 2 is performed by the SD display with redundancy, and the operation circuit 4 (multiplication mode ) Is stored in the register 12 as the SD display with redundancy. In the sixth division step, the data in the register 12 and the data in the register 15 are fetched into the registers 8 and 9, and the SD display with redundancy is input from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. , R 2 * Y are performed by the SD display with redundancy, and the result is processed in the arithmetic circuit 4 as in 2- R 2 * Y (division mode), and the SD display with redundancy is displayed in the register 12. It is kept as it is. In parallel with this operation, the data from the register 12 is taken into the register 6 and the register 7 in a binary system as two data of positive and negative, and is inputted to the adder / subtractor 2. Here, after a subtraction process (conversion from SD display with redundancy) to binary display data is performed in a normal binary system, the result is written into the register 11 in a binary system. Thus, from the fourth step to the fifth
The repetition of the divisor read from the ROM 5 is repeated several times to increase the precision of the reciprocal of the divisor. In the last previous step, the data of the register 12 and the dividend data of the register 14 are taken into the registers 8 and 9, and
From the register, an SD display with redundancy is input. The register 9 is input to the multiplier 3 in a binary system, and an operation of R i * X is performed by the SD display with redundancy, and passes through the arithmetic circuit 4 (multiplication mode). Therefore, the SD display with redundancy is held in the register 12 as it is. In the final step,
The data from the register 12 is 2 as positive and negative data.
The data is taken into the register 6 and the register 7 in a hexadecimal system and input to the adder / subtractor 2. Here, after a subtraction process (conversion from SD display with redundancy) to binary display data is performed in a normal binary system, the result is stored in a register 11 in a binary system.
And sent to the data memory 1.

また開平を行なう場合、開平第1ステップでは、デー
タメモリ1からデータが出力され、そのデータはレジス
タ10とレジスタ15に取り込まれ、レジスタ10から2進体
系でROM5にデータが入力される。ここではレジスタ10の
データの平方根の逆数がROM5より読み出されレジスタ13
に書き込まれる。開平第2ステップでは、レジスタ13の
データとレジスタ15のデータがレジスタ8とレジスタ9
に取り込まれ2進体系で乗算器3に入力されて、 R0*Y という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。開平第3ステップで
は、レジスタ12のデータとレジスタ13のデータがレジス
タ8とレジスタ9に取り込まれ、レジスタ8からは冗長
度の存するSD表示、レジスタ9からは2進体系で乗算器
3に入力されて R0R0*Y という演算が冗長度の存するSD表示により行なわれ、そ
の結果が演算回路4で、 (3−R0 2*Y)/2 のように処理され(開平モード)、レジスタ12に冗長度
の存するSD表示のままで保持される。開平第4ステップ
では、レジスタ12のデータとレジスタ13のデータがレジ
スタ8とレジスタ9に取り込まれ、レジスタ8からは冗
長度の存するSD表示、レジスタ9からは2進体系で乗算
器3に入力されて R0(3−R0 2*Y)/2R1 という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。開平第5ステップで
は、レジスタ12のデータとレジスタ15のデータがレジス
タ8とレジスタ9に取り込まれ、レジスタ8からは冗長
度の存するSD表示、レジスタ9からは2進体系で乗算器
3に入力されて R1 *Y という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。この動作と並行し
て、レジスタ12からのデータは正負の2つのデータとし
て2進体系でレジスタ6及びレジスタ7に取り込まれて
加減算器2に入力される。ここで通常の2進体系による
減算処理(冗長度の存するSD表示から2進表示のデータ
に変換)が行なわれた後、その結果が2進体系でレジス
タ11に書き込まれる。開平第6ステップでは、レジスタ
12のデータとレジスタ11のデータがレジスタ8とレジス
タ9に取り込まれ、レジスタ8からは冗長度の存するSD
表示、レジスタ9からは2進体系で乗算器3に入力さ
れ、 R1R1Y という演算が冗長度の存するSD表示により行なわれ、そ
の結果が演算回路4で (3−R1 2 *Y)/2 のように処理され(開平モード)、レジスタ12に冗長度
の存するSD表示のままで保持される。開平第7ステップ
では、レジスタ12のデータとレジスタ11のデータがレジ
スタ8とレジスタ9に取り込まれ、レジスタ8からは冗
長度の存するSD表示、レジスタ9からは2進体系で乗算
器3に入力されて R1(3−R1 2*Y)/2R2 という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。開平第8ステップで
は、レジスタ12のデータとレジスタ15のデータがレジス
タ8とレジスタ9に取り込まれ、レジスタ8からは冗長
度の存するSD表示、レジスタ9からは2進体系で乗算器
3に入力されて R2 *Y という演算が冗長度の存するSD表示により行なわれ、演
算回路4(乗算モード)を通ってレジスタ12に冗長度の
存するSD表示のままで保持される。この動作と並行し
て、レジスタ12からのデータは正負の2つのデータとし
て2進体系でレジスタ6及びレジスタ7に取りまれて加
減算器2に入力される。ここで通常の2進体系による減
算処理(冗長度の存するSD表示から2進表示のデータに
変換)が行なわれた後、その結果が2進体系でレジスタ
11に書き込まれる。このように第5ステップから第7ス
テップまでの繰り返し乗算を数回行なってROM5から読み
出した開平する数の平方根の逆数の精度を高め、最終の
前のステップにおいてレジスタ12のデータとレジスタ15
のデータがレジスタ8とレジスタ9に取り込まれ、レジ
スタ8からは冗長度の存するSD表示、レジスタ9からは
2進体系で乗算器3に入力されて Ri *Y のように処理された後、演算回路4(乗算モード)を通
ってレジスタ12に冗長度の存するSD表示のままで保持さ
れる。最終ステップでは、レジスタ12からのデータは正
負の2つのデータとして2進体系でレジスタ6及びレジ
スタ7に取り込まれて加減算器2に入力される。ここで
通常の2進体系による減算処理(冗長度の存するSD表示
から2進表示のデータに変換)が行なわれた後、その結
果が2進体系でレジスタ11に書き込まれデータメモリ1
に送られる。
When square rooting is performed, in the square rooting first step, data is output from the data memory 1, the data is fetched into the registers 10 and 15, and the data is input from the register 10 to the ROM 5 in a binary system. Here, the reciprocal of the square root of the data in register 10 is read from ROM 5 and
Is written to. In the second square root step, the data in the register 13 and the data in the register 15 are
Is input to the multiplier 3 in a binary system, an operation of R 0 * Y is performed by the SD display with redundancy, and the SD with redundancy is stored in the register 12 through the arithmetic circuit 4 (multiplication mode). It is kept as displayed. In the third step of the square root, the data of the register 12 and the data of the register 13 are fetched into the registers 8 and 9, the SD display with redundancy is input from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. The operation R 0 * R 0 * Y is performed by the SD display with redundancy, and the result is processed by the arithmetic circuit 4 as (3- R 0 2 * Y ) / 2 (open square mode), The SD display with redundancy is kept in the register 12 as it is. In the fourth step of the square root, the data of the register 12 and the data of the register 13 are taken into the registers 8 and 9, the SD display with redundancy is provided from the register 8, and the data is inputted to the multiplier 3 from the register 9 in a binary system. The operation of R 0 * (3-R 0 2 * Y) / 2 = R 1 is performed by the SD display with redundancy, and the SD display with redundancy in the register 12 through the arithmetic circuit 4 (multiplication mode). It is kept as it is. In the fifth step of the square root, the data of the register 12 and the data of the register 15 are fetched into the registers 8 and 9, the SD display with redundancy is input from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. The operation of R 1 * Y is performed by the SD display with the redundancy, and is passed through the arithmetic circuit 4 (multiplication mode) and held in the register 12 as the SD display with the redundancy. In parallel with this operation, the data from the register 12 is taken into the register 6 and the register 7 in a binary system as two data of positive and negative, and is inputted to the adder / subtractor 2. Here, after a subtraction process (conversion from SD display with redundancy) to binary display data is performed in a normal binary system, the result is written into the register 11 in a binary system. In the sixth step of Kaiping, register
The data of the register 12 and the data of the register 11 are taken into the register 8 and the register 9, and the SD from which the redundancy exists
The register 9 is input from the register 9 to the multiplier 3 in a binary system, and the operation of R 1 * R 1 * Y is performed by SD display with redundancy, and the result is calculated by the arithmetic circuit 4 as (3- R 1 2 * Y) / 2 (square root mode), and the SD display with redundancy is kept in the register 12 as it is. In the seventh square root step, the data of the register 12 and the data of the register 11 are fetched into the registers 8 and 9, the SD display with redundancy is input from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. Te done by R 1 * (3-R 1 2 * Y) / 2 = SD display operation that R 2 is presence of redundancy, the ALU 4 (multiply mode) the through with SD display that exist redundancy in the register 12 It is kept as it is. In the eighth square root step, the data of the register 12 and the data of the register 15 are fetched into the registers 8 and 9, the SD display with redundancy is input from the register 8, and the data is input to the multiplier 3 from the register 9 in a binary system. The operation of R 2 * Y is performed by the SD display with redundancy, and is passed through the arithmetic circuit 4 (multiplication mode) and is retained in the register 12 as the SD display with redundancy. In parallel with this operation, the data from the register 12 is taken into the register 6 and the register 7 in a binary system as two data of positive and negative, and is inputted to the adder / subtractor 2. Here, after performing the subtraction processing (converting from SD display with redundancy to binary display data) using the normal binary system, the result is stored in the binary system.
Written to 11. In this way, the repetition of the fifth step to the seventh step is repeated several times to increase the accuracy of the reciprocal of the square root of the square root of the square root to be read out from the ROM 5, and the data of the register 12 and the register 15
Is input to the registers 8 and 9, the SD display with redundancy exists from the register 8, and the data is input to the multiplier 3 in a binary system from the register 9 and processed as R i * Y. The data is passed through the arithmetic circuit 4 (multiplication mode) and stored in the register 12 in the SD display with redundancy. In the final step, the data from the register 12 is taken into the register 6 and the register 7 in a binary system as two data of positive and negative, and is inputted to the adder / subtractor 2. Here, after a subtraction process (conversion from SD display with redundancy) to binary display data is performed in a normal binary system, the result is written in a register 11 in a binary system and the data is stored in the data memory 1.
Sent to

データ入出力部16は、データメモリ1と外部とのデー
タの入出力を行なう。
The data input / output unit 16 inputs and outputs data between the data memory 1 and the outside.

ここで、内部論理として冗長度の存するSD表示を用い
て除算或いは開平を行なうときに使用される演算回路に
ついて説明する。除算は前記したようにROMから読み出
した除数Yの逆数R0を用いて、 Ri=Ri-1*(2−Ri-1*Y) という演算を繰り返して除数の逆数の精度を高めるので
あるが、Yを正規化された値とし、ROMから読み出した
値を R0=1/Y±a (但し、1≦Y<2,a≦2-nとする。) として処理を追って考えると、演算回路4に入力される
データは、 の結果であり、それぞれ1に近い値(この場合、誤差は
2-n以下)をとる。演算回路4に入力される1に近い値
を冗長度の存するSD表示で表現すると数多く存在する
が、21の位以下に注目すると 000.11111 000.00000 010. 01.00000 10. 1.00000 (但し、は−1) の6つに限られる。1ビットを符号ビットと絶対値ビッ
トで表わす冗長度の存するSD表示の場合、上記の値につ
いて2からの引き算を考えると非常に簡単に引き算値を
表わすことができる。即ち、21の位のビットについて絶
対値ビットの論理を反転(0−−>1または1−−>
0)し、20の位以下のビットについては符号ビットの論
理を反転(0−−>1または1−−>0)することで引
き算値から得られる。例えば、上記6つの値の2からの
引き算値は 1. 1. 0.11111 01. 0.11111 01. となり、各位のビットは次のように表わされる。
Here, a description will be given of an arithmetic circuit used when performing division or square root using SD display having redundancy as internal logic. The division uses the reciprocal R 0 of the divisor Y read from the ROM as described above, and repeats the operation of R i = R i-1 * (2-R i-1 * Y) to increase the precision of the reciprocal of the divisor. However, Y is assumed to be a normalized value, and the value read from the ROM is considered as R 0 = 1 / Y ± a (where 1 ≦ Y <2, a ≦ 2- n ). And the data input to the arithmetic circuit 4 are: Which are values close to 1 (in this case, the error is
2 -n or less). There are many Expressing a value close to 1, which is input to the arithmetic circuit 4 in SD display that exist redundancy but, paying attention to two ones place following 000.11111 000.00000 010. 01.00000 10. 1.00000 (where -1 ) Is limited to six. In the case of an SD display having redundancy in which one bit is represented by a sign bit and an absolute value bit, a subtraction value can be represented very easily by considering subtraction from 2 for the above value. That is, inverting the absolute value of the bit logic on 2 1 digit of bits (0 -> 1 or 1 ->
0), the position following bits of 2 0 inverts the logic of the sign bit (0 - obtained from subtraction value by> 0) -> 1 or 1. For example, the subtraction value of the above six values from 2 is: 1. 0.111111 01. 0.111111 01. The bits of each digit are represented as follows.

(頭文字はIが入力でOが出力、Sは符号ビット、A
は絶対値ビット、添え字は各位を表す。) 但し、21より上位のビットについては、演算回路4に
入力されるデータが前記のように1に近い値をとるの
で、この場合にのみ無視してもよいことになる。このよ
うに除算の際のROM5から出力された値の精度を高める場
合は、冗長度の存するSD表示のまま減算を行なうと非常
に簡単になる。
(The initials are I for input and O for output, S for sign bit, A
Is an absolute value bit, and a subscript represents each digit. ) However, the significant bits than 2 1, the data input to the arithmetic circuit 4 has a value close to 1 as described above, so that it may be ignored only in this case. In order to increase the accuracy of the value output from the ROM 5 at the time of division in this way, it is very easy to perform the subtraction while the SD display having redundancy exists.

また開平の場合も前記したようにROMから読み出した
開平する数Yの平方根の逆数R0を用いて、 Ri=Ri-1*(3−Ri-1 2*Y)/2 という演算を繰り返して開平する数の平方根の逆数の精
度を高めるのであるが、Yを正規化された値とし、ROM
から読み出した値を (但し、1≦Y<2,a≦2-2とする。) として処理を追って考えると、演算回路4に入力される
データは、 の結果であり、それぞれ1に近い値(この場合、誤差は
2-2n以下)をとる。開平の場合も減算回路4に入力され
る1に近い値を冗長度の存するSD表示で表現すると数多
く存在するが、21の位以下に注目すると除算の場合と同
じである。その6つの値の20の位以上について各ビット
を正に直すと、 00.11111 01.00000 10. 01.00000 10. 01.00000 となり、同じ値を除けば3つの値になる。これらの値に
ついて3からの引き算を考えると除算と同様に非常に簡
単に引き算値を表わすことができる。
And using the reciprocal R 0 of the square root of the number Y of No. read from the ROM as described above in the case of No., the arithmetic that R i = R i-1 * (3-R i-1 2 * Y) / 2 Is repeated to increase the accuracy of the reciprocal of the square root of the square root of the square root, but Y is a normalized value and ROM
The value read from (However, it is assumed that 1 ≦ Y <2, a ≦ 2 −2 ). Considering the processing as follows, the data input to the arithmetic circuit 4 is Which are values close to 1 (in this case, the error is
2 -2n or less). For No. also present numerous Expressed in SD display that exist redundancy a value close to 1, which is input to the subtraction circuit 4, but the same as for the division to focus on 2 1 place below. When positively fix the bits for 2 0 of positions over the six values would 00.11111 01.00000 10. 01.00000 10. Three values except 01.00000 becomes the same value. Considering the subtraction from 3 for these values, the subtraction value can be represented very simply as in the case of division.

即ち、21の位と20の位以下のビットについて絶対値ビ
ットの論理を反転(0−−>1または1−−>0)し、
2-1の位のビットについては符号ビットの論理を反転
(0−−>1または1−−>0)することで引き算値が
得られる。例えば、上記上から3つの値の3からの引き
算値は 11. 10. 01.11111 となる。演算回路4に入力される冗長度の存するSD表示
で表わされた1に近い6つの値から考えると、各位のビ
ットは次のように表わされる。
That is, 2 1 position and inverting the absolute value of the bit logic on position following bits of 2 0 (0 -> 1 or 1 -> 0),
For the 2 −1 bit, a subtraction value can be obtained by inverting the logic of the sign bit (0-> 1 or 1-> 0). For example, the subtraction value of 3 from the above three values is 11. 10. 01.11111. Considering six values near 1 which are input to the arithmetic circuit 4 and represented by the SD notation with redundancy, each bit is expressed as follows.

除算と同様、21より上位のビットについては、演算回
路4に入力されるデータが前記のように1に近い値をと
るので無視してもよいことになる。さらにその結果を2
で割るという操作は右に1ビットシフトするだけでよい
ので、結局、演算回路4に入力されるデータを3から引
き、さらにその結果を2で割るという操作は のように表わされる。
As with the division, for the upper bits than 2 1, the data inputted to the ALU 4 may be ignored because assumes a value close to 1 as described above. Furthermore, the result is 2
The operation of dividing by 1 only needs to be shifted to the right by one bit, so the operation of subtracting the data input to the arithmetic circuit 4 from 3 and further dividing the result by 2 is It is represented as

このように、除算の際に入力されるデータを2から引
くという処理と、開平の際に入力されるデータを3から
引き、さらにその結果を2で割るという処理を行なう演
算回路は第2図に示してあり、この回路の処理は乗算器
3と同じサイクルで行なうことが可能である。
As described above, the arithmetic circuit which performs the processing of subtracting the data input at the time of division from 2 and the processing of subtracting the data input at the time of square root from 3 and further dividing the result by 2 is shown in FIG. The processing of this circuit can be performed in the same cycle as the multiplier 3.

ここで加減算器及び乗算器に要する演算時間をそれぞ
れ1マシンサイクルとすると、除算を考えた場合、ROM
の精度にもよるがROMの精度を上げるために3回の繰り
返し乗算を行なうとすると、各サイクルにおいて、 1 Y −−>R0 2 2−R0*Y 3 R0*(2−R0*Y)=R1 4 2−R1 *Y 5 R1*(2−R1*Y)=R2 6 2−R2 *Y 7 R2*(2−R2*Y)=R3 8 R3 *X =Z 9 −−>Z のような演算を行なうこととなり、9サイクルの演算時
間が必要となる。
Here, assuming that the operation time required for the adder / subtracter and the multiplier is one machine cycle, when considering division, ROM
If Depending on the accuracy and repeating the multiplication 3 times to increase the accuracy of the ROM, in each cycle, 1 Y -> R 0 2 2-R 0 * Y 3 R 0 * (2-R 0 * Y) = R 1 4 2- R 1 * Y 5 R 1 * (2-R 1 * Y) = R 2 6 2- R 2 * Y 7 R 2 * (2-R 2 * Y) = R 3 8 R 3 * X = Z 9 Z -> will be performed operations such as Z, is required calculation time of 9 cycles.

また開平を考えた場合、ROMの精度にもよるがROMの精
度を上げるために3回の繰り返し乗算を行な うとす
ると、各サイクルにおいて、 1 Y −−>R0 2 R0*Y 3 (3−R0R0Y)/2 4 R0*(3−R0*R0*Y)/2R1 5 R1 *Y 6 (3−R1R1*Y)/2 7 R1*(3−R1*R1*Y)/2R2 8 R2 *Y 9 (3−R2R2*Y)/2 10 R2*(3−R2*R2*Y)/2R3 11 R3 *Y= 12 −−>Z のような演算を行なうこととなり、12サイクルの演算時
間が必要となる。
Also, considering square root, if it is attempted to repeat the multiplication three times in order to increase the accuracy of the ROM, depending on the accuracy of the ROM, then in each cycle, 1 Y-> R 0 2 R 0 * Y 3 ( 3-R 0 * R 0 * Y) / 2 4 R 0 * (3-R 0 * R 0 * Y) / 2 = R 1 5 R 1 * Y 6 (3-R 1 * R 1 * Y) / 2 7 R 1 * (3- R 1 * R 1 * Y) / 2 = R 2 8 R 2 * Y 9 (3-R 2 * R 2 * Y) / 2 10 R 2 * (3-R 2 * R 2 * Y) / 2 = R 3 11 R 3 * Y = Z 12 Z -> will be performed operations such as Z, are required 12 cycles of calculation time.

以上のように本実施例によれば、コンパクトで高速な
処理が可能である冗長度の存するSD表示を内部論理とし
て持つ乗算器によって、乗算或いは除算及び開平の際の
繰り返し乗算の演算時間を短くすることができ、マシン
サイクルを小さくすることができる。そして、除算及び
開平の際に用いる演算回路を前記に述べたような回路と
することによって、減算処理をその前のサイクルで乗算
と同時に行なうことが可能となり、繰り返し乗算を行な
う毎に1サイクルずつの演算時間が短縮されるために、
除算及び開平の演算時間が極めて短くなる。
As described above, according to the present embodiment, the multiplier and the multiplication unit having the SD display with redundancy as internal logic capable of high-speed processing can reduce the operation time of the multiplication or division and the repetitive multiplication in the square root. And the machine cycle can be reduced. By making the arithmetic circuit used for division and square root as described above, the subtraction process can be performed simultaneously with the multiplication in the previous cycle, and one cycle is performed each time the multiplication is repeatedly performed. Because the calculation time of
The calculation time of division and square root becomes extremely short.

このことから、少ないハードウェアで多種の演算を行
なうことができるのに加えて、各演算における演算時間
の短縮とともに、加減算、乗算に対する除算及び開平の
演算時間比が小さくなり、演算処理装置としてトータル
パフォーマンスの高いものとなる。
From this, in addition to being able to perform a variety of operations with a small amount of hardware, the operation time for each operation is reduced, and the operation time ratio of division for addition, subtraction, multiplication and square root is reduced. High performance.

なお本実施例においては、乗算器の内部論理として冗
長度の存するSD表示を用いているが、加減算器について
も冗長度の存するSD表示を内部論理とすることができる
ほか、演算処理装置としての構成も本実施例に限られた
ものではない。
In the present embodiment, the SD display with redundancy is used as the internal logic of the multiplier. However, the SD display with redundancy can be used as the internal logic for the adder / subtractor. The configuration is not limited to this embodiment.

発明の効果 以上説明したように本発明の第1の演算処理装置は、
符号付デジットによる数体系を用いた乗算手段を用いて
繰り返し乗算を用いた演算を行う場合、乗算手段の乗算
結果に対して、所定の演算を施した後は符号付デジット
による数体系を用いたデータであるが、このデータを2
進に変換することなくそのまま乗算手段に入力するた
め、その分、演算処理が短縮できる。
Effect of the Invention As described above, the first arithmetic processing device according to the present invention includes:
When performing an operation using repeated multiplication using a multiplying means using a signed digit number system, after performing a predetermined operation on the multiplication result of the multiplying means, a signed digit number system was used. Data.
Since the data is directly input to the multiplication means without being converted into a hexadecimal value, the arithmetic processing can be shortened accordingly.

また本発明の第2の演算処理装置は、入力されるデー
タから定数を引くという処理等を符号付デジットによる
数体系の特徴を生かしてビット操作により行ったため、
減算処理等を高速にできる。
Further, the second arithmetic processing device of the present invention performs a process such as subtracting a constant from input data by bit operation by utilizing the features of the numerical system using signed digits.
High-speed subtraction processing can be performed.

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

第1図は本発明の演算処理装置における実施例のブロッ
ク図、第2図は同装置における除算及び開平の際、乗算
と減算を同じサイクルで行なうことのできる演算回路の
回路図、第3図は従来の演算処理装置のブロック図であ
る。 1……データメモリ、2……加減算器、3……乗算器、
4……演算回路、5……ROM、6〜15……レジスタ、16
……データ入出力部。
FIG. 1 is a block diagram of an embodiment of an arithmetic processing unit according to the present invention, FIG. 2 is a circuit diagram of an arithmetic circuit capable of performing multiplication and subtraction in the same cycle during division and square root, and FIG. Is a block diagram of a conventional arithmetic processing device. 1 data memory, 2 adder / subtractor, 3 multiplier
4 arithmetic circuit, 5 ROM, 6 to 15 registers, 16
... Data input / output unit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 國信 茂郎 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 平1−266628(JP,A) インターフェース,11〔3〕 (昭 60.3),CQ出版,P.245 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Shigeo Kuninobu 1006 Kazuma Kadoma, Osaka Pref. Matsushita Electric Industrial Co., Ltd. (56) References JP-A-1-266628 (JP, A) Interface, 11 [ 3] (Showa 60.3), CQ Publishing, p. 245

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】第1の入力データ、第2の入力データのう
ち一方のデータが符号付デジットによる数体系を用いた
データである2数の入力データを入力し、前記数体系で
表現された乗算結果を出力する乗算手段と、 前記数体系で表現された乗算結果と第3の入力データを
演算し、前記数体系で表現された演算結果を出力する演
算手段とを備え、 前記数体系で表現された演算結果を前記数体系のまま前
記乗算手段の入力データとして入力することを特徴とす
る演算処理装置。
1. A method according to claim 1, wherein one of the first input data and the second input data receives two input data as data using a number system with a signed digit, and is represented by the number system. A multiplication unit that outputs a multiplication result; and a calculation unit that calculates the multiplication result expressed in the number system and third input data, and outputs an operation result expressed in the number system. An arithmetic processing apparatus characterized in that the expressed arithmetic result is input as input data of the multiplying means as it is in the numerical system.
【請求項2】前記演算手段が減算手段であり、前記第3
の入力データが定数であることを特徴とする特許請求の
範囲第1項記載の演算処理装置。
2. The method according to claim 1, wherein said calculating means is subtracting means, and said third means is a subtracting means.
2. The arithmetic processing device according to claim 1, wherein the input data is a constant.
【請求項3】前記数体系で表現されたデータが各桁が2
ビットで構成される冗長2進数体系で表現されたデータ
であることを特徴とする特許請求の範囲第1項または第
2項記載の演算処理装置。
3. The data expressed by the number system is 2 in each digit.
3. The arithmetic processing device according to claim 1, wherein the data is data expressed in a redundant binary number system composed of bits.
【請求項4】前記演算手段が、乗算結果を入力し、該乗
算結果を上位桁部分と下位桁部分の2つに分け、上位桁
部分は、前記2ビットの内の一方のビット、下位桁部分
は他方のビットにそれぞれビット操作を行う演算回路で
構成されることを特徴とする特許請求の範囲第3項記載
の演算処理装置。
4. The arithmetic means inputs a multiplication result and divides the multiplication result into an upper digit portion and a lower digit portion, wherein the upper digit portion is one of the two bits and the lower digit portion. 4. The arithmetic processing device according to claim 3, wherein the portion is configured by an arithmetic circuit that performs a bit operation on each of the other bits.
【請求項5】各桁が2ビットで構成される符号付デジッ
トによる数体系で表現されたデータを出力する第1の演
算手段と、 前記第1の演算手段から出力されるデータを入力し、上
位桁部分は前記2ビットの内一方のビットのみ論理反転
を行い、下位桁部分は他方のビットのみ論理反転を行
い、前記数体系で表現されたデータを出力する第2の演
算手段とを備えたことを特徴とする演算処理装置。
5. A first arithmetic means for outputting data expressed in a numerical system by a signed digit in which each digit is composed of 2 bits, and inputting data output from said first arithmetic means, A second arithmetic unit for performing a logical inversion on only one of the two bits in the upper digit portion and a logical inversion on the other bit only in the lower digit portion, and outputting data expressed in the numerical system; An arithmetic processing device, characterized in that:
【請求項6】前記第1の演算手段が乗算手段であること
を特徴とする特許請求の範囲第5項記載の演算処理装
置。
6. The arithmetic processing device according to claim 5, wherein said first arithmetic means is a multiplication means.
JP63301192A 1988-11-29 1988-11-29 Arithmetic processing unit Expired - Fee Related JP2705162B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63301192A JP2705162B2 (en) 1988-11-29 1988-11-29 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63301192A JP2705162B2 (en) 1988-11-29 1988-11-29 Arithmetic processing unit

Publications (2)

Publication Number Publication Date
JPH02146621A JPH02146621A (en) 1990-06-05
JP2705162B2 true JP2705162B2 (en) 1998-01-26

Family

ID=17893885

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63301192A Expired - Fee Related JP2705162B2 (en) 1988-11-29 1988-11-29 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP2705162B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4878190A (en) * 1988-01-29 1989-10-31 Texas Instruments Incorporated Floating point/integer processor with divide and square root functions
WO2001046796A1 (en) * 1999-12-22 2001-06-28 Wataru Ogata Computing system using newton-raphson method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4878190A (en) * 1988-01-29 1989-10-31 Texas Instruments Incorporated Floating point/integer processor with divide and square root functions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
インターフェース,11〔3〕 (昭60.3),CQ出版,P.245

Also Published As

Publication number Publication date
JPH02146621A (en) 1990-06-05

Similar Documents

Publication Publication Date Title
JP3244506B2 (en) Small multiplier
US6026421A (en) Apparatus for multiprecision integer arithmetic
US5132925A (en) Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction
JP2585649B2 (en) Division circuit
JPS61177538A (en) Position detection for highest-order numeral
JPS5948421B2 (en) Parity prediction circuit
JP2705162B2 (en) Arithmetic processing unit
JPH09222991A (en) Adding method and adder
JPH10187416A (en) Floating point arithmetic unit
US3417236A (en) Parallel binary adder utilizing cyclic control signals
US3462589A (en) Parallel digital arithmetic unit utilizing a signed-digit format
JP2605792B2 (en) Arithmetic processing unit
JP3315042B2 (en) Multiplier
JPH0370416B2 (en)
JPH09128213A (en) Block floating processing system/method
JP3129526B2 (en) Multiplication circuit over integers
JP2907276B2 (en) Arithmetic processing unit
JP3336986B2 (en) Signal processor and multiply-accumulate unit with rounding function used therefor
JPS6259828B2 (en)
JP3201097B2 (en) Multiplication prescription method in multiplier
SU1501052A1 (en) Function computing device
JPH0778748B2 (en) Galois field arithmetic unit
JPH05174050A (en) Series arithmetic unit
Wald et al. Simple instructions which enhance the error control capabilities of a programmed communications processor
JPH0635678A (en) Decimal dividing circuit

Legal Events

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