JP3547309B2 - Arithmetic unit - Google Patents

Arithmetic unit Download PDF

Info

Publication number
JP3547309B2
JP3547309B2 JP06292098A JP6292098A JP3547309B2 JP 3547309 B2 JP3547309 B2 JP 3547309B2 JP 06292098 A JP06292098 A JP 06292098A JP 6292098 A JP6292098 A JP 6292098A JP 3547309 B2 JP3547309 B2 JP 3547309B2
Authority
JP
Japan
Prior art keywords
data
arithmetic
multiplication
circuit
result storage
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
JP06292098A
Other languages
Japanese (ja)
Other versions
JPH11259273A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP06292098A priority Critical patent/JP3547309B2/en
Publication of JPH11259273A publication Critical patent/JPH11259273A/en
Application granted granted Critical
Publication of JP3547309B2 publication Critical patent/JP3547309B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、並列乗算器を備え、例えばデジタル信号処理を行うDSPなどの演算装置に関する。
【0002】
【従来の技術】
近年、LSI技術や信号処理技術などのめざましい進歩によって、携帯電話機などの情報通信端末装置のデジタル化が進んでいる。特に、携帯電話機の分野においては、デジタル化することにより回線容量不足及び雑音の解消や秘匿性の向上、通話及び待ち受け時間の長期化などの多くの利点があることから、現在、非常に大きな伸びを見せている。
【0003】
このデジタル化を進める場合には、キーデバイスたるデジタル信号処理用LSI(DSP:Digital Signal Processor)が必要不可欠である。デジタル信号処理においては、積和演算が処理の大半を占めるため、処理時間の向上のために積和演算を如何に高速化するかがDSPの主要な開発課題となっている。
【0004】
一般に、処理の高速性を重視する場合には、固定小数点方式のDSPが使用されるが、演算精度を重視する用途においては、プログラマは演算誤差を常に考慮する必要がある。また、高精度の演算を行う必要がある処理の場合は、語長(ビット幅)の長いDSPを使用することも考えられるが、語長の長いDSPでは、メモリサイズ,データバス,端子数,レジスタ語長など、DSPの全構成要素の回路規模が大きくなるため、チップサイズやコスト,動作速度の面でのデメリットが増加してしまう。そこで、一般には、通常の処理については単精度で演算を行い、高精度が要求される処理についてのみ倍精度で演算する方式が多く用いられている。
【0005】
ここで、斯様な倍精度演算を行うDSPの一構成例を図5に示す。例えば、各16ビットの乗算オペランドレジスタ1(X)及び2(Y)に格納されるオペランドデータは、乗算器(MPY)3に与えられて乗算(X×Y)が行われるようになっている。乗算器3における乗算結果データは、例えば32ビットの乗算結果格納レジスタ(M)4に出力されるようになっている。
【0006】
乗算結果格納レジスタ(以下、レジスタと称す)4に格納されたデータは、3入力のマルチプレクサ5を介して算術論理演算回路(以下、ALUと称す)6にオペランドとして与えられるようになっている。ALU6の演算結果データは、例えば各64ビットのアキュムレータ7(Z0),8(Z1)に格納されるようになっている。
【0007】
アキュムレータ7,8の出力データは、マルチプレクサ5及びもう1つのマルチプレクサ9を介して夫々ALU6に与えられるようになっている。尚、マルチプレクサ5及び9に何れのデータを選択出力させるかは、ALU6により制御されるようになっている。以上がDSP10を構成している。また、DSP10は、図示しないシステムクロック信号に同期した演算周期(サイクル)で演算処理を行うようになっている。
【0008】
図6は、DSP10が、倍精度乗算(32ビット×32ビット)を行う場合の演算処理を概念的に示すものである。図6(a)は、各32ビットのオペランドデータXH/HL,YH/YL(上位/下位:各16ビット)を乗算した結果を、アキュムレータZに加算することを表したものであり、図6(b)は、最終的に乗算結果▲1▼〜▲4▼がアキュムレータZに格納されるビット配置のイメージを表したものである。
【0009】
即ち、図6(b)において、各オペランドデータを16ビットの上位データ,下位データに分けて、▲1▼〜▲4▼の4回の乗算を行う。
▲1▼:XL×YL
▲2▼:XH×YL
▲3▼:XL×YH
▲4▼:XH×YH
そして、これら▲1▼〜▲4▼の乗算結果は、順次レジスタ4を介してALU6に与えられ、桁合わせが行われながらアキュムレータZに加算されていく。
【0010】
図7は、DSP10が乗算処理を行う場合のタイミングチャートである。この図7において、サイクル1でレジスタ1にはデータXLが、レジスタ2にはデータYLが格納されると(図7(a),(b)参照)、乗算器3により乗算(▲1▼:XL×YL)が1クロックで実行され、次のサイクル2においては、レジスタ4(M)に乗算結果が格納される(図7(c)参照)。それと同時に、次の乗算▲2▼を行うため、レジスタ1にはデータXHが格納される(レジスタ2はデータYLのまま)。
【0011】
また、サイクル2においては、ALU6により、命令(Z0=M>>16:レジスタMを16ビット右シフトして、アキュムレータZ0に転送)が実行される(図7(d)参照)。ここで、レジスタ4(M)のビット31〜0は、レジスタM→アキュムレータZの転送をシフトせずに行った場合はアキュムレータ7(Z0)のビット63〜32に転送されるようになっており、従って、上記命令を実行した結果は、(次のサイクル3で)アキュムレータ7のビット47〜16に転送されることになる。
【0012】
次のサイクル3においては、レジスタ4に乗算結果(▲2▼:XH×YL)が格納される(図7(c)参照)。それと同時に、次の乗算▲3▼を行うため、レジスタ1にはデータXL,レジスタ2はデータYHが格納される。また、ALU6においては、乗算結果(▲2▼:XH×YL)をアキュムレータ7のビット63〜32に転送する命令(Z0=Z0+M:アキュムレータZ0に、レジスタMの内容を加算)が実行される(図7(d)参照)。この時、アキュムレータ7には、1つ前のサイクルでALU6により実行された命令(Z0=M>>16)の結果が格納される(図7(e)参照)。
【0013】
次のサイクル4においては、サイクル3と同様にして、レジスタ4には乗算結果(▲3▼:XL×YH)が格納される(図7(c)参照)と同時に、レジスタ1にはデータXHが格納される(レジスタ2はデータYHのまま)。また、ALU6においては、乗算結果(▲3▼:XL×YH)をアキュムレータ7のビット63〜32に加算する命令(Z0=Z0+M)が実行され(図7(d)参照)、アキュムレータ7には、1つ前のサイクルでALU6により実行された命令(Z0=Z0+M)の結果が格納される(図7(e)参照)。
【0014】
尚、サイクル3及び4において、アキュムレータ7(Z0)のビット63〜32に乗算結果▲2▼及び▲3▼が転送されることにより上位桁にオーバーフローを生じる場合には、図示しないオーバーフロー処理部により適宜処理されるようになっている。
【0015】
そして、次のサイクル5においては、レジスタ4に乗算結果(▲4▼:XH×YH)が格納される(図7(c)参照)と同時に、ALU6においては、命令(Z0=Z0>>16+M:アキュムレータZ0を16ビット右シフトしたものに、レジスタMの内容を加算)が実行される(図7(d)参照)。
【0016】
即ち、サイクル4までの過程において、アキュムレータ7のビット63〜16には各乗算結果▲1▼〜▲3▼の累加算値(▲1▼+▲2▼+▲3▼)が格納されており、そのアキュムレータ7を16ビット右シフトすることにより、前記累加算値は、ビット47〜0に配置される。その状態で、アキュムレータ7のビット63〜32にレジスタ4の内容(乗算結果▲4▼)を加算することによって、最終的に32ビット×32ビットの乗算結果が得られることになる。また、この時、アキュムレータ7(Z0)には、1つ前のサイクルでALU6により実行された命令(Z0=Z0+M)の結果が格納される(図7(e)参照)。
【0017】
而して、次のサイクル6では、ALU6において、命令(Z1=Z1+Z0:アキュムレータZ1の内容に、アキュムレータZ0の内容を加算)が実行される(図7(d)参照)と共に、アキュムレータ7には、1つ前のサイクルでALU6により実行された命令(Z0=Z0>>16+M)の結果が格納される(図7(e)参照)。
【0018】
次のサイクル7では、サイクル6でALU6により命令(Z1=Z1+Z0)が実行された結果、アキュムレータ8(Z1)の内容に(OLD Z)にアキュムレータ7(Z0)の内容が累加算され、Z1=(NEW Z)、となった時点で乗算処理を終了する。以上において、サイクル2〜6が積和サイクルであり、5サイクルを要している。
【0019】
また、図8は、乗算器を2個有するDSPの一構成例である。各16ビットの乗算オペランドレジスタ11a(XH)及び11b(HL)に格納されるオペランドデータは、乗算器12(MPY1)及び13(MPY2)に夫々与えられるようになっている。各16ビットの乗算オペランドレジスタ14a(YH)及び14b(YL)に格納されるオペランドデータは、マルチプレクサ15及び16に共に与えられ、マルチプレクサ15及び16の出力データは、乗算器12及び13に夫々与えられるようになっている。
【0020】
乗算器12及び13の出力データは、累積演算器17及び18に夫々与えられるようになっており、累積演算器17及び18の出力データは、各48ビットの乗算結果格納レジスタ19(M1)及び20(M2)に夫々与えられるようになっている。乗算結果格納レジスタ19及び20に格納されたデータは、3入力のマルチプレクサ21及び22に夫々与えられると共に、累積演算器17及び18にも夫々与えられるようになっている。
【0021】
マルチプレクサ21及び22は、図5の構成におけるマルチプレクサ9及び5に対応するものであり、それ以降のALU23,アキュムレータ24(Z0)及び25(Z1)は、図5の構成におけるALU6,アキュムレータ7及び8に対応するものである。以上がDSP26を構成している。
【0022】
図9は、DSP26が、倍精度の乗算を行う場合の演算処理を概念的に示すものであり、基本的には図6と同様であるが、図9(b)では、乗算▲1▼及び▲2▼を乗算器12(MPY1)で行い、乗算▲3▼及び▲4▼を乗算器13(MPY2)で行うことを示している。
【0023】
図10は、DSP26が乗算処理を行う場合のタイミングチャートである。尚、図10では、乗算オペランドレジスタ11a,11b,14a及び14bのタイミングチャートは図示を省略しているが、これらのレジスタには、図示しないサイクル1でオペランドデータXH,XL,YH及びYLが同時に格納され、以降は次の演算処理が実行されるまで変化しない。
【0024】
この図10において、サイクル2では、乗算器12及び13によって行われた乗算結果▲3▼(XH×YL)及び▲1▼(XL×YL)のデータが、乗算結果格納レジスタ19(M1)及び20(M2)のビット47〜16に格納される(図10(a)及び(b)参照)。同時に、マルチプレクサ15及び16によりオペランドデータの切り換えが行われ(YL→YH)、乗算器12及び13においては、乗算▲4▼(XH×YH)及び▲2▼(XL×YH)が夫々実行される。
【0025】
次のサイクル3では、レジスタ19には、累積加算器17によって、サイクル2でレジスタ19に格納されている乗算結果▲3▼(XH×YL)のデータが16ビット右シフトされた内容(ビット31〜0に配置)に、サイクル2で行われた乗算結果▲4▼(XH×YH)のデータがビット47〜16に加算されたもの(▲3▼+▲4▼)が格納される。
【0026】
同様に、レジスタ20には、累積加算器18によって、サイクル2でレジスタ20に格納されている乗算結果▲1▼(XL×YL)のデータが16ビット右シフトされた内容に、サイクル2で行われた乗算結果▲2▼(XL×YH)のデータが加算されたもの(▲1▼+▲2▼)が格納される。また、ALU23においては、命令(Z0=Z0+M2>>16:レジスタM2を16ビット右シフトしたものを、アキュムレータZ0に加算)が実行される(図10(c)参照)。
【0027】
次のサイクル4においては、レジスタ19及び20の内容はそのまま保持されており、ALU23では、命令(Z0=Z0+M1:レジスタM1の内容をアキュムレータZ0に加算)が実行される。また、アキュムレータ24の内容(OLD Z)に対しては、サイクル3におけるALU23の命令(Z0=Z0+M2>>16)実行結果として、加算値(▲1▼+▲2▼)がビット47〜0に累加算される。
【0028】
そして、次のサイクル5においては、アキュムレータ24の内容には、サイクル4におけるALU23の命令(Z0=Z0+M1)実行結果として、ビット63〜16に加算値(▲3▼+▲4▼)が累加算される。以上で乗算処理が終了するが、サイクル2〜4が積和サイクルであり、3サイクルを要している。
【0029】
【発明が解決しようとする課題】
斯様な演算を行うDSP10においては、取扱うデータのビット幅に一定の制約がある場合でも、演算処理をできる限り高速に行うことが要求される。
本発明は、上記事情に鑑みてなされたものであり、より少ないサイクル数によって並列乗算処理を行うことができる演算装置を提供することを目的とするものである。
【0030】
【課題を解決するための手段】
上記目的を達成するため、請求項1記載の演算装置は、並列乗算器と、この並列乗算器の乗算結果データを格納する乗算結果記憶回路と、この乗算結果記憶回路から出力されるデータを算術論理演算する算術論理演算回路と、この算術論理演算回路の演算結果データを格納する演算結果記憶回路とを具備してなるものにおいて、
前記算術論理演算回路は、3つ以上の複数の入力部を備え、これら複数の入力部に与えられるデータをオペランドとして同時に演算可能に構成され
算術論理演算回路の各入力部に各出力端子が接続されると共に、複数の入力端子には乗算結果記憶回路の出力データ或いは演算結果記憶回路の出力データが与えられ、何れかの入力端子に与えられているデータを選択的に出力可能に構成された複数の選択回路を具備
したことを特徴とする。
【0031】
斯様に構成すれば、算術論理演算回路が、3つ以上の複数の入力部に与えられるデータをオペランドとして同時に算術論理演算することにより、従来のように入力部を2つのみ備えているものに比べて、例えば、処理データの桁数を多く必要とする倍精度乗算処理などを、より少ない演算周期で行うことができる。そして、算術論理演算回路は、複数の選択回路を介して各入力部に与えられるオペランドデータを適宜選択することによって、より多様なオペランドの組み合わせによる演算処理を行うことができる。
【0032】
この場合、請求項2に記載したように、選択回路の複数の入力端子の内の何れか一つにゼロデータを与える構成とするのが好ましい。斯様に構成すれば、算術論理演算回路は、各入力部に与えられるオペランドデータの内何れかをゼロデータとすることによって、入力部の数よりも少ない項数での加減算処理などを容易に行うことができる。
【0034】
また、請求項3に記載したように、並列乗算器及び乗算結果記憶回路を複数組備える構成としても良く、斯様に構成すれば、複数の並列乗算器によって乗算処理が並列に実行される場合でも、算術論理演算回路は、それら並列乗算器の乗算結果データを格納する乗算結果記憶回路の出力データと演算結果記憶回路の出力データとをオペランドとして同時に算術論理演算できるので、演算処理を高速に実行することができる。
【0038】
加えて、請求項に記載したように、並列乗算器と乗算結果記憶回路との間に、並列乗算器の乗算結果データを累積加減算する算術演算回路を具備すると良い。斯様に構成すれば、例えば、演算周期をより多く必要とする倍精度乗算処理などを実行する場合に、算術論理演算回路で処理を行うと同時に、算術演算回路によって中間処理を行うことができるので、算術論理演算回路の処理負担を軽減して、総じて演算処理を高速に実行することができる。
【0039】
【発明の実施の形態】
(第1実施例)
以下、本発明の第1実施例について図1及び図2を参照して説明する。尚、図5と同一部分には同一符号を付して説明を省略し、以下異なる部分についてのみ説明する。本実施例のDSP(演算装置)31においては、図5に示すDSP10のALU6に代えて、3つの入力部32a,32b及び32cを備え、これらに夫々与えられる3つのオペランドデータを同時に演算可能に構成されたALU(算術論理演算回路)32が配置されている。
【0040】
また、マルチプレクサ9及び5に代えて、ALU32の3つの入力部32a,32b及び32cには、2つの入力ポート(入力端子)に与えられるデータの何れか一方を選択して出力ポート(出力端子)に出力するマルチプレクサ(選択回路)33,34及び35が配置されている。マルチプレクサ33,34及び35の一方の入力ポートには、アキュムレータ(演算結果記憶回路)7,8及び乗算結果格納レジスタ(乗算結果記憶回路)4の格納データが与えられており、他方の入力ポートには、ゼロデータが与えられている。その他の構成は、図5と同様である。
【0041】
斯様に構成することによって、ALU32は、3つの入力部32a,32b及び32cに夫々与えられるオペランドデータをa,b及びcとすると、以下のような3項間での加減算が実行可能となる。
a+b+c,a−b+c,a+b−c,a−b−c
また、何れか一つのオペランドデータを加減算に使用しない場合は、対応するマルチプレクサにゼロデータを選択させることにより、従来と同様に、a±b,b±c,a±cの2項演算を行うこともできる。
【0042】
次に、本実施例の作用について図2をも参照して説明する。図2は、図7に示した場合と同様に、DSP31によって倍精度乗算を行う場合のタイミングチャートである。この図2においては、サイクル4までは図7に示すタイミングチャートと同様に演算処理が行われる。
【0043】
即ち、ALU32は、サイクル2ではマルチプレクサ32cを介して、サイクル3及び4ではマルチプレクサ32a,32cを介して図7に示す場合と同様の命令を実行する。この場合、加算について使用しないマルチプレクサ32bについては、上述のようにゼロデータを選択させておく。
【0044】
そして、サイクル5において、ALU32は、マルチプレクサ33,34及び35を用いて、命令(Z1=Z1+Z0>>16+M:アキュムレータZ1の内容に、アキュムレータZ0を16ビット右シフトしたものとレジスタMの内容とを加算)を実行する。
【0045】
即ち、ここでのサイクル5においてALU32により実行される命令は、図7に示すタイミングチャートにおいてサイクル5及び6で実行された命令を、1サイクルで行うものである。
【0046】
そして、次のサイクル6においては、サイクル5でのALU32の命令(Z1=Z1+Z0>>16+M)実行結果がアキュムレータ8(Z1)に格納されて、アキュムレータ8の内容が(NEW Z)となり、乗算処理は終了する。従って、本実施例における積和サイクルは、サイクル2〜5の4サイクルであり、従来よりも1サイクル少ない時間で実行されることになる。
【0047】
以上のように本実施例によれば、乗算オペランドレジスタ1及び2に夫々与えられる16ビットのオペランドデータを乗算器3により乗算処理して32ビット×32ビットの倍精度乗算処理を行う場合に、ALU32を、3つの入力部32a,32b及び32cに与えられるオペランドデータについて同時に演算可能な構成として、その入力部32a,32b及び32cには、一方の入力ポートにアキュムレータ7,8及びレジスタ4の出力データが与えられると共に、他方の入力ポートにゼロデータが与えられるマルチプレクサ33,34及び35を配置した。
【0048】
従って、最後の乗算▲4▼(XH×YH)の結果がレジスタ4に格納されると同時にアキュムレータ8に対する累加算を行うことができるので、従来よりも1サイクル少ない時間で倍精度乗算処理を実行することができる。具体的には、従来は同じ乗算処理を行うのに5サイクル要したものを4サイクルで行うことが可能となり、処理速度を20%向上させることができた。
【0049】
また、マルチプレクサ33,34及び35を備えたことにより、演算処理を多様なオペランドの組み合わせで行うことができると共に、何れかのマルチプレクサにゼロデータを選択して出力させることによって、従来と同様に、a±b,b±c,a±cの2項演算を容易に行うこともできる。
【0050】
(第2実施例)
図3及び図4は本発明の第2実施例を示すものであり、図8と同一部分には同一符号を付して説明を省略し、以下異なる部分についてのみ説明する。第2実施例のDSP(演算装置)36においては、図8に示すDSP26のALU23に代えて、第1実施例と同様に、3つのオペランドデータを同時に演算可能に構成されたALU(算術論理演算回路)37が配置されている。
【0051】
また、マルチプレクサ21及び22に代えて、ALU37の3つの入力部37a,37b及び37cには、3つの入力ポートに与えられるデータの何れか一方を選択して出力するマルチプレクサ(選択回路)38,39及び40が配置されている。マルチプレクサ38の2つの入力ポートには、アキュムレータ(演算結果記憶回路)24(Z0)及び25(Z1)の格納データが与えられており、マルチプレクサ39の2つの入力ポートには、アキュムレータ24及び乗算結果格納レジスタ(乗算結果記憶回路)19(M1)の格納データが与えられている。
【0052】
また、マルチプレクサ40の2つの入力ポートには、アキュムレータ25及び乗算結果格納レジスタ(乗算結果記憶回路)20(M2)の格納データが与えられている。そして、各マルチプレクサ38,39及び40の残りの1つの入力ポートには、何れもゼロデータが与えられている。その他の構成は、図8と同様である。
【0053】
斯様に構成することによって、ALU37は、ALU32と同様に、3つの入力部37a,37b及び37cに夫々与えられるオペランドデータa,b,cについて、3項間での加減算が実行可能となり、また、何れか1つのマルチプレクサにゼロデータを選択させることによって、従来と同様に2項演算を行うこともできる。
【0054】
次に、第2実施例の作用について説明する。図4は、図10に示した場合と同様に、DSP36によって倍精度乗算を行う場合のタイミングチャートである。図4において、ALU37は、サイクル3において、マルチプレクサ38,39及び40を用いて、命令(Z0=Z0+M1+M2:アキュムレータZ0の内容に、レジスタM1及びM2の内容を加算)を実行する。
【0055】
即ち、ここでのサイクル3においてALU37により実行される命令は、図10に示すタイミングチャートにおけるサイクル3及び4で実行された命令を1サイクルで行うものである。
【0056】
そして、次のサイクル4においては、サイクル3でのALU37の命令(Z0=Z0+M1+M2)実行結果がアキュムレータ24(Z0)に格納されて、アキュムレータ24の内容が(NEW Z)となり、乗算処理は終了する。従って、第2実施例における積和サイクルは、サイクル2〜3の2サイクルであり、従来よりも1サイクル少ない時間で実行されることになる。
【0057】
以上のように第2実施例によれば、2つの乗算器(並列乗算器)12及び13並びに2つの累積演算器(算術演算回路)17及び18を備えると共に、ALU37を、3つの入力部37a,37b及び37cに与えられるオペランドデータについて同時に演算可能な構成として、その入力部37a,37b及び37cには、1つの入力ポートにゼロデータが与えられるマルチプレクサ38,39及び40を備える構成とした。
【0058】
従って、ALU37は、1サイクルで命令(Z0=Z0+M1+M2)を実行することが可能となり、従来よりも1サイクル少ない時間で倍精度乗算処理を実行することができる。具体的には、従来は同じ乗算処理を行うのに3サイクル要したものを2サイクルで行うことが可能となり、処理速度を約33%向上させることができた。
【0059】
本発明は上記し且つ図面に記載した実施例にのみ限定されるものではなく、次のような変形または拡張が可能である。
2実施例において、マルチプレクサ38,39及び40に代えて、マルチプレクサ38,39及び40のゼロデータが与えられている入力ポートを削除した2入力のマルチプレクサを配置して、上記と同様に、使用しない入力部に与えられているデータをALU37の内部で無視するようにしても良い。
【0060】
処理データやレジスタ,アキュムレータやALUなどのビット幅は一例であり、個々の処理系に応じて適宜変更して適用すれば良い。
第1実施例の乗算器3とレジスタ4との間に、第2実施例のように算術演算回路を配置しても良い。
第1実施例において、乗算結果を累積加算することなく1回毎の乗算結果のみを求める場合には、アキュムレータ8を設けずとも良い。
【0061】
第2実施例において、このような乗算処理のみを行う場合には、アキュムレータ25を設けずとも良い。
並列乗算器及び乗算結果記憶回路を、3組以上設けても良い。
算術論理演算回路は、入力部を4つ以上有するものでも良い。
演算装置としてはDSPに限ることなく、例えばCPUやマイクロコンピュータの内部回路であっても良い。
【0062】
【発明の効果】
本発明は以上説明した通りであるので、以下の効果を奏する。
請求項1記載の演算装置によれば、算術論理演算回路は、3つ以上の複数の入力部に与えられるデータをオペランドとして同時に算術論理演算することにより、従来のように入力部を2つのみ備えているものに比べて、例えば、処理データの桁数を多く必要とする倍精度乗算処理などをより少ない演算周期で行うことができ、演算処理を高速に実行することができる。そして、算術論理演算回路は、複数の選択回路を介して各入力部に与えられるオペランドデータを適宜選択することによって、より多様なオペランドの組み合わせによる演算処理を行うことができる。
【0063】
請求項2記載の演算装置によれば、算術論理演算回路は、各入力部に与えられるオペランドデータの内何れかをゼロデータとすることによって、入力部の数よりも少ない項数での加減算処理などを容易に行うことができる。
【0064】
請求項3記載の演算装置によれば、複数の並列乗算器によって乗算処理が並列に実行される場合でも、算術論理演算回路は、それら並列乗算器の乗算結果データを格納する乗算結果記憶回路の出力データと演算結果記憶回路の出力データとをオペランドとして同時に算術論理演算できるので、演算処理を高速に実行することができる。
【0067】
請求項記載の演算装置によれば、例えば、演算周期をより多く必要とする倍精度乗算処理などを実行する場合に、算術論理演算回路で処理を行うと同時に、算術演算回路によって中間処理を行うことができるので、算術論理演算回路の処理負担を軽減して、総じて演算処理を高速に実行することができる。

【図面の簡単な説明】
【図1】本発明の第1実施例における演算装置の構成を示す機能ブロック図
【図2】倍精度乗算処理を行う場合のタイミングチャート
【図3】本発明の第2実施例を示す図1相当図
【図4】図2相当図
【図5】従来技術(その1)を示す図1相当図
【図6】倍精度乗算処理を行う場合の処理過程を概念的に示す図であり、(b)は(a)をより具体的なイメージで示す図
【図7】図2相当図
【図8】従来技術(その2)を示す図3相当図
【図9】図6相当図
【図10】図4相当図
【符号の説明】
3は乗算器(並列乗算器)、4は乗算結果格納レジスタ(乗算結果記憶回路)、7及び8はアキュムレータ(演算結果記憶回路)、12及び13は乗算器(並列乗算器)、17及び18は累積演算器(算術演算回路)、19及び20は乗算結果格納レジスタ(乗算結果記憶回路)、24及び25はアキュムレータ(演算結果記憶回路)、31はDSP(演算装置)、32はALU(算術論理演算回路)、32a,32b及び32cは入力部、33,34及び35はマルチプレクサ(選択回路)、36はDSP(演算装置)、37はALU(算術論理演算回路)、37a,37b及び37cは入力部、38,39及び40はマルチプレクサ(選択回路)を示す。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an arithmetic device including a parallel multiplier and performing digital signal processing, such as a DSP.
[0002]
[Prior art]
2. Description of the Related Art In recent years, with the remarkable progress in LSI technology, signal processing technology, and the like, digitalization of information communication terminal devices such as mobile phones has been progressing. Particularly in the field of mobile phones, digitization has many advantages such as shortage of line capacity, elimination of noise, improvement of confidentiality, and prolonged calling and standby time. Is showing.
[0003]
In order to advance this digitization, a digital signal processing LSI (DSP), which is a key device, is indispensable. In digital signal processing, the product-sum operation occupies most of the processing. Therefore, how to speed up the product-sum operation in order to improve the processing time is a major development task of the DSP.
[0004]
Generally, a fixed-point DSP is used when emphasizing high-speed processing, but a programmer must always consider an arithmetic error in an application that emphasizes arithmetic accuracy. In the case of processing requiring high-precision arithmetic, a DSP having a long word length (bit width) may be used. However, in a DSP having a long word length, a memory size, a data bus, the number of terminals, Since the circuit scale of all components of the DSP, such as the register word length, becomes large, disadvantages in terms of chip size, cost, and operation speed increase. Therefore, in general, a method is often used in which calculation is performed in single precision for normal processing, and calculation is performed in double precision only for processing requiring high precision.
[0005]
Here, FIG. 5 shows a configuration example of a DSP that performs such a double precision operation. For example, operand data stored in each of the 16-bit multiplication operand registers 1 (X) and 2 (Y) is supplied to a multiplier (MPY) 3 to perform multiplication (X × Y). . The multiplication result data in the multiplier 3 is output to, for example, a 32-bit multiplication result storage register (M) 4.
[0006]
The data stored in the multiplication result storage register (hereinafter, referred to as a register) 4 is provided as an operand to an arithmetic and logic operation circuit (hereinafter, referred to as an ALU) 6 via a three-input multiplexer 5. The operation result data of the ALU 6 is stored in, for example, accumulators 7 (Z0) and 8 (Z1) of 64 bits each.
[0007]
Output data of the accumulators 7 and 8 are supplied to the ALU 6 via a multiplexer 5 and another multiplexer 9, respectively. The ALU 6 controls which data is to be selected and output by the multiplexers 5 and 9. The above constitutes the DSP 10. The DSP 10 performs arithmetic processing in an arithmetic cycle (cycle) synchronized with a system clock signal (not shown).
[0008]
FIG. 6 conceptually shows the arithmetic processing when the DSP 10 performs double-precision multiplication (32 bits × 32 bits). FIG. 6A shows that the result of multiplying each of the 32-bit operand data XH / HL and YH / YL (upper / lower: 16 bits each) is added to the accumulator Z. (B) shows an image of the bit arrangement in which the multiplication results (1) to (4) are finally stored in the accumulator Z.
[0009]
That is, in FIG. 6B, each operand data is divided into 16-bit upper data and lower data, and four multiplications (1) to (4) are performed.
(1): XL × YL
(2): XH × YL
(3): XL × YH
(4): XH × YH
Then, the multiplication results of (1) to (4) are sequentially applied to the ALU 6 via the register 4 and are added to the accumulator Z while performing digit alignment.
[0010]
FIG. 7 is a timing chart when the DSP 10 performs a multiplication process. In FIG. 7, when data XL is stored in register 1 and data YL is stored in register 2 in cycle 1 (see FIGS. 7A and 7B), multiplication is performed by multiplier 3 ((1): XL × YL) is executed in one clock, and in the next cycle 2, the multiplication result is stored in the register 4 (M) (see FIG. 7C). At the same time, the data XH is stored in the register 1 (the data in the register 2 remains YL) in order to perform the next multiplication (2).
[0011]
In cycle 2, the ALU 6 executes an instruction (Z0 = M >> 16: right-shifts the register M by 16 bits and transfers it to the accumulator Z0) (see FIG. 7D). Here, bits 31 to 0 of the register 4 (M) are transferred to bits 63 to 32 of the accumulator 7 (Z0) when the transfer from the register M to the accumulator Z is performed without shifting. Therefore, the result of executing the above instruction is transferred to bits 47 to 16 of accumulator 7 (in the next cycle 3).
[0012]
In the next cycle 3, the multiplication result ((2): XH × YL) is stored in the register 4 (see FIG. 7C). At the same time, data XL is stored in the register 1 and data YH is stored in the register 2 to perform the next multiplication (3). Further, in the ALU 6, an instruction (Z0 = Z0 + M: the contents of the register M is added to the accumulator Z0) for transferring the multiplication result ((2): XH × YL) to the bits 63 to 32 of the accumulator 7 is executed ( FIG. 7D). At this time, the result of the instruction (Z0 = M >> 16) executed by the ALU 6 in the previous cycle is stored in the accumulator 7 (see FIG. 7E).
[0013]
In the next cycle 4, similarly to cycle 3, the multiplication result ((3): XL × YH) is stored in the register 4 (see FIG. 7C), and at the same time, the data XH is stored in the register 1. Is stored (the register 2 remains in the data YH). In the ALU 6, an instruction (Z0 = Z0 + M) for adding the multiplication result ((3): XL × YH) to the bits 63 to 32 of the accumulator 7 is executed (see FIG. 7 (d)). The result of the instruction (Z0 = Z0 + M) executed by the ALU 6 in the previous cycle is stored (see FIG. 7E).
[0014]
Note that, in the cycles 3 and 4, when the multiplication results (2) and (3) are transferred to the bits 63 to 32 of the accumulator 7 (Z0) to cause an overflow in the upper digit, an overflow processing unit (not shown) It is processed appropriately.
[0015]
Then, in the next cycle 5, the multiplication result ([4]: XH × YH) is stored in the register 4 (see FIG. 7C), and at the same time, the instruction (Z0 = Z0 >> 16 + M) in the ALU6. : The content of the register M is added to the value obtained by shifting the accumulator Z0 to the right by 16 bits (see FIG. 7D).
[0016]
That is, in the process up to the cycle 4, the cumulative addition values ((1) + (2) + (3)) of the multiplication results (1) to (3) are stored in the bits 63 to 16 of the accumulator 7. By accumulating the accumulator 7 by 16 bits to the right, the accumulated value is placed in bits 47-0. In this state, by adding the contents of the register 4 (the multiplication result (4)) to the bits 63 to 32 of the accumulator 7, a multiplication result of 32 bits × 32 bits is finally obtained. At this time, the result of the instruction (Z0 = Z0 + M) executed by the ALU 6 in the immediately preceding cycle is stored in the accumulator 7 (Z0) (see FIG. 7E).
[0017]
Thus, in the next cycle 6, in the ALU 6, the instruction (Z1 = Z1 + Z0: the content of the accumulator Z1 is added to the content of the accumulator Z1) is executed (see FIG. 7D), and the accumulator 7 The result of the instruction (Z0 = Z0 >> 16 + M) executed by the ALU 6 in the immediately preceding cycle is stored (see FIG. 7E).
[0018]
In the next cycle 7, the instruction (Z1 = Z1 + Z0) is executed by the ALU 6 in the cycle 6, and as a result, the contents of the accumulator 7 (Z0) are cumulatively added to the contents of the accumulator 8 (Z1) to (OLD Z). (NEW Z), the multiplication process ends. In the above, cycles 2 to 6 are sum-of-products cycles, and require 5 cycles.
[0019]
FIG. 8 shows a configuration example of a DSP having two multipliers. Operand data stored in each of the 16-bit multiplication operand registers 11a (XH) and 11b (HL) is supplied to multipliers 12 (MPY1) and 13 (MPY2), respectively. The operand data stored in each of the 16-bit multiplication operand registers 14a (YH) and 14b (YL) is supplied to both multiplexers 15 and 16, and the output data of the multiplexers 15 and 16 are supplied to multipliers 12 and 13, respectively. It is supposed to be.
[0020]
The output data of the multipliers 12 and 13 are supplied to accumulators 17 and 18, respectively, and the output data of the accumulators 17 and 18 is a 48-bit multiplication result storage register 19 (M1) and 20 (M2). The data stored in the multiplication result storage registers 19 and 20 are supplied to the three-input multiplexers 21 and 22, respectively, and also to the accumulators 17 and 18, respectively.
[0021]
The multiplexers 21 and 22 correspond to the multiplexers 9 and 5 in the configuration of FIG. 5, and the subsequent ALU 23, accumulators 24 (Z0) and 25 (Z1) are ALU 6, accumulators 7 and 8 in the configuration of FIG. It corresponds to. The above constitutes the DSP 26.
[0022]
FIG. 9 conceptually shows the arithmetic processing when the DSP 26 performs double-precision multiplication, and is basically the same as FIG. 6; however, in FIG. (2) is performed by the multiplier 12 (MPY1), and multiplications (3) and (4) are performed by the multiplier 13 (MPY2).
[0023]
FIG. 10 is a timing chart when the DSP 26 performs a multiplication process. In FIG. 10, the timing charts of the multiplication operand registers 11a, 11b, 14a, and 14b are not shown, but these registers simultaneously store operand data XH, XL, YH, and YL in cycle 1 (not shown). It is stored and does not change until the next arithmetic processing is executed.
[0024]
In FIG. 10, in cycle 2, the data of the multiplication results (3) (XH × YL) and (1) (XL × YL) performed by the multipliers 12 and 13 are stored in the multiplication result storage register 19 (M1) and The bits are stored in bits 47 to 16 of 20 (M2) (see FIGS. 10A and 10B). At the same time, the switching of the operand data is performed by the multiplexers 15 and 16 (YL → YH), and the multipliers 12 and 13 execute the multiplications (4) (XH × YH) and (2) (XL × YH), respectively. You.
[0025]
In the next cycle 3, the accumulator 17 stores the contents (bit 31) of the data of the multiplication result (3) (XH × YL) stored in the register 19 in cycle 2 shifted right by 16 bits. The data (3) + (4) obtained by adding the data of the multiplication result (4) (XH × YH) performed in cycle 2 to bits 47 to 16 are stored in (0 to 0).
[0026]
Similarly, the multiplication result (1) (XL × YL) data stored in the register 20 in the cycle 2 is shifted by 16 bits to the right by the accumulator 18 in the cycle 20 to the register 20. The result ((1) + (2)) obtained by adding the data of the obtained multiplication result (2) (XL × YH) is stored. In the ALU 23, an instruction (Z0 = Z0 + M2 >> 16: the result of shifting the register M2 by 16 bits to the right is added to the accumulator Z0) (see FIG. 10C).
[0027]
In the next cycle 4, the contents of the registers 19 and 20 are held as they are, and the ALU 23 executes an instruction (Z0 = Z0 + M1: adding the contents of the register M1 to the accumulator Z0). As for the contents of the accumulator 24 (OLD Z), the addition value ((1) + (2)) is added to bits 47 to 0 as the execution result of the instruction (Z0 = Z0 + M2 >> 16) of the ALU 23 in cycle 3. Cumulative addition is performed.
[0028]
Then, in the next cycle 5, the addition value ((3) + (4)) is added to the bits 63 to 16 as the execution result of the instruction (Z0 = Z0 + M1) of the ALU 23 in the cycle 4 in the contents of the accumulator 24. Is done. The multiplication process is completed as described above. Cycles 2 to 4 are the product-sum cycles, and require three cycles.
[0029]
[Problems to be solved by the invention]
In the DSP 10 that performs such an operation, it is required that the arithmetic processing be performed as fast as possible even when there is a certain restriction on the bit width of the data to be handled.
The present invention has been made in view of the above circumstances, and has as its object to provide an arithmetic device capable of performing parallel multiplication processing with a smaller number of cycles.
[0030]
[Means for Solving the Problems]
In order to achieve the above object, an arithmetic device according to claim 1 includes a parallel multiplier, a multiplication result storage circuit for storing multiplication result data of the parallel multiplier, and an arithmetic unit for arithmetically converting data output from the multiplication result storage circuit. An arithmetic and logic circuit for performing a logical operation, and an operation result storage circuit for storing operation result data of the arithmetic and logic operation circuit;
The arithmetic and logic operation circuit includes three or more input units, and is configured to be able to simultaneously operate data supplied to the plurality of input units as operands.,
Each output terminal is connected to each input section of the arithmetic and logic operation circuit, and the output data of the multiplication result storage circuit or the output data of the operation result storage circuit is applied to a plurality of input terminals, and is applied to any one of the input terminals. Provided with a plurality of selection circuits configured to be capable of selectively outputting the selected data.
didIt is characterized by the following.
[0031]
With such a configuration, the arithmetic and logic operation circuit simultaneously performs arithmetic and logical operations on data supplied to three or more input units as operands, thereby providing only two input units as in the related art. For example, double-precision multiplication processing that requires a large number of digits of processing data can be performed in a smaller calculation cycle.Then, the arithmetic and logic operation circuit can perform an operation process with a wider variety of operand combinations by appropriately selecting the operand data provided to each input unit via the plurality of selection circuits.
[0032]
In this case, as described in claim 2,It is preferable that zero data be applied to any one of the plurality of input terminals of the selection circuit. With such a configuration, the arithmetic and logic operation circuit can easily perform addition / subtraction processing with a smaller number of terms than the number of input sections by setting any of the operand data supplied to each input section to zero data. It can be carried out.
[0034]
Further, as described in claim 3, a configuration may be employed in which a plurality of sets of a parallel multiplier and a multiplication result storage circuit are provided. With such a configuration, the multiplication processing is performed in parallel by the plurality of parallel multipliers. However, the arithmetic and logic circuit can perform arithmetic and logical operations simultaneously using the output data of the multiplication result storage circuit storing the multiplication result data of the parallel multipliers and the output data of the operation result storage circuit as operands. Can be performed.
[0038]
In addition, claims4As described in above, an arithmetic operation circuit for accumulatively adding / subtracting the multiplication result data of the parallel multiplier may be provided between the parallel multiplier and the multiplication result storage circuit. With this configuration, for example, when performing a double-precision multiplication process or the like that requires a longer operation cycle, the arithmetic logic circuit can perform the processing and the arithmetic processing circuit can perform the intermediate processing at the same time. Therefore, the processing load on the arithmetic and logic operation circuit can be reduced, and the arithmetic processing can be executed at high speed as a whole.
[0039]
BEST MODE FOR CARRYING OUT THE INVENTION
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. Note that the same parts as those in FIG. 5 are denoted by the same reference numerals and description thereof is omitted, and only different parts will be described below. The DSP (arithmetic unit) 31 of the present embodiment includes three input units 32a, 32b and 32c in place of the ALU 6 of the DSP 10 shown in FIG. 5, so that three operand data respectively given to these units can be simultaneously operated. The constructed ALU (arithmetic logic operation circuit) 32 is arranged.
[0040]
Instead of the multiplexers 9 and 5, the three input units 32a, 32b and 32c of the ALU 32 select one of the data supplied to the two input ports (input terminals) and output the data to an output port (output terminal). (Selection circuits) 33, 34, and 35 that output the signals to the other. Data stored in accumulators (operation result storage circuits) 7 and 8 and a multiplication result storage register (multiplication result storage circuit) 4 are given to one input port of the multiplexers 33, 34, and 35, and the other input port is connected to the other input port. Is given zero data. Other configurations are the same as those in FIG.
[0041]
With such a configuration, the ALU 32 can execute addition and subtraction between the following three terms, assuming that the operand data provided to the three input units 32a, 32b, and 32c are a, b, and c, respectively. .
a + b + c, a-b + c, a + bc, abc
When any one of the operand data is not used for addition and subtraction, the corresponding multiplexer is made to select zero data, so that the binary operation of a ± b, b ± c, and a ± c is performed in the same manner as in the related art. You can also.
[0042]
Next, the operation of the present embodiment will be described with reference to FIG. FIG. 2 is a timing chart in the case where double precision multiplication is performed by the DSP 31, as in the case shown in FIG. In FIG. 2, the arithmetic processing is performed up to cycle 4 in the same manner as in the timing chart shown in FIG.
[0043]
That is, the ALU 32 executes the same instruction as that shown in FIG. 7 through the multiplexer 32c in cycle 2 and through the multiplexers 32a and 32c in cycles 3 and 4. In this case, for the multiplexer 32b not used for addition, zero data is selected as described above.
[0044]
Then, in cycle 5, the ALU 32 uses the multiplexers 33, 34, and 35 to store the instruction (Z1 = Z1 + Z0 >> 16 + M: the contents of the accumulator Z1 by shifting the accumulator Z0 by 16 bits to the right and the contents of the register M. Addition).
[0045]
That is, the instruction executed by the ALU 32 in the cycle 5 here is the instruction executed in the cycles 5 and 6 in the timing chart shown in FIG.
[0046]
Then, in the next cycle 6, the execution result of the instruction (Z1 = Z1 + Z0 >> 16 + M) of the ALU 32 in the cycle 5 is stored in the accumulator 8 (Z1), and the content of the accumulator 8 becomes (NEW Z). Ends. Therefore, the product-sum cycle in this embodiment is four cycles of cycles 2 to 5, and is executed in a time shorter by one cycle than in the conventional case.
[0047]
As described above, according to the present embodiment, when the 16-bit operand data provided to the multiplication operand registers 1 and 2 are multiplied by the multiplier 3 to perform a 32-bit × 32-bit double precision multiplication process, The ALU 32 is configured to be able to simultaneously operate on the operand data supplied to the three input units 32a, 32b and 32c. The input units 32a, 32b and 32c have one input port having the accumulators 7 and 8 and the output of the register 4 Multiplexers 33, 34 and 35 are provided which are supplied with data and are supplied with zero data at the other input port.
[0048]
Therefore, since the result of the last multiplication (4) (XH × YH) is stored in the register 4 and the accumulator 8 can be added at the same time, the double-precision multiplication process is executed in one cycle shorter than the conventional case. can do. Specifically, what was conventionally required 5 cycles to perform the same multiplication processing can be performed in 4 cycles, and the processing speed can be improved by 20%.
[0049]
Further, by providing the multiplexers 33, 34 and 35, the arithmetic processing can be performed with various combinations of operands, and by selecting and outputting zero data to any one of the multiplexers, as in the conventional case, Binomial calculations of a ± b, b ± c, and a ± c can be easily performed.
[0050]
(Second embodiment)
FIGS. 3 and 4 show a second embodiment of the present invention. The same parts as those in FIG. 8 are denoted by the same reference numerals, and description thereof will be omitted. Hereinafter, only different parts will be described. In the DSP (arithmetic unit) 36 of the second embodiment, instead of the ALU 23 of the DSP 26 shown in FIG. 8, similarly to the first embodiment, an ALU (arithmetic logic operation) configured to be able to operate three operand data simultaneously is used. (Circuit) 37 is disposed.
[0051]
Also, instead of the multiplexers 21 and 22, the three input units 37a, 37b and 37c of the ALU 37 are provided with multiplexers (selection circuits) 38 and 39 for selecting and outputting any one of the data supplied to the three input ports. And 40 are arranged. Two input ports of the multiplexer 38 are provided with data stored in accumulators (operation result storage circuits) 24 (Z0) and 25 (Z1), and two input ports of the multiplexer 39 are provided with the accumulator 24 and the multiplication result. Data stored in a storage register (multiplication result storage circuit) 19 (M1) is provided.
[0052]
The two input ports of the multiplexer 40 are provided with the data stored in the accumulator 25 and the multiplication result storage register (multiplication result storage circuit) 20 (M2). The remaining one input port of each of the multiplexers 38, 39 and 40 is supplied with zero data. Other configurations are the same as those in FIG.
[0053]
With such a configuration, the ALU 37 can perform addition and subtraction between three terms with respect to the operand data a, b, and c provided to the three input units 37a, 37b, and 37c, respectively, similarly to the ALU 32. By causing any one of the multiplexers to select zero data, a binary operation can be performed as in the conventional case.
[0054]
Next, the operation of the second embodiment will be described. FIG. 4 is a timing chart in the case where double precision multiplication is performed by the DSP 36, as in the case shown in FIG. In FIG. 4, the ALU 37 executes an instruction (Z0 = Z0 + M1 + M2: the contents of the registers M1 and M2 to the contents of the accumulator Z0) using the multiplexers 38, 39 and 40 in cycle 3.
[0055]
That is, the instruction executed by the ALU 37 in the cycle 3 here is an instruction executed in the cycles 3 and 4 in the timing chart shown in FIG. 10 in one cycle.
[0056]
Then, in the next cycle 4, the execution result of the instruction (Z0 = Z0 + M1 + M2) of the ALU 37 in the cycle 3 is stored in the accumulator 24 (Z0), the content of the accumulator 24 becomes (NEW Z), and the multiplication process ends. . Therefore, the product-sum cycle in the second embodiment is two cycles of cycles 2 and 3, and is executed in a time shorter by one cycle than in the related art.
[0057]
As described above, according to the second embodiment, two multipliers (parallel multipliers) 12 and 13 and two accumulators (arithmetic operation circuits) 17 and 18 are provided, and the ALU 37 is connected to the three input units 37a. , 37b, and 37c, the input units 37a, 37b, and 37c include multiplexers 38, 39, and 40 for supplying zero data to one input port.
[0058]
Therefore, the ALU 37 can execute the instruction (Z0 = Z0 + M1 + M2) in one cycle, and can execute the double-precision multiplication processing in one cycle less time than in the related art. Specifically, it has become possible to perform the same multiplication processing in three cycles in the past, but in two cycles, thereby improving the processing speed by about 33%.
[0059]
The present invention is not limited to the embodiment described above and shown in the drawings, and the following modifications or extensions are possible.
No.In the second embodiment, instead of the multiplexers 38, 39, and 40, a two-input multiplexer in which the input ports of the multiplexers 38, 39, and 40 to which the zero data is provided is deleted, and the multiplexers are not used in the same manner as described above. The data supplied to the input unit may be ignored inside the ALU 37.
[0060]
The bit widths of processing data, registers, accumulators, ALUs, and the like are merely examples, and may be appropriately changed and applied according to each processing system.
An arithmetic operation circuit may be arranged between the multiplier 3 and the register 4 in the first embodiment as in the second embodiment.
In the first embodiment, the accumulator 8 need not be provided when only the multiplication result for each time is obtained without cumulatively adding the multiplication results.
[0061]
In the second embodiment, when only such a multiplication process is performed, the accumulator 25 need not be provided.
Three or more sets of parallel multipliers and multiplication result storage circuits may be provided.
The arithmetic and logic operation circuit may have four or more input units.
The arithmetic device is not limited to the DSP, but may be, for example, a CPU or an internal circuit of a microcomputer.
[0062]
【The invention's effect】
Since the present invention is as described above, the following effects are obtained.
According to the arithmetic device of the first aspect, the arithmetic and logic operation circuit performs the arithmetic and logical operation simultaneously with the data supplied to the three or more input units as the operands, so that only two input units are provided as in the related art. For example, double-precision multiplication processing that requires a large number of digits of processing data can be performed in a smaller calculation cycle than that provided, and the calculation processing can be executed at a higher speed.Then, the arithmetic and logic operation circuit can perform an operation process with a wider variety of operand combinations by appropriately selecting the operand data provided to each input unit via the plurality of selection circuits.
[0063]
According to the arithmetic device of the second aspect, the arithmetic and logic operation circuit comprises:By making any one of the operand data given to each input unit zero data, it is possible to easily perform addition / subtraction processing with a smaller number of terms than the number of input units.be able to.
[0064]
According to the arithmetic device of the third aspect, even when the multiplication processing is performed in parallel by a plurality of parallel multipliers, the arithmetic and logic operation circuit is configured to store the multiplication result data of the parallel multipliers. Since the arithmetic logic operation can be performed simultaneously with the output data and the output data of the operation result storage circuit as operands, the operation processing can be executed at high speed.
[0067]
Claim4According to the described arithmetic device, for example, when performing a double-precision multiplication process or the like that requires a longer calculation cycle, the arithmetic logic circuit can perform the processing and the arithmetic processing circuit can perform the intermediate processing at the same time. Therefore, the processing load on the arithmetic and logic operation circuit can be reduced, and the arithmetic processing can be executed at high speed as a whole.

[Brief description of the drawings]
FIG. 1 is a functional block diagram illustrating a configuration of an arithmetic unit according to a first embodiment of the present invention.
FIG. 2 is a timing chart when a double precision multiplication process is performed.
FIG. 3 is a view corresponding to FIG. 1, showing a second embodiment of the present invention;
FIG. 4 is a diagram corresponding to FIG. 2;
FIG. 5 is a diagram corresponding to FIG. 1 showing a prior art (No. 1);
FIGS. 6A and 6B are diagrams conceptually showing a processing process in a case where a double precision multiplication process is performed, and FIG. 6B is a diagram showing FIG.
FIG. 7 is a diagram corresponding to FIG. 2;
FIG. 8 is a diagram corresponding to FIG. 3, showing a related art (No. 2).
FIG. 9 is a diagram corresponding to FIG. 6;
FIG. 10 is a diagram corresponding to FIG. 4;
[Explanation of symbols]
3 is a multiplier (parallel multiplier), 4 is a multiplication result storage register (multiplication result storage circuit), 7 and 8 are accumulators (operation result storage circuit), 12 and 13 are multipliers (parallel multiplier), 17 and 18 Is an accumulator (arithmetic operation circuit), 19 and 20 are multiplication result storage registers (multiplication result storage circuit), 24 and 25 are accumulators (operation result storage circuit), 31 is a DSP (arithmetic device), and 32 is an ALU (arithmetic circuit). Logic operation circuits), 32a, 32b and 32c are input units, 33, 34 and 35 are multiplexers (selection circuits), 36 is a DSP (arithmetic device), 37 is an ALU (arithmetic logic operation circuit), 37a, 37b and 37c are Inputs 38, 39 and 40 indicate multiplexers (selection circuits).

Claims (4)

並列乗算器と、この並列乗算器の乗算結果データを格納する乗算結果記憶回路と、この乗算結果記憶回路から出力されるデータを算術論理演算する算術論理演算回路と、この算術論理演算回路の演算結果データを格納する演算結果記憶回路とを具備してなる演算装置において、
前記算術論理演算回路は、3つ以上の複数の入力部を備え、これら複数の入力部に与えられるデータをオペランドとして同時に演算可能に構成され
算術論理演算回路の各入力部に各出力端子が接続されると共に、複数の入力端子には乗算結果記憶回路の出力データ或いは演算結果記憶回路の出力データが与えられており、何れかの入力端子に与えられているデータを選択的に出力可能に構成された複数の選択回路を具備したことを特徴とする演算装置。
A parallel multiplier, a multiplication result storage circuit for storing multiplication result data of the parallel multiplier, an arithmetic and logic operation circuit for performing an arithmetic and logic operation on data output from the multiplication result storage circuit, and an operation of the arithmetic and logic operation circuit An operation result storage circuit for storing result data,
The arithmetic and logic operation circuit includes three or more input units, and is configured to be able to simultaneously operate data supplied to the plurality of input units as operands ,
Each output terminal is connected to each input unit of the arithmetic and logic operation circuit, and the output data of the multiplication result storage circuit or the output data of the operation result storage circuit is given to the plurality of input terminals. An arithmetic device comprising a plurality of selection circuits configured to selectively output the data given to the computer.
選択回路の複数の入力端子の内の何れか一つには、ゼロデータが与えられていることを特徴とする請求項1記載の演算装置。The arithmetic device according to claim 1 , wherein zero data is given to any one of the plurality of input terminals of the selection circuit . 並列乗算器及び乗算結果記憶回路を複数組備えていることを特徴とする請求項1または2記載の演算装置。3. The arithmetic unit according to claim 1, comprising a plurality of sets of a parallel multiplier and a multiplication result storage circuit. 並列乗算器と乗算結果記憶回路との間に、並列乗算器の乗算結果データを累積加減算する算術演算回路を具備したことを特徴とする請求項1乃至3の何れかに記載の演算装置。 4. The arithmetic device according to claim 1, further comprising an arithmetic operation circuit for cumulatively adding / subtracting the multiplication result data of the parallel multiplier, between the parallel multiplier and the multiplication result storage circuit .
JP06292098A 1998-03-13 1998-03-13 Arithmetic unit Expired - Fee Related JP3547309B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06292098A JP3547309B2 (en) 1998-03-13 1998-03-13 Arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06292098A JP3547309B2 (en) 1998-03-13 1998-03-13 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPH11259273A JPH11259273A (en) 1999-09-24
JP3547309B2 true JP3547309B2 (en) 2004-07-28

Family

ID=13214189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06292098A Expired - Fee Related JP3547309B2 (en) 1998-03-13 1998-03-13 Arithmetic unit

Country Status (1)

Country Link
JP (1) JP3547309B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984520A (en) * 2014-04-22 2014-08-13 浙江大学 Self-adjusting multiply accumulation device for lossless audio decoding algorithm

Also Published As

Publication number Publication date
JPH11259273A (en) 1999-09-24

Similar Documents

Publication Publication Date Title
US6009451A (en) Method for generating barrel shifter result flags directly from input data
US5218564A (en) Layout efficient 32-bit shifter/register with 16-bit interface
EP1293891B2 (en) Arithmetic processor accomodating different finite field size
JP3759647B2 (en) Apparatus and method for performing both 24-bit and 16-bit arithmetic operations
EP1049025B1 (en) Method and apparatus for arithmetic operations
GB2330226A (en) Digital signal processor for performing fixed-point and/or integer arithmetic
JPH10187438A (en) Method for reducing transition to input of multiplier
US4065666A (en) Multiply-divide unit
KR19980041758A (en) 2-Bit Booth Multiplier with Reduced Data Path Width
JP3547309B2 (en) Arithmetic unit
US5912904A (en) Method for the production of an error correction parameter associated with the implementation of modular operations according to the Montgomery method
KR100481586B1 (en) Apparatus for modular multiplication
JP3579087B2 (en) Arithmetic unit and microprocessor
KR100315303B1 (en) Digital signal processor
KR100251547B1 (en) Digital signal processor
KR100251546B1 (en) Digital signal processor
US6792442B1 (en) Signal processor and product-sum operating device for use therein with rounding function
US6643677B2 (en) Digital arithmetic integrated circuit
Mahdy et al. Algorithm and two efficient implementations for complex multiplier
KR100246472B1 (en) Digital signal processor
KR100297544B1 (en) Digital signal processor
JP2948921B2 (en) Arithmetic operation module coupled to microprocessor central processing unit
JPH06301710A (en) Method and device for double precision product-sum operation
JP3723311B2 (en) Parallel processor
JP3541776B2 (en) Microcomputer

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040406

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040413

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080423

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090423

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100423

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees