JPH1040073A - Digital signal processor - Google Patents

Digital signal processor

Info

Publication number
JPH1040073A
JPH1040073A JP8194263A JP19426396A JPH1040073A JP H1040073 A JPH1040073 A JP H1040073A JP 8194263 A JP8194263 A JP 8194263A JP 19426396 A JP19426396 A JP 19426396A JP H1040073 A JPH1040073 A JP H1040073A
Authority
JP
Japan
Prior art keywords
shift amount
value
input
setting register
right shift
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8194263A
Other languages
Japanese (ja)
Inventor
Takeshi Nakamura
中村  剛
Koichi Nagano
孝一 永野
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP8194263A priority Critical patent/JPH1040073A/en
Publication of JPH1040073A publication Critical patent/JPH1040073A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To speed up normalization in a digital signal processor (DSP) for normalizing a block floating system. SOLUTION: A right barrel shifter 1 for correcting the dynamic range of an operation result to a dynamic range before normalization is arranged on the output side of an operation part 9. In parallel with processing for storing the operation result of which dynamic range is corrected to the dynamic range obtained before normalization by the shifter 1 in a memory, the operation result is transferred to a normalized shift quantity detection circuit 3 to detect succeeding normalized shift quantity, so that the quantity of processing can be reduced.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はブロック・フローデ
ィング方式の正規化を行なう固定小数点型のディジタル
・シグナル・プロセッサに関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a fixed-point digital signal processor for normalizing a block loading scheme.

【0002】固定小数点型ディジタル・シグナル・プロ
セッサ(以下DSPと略する)を用いてダイナミックレン
ジの広い信号を処理する場合もしくはダイナミックレン
ジの狭い信号を処理する場合に疑似浮動小数点型に変換
して演算を行なうことが多い。この場合、処理する信号
がベクトル量になっている場合には処理量を抑えるため
に同一のベクトルの成分の個々に対して指数を設け正規
化を行なうのではなく、全ての成分に対して最適な共通
の指数部を設け一括して信号を正規化することが多い。
When processing a signal with a wide dynamic range or processing a signal with a narrow dynamic range using a fixed-point digital signal processor (hereinafter abbreviated as DSP), the signal is converted to a pseudo-floating-point type and operated. Often do. In this case, when the signal to be processed has a vector amount, an index is not set for each component of the same vector to perform the normalization in order to suppress the processing amount. Often, a common exponent is provided to collectively normalize signals.

【0003】[0003]

【従来の技術】図11に上記のようなブロック・フロー
ティングを実現するための従来のDSPのブロック図を
示す。図に示すように従来の固定小数点型DSPにおい
て、正規化後のデータのダイナミックレンジを正規化前
のダイナミックレンジに補正する場合は、ベクトルの各
成分をその成分内で絶対値が最大となる値を検出し、そ
の検出した値によりシフト量を求める正規化シフト量検
出回路21、セレクタ22、シフト量を格納するレジス
タ23、レジスタファイル24、ソースバス25(通常
複数本あるが簡略化して1本にしている)、データを格
納するメモリ26、バレルシフタ27、乗算器・ALU
等が含まれる演算部28で構成されている。
2. Description of the Related Art FIG. 11 shows a block diagram of a conventional DSP for realizing the above-mentioned block floating. As shown in the figure, when the dynamic range of the normalized data is corrected to the dynamic range before the normalization in the conventional fixed-point DSP, each component of the vector is set to a value having the maximum absolute value within the component. , A shift amount detecting circuit 21 for obtaining a shift amount based on the detected value, a selector 22, a register 23 for storing the shift amount, a register file 24, and a source bus 25. ), A memory 26 for storing data, a barrel shifter 27, a multiplier / ALU
And the like.

【0004】また、図12に示すように正規化シフト量
検出回路21は、負の値を正の値に変換する絶対値変換
回路30の出力と現在までの最大が格納されているレジ
スタ33の値とを比較器31において比較し、絶対値が
大きい方がレジスタ33に設定される。ベクトルの次数
分だけループが終了すると最大値が格納されているレジ
スタ33の値は、デコーダ32に入力され、出力の正規
化シフト量がシフト量設定レジスタ23に設定される。
As shown in FIG. 12, a normalized shift amount detection circuit 21 has an output of an absolute value conversion circuit 30 for converting a negative value into a positive value and a register 33 in which a maximum value up to the present is stored. The value is compared in the comparator 31, and the one with the larger absolute value is set in the register 33. When the loop is completed by the order of the vector, the value of the register 33 storing the maximum value is input to the decoder 32, and the normalized shift amount of the output is set in the shift amount setting register 23.

【0005】次に図11の従来のDSPの動作について
図10のフローチャートを用いて説明する。
Next, the operation of the conventional DSP of FIG. 11 will be described with reference to the flowchart of FIG.

【0006】ステップ11では、演算するデータをメモ
リ26からデータをロードする。ステップ12では、既
にシフト量設定レジスタ23に設定されているシフト量
の分だけバレルシフタ27で左シフトし、正規化を行な
う。
In step 11, data to be operated is loaded from the memory 26. In step 12, the barrel shifter 27 shifts to the left by the shift amount already set in the shift amount setting register 23, and performs normalization.

【0007】ステップ13では、演算部9で演算が行な
われる。ステップ14では、アキュムレートが終了して
いなければ、ステップ11に戻る。終了していればステ
ップ15に進む。
In step 13, the operation is performed by the operation unit 9. In step 14, if the accumulation is not completed, the process returns to step 11. If it has been completed, the process proceeds to step 15.

【0008】ステップ15では、アキュムレータが終了
した演算結果をメモリ26にストアする。
In step 15, the operation result of the accumulator is stored in the memory 26.

【0009】ステップ16では、ベクトルの次数分だけ
ループが終了していなければ、ステップ11に戻る。終
了していればステップ17に進む。
In step 16, if the loop has not been completed for the order of the vector, the process returns to step 11. If it has been completed, the process proceeds to step 17.

【0010】ステップ17では、ステップ15でストア
した演算結果をメモリ26からロードする。
In step 17, the operation result stored in step 15 is loaded from the memory 26.

【0011】ステップ18では、正規化を施す前のダイ
ナミックレンジに補正するために、ステップ12で左シ
フトした分だけ、バレルシフタ27によって右シフトす
る。
In step 18, the barrel shifter 27 shifts to the right by the amount shifted to the left in step 12 in order to correct the dynamic range before normalization.

【0012】ステップ19では、補正した結果をメモリ
26にストアする。ステップ110では、ベクトルの次
数分だけループが終了していなければ、ステップ17に
戻る。終了していればステップ111に進む。
In step 19, the corrected result is stored in the memory 26. In step 110, if the loop has not been completed for the degree of the vector, the process returns to step 17. If it has been completed, the process proceeds to step 111.

【0013】ステップ111では、ステップ19でスト
アした演算結果をメモリ26からロードする。
In step 111, the operation result stored in step 19 is loaded from the memory 26.

【0014】ステップ112では、ステップ19でロー
ドされてきたデータは、正規化シフト量を検出するため
に、正規化シフト量検出回路112に送られる。
In step 112, the data loaded in step 19 is sent to the normalized shift amount detection circuit 112 to detect the normalized shift amount.

【0015】ステップ113では、ベクトルの次数分だ
けループが終了していなければ、ステップ111に戻
る。終了していればステップ114に進む。
In step 113, if the loop has not been completed for the degree of the vector, the process returns to step 111. If it has been completed, the process proceeds to step 114.

【0016】ステップ114では、正規化シフト量検出
後のシフト量が、シフト量設定レジスタ23にストアさ
れる。
In step 114, the shift amount after the detection of the normalized shift amount is stored in the shift amount setting register 23.

【0017】[0017]

【発明が解決しようとする課題】上記のような従来のブ
ロック・フローディング方式の正規化を行なうDSPに
おいて、ベクトルの次数分の正規化を行い、さらに演算
結果のダイナミックレンジを正規化を施す前のダイナミ
ックレンジへ補正を行い、次の正規化シフト量を決定す
る一連の処理量が、かなり大きいため処理速度の向上の
妨げとなっている。また、正規化シフト量検出回路にお
いても回路規模が大きいため処理速度の向上の妨げとな
っている。
In the above-described DSP which performs normalization of the conventional block loading method, normalization of the order of the vector is performed, and furthermore, the dynamic range of the operation result is not normalized. , And a series of processing amounts for determining the next normalized shift amount are considerably large, which hinders an improvement in processing speed. Also, the normalized shift amount detection circuit has a large circuit size, which hinders an improvement in processing speed.

【0018】[0018]

【課題を解決するための手段】上記の課題を解決するた
めに、演算結果のダイナミックレンジを正規化を施す前
のダイナミックレンジに補正するための右バレルシフタ
を演算部の出力側に設ける。前記右バレルシフタにより
演算結果のダイナミックレンジを正規化を施す前のダイ
ナミックレンジへの補正した演算結果をメモリへストア
する処理と並行して、前記演算結果を正規化シフト量検
出回路に転送し、次の正規化シフト量を検出させること
で処理量を削減する。
In order to solve the above-mentioned problem, a right barrel shifter for correcting the dynamic range of the operation result to the dynamic range before normalization is provided at the output side of the operation unit. In parallel with the process of storing, in a memory, the operation result corrected to the dynamic range before the normalization of the dynamic range of the operation result by the right barrel shifter, the operation result is transferred to a normalized shift amount detection circuit. The amount of processing is reduced by detecting the normalized shift amount of.

【0019】これにより、ベクトルの次数分の正規化を
行い、さらに演算結果のダイナミックレンジを正規化を
施す前のダイナミックレンジへ補正を行い、次の正規化
シフト量の決定の一連の処理量を削減し、処理速度の向
上を図る。
Thus, the normalization of the order of the vector is performed, the dynamic range of the operation result is corrected to the dynamic range before the normalization is performed, and a series of processing amounts for determining the next normalized shift amount is reduced. Reduce and improve processing speed.

【0020】また、正規化シフト量検出回路を簡略化す
ることで、処理速度の向上を図る。
Further, the processing speed is improved by simplifying the normalized shift amount detection circuit.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施形態につい
て、図1から図9を用いて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS.

【0022】(実施の形態1)第1の実施形態につい
て、図1から図6を参照しながら説明する。
(Embodiment 1) A first embodiment will be described with reference to FIGS.

【0023】本発明の第1の実施形態のDSPは、図1
に示すように、右方向にのみシフトを行う右バレルシフ
タ1、左方向のみシフトを行う左バレルシフタ2、ベク
トルの各成分をその成分内で絶対値が最大となる値を検
出し、その検出した値によりシフト量を求める正規化シ
フト量検出回路3、セレクタ4、左右のシフト量を格納
するレジスタ5、レジスタファイル6、ソースバス7
(通常複数本あるが簡略化して1本にしている)、デー
タを格納するメモリ8、乗算器、ALU等が含まれる演
算部9で構成されている。
The DSP according to the first embodiment of the present invention is shown in FIG.
As shown in the figure, the right barrel shifter 1 shifts only in the right direction, the left barrel shifter 2 shifts only in the left direction, and detects the value of each component of the vector which has the largest absolute value in the component, and detects the detected value. A shift amount detecting circuit 3, a selector 4, a register 5 for storing left and right shift amounts, a register file 6, a source bus 7,
It is composed of a memory 8 for storing data, a multiplier, and an arithmetic unit 9 including an ALU and the like.

【0024】また、図2は、語長が8ビットの場合の正
規化シフト量検出回路3の構成例であり、同図に示すよ
うにEX−OR(排他的論理和)10、OR(論理和)1
1、デコーダ12、レジスタ13で構成される。
FIG. 2 shows an example of the structure of the normalized shift amount detection circuit 3 when the word length is 8 bits. As shown in FIG. 2, EX-OR (exclusive OR) 10 and OR (logical Sum) 1
1, a decoder 12, and a register 13.

【0025】まず、正規化シフト量検出回路3の動作に
ついて、語長が8ビット、ベクトルの次数が5つの場合
で説明する。図2に示す8ビットの場合の正規化シフト
量検出回路3の入力値を図4に示す。
First, the operation of the normalized shift amount detection circuit 3 will be described for the case where the word length is 8 bits and the degree of the vector is 5. FIG. 4 shows the input values of the normalized shift amount detection circuit 3 in the case of 8 bits shown in FIG.

【0026】最初に、図4に示す第1のベクトル”00
011100”ついて、MSBであるa17の符号ビッ
ト”0”とその他のビットa16〜a10とそれぞれ排
他的論理和をとり、図5に示す第1の7ビットの値”0
011100”を得、さらに図6に示すレジスタ13に
格納しているレジスタの初期値”0000000”と論
理和をとり、”0011100”を得、レジスタ13に
格納する(図6の第1の値)。
First, the first vector "00" shown in FIG.
An exclusive OR of the sign bit “0” of a17, which is the MSB, and the other bits a16 to a10 is performed on 011100 ”, and the value of the first 7 bits“ 0 ”shown in FIG.
011100 "is obtained and further ORed with the initial value" 00000000 "of the register stored in the register 13 shown in FIG. 6 to obtain" 0011100 "and stored in the register 13 (first value in FIG. 6). .

【0027】次に、図4に示す第2のベクトル”111
10001”ついて、MSBであるa17の符号ビッ
ト”1”とその他のビットa16〜a10とそれぞれ排
他的論理和をとり、図5に示す第2の7ビットの値”0
001110”を得、さらに図6に示すレジスタ13に
格納している値”0011100”(図6の第1の値)
と論理和をとり、”0011110”を得、レジスタ1
3に格納する(図6の第2の値)。
Next, the second vector "111" shown in FIG.
10001 ", the sign bit" 1 "of the MSB a17 is exclusive-ORed with the other bits a16 to a10, and the value of the second 7-bit" 0 "shown in FIG.
001110 "and the value" 0011100 "(first value in FIG. 6) stored in the register 13 shown in FIG.
Is ORed with the data to obtain "0011110",
3 (the second value in FIG. 6).

【0028】第3、第4、第5のベクトルについても同
様の処理を行い、最終的に”0011111”(図6デ
コーダへの出力値)を得、その値はデコーダ12に送ら
れ、図3に示すデコーダ13の入力値と出力値の関係に
従い”010”すなわちシフト量2ビットを出力する。
The same processing is performed for the third, fourth, and fifth vectors, and finally, “0011111” (output value to the decoder in FIG. 6) is obtained. In accordance with the relationship between the input value and the output value of the decoder 13 shown in FIG.

【0029】次に本実施形態の動作について図9のフロ
ーチャートを用いて説明する。ステップ1では、演算す
るデータをメモリ8からロードする。
Next, the operation of this embodiment will be described with reference to the flowchart of FIG. In step 1, data to be operated is loaded from the memory 8.

【0030】ステップ2では、既に前回のベクトル処理
時に決定された、左右シフト量設定レジスタ5に設定さ
れているシフト量の分だけ左バレルシフタ2により左シ
フトが行われ、正規化が行われる。
In step 2, left shift is performed by the left barrel shifter 2 by the shift amount set in the left and right shift amount setting register 5, which has already been determined in the previous vector processing, and normalization is performed.

【0031】ステップ3では、演算部9で演算が行われ
る。ステップ4では、アキュムレートが終了していなけ
れば、ステップ1に戻る。終了すればステップ5に進
む。
In step 3, the calculation is performed by the calculation unit 9. In step 4, if the accumulation is not completed, the process returns to step 1. Upon completion, the process proceeds to step 5.

【0032】ステップ5では、アキュムレートが終了し
た演算結果を正規化を施す前のダイナミックレンジに補
正するために、ステップ2で左シフトした分だけ、右バ
レルシフタ1によって右シフトする。
In step 5, the right barrel shifter 1 shifts to the right by the amount shifted to the left in step 2 in order to correct the operation result after accumulation to the dynamic range before normalization.

【0033】ステップ6では、ステップ5でダイナミッ
クレンジが補正された演算結果をメモリにストアし、ス
トアの処理と平行して、次のベクトル処理時の正規化シ
フト量を決定するために演算結果は、正規化シフト量検
出回路3に送られる。
In step 6, the calculation result whose dynamic range has been corrected in step 5 is stored in a memory, and in parallel with the storing process, the calculation result is determined in order to determine the normalized shift amount in the next vector processing. , To the normalized shift amount detection circuit 3.

【0034】ステップ7では、ベクトルの次数分だけル
ープが終了していなければ、ステップ1に戻る。終了す
ればステップ8に進む。
In step 7, if the loop has not been completed for the order of the vector, the process returns to step 1. When the process is completed, the process proceeds to Step 8.

【0035】ステップ8では、ベクトルの次数分だけル
ープが終了した段階で、正規化シフト量検出回路3の内
部のレジスタ13に次のベクトル処理時の正規化シフト
量が格納されており、レジスタ13に格納されている値
は、デコーダに送られシフト量が決定され、そのシフト
量は左右シフト量設定レジスタに格納される。
In step 8, when the loop is completed by the order of the vector, the normalized shift amount in the next vector processing is stored in the register 13 inside the normalized shift amount detection circuit 3, and the register 13 Is sent to the decoder to determine the shift amount, and the shift amount is stored in the left / right shift amount setting register.

【0036】従来のDSPにおける正規化シフト量検出
回路21は、絶対値変換回路30、比較器31、デコー
ダ32、レジスタ33を備えており、本実施形態の正規
化シフト量検出回路3は、デコーダ12、レジスタ1
3、絶対値変換回路30をEX−OR(排他的論理和)
のみで構成される回路で代用し、比較器31をOR(論
理和)のみで構成される回路であり、大幅に回路構成を
簡略化することで、正規化シフト量の検出処理速度の向
上を実現することができる。
The normalization shift amount detection circuit 21 in the conventional DSP includes an absolute value conversion circuit 30, a comparator 31, a decoder 32, and a register 33. 12, Register 1
3. EX-OR (exclusive OR) of the absolute value conversion circuit 30
The comparator 31 is a circuit composed only of an OR (logical sum), and the circuit configuration is greatly simplified to improve the processing speed of detecting the normalized shift amount. Can be realized.

【0037】さらに、従来のDSPにおけるベクトルの
次数分の正規化、演算、演算結果のダイナミックレンジ
を正規化を施す前のダイナミックレンジへの補正、次の
正規化シフト量の決定の一連の処理には、図11に示す
ようにベクトルの次数分のループを3回必要となる。一
方、前記の同一連の処理において、本実施形態にように
演算結果のダイナミックレンジを正規化を施す前のダイ
ナミックレンジに補正するための右バレルシフタ1を演
算部の出力側に設け、前記右バレルシフタにより演算結
果のダイナミックレンジを正規化を施す前のダイナミッ
クレンジへの補正した演算結果をメモリ8へストアする
処理と並行して、前記演算結果を正規化シフト量検出回
路3に転送し、次の正規化シフト量を検出させること
で、図10に示すようにベクトルの次数分のループは1
回で実現できる。
Further, in the conventional DSP, a series of processes of normalization of the order of the vector, calculation, correction of the dynamic range of the calculation result to the dynamic range before normalization, and determination of the next normalized shift amount are performed. Requires three loops of the order of the vector as shown in FIG. On the other hand, in the same series of processing, a right barrel shifter 1 for correcting the dynamic range of the operation result to the dynamic range before normalization is provided at the output side of the operation unit as in the present embodiment, and the right barrel shifter is provided. The processing result is transferred to the normalized shift amount detection circuit 3 in parallel with the process of storing the calculation result in the memory 8 in which the dynamic range of the calculation result is corrected to the dynamic range before normalization is performed. By detecting the normalized shift amount, as shown in FIG.
Can be realized in times.

【0038】従って、前記の正規化シフト量検出回路3
は、従来の正規化シフト量検出回路21より高速化して
いるため、ベクトルの次数分の正規化を行い、さらに演
算結果のダイナミックレンジを正規化を施す前のダイナ
ミックレンジへ補正を行い、次の正規化シフト量を決定
する一連の処理量は、従来の1/3以下に抑えることが
可能となり、処理速度の向上が実現できる。
Therefore, the above-mentioned normalized shift amount detection circuit 3
Is faster than the conventional normalized shift amount detection circuit 21, so that the normalization is performed for the order of the vector, and the dynamic range of the operation result is corrected to the dynamic range before the normalization is performed. A series of processing amounts for determining the normalized shift amount can be suppressed to 1/3 or less of the conventional amount, and the processing speed can be improved.

【0039】(実施の形態2)第2の実施形態につい
て、図7を参照しながら説明する。
(Embodiment 2) A second embodiment will be described with reference to FIG.

【0040】本発明の第2の実施形態のDSPは、左シ
フト量補正レジスタ14、減算器15を備えた、実施形
態1に示したDSPである。
The DSP according to the second embodiment of the present invention is the DSP shown in the first embodiment including the left shift amount correction register 14 and the subtracter 15.

【0041】本実施形態の基本的な動作については、実
施形態1と同様であるので省略し、作用、効果について
説明する。
The basic operation of the present embodiment is the same as that of the first embodiment, and therefore will be omitted, and the operation and effect will be described.

【0042】従来のDSPまたは、実施形態1のような
DSPにおける正規化は、ダイナミックレンジを全て使
いきるために、正規化の施した後の演算においてオーバ
ーフローが発生する確立が高くなるという問題が生じ
る。本実施形態のように、左シフト量設定レジスタ14
に設定した値の分だけ、左右正規化シフト設定レジスタ
5に格納されている値を減算器15によって縮小させ、
ダイナミックレンジを使いきるのを抑制することでオー
バーフローの発生を抑止することができる。
The normalization in the conventional DSP or in the DSP as in the first embodiment has a problem that the probability of occurrence of an overflow in a calculation after the normalization is increased because the entire dynamic range is used. . As in the present embodiment, the left shift amount setting register 14
The value stored in the left / right normalized shift setting register 5 is reduced by the subtracter 15 by the value set in
The occurrence of overflow can be suppressed by suppressing the use of the dynamic range.

【0043】(実施の形態3)第3の実施形態につい
て、図8を参照しながら説明する。
(Embodiment 3) A third embodiment will be described with reference to FIG.

【0044】本発明の第3の実施形態のDSPは、右シ
フト量補正レジスタ16、加算器17、右シフト量設定
レジスタ18を備えた、実施形態2に示したDSPであ
る。本実施形態の基本的な動作については、実施形態1
と同様であるので省略する。
The DSP according to the third embodiment of the present invention is the DSP shown in the second embodiment including a right shift amount correction register 16, an adder 17, and a right shift amount setting register 18. The basic operation of the present embodiment is described in the first embodiment.
The description is omitted because it is the same as.

【0045】図8において、左右シフト量設定レジスタ
5にシフト量Nビットが設定されているとし、A*Bの
演算を行なう場合(A、Bは10進数とする)を例にし
て本実施形態の作用、効果を説明する。
In FIG. 8, it is assumed that the shift amount N bits are set in the left / right shift amount setting register 5 and an A * B operation is performed (A and B are decimal numbers). The operation and effect of will be described.

【0046】まずAついて正規化を行なうために、左バ
レルシフタ2によってNビット左シフトを行なうとA*
2^Nとなる。
First, in order to normalize A, the left barrel shifter 2 shifts left by N bits to obtain A *
2 ^ N.

【0047】同様にしてBについても正規化を行なうた
めに、左バレルシフタ2によってNビット左シフトを行
なうとB*2^Nとなる。従って、演算結果は、(A*
B)*2^(N+1)となる。
Similarly, if B is shifted left by N bits by the left barrel shifter 2 in order to normalize B, B * 2 ^ N. Therefore, the calculation result is (A *
B) * 2 ^ (N + 1).

【0048】実施形態1、2に示すDSPにおいては、
前記の演算結果のダイナミックレンジを正規化を施す前
のダイナミックレンジへの補正するために、右バレルシ
フタ1で左右シフト量設定レジスタ5のシフト量設定分
すなわちNビット右シフトが行なわれ、前記演算結果
(A*B)*2^(N+1)は、(A*B)*2^1と
なり、正しい補正が行なわれない。
In the DSP shown in the first and second embodiments,
In order to correct the dynamic range of the operation result to the dynamic range before normalization, the right barrel shifter 1 performs the shift amount setting of the left / right shift amount setting register 5, that is, the right shift by N bits. (A * B) * 2 ^ (N + 1) becomes (A * B) * 2 ^ 1 and correct correction is not performed.

【0049】一方、本実施形態においては、右シフト量
補正レジスタ16に補正シフト量1ビットをあらかじめ
設定しておけば、左右シフト量設定レジスタ5に設定し
ているNビットに、加算器17によって右シフト量補正
レジスタ16の補正シフト量1ビットが加算された値で
あるN+1ビットが右シフト量設定レジスタ18に設定
される。従って、補正後の結果は、(A*B)*2^
(N+1)をN+1ビット右シフトされるので、A*B
となり正しい補正が行なわれる。
On the other hand, in the present embodiment, if the correction shift amount of 1 bit is set in advance in the right shift amount correction register 16, the adder 17 adds the N bits set in the left and right shift amount setting register 5 to the adder 17. N + 1 bits, which is a value obtained by adding one bit of the correction shift amount of the right shift amount correction register 16, are set in the right shift amount setting register 18. Therefore, the corrected result is (A * B) * 2 ^
Since (N + 1) is shifted right by N + 1 bits, A * B
And correct correction is performed.

【0050】[0050]

【発明の効果】以上、説明したように本発明のブロック
・フローディング方式の正規化を行なう固定小数点型の
DSPは、ベクトルの次数分の正規化を行い、さらに演
算結果のダイナミックレンジを正規化を施す前のダイナ
ミックレンジへ補正を行い、次の正規化シフト量を決定
する一連の処理量を従来の1/3以下に抑える効果を有
し、処理速度の向上が実現できる。
As described above, the fixed-point type DSP of the present invention which performs the normalization of the block loading method performs the normalization of the order of the vector, and further normalizes the dynamic range of the operation result. Is corrected to the dynamic range before the processing is performed, and a series of processing amounts for determining the next normalized shift amount is suppressed to 1/3 or less of the conventional processing amount, and the processing speed can be improved.

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

【図1】実施形態1のDSPのブロック図FIG. 1 is a block diagram of a DSP according to a first embodiment.

【図2】正規化シフト量検出回路のブロック図FIG. 2 is a block diagram of a normalized shift amount detection circuit.

【図3】正規化シフト量検出回路の動作を説明する図FIG. 3 is a diagram for explaining the operation of a normalized shift amount detection circuit;

【図4】正規化シフト量検出回路の動作を説明する図FIG. 4 is a diagram illustrating the operation of a normalized shift amount detection circuit.

【図5】正規化シフト量検出回路の動作を説明する図FIG. 5 is a diagram illustrating the operation of a normalized shift amount detection circuit.

【図6】正規化シフト量検出回路の動作を説明する図FIG. 6 is a diagram illustrating the operation of a normalized shift amount detection circuit.

【図7】実施形態2のDSPのブロック図FIG. 7 is a block diagram of a DSP according to a second embodiment.

【図8】実施形態3のDSPのブロック図FIG. 8 is a block diagram of a DSP according to a third embodiment.

【図9】本発明の動作の一例を示すフローチャートFIG. 9 is a flowchart showing an example of the operation of the present invention.

【図10】従来のDSPの動作の一例を示すフローチャ
ート
FIG. 10 is a flowchart showing an example of the operation of a conventional DSP.

【図11】従来のDSPの一例を示すブロック図FIG. 11 is a block diagram showing an example of a conventional DSP.

【図12】従来のDSPの正規化シフト量検出回路の一
例を示すブロック図
FIG. 12 is a block diagram showing an example of a conventional normalized shift amount detection circuit of a DSP.

【符号の説明】[Explanation of symbols]

1 右バレルシフタ 2 左バレルシフタ 3,21 正規化シフト量検出回路 4,22 セレクタ 5 左右シフト量設定レジスタ 6,24 レジスタファイル 7,25 ソースバス 8,26 メモリ 9,28 演算部 10 EX−OR(排他的論理和) 11 OR(論理和) 12,32 デコーダ 13,33 レジスタ 14 左シフト量補正レジスタ 15 算器 16 右シフト量補正レジスタ 17 加算器 18 右シフト量設定レジスタ 23 シフト量設定レジスタ 27 バレルシフタ 30 絶対値変換回路 31 比較器 1 right barrel shifter 2 left barrel shifter 3,21 normalized shift amount detection circuit 4,22 selector 5 left / right shift amount setting register 6,24 register file 7,25 source bus 8,26 memory 9,28 operation unit 10 EX-OR (exclusive Logical OR) 11 OR (logical sum) 12, 32 decoder 13, 33 register 14 left shift amount correction register 15 arithmetic unit 16 right shift amount correction register 17 adder 18 right shift amount setting register 23 shift amount setting register 27 barrel shifter 30 Absolute value conversion circuit 31 Comparator

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ベクトルの各成分をその成分内で絶対値
が最大となる値を検出し、その検出した値によりシフト
量を求め、ベクトルの各成分を一括して正規化を行なう
固定小数点型ディジタル・シグナル・プロセッサにおい
て、 Nビットの2進数のデータにおけるMSBの符号ビット
とその他のビットとそれぞれ2入力排他的論理和(以下
EX−OR)をとる2入力EX−ORの(N−1)個の
部分回路と前記2入力EX−ORの部分回路の(N−
1)ビット出力を第1の入力とし、 前記2入力EX−ORの部分回路の前回までの出力の中
での最大値を格納する(N−1)ビットのレジスタの値
を第2の入力とし、 第1の入力と第2の入力においてそれぞれMSB側から
対応をとって入力とする(N−1)個の2入力論理和
(以下OR)の部分回路を備え、 前記(N−1)個の2入力ORの出力が、前記レジスタ
と正規化シフト量log2Nビット出力するデコーダの
入力となる回路で構成された正規化ためのシフト量を検
出するシフト量検出回路と、 前記正規化のためのシフト量を検出する回路で検出され
た左右シフト量を格納する左右シフト量設定レジスタ
と、 前記左右シフト量設定レジスタに格納されている値の分
だけ左シフトする左バレルシフタを演算部の入力側に備
え、 さらに演算部の出力側に演算後の出力結果のダイナミッ
クレンジを正規化を施す前のダイナミックレンジへ補正
するために前記左右シフト量設定レジスタに格納されて
いる値の分だけ右シフトする右バレルシフタを備えたこ
とを特徴とするディジタル信号処理装置。
1. A fixed-point type in which each component of a vector detects a value having a maximum absolute value in the component, a shift amount is obtained based on the detected value, and the components of the vector are collectively normalized. In the digital signal processor, (N-1) of a two-input EX-OR which takes a two-input exclusive OR (hereinafter, EX-OR) with a sign bit of an MSB and other bits in N-bit binary data, respectively Of the partial circuits and the (N-
1) A bit output is set as a first input, and a value of a (N-1) -bit register for storing a maximum value among the previous outputs of the two-input EX-OR partial circuit is set as a second input. And (N-1) two-input OR (hereinafter referred to as OR) partial circuits, each of which has an input corresponding to the first input and the second input from the MSB side. A shift amount detection circuit configured to detect a shift amount for normalization, which is constituted by a circuit which is an input of a decoder that outputs the register and a normalized shift amount log2N bits, A left / right shift amount setting register for storing the left / right shift amount detected by the shift amount detection circuit, and a left barrel shifter for left shifting by the value stored in the left / right shift amount setting register are provided on the input side of the arithmetic unit. Prepared, A right barrel shifter that shifts rightward by the value stored in the left / right shift amount setting register to correct the dynamic range of the output result after the calculation to the dynamic range before normalization is provided on the output side of the calculation unit. A digital signal processing device comprising:
【請求項2】 左右シフト量設定レジスタに格納されて
いる値を補正するための値を格納する左右シフト量補正
値設定レジスタを設け、 左右シフト量補正値設定レジスタに格納されている値と
シフト量検出回路の出力値を入力とし、前記左右シフト
量設定レジスタへ出力を行なう減算器を備えたことを特
徴とする請求項1記載のディジタル信号処理装置。
2. A method according to claim 1, further comprising the step of: setting a left / right shift amount correction value setting register for storing a value for correcting a value stored in the left / right shift amount setting register. 2. The digital signal processing device according to claim 1, further comprising a subtractor that receives an output value of the amount detection circuit and outputs the input value to the left / right shift amount setting register.
【請求項3】 右シフト量設定レジスタに格納されてい
る値を補正するための値を格納する右シフト量補正値設
定レジスタと右バレルシフタのシフト量を格納する右シ
フト量設定レジスタを設け、 左右シフト量設定レジスタに格納されている値と前記右
シフト量補正値設定レジスタに格納している値を入力と
し、前記右シフト量設定レジスタへ出力する加算器を備
えたことを特徴とする請求項1記載のディジタル信号処
理装置。
3. A right shift amount correction value setting register for storing a value for correcting a value stored in a right shift amount setting register and a right shift amount setting register for storing a right barrel shifter shift amount. 9. An adder that receives a value stored in a shift amount setting register and a value stored in the right shift amount correction value setting register and outputs the value to the right shift amount setting register. 2. The digital signal processing device according to 1.
JP8194263A 1996-07-24 1996-07-24 Digital signal processor Pending JPH1040073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8194263A JPH1040073A (en) 1996-07-24 1996-07-24 Digital signal processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8194263A JPH1040073A (en) 1996-07-24 1996-07-24 Digital signal processor

Publications (1)

Publication Number Publication Date
JPH1040073A true JPH1040073A (en) 1998-02-13

Family

ID=16321727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8194263A Pending JPH1040073A (en) 1996-07-24 1996-07-24 Digital signal processor

Country Status (1)

Country Link
JP (1) JPH1040073A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728739B1 (en) 1998-06-15 2004-04-27 Asahi Kasei Kabushiki Kaisha Data calculating device and method for processing data in data block form
WO2011161859A1 (en) * 2010-06-22 2011-12-29 日本電気株式会社 Semiconductor integrated circuit and index calculation method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728739B1 (en) 1998-06-15 2004-04-27 Asahi Kasei Kabushiki Kaisha Data calculating device and method for processing data in data block form
WO2011161859A1 (en) * 2010-06-22 2011-12-29 日本電気株式会社 Semiconductor integrated circuit and index calculation method
JP4883251B1 (en) * 2010-06-22 2012-02-22 日本電気株式会社 Semiconductor integrated circuit and index calculation method
CN102378960A (en) * 2010-06-22 2012-03-14 日本电气株式会社 Semiconductor integrated circuit and index calculation method
US8862647B2 (en) 2010-06-22 2014-10-14 Nec Corporation Semiconductor integrated circuit and exponent calculation method

Similar Documents

Publication Publication Date Title
US5568412A (en) Rounding-off method and apparatus of floating point arithmetic apparatus for addition/subtraction
US5422805A (en) Method and apparatus for multiplying two numbers using signed arithmetic
US5010508A (en) Prenormalization for a floating-point adder
JP3352887B2 (en) Divider with clamp, information processing apparatus provided with this divider with clamp, and clamp method in division processing
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
RU2408057C2 (en) Fixed point multiplier with presaturation
US4992969A (en) Integer division circuit provided with a overflow detector circuit
JPH10161850A (en) Absolute value comparing circuit
US20100174764A1 (en) Reuse of rounder for fixed conversion of log instructions
US9009209B2 (en) Processor, control method of processor, and computer readable storage medium storing processing program for division operation
US6151612A (en) Apparatus and method for converting floating point number into integer in floating point unit
US6047305A (en) Division circuit not requiring taking complements of divisor, dividend and remainder
JPH1040073A (en) Digital signal processor
US4951238A (en) Processor for executing arithmetic operations on input data and constant data with a small error
JP2509279B2 (en) Floating point number-fixed point number converter
JPH0511980A (en) Overflow detecting method and circuit
JPH10187416A (en) Floating point arithmetic unit
US20070094318A1 (en) Method and system for hardware efficient systematic approximation of square functions for communication systems
JPH09128213A (en) Block floating processing system/method
JP3675111B2 (en) 3-input comparator
JP2723707B2 (en) Normalization circuit
JP4073513B2 (en) Floating point processor
JP2801472B2 (en) Floating point arithmetic unit
JP2591250B2 (en) Data processing device
US20040167949A1 (en) Data saturation manager and corresponding method