JPH01288921A - Rounding processing system - Google Patents

Rounding processing system

Info

Publication number
JPH01288921A
JPH01288921A JP63119487A JP11948788A JPH01288921A JP H01288921 A JPH01288921 A JP H01288921A JP 63119487 A JP63119487 A JP 63119487A JP 11948788 A JP11948788 A JP 11948788A JP H01288921 A JPH01288921 A JP H01288921A
Authority
JP
Japan
Prior art keywords
rounding
bit
circuit
output
adder
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
JP63119487A
Other languages
Japanese (ja)
Inventor
Hisayoshi Kuraya
久義 蔵屋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63119487A priority Critical patent/JPH01288921A/en
Publication of JPH01288921A publication Critical patent/JPH01288921A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To make an arithmetic result highly accurate without hardly increasing a circuit scale by providing a rounding circuit to output one bit to be rounded with a rounding instruction out of an arithmetic means and an arithmetic result, an adder, an output means, etc. CONSTITUTION:When the rounding instruction is inputted, only the one bit value to be rounded is fetched from a rounding circuit 12 out of the arithmetic result, and it is added with the output arithmetic result of a memory means 11 by an adder 13. From this, the arithmetic result, to which the rounding processing is executed, is fetched from the adder 13, supplied to an output means 14, and here, made into the arithmetic result consisting of one bit to be practically rounded and the respective bits on a high-order side. Since the final arithmetic result obtained by an operation at full accuracy by means of an arithmetic means 10 is stored into the means 11, the rounding processing is executed not in the middle of the operation but only for the final arithmetic result. Further, by sharing the adder 13 and the means 14 as a part of the means 10, a circuit constitution is simplified and the highly accurate arithmetic result can be obtained.

Description

【発明の詳細な説明】 〔概要〕 ディジタルシグナルプロセッサ等の演算結果を所定の桁
数で得るための丸めの処理7J式に関し、回路規模を殆
ど増加させることなく、高精度の演算結果を得ることを
目的とし、 所望の演算式に基づく演算結果を得る演算手段と、該演
算結果を記憶する記憶手段と、該記憶手段から供給され
る該演算結果のうち丸め命令人力により丸めるべき1ビ
ットを出力する丸め回路と、該丸め回路の出力1ピッ1
−信号と該記憶手段からの該演算結果とを加障する加算
器と、該加詐器の出力信号のうち上記丸め命令入力によ
り上記丸めるべき1ビット及びその上位側の全ビットの
みを実質的に出力する出力手段とより構成する。
[Detailed Description of the Invention] [Summary] To obtain high-precision calculation results without substantially increasing the circuit scale regarding the rounding process 7J formula for obtaining calculation results with a predetermined number of digits in a digital signal processor, etc. A calculation means for obtaining an operation result based on a desired operation formula, a storage means for storing the operation result, and an output of one bit of the operation result supplied from the storage means to be rounded manually by a rounding instruction. A rounding circuit that outputs 1 pin 1 of the rounding circuit
- an adder that modulates the signal and the operation result from the storage means, and of the output signal of the modifier, only the one bit to be rounded and all bits on its upper side are substantially modified by inputting the rounding command; and an output means for outputting to.

〔産業上の利用分野〕[Industrial application field]

本発明は丸めの処理方式に係り、特にディジタルシグナ
ルプロセッサ゛等の演Q結果を所定の桁数で得るための
丸めの処理方式に関する。
The present invention relates to a rounding processing method, and more particularly to a rounding processing method for obtaining operation Q results of a digital signal processor or the like with a predetermined number of digits.

ディジタルシグナルプロセッサ等の演算結果は予め設定
された右限の桁数で伝送しなければならないため、演n
結果をそれよりも少ない桁数の上記有限の桁数にするた
めの丸めの処理が必要となる。この丸めの処理により演
算結果に誤差が必然的に生ずることになるので、その誤
差をできるだけ少なくすることが重要となる。
The calculation results of digital signal processors, etc. must be transmitted using the preset right limit number of digits, so
Rounding is required to reduce the result to a smaller number of digits than the above finite number of digits. Since this rounding process inevitably causes an error in the calculation result, it is important to minimize the error as much as possible.

〔従来の技術〕[Conventional technology]

第6図は従来の丸めの処理方式の一例を示す。 FIG. 6 shows an example of a conventional rounding processing method.

この例はデータAと8の値を乗算し、その積とデータC
の値との和を他に転送する場合の例で、第6図に示す如
く、まず例えば各々16ビットのデータAとBとを乗算
して乗算結果1を得る。この乗鼻結果1は32ビットで
あるが、例えば第6図に2で示した乗算結果1の5ビッ
ト目の値を、同図に3で示した乗算結果1の上位27ビ
ットの最下位ビットにIXI算して、同図に4で示す如
く、乗算結果1の下位5ビットを丸めた27ビツ゛トの
乗算結果を得る。
This example multiplies the value of data A and 8, and the product and data C
In this example, as shown in FIG. 6, first, for example, 16-bit data A and B are each multiplied to obtain a multiplication result 1. This multiplication result 1 is 32 bits, but for example, the value of the 5th bit of the multiplication result 1 shown as 2 in FIG. IXI calculation is performed to obtain a 27-bit multiplication result by rounding off the lower 5 bits of multiplication result 1, as shown at 4 in the figure.

次にこの丸めた乗算結果4に27ビットのデータCを加
算して、第6図に5で示す姐く27ビットの積和演算結
果を得る。そして、この積和演算結果5を16ビット9
伝送路で伝送するために、その下位11ビットを切り捨
て、第6図に6で示す如く16ビットの積和演算結果の
丸め出力を得る。
Next, 27-bit data C is added to this rounded multiplication result 4 to obtain the lower 27-bit product-sum operation result shown at 5 in FIG. Then, the product-sum operation result 5 is converted into 16 bits 9
In order to transmit on a transmission path, the lower 11 bits are discarded to obtain a rounded output of the 16-bit product-sum operation result as shown at 6 in FIG.

このようにして、従来は各16ビットのデータAとBの
積と27ビットのデータCとの相の積和演算結果を16
ビットに丸めて転送していた。
In this way, conventionally, the product-sum operation result of the product of each 16 bits of data A and B and the phase of 27 bits of data C is calculated as 16 bits.
It was transferred rounded into bits.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかるに、従来の丸めの処理方式では、第6図に4,6
t−示したように、演算を行なう毎に丸め処理を行なっ
ているので、C=AXB+Cといった累積1i1iを行
なう場合等、演算回数が増えるほど丸めによる誤1が大
きくなってしまい、高精度な演算結果が得られず、また
汎用性が低減するという欠点があった。
However, in the conventional rounding process, 4,6
t- As shown, rounding is performed every time an operation is performed, so when performing cumulative 1i1i such as C = AXB + C, the more the number of operations increases, the larger the error 1 due to rounding becomes, making it difficult to perform high-precision calculations. This method has the drawbacks of not producing good results and of reducing versatility.

本発明は上記の点に鑑みてなされたもので、回路規模を
殆ど増加させることなく、高精度の演算結果を得ること
ができる丸めの処理方式を提供することを目的とする。
The present invention has been made in view of the above points, and it is an object of the present invention to provide a rounding processing method that can obtain highly accurate arithmetic results without substantially increasing the circuit scale.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理ブロック図を示す。同図中、10
は演算手段で、所望の演算式に基づく演算結果を得る。
FIG. 1 shows a block diagram of the principle of the present invention. In the same figure, 10
is an arithmetic means, which obtains an arithmetic result based on a desired arithmetic expression.

11は記憶手段で、上記の演算結果を記憶する。12は
丸め回路で、上記演算結果のうち丸め命令入力により丸
めるべき1ビットを出力する。
Reference numeral 11 denotes a storage means for storing the above calculation results. 12 is a rounding circuit which outputs one bit of the above operation result to be rounded by inputting a rounding instruction.

13は加算器で、記憶手段11と丸め回路12の両川力
信号を加算する。14は出力手段で、丸め命令入力によ
り丸めるべき1ビットとその上位側の全ビットのみを実
質的に出力する。
Reference numeral 13 denotes an adder that adds the two-way power signals of the storage means 11 and the rounding circuit 12. Reference numeral 14 denotes an output means that essentially outputs only one bit to be rounded and all bits on its higher-order side by inputting a rounding command.

〔作用〕[Effect]

丸め命令入力時には、丸め回路12から演算結果のうち
丸めるべき1ビットの値だけが取り出され、加算器13
において記憶手段11の出力演算結果と加算される。こ
れにより、加算器13からは丸め処理が施された演算結
果が取り出されて出力手段14に供給され、ここで実質
的に丸めるべき1ビットとその上位側の各ビットよりな
る演算結果とされる。
When a rounding command is input, only the 1-bit value to be rounded out of the operation result is taken out from the rounding circuit 12 and sent to the adder 13.
It is added to the output calculation result of the storage means 11 in the step. As a result, the rounded operation result is taken out from the adder 13 and supplied to the output means 14, where it is made into an operation result that essentially consists of the 1 bit to be rounded and each bit on its upper side. .

本発明では演算手段10によりフル精度で演算して得ら
れた最終的な洟垂結果を記憶手段11に記憶しているの
で、丸め処理はこの最終的な演算結果に対してのみ行な
われ、演算途中での丸め処理は行なわれることはない。
In the present invention, since the final rounding result obtained by calculating with full precision by the calculation means 10 is stored in the storage means 11, rounding processing is performed only on this final calculation result, and the calculation No intermediate rounding is performed.

また、加口器13及び、出力手段14を演停手段10の
一部に共用することで、回路構成をより簡略化すること
ができる。
Further, by sharing the adder 13 and the output means 14 as a part of the stop means 10, the circuit configuration can be further simplified.

〔実施例〕〔Example〕

第2図は本発明の一実施例の構成図を示す。同図中、第
1図と同一構成部分には同一符号を付しである。本実施
例は演算手段10内の一部の回路(加算器13、クリッ
プ回路19)を加算器13、出力手段14と共通に使用
するようにした例を示しているが、勿論別々に設けるこ
とも可能である。
FIG. 2 shows a configuration diagram of an embodiment of the present invention. In the figure, the same components as in FIG. 1 are given the same reference numerals. Although this embodiment shows an example in which some circuits (adder 13, clip circuit 19) in the calculation means 10 are used in common with the adder 13 and the output means 14, it is of course possible to provide them separately. is also possible.

第2図において、15はデータセレクタで、丸め命令R
NDOPの値が“0パのとき(丸め命令入力が無いとぎ
)は、セレクト信号A/AXBの値に応じてデータA又
はデータ(AXB)を選択出力する。ここで、データ(
AXB)は各16ビットのデータAとBとを乗算して得
たフル精度の32ビットのデータである。
In FIG. 2, 15 is a data selector, and a rounding instruction R
When the value of NDOP is "0" (no rounding command input), data A or data (AXB) is selected and output according to the value of select signal A/AXB. Here, data (
AXB) is full-precision 32-bit data obtained by multiplying each 16-bit data A and B.

一方、丸め命令RNDOPの値が“1″のとき(丸め命
令入力が有るとぎ)は、データセレクタ15はセレクト
信RA / A X Bの値に無関係にオール゛″On
のデータを強制的に出力する。
On the other hand, when the value of the rounding command RNDOP is "1" (when there is a rounding command input), the data selector 15 is all "ON" regardless of the value of the select signal RA/AXB.
Forcibly output the data.

16はRND回路で、丸め命令RNDOPの値が“O”
のときその出力1ビットはO″となり、丸め命令RND
OPの値が′″1″のときにのみアキュムレータ20か
らの32ビットのデータCの下位16ビットが入力され
、かつ、その上位16ビットの最下位ビットとサインビ
ットの計2ビットが入力され、所定の丸め処理を行なっ
て丸めるべき1ビットを出力する。ここで、RND回路
16の丸め方法はRNDlとRND2の2ビット入力に
より、後述するI E E E (In5titute
 ofElectrical and Hectron
ics Engineers )規格の4つの丸め方法
のうちの17:1が選択される。
16 is an RND circuit, and the value of the rounding instruction RNDOP is “O”
When the output 1 bit becomes O'', the rounding instruction RND
Only when the value of OP is ``1'', the lower 16 bits of the 32-bit data C from the accumulator 20 are input, and a total of 2 bits of the least significant bit and the sign bit of the upper 16 bits are input, A predetermined rounding process is performed and one bit to be rounded is output. Here, the rounding method of the RND circuit 16 is based on the 2-bit input of RNDl and RND2, and is based on the IEEE (In5titudinal
of Electrical and Hectron
ics Engineers) 17:1 of the four rounding methods of the standard is selected.

また、17は2人力OR回路で、データセレクタ15の
出力の1ビットとRND回路16の出力1ビットとの論
理和をとる。OR回路17とRND回路16とは丸め回
路12を構成している。
Further, 17 is a two-man OR circuit which takes the logical sum of 1 bit of the output of the data selector 15 and 1 bit of the output of the RND circuit 16. The OR circuit 17 and the RND circuit 16 constitute a rounding circuit 12.

更に、18はオーバーフロー検出回路、19はクリップ
回路で、前記出力手段14を構成し、また20はアキュ
ムレータで、前記記憶1段11を構成している。。
Further, 18 is an overflow detection circuit, 19 is a clip circuit, which constitutes the output means 14, and 20 is an accumulator, which constitutes the first storage stage 11. .

次に本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

■通常の演算動作時 このときは丸め命令RNDOPの値は170 Nであり
、RND@v!116の出力1ビットが常に“0”とさ
れ(このときはRND回路16が存在しないことと等価
である)、かつ、データセレクタ15がセレクト信号A
/AXBによりデータA又はデータ(AXB)を演算出
力する。ここで、データA出力時はデータセレクタ15
の出力32ビットはデータへの最上位ビットがサインビ
ットであるので(2の補数形式のとき)、その最上位ビ
ットと同じ値を上位16ビット付加した形になる。デー
タセレクタ15の出力32ビット信号のうち上位16ビ
ットの最下位ビットがOR回路17を通して残りの31
ビットと加算されて32ビットとされた後、加算器13
の一方の入力端子に供給される。
■During normal arithmetic operation At this time, the value of the rounding instruction RNDOP is 170 N, and RND@v! 116 is always set to "0" (in this case, it is equivalent to the absence of the RND circuit 16), and the data selector 15 outputs the select signal A.
/AXB calculates and outputs data A or data (AXB). Here, when data A is output, the data selector 15
Since the most significant bit of the output 32 bits of data is a sign bit (when in two's complement format), the same value as the most significant bit is added to the upper 16 bits. The least significant bit of the upper 16 bits of the 32-bit signal output from the data selector 15 is passed through the OR circuit 17 to the remaining 31 bits.
After being added to 32 bits, the adder 13
is supplied to one input terminal of

加算器13の他方の入力端子にはアキュムレータ20の
出力32ビットが入力されるが、初期時にはオール“O
nであり、加算器13の一方の入力端子に入J」された
32ビットのデータが加算器13をそのまま通してオー
バーフロー検出回路18及びクリップ回路19に供給さ
れる。オーバーフロー検出回路18は加算器13の出力
32ビットデータがオーバーフローしたときのみクリッ
プ回路19のクリップ動作を行なわせ、正又は負の最大
値とし、オーバーフローでないとぎはクリップ動性を停
止する。
The 32 bits output from the accumulator 20 are input to the other input terminal of the adder 13, but initially all “0”
The 32-bit data entered into one input terminal of the adder 13 is supplied to the overflow detection circuit 18 and clipping circuit 19 through the adder 13 as is. The overflow detection circuit 18 causes the clipping circuit 19 to perform the clipping operation only when the output 32-bit data of the adder 13 overflows, and sets it to the maximum positive or negative value, and stops the clipping behavior when there is no overflow.

クリップ回路19から取り出された32ビットのデータ
はアキュムレータ20に供給され、ここで記憶される。
The 32-bit data taken out from the clip circuit 19 is supplied to an accumulator 20 and stored there.

このアキュムレータ2oの出力32ビットのデータをC
とすると、データCはデータバスへ転送される一方、加
算器13に供給される。
The output 32-bit data of this accumulator 2o is
Then, data C is transferred to the data bus while being supplied to the adder 13.

以下、上記と同様の動作が繰り返されることにより、ア
キュムレータ20には(A+C) 、又は(AxB+C
)といった32ビットの演算結果が格納されることにな
る。
Thereafter, by repeating the same operation as above, the accumulator 20 has (A+C) or (AxB+C
) 32-bit operation results will be stored.

■丸め処T!!!動作時 アキュムレータ20に演忰結果が格納されている状態に
おいて丸め処理を行なうとぎは、汎用デイジタルシグブ
ルブロセッザの演算命令中に付加した丸め命令RN’D
 OPの値が1”とされる。
■Maru-dokoro T! ! ! The rounding process is performed when the operation result is stored in the accumulator 20 during operation, using the rounding instruction RN'D added to the operation instruction of the general-purpose digital signal processor.
The value of OP is set to 1''.

これにより、データセレクタ15の出力32ビットはオ
ール“Onとなり、RND回路16が丸め処理を行なう
As a result, all 32 bits output from the data selector 15 are turned on, and the RND circuit 16 performs rounding processing.

tなわち、第3図に22で示す32ビットのデ−タCが
アキュムレータ20から取り出され、そのうち下位16
ビットと、上位16ビットの最下位ビット及びサインビ
ットの2ビットがRND回路16に供給されて、第3図
に23で示す如く、データCの下位16ビットを丸めて
得られた丸めるべき1ビット(下位17ビット目の1ビ
ット)がRND回路16より取り出され、OR回路17
を通して加齢器13に入力される。
t, that is, 32 bits of data C shown as 22 in FIG.
The bit, the least significant bit of the upper 16 bits, and the sign bit are supplied to the RND circuit 16, and as shown at 23 in FIG. (1 bit of the 17th lower bit) is taken out from the RND circuit 16, and the OR circuit 17
It is input to the aging device 13 through.

ここで、RND回路16による丸め処理方法はIEEE
規格の4つの丸め方法、ORN (RoundNear
est)、ORp (Round Plus) 、■R
M(Rou−nd Minus)ORZ (Round
 Zero)のいずれかであるが、これらは公知である
のでその詳細な説明は省略し、PJI!な説明に止める
。データの表現形式が2の補数形式であるときは、第4
図に26で示す32ビットのデータの、丸めるべき1ビ
ット(下位17ビット目)を■下位16ビット目を■、
下位15ビットを■、最上位ビット(すなわちサインビ
ット)をSとすると、丸めるべき1ビットのIURは次
表に示す演算式で求められる。
Here, the rounding method by the RND circuit 16 is based on IEEE
There are four rounding methods in the standard, ORN (RoundNear
est), ORp (Round Plus), ■R
M (Round Minus) ORZ (Round
Zero), but since these are well known, detailed explanation thereof will be omitted, and PJI! I'll stop at an explanation. When the data representation format is two's complement format, the fourth
The 1 bit to be rounded (lower 17th bit) of the 32-bit data shown as 26 in the figure is ■lower 16th bit,■,
Assuming that the lower 15 bits are ■ and the most significant bit (that is, the sign bit) is S, the 1-bit IUR to be rounded can be calculated using the formula shown in the table below.

表  ま ただし、上記衣及び次表中、「+」は対応するビット同
志のOR演算、「×」は対応するビット同志のAND演
算を示す。
In addition, in the above table and the following table, "+" indicates an OR operation between corresponding bits, and "x" indicates an AND operation between corresponding bits.

また、データの表現形式が絶対値形式であるときは、R
N、RP、RM及びRZの各丸め方法は第5図に示す如
くになる。なお、第5図中、「正1、[負、1は32ビ
ットのデータの極性を示す。また、スティッキービット
を■、ガードビットを■、最下位ビットをOサインビッ
トをS、丸めるべき1ビットの値をRとすると次表に示
す如き演算式でRが求められる。
Also, when the data representation format is absolute value format, R
The rounding methods for N, RP, RM and RZ are as shown in FIG. In addition, in Figure 5, "Positive 1, [Negative, 1] indicates the polarity of 32-bit data. Also, the sticky bit is ■, the guard bit is ■, the least significant bit is O, the sign bit is S, and the 1 to be rounded is Letting the value of the bit be R, R can be found using the arithmetic expression shown in the following table.

表  2 再び第2図及び第3図に戻って説明するに、上記の如<
RND回路16で4種類のうちどれか1つの丸め方法で
丸め処理された、丸めるべき1ビットの値(下位17ビ
ット目の1ビットで、第3図に23で示す)は、加算器
13で7キユムレータ20からの32ビットのデータC
(第3図に24で示す:これは22と同じ)と加算され
て32ビットの加算イを号とされた後、クリップ回路1
9に供給される。
Table 2 Returning to Figures 2 and 3 again, as described above,
The 1-bit value to be rounded (the 17th low-order bit, shown as 23 in FIG. 3), which has been rounded using one of the four rounding methods in the RND circuit 16, is 7 32-bit data C from the cumulator 20
(shown as 24 in Figure 3, which is the same as 22) is added to the 32-bit addition signal, and then the clip circuit 1
9.

クリップ回路19は値が1”の前記丸め命令RNDOP
が入力されることにより、丸めるべき1ビット(下位1
7ビット目)及びその上位側の全ビット(上位15ビッ
ト)からなる上位16ビットの値をそのまま出力し、残
りの下位16ビットの値をクリップしてオール゛0″と
する。従って、クリップ回路19からは第3図に25で
示ず如き32ビットのデータが取り出される。この出力
データは下位16ビットがオール“O”であるから無視
でき、実質的にはアキュムレータ20の出力データC(
最終演算結果)に対して丸め処理が施された16ビット
のデータである。
The clipping circuit 19 receives the rounding instruction RNDOP with a value of 1''.
is input, the 1 bit to be rounded (lower 1
The value of the upper 16 bits consisting of the 7th bit) and all bits on its upper side (upper 15 bits) is output as is, and the value of the remaining lower 16 bits is clipped to make it all 0. Therefore, the clipping circuit From 19, 32 bits of data as shown in 25 in FIG.
This is 16-bit data that has been rounded off (final calculation result).

このように、本実施例によれば、丸め処理は最終演算結
果にのみ施されるので高精度の丸め処理出力データを得
ることができ、また既存の回路にRND回路16及びO
R回路17を付加するのみで構成でき、更に加静嵩13
、クリップ回路19等を共用しているので簡単な回路構
成とすることができる。
As described above, according to this embodiment, rounding processing is performed only on the final calculation result, so highly accurate rounding processing output data can be obtained, and the RND circuit 16 and O
It can be constructed by simply adding the R circuit 17, and further reduces the damping volume 13.
, the clip circuit 19, etc. are shared, so the circuit structure can be simplified.

なお、本発明は上記の実施例に限定されるものではなく
、クリップ回路1つを共用しないならば、例えば出力手
段14はクリップ回路19の代りに上位16ビットだけ
を出力するゲート回路で構成してもよい。
Note that the present invention is not limited to the above-described embodiment, and if one clip circuit is not shared, for example, the output means 14 may be configured with a gate circuit that outputs only the upper 16 bits instead of the clip circuit 19. You can.

〔発明の効果〕〔Effect of the invention〕

上述の如く、本発明によれば、最終的な演算結果に対し
てのみ丸め処理を行なうので、演算の途中で1つの演算
が終る毎に丸め処理をする従来方式に比べ演算精度を高
精度にすることができ、また既存の回路に少し回路を付
加するだけで構成できるので回路規模を殆ど増大させる
ことはなく、更に演算手段を構成する回路の一部を加算
器や出力手段に共用することにより、より一層回路規模
の増大を防ぐことができる等の特長を有するものである
As described above, according to the present invention, rounding is performed only on the final calculation result, resulting in higher calculation accuracy than the conventional method in which rounding is performed every time one calculation is completed during the calculation. In addition, since it can be constructed by simply adding a few circuits to an existing circuit, the circuit size hardly increases, and furthermore, a part of the circuit constituting the calculation means can be shared by the adder and the output means. This has the advantage of being able to further prevent an increase in circuit scale.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の原理ブロック図、 第2図は本発明の一実施例の構成図、 第3図は第2図の動作説明図、 第4図は2の補数形式の丸め方法説明図、第5図は絶対
値形式の丸め方法説明図、第6図は従来方式の・−例の
説明図である。 図において、 10は演算手段、 11は記憶手段、 12は丸め回路、 13は加算器、 14は出力手段、 RNDOPは丸め命令 を示す。 特許出願人 富 士 通 株式会社 代 理 人 弁理士 伊 東 忠 彦1・1・、′) 0″ ?s2図 革2!の勤/l箕藺υ用目 第3図
Fig. 1 is a block diagram of the principle of the present invention, Fig. 2 is a block diagram of an embodiment of the present invention, Fig. 3 is an explanatory diagram of the operation of Fig. 2, and Fig. 4 is an explanatory diagram of a rounding method in two's complement format. , FIG. 5 is an explanatory diagram of an absolute value format rounding method, and FIG. 6 is an explanatory diagram of an example of the conventional method. In the figure, 10 is an arithmetic means, 11 is a storage means, 12 is a rounding circuit, 13 is an adder, 14 is an output means, and RNDOP is a rounding instruction. Patent Applicant Fujitsu Co., Ltd. Agent Patent Attorney Tadahiko Ito 1.1.,') 0''

Claims (1)

【特許請求の範囲】 所望の演算式に基づく演算結果を得る演算手段(10)
と、 該演算結果を記憶する記憶手段(11)と、該記憶手段
(11)から供給される該演算結果のうち丸め命令入力
により丸めるべき1ビットを出力する丸め回路(12)
と、 該丸め回路(12)の出力1ビット信号と該記憶手段(
11)からの該演算結果とを加算する加算器(13)と
、 該加算器(13)の出力信号のうち上記丸め命令入力に
より上記丸めるべき1ビット及びその上位側の全ビット
のみを実質的に出力する出力手段(14)とよりなるこ
とを特徴とする丸めの処理方式。
[Claims] Calculating means (10) for obtaining calculation results based on a desired calculation formula.
a storage means (11) for storing the operation result; and a rounding circuit (12) for outputting one bit of the operation result supplied from the storage means (11) to be rounded by inputting a rounding command.
and the output 1-bit signal of the rounding circuit (12) and the storage means (
an adder (13) that adds the operation result from the adder (11); and of the output signal of the adder (13), only the one bit to be rounded and all bits on its upper side are substantially converted by inputting the rounding instruction. 1. A rounding processing method characterized by comprising: an output means (14) for outputting an output.
JP63119487A 1988-05-17 1988-05-17 Rounding processing system Pending JPH01288921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63119487A JPH01288921A (en) 1988-05-17 1988-05-17 Rounding processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63119487A JPH01288921A (en) 1988-05-17 1988-05-17 Rounding processing system

Publications (1)

Publication Number Publication Date
JPH01288921A true JPH01288921A (en) 1989-11-21

Family

ID=14762488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63119487A Pending JPH01288921A (en) 1988-05-17 1988-05-17 Rounding processing system

Country Status (1)

Country Link
JP (1) JPH01288921A (en)

Similar Documents

Publication Publication Date Title
JPH06348455A (en) Rounding method for multiplication and multiplying circuit
JP3487903B2 (en) Arithmetic device and arithmetic method
JPS6347874A (en) Arithmetic unit
JP3345894B2 (en) Floating point multiplier
US5177703A (en) Division circuit using higher radices
JPH07234778A (en) Arithmetic circuit
US20050144214A1 (en) Shift-and-negate unit within a fused multiply-adder circuit
JPS63123125A (en) Floating point adder
US4823300A (en) Performing binary multiplication using minimal path algorithm
JPH0519170B2 (en)
JPS61256436A (en) Arithmetic unit
JPH01288921A (en) Rounding processing system
JPH02287874A (en) Product sum arithmetic unit
JPH02205923A (en) Arithmetic processor
JP2951685B2 (en) Fixed-point arithmetic unit
JP3137131B2 (en) Floating point multiplier and multiplication method
JP2555135B2 (en) Arithmetic circuit
JPS6222178A (en) Multiplier for multiplying two complex numbers
US11604646B2 (en) Processor comprising a double multiplication and double addition operator actuable by an instruction with three operand references
JP2508286B2 (en) Square root calculator
JPS6285333A (en) Round-off processing system for floating point multiplier
JP2828791B2 (en) A method for quantizing partial sums used in the product-sum operation
KR940008610B1 (en) Method and processor for high-speed convergence factor determination
JP2023161967A (en) Arithmetic device, arithmetic method, and program
JP2797773B2 (en) Reciprocal arithmetic unit