JPS61133476A - Operating circuit - Google Patents
Operating circuitInfo
- Publication number
- JPS61133476A JPS61133476A JP59255420A JP25542084A JPS61133476A JP S61133476 A JPS61133476 A JP S61133476A JP 59255420 A JP59255420 A JP 59255420A JP 25542084 A JP25542084 A JP 25542084A JP S61133476 A JPS61133476 A JP S61133476A
- Authority
- JP
- Japan
- Prior art keywords
- adder
- carry
- input
- output
- component
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8053—Vector processors
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Complex Calculations (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、ベクトルデータ間のノルムを求めるための演
算回路に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an arithmetic circuit for determining a norm between vector data.
(従来の技術)
パターン認識の分野では、ベクトルデータ間のノルム(
距シ)を求めることは多い。例えば音声認識では、入力
された音声を分析して音声の%敵を表わすベクトルの時
系列(バタン)に変換し、これを予め登録しておいた標
準のパタンとマツチングを行ない、最も小さい距離を与
えた標準パタンを認識結果とする方式が一般的である。(Prior art) In the field of pattern recognition, the norm (
There are many cases in which the distance (distance) is sought. For example, in voice recognition, the input voice is analyzed and converted into a time series (bang) of vectors representing the % enemy of the voice, and this is matched with a standard pattern registered in advance to find the smallest distance. A common method is to use a given standard pattern as the recognition result.
このパタンマツチングの際、主とした演算は入力バタン
の特畝ベクトル ”” (aI + J +・・・e
ak)と標準パタンの特畝ベクトル1t)=(b、、b
、、・・・、bk)とのノルムを求める演算である。す
なわち、下式で表わされる減算、絶対値化、累加算であ
る。During this pattern matching, the main calculation is to calculate the special ridge vector of the input batten ``'' (aI + J +...e
ak) and the special ridge vector 1t) of the standard pattern = (b, , b
, . . . , bk). That is, they are subtraction, absolute value conversion, and cumulative addition expressed by the following formula.
d=lll−To11=Σ 1ak−bklに−t
この演算は、一般にソフトウェアによシ実現されていた
が、処理時間を要し、マツチング性能が上がらないとい
う問題を有していた。d=llll-To11=Σ 1ak-bkl-t This calculation has generally been realized by software, but has the problem of requiring processing time and not improving matching performance.
また、音声パタンの各成分のビット長は、プロψ
セッサのワードット長(例えば16ビツト)よシも短か
くてよい(例えば8ビツト)場合が多く、プロセッサの
1ワードに2つの音声パタン成分を格納する方法はメモ
リ量低減に有効である。しかし、この方法を従来のプロ
セッサで実現する場合距離計算は、1ワードに含まれた
2つの音声パタン成分を分離してから行なう必要があシ
、分離処理だけさらに処理時間を要すという欠点を有し
ていた。In addition, the bit length of each component of the audio pattern can often be shorter (e.g., 8 bits) than the word dot length of the processor (e.g., 16 bits), and two audio pattern components can be stored in one word of the processor. This storage method is effective in reducing the amount of memory. However, when implementing this method with a conventional processor, the distance calculation must be performed after separating the two speech pattern components included in one word, and the separation process requires additional processing time. had.
ジスタ1および2と、加算器5および6と、反転器3,
4.7射よび8と、+1加算器13.14゜15および
16と、加算器5の最上位桁上げがIO”のときは+1
加算器13の出力を、1″の0″のときは+1加算器1
4の出力を11′のときは加算器6の出力をそれぞれ選
択して出力する選択回路10と、加算器11と、出力レ
ジスタ12とから構成される。registers 1 and 2, adders 5 and 6, inverter 3,
4.7 and 8, +1 adder 13.14°15 and 16, +1 when the most significant carry of adder 5 is IO”
When the output of adder 13 is 1″ and 0″, it is +1 adder 1
It is comprised of a selection circuit 10 that selects and outputs the output of adder 6 when the output of 4 is 11', an adder 11, and an output register 12.
入力レジスタ1.2の上位半ワードが加算器5及び反転
器30入力となシ、下位中ワードが加算器6及び反転器
4の入力となる。本構成は、数値 □□の符号を
反転する操作が各ビットを反転して、1を加えるという
動作であることを用いて、選択回路9の出力は、入力レ
ジスタ1の上位と入力レジスタ2の上位の値の差の絶対
値、選択回路10の出力は入力レジスタlの下位と入力
レジスタ2の下位の値の差の絶対値をそれぞれ出力する
ようにしたものである。The upper half word of the input register 1.2 becomes the input to the adder 5 and the inverter 30, and the lower middle word becomes the input to the adder 6 and the inverter 4. This configuration uses the fact that the operation of inverting the sign of the numerical value □□ is an operation of inverting each bit and adding 1, and the output of the selection circuit 9 is The absolute value of the difference between the upper value and the output of the selection circuit 10 is designed to output the absolute value of the difference between the lower value of the input register 1 and the lower value of the input register 2, respectively.
(発明の解決しようとする問題点)
一般に演算時間は、桁上げが伝搬する部分に要する。第
1図の従来回路に於ては加算器5.6および11と+1
加算器13,14.15と16がこれに相当する。+1
加算器15と16.加算器5と6、+1加算器13と1
4は並列に実行されるので4段も桁上げを含む回路を通
らなければならず、処理の高速化の妨げとなるという問
題点がある。(Problems to be Solved by the Invention) Generally, calculation time is required for the portion where the carry is propagated. In the conventional circuit shown in Fig. 1, adders 5, 6 and 11 and +1
Adders 13, 14, 15 and 16 correspond to this. +1
Adders 15 and 16. Adders 5 and 6, +1 adders 13 and 1
4 is executed in parallel, so it has to pass through a circuit that includes four stages of carry, which poses a problem in that it hinders speeding up the processing.
本発明の目的は上述の欠点を除去し桁上げ段数をへらし
高速動作可能なノルム計算用の演算回路を提供すること
にある。SUMMARY OF THE INVENTION An object of the present invention is to eliminate the above-mentioned drawbacks, reduce the number of carry stages, and provide an arithmetic circuit for norm calculation that can operate at high speed.
(問題点を解決するための手段)
本発明の装置は、2nピツ)(nは自然数)からなる第
1および第2の入力指定手段と、前記第1の入力指定手
段の上位nビットのデータX、と前記第2の入力指定手
段の上位nビットのデータY、とを入力としX1+Y1
の演算手段と、前記第1の入力指定手段の下位nビット
のデータX、と前記第2の入力指定手段の下位nビット
のデータY!とを入力としX1+Y1の演算を行なう第
2の演算手段と、前記第1の演算手段の最上位桁上げが
O″のときは前記第1の演算手段の出力を反転して出力
し該最上位桁上げが“1”のときは前記第1の演算手段
の演算結果を出力する第1の選択手段と、前記第2の演
算手段の最上位桁上げがO″のときは前記演算手段の出
力を反転して出力し該最上位桁上げが“1″のときは前
記第2の演算手段の演算結果を出力する第2の選択手段
と、前記第1の選択手段の出力z1と前記第2の選択手
段の出力Z!と前記第1の演算手段の最上位桁上げC8
と前記第2の演算器手段の最上位桁上げCt トラ入力
(!: LZI + Zt + Ct + Ct O演
算を行なう第3の演算手段とを含んで構成される。(Means for Solving the Problems) The device of the present invention includes first and second input designating means consisting of 2n bits (n is a natural number), and data of the upper n bits of the first input designating means. X, and data Y of the upper n bits of the second input specifying means are input, and
, data X of the lower n bits of the first input designation means, and data Y of the lower n bits of the second input designation means! and a second arithmetic means which performs the calculation of X1+Y1 with input of a first selection means that outputs the calculation result of the first calculation means when the carry is "1"; and an output of the calculation means when the most significant carry of the second calculation means is O''; a second selection means which inverts and outputs the calculation result of the second calculation means when the most significant carry is "1", and outputs the output z1 of the first selection means and the second The output of the selection means Z! and the most significant carry C8 of the first calculation means.
and third arithmetic means for performing the most significant carry Ct tra input (!: LZI + Zt + Ct + Ct O operation) of the second arithmetic unit means.
(実施例) 次に本発明の一実施例を図面を用いて説明する。(Example) Next, one embodiment of the present invention will be described using the drawings.
第1図は本発明の一実施例を示すブロック図である。第
2図の演算回路は、入力レジスタ101および102と
反転器103,104.107および106と、選択回
路109 詔よび110 と、加算器111 と、出
力レジスタ112とから構成される。FIG. 1 is a block diagram showing one embodiment of the present invention. The arithmetic circuit shown in FIG. 2 includes input registers 101 and 102, inverters 103, 104, 107 and 106, a selection circuit 109, an adder 111, and an output register 112.
選択回路1.09は、加算器105の最上位桁上げが0
″のとき、反転器107の出力を、′″1″′のとき加
算器105の演算結果を出力する。また、選択回路11
0は、加算器106の最上位桁上げが′θ″のとき反転
器108の出力を、11″のとき加算器106の演算結
果を出力する。加算器111は、選択回路109および
110の加算をするとともに、加算器lO5および10
6の最上位桁上げも加算する。In the selection circuit 1.09, the most significant carry of the adder 105 is 0.
'', the output of the inverter 107 is output, and when the value is ``1'', the calculation result of the adder 105 is output.
0 outputs the output of the inverter 108 when the most significant carry of the adder 106 is 'θ'', and outputs the calculation result of the adder 106 when it is 11''. Adder 111 performs addition of selection circuits 109 and 110, and adders lO5 and 10.
The most significant carry of 6 is also added.
例として、入力レジスタ101および1020ビツト長
を8ビツトとする。入力レジスタ101には01010
001″(2進表現)、入力レジスタ102には”01
000011″ が格納されているとして動作を説明す
る。これは例えば入力バタンベクトルの第1成分が″0
101″、第2成分が”0001″。As an example, input register 101 and 1020 bit length are assumed to be 8 bits. Input register 101 has 01010
001" (binary representation), input register 102 has "01"
The operation will be explained assuming that ``000011'' is stored.This means, for example, that the first component of the input button vector is ``0''.
101″, the second component is “0001″.
ある標準バタンベクトルの第1成分が’0100”。The first component of a standard batan vector is '0100'.
第2成分が′″0011” であったことに対応する。This corresponds to the fact that the second component was ``0011''.
第1成分の差は1.第2成分の差が2、その和は3であ
る。The difference in the first component is 1. The difference in the second component is 2, and the sum is 3.
さて、加算器iosの入力は’0101″と@0100
″の反転データ”1011”で、演算結果″’oooo
″で最上位桁上げは“1”となる。従って選択回路10
9の出力は”oooo″ となる。一方、加算器106
の演算結果は同様にして’ 1i o i ”、最上位
桁上げは”o″従って、選択回路110の出力は加算器
106の出力の反転で’0010″ となる。Now, the input of adder ios is '0101'' and @0100
With the inverted data ``1011'' of ``, the calculation result ``'oooo
”, the highest carry is “1”. Therefore, the selection circuit 10
The output of 9 is "oooo". On the other hand, adder 106
Similarly, the result of the operation is '1i o i' and the most significant carry is 'o'.Therefore, the output of the selection circuit 110 is the inversion of the output of the adder 106 and becomes '0010'.
加算器111では’oooo″ と’0010″ と加
算器105の最上位桁上げ1″と加算器106の最上位
桁上げO″との加算で出力は’0011″′となる。こ
れは、第1成分の差と第2成分の差との和である。In the adder 111, the output becomes '0011'' by adding 'oooo'' and '0010'', the most significant carry 1'' of the adder 105, and the most significant carry O'' of the adder 106. It is the sum of the difference in one component and the difference in the second component.
即ち、このように本実施例によシ入力レジスタ101に
格納された2つのバタン成分と、入力レジスタ102に
格納された2つのバタン成分のそれぞれの成分の差の和
が同時に得られる。That is, according to this embodiment, the sum of the differences between the two bang components stored in the input register 101 and the two bang components stored in the input register 102 can be obtained at the same time.
(発明の効果)
本発明には過塩時間を要する桁上げを含む部分を2段に
削減することにより処理速度を大幅に向上できるという
効果がある。(Effects of the Invention) The present invention has the effect that the processing speed can be significantly improved by reducing the portion including carry that requires oversalting time to two stages.
第1図は、従来技術によるブロック図、第1図は、本発
明の一実施例を示すブロック図である。
1.2.101,102・・・・・・入力レジスタ、3
,4゜7.8,103,104,107.108・−・
・・反転器、5゜6.11,105,106,111・
・・・・・加算器、9.10゜109.110・・・・
・・選択回路、13,14,15,16・・・・・−+
1加算器。
lDI 房2
$ 7 図FIG. 1 is a block diagram according to the prior art, and FIG. 1 is a block diagram showing an embodiment of the present invention. 1.2.101,102...Input register, 3
,4゜7.8,103,104,107.108...
・Inverter, 5゜6.11, 105, 106, 111・
...Adder, 9.10゜109.110...
...Selection circuit, 13, 14, 15, 16...-+
1 adder. lDI Tuft 2 $ 7 Figure
Claims (1)
力指定手段と、 前記第1の入力指定手段の上位nビットのデータX_1
と前記第2の入力指定手段の上位nビットのデータY_
1とを入力としX_1+@Y@_1の演算を行なク第1
の演算手段と、 前記第1の入力指定手段の下位nビットのデータX_2
と前記第2の入力指定手段の下位nビットのデータY_
2とを入力としX_2+@Y@_2の演算を行なう第2
の演算手段と、 前記第1の演算手段の最上位桁上げが“0”のときは前
記第1の演算手段の出力を反転して出力し該最上位桁上
げが“1”のときは前記第1の演算手段の演算結果を出
力する第1の選択手段と、前記第2の演算手段の最上位
桁上げが“0”のときは前記第2の演算手段の出力を反
転して出力し該最上位桁上げが“1”のとき前記第2の
演算結果を出力する第2の選択手段と、 前記第1の選択手段の出力Z_1と前記第2の選択手段
の出力Z_2と前記第1の演算手段の最上位桁上げC_
1と前記第2の演算手段の最上位桁上げC_2とを入力
としZ_1+Z_2+C_1+C_2の演算を行なう第
3の演算手段とを含むことを特徴とする演算回路。[Claims] First and second input specifying means each consisting of 2n bits (n is a natural number); and data X_1 of the upper n bits of the first input specifying means.
and the data Y_ of the upper n bits of the second input specifying means.
1 and perform the operation of X_1+@Y@_1.
calculation means, and data X_2 of the lower n bits of the first input designation means.
and the data Y_ of the lower n bits of the second input specifying means.
2 and performs the operation of X_2+@Y@_2.
when the most significant carry of the first arithmetic means is "0", the output of the first arithmetic means is inverted and output; and when the most significant carry is "1", the output of the first arithmetic means is inverted and outputted; The first selection means outputs the calculation result of the first calculation means, and when the most significant carry of the second calculation means is "0", the output of the second calculation means is inverted and outputted. a second selection means that outputs the second calculation result when the most significant carry is "1"; and an output Z_1 of the first selection means, an output Z_2 of the second selection means and the first Most significant carry of calculation means C_
1 and the most significant carry C_2 of the second arithmetic means, and a third arithmetic means for performing an arithmetic operation of Z_1+Z_2+C_1+C_2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59255420A JPS61133476A (en) | 1984-12-03 | 1984-12-03 | Operating circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59255420A JPS61133476A (en) | 1984-12-03 | 1984-12-03 | Operating circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS61133476A true JPS61133476A (en) | 1986-06-20 |
Family
ID=17278511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59255420A Pending JPS61133476A (en) | 1984-12-03 | 1984-12-03 | Operating circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61133476A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007152998A (en) * | 2005-12-01 | 2007-06-21 | Mazda Motor Corp | Lower vehicle body structure for vehicle |
-
1984
- 1984-12-03 JP JP59255420A patent/JPS61133476A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007152998A (en) * | 2005-12-01 | 2007-06-21 | Mazda Motor Corp | Lower vehicle body structure for vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US3993891A (en) | High speed parallel digital adder employing conditional and look-ahead approaches | |
JPH02259826A (en) | Apparatus and method for converting format of floating point data in miroprocessor | |
JP3345894B2 (en) | Floating point multiplier | |
JPH02247727A (en) | Multiplier and method for the same | |
JPH05134851A (en) | Multiplying circuit output system | |
JPS61133476A (en) | Operating circuit | |
Dawid et al. | High speed bit-level pipelined architectures for redundant CORDIC implementation | |
US4041296A (en) | High-speed digital multiply-by-device | |
JPS5966790A (en) | Operating circuit | |
JP2991788B2 (en) | Decoder | |
US3324288A (en) | Data processing apparatus including means for correcting codes arranged in a packed format | |
JP3017300B2 (en) | Fuzzy inference device | |
KR100223752B1 (en) | Parallel multiplier | |
JPS62288936A (en) | Generating system for conditional code in decimal operation | |
JP3186612B2 (en) | Multiplier | |
JPH05265710A (en) | Rounding operation circuit | |
JP2624738B2 (en) | Rounding method | |
JPS62147526A (en) | Multiplier | |
JPH0764767A (en) | Adder | |
JPH0580978A (en) | Arithmetic processing circuit | |
JPS62182841A (en) | Square root arithmetic system | |
JPS58166444A (en) | Large/small discriminating circuit for absolute value | |
JPH04316127A (en) | Information processor | |
JPS58107956A (en) | Multiplication processing system | |
JPS6120130A (en) | Processing unit |