JPS6259811B2 - - Google Patents
Info
- Publication number
- JPS6259811B2 JPS6259811B2 JP57108771A JP10877182A JPS6259811B2 JP S6259811 B2 JPS6259811 B2 JP S6259811B2 JP 57108771 A JP57108771 A JP 57108771A JP 10877182 A JP10877182 A JP 10877182A JP S6259811 B2 JPS6259811 B2 JP S6259811B2
- Authority
- JP
- Japan
- Prior art keywords
- quotient
- divisor
- data
- addition
- processing section
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/491—Computations with decimal numbers radix 12 or 20.
- G06F7/4915—Multiplying; Dividing
- G06F7/4917—Dividing
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
Description
【発明の詳細な説明】
(A) 発明の技術分野
本発明は、データ処理装置、特に浮動小数点デ
ータに対する加減算処理部を有すると共に、浮動
小数点データに対する除算処理を行うデータ処理
装置において、除算処理に先立つて行う所の処
理、即ち被除数と除数との大小比較処理を、上記
加減算処理部がもつているオペランド比較回路に
よつて行わせるようにしたデータ処理装置に関す
るものである。Detailed Description of the Invention (A) Technical Field of the Invention The present invention relates to a data processing device, particularly a data processing device that has an addition/subtraction processing unit for floating point data and also performs division processing for floating point data. The present invention relates to a data processing device in which the processing previously performed, that is, the comparison processing of the size of a dividend and a divisor, is performed by an operand comparison circuit included in the addition/subtraction processing section.
(B) 技術の背景と問題点
浮動小数点データOP1とOP2との加減算におい
ては、(OP1)+(OP2)、(OP1)−(OP2)、(OP2)
+(OP1)、(OP2)−(OP1)の4通りの処理のい
ずれかとなり、出力が浮動小数点データとして出
力されることもあつて、減算が行われる場合には
上記データOP1とOP2との夫々の絶対値のより大
きい側から、絶対値の小さい側を減算することが
必要である。このために、そのような加減算処理
部においては、データOP1とOP2との夫々の絶対
値を比較するオペランド比較回路をそなえてい
る。(B) Technical background and problems When adding and subtracting floating point data OP1 and OP2, (OP1) + (OP2), (OP1) - (OP2), (OP2)
+ (OP1), (OP2) - (OP1), the output may be output as floating point data, and when subtraction is performed, the above data OP1 and OP2 It is necessary to subtract the smaller absolute value from the larger absolute value of each. For this purpose, such an addition/subtraction processing section is provided with an operand comparison circuit that compares the respective absolute values of data OP1 and OP2.
なお一般に除算においては、商算出の前に除数
と被除数とを比較して、商のビツト数(或いは桁
数)を決定して後に、それに見合うサイクル数だ
け演算を行うようにされる。 In general, in division, the divisor and dividend are compared before calculating the quotient to determine the number of bits (or number of digits) of the quotient, and then the calculation is performed for the corresponding number of cycles.
第2図は、被除数が倍精度データである場合と
単精度データである場合とで、求めるべき商のビ
ツト数をまとめて表わした説明図である。被除数
や除数の仮数部は4ビツトをもつて1桁の数値を
表わしていることから、除数の最上位桁として、
パターン「1***」、「01**」「001*」、
「0001」のいずれかのパターンがあり得る(正規
化数の場合には「0000」は存在しない)が、それ
らのパターンに対応して商Qが値「1」以上の場
合と値「1」以下の場合とで、図示の如く商とし
て求めるべき桁数が異なつたものとなる。 FIG. 2 is an explanatory diagram illustrating the number of bits of the quotient to be obtained for cases where the dividend is double precision data and when the dividend is single precision data. Since the mantissa of the dividend or divisor has 4 bits and represents a 1-digit number, the most significant digit of the divisor is
Pattern “1***”, “01**”, “001*”,
There can be any pattern of "0001"("0000" does not exist in the case of normalized numbers), but corresponding to these patterns, there are cases where the quotient Q is greater than or equal to the value "1" and the value "1". As shown in the figure, the number of digits to be obtained as a quotient differs depending on the following cases.
このために、除算処理に当つては、商が値
「1」以上となる場合と、値「1」以下となる場
合とで処理モードを切分けることが行われる。 For this reason, in the division process, processing modes are divided into cases where the quotient is greater than or equal to the value "1" and cases where the quotient is less than or equal to the value "1".
従来、このような処理モードの切分けには次の
如き方法が知られている。即ち、
(1) フアームウエアによつて(被除数−除数)の
演算を行つて、切分ける。 Conventionally, the following methods are known for separating processing modes. That is, (1) Calculate (dividend - divisor) using firmware and divide.
(2) 予め、値「1」以下となるものと仮定して除
算を行い、演算後に値「1」以上か否かを判定
して桁シフトを行う。(2) In advance, division is performed assuming that the value is less than or equal to "1", and after the calculation, it is determined whether or not the value is greater than or equal to "1", and digit shift is performed.
などの方法が知られている。Methods such as these are known.
しかし、前者(1)の方法の場合、例えば上述の除
倍数生成中に基本部加算器を用いて(被除数−除
数)を実行してみるものであるが、次の如き難点
が存在する。即ち
(a) 通常の場合、基本部加算器は、浮動小数点演
算を行うだけのデータ幅をもたないために、演
算時間が大となる。 However, in the case of the former method (1), for example, the basic part adder is used to execute (dividend minus divisor) during the above-mentioned divisor generation, but there are the following difficulties. That is, (a) In normal cases, the basic adder does not have enough data width to perform floating point calculations, so the calculation time is long.
(b) 前処理(除倍数生成中)に上記基本部演算が
終了しなかつた場合、商カウンタを設定し直し
て、再度被除数を設定し、最初から商算出サイ
クルをやり直す必要がある。(b) If the above basic calculation is not completed during preprocessing (while generating the divisor), it is necessary to reset the quotient counter, set the dividend again, and restart the quotient calculation cycle from the beginning.
また上記後者(2)の方法の場合には、商が値
「1」以上でも以下でも、同等のサイクル数をも
つて商を求めようとするものであるが、次の如き
難点が存在する。即ち、
(c) 値「1」以上であつた場合には、1桁分即ち
4ビツト分の商算出サイクル(最低2サイク
ル)の不要サイクルが実行される形となる。 In the case of the latter method (2), the quotient is calculated using the same number of cycles regardless of whether the quotient is greater than or equal to the value "1", but there are the following difficulties. That is, (c) if the value is "1" or more, unnecessary cycles of quotient calculation cycles (minimum 2 cycles) for 1 digit, that is, 4 bits are executed.
(d) 値「1」以上の分について商レジスタを例え
ば4ビツト分余分にもつことが必要となる。(d) It is necessary to have an extra quotient register of, for example, 4 bits for the value "1" or more.
(C) 発明の目的と構成
本発明は上記の点を解決することを目的として
おり、本発明のデータ処理装置は、浮動小数点デ
ータに対する加減算処理部を有して当該加減算処
理部において2つのオペランド・データの大小関
係をチエツクするオペランド比較回路を有すると
共に、浮動小数点データの除算処理を実行する除
算処理部を有するデータ処理装置において、該加
減算処理部のオペランド比較回路による比較結果
と除数最上位桁の値と演算精度とにもとづいて商
ビツト数を求め、当該商ビツト数にもとづいて上
記除算処理部による加減算サイクル数を制御する
ようにしたことを特徴としている。以下図面を参
照しつつ説明する。(C) Object and Structure of the Invention The object of the present invention is to solve the above-mentioned problems, and the data processing device of the present invention has an addition/subtraction processing section for floating point data, and processes two operands in the addition/subtraction processing section. - In a data processing device that has an operand comparison circuit that checks the magnitude relationship of data and also has a division processing section that executes division processing of floating point data, the comparison result by the operand comparison circuit of the addition/subtraction processing section and the most significant digit of the divisor. The invention is characterized in that the number of quotient bits is obtained based on the value of and the calculation precision, and the number of addition/subtraction cycles by the division processing section is controlled based on the number of quotient bits. This will be explained below with reference to the drawings.
(D) 発明の実施例
第3図は本発明の一実施例構成を示している。
図中1は除算処理部、2は本発明にいうオペラン
ド比較回路であつて既存の加減算処理部内に存在
しているもの、3,4は夫々オペランド・レジス
タ、5は演算バツフア、6は除倍数生成器、7は
除算処理制御部、8は加減算器(基本加算器)、
9は除算剰余レジスタ、10は除倍数レジスタ、
11は剰余シフタ、13は商生成器、14は商カ
ウンタ(演算サイクル・カウンタ)、15は商保
持レジスタ、16,17は夫々選択回路を表わし
ている。(D) Embodiment of the invention FIG. 3 shows the configuration of an embodiment of the invention.
In the figure, 1 is a division processing unit, 2 is an operand comparison circuit according to the present invention, which is present in the existing addition/subtraction processing unit, 3 and 4 are operand registers, 5 is an arithmetic buffer, and 6 is a divisor. generator; 7 is a division processing control unit; 8 is an adder/subtractor (basic adder);
9 is the division remainder register, 10 is the division multiple register,
11 is a remainder shifter, 13 is a quotient generator, 14 is a quotient counter (operation cycle counter), 15 is a quotient holding register, and 16 and 17 are selection circuits, respectively.
被除数OP1と除数OP2とが夫々オペランド・レ
ジスタ3と4とにセツトされたとき、夫々のオペ
ランドの最上桁がオペランド比較回路2に導びか
れ、商Qが、Q≧1であるかQ<1であるかがチ
エツクされる。 When the dividend OP1 and the divisor OP2 are set in operand registers 3 and 4, respectively, the most significant digit of each operand is led to the operand comparison circuit 2, and the quotient Q is determined whether Q≧1 or Q<1. It is checked whether the
一方、除数OP2は、除倍数生成器6を介して
シフトされ、加減算器8を通つて、除倍数レジス
タ10内に除倍数値を生成する。 On the other hand, the divisor OP2 is shifted through the divisor generator 6, passes through the adder/subtractor 8, and generates a divisor value in the divisor register 10.
この状態のもとで、被除数OP1からレジスタ1
0中の除倍数の選ばれた1つを加減算器8を介し
て減算し、その結果がレジスタ9にセツトされ
る。以下周知の如く加減算処理が繰返され、商カ
ウンタ14が終了を指示するまで繰返されてゆ
く。即ち商Qが≧1であるかQ<1であるかと、
除数最上位桁の値と演算精度とにもとづいて商ビ
ツト数が求まり、この商ビツト数にもとづいてそ
れに見合うサイクル数だけ演算を行うようにされ
る。換言すれば、この回数が、上記オペランド比
較回路2による比較結果によつて制御される。 Under this condition, from dividend OP1 to register 1
A selected one of the divisors among 0 is subtracted via the adder/subtractor 8, and the result is set in the register 9. Thereafter, as is well known, the addition and subtraction processing is repeated until the quotient counter 14 instructs the end. In other words, whether the quotient Q is ≧1 or Q<1,
The number of quotient bits is determined based on the value of the most significant digit of the divisor and the calculation precision, and based on this number of quotient bits, calculations are performed for the corresponding number of cycles. In other words, this number of times is controlled by the comparison result by the operand comparison circuit 2 described above.
(E) 発明の効果
以上説明した如く、本発明によれば、上記従来
の方法の場合にくらべて、基本部加算器を用い
て演算を行う必要がないのでその分のフアームウ
エアが不要となり、かつ商算出サイクルをやり直
す必要がなくなり実行時間にロスがない。また上
述の従来の方法の場合にくらべて、商が値
「1」以上であつた場合に最低2サイクル分節約
でき、かつ商レジスタの桁数を実質上増大する必
要がない。(E) Effects of the Invention As explained above, according to the present invention, compared to the above-mentioned conventional method, there is no need to perform calculations using a basic adder, so no firmware is required. Moreover, there is no need to repeat the quotient calculation cycle, so there is no loss in execution time. Furthermore, compared to the conventional method described above, at least two cycles can be saved when the quotient is greater than or equal to the value "1", and there is no need to substantially increase the number of digits in the quotient register.
第1図は浮動小数点データを説明する説明図、
第2図は商決定に必要とする桁数を説明する説明
図、第3図は本発明の一実施例構成を示す。
図中、1は除算処理部、2はオペランド比較回
路、3,4は夫々オペランド・レジスタ、6は除
倍数生成器、8は加減算器、9は除算剰余レジス
タ、10は除倍数レジスタ、11は剰余シフタ、
13は商生成器、14は商カウンタ、15は商保
持レジスタを表わす。
Figure 1 is an explanatory diagram explaining floating point data.
FIG. 2 is an explanatory diagram for explaining the number of digits required for determining the quotient, and FIG. 3 shows the configuration of an embodiment of the present invention. In the figure, 1 is a division processing unit, 2 is an operand comparison circuit, 3 and 4 are operand registers, 6 is a divisor generator, 8 is an adder/subtractor, 9 is a division remainder register, 10 is a divisor register, and 11 is a divisor remainder shifter,
13 represents a quotient generator, 14 represents a quotient counter, and 15 represents a quotient holding register.
Claims (1)
して当該加減算処理部において2つのオペラン
ド・データの大小関係をチエツクするオペランド
比較回路を有すると共に、浮動小数点データの除
算処理を実行する除算処理部を有するデータ処理
装置において、該加減算処理部のオペランド比較
回路による比較結果と除数最上位桁の値と演算精
度とにもとづいて商ビツト数を求め当該商ビツト
数にもとづいて上記除算処理部による加減算サイ
クル数を制御するようにしたことを特徴とするデ
ータ処理装置。1. Data that has an addition/subtraction processing section for floating point data, an operand comparison circuit that checks the magnitude relationship between two operand data in the addition/subtraction processing section, and a division processing section that executes division processing of the floating point data. In the processing device, the number of quotient bits is determined based on the comparison result by the operand comparison circuit of the addition/subtraction processing section, the value of the most significant digit of the divisor, and the calculation precision, and the number of addition/subtraction cycles by the division processing section is determined based on the number of quotient bits. A data processing device characterized in that it is controlled.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57108771A JPS58225435A (en) | 1982-06-24 | 1982-06-24 | Data processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57108771A JPS58225435A (en) | 1982-06-24 | 1982-06-24 | Data processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58225435A JPS58225435A (en) | 1983-12-27 |
| JPS6259811B2 true JPS6259811B2 (en) | 1987-12-12 |
Family
ID=14493068
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57108771A Granted JPS58225435A (en) | 1982-06-24 | 1982-06-24 | Data processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58225435A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS53112627A (en) * | 1977-03-14 | 1978-10-02 | Toshiba Corp | Division control system |
-
1982
- 1982-06-24 JP JP57108771A patent/JPS58225435A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58225435A (en) | 1983-12-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3418460B2 (en) | Double precision division circuit and method | |
| US4594680A (en) | Apparatus for performing quadratic convergence division in a large data processing system | |
| JPH0368416B2 (en) | ||
| JPH0477932B2 (en) | ||
| JPH05250146A (en) | Arithmetic operation circuit executing integer involution processing | |
| JPS6259811B2 (en) | ||
| JP2006228190A (en) | Data processing apparatus and method for generating result value by performing reciprocal operation on input value | |
| JPH0578049B2 (en) | ||
| US5208769A (en) | Unsigned integer multiply/divide circuit | |
| JP2608090B2 (en) | High radix non-restoring divider | |
| JPH0797312B2 (en) | Arithmetic unit | |
| KR100251547B1 (en) | Digital Sgnal Processor | |
| JPS63279321A (en) | Microprogram controller | |
| JP2607759B2 (en) | Divider | |
| JP2903529B2 (en) | Vector operation method | |
| JPS59116852A (en) | High-speed divider | |
| JPS6129020B2 (en) | ||
| JPH04160533A (en) | Microprocessor | |
| JPH0435777B2 (en) | ||
| JPH03150631A (en) | Decimal dividing circuit | |
| JPH01125625A (en) | Division device | |
| JPH0326410B2 (en) | ||
| JPS60245046A (en) | Logical shift arithmetic circuit | |
| JPH0635678A (en) | Decimal dividing circuit | |
| JPH0285922A (en) | Arithmetic circuit |