JP2728958B2 - Arithmetic processing device and method - Google Patents
Arithmetic processing device and methodInfo
- Publication number
- JP2728958B2 JP2728958B2 JP1310000A JP31000089A JP2728958B2 JP 2728958 B2 JP2728958 B2 JP 2728958B2 JP 1310000 A JP1310000 A JP 1310000A JP 31000089 A JP31000089 A JP 31000089A JP 2728958 B2 JP2728958 B2 JP 2728958B2
- Authority
- JP
- Japan
- Prior art keywords
- multiplier
- arithmetic processing
- output
- adder
- multiplicand
- 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
Links
Landscapes
- Complex Calculations (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は所定の乗算演算及び加算演算を順次行なう演
算処理装置及び方法に関し、特にその構成を大幅に簡略
化することを図ったものである。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic processing apparatus and a method for sequentially performing a predetermined multiplication operation and an addition operation, and particularly to greatly simplify the configuration thereof. .
一般に4つのデイジタルデータA,B,J,Kから下記の演
算式(1)に基づいて新たなデータMを算出する場合 M=J×A+K×B …(1) 該式(1)から明らかなように2回の乗算演算と1回
の加算演算とが必要になる。In general, when calculating new data M from four digital data A, B, J, and K based on the following equation (1), M = J × A + K × B (1) It is clear from equation (1). Thus, two multiplication operations and one addition operation are required.
また、逐次変化するデータA,B,J,Kを用いてこのよう
な演算処理をリアルタイムで行う場合に、1個の乗算器
で2回の乗算演算を時分割処理することが演算時間との
関係で不可能な場合には、J×AとK×Bとを並列に乗
算処理する2個の乗算器及び1個の加算器が必要とな
り、そのようなデイジタル演算処理装置としては第5図
に示すものが知られていた。Further, when such arithmetic processing is performed in real time using sequentially changing data A, B, J, and K, time-division processing of two multiplication operations by one multiplier is required for the calculation time. If this is not possible, two multipliers and one adder for multiplying J × A and K × B in parallel are required, and such a digital processing device is shown in FIG. The one shown was known.
すなわち、このデイジタル演算処理装置は、図示のよ
うに各々3ビツトのデイジタルデータJとA、KとBを
それぞれ乗算し加算することによってM(=m6,m5,m4,m
3,m2,m1,m0)を算出するものであり、J×Aの乗算処理
を行う第1の乗算器(101)と、K×Bの乗算処理を行
う第2の乗算器(102)及び各乗算器(101,102)の演算
出力を加算処理する加算器(103)とを備えて構成され
ている。That is, as shown in the figure, this digital arithmetic processing device multiplies and adds 3-bit digital data J and A, K and B, respectively, to obtain M (= m 6 , m 5 , m 4 , m).
3 , m 2 , m 1 , m 0 ), a first multiplier (101) for performing a J × A multiplication process and a second multiplier (for a K × B multiplication process) 102) and an adder (103) for performing an addition process on the operation output of each multiplier (101, 102).
また、上記各乗算器(101),(102)は図示のように
各9つの論理積回路(以下「AND回路」という)(104〜
112,113〜120)及び各AND回路の出力を所定の重み付け
で加算処理する加算器(121,122)から構成されてお
り、上記各AND回路はJ×A,K×Bの論理積演算を行う。Each of the multipliers (101) and (102) has nine AND circuits (hereinafter referred to as "AND circuits") (104 to 104) as shown in the figure.
112, 113 to 120) and adders (121, 122) for adding the outputs of the respective AND circuits with predetermined weights. Each of the AND circuits performs a logical AND operation of J × A and K × B.
さらに、上記第1の乗算器(101)にはラツチ回路(1
23)を介して一方の上記デイジタルデータAが供給され
るとともに、ラツチ回路(124)を介してデイジタルデ
ータJが供給され、上記第2の乗算器(102)にはラツ
チ回路(125)を介して他方の上記デイジタルデータB
が供給されるとともに、ラツチ回路(126)を介してデ
イジタルデータKが供給される。Further, a latch circuit (1) is provided in the first multiplier (101).
The digital data A is supplied via the latch circuit (124), the digital data J is supplied via the latch circuit (124), and the digital data J is supplied to the second multiplier (102) via the latch circuit (125). The other digital data B
Is supplied, and digital data K is supplied via a latch circuit (126).
次に、上述のような構成のデイジタル演算処理装置の
動作について説明する。Next, the operation of the digital arithmetic processing device having the above configuration will be described.
まず、上記第1の乗算器(101)の動作についてみる
と、この乗算器(101)の上記各AND回路(104〜112)に
よって、各3ビツトの上記データA(a2,a1,a0)とJ
(j2,j1,j0)との論理積演算を行う。First, the operation of the first multiplier (101) will be described. By the respective AND circuits (104 to 112) of the multiplier (101), the 3-bit data A (a 2 , a 1 , a) is obtained. 0 ) and J
Perform a logical AND operation with (j 2 , j 1 , j 0 ).
すなわち、上記AND回路(104〜106)にて構成される
第1群(101a)の各AND回路(104〜106)の一方の入力
端子には乗数Jの最上位桁(22)のビツトデータ(j2)
が供給されるとともに、被乗数Aの各ビツトデータ
(a2,a1,a0)が各々供給され、これらの論理積演算を行
う。That is, the one input terminal of each of the AND circuits (104 to 106) of the first group (101a) constituted by the AND circuits (104 to 106) has bit data of the most significant digit (2 2 ) of the multiplier J. (j 2)
Is supplied, and the respective bit data (a 2 , a 1 , a 0 ) of the multiplicand A are supplied, and the logical product of these is performed.
これによって、この第1群(101a)の各AND回路(104
〜106)からは、J2a2,J2a1,J2a0の各論理積が出力され
る。Thereby, each AND circuit (104) of the first group (101a)
To 106) outputs the logical product of J 2 a 2 , J 2 a 1 , and J 2 a 0 .
以下、AND回路(107〜109)にて構成される第2群(1
0b)の各AND回路は乗算Jの第2桁(21)のビツトデー
タ(j1)と被乗数Aとの論理積演算を行い、AND回路(1
10〜112)から構成される第3群(101c)の各AND回路は
乗数Jの最下位桁(20)のビツトデータ(j0)と被乗数
Aとの論理積演算を行う。Hereinafter, the second group (1) composed of AND circuits (107 to 109)
0b) performs an AND operation of the bit data (j 1 ) of the second digit (2 1 ) of the multiplication J and the multiplicand A, and the AND circuit (1b)
Each of the AND circuits of the third group (101c) composed of 10 to 112) performs a logical AND operation of the bit data (j 0 ) of the least significant digit (2 0 ) of the multiplier J and the multiplicand A.
これによって、上記第2群(101b)及び第3群(101
c)の各AND回路(107〜112)からは、j1a2,j1a1,j1a0,j
0a2,j0a1,j0a0の各論理積が出力される。As a result, the second group (101b) and the third group (101b)
From each AND circuit c) (107~112), j 1 a 2, j 1 a 1, j 1 a 0, j
0 Each logical product of a 2, j 0 a 1, j 0 a 0 is output.
なお、これらAND回路(104〜112)による論理積演算
は、3桁の数どうしの乗算、すなわち、 なる演算におけるXの部分の演算に相当する。The AND operation by these AND circuits (104 to 112) is a multiplication of three-digit numbers, that is, This corresponds to the operation of the X part in the operation.
次に、上述のように求められた各論理積を、上記加算
器(121)によって上記(2)式におけるYの部分に相
当する加算演算を行い、S5,S4,S3,S2,S1,S0なる加算出
力(乗算結果)を得る。Next, the respective ANDs obtained as described above are subjected to an addition operation corresponding to the Y portion in the above equation (2) by the adder (121), and S 5 , S 4 , S 3 , S 2 , S 1 and S 0 are obtained.
なお、上記加算器(121)としては、例えば第6図に
示すように複数の半加算器(128〜130)と全加算器(13
1〜133)とから構成されている。As the adder (121), for example, as shown in FIG. 6, a plurality of half adders (128 to 130) and a full adder (13
1-133).
一方、上記第2の乗算器(102)も上述のような第1
の乗算器(101)と同様に動作して、第1群(102a)な
いし第3群(102c)の各AND回路(113〜121)を用いて
被乗算数B(b2,b1,b0)と乗数K(k2,k1,k0)との論理
積演算を行うとともに、加算器(122)を用いて加算演
算を行い、これによって加算出力(乗算結果)t5,t4,
t3,t2,t1,t0を得る。On the other hand, the second multiplier (102) is also the first multiplier as described above.
Operates in the same manner as the multiplier (101), the number of multiplications with the AND circuits (113-121) of the first group (102a) to the third group (102c) B (b 2, b 1, b 0 ) and the multiplier K (k 2 , k 1 , k 0 ), and an addition operation is performed using the adder (122), whereby the addition output (multiplication result) t 5 , t 4 ,
t 3 , t 2 , t 1 , t 0 are obtained.
そして、上述のように演算して算出された加算出力S5
〜S0,t5〜t0は加算器(103)に供給されて加算演算さ
れ、これによって上記(1)式にて算出されるM(m6,m
5,m4,m3,m2,m1m0)を得る。Then, the addition output S 5 calculated by the above-described operation is calculated.
SS 0 , t 5 tt 0 are supplied to the adder (103) to perform an addition operation, whereby M (m 6 , m) calculated by the above equation (1)
5, m 4, m 3, m 2, m 1 m 0) obtained.
上述のように、従来の技術を用いて上記(1)式のよ
うな演算処理を十分に高速で行う場合には、2個の乗算
器(101,102)と1個の加算器(103)とが必然的に必要
となる。As described above, when the arithmetic processing of the above-described equation (1) is performed at a sufficiently high speed using the conventional technique, two multipliers (101, 102) and one adder (103) are required. Inevitably needed.
このため、この種のデイジタル演算処理装置の回路規
模が大きくなるためにコストアツプの原因となるととも
に、回路を構成する素子数が極めて多いために信頼性が
低下してしまうという問題がある。For this reason, there is a problem that the circuit scale of this type of digital arithmetic processing device becomes large, which causes a cost increase, and that the reliability is reduced because the number of elements constituting the circuit is extremely large.
本発明は上述のような実情に鑑みてなされたものであ
り、回路規模を小さく、かつ構成素子数を少なくしてコ
ストダウンを図ることができるとともに、処理速度の短
縮化を図ることができるデイジタル演算処理装置を提供
することを目的とする。SUMMARY OF THE INVENTION The present invention has been made in view of the above-described circumstances, and has a small circuit scale, a small number of constituent elements, can reduce costs, and can reduce a processing speed. It is an object to provide an arithmetic processing device.
そして、本発明は、乗数と被乗数との対を複数入力と
して持ち、各対の乗算結果を加算した値を出力する演算
処理装置であって、各乗数に基づいて生成される制御信
号により、各被乗数、2つ以上の被乗数の加算結果及び
0値のいずれかを選択し、出力する選択手段と、上記選
択手段から出力される複数の出力に対して所定の重み付
けを行い加算する加算手段とからなることを特徴とする
ものである。The present invention is an arithmetic processing device that has a plurality of pairs of a multiplier and a multiplicand as a plurality of inputs and outputs a value obtained by adding up the multiplication result of each pair, and a control signal generated based on each of the multipliers. A selecting means for selecting and outputting one of a multiplicand, an addition result of two or more multiplicands, and a zero value, and an adding means for performing predetermined weighting on a plurality of outputs output from the selecting means and adding the outputs. It is characterized by becoming.
又、本発明は、乗数と被乗数との対を複数入力として
持ち、各対の乗算結果を加算した値を出力する演算処理
方法であって、各乗数に基づいて生成される制御信号に
より、各被乗数、2つ以上の被乗数の加算結果及び0値
のいずれかを選択的に出力し、出力された複数の選択結
果に対して所定の重み付けを行い加算することを特徴と
するものである。Further, the present invention is an arithmetic processing method having a plurality of pairs of a multiplier and a multiplicand as a plurality of inputs and outputting a value obtained by adding the multiplication result of each pair, wherein each control signal is generated based on each multiplier, One of a multiplicand, an addition result of two or more multiplicands, and a zero value is selectively output, and a plurality of output selection results are subjected to predetermined weighting and added.
本発明によれば、乗数を用いた制御信号によって適宜
切り換えられるセレクタを用いることによって、従来の
演算処理装置に比してその回路規模を大幅に小さくする
とともに、構成素子数を少なくし、さらに演算処理時間
が短縮される。According to the present invention, by using a selector that can be appropriately switched by a control signal using a multiplier, the circuit scale is significantly reduced as compared with a conventional arithmetic processing device, the number of constituent elements is reduced, and furthermore, Processing time is reduced.
以下、本発明に係る演算処理装置及び方法の好適な実
施例を第1図を用いて詳細に説明する。Hereinafter, a preferred embodiment of an arithmetic processing apparatus and method according to the present invention will be described in detail with reference to FIG.
本実施例に係る演算処理装置は、各3ビツトのデイジ
タルデータ(被乗数)A(a2,a1,a0)、B(b2,b1,b0)
と同じく3ビツトのデイジタルデータ(乗数)J(j2,j
1,j0)、K(k2,k1,k0)とに基づいて上記(1)式のよ
うな演算処理を実行するデイジタル演算処理装置であ
り、第1ないし第3のセレクタ(201,202,203)と第1
及び第2の加算器(205,204)を備えて構成されてい
る。The arithmetic processing device according to the present embodiment includes digital data (multiplicands) A (a 2 , a 1 , a 0 ) and B (b 2 , b 1 , b 0 ) of 3 bits each.
And 3-bit digital data (multiplier) J (j 2 , j
1 , j 0 ) and K (k 2 , k 1 , k 0 ), and is a digital operation processing device that executes the operation processing as represented by the above equation (1), and includes first to third selectors (201, 202, 203) ) And the first
And a second adder (205, 204).
すなわち、入力端子(206)には一方の上記被乗数A
が供給され、この被乗数Aの各ビツトデータ(a2,a1,
a0)はラツチ回路(207)にてラツチされてタイミング
制御された後にバスラインを介して各セレクタ(201〜2
03)の1つの入力端子(「10」)に各々供給される。That is, the input terminal (206) has one of the multiplicands A
Is supplied, and each bit data (a 2 , a 1 ,
a 0 ) is latched by a latch circuit (207) and timing-controlled, and then each selector (201-2) is connected via a bus line.
03) is supplied to one input terminal ("10").
同様に、他の入力端子(208)には他方の上記被乗数
Bが供給され、この被乗数Bの各ビツトデータ(b2,b1,
b0)はラツチ回路(209)にてラツチされて上記被乗数
Aのラツチ出力タイミングに同期するように制御された
後に上記各セレクタ(201〜203)の別の入力端子(「0
1」)に各々供給される。Similarly, the other input terminal (208) is supplied with the other multiplicand B, and the bit data (b 2 , b 1 ,
b 0 ) is latched by the latch circuit (209) and is controlled so as to be synchronized with the latch output timing of the multiplicand A, and then is input to another input terminal (“0”) of each of the selectors (201 to 203).
1 ").
また、被乗数A,Bは加算器205にも供給されAとBが加
算される。本実施例では、説明の都合上A+B<23と仮
定する。そうすることによって加算器205の出力は3ビ
ツトで表わすことができるので、これをG(g2,g1,g0)
とする。このGはラツチ回路(214)にラツチされて上
記被乗数Aのラツチ出力タイミングと同期するように制
御された後に上記各セレクタの残りの入力端子(「1
1」)に各々供給される。なお、これら被乗数A,B及び被
乗数A,Bの加算結果Gの各ビツトデータ(a2,a1,a0)、
(b2,b1,b0)、(g2,g1,g0)の重み付けは(22,21,20)
となっている。The multiplicands A and B are also supplied to an adder 205, where A and B are added. In this embodiment, it is assumed that the convenience A + B <2 3 description. By doing so, the output of the adder 205 can be represented by 3 bits, and this is represented by G (g 2 , g 1 , g 0 ).
And This G is latched by a latch circuit (214) and is controlled so as to be synchronized with the latch output timing of the multiplicand A, and then the remaining input terminals ("1
1 "). Each bit data (a 2 , a 1 , a 0 ) of the multiplicands A and B and the addition result G of the multiplicands A and B,
The weights of (b 2 , b 1 , b 0 ) and (g 2 , g 1 , g 0 ) are (2 2 , 2 1 , 2 0 )
It has become.
一方、入力端子(210)には、上記乗数J(j2,j1,
j0)、入力端子(212)には上記乗数K(k2,k1,k0)が
供給され、ラツチ回路(211,213)を介して、各セレク
タに送られる。これら乗数J,Kの各ビツトデータの重み
付けも(22,21,20)である。On the other hand, the multiplier J (j 2 , j 1 ,
j 0 ) and the multiplier K (k 2 , k 1 , k 0 ) are supplied to the input terminal (212) and sent to each selector via the latch circuit (211,213). The weight of each bit data of these multipliers J and K is also (2 2 , 2 1 , 2 0 ).
本発明の乗算器では、上記乗数のビツトデータをすべ
て上記セレクタ(201,202,203)の制御信号として直接
使用する。但し、同一の重みを有するビツトデータは同
一のセレクタに供給する。本実施例ではj2k2の2ビツト
を第1のセレクタ(201)に、j1k1の2ビツトを第2の
セレクタ(202)に、j0k0の2ビツトを第3のセレクタ
(203)に供給している。In the multiplier of the present invention, all the bit data of the multiplier are directly used as control signals of the selectors (201, 202, 203). However, bit data having the same weight is supplied to the same selector. In this embodiment, two bits of j 2 k 2 are used as the first selector (201), two bits of j 1 k 1 are used as the second selector (202), and two bits of j 0 k 0 are used as the third selector. (203).
そして、各セレクタは供給された制御信号が「10」の
場合には、セレクタ入力端子(「10」)、「01」の場合
にはセレクタ入力端子(「01」)、「11」の場合にはセ
レクタ入力端子(「11」)を選択して、該入力端子に供
給されている値を出力する。また制御信号が「00」の場
合には何も選択せずに0値を出力するが、仮想的に0値
の入力された入力端子(「00」)を設け、それを選択し
て出力すると考えてもよい。Each selector selects a selector input terminal (“10”) when the supplied control signal is “10”, a selector input terminal (“01”) when “01”, and a selector input terminal (“01”) when “11”. Selects the selector input terminal ("11") and outputs the value supplied to the input terminal. If the control signal is "00", the value 0 is output without selecting anything. However, if an input terminal ("00") for virtually inputting the value 0 is provided and selected and output, You may think.
このように、上記各セレクタ(201〜203)は、供給さ
れる制御信号(j2k2,j1k1,j0k0)の値(「00」,「1
0」,「01」又は「11」)によって0値又は被乗数A,B又
はG(=A+B)を選択的に出力する。よって、上記第
1のセレクタ(201)の出力値は、制御信号(j2k2)の
値によって下表のようになる。As described above, each of the selectors (201 to 203) determines the value (“00”, “1”) of the supplied control signal (j 2 k 2 , j 1 k 1 , j 0 k 0 ).
0, "01" or "11") to selectively output a zero value or a multiplicand A, B or G (= A + B). Therefore, the output value of the first selector (201) is as shown in the table below according to the value of the control signal (j 2 k 2 ).
よって、これを一般式で表わすと j2・▲▼×A+▲▼・k2×B+j2・k2×(A+
B) …(3) となり、この(3)式の値と上記制御信号(j2,k1)と
の関係は下表となる。 Therefore, when this is represented by a general formula, j 2 ▲ ▼ × A + ▲ ▼ ・ k 2 × B + j 2・ k 2 × (A +
B) (3), and the relationship between the value of the expression (3) and the control signal (j 2 , k 1 ) is as shown in the following table.
よって、上記セレクタ(201)の出力値は (3)式=j2×A+k2×B で表現され、同様に第2及び第3のセレクタ(202,20
3)の各出力値は j1×A+k1×B …(4) j0×A+k0×B …(5) で表現される。 Therefore, the output value of the selector (201) is expressed by Expression (3) = j 2 × A + k 2 × B. Similarly, the second and third selectors (202, 20)
Each output value of 3) is represented by j 1 × A + k 1 × B (4) j 0 × A + k 0 × B (5)
そして、各セレクタ(201〜203)から出力される
(3)〜(5)式にて表現される各データd4,d3,d2,e3,
e2,e1,f2,f1,f0は、後段の加算器(204)にて所定の重
み付けがなされて加算処理される。Then, each data d 4 , d 3 , d 2 , e 3 , which is output from each selector (201 to 203) and is expressed by the equations (3) to (5),
The e 2 , e 1 , f 2 , f 1 , and f 0 are subjected to predetermined weighting by an adder (204) at the subsequent stage, and are subjected to addition processing.
すなわち、制御信号(j2k2,j1k1,j0k0)に対する重み
付けは、先に説明したように(22,21,20)に設定されて
おり、各セレクタ(201〜203)の出力値に対しては、供
給されるビツトデータに対する重み付けがなされる。That is, the control signal (j 2 k 2, j 1 k 1, j 0 k 0) weighting for is set to, as described previously (2 2, 2 1, 2 0), the selectors (201 -203) are weighted with respect to the supplied bit data.
よって、第1ないし第3のセレクタ(201〜203)の重
み付けを考慮した各出力値は、 22×(j2×A+k2×B) …(6)式 21×(j1×A+k1×B) …(7)式 20×(j0×A+k0×B) …(8)式 の各式にて表現することができ、各セレクタの出力値
(d4,d3,d2)(e3,e2,e1)(f2,f1,f0)の添字が重み付
け係数に対応している。Thus, each output value in consideration of the weights of the first to third selectors (201 to 203) are, 2 2 × (j 2 × A + k 2 × B) ... (6) Equation 2 1 × (j 1 × A + k 1 × B) ... (7) equation 2 0 × (j 0 × a + k 0 × B) ... (8) can be expressed by the equation of formula, the output value of the selector (d 4, d 3, d 2 The subscripts of () (e 3 , e 2 , e 1 ) (f 2 , f 1 , f 0 ) correspond to the weighting coefficients.
そして、このような重み付けがなされた各出力値は加
算器(204)にて加算され、6ビツトの演算出力M(m5,
m4,m3,m2,m1,m0)が出力される。The output values thus weighted are added by an adder (204), and a 6-bit operation output M (m 5 ,
m 4 , m 3 , m 2 , m 1 , m 0 ) are output.
上記加算器(204)の構成は、従来例(第5図)の乗
算器の中で使われている加算器(121,122)、すなわち
第6図の加算器と同じである。The configuration of the adder (204) is the same as the adder (121, 122) used in the multiplier of the conventional example (FIG. 5), that is, the adder of FIG.
上述のような構成のデイジタル演算処理装置における
演算出力Mは、上述の説明から明らかなように上記
(6)式、(7)式、(8)式の和となる。The operation output M in the digital operation processing device having the above configuration is the sum of the above expressions (6), (7) and (8), as is clear from the above description.
すなわち、 M=(6)式+(7)式+(8)式 =(22・j2+21・j1+20・j0)×A+(22・k2+21・
k1+20k0)×B となり、上式において、22・j2+21・j1+20・j0=J、
22・k2+21・k1+20k0=Kであるから、 M=J×A+K×B となる。That, M = (6) where + (7) + (8) = (2 2 · j 2 +2 1 · j 1 +2 0 · j 0) × A + (2 2 · k 2 +2 1 ·
k 1 +2 0 k 0 ) × B, and in the above equation, 2 2 · j 2 +2 1 · j 1 +2 0 · j 0 = J,
Because it is 2 2 · k 2 +2 1 · k 1 +2 0 k 0 = K, the M = J × A + K × B.
よって第1図に示す構成のデイジタル演算処理装置に
より目的とする演算結果を得ることができる。Therefore, a desired operation result can be obtained by the digital operation processing device having the configuration shown in FIG.
このように、本実施例に係るデイジタル演算処理装置
によれば、前記(1)式のような演算処理を行なうのに
被乗数AとBをあらかじめ加算した結果とAとBを乗数
の各ビツトデータに基づいて選択し、その選択出力を加
算することにより、従来例のような各々独立した乗算器
を2個設ける必要がなくなる。よって本実施例によれ
ば、この種のデイジタル演算処理装置の回路規模及び構
成素子数を大幅に削減し簡略化することができる。As described above, according to the digital arithmetic processing device according to the present embodiment, the result of adding the multiplicands A and B in advance and performing the arithmetic processing as in the above equation (1) and the bit data of the multipliers A and B , And adding the selected outputs, it is not necessary to provide two independent multipliers as in the conventional example. Therefore, according to the present embodiment, the circuit scale and the number of components of this kind of digital operation processing device can be greatly reduced and simplified.
また、上述の実施例における加算器(205)の処理時
間と、第5図に示した従来例における後段の加算器(10
3)の処理時間とは、本実施例の加算器(205)における
ビツト数の方が従来例のものよりも少ないため早くな
る。Further, the processing time of the adder (205) in the above-described embodiment is different from the processing time of the subsequent adder (10) in the conventional example shown in FIG.
The processing time of 3) is shorter because the number of bits in the adder (205) of this embodiment is smaller than that of the conventional example.
よって、上述のような本実施例によれば、その処理時
間の短縮化を図ることができる。Therefore, according to the present embodiment as described above, the processing time can be reduced.
本発明の第2の実施例を第2図に示す。 FIG. 2 shows a second embodiment of the present invention.
第2図の構成は第1図の構成から第1の加算器(20
5)と該加算出力をラツチするラツチ回路(214)を取り
除き、それに伴い入力数の減った第1ないし第3のセレ
クタ(201,202,203)を第4図に示す構成のAND-OR回路
(301,302,303)に変更したものである。第2の実施例
で演算する処理の内容は上記(1)式と同じである。但
し、被乗数AとB(各々3ビツトのデータ)の間に下式
の条件を仮定するものである。The configuration of FIG. 2 is different from the configuration of FIG.
5) and the latch circuit (214) for latching the added output are removed, and the first to third selectors (201, 202, 203) having a reduced number of inputs are added to the AND-OR circuits (301, 302, 303) having the configuration shown in FIG. It has been changed. The contents of the processing performed in the second embodiment are the same as those in the above equation (1). However, the following condition is assumed between the multiplicands A and B (each 3-bit data).
A+B=23−1=7 …(9) 上記、条件によってAとBの加算結果はいつも7にな
ることから、AとBを加算する必要がなくなるのであ
る。A + B = 2 3 -1 = 7 (9) Since the addition result of A and B is always 7 depending on the above conditions, it is not necessary to add A and B.
よって、第1図における第1の加算器(205)及びそ
の出力をラツチするラツチ回路(214)を取り除くこと
ができる。Therefore, the first adder (205) and the latch circuit (214) for latching the output thereof in FIG. 1 can be eliminated.
次に、7というデータは3ビツトで表現すると1112で
あるから、第1図におけるセレクタ(201,202,203)を
そのまま使用し、これらすべてのセレクタ(201,202,20
3)の入力端子(「11」)に、「1」を供給すること
で、目的の演算を行なうこともできるが、セレクタの制
御信号と出力の関係及びAとBの関係を整理すると、第
1図におけるセレクタ(201,202,203)は第3図に示す
構成のものを使用することが可能になる。すなわち、セ
レクタ制御信号と出力には下表のような関係があり、 A+B=7より、ai=▲▼(i=0,1,2)である
から、、第3図に示すAND-OR回路で同一の機能を実現で
きる。Next, since the data is Expressed in three bits 111 2 of 7, accept the selector (201, 202, 203) in FIG. 1, all of these selectors (201,202,20
By supplying "1" to the input terminal ("11") of 3), the desired operation can be performed. However, when the relationship between the control signal and the output of the selector and the relationship between A and B are arranged, The selectors (201, 202, 203) in FIG. 1 can use the configuration shown in FIG. That is, the selector control signal and the output have the relationship shown in the table below, Since A + B = 7, ai = ▲ (i = 0, 1, 2), and therefore, the same function can be realized by the AND-OR circuit shown in FIG.
よって、第3図に示す構成のデイジタル演算処理装置
により(9)式の条件下の(1)式を演算することがで
きる。Therefore, equation (1) under the condition of equation (9) can be calculated by the digital processing unit having the configuration shown in FIG.
ところで、(9)式の条件下の(1)式は変形すると
下記のようになる。By the way, when the expression (1) under the condition of the expression (9) is modified, it becomes as follows.
但し、この(10)式におけるRは7(A+B=23−
1)である。 Here, R in the equation (10) 7 (A + B = 2 3 -
1).
上記(10)式が物理的に意味するものは、J及びKと
いう信号を という割合でミツクスしてR倍したものをMに出力する
ということであり、このような処理回路はミキシング回
路において大変有効である。What the above equation (10) physically means is that the signals J and K are That is, a signal obtained by mixing at the ratio and multiplying by R is output to M, and such a processing circuit is very effective in a mixing circuit.
なお本実施例ではA+B=2n−1(n=3)の場合に
ついて説明したが、A+B=任意の設定値についても応
用可能である。In the present embodiment, the case where A + B = 2 n -1 (n = 3) has been described. However, it is also possible to apply A + B = arbitrary set value.
このように本実施例に係るデイジタル演算処理装置に
よれば、前記(10)式のような演算処理を行なうのに必
要な回路規模は第5図に示した従来例における乗算器1
ケ相当で済み、大幅な回路の削減と簡略化が可能にな
る。As described above, according to the digital arithmetic processing device according to the present embodiment, the circuit scale required for performing the arithmetic processing as shown in the above equation (10) requires the multiplier 1 in the conventional example shown in FIG.
And the circuit can be greatly reduced and simplified.
また、このように構成を簡略化することによって、演
算処理時間も短縮化できる。すなわち先に第6図に示し
た従来例では、各乗算器による乗算出力を後段の加算器
(103)にて加算演算をすることが必要であった。しか
し、本実施例では後段の加算器は必要ないためこの分だ
け演算時間を短縮できる。Further, by simplifying the configuration in this way, the operation processing time can be reduced. That is, in the conventional example shown in FIG. 6, it is necessary to add the multiplied outputs of the respective multipliers in the adder (103) in the subsequent stage. However, in the present embodiment, since the subsequent adder is not required, the operation time can be reduced by that much.
本発明の第3の実施例を第4図に示す。 FIG. 4 shows a third embodiment of the present invention.
同図において、501は第1の被乗数A(a2,a1,a0)、5
02は第2の被乗数B(b2,b1,b0)、503は第3の被乗数
H(h2,h1,h0)、504は第1の乗数J(j2,j1,j0)、505
は第2の乗数K(k2,k1,k0)、506は第3の乗数L(l2,
l1,l0)を各々入力する端子、507,508,509はそれぞれA
とB、AとH、BとHを加算する加算器、510は前記B
とHを加算する加算器(509)の出力にAを加算する加
算器、511,512,513はA,B,H,A+B,A+H,B+H,A+B+C,0
の中からどれか1つを選択して出力するセレクタ、514
は該セレクタ(511,512,513)の出力を加算する加算
器、215は演算結果を出力する端子である。In the figure, reference numeral 501 denotes a first multiplicand A (a 2 , a 1 , a 0 ), 5
02 is the second multiplicand B (b 2 , b 1 , b 0 ), 503 is the third multiplicand H (h 2 , h 1 , h 0 ), and 504 is the first multiplier J (j 2 , j 1 , j 0 ), 505
Is the second multiplier K (k 2 , k 1 , k 0 ), and 506 is the third multiplier L (l 2 ,
l 1 , l 0 ), and 507, 508, 509 are A
And B, A and H, and an adder for adding B and H.
511, 512, 513 are A, B, H, A + B, A + H, B + H, A + B + C, 0
Selector 514 to select and output any one of
Is an adder for adding the outputs of the selectors (511, 512, 513), and 215 is a terminal for outputting the operation result.
本実施例は、上述の回路を用いて下記の演算を行なう
ものである。In this embodiment, the following operation is performed using the above-described circuit.
M=J×A+K×B+L×H …(11) 以下、動作説明を行なう。M = J × A + K × B + L × H (11) The operation will be described below.
端子501,502,503から入力された3つの被乗数A,B,Hの
データはそれぞれセレクタ(511,512,513)の各端子に
分配供給されると共に、加算器(507,508,509,510)に
も供給される。加算器507,508,509はそれぞれAとB、
AとH、BとHを加算し、その結果をセレクタ511,512,
513に供給する。加算器510は、加算器509から出力され
るB+Hという値にAを加算してA+B+Hという値を
出力し、それをセレクタ511,512,513に供給する。The data of the three multiplicands A, B, and H input from the terminals 501, 502, and 503 are distributed and supplied to the terminals of the selectors (511, 512, and 513), and are also supplied to the adders (507, 508, 509, and 510). Adders 507, 508, 509 are A and B, respectively.
A and H, B and H are added, and the result is added to selectors 511, 512,
Supply 513. The adder 510 adds A to the value B + H output from the adder 509, outputs a value A + B + H, and supplies it to the selectors 511, 512, 513.
一方、端子504,505,506には3つの乗数J(j2,j1,
j0)、K(k2,k1,k0)、L(l2,l1,l0)が入力され、そ
れらのビツトデータは同じ重みのビツトごとに分割さ
れ、第1のセレクタ(511)にはj2k2l2、第2のセレク
タ(512)にはj1k1l1、第3のセレクタ(513)にはj0k0
l0が制御信号として供給される。On the other hand, the terminals 504, 505, and 506 have three multipliers J (j 2 , j 1 ,
j 0 ), K (k 2 , k 1 , k 0 ) and L (l 2 , l 1 , l 0 ) are input, and their bit data are divided into bits having the same weight, and the first selector ( the 511) j 2 k 2 l 2 , the second selector (512) j 1 k 1 l 1, the third selector (513) j 0 k 0
10 is supplied as a control signal.
各セレクタには、A,B,H,A+B,A+H,B+H,A+B+Hと
いう7つのデータがデータ入力端子に供給され、それら
を選択する制御信号としてj,k,lの3つのビツトが与え
られている。制御信号と選択出力信号の関係は下記の表
に示すように決められている。To each selector, seven data A, B, H, A + B, A + H, B + H, A + B + H are supplied to data input terminals, and three bits j, k, l are given as control signals for selecting them. I have. The relationship between the control signal and the selected output signal is determined as shown in the following table.
制御信号が3ビツトとも0である場合には、上記7つ
のデータのいずれも選択せずに0を出力する(別の言い
方をすれば、0を選択して出力するとも言える。)。 When the control signal is 0 in all three bits, 0 is output without selecting any of the above seven data (in other words, it can be said that 0 is selected and output).
このようなセレクタの出力値は被乗数A,B,Hと制御信
号j,k,lを用いて式で表現できる。以下に第1〜第3セ
レクタの出力値を順に記す。The output value of such a selector can be expressed by an equation using multiplicands A, B, H and control signals j, k, l. The output values of the first to third selectors will be described below in order.
j2×A+k2×B+l2×H …(12) j1×A+k1×B+l1×H …(13) j0×A+k0×B+l0×H …(14) 各セレクタの出力値は後段の加算器で所定の重み付け
がなされて加算処理される。重み付けを考慮した各出力
値は、 22×(j2×A+k2×B+l2×H) …(15) 21×(j1×A+k1×B+l1×H) …(16) 20×(j0×A+k0×B+l0×H) …(17) となり、後段の加算器(514)は上記3つの値を加算し
てM(m5,m4,m3,m2,m1,m0)に出力する。よって M=(15)式+(16)式+(17)式 =(22・j2+21・j1+20・j0)×A+(22・k2+21・
k1+20・k0)×B+(22・l2+21・l1+20・l0)×H 上式において、22・j2+21・j1+20・j0=J、22・k2+
21・k1+20・k0=K、22・l2+21・l1+20・l0=Lであ
るから M=J×A+K×B+L×H となる。j 2 × A + k 2 × B + l 2 × H (12) j 1 × A + k 1 × B + l 1 × H (13) j 0 × A + k 0 × B + l 0 × H (14) The output value of each selector is The adder performs a predetermined weighting and adds processing. Each output value in consideration of the weighting, 2 2 × (j 2 × A + k 2 × B + l 2 × H) ... (15) 2 1 × (j 1 × A + k 1 × B + l 1 × H) ... (16) 2 0 × (J 0 × A + k 0 × B + 1 0 × H) (17), and the subsequent adder (514) adds the above three values to obtain M (m 5 , m 4 , m 3 , m 2 , m 1 , m 0 ). Therefore M = (15) where + (16) + (17) = (2 2 · j 2 +2 1 · j 1 +2 0 · j 0) × A + (2 2 · k 2 +2 1 ·
In k 1 +2 0 · k 0) × B + (2 2 · l 2 +2 1 · l 1 +2 0 · l 0) × H above equation, 2 2 · j 2 +2 1 · j 1 +2 0 · j 0 = J , 2 2 · k 2 +
2 1 · k 1 +2 0 · k 0 = K, 2 2 · l 2 +2 1 · l 1 +2 0 · since l is 0 = L a M = J × A + K × B + L × H.
このように本発明の実施例によれば、(11)式の演算
処理を行なう場合、従来なら3つの乗算器と該乗算結果
を加算する2つの加算器が必要であったものが、加算器
4つと乗算器1つ相当の回路規模で実現できる。As described above, according to the embodiment of the present invention, when the arithmetic processing of the equation (11) is performed, three multipliers and two adders for adding the multiplication result were conventionally required. It can be realized with a circuit scale equivalent to four and one multiplier.
また、第2の実施例で見てきたように、被乗数A,B,H
の総和が一定という条件のもとでは、さらに回路の削減
が可能である。Also, as seen in the second embodiment, the multiplicands A, B, H
Can be further reduced under the condition that the sum of the constants is constant.
なお、上述の各実施例は、本発明をデイジタル演算処
理装置に適用したが、本発明はアナログ演算処理装置に
適用してもよいことは当然である。In each of the above-described embodiments, the present invention is applied to a digital arithmetic processing device. However, it goes without saying that the present invention may be applied to an analog arithmetic processing device.
上述の説明から明らかなように、本発明によれば、例
えば4つのデイジタルデータA,B,J,Kに対して M=J×A+K×B という演算を行なう場合、従来は乗算器が2つと加算器
が1つ必要であったが、本発明によれば、乗算器1つと
加算器1つ相当の回路規模で実現できる。As is apparent from the above description, according to the present invention, for example, when an operation of M = J × A + K × B is performed on four digital data A, B, J, and K, conventionally, there are two multipliers. Although one adder is required, according to the present invention, it can be realized with a circuit scale equivalent to one multiplier and one adder.
よって、本発明によれば、この種演算処理装置の回路
規模を小さくするとともに構成素子数を少なくすること
ができ、これによってコストダウンを図ることができ
る。Therefore, according to the present invention, it is possible to reduce the circuit scale of this type of arithmetic processing device and the number of constituent elements, thereby achieving cost reduction.
また、本発明によれば、このような回路規模の縮小化
によって演算処理速度の短縮化をも図ることができる。Further, according to the present invention, the processing speed can be reduced by reducing the circuit scale.
第1図は本発明の第1の実施例の演算処理回路を示すブ
ロツク図、 第2図は本発明の第2の実施例の演算処理回路を示すブ
ロツク図、 第3図は第2図における、AND-OR回路の構成を表わすブ
ロツク図、 第4図は本発明の第3の実施例の演算処理回路を示すブ
ロツク図、 第5図は従来例を示すブロツク図、 第6図は第5図に使われている乗算器の内部にある加算
器の構成を表わすブロツク図である。 206,208はそれぞれ3ビツトの被乗数A,Bを入力する端
子、 210,212はそれぞれ3ビツトの乗数J,Kを入力する端子、 215は6ビツトの演算結果を出力する端子、 201,202,203は2つの被乗数A,Bとそれらの和(A+B)
の内の1つを選択して出力するセレクタ、 205はAとBを加算する加算器、 207,209,211,213,214はそれぞれ3ビツトのデータをラ
ツチするラツチ回路。FIG. 1 is a block diagram showing an arithmetic processing circuit according to a first embodiment of the present invention, FIG. 2 is a block diagram showing an arithmetic processing circuit according to a second embodiment of the present invention, and FIG. , A block diagram showing the configuration of an AND-OR circuit, FIG. 4 is a block diagram showing an arithmetic processing circuit of a third embodiment of the present invention, FIG. 5 is a block diagram showing a conventional example, and FIG. FIG. 3 is a block diagram showing a configuration of an adder inside a multiplier used in the drawing. 206 and 208 are terminals for inputting 3-bit multiplicands A and B, 210 and 212 are terminals for inputting 3-bit multipliers J and K, 215 is a terminal for outputting a 6-bit operation result, and 201, 202 and 203 are two multiplicands A and B. And their sum (A + B)
A selector 205 selects and outputs one of them, 205 is an adder for adding A and B, and 207, 209, 211, 213, and 214 are latch circuits for latching 3-bit data.
Claims (2)
ち、各対の乗算結果を加算した値を出力する演算処理装
置であって、 各乗数に基づいて生成される制御信号により、各被乗
数、2つ以上の被乗数の加算結果及び0値のいずれかを
選択し、出力する選択手段と、 上記選択手段から出力される複数の出力に対して所定の
重み付けを行い加算する加算手段とからなることを特徴
とする演算処理装置。An arithmetic processing device having a plurality of pairs of a multiplier and a multiplicand as a plurality of inputs and outputting a value obtained by adding a multiplication result of each pair, wherein each multiplicand is controlled by a control signal generated based on the multiplier. A selection means for selecting and outputting any one of the addition result of the two or more multiplicands and a zero value, and an addition means for weighting a plurality of outputs output from the selection means and adding the weighted outputs. An arithmetic processing device characterized by the above-mentioned.
ち、各対の乗算結果を加算した値を出力する演算処理方
法であって、 各乗数に基づいて生成される制御信号により、各被乗
数、2つ以上の被乗数の加算結果及び0値のいずれかを
選択的に出力し、出力された複数の選択結果に対して所
定の重み付けを行い加算することを特徴とする演算処理
方法。2. An arithmetic processing method having a plurality of pairs of a multiplier and a multiplicand as a plurality of inputs and outputting a value obtained by adding the multiplication result of each pair, wherein each multiplicand is controlled by a control signal generated based on the multiplier. An arithmetic processing method characterized by selectively outputting any one of an addition result of two or more multiplicands and a zero value, performing predetermined weighting on a plurality of output selection results, and adding them.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1310000A JP2728958B2 (en) | 1989-11-28 | 1989-11-28 | Arithmetic processing device and method |
| US07/899,137 US5185714A (en) | 1989-09-19 | 1992-06-16 | Arithmetic operation processing apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1310000A JP2728958B2 (en) | 1989-11-28 | 1989-11-28 | Arithmetic processing device and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03167663A JPH03167663A (en) | 1991-07-19 |
| JP2728958B2 true JP2728958B2 (en) | 1998-03-18 |
Family
ID=17999941
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1310000A Expired - Fee Related JP2728958B2 (en) | 1989-09-19 | 1989-11-28 | Arithmetic processing device and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2728958B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6089273A (en) * | 1983-10-20 | 1985-05-20 | Mitsubishi Electric Corp | Arithmetic unit |
| JPS6238982A (en) * | 1985-08-15 | 1987-02-19 | Fuji Electric Co Ltd | Coordinate conversion arithmetic and logic unit |
-
1989
- 1989-11-28 JP JP1310000A patent/JP2728958B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH03167663A (en) | 1991-07-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5754459A (en) | Multiplier circuit design for a programmable logic device | |
| JPS6347874A (en) | Arithmetic unit | |
| JP2511914B2 (en) | Complex multiplier and complex multiplication method | |
| US5185714A (en) | Arithmetic operation processing apparatus | |
| US6018758A (en) | Squarer with diagonal row merged into folded partial product array | |
| EP0137386B1 (en) | Digital multiplying circuit | |
| EP0281132B1 (en) | Vector calculation circuit capable of rapidly carrying out vector calculation of three input vectors | |
| US5001661A (en) | Data processor with combined adaptive LMS and general multiplication functions | |
| US4490805A (en) | High speed multiply accumulate processor | |
| JP2760170B2 (en) | Learning machine | |
| GB2263002A (en) | Parallel binary adder. | |
| US4695970A (en) | Linear predictive coding technique with interleaved sequence digital lattice filter | |
| JP2728958B2 (en) | Arithmetic processing device and method | |
| US5777915A (en) | Multiplier apparatus and method for real or complex numbers | |
| JP3227538B2 (en) | Binary integer multiplier | |
| GB2206428A (en) | Computer | |
| JP2744299B2 (en) | Arithmetic processing device and method | |
| JP2737933B2 (en) | Division device | |
| KR100265355B1 (en) | Apparatus for performing multiply operation of floating point data with 2-cycle pipeline scheme in microprocessor | |
| JP3515462B2 (en) | Remainder arithmetic device and method | |
| JP2606339B2 (en) | Multiplier | |
| EP0129039A1 (en) | Improved multiplier architecture | |
| JPH04364525A (en) | Parallel arithmetic unit | |
| JPH02114324A (en) | Multiplier | |
| JPH02115929A (en) | Multiplier |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081212 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |