JPH03257619A - Digital arithmetic circuit - Google Patents

Digital arithmetic circuit

Info

Publication number
JPH03257619A
JPH03257619A JP2057143A JP5714390A JPH03257619A JP H03257619 A JPH03257619 A JP H03257619A JP 2057143 A JP2057143 A JP 2057143A JP 5714390 A JP5714390 A JP 5714390A JP H03257619 A JPH03257619 A JP H03257619A
Authority
JP
Japan
Prior art keywords
arithmetic circuit
inputs
outputs
circuit
full adders
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
JP2057143A
Other languages
Japanese (ja)
Inventor
Yoshihiro Tahira
由弘 田平
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 JP2057143A priority Critical patent/JPH03257619A/en
Publication of JPH03257619A publication Critical patent/JPH03257619A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the error to be stored by rounding up/down a low-order bit by adding the average value of low-order bit data to a high-order bit. CONSTITUTION:When the values of outputs a26-a20 from an arithmetic circuit 13 are under the condition of A2=0000001(2), the values of outputs Ms26-Ms20 from full address 16-22 are changed like Ms2=0000001 Ms2=0000010 Ms2=0000011 Ms2=00000100 Ms2=0000001. As a result, the values of inputs b24-b20 to a result arithmetic circuit 14 are changed like B2=00000(2) B2=00000(2) B2=000000(2) B2=000001(2) B2=00000(2). In such a case, when the average value of the B2 is adopted, the condition of B2/4=0000001(2) is established and it is equal with the value of the A2. Thus, the accumulation of error can be reduced.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、いわゆるまるめ回路を有するデジタル演算回
路に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a digital arithmetic circuit having a so-called rounding circuit.

従来の技術 デジタル演算回路は、Nビットの有限語長よりなる演算
回路により構成されるが、回路規模・動作速度の制約上
、前段の演算結果を次段に伝える際、下位ビットデータ
の切り捨てが行なわれることがある。この時、従来、量
子化誤差の縮小のため第3図に示す様な「まるめ回路」
を演算回路間に挿入している。
Conventional technology digital arithmetic circuits are composed of arithmetic circuits with a finite word length of N bits, but due to constraints on circuit scale and operating speed, lower bit data must be truncated when transmitting the arithmetic results of the previous stage to the next stage. Sometimes it is done. At this time, conventionally, a "rounding circuit" as shown in Figure 3 was used to reduce quantization errors.
is inserted between the arithmetic circuits.

第3図は、7ビツト出力の演算回路と、5ビツト入力の
演算回路間に使用されるまるめ回路の例である。
FIG. 3 is an example of a rounding circuit used between a 7-bit output arithmetic circuit and a 5-bit input arithmetic circuit.

1はalli〜alOの7ビツトの出力を持つ演算回路
Aであり、2はb24〜b20の5ビツトの入力を持つ
演算回路Bである。3は演算回路1と演算回路2の間に
おいて、量子化誤差削減のために挿入された「まるめ」
を行なうデジタル演算回路(以下まるめ回路と呼ぶ〉。
1 is an arithmetic circuit A having a 7-bit output from alli to alO, and 2 is an arithmetic circuit B having a 5-bit input from b24 to b20. 3 is a "rounding" inserted between arithmetic circuit 1 and arithmetic circuit 2 to reduce quantization error.
A digital arithmetic circuit (hereinafter referred to as a rounding circuit) that performs the following.

まるめ回路3は、全加算器4〜8により構成される。全
加算器4〜8の八入力であるMars〜MalOは、演
算回路1の7ビツトの出力であるa16〜alGのうち
、上位5ビツトのaI6〜aI2が信号線9により接続
される。全加算器4〜8のB入力であるMb16〜Mb
lOは、グランドに接続される。全加算器8のキャリー
入力は、演算回路1の出力a16〜aloのうち、下位
から2ビツト目であるallと信号線10により接続さ
れる。演算回路1の出力alG〜aloのうち、最下位
ビットであるalOの信号線11はどこにも接続されな
い。
The rounding circuit 3 is composed of full adders 4-8. Among the 8 inputs Mars to MalO of the full adders 4 to 8, the higher 5 bits aI6 to aI2 of the 7 bit outputs a16 to alG of the arithmetic circuit 1 are connected by a signal line 9. Mb16 to Mb which are B inputs of full adders 4 to 8
IO is connected to ground. The carry input of the full adder 8 is connected to all, which is the second bit from the lowest among the outputs a16 to alo of the arithmetic circuit 1, by a signal line 10. Among the outputs alG to alo of the arithmetic circuit 1, the signal line 11 of alO, which is the least significant bit, is not connected to anything.

全加算器4〜8のサム出力であるMS+4〜MS1.は
、演算回路2の入力であるb14〜blOと信号線12
により接続される。
MS+4 to MS1 . which are the sum outputs of full adders 4 to 8; are the inputs b14 to blO of the arithmetic circuit 2 and the signal line 12
Connected by

以下に第3図に示した従来例の動作について説明する。The operation of the conventional example shown in FIG. 3 will be explained below.

いま演算回路lの出力であるaI6〜alOで表わす二
進数A+の値がAI=0000000(2)→A1=0
000001u+→A+=OOOOO10(2)→A+
=OOOOOI  L2)→A l−0000100(
2)と変わった時、まるめ回路3においては、A1+0
+a++なる演算が行なわれ、その結果、信号線12よ
り演算回路2の入力b14〜blOに入力される信号は
、二進数で表わせばB+= OOO00(2)→BI−
00000(2)→B1=00001u、→Bl=OO
OO1(2)→B+00001(2)と変化する。
Now, the value of the binary number A+ expressed by aI6 to alO, which is the output of the arithmetic circuit l, is AI=0000000(2)→A1=0
000001u+→A+=OOOOOO10(2)→A+
=OOOOOOI L2)→A l-0000100(
2), in round circuit 3, A1+0
The calculation +a++ is performed, and as a result, the signal input from the signal line 12 to the inputs b14 to blO of the calculation circuit 2 is expressed in binary as B+= OOO00(2) → BI-
00000(2)→B1=00001u,→Bl=OO
It changes from OO1(2) to B+00001(2).

ここで、A1と81との間に、A+の下位2ビツトが0
0.01の時B1の値はA1の下位2ビツトを切り捨て
た値になり、A1の下位2ビツトが10.11の時B1
の値は、A1の下位2ビツトを切り上げした値になる関
係が威り立つ。すなわち、B1の値は、A1を四捨五入
した値になっている。
Here, between A1 and 81, the lower two bits of A+ are 0.
When the value is 0.01, the value of B1 is the value obtained by cutting off the lower 2 bits of A1, and when the lower 2 bits of A1 are 10.11, the value of B1 is
The value of A1 is the value obtained by rounding up the lower two bits of A1. That is, the value of B1 is a value obtained by rounding off A1.

発明が解決しようとする課題 以上述べた従来の構成においては、たとえばある長い期
間において演算回路1の出力alG〜alOの表わす値
がA+−0’OOOOO1であった場合、演算回路2の
入力b14〜blOの表わす値B2−0OOOOのまま
であるため、誤差が蓄積される。
Problems to be Solved by the Invention In the conventional configuration described above, for example, if the value represented by the outputs alG to alO of the arithmetic circuit 1 is A+-0'OOOOOO1 during a certain long period, the inputs b14 to b14 of the arithmetic circuit 2 Since the value represented by blO remains B2-0OOOO, errors are accumulated.

課題を解決するための手段 本発明のデジタル演算回路は、前段のNビット出力を持
つ演算回路の出力を入力とするNビットの全加算器群と
、次段の演算回路の入力ビツト数をMとした場合、(N
−M)ビットのフリップフロップ群を有する。
Means for Solving the Problems The digital arithmetic circuit of the present invention includes a group of N-bit full adders whose input is the output of an arithmetic circuit having an N-bit output in the previous stage, and a group of N-bit full adders whose input bits are M in the number of input bits of the arithmetic circuit in the next stage. If (N
- M) bits of flip-flops.

前記フリップフロップ群は、前記全加算器群の下位(N
−M)ビットの出力信号をIクロック間遅延させた後、
入力となった全加算器群の一方の入力に出力する。
The flip-flop group is a lower order (N
- After delaying the output signal of the M) bit by I clocks,
Outputs to one input of the input full adder group.

次段演算回路へは、前記全加算器群の上位Mビット出力
が入力される。
The upper M bit outputs of the full adder group are input to the next stage arithmetic circuit.

作用 以上の構成にすることにより、下位ビットデータの平均
値を上位ビットに加えることによって、下位ビットの切
り捨て、切り上げにより蓄積される誤差を軽減すること
ができる。
With the above-described configuration, the average value of the lower bit data is added to the upper bits, thereby reducing errors accumulated due to rounding down or rounding up the lower bits.

実施例 つぎに、本発明を図面に示した実施例を用いて説明する
Embodiments Next, the present invention will be explained using embodiments shown in the drawings.

第1図に本発明の一実施例である、7ビツト入力・5ビ
ツト出力のまるめ回路を使用したデジタル演算回路を示
す。
FIG. 1 shows a digital arithmetic circuit using a 7-bit input/5-bit output rounding circuit, which is an embodiment of the present invention.

第1図において、13が7ビツトの出力22G〜a20
をもつ演算回路Aであり、14が5ビツトの入力b24
〜b20をもつ演算回路Bであり、15がまるめ回路で
ある。
In Figure 1, 13 is the 7-bit output 22G~a20
is an arithmetic circuit A with 14 being a 5-bit input b24.
-b20 is an arithmetic circuit B, and 15 is a rounding circuit.

まるめ回路15は、全加算器16〜22とフリップフロ
ップ23.24により構成されている。
The rounding circuit 15 is composed of full adders 16 to 22 and flip-flops 23 and 24.

演算回路13の出力a26〜a20は、全加算器16〜
22のA入力Ma26〜Ma2oに信号線25により接
続される。全加算器16〜22の出力のうち、上位5ビ
ツトの出力Ms26〜Ms22は、信号線26により、
演算回路14の入力b24〜b20に接続される。全加
算器16〜22のうち、下位2ビツトの出力は、信号線
27によりフリップフロップ23.24に接続される。
The outputs a26 to a20 of the arithmetic circuit 13 are sent to the full adders 16 to
22 A inputs Ma26 to Ma2o by a signal line 25. Among the outputs of the full adders 16 to 22, the outputs of the upper five bits Ms26 to Ms22 are transmitted by the signal line 26.
It is connected to inputs b24 to b20 of the arithmetic circuit 14. Outputs of the lower two bits of the full adders 16 to 22 are connected to flip-flops 23 and 24 by a signal line 27.

全加算器16〜22のうち、上位5ビツトの全加算器1
6〜20のB入力は、グランドに接続される。全加算器
16〜22のうち、下位2ビツトの全加算器21.22
のB入力は、信号線28により、フリップフロップ23
の出力と接続される。
Among the full adders 16 to 22, the upper 5 bit full adder 1
B inputs 6-20 are connected to ground. Among the full adders 16 to 22, the lower 2 bit full adders 21 and 22
The B input of the flip-flop 23 is connected to the flip-flop 23 by the signal line 28.
connected to the output of

以下に、本実施例の動作について説明する。The operation of this embodiment will be explained below.

いま第2図に示す様に、演算回路13の出力a26〜a
2oの値がA2=0000001(2>であった時、全
加算器16〜22の出力MS26〜MS20の値は、M
 s 2 = 0000001 →M s 2 =00
00010−”Ms2=OOOOO11−Ms2−00
000100−4−Mst=0000001と変化する
。この結果演算回路14の入力b24〜b2Gの値は、
B2= 00000(2)→B200000(2)→B
2= 00000(2)→B2差の少ないデジタル演算
回路を実現できる。
As shown in FIG. 2, the outputs a26 to a of the arithmetic circuit 13
When the value of 2o is A2=0000001 (2>), the values of the outputs MS26 to MS20 of the full adders 16 to 22 are M
s 2 = 0000001 →M s 2 =00
00010-”Ms2=OOOOOO11-Ms2-00
It changes as 000100-4-Mst=0000001. As a result, the values of inputs b24 to b2G of the calculation circuit 14 are as follows:
B2= 00000(2)→B200000(2)→B
2=00000(2)→B2 A digital arithmetic circuit with little difference can be realized.

また、本発明のデジタル演算回路は、MOS型・バイポ
ーラ型等のいかなる種類のデジタル回路にも適用できる
ことは明白である。
Furthermore, it is clear that the digital arithmetic circuit of the present invention can be applied to any type of digital circuit such as MOS type or bipolar type.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は動作を示すタイミング図、第3図は従来例の構成
を示すブロック図である。 1.2・・・・・・演算回路、3,15・・・・・・ま
るめ回路、4〜8・・・・・・全加算器、13.14・
・・・・・演算回路、16〜22・・・・・・全加算器
、23.24・・・・・・フリップフロップ。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a timing diagram showing the operation, and FIG. 3 is a block diagram showing the configuration of a conventional example. 1.2... Arithmetic circuit, 3, 15... Rounding circuit, 4-8... Full adder, 13.14.
...Arithmetic circuit, 16-22...Full adder, 23.24...Flip-flop.

Claims (1)

【特許請求の範囲】[Claims] N個の出力を持つ第一の演算回路と、N個の全加算器と
、M個(M<N)の入力を持つ第二の演算回路と、(N
−M)個のフリップフロップ回路とを有し、前記全加算
器はそれぞれ2つの入力とキャリー入力とキャリー出力
とサム出力とを有し、そのキャリー出力とキャリー入力
によって直列に接続され、初段から連続したM個の前記
全加算器については前記2つの入力のうち、第一の入力
はそれぞれ前記第一の演算回路の出力に接続され、第二
の入力は共通して固定値が与えられ、前記サム出力はそ
れぞれ前記第二の演算回路の入力に接続され、残りの前
記全加算器については第一の入力はそれぞれ前記第一の
演算回路の出力に接続され、第二の入力は前記フリップ
フロップ回路のそれぞれの出力が与えられ、前記サム出
力はそれぞれ前記フリップフロップ回路の入力に接続さ
れているデジタル演算回路。
A first arithmetic circuit having N outputs, N full adders, a second arithmetic circuit having M inputs (M<N), (N
- M) flip-flop circuits, each of the full adders having two inputs, a carry input, a carry output, and a sum output, which are connected in series by the carry output and the carry input, and are connected in series from the first stage to the first stage. For the M consecutive full adders, among the two inputs, the first inputs are respectively connected to the output of the first arithmetic circuit, and the second inputs are commonly given a fixed value, The sum outputs are respectively connected to the inputs of the second arithmetic circuit, the first inputs of the remaining full adders are respectively connected to the outputs of the first arithmetic circuit, and the second inputs are connected to the inputs of the flip-flop. a digital arithmetic circuit, to which respective outputs of the flip-flop circuits are applied, and the sum outputs are respectively connected to inputs of the flip-flop circuits.
JP2057143A 1990-03-08 1990-03-08 Digital arithmetic circuit Pending JPH03257619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2057143A JPH03257619A (en) 1990-03-08 1990-03-08 Digital arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2057143A JPH03257619A (en) 1990-03-08 1990-03-08 Digital arithmetic circuit

Publications (1)

Publication Number Publication Date
JPH03257619A true JPH03257619A (en) 1991-11-18

Family

ID=13047354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2057143A Pending JPH03257619A (en) 1990-03-08 1990-03-08 Digital arithmetic circuit

Country Status (1)

Country Link
JP (1) JPH03257619A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01169627A (en) * 1987-12-25 1989-07-04 Toshiba Corp Highly accurate adding device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01169627A (en) * 1987-12-25 1989-07-04 Toshiba Corp Highly accurate adding device

Similar Documents

Publication Publication Date Title
EP0471130B1 (en) Coding method and apparatus for pipelined and parallel processing
US6614369B1 (en) DC balanced 7B/8B, 9B/10B, and partitioned DC balanced 12B/14B, 17B/20B, and 16B/18B transmission codes
JP2591864B2 (en) Digital filter
US5091874A (en) Encoder apparatus
US6370667B1 (en) CRC operating calculating method and CRC operational calculation circuit
JPH03257619A (en) Digital arithmetic circuit
JPH0149973B2 (en)
US5648921A (en) Digital operational circuit with pathmetrics calculating steps simplified
EP1001540B1 (en) Block coding method and apparatus
US7349937B2 (en) Fast incrementer using zero detection and increment method thereof
JP3455828B2 (en) Bit shift circuit
US5673216A (en) Process and system for adding or subtracting symbols in any base without converting to a common base
JP3116679B2 (en) Parallel-serial conversion method and parallel-serial conversion circuit
JP2794950B2 (en) Integrator circuit
JPH06120842A (en) Serial/parallel conversion circuit
JPH0779247B2 (en) Decode circuit
JPS5826858B2 (en) ring counter circuit
JPH08102657A (en) Parallel data counter circuit
JPS636932A (en) Stuff control circuit
JPH01304579A (en) Semiconductor integrated circuit
JPH03225419A (en) Adder
JPH02296413A (en) Data selection circuit
JPS6184126A (en) Mod (2n-1) operating circuit
JP2003168979A (en) Binary code generator
JPH0528746A (en) Fifo memory circuit