JP2550597B2 - Squarer - Google Patents

Squarer

Info

Publication number
JP2550597B2
JP2550597B2 JP62213351A JP21335187A JP2550597B2 JP 2550597 B2 JP2550597 B2 JP 2550597B2 JP 62213351 A JP62213351 A JP 62213351A JP 21335187 A JP21335187 A JP 21335187A JP 2550597 B2 JP2550597 B2 JP 2550597B2
Authority
JP
Japan
Prior art keywords
rom
value
input signal
bit
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.)
Expired - Fee Related
Application number
JP62213351A
Other languages
Japanese (ja)
Other versions
JPS6457332A (en
Inventor
孝雄 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP62213351A priority Critical patent/JP2550597B2/en
Publication of JPS6457332A publication Critical patent/JPS6457332A/en
Application granted granted Critical
Publication of JP2550597B2 publication Critical patent/JP2550597B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、音響信号の符号化における距離(ユークリ
ツド距離)計算等の長語長のデイジタル値の2乗算に使
用して好適な2乗器に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention is a squarer suitable for use in the multiplication of a digital value of a long word length such as distance (Euclidean distance) calculation in encoding an acoustic signal. Regarding

〔発明の概要〕[Outline of Invention]

本発明は2乗器に関し、入力信号の上位ビツトと下位
ビツトを分割して演算を行うことにより、全体の回路規
模を従来のものより縮小できるようにしたものである。
The present invention relates to a squarer, in which an upper bit and a lower bit of an input signal are divided and an operation is performed so that the whole circuit scale can be reduced as compared with a conventional one.

〔従来の技術〕[Conventional technology]

例えば音響信号の符号化において距離(ユークリツド
距離)計算を行う場合には、10〜16ビツトの2乗算が用
いられる。その場合に従来のnビツトのデイジタル値の
2乗算を行う方法としては一般に (1) n×nビツトの乗算器 (2) 2nワード、2nビツト幅のROM を用いる方法が知られている。
For example, when a distance (Euclidean distance) is calculated in encoding an audio signal, 10 to 16 bits of 2 multiplication are used. In that case the general (1) as a method of performing squaring digital values of the conventional n bits n × n bit multiplier (2) 2 n words, a method of using a ROM of 2n bits wide are known.

これらの方法において、例えば(1)における回路規
模は、 C1・n2(C1は定数) で求められ、一方(2)における回路規模は、 C2・2n・2n(C2は定数) で求められる。ここでC1,C2の値はデバイスの種類によ
つて異なるが、一般的にnが小のときは(2)の方式が
有利であり、nが大きくなるにつれて(1)の方式が有
利になるとされている。
In these methods, for example, the circuit scale in (1) is calculated by C 1 · n 2 (C 1 is a constant), while the circuit scale in (2) is C 2 · 2n · 2 n (C 2 is a constant). ) Is required. The values of C 1 and C 2 differ depending on the type of device. Generally, the method (2) is advantageous when n is small, and the method (1) is advantageous as n increases. It is supposed to be.

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

しかしながら上述の方法では、nがさらに大きくなる
と、(1)の方式であつても回路規模が相当に大きくな
り、装置の構成上の問題点になつていた。
However, in the above-mentioned method, when n is further increased, the circuit scale is considerably increased even in the method of (1), which is a problem in the configuration of the device.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、入力信号に対して2乗演算を実行する2乗
器において、上記入力信号の上位ビットを上記上位ビッ
トの2乗値に変換する第1のROM(2)と、上記入力信
号の下位ビットを上記下位ビットの2乗値に変換する第
2のROM(3)と、上記入力信号の上位ビットと上記入
力信号の下位ビットとの乗算を行う乗算器(4)と、入
力信号を2乗値を得るように、上記第1のROM、上記第
2のROM及び上記乗算器からの出力値を加算する加算器
(7)とからなることを特徴とする2乗器、あるいは入
力信号に対して2乗演算を実行する2乗器において、上
記入力信号の上位ビットを第1のシフト量を補正した値
が与えられた上記上位ビットの2乗値に変換する第1の
ROM(12)と、上記入力信号の下位ビットを上記第1の
シフト量を補正した値が与えられた上記下位ビットの2
乗値に変換する第2のROM(13)と、上記入力信号の上
位ビットと上記入力信号の下位ビットとの加算を行う第
1の加算器(14)と、上記第1の加算器からの出力値を
上記第1の加算器からの出力値の2乗値に変換する第3
のROM(15)と、入力信号を2乗値を得るように、上記
第1のROM、上記第2のROM及び上記第3のROMからの出
力値を第2のシフト量だけシフト(回路(16)(17))
して加算する第2の加算器(19)とからなることを特徴
とする2乗器である。
According to the present invention, in a squarer for performing a square operation on an input signal, a first ROM (2) for converting the upper bit of the input signal into a squared value of the upper bit, and the input signal A second ROM (3) for converting the lower bit to the squared value of the lower bit; a multiplier (4) for multiplying the upper bit of the input signal by the lower bit of the input signal; A squarer or an input signal characterized by comprising an adder (7) for adding output values from the first ROM, the second ROM and the multiplier so as to obtain a squared value. In a squarer that performs a square operation on the first bit of the input signal, the upper bit of the input signal is converted into a squared value of the upper bit given a value obtained by correcting the first shift amount.
ROM (12) and the lower bit 2 of the lower bit of the input signal given a value obtained by correcting the first shift amount.
A second ROM (13) for converting into a power value, a first adder (14) for adding the upper bit of the input signal and the lower bit of the input signal, and the first adder A third for converting the output value into a squared value of the output value from the first adder
Of the ROM (15) and the output values from the first ROM, the second ROM, and the third ROM so as to obtain the squared value of the input signal by the second shift amount (circuit ( 16) (17))
And a second adder (19) for adding and adding.

〔作用〕[Action]

これによれば、ROM方式及び乗算器方式の長所が調和
して取入れられているので、必要な語長範囲で回路規模
を従来のものより縮小することができる。
According to this, since the advantages of the ROM system and the multiplier system are taken in harmony, the circuit scale can be reduced in comparison with the conventional one in the necessary word length range.

〔実施例〕〔Example〕

本願の2乗器において、まず入力されるnビツトのデ
イジタル値Xが、上位m1ビツトの値Aと下位m2ビツトの
値Bとに分割される。ここでnが偶数のときは であり、nが奇数のときは、 である。また で表わされる。
In the squaring device of the present application, first, the inputted n-bit digital value X is divided into the upper m 1 bit value A and the lower m 2 bit value B. Here, when n is an even number And when n is an odd number, Is. Also Is represented by

そこで第1図は第1の実施例を示し、この図におい
て、入力レジスタ(1)に供給されたデイジタル値Xの
上位の値Aと下位の値Bとがそれぞれ2乗算を行うROM
(2)(3)に供給されると共に、値AとBとが乗算器
(4)に供給される。このROM(2)の出力値A2のシフト回路(5)に供給され、乗算器(4)の出力値
A・Bが のシフト回路(6)に供給される。そしてこのシフト回
路(5)の出力値 と、シフト回路(6)の出力値 と、ROM(3)の出力値B2とが加算器(7)に供給さ
れ、これらの加算値が出力レジスタ(8)に出力され
る。
Therefore, FIG. 1 shows a first embodiment, in which a ROM in which an upper value A and a lower value B of a digital value X supplied to an input register (1) are respectively multiplied by two.
The values A and B are supplied to the multiplier (4) while being supplied to (2) and (3). The output value A 2 of this ROM (2) is Is supplied to the shift circuit (5) of and the output values A and B of the multiplier (4) are Of the shift circuit (6). And the output value of this shift circuit (5) And the output value of the shift circuit (6) And the output value B 2 of the ROM (3) are supplied to the adder (7), and these added values are output to the output register (8).

従つてこの回路において、加算器(7)からは が出力され、出力レジスタ(8)には入力デイジタル値
Xの2乗値X2が取出される。
Therefore, in this circuit, from the adder (7) There is output, the output register (8) is square value X 2 of the input digital value X is taken out.

そしてこの回路において、ROM(2)の回路規模は、 ROM(3)の回路規模は、 乗算器(4)の回路規模は、 C1・m1・m2 加算器(7)の回路規模は C3・(m1+m2)(C3は定数) であり、ここで とすると、 全体の回路規模は、 となり、この場合に語長によつて回路規模が大幅に増大
されるROMの語長が短くされているので全体の回路規模
を縮小することができる。
And in this circuit, the circuit scale of ROM (2) is The circuit scale of ROM (3) is The circuit scale of the multiplier (4) is C 1 · m 1 · m 2 adder (7) is C 3 · (m 1 + m 2 ) (C 3 is a constant). Then, the total circuit scale is In this case, the circuit size is greatly increased depending on the word length. Since the word length of the ROM is shortened, the entire circuit size can be reduced.

さらに第2図は第2の実施例を示す。すなわちこの例
においては入力レジスタ(11)に供給されたデイジタル
値Xの上位の値Aと下位の値Bとがそれぞれ2乗算を行
うROM(12)(13)に供給されると共に値AとBとが加
算器(14)に供給され、さらにこの加算値A+Bが2乗
算を行うROM(15)に供給される。そしてROM(12)から
ROM(13)からは ROM(15)からは(A+B)が取出される。このROM
(12)(15)がそれぞれ のシフト回路(16)(17)に供給され、このシフト回路
(16)の出力値 と、シフト回路(17)の出力値 と、ROM(13)の出力値 とが加減算器(18)に供給され、この加減算値 が出力レジスタ(19)に出力される。
Further, FIG. 2 shows a second embodiment. That is, in this example, the upper value A and the lower value B of the digital value X supplied to the input register (11) are supplied to the ROMs (12) and (13) which perform the multiplication by 2, and the values A and B are also supplied. And are supplied to the adder (14), and the added value A + B is further supplied to the ROM (15) for performing the multiplication by 2. And from ROM (12) From ROM (13) (A + B) 2 is taken out from the ROM (15). This ROM
(12) (15) are respectively Output value of this shift circuit (16) supplied to the shift circuit (16) (17) And the output value of the shift circuit (17) And the output value of ROM (13) And are supplied to the adder / subtractor (18), Is output to the output register (19).

従つてこの回路において、加減算器(18)から出力さ
れる値を変形すると、 となり、出力レジスタ(19)には入力デイジタル値Xの
2乗値X2が取出される。
Therefore, if the value output from the adder / subtractor (18) is transformed in this circuit, Next, the square value X 2 of the input digital value X is taken out to the output register (19).

そしてこの回路において、ROM(12)の回路規模は、 ROM(13)の回路規模は、 ROM(15)の回路規模は、 加算器(14)(18)の回路規模は、それぞれ C3・(m1+m2) であり、ここで とすると、全体の回路規模は、 となり、ROMの語長が短くされると共に、乗算器が削除
されて、全体の回路規模が縮小される。
And in this circuit, the circuit scale of ROM (12) is The circuit scale of ROM (13) is The circuit scale of ROM (15) is The circuit scale of the adders (14) and (18) is C 3 · (m 1 + m 2 ), respectively, where Then, the total circuit scale is Therefore, the word length of the ROM is shortened, and the multiplier is deleted to reduce the overall circuit scale.

こうして上述の回路によれば、ROM方式及び乗算器方
式の長所が調和して取入れられているので、必要な語長
範囲で回路規模を従来のものより縮小することができ
る。
Thus, according to the above-mentioned circuit, the advantages of the ROM system and the multiplier system are incorporated in harmony, so that the circuit scale can be reduced in comparison with the conventional one in the necessary word length range.

なお上述の回路において、C1,C2,C3の値はデバイスの
種類によつて異なるが、一例としてC1=8、C2=0.05、
C3=15とした場合には、入力デイジタル値の語長n(8
〜16ビツト)に応じてそれぞれ乗算器、ROM、第1の実
施例、第2の実施例の回路規模は第3図の表に示すよう
になる。従つてこの表から明らかなように語長が8ビツ
トのときはROMの回路規模が小さいが、語長が10〜16ビ
ツトでは上述の第1、第2の実施例の回路規模が小さく
なつている。ただし上述のC1〜C3の値はデバイスの種類
によつて異なるものであり、本願が有効なnの値は使用
されるデバイスによつて異動するものである。
In the above circuit, the values of C 1 , C 2 , and C 3 differ depending on the type of device, but as an example, C 1 = 8, C 2 = 0.05,
When C 3 = 15, input digital value word length n (8
.About.16 bits), the circuit scales of the multiplier, the ROM, the first embodiment and the second embodiment are as shown in the table of FIG. Therefore, as is apparent from this table, when the word length is 8 bits, the circuit scale of the ROM is small, but when the word length is 10 to 16 bits, the circuit scale of the first and second embodiments is small. There is. However, the above-mentioned values of C 1 to C 3 differ depending on the type of device, and the value of n effective in the present application varies depending on the device used.

〔発明の効果〕〔The invention's effect〕

この発明によれば、ROM方式及び乗算器方式の長所が
調和して取入れられているので、必要な語長範囲で回路
規模を従来のものより縮小することができるようになつ
た。
According to the present invention, since the advantages of the ROM system and the multiplier system are taken in harmony, it is possible to reduce the circuit scale in the necessary word length range as compared with the conventional one.

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

第1図は本発明の一例の構成図、第2図は他の例の構成
図、第3図は説明のための図である。 (1)(11)は入力レジスタ、(2)(3)(12)(1
3)(15)はROM、(4)は乗算器、(5)(6)(16)
(17)はシフト回路、(7)(14)(18)は加算器、
(8)(19)は出力レジスタである。
FIG. 1 is a block diagram of an example of the present invention, FIG. 2 is a block diagram of another example, and FIG. 3 is a diagram for explanation. (1) (11) are input registers, (2) (3) (12) (1
3) (15) ROM, (4) multiplier, (5) (6) (16)
(17) is a shift circuit, (7), (14) and (18) are adders,
(8) and (19) are output registers.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力信号に対して2乗演算を実行する2乗
器において、 上記入力信号の上位ビットを上記上位ビットの2乗値に
変換する第1のROMと、 上記入力信号の下位ビットを上記上位ビットの2乗値に
変換する第2のROMと、 上記入力信号の上位ビットと上記入力信号の下位ビット
との乗算を行う乗算器と、 入力信号を2乗値を得るように、上記第1のROM、上記
第2のROM及び上記乗算器からの出力値を加算する加算
器と からなることを特徴とする2乗器。
1. A squarer for executing a square operation on an input signal, wherein a first ROM for converting the upper bit of the input signal into a squared value of the upper bit and a lower bit of the input signal. To a square value of the upper bit, a multiplier for multiplying the upper bit of the input signal by the lower bit of the input signal, and a square value of the input signal, A squarer comprising: the first ROM, the second ROM, and an adder that adds output values from the multiplier.
【請求項2】入力信号に対して2乗演算を実行する2乗
器において、 上記入力信号の上位ビットを第1のシフト量を補正した
値が与えられた上記上位ビットの2乗値に変換する第1
のROMと、 上記入力信号の下位ビットを上記第1のシフト量を補正
した値が与えられた上記下位ビットの2乗値に変換する
第2のROMと、 上記入力信号の上位ビットと上記入力信号の下位ビット
との加算を行う第1の加算器と、 上記第1の加算器からの出力値を上記第1の加算器から
の出力値の2乗値に変換する第3のROMと、 入力信号を2乗値を得るように、上記第1のROM、上記
第2のROM及び上記第3のROMからの出力値を第2のシフ
ト量だけシフトして加算する第2の加算器と からなることを特徴とする2乗器。
2. A squarer for performing a square operation on an input signal, wherein the upper bit of the input signal is converted to a squared value of the upper bit given a value obtained by correcting a first shift amount. First to do
ROM, a second ROM for converting the lower bit of the input signal into a squared value of the lower bit given a value obtained by correcting the first shift amount, the upper bit of the input signal and the input A first adder for performing addition with the lower bit of the signal; a third ROM for converting the output value from the first adder into the squared value of the output value from the first adder; A second adder that shifts the output values from the first ROM, the second ROM, and the third ROM by a second shift amount so as to obtain a squared value of the input signal; A squarer characterized by comprising.
JP62213351A 1987-08-27 1987-08-27 Squarer Expired - Fee Related JP2550597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62213351A JP2550597B2 (en) 1987-08-27 1987-08-27 Squarer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62213351A JP2550597B2 (en) 1987-08-27 1987-08-27 Squarer

Publications (2)

Publication Number Publication Date
JPS6457332A JPS6457332A (en) 1989-03-03
JP2550597B2 true JP2550597B2 (en) 1996-11-06

Family

ID=16637724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62213351A Expired - Fee Related JP2550597B2 (en) 1987-08-27 1987-08-27 Squarer

Country Status (1)

Country Link
JP (1) JP2550597B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0644228B2 (en) * 1989-01-20 1994-06-08 日本電気株式会社 Squaring device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4313174A (en) * 1980-03-17 1982-01-26 Rockwell International Corporation ROM-Based parallel digital arithmetic device
JPS62147526A (en) * 1985-12-23 1987-07-01 Nec Corp Multiplier

Also Published As

Publication number Publication date
JPS6457332A (en) 1989-03-03

Similar Documents

Publication Publication Date Title
JPS6132437Y2 (en)
JP2544326B2 (en) Digital filter
JPH0728782A (en) Operating circuit and operating method
JPH09325955A (en) Square root arithmetic circuit for sum of squares
JP2550597B2 (en) Squarer
JPH09138792A (en) Method and circuit for calculation of approximate value of logarithm
JP2595820B2 (en) Galois extended field arithmetic unit
JP2524035Y2 (en) Multiplier for convolution arithmetic circuit
JP3210356B2 (en) Data zero judgment device
JPH0778748B2 (en) Galois field arithmetic unit
JP2546014B2 (en) Digital signal processor
JP3041932B2 (en) Sample rate conversion circuit
JP2581534B2 (en) Arithmetic circuit
JP3186612B2 (en) Multiplier
JPH06131158A (en) Adding method and addition circuit
JPS60241333A (en) Adding circuit of mod(2n-1)
JP3722821B2 (en) Calculation method
JPH0641389Y2 (en) Digital filter
JPS5913782B2 (en) digital arithmetic circuit
JPH05266060A (en) Matrix arithmetic circuit
JPS62260229A (en) Multiplying circuit
JPH01162926A (en) Data length variable arithmetic unit
JPS59197936A (en) Digital signal processing system
JPS5827418A (en) Digital filter
JPS61258521A (en) Digital filter

Legal Events

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