JP2007018212A - Block floating method and device - Google Patents

Block floating method and device Download PDF

Info

Publication number
JP2007018212A
JP2007018212A JP2005198459A JP2005198459A JP2007018212A JP 2007018212 A JP2007018212 A JP 2007018212A JP 2005198459 A JP2005198459 A JP 2005198459A JP 2005198459 A JP2005198459 A JP 2005198459A JP 2007018212 A JP2007018212 A JP 2007018212A
Authority
JP
Japan
Prior art keywords
data
block
power
shift number
normalization
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.)
Withdrawn
Application number
JP2005198459A
Other languages
Japanese (ja)
Inventor
Kazuhiro Nomoto
一宏 野元
Hiroshi Katayama
浩 片山
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2005198459A priority Critical patent/JP2007018212A/en
Publication of JP2007018212A publication Critical patent/JP2007018212A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To suppress an arithmetic error in a linear system when data whose only one data has large amplitude are input concerning a block floating method and device. <P>SOLUTION: This block floating device is configured of a mean block power calculation processing part 501 for receiving input data, and for calculating a mean block power, a normalization shift number calculation processing part 301 for receiving the output of the mean block power calculation processing part 501, and for operating the normalization processing of data, a block data normalization processing part 302 for normalizing block data only by the normalization shift number, a linear system 303 for receiving the output of the block data normalization processing part 302, and for executing a predetermined arithmetic operation and a post-processing part 304 for receiving the output of the linear system 303 and the output of the normalization shift number calculation processing part, and for shifting the output data of the linear system to the right only by the normalization shift number, and for returning it to an original result. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明はブロックフローティング方法及び装置に関し、更に詳しくは音声、画像等のディジタル信号処理を行なうプロセッサの性能向上を図るためのブロックフローティング方法及び装置に関する。   The present invention relates to a block floating method and apparatus, and more particularly to a block floating method and apparatus for improving the performance of a processor for processing digital signals such as sound and images.

音声や画像のディジタル信号処理に使用されるプロセッサは、システムコストの点を考えて、ディジタルシグナルプロセッサ(以下、DSPという)等の固定小数点型プロセッサが用いられる場合が多い。一般的に、信号処理回路で取り扱う固定小数点型のデータ形式を図6に示す。図において、101は符号ビット、102は小数点の位置、103は小数点以下のデータD1〜Dn-1を表わすビットである。本例は、小数点以下にn−1ビットを割り当てるデータ形式を示している。 In view of system cost, a fixed-point processor such as a digital signal processor (hereinafter referred to as DSP) is often used as a processor used for digital signal processing of sound and images. FIG. 6 shows a fixed-point type data format that is generally handled by a signal processing circuit. In the figure, 101 is a sign bit, 102 is a decimal point position, and 103 is a bit representing data D 1 to D n-1 after the decimal point. This example shows a data format in which n-1 bits are allocated after the decimal point.

音声・画像等の信号処理は、積和演算を多用するため、DSPを使用して音声・画像等の信号処理を行なう場合は、図7を用いて説明するように演算誤差が問題となる。図7は固定小数点型の演算の様子を示す図である。図において、201は乗算を行なう演算器、202は演算器201の2つの入力データのうちの一方の入力データのうちの一方の入力データ、203は他方の入力データである。   Since signal processing of audio / images frequently uses product-sum operations, when signal processing of audio / images, etc. is performed using a DSP, calculation errors become a problem as described with reference to FIG. FIG. 7 is a diagram showing a state of fixed-point type calculation. In the figure, 201 is an arithmetic unit for performing multiplication, 202 is one input data of two input data of the arithmetic unit 201, and 203 is the other input data.

204は演算結果のデータ、205は演算結果データの下位ビットを示す。図のように乗算を行なうと、演算結果204のデータの有効なビット長は入力データのビット長の2倍となる。通常、演算結果を格納するメモリ206や、再び乗算結果を次の乗算に使用する場合(207)は、下位ビット205に対して丸め又は切り捨て処理を行なう。このため、乗算結果のデータがレジスタの下位側に集中しているような小さいデータであるほど、データをメモリ206に格納する場合や、乗算結果を再び乗算する場合に生じる演算誤差は大きくなる。従って、固定小数点演算による演算誤差を削減するためには、信号のレベルをオーバフローが発生しない程度に大きく保つ必要がある。   Reference numeral 204 denotes operation result data, and 205 denotes lower bits of the operation result data. When multiplication is performed as shown in the figure, the effective bit length of the data of the operation result 204 is twice the bit length of the input data. Usually, when the operation result is stored in the memory 206 or when the multiplication result is used again for the next multiplication (207), the lower bit 205 is rounded or rounded down. For this reason, the smaller the data that the multiplication result data is concentrated on the lower side of the register, the larger the calculation error that occurs when the data is stored in the memory 206 or when the multiplication result is multiplied again. Therefore, in order to reduce calculation errors due to fixed-point arithmetic, it is necessary to keep the signal level large enough to prevent overflow.

信号のレベルを適切な値に正規化する従来技術として、ブロックフローティング処理がある。この処理は、複数のデータを1ブロックとしてまとめ、各ブロック単位でブロック内のデータ(ブロックデータ)中で最大のデータを抽出し、その指数(正規化シフト数)を求め、そのシフト数分だけ各ブロックデータをシフトする技術が用いられている。   As a conventional technique for normalizing the signal level to an appropriate value, there is a block floating process. In this process, a plurality of data are collected as one block, and the maximum data is extracted from the data in the block (block data) for each block, and its exponent (normalized shift number) is obtained. A technique for shifting each block data is used.

正規化シフト数算出方法として、固定小数点表示型マイクロプロセッサでのブロックフローティング処理による正規化を行なうブロックフローティング処理システムであって、全てのブロックデータの絶対値の論理和演算を行なう演算器と、この論理和演算の結果データに対するMSB検出処理を行ない、ブロックフローティング処理に用いる正規化係数を求める算術論理演算部よりなる技術が知られている(例えば特許文献1参照)。   A normalization shift number calculation method is a block floating processing system that performs normalization by block floating processing in a fixed-point display type microprocessor, and an arithmetic unit that performs an OR operation of absolute values of all block data, A technique is known that includes an arithmetic logic unit that performs MSB detection processing on the result data of a logical sum operation and obtains a normalization coefficient used for block floating processing (see, for example, Patent Document 1).

また、入力する無効データが多数存在しても、有効データの仮数部が仮数部用のメモリから溢れる可能性が低くなるようにする技術が知られている(例えば特許文献2参照)。
図8はブロックフローティングを適用した構成例を示す図である。通常、ブロックフローティング処理は、フィルタ計算やFFT処理等の線形システムの有限個の入力データに対して実施される。図において、301は正規化シフト数算出処理部であり、m個の入力ブロックデータ{input(m)}に対して、正規化シフト数(sft)を算出する。ブロックデータ正規化処理部302は、正規化シフト数算出処理部301からの正規化シフト数sftを受けて、正規化シフト数sftだけブロックデータ{input(m)}を左シフトしてデータの正規化{input_bf(m)}を実施する。
Further, there is known a technique for reducing the possibility that the mantissa part of valid data overflows from the mantissa memory even if there are a large number of invalid data to be input (see, for example, Patent Document 2).
FIG. 8 is a diagram showing a configuration example to which block floating is applied. Normally, the block floating process is performed on a finite number of input data of a linear system such as filter calculation or FFT process. In the figure, reference numeral 301 denotes a normalized shift number calculation processing unit, which calculates a normalized shift number (sft) for m input block data {input (m)}. The block data normalization processing unit 302 receives the normalized shift number sft from the normalized shift number calculation processing unit 301, shifts the block data {input (m)} to the left by the normalized shift number sft, and normalizes the data. Execute {input_bf (m)}.

線形システム303は、ブロックデータ正規化処理部302の出力である{input_bf(m)}を入力し、線形システムの演算を実施する。後処理部304は、線形システム303と正規化シフト数算出処理部301の出力を受けて、正規化シフト数だけ線形システムの出力データ{output(n)}を右シフトして本来の結果に戻す処理を実施する。このように、有限個のデータで構成されるブロックデータに対して信号のレベルを適切な値の正規化するブロックフローティング処理により、線形システムにおける演算誤差を少なくすることが可能である。
特開平9−128213号公報(段落0023〜0030、図1、図2、図3) 特開2004−295490号公報(段落0024〜0044、図1、図2)
The linear system 303 inputs {input_bf (m)}, which is the output of the block data normalization processing unit 302, and performs an operation of the linear system. The post-processing unit 304 receives the outputs of the linear system 303 and the normalized shift number calculation processing unit 301, right shifts the output data {output (n)} of the linear system by the normalized shift number, and returns to the original result. Perform the process. As described above, it is possible to reduce the calculation error in the linear system by the block floating process in which the signal level is normalized to an appropriate value with respect to the block data composed of a finite number of data.
JP-A-9-128213 (paragraphs 0023-0030, FIG. 1, FIG. 2, FIG. 3) JP 2004-295490 A (paragraphs 0024 to 0044, FIGS. 1 and 2)

前述した従来のブロックフローティング処理では、ブロックデータ中の最大のデータを抽出し、その正規化シフト数を算出し、そのシフト数分だけ各ブロックデータをシフトする。これは、ブロックデータの最大データを基準にしているため、以下のようなブロックデータの種類によっては、線形システムにおける演算誤差が大きくなる場合がある。
1)インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合、正規化されたデータの大部分の振幅が小さいままとなる。これにより、線形システムにおける演算誤差が大きくなることが問題となる。また、場合によっては、ブロックデータの大部分がアンダフローを招き、システムとして十分な演算精度が得られなくなるという問題がある。
In the conventional block floating process described above, the maximum data in the block data is extracted, the normalized shift number is calculated, and each block data is shifted by the shift number. Since this is based on the maximum data of the block data, the calculation error in the linear system may increase depending on the type of block data as follows.
1) When data having a large amplitude of only one piece of block data such as an impulse signal is input, the amplitude of most of the normalized data remains small. As a result, there is a problem that a calculation error in the linear system becomes large. Further, depending on the case, there is a problem that most of the block data causes underflow, and sufficient calculation accuracy cannot be obtained as a system.

図9は従来システムの課題の説明図である。(イ)はブロックデータを示している。ブロックデータの最初の部分にブロックデータの最大データがあり、残りの部分は振幅の小さいデータである。最大データが大きいため、正規化シフト数sftは0となる。この結果、(ロ)に示すように、(a)の線形システムで演算誤差が小さくなる部分と、(b)の線形システムで演算誤差が大きくなる部分に分かれ、ブロックデータに対して、(a)<(b)のため、線形システムにおいて、(b)の演算誤差の影響が大きくなる。
2)ブロックデータの分散が小さい(データがある振幅に偏っている)データが入力された場合、正規化されたデータの大部分の振幅が大きくなる。これにより、積和処理を繰り返すような線形システムの場合、演算結果にオーバフローが発生し、演算誤差が大きくなるという問題がある。
FIG. 9 is an explanatory diagram of the problem of the conventional system. (A) indicates block data. The maximum data of the block data is in the first part of the block data, and the remaining part is data having a small amplitude. Since the maximum data is large, the normalized shift number sft is zero. As a result, as shown in (b), it is divided into a part where the calculation error is small in the linear system of (a) and a part where the calculation error is large in the linear system of (b). ) <(B), the influence of the calculation error of (b) becomes large in the linear system.
2) When data with small dispersion of block data (data biased to a certain amplitude) is input, the amplitude of most of the normalized data is increased. As a result, in the case of a linear system in which product-sum processing is repeated, there is a problem in that an overflow occurs in the calculation result, resulting in a large calculation error.

図10は従来システムの他の課題の説明図である。ブロックデータ入力は(イ)に示すようにブロックデータの最大のデータ付近に分布が集中している。この結果、最大データから正規化シフト数sft=3を算出する。この結果、正規化処理後のブロックデータは(ロ)に示すようにブロックデータの全データが最大レベル付近まで持ち上げられ、積和処理を繰り返すようなシステムの場合、演算結果にオーバフローが発生する可能性が高くなるという問題がある。   FIG. 10 is an explanatory diagram of another problem of the conventional system. As shown in (a), the distribution of block data is concentrated near the largest block data. As a result, the normalized shift number sft = 3 is calculated from the maximum data. As a result, the block data after normalization processing may be overflowed in the calculation result in the case of a system in which all of the block data is lifted to the vicinity of the maximum level as shown in (b) and the product-sum processing is repeated. There is a problem that the property becomes high.

本発明はこのような課題に鑑みてなされたものであって、インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合、又はブロックデータの分散が小さいデータが入力された場合の何れの場合にも、線形システムにおける演算誤差を抑えることができ、オーバフロー発生を抑えることができるブロックフローティング方法及び装置を提供することを目的としている。   The present invention has been made in view of such problems, and when data having a large amplitude of only one data in block data such as an impulse signal is input, or data having a small dispersion of block data is input. It is an object of the present invention to provide a block floating method and apparatus that can suppress an operation error in a linear system and suppress occurrence of overflow in any case.

本発明のポイントは、ブロックデータの平均パワー(以下、平均ブロックパワー)と目標パワーの差分により、正規化シフト数を算出することにある。従来のブロックフローティング処理は、ブロックデータの最大データの演算誤差を最小に抑えるのに対して、本発明のブロックフローティング処理は、ブロックデータの平均的なデータの演算誤差を最小に抑える方式である。特に、インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合における線形システムの演算誤差を小さくすることである。   The point of the present invention is to calculate the normalized shift number based on the difference between the average power of block data (hereinafter referred to as average block power) and the target power. While the conventional block floating process minimizes the calculation error of the maximum data of the block data, the block floating process of the present invention is a method of minimizing the average data calculation error of the block data. In particular, the operation error of the linear system is reduced when data having a large amplitude of only one data in the block data such as an impulse signal is input.

本発明の原理について説明する。先ず、M個のブロックデータをinput(m)とした時、平均ブロックパワーave_powerは次式で表わされる。   The principle of the present invention will be described. First, when M block data are input (m), the average block power ave_power is expressed by the following equation.

また、M個のブロックデータを正規化システム数sftで正規化したデータinput_bf(m)とその平均ブロックパワーave_bfは次式で表わされる。
input_bf(m)=input(m)・2sft (m=0,1,…M−1)(2)
Further, data input_bf (m) obtained by normalizing M block data with the normalized system number sft and its average block power ave_bf are expressed by the following equations.
input_bf (m) = input (m) · 2 sft (m = 0, 1,... M−1) (2)

ここで、線形システムに入力される理想的な平均ブロックパワー(線形システム内で演算のオーバフローが発生しない平均ブロックパワーを)をtar_powerとする。M個のブロックデータを正規化シフト数sftで正規化したデータinput_bf(m)の平均ブロックパワーave_power_bfをtar_powerに近づけるための正規化シフト数sftは、(1)〜(3)式より算出することができる。   Here, an ideal average block power input to the linear system (an average block power at which no computation overflow occurs in the linear system) is defined as tar_power. The normalized shift number sft for making the average block power ave_power_bf of the data input_bf (m) obtained by normalizing M block data with the normalized shift number sft closer to tar_power is calculated from the equations (1) to (3). Can do.

tar_power=ave_power+10・log10(2sft・2)
sft=(tar_power−ave_power)/20・log10(2)(4)
本発明は、(4)式により入力の平均ブロックパワーave_powerと目標パワーtar_powerから理想的な平均ブロックパワーとなる正規化シフト数sftを算出することである。この結果、線形システムにおける演算誤差を少なくすることが可能となる。ただし、tar_powerは線形システム内の演算でオーバフローが発生しないブロックデータのパワーの上限であり、線形システムのアルゴリズムによって異なる。以下に各請求項についてその構成を示す。
(1)請求項1記載の発明は、固定小数点表現の2進データを乗算する際に、2進データをブロック単位で正規化を行なうブロックフローティング方法において、ブロックデータの平均パワーと目標パワーの差分から正規化シフト数を算出することを特徴とする。
(2)請求項2記載の発明は、固定小数点表現の2進データを乗算する際に、2進データをブロック単位で正規化を行なうブロックフローティング方法において、ブロックデータの平均パワーと目標パワーの差分から正規化シフト数を算出し、正規化シフト数が負の場合はブロックデータの正規化処理で右シフトし、平均パワーを下げることを特徴とする。
(3)請求項3記載の発明は、入力データを受けて平均ブロックパワーを算出する平均ブロックパワー算出処理部と、該平均ブロックパワー算出処理部の出力を受けて、平均ブロックパワーと目標パワーから正規化シフト数だけブロックデータを左シフトしデータの正規化処理を行なう正規化シフト数算出処理部と、入力データと正規化シフト数算出処理部の出力を受けて正規化シフト数だけブロックデータを左シフトしデータの正規化を行なうブロックデータ正規化処理部と、該ブロックデータ正規化処理部の出力を受けて、正規化されたデータを入力し、所定の演算を実施する線形システムと、該線形システムの出力と前記正規化シフト数算出処理部の出力を受けて前記正規化シフト数だけ線形システムの出力データを右シフトして本来の結果へ戻す処理を行なう後処理部とを具備して構成される。
tar_power = ave_power + 10 · log 10 (2 sft · 2)
sft = (tar_power-ave_power) / 20 · log 10 (2) (4)
The present invention is to calculate a normalized shift number sft that is an ideal average block power from the input average block power ave_power and the target power tar_power by the equation (4). As a result, it is possible to reduce calculation errors in the linear system. However, tar_power is the upper limit of the power of block data in which overflow does not occur in operations in the linear system, and differs depending on the algorithm of the linear system. The structure of each claim is shown below.
(1) According to the first aspect of the present invention, in the block floating method in which binary data is normalized in units of blocks when multiplying binary data of fixed-point representation, the difference between the average power of the block data and the target power The number of normalized shifts is calculated from the above.
(2) The invention according to claim 2 is a block floating method in which binary data is normalized in units of blocks when multiplying binary data of fixed-point representation, and the difference between the average power of the block data and the target power From this, the normalization shift number is calculated, and when the normalization shift number is negative, the right shift is performed in the block data normalization process to reduce the average power.
(3) The invention described in claim 3 is based on an average block power calculation processing unit that receives input data and calculates an average block power, receives an output of the average block power calculation processing unit, and calculates an average block power and a target power. A normalization shift number calculation processing unit that shifts the block data to the left by the normalization shift number and performs normalization processing of the data, and receives the output of the input data and the normalization shift number calculation processing unit to output the block data by the normalization shift number A block data normalization processing unit that shifts the data to the left and normalizes the data, a linear system that receives the output of the block data normalization processing unit, inputs the normalized data, and performs a predetermined operation; and In response to the output of the linear system and the output of the normalized shift number calculation processing unit, the output data of the linear system is shifted right by the normalized shift number. Constituted by and a post-processing unit which performs processing of returning the results.

(1)請求項1記載の発明によれば、ブロックデータの平均パワーと目標パワーの差分から正規化シフト数を算出するようにしているので、適正なシフト演算を行なうことができ、演算誤差の発生を抑制することができる。
(2)請求項2記載の発明によれば、正規化シフト数が負の場合には、ブロックデータの正規化処理で右シフトすることにより、適正なシフト演算を行なうことができ、演算誤差の発生を抑制することができる。
(3)請求項3記載の発明によれば、左シフトして乗算を行なった後、正規化シフト数だけ線形システムの出力データを右シフトすることにより、インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合、又はブロックデータの分散が小さいデータが入力された場合の何れの場合にも、線形システムにおける演算誤差を抑えることができ、オーバフロー発生を抑えることができる。
(1) According to the invention described in claim 1, since the normalized shift number is calculated from the difference between the average power of the block data and the target power, an appropriate shift operation can be performed, and the calculation error can be reduced. Occurrence can be suppressed.
(2) According to the second aspect of the present invention, when the normalized shift number is negative, an appropriate shift operation can be performed by performing a right shift in the block data normalization process, and an operation error is reduced. Occurrence can be suppressed.
(3) According to the third aspect of the present invention, after shifting to the left and performing multiplication, the output data of the linear system is shifted to the right by the normalized shift number, so that 1 in block data such as an impulse signal In either case, when only data with large amplitude is input or when data with small variance of block data is input, calculation errors in the linear system can be suppressed, and overflow can be suppressed. it can.

以下、図面を参照して本発明の実施の形態例を詳細に説明する。
図1は本発明の一実施の形態例を示すブロック図である。図8と同一のものは、同一の符号を付して示す。501は入力データを受けて平均ブロックパワーを算出する平均ブロックパワー算出処理部、301は該平均ブロックパワー算出処理部501の出力を受けて、平均ブロックパワーと目標パワーから正規化シフト数だけブロックデータを左シフトしデータの正規化処理を行なう正規化シフト数算出処理部、302は入力データと正規化シフト数算出処理部の出力を受けて正規化シフト数だけブロックデータを左シフトしデータの正規化を行なうブロックデータ正規化処理部、303は該ブロックデータ正規化処理部302の出力を受けて、正規化されたデータを入力し、所定の演算を実施する線形システム、304は該線形システム303と正規化シフト数算出処理部301の出力を受けて前記正規化シフト数だけ線形システムの出力データを右シフトして本来の結果へ戻す処理を行なう後処理部である。このように構成された装置の動作を説明すれば、以下の通りである。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing an embodiment of the present invention. The same components as those in FIG. 8 are denoted by the same reference numerals. 501 is an average block power calculation processing unit that receives input data and calculates average block power, and 301 receives the output of the average block power calculation processing unit 501, and receives block data corresponding to the number of normalized shifts from the average block power and target power. The normalization shift number calculation processing unit 302 shifts data to the left and performs data normalization processing. 302 receives the output of the input data and the normalization shift number calculation processing unit, shifts the block data to the left by the normalization shift number, and normalizes the data. The block data normalization processing unit 303 that performs normalization receives the output of the block data normalization processing unit 302, inputs the normalized data, and performs a predetermined operation, 304 is the linear system 303 And the output of the normalized shift number calculation processing unit 301, and the output data of the linear system by the normalized shift number A post-processing unit which performs processing of returning to the original results by right shift. The operation of the apparatus configured as described above will be described as follows.

図2,図3は本発明の動作の一例を示すフローチャートである。本発明は、ブロックパワー算出処理と、正規化シフト数算出処理と、ブロックデータ正規化処理と、線形システム処理と、後処理から構成されている。
〈ブロックパワー算出処理〉
平均ブロックパワー算出処理部501は、M個のブロックデータinput(m)を入力する(S1)。次に、平均ブロックパワー(ave_power)を計算し、(1)式を算出する(S2)。次に、平均ブロックパワー(ave_power)を出力する(S3)。
〈正規化シフト数算出処理〉
正規化シフト数算出処理部301は以下の動作を行なう。先ず、正規化シフト数sftをクリアする(S4)。続いて、平均ブロックパワー(ave_power)を入力し(S5)、予め設定しておいた目標パワー(tar_power)を入力する(S6)。予め設定しておいた目標パワー(tar_power)を入力する(S5)。次に、平均ブロックパワー(ave_power)と目標パワー(tar_power)の大小比較により正規化シフト数の算出を行なう。
2 and 3 are flowcharts showing an example of the operation of the present invention. The present invention includes a block power calculation process, a normalized shift number calculation process, a block data normalization process, a linear system process, and a post-process.
<Block power calculation processing>
The average block power calculation processing unit 501 inputs M pieces of block data input (m) (S1). Next, the average block power (ave_power) is calculated, and the formula (1) is calculated (S2). Next, the average block power (ave_power) is output (S3).
<Normalization shift number calculation process>
The normalized shift number calculation processing unit 301 performs the following operation. First, the normalized shift number sft is cleared (S4). Subsequently, an average block power (ave_power) is input (S5), and a preset target power (tar_power) is input (S6). A preset target power (tar_power) is input (S5). Next, the normalized shift number is calculated by comparing the average block power (ave_power) with the target power (tar_power).

先ず、目標パワー(tar_power)から10・log(2)(パワーの1.5倍に相当)を減算した値(tar_power−10・log(2))と、平均ブロックパワー(ave_power)を比較する(S7)。ここで、平均ブロックパワー(ave_power)が大きい場合には、正規化シフト数sftの値に整数値“1”を加算(インクリメント)し(S8)、平均ブロックパワー(ave_power)に20・log(2)(パワーの2倍に相当)を加算する(S9)。この処理をtar_power−10・log(2)より平均ブロックパワー(ave_power)が大きくなるまで実施し、正規化シフト数sftを算出する。   First, a value (tar_power-10 · log (2)) obtained by subtracting 10 · log (2) (corresponding to 1.5 times the power) from the target power (tar_power) is compared with the average block power (ave_power) ( S7). Here, when the average block power (ave_power) is large, an integer value “1” is added to the value of the normalized shift number sft (increment) (S8), and the average block power (ave_power) is 20 · log (2 ) (Equivalent to twice the power) is added (S9). This process is performed until the average block power (ave_power) becomes larger than tar_power-10 · log (2), and the normalized shift number sft is calculated.

次に、目標パワー(tar_power)に10・log(2)(パワーの1.5倍に相当)を加算した値(tar_power−10・log(2))と平均ブロックパワー(ave_power)とを比較する(S10)。ここで、平均ブロックパワー(ave_power)が小さい場合には、正規化シフト数sftの値に整数値“1”を減算(デクレメント)し(S11)、平均ブロックパワー(ave_power)から20・log(2)(パワーの2倍に相当)を減算する(S12)。この処理をtar_power+10・log(2)より平均ブロックパワー(ave_power)が小さくなるまで実施し、正規化シフト数sftを算出する。   Next, a value (tar_power-10 · log (2)) obtained by adding 10 · log (2) (corresponding to 1.5 times the power) to the target power (tar_power) is compared with the average block power (ave_power). (S10). Here, when the average block power (ave_power) is small, the integer value “1” is subtracted (decrement) from the value of the normalized shift number sft (S11), and 20 · log (from the average block power (ave_power)) 2) (equivalent to twice the power) is subtracted (S12). This process is performed until the average block power (ave_power) becomes smaller than tar_power + 10 · log (2), and the normalized shift number sft is calculated.

ここで、大小比較を行なう際に、tar_powerに±10・log(2)を加算しているのは、目標パワー(tar_power)に対して±10・log(2)の範囲内に収まるような正規化シフト数を算出するためである。これにより、目標パワーとの誤差を比較することが可能となる。最後に正規化シフト数sftを出力する(S13)。
〈ブロックデータ正規化処理〉
ブロックデータ正規化処理部302は、入力データと正規化シフト数算出処理部301からのシフト数sftを受けて、以下のような処理を行なう。先ず、ブロックデータinput(m)を入力し(S14)、正規化シフト数sftの入力を行なう(S15)。次に、正規化シフト数sftの符号判定を行なう。即ち、sftが正か負かを判定する(S16)。
Here, when comparing the magnitude, ± 10 · log (2) is added to tar_power so that the target power (tar_power) is within a range of ± 10 · log (2). This is for calculating the shift number. This makes it possible to compare the error with the target power. Finally, the normalized shift number sft is output (S13).
<Block data normalization processing>
The block data normalization processing unit 302 receives the input data and the shift number sft from the normalized shift number calculation processing unit 301, and performs the following processing. First, block data input (m) is input (S14), and the normalized shift number sft is input (S15). Next, the sign determination of the normalized shift number sft is performed. That is, it is determined whether sft is positive or negative (S16).

sftが正の値であれば、ブロックデータを正規化シフト数sftだけ算術左sftする(S17)。ここで、算術左シフトによりオーバフローが発生するかどうかチェックし(S18)、オーバフローが発生した場合には、ブロックデータの値を最大値にクリップ処理(ブロックデータが正の値の時は正の最大値に設定し、ブロックデータが負の値の時は負の最大値に設定する)する(S19)。   If sft is a positive value, the block data is arithmetically left sft by the normalized shift number sft (S17). Here, it is checked whether or not an overflow occurs due to an arithmetic left shift (S18). If an overflow occurs, the value of the block data is clipped to the maximum value (when the block data is a positive value, the positive maximum If the block data is a negative value, it is set to the maximum negative value) (S19).

逆に正規化シフト数sftが負の値であれば、その絶対値をとり(S20)、ブロックデータを正規化シフト数sftだけ算術右シフトする(S21)。ここで、正規化シフト数sftが負の場合に右シフトするのは、線形システム内の演算でオーバフローを防止し、信号の歪みを軽減するためである。最後に正規化したブロックデータinput_bf(m)を出力する(S22)。
〈線形システム処理〉
線形システム303は以下の処理を行なう。演算誤差を最小にしたい線形システムには、上記ブロックデータ正規化処理で生成した正規化ブロックデータinput_bf(m)を入力して(S23)処理を行なう(S24)。入力データは、本来の値input(m)に対して、2sft倍されているため、線形システム303からの出力データoutput_bf(n)も2sft倍されたデータとなる(S25)。以下、output_bf(n)を正規化された線形システムデータとよぶ。
〈後処理〉
後処理部304は、線形システム303の出力データと正規化シフト数算出処理部301からのシフトデータsftを受けて、以下のような処理を行なう。
Conversely, if the normalized shift number sft is a negative value, the absolute value is taken (S20), and the block data is arithmetically shifted to the right by the normalized shift number sft (S21). Here, the reason why the right shift is performed when the normalized shift number sft is negative is to prevent the overflow in the operation in the linear system and reduce the distortion of the signal. Finally, the normalized block data input_bf (m) is output (S22).
<Linear system processing>
The linear system 303 performs the following processing. To the linear system that wants to minimize the calculation error, the normalized block data input_bf (m) generated by the block data normalization process is input (S23) and the process is performed (S24). Since the input data is multiplied by 2 sft with respect to the original value input (m), the output data output_bf (n) from the linear system 303 is also data multiplied by 2 sft (S25). Hereinafter, output_bf (n) is referred to as normalized linear system data.
<Post-processing>
The post-processing unit 304 receives the output data of the linear system 303 and the shift data sft from the normalized shift number calculation processing unit 301, and performs the following processing.

後処理部304は、ブロックデータ正規化処理部302でブロックデータinput(m)を2sft倍した処理の逆の処理(1/2sft)をすることで、線形システムから出力される本来のスケールに戻す。 The post-processing unit 304 performs an inverse process (1/2 sft ) of the process of multiplying the block data input (m) by 2 sft in the block data normalization processing unit 302, so that the original scale output from the linear system is obtained. Return to.

先ず、線形システムデータoutput_bf(n)と正規化シフト数sftを入力し(S26,S27)、正規化シフト数sftの符号判定を行なう(S28)。正規化シフト数sftが正の値であれば、線形システムデータを正規化シフト数sftだけ算術右シフトし(S29)、逆に正規化シフト数sftが負の値であれば、正規化シフト数sftの絶対値をとり(S30)、線形システムデータを正規化数sftだけ算術左シフトする(S31)。ここで、算術左シフトによりオーバフローが発生する場合には、ブロックデータの値を最大値にクリップ処理(ブロックデータが正の値の時は正の最大値に設定し、ブロックデータが負の値の時は負の最大値に設定)させる。最後に、線形システムデータoutput(n)を出力する(S32)。   First, the linear system data output_bf (n) and the normalized shift number sft are input (S26, S27), and the sign of the normalized shift number sft is determined (S28). If the normalized shift number sft is a positive value, the linear system data is arithmetically shifted to the right by the normalized shift number sft (S29). Conversely, if the normalized shift number sft is a negative value, the normalized shift number The absolute value of sft is taken (S30), and the linear system data is arithmetically shifted to the left by the normalized number sft (S31). Here, when overflow occurs due to arithmetic left shift, the block data value is clipped to the maximum value (when the block data is a positive value, it is set to the maximum positive value, and the block data is a negative value) (Set the time to the negative maximum). Finally, linear system data output (n) is output (S32).

本発明により以下の効果を得ることができる。
1)効果1
正規化シフト数が負の場合には、ブロックデータの正規化処理で右シフトすることにより、適正なシフト演算を行なうことができ、演算誤差の発生を抑制することができる。
また、左シフトして乗算を行なった後、正規化シフト数だけ線形システムの出力データを右シフトすることにより、インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合、又はブロックデータの分散が小さいデータが入力された場合の何れの場合にも、線形システムにおける演算誤差を抑えることができ、オーバフロー発生を抑えることができる。
2)効果2
インパルス信号のようなブロックデータ中の1データのみの振幅が大きいデータが入力された場合において、大きな割合を占める低レベル信号を大きく保つことができるため、線形システムにおける演算誤差を抑えることが可能となる。図4は本発明の第1の効果の一例を示す説明図である。図において、(イ)はブロックデータを示す。データの最初の部分にブロックデータの最大データが含まれていることが分かる。
The following effects can be obtained by the present invention.
1) Effect 1
When the normalized shift number is negative, an appropriate shift operation can be performed by suppressing the right shift in the block data normalization process, and the occurrence of an operation error can be suppressed.
In addition, after shifting to the left and multiplying, the output data of the linear system is shifted to the right by the number of normalized shifts, so that data having a large amplitude of only one data in the block data such as an impulse signal is input. In this case, the calculation error in the linear system can be suppressed and the occurrence of overflow can be suppressed in any case where the data with small variance of the block data is input.
2) Effect 2
When data with a large amplitude of only one piece of block data such as an impulse signal is input, a low level signal occupying a large proportion can be kept large, so that calculation errors in a linear system can be suppressed. Become. FIG. 4 is an explanatory diagram showing an example of the first effect of the present invention. In the figure, (a) indicates block data. It can be seen that the maximum data of the block data is included in the first part of the data.

この場合、目標パワー>平均ブロックパワーにより、正規化シフト数はsft=3となる。正規化処理後のブロックデータ{input_bf(m)}は、(ロ)に示すようなものとなる。正規化処理後のブロックデータで、ピーク値を除くその他の部分で振幅が大きくなり、線形システムで演算誤差が小さくなっていることが分かる。ブロックデータに対して、(a)>(b)のため、線形システムにおいて、(b)の演算誤差の影響は小さくなる。
3)効果3
ブロックデータの分散が小さい(データがある振幅に偏っている)データが入力された場合において、ブロックデータの信号レベルを低くすることができるため、線形システムでのオーバフロー発生を抑えることが可能となる。図5は本発明の第2の効果の一例を示す説明図である。図において、(a)はブロックデータを示し、ピークがないものである。この場合、目標パワーと平均ブロックパワーから、正規化シフト数sft=2を算出する。この結果、正規化後のブロックデータinput_bf(m)は、ブロックデータが最大レベル付近まで持ち上がらず、(b)に示すようにオーバフローの発生が抑えられる。
In this case, the normalized shift number is sft = 3 because target power> average block power. The block data {input_bf (m)} after the normalization process is as shown in (b). It can be seen that in the block data after normalization processing, the amplitude is increased in other portions except the peak value, and the calculation error is reduced in the linear system. Since (a)> (b) with respect to the block data, the influence of the calculation error of (b) is reduced in the linear system.
3) Effect 3
When data with a small distribution of block data (data biased to a certain amplitude) is input, the signal level of the block data can be lowered, so that the occurrence of overflow in the linear system can be suppressed. . FIG. 5 is an explanatory diagram showing an example of the second effect of the present invention. In the figure, (a) shows block data and has no peak. In this case, the normalized shift number sft = 2 is calculated from the target power and the average block power. As a result, the normalized block data input_bf (m) is not lifted to near the maximum level, and the occurrence of overflow is suppressed as shown in (b).

積和処理を繰り返すような線形システムの場合、線形システムでのオーバフロー発生を抑えることが可能となる。
4)効果4
本発明を例えば音声システム等に適用する場合、従来のブロックフローティングを用いた音声システムに比べて、システム内の演算精度を向上させることができ、高品質なシステムを構築することが可能となる。
5)効果5
本発明をDSP等のプロセッサで実現する場合、従来のブロックフローティングで必要であった最大値検索処理が不要となるため、処理負荷を軽減することができる。
In the case of a linear system that repeats product-sum processing, it is possible to suppress the occurrence of overflow in the linear system.
4) Effect 4
When the present invention is applied to, for example, an audio system or the like, the calculation accuracy in the system can be improved compared to an audio system using a conventional block floating, and a high-quality system can be constructed.
5) Effect 5
When the present invention is realized by a processor such as a DSP, the maximum value search process required in the conventional block floating is not required, and the processing load can be reduced.

本発明の一実施の形態例を示すブロック図である。It is a block diagram which shows one embodiment of this invention. 本発明の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of this invention. 本発明の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of this invention. 本発明の第1の効果の一例を示す説明図である。It is explanatory drawing which shows an example of the 1st effect of this invention. 本発明の第2の効果の一例を示す図である。It is a figure which shows an example of the 2nd effect of this invention. 固定小数点型のデータ形式を示す図である。It is a figure which shows the data format of a fixed point type. 固定小数点型の演算の様子を示す図である。It is a figure which shows the mode of a fixed point type | mold calculation. ブロックフローティングを適用した構成例を示す図である。It is a figure which shows the structural example to which block floating is applied. 従来システムの課題の説明図である。It is explanatory drawing of the subject of a conventional system. 従来システムの他の課題の説明図である。It is explanatory drawing of the other subject of the conventional system.

符号の説明Explanation of symbols

301 正規化シフト数算出処理部
302 ブロックデータ正規化処理部
303 線形システム
304 後処理部
501 平均ブロックパワー算出処理部
301 Normalized Shift Number Calculation Processing Unit 302 Block Data Normalization Processing Unit 303 Linear System 304 Post-Processing Unit 501 Average Block Power Calculation Processing Unit

Claims (3)

固定小数点表現の2進データを乗算する際に、2進データをブロック単位で正規化を行なうブロックフローティング方法において、
ブロックデータの平均パワーと目標パワーの差分から正規化シフト数を算出することを特徴とするブロックフローティング方法。
In the block floating method of normalizing binary data in units of blocks when multiplying binary data of a fixed-point expression,
A block floating method characterized in that a normalized shift number is calculated from a difference between an average power of block data and a target power.
固定小数点表現の2進データを乗算する際に、2進データをブロック単位で正規化を行なうブロックフローティング方法において、
ブロックデータの平均パワーと目標パワーの差分から正規化シフト数を算出し、
正規化シフト数が負の場合はブロックデータの正規化処理で右シフトし、
平均パワーを下げることを特徴とするブロックフローティング方法。
In the block floating method of normalizing binary data in units of blocks when multiplying binary data of a fixed-point expression,
Calculate the normalized shift number from the difference between the average power of the block data and the target power,
If the normalized shift number is negative, the block data is normalized to shift right,
Block floating method characterized by lowering average power.
入力データを受けて平均ブロックパワーを算出する平均ブロックパワー算出処理部と、
該平均ブロックパワー算出処理部の出力を受けて、平均ブロックパワーと目標パワーから正規化シフト数だけブロックデータを左シフトしデータの正規化処理を行なう正規化シフト数算出処理部と、
入力データと正規化シフト数算出処理部の出力を受けて正規化シフト数だけブロックデータを左シフトしデータの正規化を行なうブロックデータ正規化処理部と、
該ブロックデータ正規化処理部の出力を受けて、正規化されたデータを入力し、所定の演算を実施する線形システムと、
該線形システムの出力と前記正規化シフト数算出処理部の出力を受けて前記正規化シフト数だけ線形システムの出力データを右シフトして本来の結果へ戻す処理を行なう後処理部と、
を具備して構成されるブロックフローティング装置。
An average block power calculation processing unit that receives input data and calculates an average block power;
A normalization shift number calculation processing unit that receives the output of the average block power calculation processing unit, shifts the block data to the left by the normalization shift number from the average block power and the target power, and normalizes the data;
A block data normalization processing unit that receives the input data and the output of the normalization shift number calculation processing unit, and shifts the block data to the left by the normalization shift number to normalize the data;
A linear system that receives the output of the block data normalization processing unit, inputs the normalized data, and performs a predetermined operation;
A post-processing unit that receives the output of the linear system and the output of the normalized shift number calculation processing unit, and performs a process of right-shifting the output data of the linear system by the normalized shift number and returning to the original result;
A block floating device comprising:
JP2005198459A 2005-07-07 2005-07-07 Block floating method and device Withdrawn JP2007018212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005198459A JP2007018212A (en) 2005-07-07 2005-07-07 Block floating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005198459A JP2007018212A (en) 2005-07-07 2005-07-07 Block floating method and device

Publications (1)

Publication Number Publication Date
JP2007018212A true JP2007018212A (en) 2007-01-25

Family

ID=37755340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005198459A Withdrawn JP2007018212A (en) 2005-07-07 2005-07-07 Block floating method and device

Country Status (1)

Country Link
JP (1) JP2007018212A (en)

Similar Documents

Publication Publication Date Title
US7593851B2 (en) Precision piecewise polynomial approximation for Ephraim-Malah filter
US7451172B2 (en) Handling denormal floating point operands when result must be normalized
JP4500358B2 (en) Arithmetic processing apparatus and arithmetic processing method
JP6415236B2 (en) Apparatus and system including floating point addition unit, and floating point addition method
US8751555B2 (en) Rounding unit for decimal floating-point division
US20030236651A1 (en) Floating point number storage method and floating point arithmetic device
JP3313560B2 (en) Floating point processor
JP4274633B2 (en) Power arithmetic unit
Ahmed et al. An improved logarithmic multiplier for media processing
US5835389A (en) Calculating the absolute difference of two integer numbers in a single instruction cycle
US9400635B1 (en) Methods and apparatus for performing dynamic data alignment for floating-point operations
JP5966764B2 (en) Multiplier and multiplication method
JP2007163318A (en) Apparatus for processing radar signal and method for detecting its constant false alarm probability
JP4279626B2 (en) Remainder calculation system, scaling calculator, scaling calculation method, program thereof and recording medium
Tsen et al. A combined decimal and binary floating-point multiplier
JP2007018212A (en) Block floating method and device
JPH11212768A (en) Logarithmic value calculation circuit
JP2010102431A (en) Floating decimal point arithmetic circuit, floating decimal point arithmetic method, and servo-controlled system
US20140372493A1 (en) System and method for accelerating evaluation of functions
US8041927B2 (en) Processor apparatus and method of processing multiple data by single instructions
JP3064405B2 (en) Complex number processing
US20120084335A1 (en) Method and apparatus of processing floating point number
KR101084581B1 (en) Method and Apparatus for Operating of Fixed-point Exponential Function, and Recording Medium thereof
JPH09138792A (en) Method and circuit for calculation of approximate value of logarithm
JP3336201B2 (en) Adaptive predictor selection circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081007