JP4510253B2 - Arithmetic processing unit - Google Patents

Arithmetic processing unit Download PDF

Info

Publication number
JP4510253B2
JP4510253B2 JP2000256742A JP2000256742A JP4510253B2 JP 4510253 B2 JP4510253 B2 JP 4510253B2 JP 2000256742 A JP2000256742 A JP 2000256742A JP 2000256742 A JP2000256742 A JP 2000256742A JP 4510253 B2 JP4510253 B2 JP 4510253B2
Authority
JP
Japan
Prior art keywords
precision
data
double
storage means
unit
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
JP2000256742A
Other languages
Japanese (ja)
Other versions
JP2002073323A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2000256742A priority Critical patent/JP4510253B2/en
Publication of JP2002073323A publication Critical patent/JP2002073323A/en
Application granted granted Critical
Publication of JP4510253B2 publication Critical patent/JP4510253B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、通信端末装置等に組み込まれる演算処理装置に関し、特に、倍精度除算を行う演算処理装置に関する。
【0002】
【従来の技術】
近年、移動体無線通信においては、符号化処理および復号化処理をDSP(Digital Signal Processor)によるソフト処理により実現する傾向が高い。DSPとしては、単精度のDSP(例えば、TI社製のC54x等)が用いられることが多い。単精度のDSPは、単精度の除算を1ビット当り1マシンサイクルで比較的効率的に実行することが可能である。
【0003】
一方、移動体無線通信では、携帯端末のバッテリの寿命を長時間持続させることが望まれているだけでなく、携帯端末の小型化・軽量化・低価格化を図ることも望まれている。これらを実現するために、携帯端末に搭載されたLSIに集積するトランジスタ数をできるだけ少なくする必要がある。
【0004】
LSIに集積するトランジスタ数を少なくすれば、それだけLSIチップの面積を小さくすることができる。これにより、LSIチップの単価を安価なものにできるだけでなく、LSIチップ内部の配線抵抗の低減化および充放電するトランジスタ数の削減を図ることができる。この結果、LSIチップをより高速に動作させることが可能となるとともに、LSIチップの低消費電力化を図ることができる。
【0005】
【発明が解決しようとする課題】
しかしながら、上記従来のDSPにおいては、次に述べるような問題がある。すなわち、近年の移動体無線通信においては、DSPによりなされるソフト処理の中には、例えば、倍精度のテーブル値と受信した倍精度のデータとの除算といった演算(倍精度の除算)が含まれている。
【0006】
ところが、現在主流となっているDSPは、単精度の演算体系(すなわち、単精度の汎用レジスタファイルとシフトレジスタ、および、単精度の算術論理演算器(Arithmetic Logical Unit;ALU)と乗算器を搭載した演算体系)を採用しており、積和演算用に、アキュムレータとして倍精度レジスタと倍精度演算器を装備しているにすぎない。
【0007】
このようなDSPを用いて倍精度の除算(除数および被除数ともに倍精度)を実現するためには、単精度演算体系で倍精度の演算を行う必要があるので、倍精度データを上位ビットと下位ビットに分けて演算を行わなければならない。この結果、多くのマシンサイクル(すなわち1ビット当り複数のマシンサイクル)が必要となる。
【0008】
マシンサイクル数を抑えるための手段として、倍精度の演算体系を採用したDSPを用いるとともに、すべての演算資源を倍精度化する方法が考えられる。しかし、この場合には、倍精度の除算については、演算に要するマシンサイクル数は減少するものの、倍精度の除算以外の大半の単精度演算については、倍精度の演算体系を採用したDSP、および、倍精度化された演算資源は、過剰な演算資源となる。この結果、LSIに集積するトランジスタ数が増加するので、消費電力の増大を招き、携帯端末のバッテリを長時間持続させることが困難となる。さらに、LSIに集積するトランジスタ数が増加すれば、LSIチップの面積も増大するので、携帯端末の低価格化を実現することも困難となる。
【0009】
本発明は、かかる点に鑑みてなされたものであり、単精度の演算体系を採用したDSPの演算資源を用いて、倍精度の除算を効率的に実現する演算処理装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
本発明の演算処理装置は、単精度データに対する処理を行う単精度演算手段と、積和演算時に倍精度データに対する処理を行う倍精度演算手段と、を具備し、前記単精度演算手段および前記倍精度演算手段を用いて倍精度データの除算を行う構成を採る。
【0011】
本発明の演算処理装置は、単精度演算手段が、倍精度データである被除数のうちの下位ビットと演算結果の符号とを含む単精度データをシフトアップして格納する第1格納手段と、前記被除数のうちの上位ビットと前記第1格納手段に格納されたデータとを含む単精度データをシフトアップして格納する第2格納手段と、を具備し、倍精度演算手段が、倍精度データである除数を格納する除数格納手段と、倍精度データである演算結果を格納する演算結果格納手段と、前記第2格納手段に格納されたデータと前記演算結果格納手段に格納された演算結果とを含む倍精度のデータを一方の倍精度データとし、前記除数格納手段に格納された除数を他方の倍精度データとし、演算結果の符号に応じて、前記一方の倍精度データと前記他方の倍精度データとの加減算を行い、演算結果を得る加減算手段と、を具備する構成を採る。
【0012】
これらの構成によれば、LSIに集積するトランジスタ数を少なくすることができるので、携帯端末のバッテリの寿命を長時間持続させることができるだけでなく、携帯端末の小型化・軽量化・低価格化を図ることもできる。さらに、倍精度のデータを上位ビットと下位ビットに分けて演算を行う必要もないので、倍精度除算に要するマシンサイクル数を低減することができる。
【0013】
本発明の演算処理装置は、第1格納手段が、単精度データである第1の被除数と演算結果の上位ビットの符号とを含む単精度データをシフトアップして格納し、第2格納手段は、単精度データである第2の被除数と演算結果の下位ビットの符号とを含む単精度データをシフトアップして格納し、除数格納手段が、単精度データである第1の除数および単精度データである第2の除数を含む倍精度データを格納し、加減算手段が、前記第1格納手段に格納されたデータと前記第2格納手段に格納されたデータと演算結果格納手段に格納された演算結果とを含む倍精度データを一方の倍精度データとし、前記除数格納手段に格納され倍精度データを他方の倍精度データとし、演算結果の上位ビットの符号および下位ビットの符号に応じて、前記一方の倍精度データの上位ビットと前記他方の倍精度データの上位ビットとの加減算、および、前記一方の倍精度データの下位ビットと前記他方の倍精度データの下位ビットとの加減算を独立に行い、演算結果を得る構成を採る。
【0014】
この構成によれば、単精度の除算を1ビット当り0.5マシンサイクルで実行すること、すなわち、2つの単精度の除算を1ビット当り1マシンサイクルで独立に実行することができるので、携帯端末の小型化・軽量化・低価格化・バッテリの長寿命化を図ることができる。
【0015】
本発明の通信端末装置は、上記いずれかの演算処理装置を備えた構成を採る。本発明の基地局装置は、上記いずれかの演算処理装置を備えた構成を採る。
【0016】
これらの構成によれば、装置本体の小型化・軽量化・低価格化・バッテリの長寿命化を実現した通信端末装置および基地局装置を提供することができる。
【0017】
【発明の実施の形態】
本発明の骨子は、単精度の演算資源(すなわち、単精度データをシフトアップして格納するシフトレジスタ)および積和演算用に用いられる倍精度演算資源(すなわち、倍精度データを格納するレジスタおよび倍精度データの加減算を行う演算器)を用いて、倍精度除算を行うことである。
【0018】
以下、本発明の実施の形態について、図面を参照して詳細に説明する。
【0019】
(実施の形態1)
図1は、本発明の実施の形態1にかかる演算処理装置の構成を示すブロック図である。図1において、倍精度レジスタ103は、倍精度の除数を格納し、この除数を倍精度演算器101に出力する。倍精度レジスタ104は、倍精度演算器101による演算結果を格納し、この演算結果における下位7ビットを倍精度演算器101に出力する。フラグレジスタ102は、倍精度演算器101による演算結果における符号0(MSB)を格納し、この符号0を倍精度演算器101に出力する。反転器107は、倍精度演算結果101による演算結果における符号0を反転してシフトレジスタ105に出力する。
【0020】
シフトレジスタ105は、単精度のデータを格納するものであり、クロックに従って、単精度のデータ全体を1ビットシフトアップするとともに、反転器107の出力を単精度のデータのLSBに格納する。シフトレジスタ106は、単精度のデータを格納するものであり、クロックに従って、単精度のデータ全体を1ビットシフトアップするとともに、シフトレジスタ105のMSBを単精度データのLSBに格納する。
【0021】
倍精度演算器101は、一方に倍精度レジスタ104の出力とシフトレジスタ106の出力とを入力し、他方に倍精度レジスタ103の出力を入力し、フラグレジスタ102の出力に応じて、倍精度の加算または減算を行う。倍精度演算器101の詳細について、さらに図2を参照して説明する。図2は、本発明の実施の形態1にかかる演算処理装置における倍精度演算器101の構成を示す模式図である。
【0022】
図2において、倍精度演算器101は、倍精度レジスタ104に格納されたデータにおける下位7ビットと、シフトレジスタ106に格納されたデータにおけるMSBとを連結して8ビットとしたデータ(以下便宜的に「A」とする)を、一方に入力する。また、倍精度演算器101は、倍精度レジスタ103に格納されたデータ(以下便宜的に「B」とする)を入力する。さらに、倍精度演算器101は、フラグレジスタ102に格納されたデータが”1”の場合には、倍精度加算すなわち「A+B」を行い、逆に、フラグレジスタ102に格納されたデータが”0”の場合には、倍精度減算すなわち「A−B」を行う。以上が、倍精度演算器101の具体的な構成である。
【0023】
なお、上述した倍精度演算器101、倍精度レジスタ103および倍精度レジスタ104としては、例えば、単精度の演算体系を採用したDSPにおいて積和演算用に搭載されたものを用いることが可能である。また、シフトレジスタ105、シフトレジスタ106、反転器107およびフラグレジスタ102としては、例えば、単精度の演算資源に含まれているものを用いることが可能である。
【0024】
次いで、上記構成を有する演算処理装置の動作について、さらに図3を参照して説明する。図3は、本発明の実施の形態1にかかる演算処理装置の倍精度除算における動作を示すタイミング図である。なお、本実施の形態では、簡略化のために、単精度を4ビットとし、倍精度を8ビットとし、被除数を”110”(10進数)とし、除数を”20”(10進数)としたときの倍精度除算を行う場合を例にとり説明する。なお、その他の演算精度についても適宜変更を施すことにより同様の解釈が成り立つ。
【0025】
被除数である”110”は、8ビットの2進数による表記では、”01101110”となる。初期設定時には、シフトレジスタ106には、被除数における上位4ビットである”0110”が格納され、シフトレジスタ105には、被除数における下位4ビットである”1110”が格納される。
【0026】
除数である”20”は、8ビットの2進数による表記では、”00010100”となる。初期設定時には、倍精度レジスタ103には、この除数が格納される。また、倍精度レジスタ104およびフラグレジスタ102は、初期設定時には、零でクリアされる。
【0027】
初期設定(クロック0)時には、倍精度演算器101の一方には、倍精度レジスタ104の下位7ビット”0000000”とシフトレジスタ106のMSB”0”とが連結された”0000000”がAとして入力され、他方には倍精度レジスタ103の”00010100”がBとして入力される。フラグレジスタ102に格納されたデータは”0”であるので、倍精度演算器101では、A−Bが行われて、演算結果として”11101100”が得られる。
【0028】
倍精度演算器101の演算結果は、倍精度レジスタ104に出力される。また、倍精度演算器101の演算結果における符号0(すなわちMSB)である”1”が、フラグレジスタ102および反転器107に出力される。
【0029】
次に、クロック1において、倍精度レジスタ104には倍精度演算器101の演算結果”11101100”が格納され、フラグレジスタ102には倍精度演算器101の演算結果における符号0である”1”が格納される。また、反転器107よりシフトレジスタ105に対して、上記符号0を反転した”0”が出力される。
【0030】
シフトレジスタ106では、クロックに従って、全体が1ビットシフトアップされたデータが格納されるとともに、LSBにシフトレジスタ105のMSBである”1”が格納される。すなわち、シフトレジスタ106には、”1101”が格納される。
【0031】
シフトレジスタ105では、クロックに従って、全体が1ビットシフトアップされたデータが格納されるとともに、LSBに反転器107の出力である”0”が格納される。すなわち、シフトレジスタ105には、”1100”が格納される。
【0032】
クロック1においては、倍精度演算器101の一方には、倍精度レジスタ104の下位7ビット”1101100”とシフトレジスタ106のMSB”1”とが連結された”11011001”がAとして入力され、他方には倍精度レジスタ103の”00010100”がBとして入力される。フラグレジスタ102に格納されたデータは”1”であるので、倍精度演算器101では、A+Bが行われて、演算結果として”11101101”が得られる。
【0033】
上述したように、倍精度演算器101の演算結果は、倍精度レジスタ104に出力され、また、倍精度演算器101の演算結果における符号0である”1”が、フラグレジスタ102および反転器107に出力される。
【0034】
以後同様に、クロック2〜クロック8において上述した処理が行われる。クロック8における最終結果において、シフトレジスタ106に格納された”0000”とシフトレジスタ105に格納された”0101”とを連結した値”00000101”が、倍精度除算の商となる。すなわち、倍精度除算の商は、10進数の表記によれば、”5”となる。
【0035】
また、最終結果におけるフラグレジスタ102の値が”0”の場合には、倍精度レジスタ104の値が、倍精度除算の剰余となり、逆に、最終結果におけるフラグレジスタ102の値が”1”の場合には、倍精度レジスタ103と倍精度レジスタ104とを倍精度加算した値が、倍精度除算の剰余となる。
【0036】
本実施の形態では、最終結果におけるフラグレジスタ102の値が”0”であるので、倍精度除算の剰余は、倍精度レジスタ104の値”00001010”となる。すなわち、倍精度除算の剰余は、10進数の表記によれば”10”となる。
【0037】
以上のような倍精度除算によれば、図3から明かなように、倍精度(8ビット)の除算を8マシンサイクル(すなわち、1ビットにつき1マシンサイクル)で行うことができる。
【0038】
なお、本実施の形態では、倍精度演算器101の演算結果の符号を反転させた値をシフトレジスタ105のLSBに格納する場合について説明したが、本発明は、これに限定されず、倍精度演算器101の演算結果の符号を反転させずにシフトレジスタ105のLSBに格納する場合についても適用可能である。この場合には、一連の除算が終了した後、シフトレジスタ105に格納された値を反転させた値とシフトレジスタ106に格納された値を反転させた値とを連結した値が倍精度除算の商となる。
すなわち、初期状態では、シフトレジスタ106およびシフトレジスタ105には被除数が格納され、一連の除算が終了した最終状態では、シフトレジスタ106の値とシフトレジスタ105の値とを連結した値は、倍精度除算の商を反転させた値となる。よって、シフトレジスタ106の値を反転させた値とシフトレジスタ105の値を反転させた値とを連結した値が、倍精度除算の商となる。
【0039】
このように、本実施の形態にかかる演算処理装置によれば、倍精度の演算体系を採用したDSPや倍精度化された演算資源を用いることなく、単精度の演算体系を採用したDSPにおける積和演算用の倍精度レジスタと倍精度演算器、および、単精度の演算資源により、倍精度の除算を実現している。この結果、LSIに集積するトランジスタ数を少なくすることができるので、携帯端末のバッテリの寿命を長時間持続させることができるだけでなく、携帯端末の小型化・軽量化・低価格化を図ることもできる。さらに、倍精度のデータを上位ビットと下位ビットに分けて演算を行う必要もないので、倍精度除算に要するマシンサイクル数を低減することができる。
【0040】
(実施の形態2)
本実施の形態では、実施の形態1において、2つの単精度除算を独立に実行する場合について説明する。図4は、本発明の実施の形態2にかかる演算処理装置の構成を示すブロック図である。図4において、倍精度レジスタ403は、単精度の除数を2つ格納し、これらの除数を倍精度演算器401に出力する。倍精度レジスタ404は、倍精度演算器401による演算結果を格納し、この演算結果をセレクタ410に出力する。
【0041】
フラグレジスタ402は、倍精度演算器401による演算結果における符号0(すなわち演算結果における上位側の符号)を格納し、この符号0を倍精度演算器401に出力する。フラグレジスタ408は、倍精度演算器401による演算結果における符号1(すなわち演算結果における下位側の符号)を格納し、この符号1を倍精度演算器401に出力する。
【0042】
反転器407は、倍精度演算器101による演算結果における符号0を反転してシフトレジスタ405に出力する。シフトレジスタ405は、単精度のデータを格納するものであり、クロックに従って、単精度のデータ全体を1ビットシフトアップするとともに、反転器407の出力を単精度のデータのLSBに格納する。反転器409は、倍精度演算器101による演算結果における符号1を反転してセレクタ411に出力する。
【0043】
セレクタ411は、制御部412からの制御信号に基づいて、シフトレジスタ405の出力または反転器409の出力のいずれかをシフトレジスタ406に出力する。セレクタ411の詳細について、さらに図5を参照して説明する。図5は、本発明の実施の形態2にかかる演算処理装置におけるセレクタ411の構成を示す模式図である。
【0044】
図5に示すように、セレクタ411は、反転器409の出力と、シフトレジスタ405に格納されたデータにおけるMSB(b3)とを入力する。このセレクタ411は、制御部412からの制御信号が0である場合(すなわち倍精度除算実行時)には、シフトレジスタ405のMSBをシフトレジスタ406に出力する。すなわち、実施の形態1でシフトレジスタ106にシフトレジスタ105のMSBが入力されるのと同様に、本実施の形態では、シフトレジスタ406にシフトレジスタ405のMSBが入力される。
【0045】
逆に、このセレクタ411は、制御部412からの制御信号が1である場合(すなわち2つの単精度除算の並列実行時)には、反転器409の出力をシフトレジスタ406に出力する。以上がセレクタ411の具体的な構成である。
【0046】
シフトレジスタ406は、単精度のデータを格納するものであり、クロックに従って、単精度のデータ全体を1ビットシフトアップするとともに、セレクタの出力を単精度のデータのLSBに格納する。
【0047】
セレクタ410は、倍精度レジスタ404の出力、シフトレジスタ405の出力、および、シフトレジスタ406の出力を入力し、制御部412からの制御信号に基づいて、倍精度演算器401への出力を選択する。セレクタ410の詳細について、さらに図6および図7を参照して説明する。
【0048】
図6は、本発明の実施の形態2にかかる演算処理装置における倍精度除算実行時のセレクタ410の出力信号を示す模式図である。図7は、本発明の実施の形態2にかかる演算処理装置における2つの単精度除算実行時のセレクタ410の出力信号を示す模式図である。
【0049】
制御部412からの制御信号が0である場合(すなわち倍精度除算実行時)には、セレクタ410は、図6に示すように、倍精度レジスタ404に格納されたデータにおける下位7ビット(図6中では倍精度レジスタ404[6:0]と表記)と、シフトレジスタ406に格納されたデータにおけるMSB(図6中ではシフトレジスタ406[3]と表記)とを連結して8ビットとしたデータを、倍精度演算器401の一方に出力する。すなわち、実施の形態1で倍精度演算器101の一方に倍精度レジスタ104の下位7ビットとシフトレジスタ106のMSBとを連結した8ビットのデータが入力されるのと同様に、本実施の形態では、倍精度演算器401の一方には、倍精度レジスタ404の下位7ビットとシフトレジスタ606のMSBとを連結した8ビットのデータが入力される。
【0050】
逆に、制御部412からの制御信号が1である場合(すなわち2つの単精度除算実行時)には、セレクタ410は、図7に示すように、倍精度レジスタ404の第6ビット(b6)〜第4ビット(b4)と、シフトレジスタ406のMSB(b3)と、シフトレジスタ404の第2ビット(b2)〜第0ビット(b0)と、シフトレジスタ405のMSB(b3)と、を連結して8ビットとしたデータを、倍精度演算器401の一方に出力する。以上がセレクタ410の詳細である。
【0051】
倍精度演算器401は、一方にセレクタ410の出力(ここでは「A」とする)を入力し、他方に倍精度レジスタ403の出力(ここでは「B」とする)を入力し、フラグレジスタ402の出力、フラグレジスタ408の出力および制御部412からの制御信号に基づいて、倍精度除算または2つの単精度除算を行う。倍精度演算器401の詳細について、さらに図8を参照して説明する。図8は、本発明の実施の形態2にかかる演算処理装置における倍精度演算器401の構成を示す模式図である。
【0052】
制御部412からの制御信号が0である場合(すなわち倍精度除算実行時)においては、実施の形態1と同様に、倍精度演算器401は、フラグレジスタ402の値が”1”のときにはA[7:0]−B[7:0]を出力し、フラグレジスタ402の値が”0”のときにはA[7:0]+B[7:0]を出力する。ただし、A[X:Y]とは、「AのXビットからYビットのデータ」に相当する(X>Y)。
【0053】
制御部412からの制御信号が1である場合(すなわち2つの単精度除算実行時)においては、倍精度演算器401は、フラグレジスタ402が”1”であり、かつ、フラグレジスタ408が”1”であるときには、(A[7:4]+B[7:4])と(A[3:0]+B[3:0])とを連結したデータを出力し、フラグレジスタ402が”1”であり、かつ、フラグレジスタ408が”0”であるときには、(A[7:4]+B[7:4])と(A[3:0]−B[3:0])とを連結したデータを出力する。
【0054】
また、倍精度演算器401は、フラグレジスタ402が”0”であり、かつ、フラグレジスタ408が”1”であるときには、(A[7:4]−B[7:4])と(A[3:0]+B[3:0])とを連結したデータを出力し、フラグレジスタ402が”0”であり、かつ、フラグレジスタ408が”0”であるときには、(A[7:4]−B[7:4])と(A[3:0]−B[3:0])とを連結したデータを出力する。
【0055】
上記のような単精度の加減算時において、倍精度演算器401は、下位4ビットから上位4ビットへのキャリーの伝播を制止する。これにより、倍精度演算器401は、上位と下位とを独立に演算することができる。以上が倍精度演算器401の詳細である。
【0056】
なお、上述した倍精度演算器401、倍精度レジスタ403および倍精度レジスタ404としては、例えば、単精度の演算体系を採用したDSPにおいて積和演算用に搭載されたものを用いることが可能である。また、シフトレジスタ405、シフトレジスタ406、反転器407、反転器409、フラグレジスタ402およびフラグレジスタ408としては、例えば、単精度の演算資源に含まれているものを用いることが可能である。
【0057】
次いで、上記構成を有する演算処理装置の動作について説明する。なお、本実施の形態では、簡略化のために、単精度を4ビットとし、倍精度を8ビットとする。さらに、本実施の形態では、2つの単精度の被除数を”5”および”4”とし、各被除数に対応する単精度の除数をそれぞれ”2”および”3”としたときの単精度除算を行う場合を例にとり説明する。なお、その他の演算精度についても適宜変更を施すことにより同様の解釈が成り立つ。
【0058】
本実施の形態にかかる演算処理装置は、2つの単精度の除算を独立に実行すること、または、1つの倍精度の除算を実行することができるものである。図4を参照するに、制御部412から倍精度演算器401、セレクタ411およびセレクタ410に対して、制御信号”0”が出力された場合には、実施の形態1で説明した倍精度の除算が行われ、制御信号”1”が出力された場合には、次に説明するように2つの単精度の除算が独立に行われる。なお、倍精度の演算における動作については、実施の形態1におけるものと同様であるので、詳しい説明を省略する。
【0059】
以下、制御部412から制御信号”1”が出力された場合すなわち2つの単精度の除算が並行して行われる場合の動作について、さらに図9を参照して説明する。図9は、本発明の実施の形態2にかかる演算処理装置の2つの単精度除算の実行時における動作を示すタイミング図である。
【0060】
一方の被除数である”5”および他方の被除数である”4”は、4ビットの2進数による表記では、それぞれ、”0101”および”0100”となる。初期設定(クロック0)時には、”0101”および”0100”がそれぞれシフトレジスタ406およびシフトレジスタ405に格納される。
【0061】
一方の除数である”2”および他方の除数である”3”は、4ビットの2進数による表記では、それぞれ、”0010”および”0011”となる。初期設定時には、上位4ビットとしての”0010”および下位4ビットとしての”0011”とが連結された値”00100011”が、倍精度レジスタ403に格納される。さらに、初期設定時には、倍精度レジスタ404、フラグレジスタ402およびフラグレジスタ408は、零でクリアされる。
【0062】
初期設定(クロック0)時には、倍精度演算器401の一方には、図7で示したように、倍精度レジスタ404[6:4]、シフトレジスタ406[3]、倍精度レジスタ404[2:0]およびシフトレジスタ405[3]を順次連結した”00000000”がAとして入力される。
【0063】
倍精度演算器401の他方には、倍精度レジスタ403の”00100011”がBとして入力される。フラグレジスタ402が”0”であり、かつ、フラグレジスタ408が”0”であるので、倍精度演算器401では、(A[7:4]−B[7:4])および(A[3:0]−B[3:0])が独立に行われる。(A[7:4]−B[7:4])の演算結果として”1110”が得られ、(A[3:0]−B[3:0])の演算結果として”1101”が得られる。
【0064】
倍精度演算器401の演算結果”11101101”は、倍精度レジスタ404に出力される。また、倍精度演算器401の演算結果における符号0(すなわち上位4ビットにおけるMSB)である”1”は、フラグレジスタ402および反転器407に出力され、倍精度演算器401の演算結果における符号1(すなわち下位4ビットにおけるMSB)である”1”は、反転器409およびフラグレジスタ408に出力される。
【0065】
次に、クロック1において、倍精度レジスタ404には倍精度演算器401の演算結果”11101101”が格納され、フラグレジスタ402およびフラグレジスタ408には、それぞれ、倍精度演算器401の演算結果における符号0である”1”および符号1である”1”が格納される。また、反転器407よりシフトレジスタ405に対して、上記符号0を反転した”0”が出力され、反転器409よりセレクタ411に対して上記符号1を反転した”0”が出力される。
【0066】
シフトレジスタ406では、クロックに従って、全体が1ビットシフトアップされたデータが格納されるとともに、LSBに反転器409の出力である”0”が格納される。すなわち、シフトレジスタ406には”1010”が格納される。
【0067】
シフトレジスタ405では、クロックに従って、全体が1ビットシフトアップされたデータが格納されるとともに、LSBに反転器407の出力である”0”が格納される。すなわち、シフトレジスタ405には”1000”が格納される。
【0068】
クロック1においては、倍精度演算器401の一方には、図7で示したように、倍精度レジスタ404[6:4]、シフトレジスタ406[3]、倍精度レジスタ404[2:0]およびシフトレジスタ405[3]を順次連結した”11011011”が入力される。倍精度演算器401の他方には、倍精度レジスタ403の”00100011”がBとして入力される。
【0069】
フラグレジスタ408およびフラグレジスタ402に格納されたデータは、ともに”1”であるので、倍精度演算器401では、(A[7:4]+B[7:4])および(A[3:0]+B[3:0])が独立的に行われる。(A[7:4]+B[7:4])の演算結果として”1111”が得られ、(A[3:0]+B[3:0])の演算結果として”1110”が得られる。
【0070】
上述したように、倍精度演算器401の演算結果”11111110”は、倍精度レジスタ404に出力され、また、倍精度演算器401の演算結果における符号0(すなわち上位4ビットにおけるMSB)である”1”は、フラグレジスタ402および反転器407に出力され、倍精度演算器401の演算結果における符号1(すなわち下位4ビットにおけるMSB)である”1”は、反転器409およびフラグレジスタ408に出力される。
【0071】
以後同様に、クロック2〜クロック4において上述した処理が行われる。クロック4における最終結果において、シフトレジスタ405に格納された”0010”およびシフトレジスタ406に格納された”0001”が、それぞれ、上位側および下位側の商となる。すなわち、単精度除算(5÷2)の商は、10進数の表記によれば”2”となり、単精度除算(4÷3)の商は、10進数の表記によれば”1”となる。
【0072】
また、上位側および下位側の除算の剰余については次の通りである。まず上位側の剰余については、最終結果のフラグレジスタ402の値が”0”ならば、倍精度レジスタ404の上位4ビットが単精度除算(5÷2)の剰余となり、逆に、最終結果のフラグレジスタ402の値が”1”ならば、倍精度レジスタ404の上位4ビットと倍精度レジスタ403の上位4ビットを単精度加算した値が単精度除算(5÷2)の剰余となる。本実施の形態では、最終結果のフラグレジスタ402の値が”1”であるので、倍精度レジスタ404の上位4ビット”1111”と倍精度レジスタ403の上位4ビット”0010”とを単精度加算した値”0001”(10進数の表記によれば”1”が、単精度除算(5÷3)の剰余となる。
【0073】
一方、下位側の剰余については、最終結果のフラグレジスタ408の値が”0”ならば、倍精度レジスタ404の下位4ビットが単精度除算(4÷3)の剰余となり、逆に、最終結果のフラグレジスタ408の値が”1”ならば、倍精度レジスタ404の下位4ビットと倍精度レジスタ403の下位4ビットとを単精度加算した値が、単精度除算(4÷3)の剰余となる。本実施の形態では、最終結果のフラグレジスタ408の値が”0”であるので、倍精度レジスタ404の下位4ビット”0001”(10進数の表記によれば”1”)が、単精度除算(4÷3)の剰余となる。
【0074】
以上のような単精度除算によれば、図9から明らかなように、2つの単精度(4ビット)の除算を4マシンサイクル(すなわち、1ビットにつき1マシンサイクル)で行うことができる。
【0075】
なお、本実施の形態では、2つの単精度の除算を行う際に、倍精度演算器401の符号0を反転させた値をシフトレジスタ405のLSBに格納し、倍精度演算器401の符号1を反転させた値をシフトレジスタ406のLSBに格納する場合について説明したが、本発明は、これに限定されず、倍精度演算器401の演算結果の符号0を反転させずにシフトレジスタ405のLSBに格納し、倍精度演算器401の演算結果の符号1を反転させずにシフトレジスタ406に格納する場合についても適用可能である。この場合には、一例の除算が終了した後、シフトレジスタ405に格納された値を反転させた値が上位側の商となり、シフトレジスタ406に格納された値を反転させた値が下位側の商となる。
【0076】
このように、本実施の形態にかかる演算処理装置によれば、倍精度の演算体系を採用したDSPや倍精度化された演算資源を用いることなく、単精度の演算体系を採用したDSPにおける積和演算用の倍精度レジスタと倍精度演算器、および、単精度の演算資源により、実施の形態1と同様に倍精度の除算を実現している。この結果、LSIに集積するトランジスタ数を少なくすることができるので、携帯端末のバッテリの寿命を長時間持続させることができるだけでなく、携帯端末の小型化・軽量化・低価格化を図ることもできる。さらに、倍精度のデータを上位ビットと下位ビットに分けて演算を行う必要もないので、倍精度除算に要するマシンサイクル数を低減することができる。
【0077】
これに加えて、本実施の形態にかかる演算処理装置によれば、単精度の除算を1ビット当り0.5マシンサイクルで実行すること、すなわち、2つの単精度の除算を1ビット当り1マシンサイクルで独立に実行することができるので、携帯端末の小型化・軽量化・低価格化・バッテリの長寿命化を図ることができる。
【0078】
(実施の形態3)
本実施の形態では、上記実施の形態1または上記実施の形態2で説明した演算処理装置を通信端末装置に搭載する場合について、図10を参照して説明する。図10は、本発明の実施の形態3にかかる通信端末装置の構成を示すブロック図である。
【0079】
図10において、本実施の形態にかかる通信端末装置は、送受信共用のアンテナ部1000と、受信部1002および送信部1003を有する無線部1001と、信号の変調および復調ならびに信号の符号化および復号化を行うベースバンド信号処理部1004と、音声を放音するスピーカ1012と、音声を入力するマイク1013と、送受信するデータを外部装置との間で入出力するデータ入出力部1014と、動作状態を表示する表示部1015と、テンキー等の操作部1016と、アンテナ部1000、無線部1001、ベースバンド信号処理部1004、表示部1015および操作部1016等を制御する制御部1017と、を備えている。
【0080】
ベースバンド信号処理部1004は、拡散処理を行う拡散部1019を有し送信信号を変調する変調部1006と、逆拡散処理を行う逆拡散部1018を有し受信信号を復調する復調部1005と、受信信号を復号化するチャネルデコーダ部1009と、送信信号を符号化するチャネルコーダ部1010と、音声信号の符号化および復号化を行う音声コーデック部1011と、送受信のタイミングを計り、受信信号を復調部1005からチャネルデコーダ部1009に送るとともに、送信信号をチャネルコーダ部1010から変調部1006に送るタイミング制御部1008と、を備える。
【0081】
また、タイミング制御部1008、チャネルデコーダ部1009、チャネルコーダ部1010および音声コーデック部1011は、1チップのDSP1007によりソフトウェアで形成されている。チャネルデコーダ部1009における復号化、チャネルコーダ部1010における符号化、および、音声コーデック部1011における符号化および復号化では、実施の形態1または実施の形態2で説明した演算処理装置が用いられる。
【0082】
制御部1017は、通信端末装置全体の動作を制御するものであり、例えば、操作部1016から入力した信号を表示部1015に表示したり、操作部1016から入力した信号を受けて、発呼または着呼の動作を行うための制御信号を、通信シーケンスに従って、アンテナ部1000、無線部1001およびベースバンド信号処理部1004等に出力する。
【0083】
次いで、上記構成を有する通信端末装置の動作について、送信時と受信時に分けて説明する。まず、送信時において、マイク1013から入力された音声信号は、A/D変換部(図示しない)によりA/D変換され、DSP1007の音声コーデック部1011により符号化され、チャネルコーダ部1010に出力される。また、データが送信される場合には、外部から入力されたデータがデータ入出力部1014を介してチャネルコーダ部1010に出力される。
【0084】
チャネルコーダ部1010では、音声コーデック部1011からの符号化されたデータまたはデータ入出力部1014からのデータが、符号化される。符号化されたデータは、タイミング制御部1008に出力される。
【0085】
タイミング制御部1008により、送信出力タイミングの調整が行われ、符号化されたデータが、変調部1019に出力される。タイミング制御部1008からの符号化されたデータは、変調部1019によりディジタル変調され、D/A変換部(図示しない)によりアナログ信号に変換され、無線部1001の送信部1003により無線信号に変換された後、アンテナ部1000により電波として送信される。
【0086】
一方、受信時において、アンテナ部1000により受信された電波は、無線部1001の受信部1002により受信され、A/D変換部(図示しない)によりA/D変換され、ベースバンド信号処理部1004の復調部1005により復調された後、タイミング制御部1008に出力される。
【0087】
タイミング制御部1008により、入力タイミングの調整が行われ、復調部1005により復調されたデータが、チャネルデコーダ部1009に出力される。
【0088】
音声通信時には、タイミング制御部1008からのデータは、チャネルデコーダ部1009により復号され、音声コーデック部1011により音声復号化され、D/A変換部(図示しない)によりD/A変換された後、スピーカ1012により音声として出力される。
【0089】
データ通信時には、タイミング制御部1008からのデータは、チャネルデコーダ部1009により復号された後、データ入出力部1014を介して外部に出力される。
【0090】
このようにして、本実施の形態にかかる通信端末装置は、単精度の演算処理装置を用いて倍精度の除算を1ビット当り1マシンサイクルで処理すること、または、単精度の除算を1ビット当り0.5マシンサイクルで処理することができる。これにより、通信端末装置に搭載されるチップに集積するトランジスタ数を少なくすることができる。
【0091】
なお、本実施の形態では、復調部1005および変調部1006をDSP1007と区別して示しているが、これらをDSP1007のソフトウェアにより構成することも可能である。また、チャネルデコーダ部1009、チャネルコーダ部1010、音声コーデック部1011およびタイミング制御部1008をそれぞれ個別の部品により構成することも可能である。
【0092】
(実施の形態4)
本実施の形態では、上記実施の形態1または上記実施の形態2で説明した演算処理装置を通信端末装置に搭載する場合について、図11を参照して説明する。図11は、本発明の実施の形態4にかかる基地局装置の構成を示すブロック図である。
【0093】
図11において、本実施の形態にかかる基地局装置は、受信アンテナ1120および送信アンテナ1121を有するアンテナ部1100と、受信部1102および送信部1103を有する無線部1101と、信号の変調および復調ならびに符号化および復号化を行うベースバンド信号処理部1104と、送受信するデータを有線回線との間で入出力するデータ入出力部1114と、アンテナ部1100、無線部1101およびベースバンド信号処理部1104等を制御する制御部1117と、を備える。
【0094】
ベースバンド信号処理部1104は、拡散処理を行う拡散部1119を有し送信信号を変調する変調部1106と、逆拡散処理を行う逆拡散部1118を有し受信信号を復調する復調部1105と、受信信号を復号化するチャネルデコーダ部1109と、送信信号を符号化するチャネルコーダ部1110と、送受信のタイミングを計り、受信信号を復調部1105からチャネルデコーダ部1109に送るとともに、送信信号をチャネルコーダ部1110から変調部1106に送るタイミング制御部1108と、を備える。
【0095】
また、タイミング制御部1108、チャネルデコーダ部1109およびチャネルコーダ部1110は、1チップのDSP1107によりソフトウェアにより形成されている。チャネルデコーダ部1109における復号化、および、チャネルコーダ部1110における符号化では、実施の形態1または実施の形態2で説明した演算処理装置が用いられる。
【0096】
次いで、上記構成を有する基地局装置の動作について、送信時と受信時に分けて説明する。まず、送信時において、有線回線からのデータは、データ入出力部1114を介してチャネルコーダ部1110に出力される。データ入出力部1114からのデータは、チャネルコーダ部1110により符号化された後、タイミング制御部1108に出力される。
【0097】
タイミング制御部1108により、送信出力タイミングの調整が行われ、チャネルコーダ部1110からの符号化されたデータは、変調部1103に出力される。
【0098】
チャネルコーダ部1110からの符号化されたデータは、変調部1103によりディジタル変調され、D/A変換部(図示しない)によりD/A変換され、無線部1101により無線信号に変換された後、送信アンテナ1121により電波として送信される。
【0099】
一方、受信時において、受信アンテナ1120により受信された電波は、無線部1101の受信部1102により受信され、A/D変換部(図示しない)によりA/D変換され、ベースバンド信号処理部1104の復調部1105により復調された後、タイミング制御部1108に出力される。
【0100】
タイミング制御部1108により、入力タイミングの調整が行なわれ、復調部1105により復調されたデータが、チャネルデコーダ部1109に出力される。タイミング制御部1108からデータは、チャネルデコーダ部1109により復号された後、データ入出力部1114を介して有線回線に出力される。
【0101】
このようにして、本実施の形態にかかる基地局装置は、単精度の演算処理装置を用いて倍精度の除算を1ビット当り1マシンサイクルで処理すること、または、単精度の除算を1ビット当り0.5マシンサイクルで処理することができる。これにより、通信端末装置に搭載されるチップに集積するトランジスタ数を少なくすることができる。
【0102】
なお、本実施の形態では、復調部1105および変調部1106をDSP1107と区別して示しているが、これらをDSP1107のソフトウェアにより構成することも可能である。また、チャネルデコーダ部1109、チャネルコーダ部1110およびタイミング制御部1108をそれぞれ個別の部品により構成することも可能である。
【0103】
【発明の効果】
以上説明したように、本発明によれば、単精度の演算資源(すなわち、単精度データをシフトアップして格納するシフトレジスタ)および積和演算用に用いられる倍精度演算資源(すなわち、倍精度データを格納するレジスタおよび倍精度データの加減算を行う演算器)を用いて倍精度除算を行うので、単精度の演算体系を採用したDSPの演算資源を用いて、倍精度の除算を効率的に実現する演算処理装置を提供することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1にかかる演算処理装置の構成を示すブロック図
【図2】本発明の実施の形態1にかかる演算処理装置における倍精度演算器の構成を示す模式図
【図3】本発明の実施の形態1にかかる演算処理装置の倍精度除算における動作を示すタイミング図
【図4】本発明の実施の形態2にかかる演算処理装置の構成を示すブロック図
【図5】本発明の実施の形態2にかかる演算処理装置におけるセレクタの構成を示す模式図
【図6】本発明の実施の形態2にかかる演算処理装置における倍精度除算実行時のセレクタの出力信号を示す模式図
【図7】本発明の実施の形態2にかかる演算処理装置における2つの単精度除算実行時のセレクタの出力信号を示す模式図
【図8】本発明の実施の形態2にかかる演算処理装置における倍精度演算器の構成を示す模式図
【図9】本発明の実施の形態2にかかる演算処理装置の2つの単精度除算の実行時における動作を示すタイミング図
【図10】本発明の実施の形態3にかかる通信端末装置の構成を示すブロック図
【図11】本発明の実施の形態4にかかる基地局装置の構成を示すブロック図
【符号の説明】
101,401 倍精度演算器
102,402,408 フラグレジスタ
103,104,403,404 倍精度レジスタ
105,106,405,406 シフトレジスタ
107,407,409 反転器
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an arithmetic processing device incorporated in a communication terminal device or the like, and more particularly to an arithmetic processing device that performs double precision division.
[0002]
[Prior art]
In recent years, mobile radio communication has a high tendency to realize encoding processing and decoding processing by software processing using a DSP (Digital Signal Processor). As the DSP, a single precision DSP (for example, C54x manufactured by TI) is often used. Single precision DSPs can perform single precision divisions relatively efficiently in one machine cycle per bit.
[0003]
On the other hand, in mobile wireless communication, it is desired not only to maintain the battery life of a portable terminal for a long time, but also to reduce the size, weight and price of the portable terminal. In order to realize these, it is necessary to reduce the number of transistors integrated in an LSI mounted on a portable terminal as much as possible.
[0004]
If the number of transistors integrated in the LSI is reduced, the area of the LSI chip can be reduced accordingly. Thereby, not only the unit price of the LSI chip can be reduced, but also the wiring resistance in the LSI chip can be reduced and the number of transistors to be charged / discharged can be reduced. As a result, the LSI chip can be operated at higher speed, and the power consumption of the LSI chip can be reduced.
[0005]
[Problems to be solved by the invention]
However, the conventional DSP has the following problems. That is, in recent mobile wireless communication, the software processing performed by the DSP includes, for example, an operation (double precision division) such as division of the double precision table value and the received double precision data. ing.
[0006]
However, DSPs that are currently mainstream are equipped with a single-precision arithmetic system (that is, a single-precision general-purpose register file and shift register, and a single-precision Arithmetic Logical Unit (ALU) and multiplier). It is only equipped with double precision registers and double precision arithmetic units as accumulators for product-sum operations.
[0007]
In order to realize double precision division (double precision for both the divisor and the dividend) using such a DSP, it is necessary to perform double precision operation with a single precision arithmetic system. The operation must be performed in bits. As a result, many machine cycles (that is, a plurality of machine cycles per bit) are required.
[0008]
As means for suppressing the number of machine cycles, there is a method of using a DSP adopting a double precision arithmetic system and making all arithmetic resources double precision. However, in this case, for double precision division, the number of machine cycles required for the operation is reduced, but for most single precision operations other than double precision division, a DSP employing a double precision arithmetic system, and The double-precision computing resource becomes an excessive computing resource. As a result, the number of transistors integrated in the LSI increases, leading to an increase in power consumption and it becomes difficult to sustain the battery of the portable terminal for a long time. Furthermore, if the number of transistors integrated in the LSI increases, the area of the LSI chip also increases, so it becomes difficult to reduce the price of the mobile terminal.
[0009]
The present invention has been made in view of such points, and an object of the present invention is to provide an arithmetic processing apparatus that efficiently realizes double precision division using DSP arithmetic resources adopting a single precision arithmetic system. And
[0010]
[Means for Solving the Problems]
The arithmetic processing apparatus of the present invention comprises single precision arithmetic means for performing processing on single precision data, and double precision arithmetic means for performing processing on double precision data at the time of product-sum operation, the single precision arithmetic means and the double precision A structure is used in which double precision data is divided using precision calculation means.
[0011]
In the arithmetic processing device of the present invention, the single precision arithmetic means shifts up and stores single precision data including lower bits of the dividend which is double precision data and the sign of the arithmetic result, and the first storage means, Second storage means for shifting up and storing single precision data including the upper bits of the dividend and the data stored in the first storage means, wherein the double precision arithmetic means is double precision data. A divisor storage means for storing a certain divisor, an operation result storage means for storing an operation result that is double precision data, data stored in the second storage means, and an operation result stored in the operation result storage means Including double precision data as one double precision data, the divisor stored in the divisor storage means as the other double precision data, and depending on the sign of the operation result, the one double precision data and the other double precision Addition and subtraction with over data, employs a configuration that includes a subtraction means to obtain the calculation result.
[0012]
According to these configurations, since the number of transistors integrated in the LSI can be reduced, not only can the battery life of the mobile terminal be maintained for a long time, but also the mobile terminal can be reduced in size, weight, and cost. Can also be planned. Furthermore, since it is not necessary to divide double-precision data into upper bits and lower bits and perform operations, the number of machine cycles required for double-precision division can be reduced.
[0013]
In the arithmetic processing apparatus of the present invention, the first storage means shifts up and stores single precision data including the first dividend which is single precision data and the sign of the upper bit of the operation result, and the second storage means The single precision data including the second dividend which is single precision data and the sign of the lower bit of the operation result are shifted up and stored, and the divisor storage means includes the first divisor and single precision data which are single precision data. The double precision data including the second divisor is stored, and the addition / subtraction means stores the data stored in the first storage means, the data stored in the second storage means, and the operation stored in the operation result storage means The double precision data including the result is one double precision data, the double precision data stored in the divisor storage means is the other double precision data, and according to the sign of the upper bit and the sign of the lower bit of the operation result, one The addition and subtraction of the upper bit of the double precision data and the upper bit of the other double precision data, and the addition and subtraction of the lower bit of the one double precision data and the lower bit of the other double precision data are independently performed, A configuration for obtaining a calculation result is adopted.
[0014]
According to this configuration, single-precision division can be executed at 0.5 machine cycles per bit, that is, two single-precision divisions can be executed independently at 1 machine cycle per bit. The terminal can be reduced in size, weight, price, and battery life.
[0015]
The communication terminal device of the present invention employs a configuration including any of the arithmetic processing devices described above. The base station apparatus of the present invention employs a configuration including any one of the arithmetic processing apparatuses described above.
[0016]
According to these configurations, it is possible to provide a communication terminal device and a base station device in which the device main body is reduced in size, weight, price, and battery life.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
The essence of the present invention is a single-precision arithmetic resource (that is, a shift register that shifts up and stores single-precision data) and a double-precision arithmetic resource that is used for product-sum operation (that is, a register that stores double-precision data and This is to perform double precision division using an arithmetic unit that performs addition / subtraction of double precision data.
[0018]
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0019]
(Embodiment 1)
FIG. 1 is a block diagram showing the configuration of the arithmetic processing apparatus according to the first embodiment of the present invention. In FIG. 1, a double precision register 103 stores a double precision divisor and outputs the divisor to the double precision arithmetic unit 101. The double precision register 104 stores the calculation result of the double precision arithmetic unit 101 and outputs the lower 7 bits in the arithmetic result to the double precision arithmetic unit 101. The flag register 102 stores the code 0 (MSB) in the calculation result by the double precision computing unit 101, and outputs this code 0 to the double precision computing unit 101. The inverter 107 inverts the sign 0 in the operation result of the double precision operation result 101 and outputs the result to the shift register 105.
[0020]
The shift register 105 stores single-precision data, shifts up the entire single-precision data by 1 bit according to the clock, and stores the output of the inverter 107 in the LSB of single-precision data. The shift register 106 stores single-precision data, shifts up the entire single-precision data by 1 bit according to the clock, and stores the MSB of the shift register 105 in the LSB of single-precision data.
[0021]
The double precision arithmetic unit 101 receives the output of the double precision register 104 and the output of the shift register 106 on one side, and receives the output of the double precision register 103 on the other side. Add or subtract. Details of the double precision arithmetic unit 101 will be further described with reference to FIG. FIG. 2 is a schematic diagram showing a configuration of the double precision arithmetic unit 101 in the arithmetic processing apparatus according to the first embodiment of the present invention.
[0022]
In FIG. 2, the double precision arithmetic unit 101 concatenates the lower 7 bits in the data stored in the double precision register 104 and the MSB in the data stored in the shift register 106 into 8 bits (hereinafter, for convenience). "A") is input to one side. The double precision arithmetic unit 101 inputs data stored in the double precision register 103 (hereinafter referred to as “B” for convenience). Further, when the data stored in the flag register 102 is “1”, the double precision arithmetic unit 101 performs double precision addition, that is, “A + B”, and conversely, the data stored in the flag register 102 is “0”. In the case of "", double precision subtraction, that is, "AB" is performed. The above is the specific configuration of the double precision arithmetic unit 101.
[0023]
As the double-precision arithmetic unit 101, the double-precision register 103, and the double-precision register 104 described above, for example, a DSP mounted for product-sum operation in a DSP that employs a single-precision arithmetic system can be used. . In addition, as the shift register 105, the shift register 106, the inverter 107, and the flag register 102, for example, those included in single-precision arithmetic resources can be used.
[0024]
Next, the operation of the arithmetic processing apparatus having the above configuration will be further described with reference to FIG. FIG. 3 is a timing diagram illustrating an operation in the double precision division of the arithmetic processing apparatus according to the first embodiment of the present invention. In this embodiment, for simplification, the single precision is 4 bits, the double precision is 8 bits, the dividend is "110" (decimal number), and the divisor is "20" (decimal number). A case where double precision division is performed will be described as an example. It should be noted that the same interpretation can be achieved by appropriately changing other calculation accuracy.
[0025]
The dividend “110” is “01101110” in 8-bit binary notation. At the initial setting, the shift register 106 stores “0110” that is the upper 4 bits of the dividend, and the shift register 105 stores “1110” that is the lower 4 bits of the dividend.
[0026]
The divisor “20” is “00010100” in 8-bit binary notation. At the initial setting, this divisor is stored in the double precision register 103. The double precision register 104 and the flag register 102 are cleared to zero at the time of initial setting.
[0027]
At the time of initial setting (clock 0), “0000000” in which the lower 7 bits “0000000” of the double precision register 104 and the MSB “0” of the shift register 106 are connected to one of the double precision arithmetic units 101 is input as A. On the other hand, “00010100” of the double precision register 103 is inputted as B. Since the data stored in the flag register 102 is “0”, the double precision arithmetic unit 101 performs AB and obtains “11101100” as the operation result.
[0028]
The calculation result of the double precision arithmetic unit 101 is output to the double precision register 104. Also, “1”, which is the code 0 (that is, MSB) in the operation result of the double precision arithmetic unit 101, is output to the flag register 102 and the inverter 107.
[0029]
Next, at clock 1, the calculation result “11101100” of the double precision arithmetic unit 101 is stored in the double precision register 104, and “1”, which is the sign 0 in the arithmetic result of the double precision arithmetic unit 101, is stored in the flag register 102. Stored. Further, “0” obtained by inverting the sign 0 is output from the inverter 107 to the shift register 105.
[0030]
The shift register 106 stores the data shifted up by 1 bit according to the clock, and stores “1” which is the MSB of the shift register 105 in the LSB. That is, “1101” is stored in the shift register 106.
[0031]
The shift register 105 stores the data shifted up by 1 bit in accordance with the clock, and stores “0”, which is the output of the inverter 107, in the LSB. That is, “1100” is stored in the shift register 105.
[0032]
In the clock 1, “11011001” obtained by connecting the lower 7 bits “1101100” of the double precision register 104 and the MSB “1” of the shift register 106 is input to one of the double precision arithmetic units 101 as A, "00010100" of the double precision register 103 is input as B. Since the data stored in the flag register 102 is “1”, the double precision computing unit 101 performs A + B and obtains “11101101” as the computation result.
[0033]
As described above, the operation result of the double precision arithmetic unit 101 is output to the double precision register 104, and “1”, which is the sign 0 in the operation result of the double precision arithmetic unit 101, is the flag register 102 and the inverter 107. Is output.
[0034]
Thereafter, similarly, the above-described processing is performed in clocks 2 to 8. In the final result at clock 8, a value “00000101” obtained by concatenating “0000” stored in the shift register 106 and “0101” stored in the shift register 105 is a quotient of double precision division. That is, the quotient of double precision division is “5” according to the decimal notation.
[0035]
When the value of the flag register 102 in the final result is “0”, the value of the double precision register 104 becomes the remainder of the double precision division. Conversely, the value of the flag register 102 in the final result is “1”. In this case, a value obtained by adding the double precision register 103 and the double precision register 104 to the double precision is a remainder of the double precision division.
[0036]
In the present embodiment, since the value of the flag register 102 in the final result is “0”, the remainder of the double precision division becomes the value “00001010” of the double precision register 104. That is, the remainder of the double precision division is “10” in decimal notation.
[0037]
According to the double precision division as described above, as is clear from FIG. 3, the double precision (8 bits) division can be performed in 8 machine cycles (that is, 1 machine cycle per bit).
[0038]
In this embodiment, the case where the value obtained by inverting the sign of the calculation result of the double precision arithmetic unit 101 is stored in the LSB of the shift register 105 is described. However, the present invention is not limited to this, and the double precision is obtained. The present invention is also applicable to the case where the sign of the calculation result of the calculator 101 is stored in the LSB of the shift register 105 without being inverted. In this case, after a series of divisions is completed, a value obtained by concatenating a value obtained by inverting the value stored in the shift register 105 and a value obtained by inverting the value stored in the shift register 106 is a double-precision division. Become a quotient.
That is, in the initial state, the dividend is stored in the shift register 106 and the shift register 105, and in the final state after a series of divisions, the value obtained by concatenating the value of the shift register 106 and the value of the shift register 105 is double precision. The value obtained by inverting the quotient of division. Therefore, a value obtained by concatenating the value obtained by inverting the value of the shift register 106 and the value obtained by inverting the value of the shift register 105 is a quotient of double precision division.
[0039]
As described above, according to the arithmetic processing apparatus according to the present embodiment, the product in the DSP adopting the single precision arithmetic system without using the DSP adopting the double precision arithmetic system or the double precision arithmetic resource. A double precision division is realized by a double precision register for sum operation, a double precision computing unit, and a single precision computing resource. As a result, since the number of transistors integrated in the LSI can be reduced, not only can the battery life of the mobile terminal be maintained for a long time, but also the mobile terminal can be reduced in size, weight, and cost. it can. Furthermore, since it is not necessary to divide double-precision data into upper bits and lower bits and perform operations, the number of machine cycles required for double-precision division can be reduced.
[0040]
(Embodiment 2)
In this embodiment, a case where two single precision divisions are performed independently in the first embodiment will be described. FIG. 4 is a block diagram showing the configuration of the arithmetic processing apparatus according to the second embodiment of the present invention. In FIG. 4, double precision register 403 stores two single precision divisors and outputs these divisors to double precision arithmetic unit 401. The double precision register 404 stores the calculation result of the double precision calculator 401 and outputs the calculation result to the selector 410.
[0041]
The flag register 402 stores the code 0 (that is, the higher-order code in the operation result) in the operation result by the double precision arithmetic unit 401, and outputs this code 0 to the double precision arithmetic unit 401. The flag register 408 stores the code 1 in the calculation result by the double precision arithmetic unit 401 (that is, the lower-order code in the calculation result), and outputs this code 1 to the double precision arithmetic unit 401.
[0042]
The inverter 407 inverts the sign 0 in the calculation result by the double precision arithmetic unit 101 and outputs the result to the shift register 405. The shift register 405 stores single precision data, shifts up the entire single precision data by 1 bit according to the clock, and stores the output of the inverter 407 in the LSB of single precision data. The inverter 409 inverts the sign 1 in the calculation result by the double precision calculator 101 and outputs the result to the selector 411.
[0043]
The selector 411 outputs either the output of the shift register 405 or the output of the inverter 409 to the shift register 406 based on the control signal from the control unit 412. Details of the selector 411 will be further described with reference to FIG. FIG. 5 is a schematic diagram illustrating a configuration of the selector 411 in the arithmetic processing device according to the second embodiment of the present invention.
[0044]
As shown in FIG. 5, the selector 411 inputs the output of the inverter 409 and the MSB (b3) in the data stored in the shift register 405. The selector 411 outputs the MSB of the shift register 405 to the shift register 406 when the control signal from the control unit 412 is 0 (that is, during execution of double precision division). That is, in the present embodiment, the MSB of the shift register 405 is input to the shift register 406 in the same manner as the MSB of the shift register 105 is input to the shift register 106 in Embodiment 1.
[0045]
Conversely, this selector 411 outputs the output of the inverter 409 to the shift register 406 when the control signal from the control unit 412 is 1 (that is, when two single precision divisions are executed in parallel). The above is the specific configuration of the selector 411.
[0046]
The shift register 406 stores single precision data, shifts up the entire single precision data by 1 bit according to the clock, and stores the output of the selector in the LSB of the single precision data.
[0047]
The selector 410 receives the output of the double precision register 404, the output of the shift register 405, and the output of the shift register 406, and selects an output to the double precision arithmetic unit 401 based on a control signal from the control unit 412. . Details of the selector 410 will be described with reference to FIGS.
[0048]
FIG. 6 is a schematic diagram illustrating an output signal of the selector 410 when executing double precision division in the arithmetic processing apparatus according to the second embodiment of the present invention. FIG. 7 is a schematic diagram showing output signals of the selector 410 when two single precision divisions are executed in the arithmetic processing apparatus according to the second embodiment of the present invention.
[0049]
When the control signal from the control unit 412 is 0 (that is, during execution of double precision division), the selector 410 has the lower 7 bits (FIG. 6) in the data stored in the double precision register 404 as shown in FIG. In this example, double-precision register 404 [6: 0] is connected to the MSB of the data stored in shift register 406 (indicated in FIG. 6 as shift register 406 [3]) to form 8-bit data. Is output to one of the double precision arithmetic unit 401. That is, in the same manner as the first embodiment, 8-bit data obtained by concatenating the lower 7 bits of the double-precision register 104 and the MSB of the shift register 106 is input to one of the double-precision arithmetic units 101. Then, 8-bit data obtained by concatenating the lower 7 bits of the double-precision register 404 and the MSB of the shift register 606 is input to one of the double-precision arithmetic units 401.
[0050]
On the other hand, when the control signal from the control unit 412 is 1 (that is, when two single precision divisions are executed), the selector 410, as shown in FIG. 7, displays the sixth bit (b6) of the double precision register 404. ~ 4th bit (b4), MSB (b3) of shift register 406, 2nd bit (b2) ~ 0th bit (b0) of shift register 404, and MSB (b3) of shift register 405 are connected Thus, the data having 8 bits is output to one of the double precision arithmetic units 401. The details of the selector 410 have been described above.
[0051]
The double precision arithmetic unit 401 receives the output of the selector 410 (here, “A”) on one side and the output of the double precision register 403 (here, “B”) on the other side, and the flag register 402 , The output of the flag register 408 and the control signal from the control unit 412, double precision division or two single precision divisions are performed. Details of the double precision arithmetic unit 401 will be further described with reference to FIG. FIG. 8 is a schematic diagram illustrating a configuration of a double precision arithmetic unit 401 in the arithmetic processing apparatus according to the second embodiment of the present invention.
[0052]
When the control signal from the control unit 412 is 0 (that is, at the time of execution of double precision division), as in the first embodiment, the double precision arithmetic unit 401 uses the A when the value of the flag register 402 is “1”. [7: 0] −B [7: 0] is output. When the value of the flag register 402 is “0”, A [7: 0] + B [7: 0] is output. However, A [X: Y] corresponds to “X bit to Y bit data of A” (X> Y).
[0053]
When the control signal from the control unit 412 is 1 (that is, when executing two single precision divisions), the double precision arithmetic unit 401 has the flag register 402 set to “1” and the flag register 408 set to “1”. "A [7: 4] + B [7: 4]) and (A [3: 0] + B [3: 0]) are output, and the flag register 402 is" 1 ". And the flag register 408 is “0”, (A [7: 4] + B [7: 4]) and (A [3: 0] −B [3: 0]) are connected. Output data.
[0054]
Further, the double precision arithmetic unit 401, when the flag register 402 is “0” and the flag register 408 is “1”, (A [7: 4] −B [7: 4]) and (A [3: 0] + B [3: 0]) is output, and when the flag register 402 is “0” and the flag register 408 is “0”, (A [7: 4 ] -B [7: 4]) and (A [3: 0] -B [3: 0]) are output.
[0055]
At the time of single precision addition / subtraction as described above, the double precision arithmetic unit 401 stops carry propagation from the lower 4 bits to the upper 4 bits. Thereby, the double precision arithmetic unit 401 can calculate the upper and lower levels independently. The details of the double precision arithmetic unit 401 have been described above.
[0056]
As the double-precision arithmetic unit 401, the double-precision register 403, and the double-precision register 404 described above, it is possible to use, for example, a DSP that employs a single-precision arithmetic system and is mounted for product-sum operation. . Further, as the shift register 405, the shift register 406, the inverter 407, the inverter 409, the flag register 402, and the flag register 408, for example, those included in a single precision arithmetic resource can be used.
[0057]
Next, the operation of the arithmetic processing apparatus having the above configuration will be described. In this embodiment, for the sake of simplicity, the single precision is 4 bits and the double precision is 8 bits. Furthermore, in this embodiment, single precision division is performed when the two single precision dividends are “5” and “4”, and the single precision divisors corresponding to the respective dividends are “2” and “3”, respectively. The case where it performs is demonstrated to an example. It should be noted that the same interpretation can be achieved by appropriately changing other calculation accuracy.
[0058]
The arithmetic processing apparatus according to the present embodiment can execute two single-precision divisions independently or one double-precision division. Referring to FIG. 4, when control signal “0” is output from control unit 412 to double precision arithmetic unit 401, selector 411, and selector 410, the double precision division described in the first embodiment. When the control signal “1” is output, two single-precision divisions are independently performed as described below. The operation in the double precision calculation is the same as that in the first embodiment, and thus detailed description thereof is omitted.
[0059]
Hereinafter, the operation when the control signal “1” is output from the control unit 412, that is, when two single-precision divisions are performed in parallel will be further described with reference to FIG. 9. FIG. 9 is a timing diagram showing operations at the time of execution of two single precision divisions of the arithmetic processing apparatus according to the second embodiment of the present invention.
[0060]
One dividend “5” and the other dividend “4” are “0101” and “0100” in the 4-bit binary notation, respectively. At the initial setting (clock 0), “0101” and “0100” are stored in the shift register 406 and the shift register 405, respectively.
[0061]
One divisor “2” and the other divisor “3” are “0010” and “0011”, respectively, in a 4-bit binary notation. At the initial setting, a value “00100011” obtained by concatenating “0010” as the upper 4 bits and “0011” as the lower 4 bits is stored in the double precision register 403. Further, at the initial setting, the double precision register 404, the flag register 402, and the flag register 408 are cleared to zero.
[0062]
At the initial setting (clock 0), as shown in FIG. 7, one of the double precision arithmetic units 401 has a double precision register 404 [6: 4], a shift register 406 [3], and a double precision register 404 [2: 0 ”and“ 00000000 ”obtained by sequentially connecting the shift register 405 [3] are input as A.
[0063]
“00100011” of the double precision register 403 is input as B to the other of the double precision arithmetic unit 401. Since the flag register 402 is “0” and the flag register 408 is “0”, the double precision arithmetic unit 401 (A [7: 4] −B [7: 4]) and (A [3 : 0] -B [3: 0]) are performed independently. “1110” is obtained as the calculation result of (A [7: 4] −B [7: 4]), and “1101” is obtained as the calculation result of (A [3: 0] −B [3: 0]). It is done.
[0064]
The calculation result “11101101” of the double precision calculator 401 is output to the double precision register 404. Also, “1”, which is the code 0 (that is, the MSB in the upper 4 bits) of the operation result of the double precision arithmetic unit 401, is output to the flag register 402 and the inverter 407, and the code 1 of the operation result of the double precision arithmetic unit 401 is “1” (that is, the MSB in the lower 4 bits) is output to the inverter 409 and the flag register 408.
[0065]
Next, at clock 1, the operation result “11101101” of the double precision arithmetic unit 401 is stored in the double precision register 404, and the sign of the operation result of the double precision arithmetic unit 401 is stored in the flag register 402 and the flag register 408, respectively. “1” which is 0 and “1” which is code 1 are stored. The inverter 407 outputs “0” obtained by inverting the sign 0 to the shift register 405, and the inverter 409 outputs “0” obtained by inverting the sign 1 to the selector 411.
[0066]
The shift register 406 stores the data shifted up by 1 bit according to the clock, and stores “0” which is the output of the inverter 409 in the LSB. That is, “1010” is stored in the shift register 406.
[0067]
The shift register 405 stores the data shifted up by 1 bit according to the clock, and stores “0” which is the output of the inverter 407 in the LSB. That is, “1000” is stored in the shift register 405.
[0068]
In clock 1, as shown in FIG. 7, one of double precision arithmetic unit 401 has double precision register 404 [6: 4], shift register 406 [3], double precision register 404 [2: 0] and “11011011” in which the shift register 405 [3] is sequentially connected is input. “00100011” of the double precision register 403 is input as B to the other of the double precision arithmetic unit 401.
[0069]
Since the data stored in the flag register 408 and the flag register 402 are both “1”, in the double precision arithmetic unit 401, (A [7: 4] + B [7: 4]) and (A [3: 0] ] + B [3: 0]) is performed independently. “1111” is obtained as the calculation result of (A [7: 4] + B [7: 4]), and “1110” is obtained as the calculation result of (A [3: 0] + B [3: 0]).
[0070]
As described above, the operation result “11111110” of the double precision arithmetic unit 401 is output to the double precision register 404 and is the code 0 (that is, the MSB in the upper 4 bits) in the operation result of the double precision arithmetic unit 401. “1” is output to the flag register 402 and the inverter 407, and “1”, which is the sign 1 (that is, the MSB in the lower 4 bits) of the operation result of the double precision arithmetic unit 401, is output to the inverter 409 and the flag register 408. Is done.
[0071]
Thereafter, similarly, the processing described above is performed in clocks 2 to 4. In the final result at clock 4, “0010” stored in the shift register 405 and “0001” stored in the shift register 406 are the upper and lower quotients, respectively. That is, the quotient of single precision division (5 ÷ 2) is “2” according to the decimal notation, and the quotient of single precision division (4 ÷ 3) is “1” according to the decimal notation. .
[0072]
The remainder of the division on the upper side and the lower side is as follows. First, for the higher-order remainder, if the value of the flag register 402 of the final result is “0”, the upper 4 bits of the double-precision register 404 become the remainder of single precision division (5 ÷ 2). If the value of the flag register 402 is “1”, a value obtained by single-precision addition of the upper 4 bits of the double precision register 404 and the upper 4 bits of the double precision register 403 is a remainder of the single precision division (5 ÷ 2). In the present embodiment, since the value of the flag register 402 of the final result is “1”, the upper 4 bits “1111” of the double precision register 404 and the upper 4 bits “0010” of the double precision register 403 are single-precision added. The value “0001” (in decimal notation “1”) is the remainder of the single precision division (5 ÷ 3).
[0073]
On the other hand, for the lower-order remainder, if the value of the flag register 408 of the final result is “0”, the lower 4 bits of the double-precision register 404 become the remainder of the single precision division (4 ÷ 3). If the value of the flag register 408 is “1”, the value obtained by single-precision addition of the lower 4 bits of the double-precision register 404 and the lower 4 bits of the double-precision register 403 is the remainder of the single-precision division (4 ÷ 3). Become. In the present embodiment, since the value of the flag register 408 of the final result is “0”, the lower 4 bits “0001” (“1” according to the decimal notation) of the double precision register 404 is converted to the single precision division. This is the remainder of (4/3).
[0074]
According to the single precision division as described above, as is apparent from FIG. 9, two single precision (4 bits) division can be performed in 4 machine cycles (that is, 1 machine cycle per 1 bit).
[0075]
In this embodiment, when two single-precision divisions are performed, a value obtained by inverting the sign 0 of the double-precision arithmetic unit 401 is stored in the LSB of the shift register 405, and the sign 1 of the double-precision arithmetic unit 401 is stored. However, the present invention is not limited to this, and the present invention is not limited to this, and the sign 0 of the operation result of the double precision arithmetic unit 401 is not inverted, and the shift register 405 does not invert. The present invention can also be applied to the case where it is stored in the LSB and stored in the shift register 406 without inverting the sign 1 of the operation result of the double precision arithmetic unit 401. In this case, after the example division is completed, a value obtained by inverting the value stored in the shift register 405 becomes the upper quotient, and a value obtained by inverting the value stored in the shift register 406 becomes the lower quotient. Become a quotient.
[0076]
As described above, according to the arithmetic processing apparatus according to the present embodiment, the product in the DSP adopting the single precision arithmetic system without using the DSP adopting the double precision arithmetic system or the double precision arithmetic resource. Similar to the first embodiment, double precision division is realized by a double precision register for sum operation, a double precision arithmetic unit, and a single precision computing resource. As a result, since the number of transistors integrated in the LSI can be reduced, not only can the battery life of the mobile terminal be maintained for a long time, but also the mobile terminal can be reduced in size, weight, and cost. it can. Furthermore, since it is not necessary to divide double-precision data into upper bits and lower bits and perform operations, the number of machine cycles required for double-precision division can be reduced.
[0077]
In addition, according to the arithmetic processing apparatus of this embodiment, single precision division is executed at 0.5 machine cycles per bit, that is, two single precision divisions are performed per machine per bit. Since it can be executed independently in a cycle, the mobile terminal can be reduced in size, weight, price, and battery life.
[0078]
(Embodiment 3)
In this embodiment, the case where the arithmetic processing device described in Embodiment 1 or 2 is mounted on a communication terminal device will be described with reference to FIG. FIG. 10 is a block diagram showing a configuration of the communication terminal apparatus according to the third embodiment of the present invention.
[0079]
10, the communication terminal apparatus according to the present embodiment includes an antenna unit 1000 that is shared for transmission and reception, a radio unit 1001 having a receiving unit 1002 and a transmitting unit 1003, signal modulation and demodulation, and signal encoding and decoding. A baseband signal processing unit 1004 for performing sound, a speaker 1012 for emitting sound, a microphone 1013 for inputting sound, a data input / output unit 1014 for inputting / outputting data to / from an external device, and an operation state A display unit 1015 for displaying, an operation unit 1016 such as a numeric keypad, and a control unit 1017 for controlling the antenna unit 1000, the radio unit 1001, the baseband signal processing unit 1004, the display unit 1015, the operation unit 1016, and the like. .
[0080]
The baseband signal processing unit 1004 includes a modulation unit 1006 that has a spreading unit 1019 that performs spreading processing, modulates a transmission signal, a demodulation unit 1005 that has a despreading unit 1018 that performs despreading processing, and demodulates a received signal, A channel decoder unit 1009 that decodes a received signal, a channel coder unit 1010 that encodes a transmission signal, an audio codec unit 1011 that encodes and decodes an audio signal, and demodulates the received signal by measuring transmission and reception timings And a timing control unit 1008 for sending a transmission signal from the channel coder unit 1010 to the modulation unit 1006.
[0081]
Further, the timing control unit 1008, the channel decoder unit 1009, the channel coder unit 1010, and the audio codec unit 1011 are formed by software by a one-chip DSP 1007. In the decoding in the channel decoder unit 1009, the encoding in the channel coder unit 1010, and the encoding and decoding in the speech codec unit 1011, the arithmetic processing device described in the first embodiment or the second embodiment is used.
[0082]
The control unit 1017 controls the operation of the entire communication terminal device. For example, the control unit 1017 displays a signal input from the operation unit 1016 on the display unit 1015 or receives a signal input from the operation unit 1016 to make a call or A control signal for performing an incoming call operation is output to the antenna unit 1000, the radio unit 1001, the baseband signal processing unit 1004, and the like according to a communication sequence.
[0083]
Next, the operation of the communication terminal apparatus having the above configuration will be described separately for transmission and reception. First, at the time of transmission, an audio signal input from the microphone 1013 is A / D converted by an A / D conversion unit (not shown), encoded by the audio codec unit 1011 of the DSP 1007, and output to the channel coder unit 1010. The When data is transmitted, data input from the outside is output to the channel coder unit 1010 via the data input / output unit 1014.
[0084]
In the channel coder unit 1010, the encoded data from the audio codec unit 1011 or the data from the data input / output unit 1014 is encoded. The encoded data is output to the timing control unit 1008.
[0085]
The timing control unit 1008 adjusts the transmission output timing, and the encoded data is output to the modulation unit 1019. The encoded data from the timing controller 1008 is digitally modulated by the modulator 1019, converted to an analog signal by a D / A converter (not shown), and converted to a radio signal by the transmitter 1003 of the radio unit 1001. Then, it is transmitted as a radio wave by the antenna unit 1000.
[0086]
On the other hand, at the time of reception, the radio wave received by the antenna unit 1000 is received by the receiving unit 1002 of the radio unit 1001, A / D converted by an A / D conversion unit (not shown), and the baseband signal processing unit 1004 After being demodulated by the demodulator 1005, it is output to the timing controller 1008.
[0087]
The timing controller 1008 adjusts the input timing, and the data demodulated by the demodulator 1005 is output to the channel decoder 1009.
[0088]
At the time of voice communication, the data from the timing control unit 1008 is decoded by the channel decoder unit 1009, decoded by the voice codec unit 1011 and D / A converted by a D / A conversion unit (not shown), and then the speaker. 1012 is output as voice.
[0089]
During data communication, the data from the timing control unit 1008 is decoded by the channel decoder unit 1009 and then output to the outside via the data input / output unit 1014.
[0090]
In this way, the communication terminal apparatus according to the present embodiment processes a double precision division in one machine cycle per bit using a single precision arithmetic processing apparatus, or performs a single precision division by 1 bit. Per machine cycle. As a result, the number of transistors integrated in a chip mounted on the communication terminal device can be reduced.
[0091]
In the present embodiment, the demodulation unit 1005 and the modulation unit 1006 are shown separately from the DSP 1007, but these can also be configured by software of the DSP 1007. Further, the channel decoder unit 1009, the channel coder unit 1010, the audio codec unit 1011 and the timing control unit 1008 can be configured by individual components.
[0092]
(Embodiment 4)
In this embodiment, the case where the arithmetic processing device described in Embodiment 1 or 2 is mounted on a communication terminal device will be described with reference to FIG. FIG. 11 is a block diagram showing a configuration of a base station apparatus according to Embodiment 4 of the present invention.
[0093]
11, the base station apparatus according to the present embodiment includes an antenna unit 1100 having a reception antenna 1120 and a transmission antenna 1121, a radio unit 1101 having a reception unit 1102 and a transmission unit 1103, signal modulation and demodulation, and a code. A baseband signal processing unit 1104 that performs conversion and decoding, a data input / output unit 1114 that inputs / outputs data to / from the wired line, an antenna unit 1100, a radio unit 1101, a baseband signal processing unit 1104, and the like A control unit 1117 for controlling.
[0094]
The baseband signal processing unit 1104 includes a spreading unit 1119 that performs spreading processing, a modulating unit 1106 that modulates a transmission signal, a despreading unit 1118 that performs despreading processing, and a demodulation unit 1105 that demodulates a received signal, A channel decoder unit 1109 that decodes the received signal, a channel coder unit 1110 that encodes the transmitted signal, and a transmission / reception timing are measured, and the received signal is sent from the demodulating unit 1105 to the channel decoder unit 1109 and the transmitted signal is transmitted to the channel coder. And a timing control unit 1108 that sends data from the unit 1110 to the modulation unit 1106.
[0095]
In addition, the timing control unit 1108, the channel decoder unit 1109, and the channel coder unit 1110 are formed by software using a one-chip DSP 1107. In the decoding in the channel decoder unit 1109 and the encoding in the channel coder unit 1110, the arithmetic processing device described in the first embodiment or the second embodiment is used.
[0096]
Next, the operation of the base station apparatus having the above configuration will be described separately for transmission and reception. First, at the time of transmission, data from a wired line is output to the channel coder unit 1110 via the data input / output unit 1114. Data from the data input / output unit 1114 is encoded by the channel coder unit 1110 and then output to the timing control unit 1108.
[0097]
The timing control unit 1108 adjusts the transmission output timing, and the encoded data from the channel coder unit 1110 is output to the modulation unit 1103.
[0098]
The encoded data from the channel coder unit 1110 is digitally modulated by the modulation unit 1103, D / A converted by a D / A conversion unit (not shown), converted into a radio signal by the radio unit 1101, and then transmitted. It is transmitted as a radio wave by the antenna 1121.
[0099]
On the other hand, at the time of reception, the radio wave received by the reception antenna 1120 is received by the reception unit 1102 of the radio unit 1101, A / D converted by an A / D conversion unit (not shown), and the baseband signal processing unit 1104 After being demodulated by the demodulator 1105, it is output to the timing controller 1108.
[0100]
The timing controller 1108 adjusts the input timing, and the data demodulated by the demodulator 1105 is output to the channel decoder 1109. The data from the timing control unit 1108 is decoded by the channel decoder unit 1109 and then output to the wired line via the data input / output unit 1114.
[0101]
In this way, the base station apparatus according to the present embodiment processes double-precision division in one machine cycle per bit using a single-precision arithmetic processing unit, or performs single-precision division in one bit. Per machine cycle. As a result, the number of transistors integrated in a chip mounted on the communication terminal device can be reduced.
[0102]
In the present embodiment, the demodulating unit 1105 and the modulating unit 1106 are shown separately from the DSP 1107, but these can also be configured by software of the DSP 1107. Further, the channel decoder unit 1109, the channel coder unit 1110, and the timing control unit 1108 can be configured by individual components.
[0103]
【The invention's effect】
As described above, according to the present invention, a single-precision arithmetic resource (that is, a shift register that shifts up and stores single-precision data) and a double-precision arithmetic resource that is used for a product-sum operation (that is, a double precision) Double-precision division is performed using a register for storing data and an arithmetic unit that performs addition / subtraction of double-precision data), so that double-precision division is efficiently performed using DSP operation resources employing a single-precision arithmetic system. An arithmetic processing device to be realized can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an arithmetic processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a schematic diagram showing a configuration of a double precision arithmetic unit in the arithmetic processing apparatus according to the first embodiment of the present invention;
FIG. 3 is a timing chart showing an operation in double precision division of the arithmetic processing apparatus according to the first embodiment of the present invention;
FIG. 4 is a block diagram showing a configuration of an arithmetic processing apparatus according to a second embodiment of the present invention.
FIG. 5 is a schematic diagram showing a configuration of a selector in the arithmetic processing device according to the second embodiment of the present invention;
FIG. 6 is a schematic diagram showing an output signal of a selector when executing double precision division in the arithmetic processing apparatus according to the second embodiment of the present invention;
FIG. 7 is a schematic diagram showing an output signal of a selector when two single precision divisions are executed in the arithmetic processing apparatus according to the second embodiment of the present invention;
FIG. 8 is a schematic diagram showing a configuration of a double precision arithmetic unit in the arithmetic processing device according to the second embodiment of the present invention;
FIG. 9 is a timing chart showing operations at the time of execution of two single precision divisions of the arithmetic processing apparatus according to the second embodiment of the present invention;
FIG. 10 is a block diagram showing a configuration of a communication terminal apparatus according to a third embodiment of the present invention.
FIG. 11 is a block diagram showing a configuration of a base station apparatus according to a fourth embodiment of the present invention.
[Explanation of symbols]
101,401 double precision arithmetic unit
102, 402, 408 flag register
103, 104, 403, 404 double precision registers
105, 106, 405, 406 shift register
107,407,409 Inverter

Claims (6)

単精度の除算および倍精度の除算のそれぞれを複数サイクルで行う演算処理装置であって、
前記単精度の除算を行う場合には単精度の第1被除数を格納し、前記倍精度の除算を行う場合には倍精度の被除数の上位ビットを格納し、格納した前記第1被除数もしくは前記上位ビットを1サイクルごとにシフトアップする第1格納手段と、
前記第1格納手段においてシフトアップされたデータの末尾に所定のビットを代入する代入手段と、
前記単精度の除算を行う場合には単精度の第2被除数を格納し、前記倍精度の除算を行う場合には倍精度の被除数の下位ビットを格納し、格納した前記第2被除数もしくは前記下位ビットを1サイクルごとにシフトアップする第2格納手段と、
前記単精度の除算を行う場合には、第1除数を上位ビットに含み第2除数を下位ビットに含む倍精度の除数データを格納し、前記倍精度の除算を行う場合には、倍精度の除数を前記除数データとして格納する除数格納手段と、
前記単精度の除算を行う場合には、前記第1被除数を前記第1除数で除算する処理の現在のサイクルにおける剰余である第1剰余、および、前記第2被除数を前記第2除数で除算する処理の現在のサイクルにおける剰余である第2剰余を含む演算結果データを格納し、前記倍精度の除算を行う場合には、前記倍精度の被除数を前記倍精度の除数で除算する処理の現在のサイクルにおける剰余を、前記演算結果データとして格納する演算結果格納手段と、
前記第1格納手段に格納されているデータおよび前記第2格納手段に格納されているデータの一方もしくは両方と前記演算結果データとに基づく倍精度の被演算データについて、前記被演算データの上位ビットに対して前記除数データの上位ビットを加算または減算する上位ビット演算、および、前記被演算データの下位ビットに対して前記除数データの下位ビットを加算または減算する下位ビット演算を行う加減算手段と、を備え、
前記単精度の除算を行う場合、
前記被演算データは、前記第1剰余および前記第1格納手段に格納されているデータに基づく単精度のデータを上位ビットに含み、前記第2剰余および前記第2格納手段に格納されているデータに基づく単精度のデータを下位ビットに含むデータであり、
前記加減算手段は、前記下位ビット演算として、前のサイクルにおける下位ビット演算の符号に基づいて前記加算もしくは前記減算を行い、前記上位ビット演算として、前のサイクルにおける上位ビット演算の符号に基づいて前記加算もしくは前記減算を行い、
前記上位ビット演算は、前記下位ビット演算からのキャリーを反映させない加算もしくは減算であり、
前記代入手段は、前記下位ビット演算の符号に基づくビットを代入し、
前記倍精度の除算を行う場合、
前記被演算データは、前記演算結果格納手段に格納されているデータと前記第1格納手段に格納されているデータであり、
前記加減算手段は、前記上位ビット演算及び下位ビット演算のいずれについても前のサイクルにおける上位ビット演算の符号に基づいて前記加算もしくは減算を行い、
前記上位ビット演算は、前記下位ビット演算からのキャリーを反映させた加算もしくは減算であり、
前記代入手段は、前記第2格納手段からシフトアウトされたビットを代入し、
前記単精度の除算及び前記倍精度の除算のいずれを行う場合にも、
前記加減算手段は、前記上位ビット演算の符号に基づくビットを、前記第2格納手段においてシフトアップされたデータの末尾に代入し、
前記演算処理装置は、
前記倍精度の除算を行う場合には、前記複数サイクルが終了した時点で前記第1格納手段および前記第2格納手段に格納されているデータに基づく値を前記倍精度の除算の商とし、
前記単精度の除算を行う場合には、前記複数サイクルが終了した時点で前記第1格納手段に格納されているデータに基づく値を、前記第2被除数を前記第2除数で除算した商とし、前記複数サイクルが終了した時点で前記第2格納手段に格納されているデータに基づく値を、前記第1被除数を前記第1除数で除算した商とする、
演算処理装置。
An arithmetic processing device that performs each of single-precision division and double-precision division in multiple cycles,
When performing the single-precision division, the single-precision first dividend is stored. When performing the double-precision division, the upper bits of the double-precision dividend are stored, and the stored first dividend or the higher-order dividend is stored. First storage means for shifting up the bits every cycle;
Substitution means for assigning a predetermined bit to the end of the data shifted up in the first storage means;
When performing the single precision division, the single precision second dividend is stored. When performing the double precision division, the lower bits of the double precision dividend are stored, and the stored second dividend or the lower order is stored. Second storage means for shifting up the bits every cycle;
When performing the single precision division, storing double precision divisor data including the first divisor in the upper bits and the second divisor in the lower bits, and when performing the double precision division, Divisor storage means for storing a divisor as the divisor data;
When performing the single-precision division, the first remainder that is the remainder in the current cycle of the process of dividing the first dividend by the first divisor and the second dividend are divided by the second divisor. When storing operation result data including a second remainder which is a remainder in the current cycle of processing and performing the double precision division, the current processing of dividing the double precision dividend by the double precision divisor Calculation result storage means for storing a remainder in a cycle as the calculation result data;
For double-precision operand data based on one or both of the data stored in the first storage means and the data stored in the second storage means and the calculation result data, the upper bits of the operand data Addition / subtraction means for performing an upper bit operation for adding or subtracting upper bits of the divisor data to the lower bit, and a lower bit operation for adding or subtracting lower bits of the divisor data to the lower bits of the operand data; With
When performing the single precision division,
The operand data includes single precision data based on the first remainder and the data stored in the first storage means in higher bits, and the second remainder and the data stored in the second storage means Data that includes single precision data based on
The addition / subtraction means performs the addition or subtraction as the lower bit operation based on the sign of the lower bit operation in the previous cycle, and as the upper bit operation based on the sign of the upper bit operation in the previous cycle. Add or subtract,
The upper bit operation is an addition or subtraction that does not reflect the carry from the lower bit operation;
The substitution means substitutes a bit based on a sign of the lower bit operation,
When performing the double precision division,
The operation data is data stored in the operation result storage means and data stored in the first storage means,
The addition / subtraction means performs the addition or subtraction based on the sign of the upper bit operation in the previous cycle for both the upper bit operation and the lower bit operation,
The upper bit operation is an addition or subtraction reflecting the carry from the lower bit operation,
The assigning means assigns the bit shifted out from the second storage means,
When performing both the single precision division and the double precision division,
The addition / subtraction means substitutes a bit based on the sign of the upper bit operation at the end of the data shifted up in the second storage means,
The arithmetic processing unit includes:
When performing the double precision division, a value based on the data stored in the first storage means and the second storage means at the time when the plurality of cycles is completed is a quotient of the double precision division.
When performing the single precision division, the value based on the data stored in the first storage means at the time when the plurality of cycles is completed, the quotient obtained by dividing the second dividend by the second divisor, A value based on the data stored in the second storage means at the time when the plurality of cycles is completed is a quotient obtained by dividing the first dividend by the first divisor.
Arithmetic processing device.
前記加減算手段は、前記単精度の除算及び前記倍精度の除算のいずれを行う場合にも、前記上位ビット演算の符号を反転したビットを、前記第2格納手段においてシフトアップされたデータの末尾に代入し、
前記代入手段は、前記単精度の除算を行う場合には、前記下位ビット演算の符号を反転したビットを、前記第1格納手段においてシフトアップされたデータの末尾に代入し、
前記演算処理装置は、前記単精度の除算を行う場合には、前記複数サイクルが終了した時点で前記第1格納手段に格納されているデータが示す値を、前記第2被除数を前記第2除数で除算した商とし、前記複数サイクルが終了した時点で前記第2格納手段に格納されているデータが示す値を、前記第1被除数を前記第1除数で除算した商とする、
請求項1記載の演算処理装置。
The addition / subtraction means adds a bit obtained by inverting the sign of the higher-order bit operation to the end of the data shifted up in the second storage means when performing either the single precision division or the double precision division. Assign,
The substituting means, when performing the single-precision division, substitutes the bit obtained by inverting the sign of the lower bit operation at the end of the data shifted up in the first storage means,
When the arithmetic processing unit performs the single precision division, the value indicated by the data stored in the first storage means at the time when the plurality of cycles are completed, the second dividend is used as the second divisor. And the quotient obtained by dividing the first dividend by the first divisor, the value indicated by the data stored in the second storage means at the end of the plurality of cycles,
The arithmetic processing apparatus according to claim 1.
前記加減算手段は、前記単精度の除算及び前記倍精度の除算のいずれを行う場合にも、前記上位ビット演算の符号を示すビットを、前記第2格納手段においてシフトアップされたデータの末尾に代入し、
前記代入手段は、前記単精度の除算を行う場合には、前記下位ビット演算の符号を示すビットを、前記第1格納手段においてシフトアップされたデータの末尾に代入し、
前記演算処理装置は、前記単精度の除算を行う場合には、前記複数サイクルが終了した時点で前記第1格納手段に格納されているデータを反転した値を、前記第2被除数を前記第2除数で除算した商とし、前記複数サイクルが終了した時点で前記第2格納手段に格納されているデータを反転した値を、前記第1被除数を前記第1除数で除算した商とする、
請求項記載の演算処理装置。
The addition / subtraction means substitutes a bit indicating the sign of the higher-order bit operation at the end of the data shifted up in the second storage means when performing either the single precision division or the double precision division. And
The substituting means, when performing the single precision division, substitutes a bit indicating the sign of the lower bit operation at the end of the data shifted up in the first storage means,
In the case of performing the single precision division, the arithmetic processing unit uses a value obtained by inverting the data stored in the first storage means at the time when the plurality of cycles is completed, and the second dividend as the second dividend. A quotient obtained by dividing by the divisor, a value obtained by inverting the data stored in the second storage means at the time when the plurality of cycles are completed, and a quotient obtained by dividing the first dividend by the first divisor,
The arithmetic processing apparatus according to claim 1 .
前記除数格納手段と前記演算結果格納手段との少なくとも一方と、前記加減算手段は、積和演算器としても使用することが可能である、
請求項1に記載の演算処理装置
At least one of the divisor storage unit and the operation result storage unit, and the addition / subtraction unit can be used as a product-sum operation unit.
The arithmetic processing apparatus according to claim 1 .
請求項1から請求項4のいずれかに記載の演算処理装置を備える通信端末装置 A communication terminal apparatus provided with the arithmetic processing apparatus in any one of Claims 1-4 . 請求項1から請求項4のいずれかに記載の演算処理装置を備える基地局装置 A base station apparatus provided with the arithmetic processing apparatus in any one of Claims 1-4 .
JP2000256742A 2000-08-28 2000-08-28 Arithmetic processing unit Expired - Fee Related JP4510253B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000256742A JP4510253B2 (en) 2000-08-28 2000-08-28 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000256742A JP4510253B2 (en) 2000-08-28 2000-08-28 Arithmetic processing unit

Publications (2)

Publication Number Publication Date
JP2002073323A JP2002073323A (en) 2002-03-12
JP4510253B2 true JP4510253B2 (en) 2010-07-21

Family

ID=18745304

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000256742A Expired - Fee Related JP4510253B2 (en) 2000-08-28 2000-08-28 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP4510253B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60207929A (en) * 1984-03-31 1985-10-19 Fujitsu Ltd Division control system
JPH04172526A (en) * 1990-11-07 1992-06-19 Toshiba Corp Floating point divider
GB2296350B (en) * 1994-12-21 1999-10-06 Advanced Risc Mach Ltd Data processing divider
JP3544821B2 (en) * 1997-04-07 2004-07-21 株式会社東芝 Division circuit
US6108682A (en) * 1998-05-14 2000-08-22 Arm Limited Division and/or square root calculating circuit

Also Published As

Publication number Publication date
JP2002073323A (en) 2002-03-12

Similar Documents

Publication Publication Date Title
KR0138964B1 (en) Differential code modulator with data format changer
JP3338374B2 (en) Arithmetic processing method and apparatus
CN1049778C (en) Calculator
KR100439211B1 (en) The arithmetic processing unit
JPH05134851A (en) Multiplying circuit output system
JP4510253B2 (en) Arithmetic processing unit
JP2003533765A (en) Method and device for remainder calculation
US7394755B2 (en) Semi-fixed circuit
JPH10303854A (en) De-interleave device
JPH0342715A (en) Approximated inverse number generation device for division
JPH0546363A (en) Divider
JP3191442B2 (en) Arithmetic unit for Viterbi decoding
WO2000067125A1 (en) Processor
JP3452345B2 (en) Arithmetic processing unit and its utilization device
JP3560596B2 (en) Arithmetic unit and data reading method
JP3895887B2 (en) Decibel level adjustment device
JPH10178356A (en) Arithmetic processing unit and ratio station equipment using the same
KR100275527B1 (en) Apparatus and method for generating word random number
JP3392387B2 (en) Constant multiplier, digital coefficient operation device using constant multiplier, and digital filter device
JPH0225924A (en) Floating point arithmetic processor
JP3383661B2 (en) Arithmetic processing unit
JP3634333B2 (en) Digital signal processor
JP2003143040A (en) Digital matched filter and portable wireless terminal employing digital matched filter
JP2002073586A (en) Arithmetic processing device
JP3996858B2 (en) Arithmetic processing unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070514

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091013

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091209

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: 20100406

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100430

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

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: 20130514

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees