JP3499481B2 - Data multiplier - Google Patents

Data multiplier

Info

Publication number
JP3499481B2
JP3499481B2 JP34560999A JP34560999A JP3499481B2 JP 3499481 B2 JP3499481 B2 JP 3499481B2 JP 34560999 A JP34560999 A JP 34560999A JP 34560999 A JP34560999 A JP 34560999A JP 3499481 B2 JP3499481 B2 JP 3499481B2
Authority
JP
Japan
Prior art keywords
data
bits
output
multiplier
multiplication
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
JP34560999A
Other languages
Japanese (ja)
Other versions
JP2001166919A (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.)
Kenwood KK
Original Assignee
Kenwood KK
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 Kenwood KK filed Critical Kenwood KK
Priority to JP34560999A priority Critical patent/JP3499481B2/en
Publication of JP2001166919A publication Critical patent/JP2001166919A/en
Application granted granted Critical
Publication of JP3499481B2 publication Critical patent/JP3499481B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は信号発生装置に利用
することができるデータ乗算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data multiplication device that can be used in a signal generator.

【0002】[0002]

【従来の技術】従来から、例えば正弦波信号をデジタル
変換した波形データが格納された波形データROMから
波形データを読み出し、読み出した波形データに所定の
倍率を乗数として乗算し、予め定めたビット数の乗算出
力を得て、乗算出力をデジタル増幅器に供給して、デジ
タル増幅器の試験を行うための信号発生器がある。
2. Description of the Related Art Conventionally, for example, waveform data is read from a waveform data ROM in which waveform data obtained by digitally converting a sine wave signal is stored, the read waveform data is multiplied by a predetermined multiplication factor, and a predetermined number of bits is set. There is a signal generator for testing the digital amplifier by obtaining the multiplied output of the digital amplifier and supplying the multiplied output to the digital amplifier.

【0003】所定の乗数を乗算するこの種の従来のデー
タ乗算装置は、図4に示すように、例えば正弦波信号を
16ビットのデジタルデータに変換した波形データが格
納された波形データROM1から、波形データが読み出
される。この読み出された波形データと波形データのレ
ベルを設定するための乗数データの設定器であるレベル
設定器62から出力される16ビットの乗数値との両者
を乗算器63にて乗算し、乗算結果の上位側から16ビ
ットを取り出し、それ以下のビットを切り捨てることに
よって乗算が行われている。各データは2の補数による
符号付き2進数表示である。
As shown in FIG. 4, a conventional data multiplication device of this type for multiplying a predetermined multiplier, for example, from a waveform data ROM 1 in which waveform data obtained by converting a sine wave signal into 16-bit digital data is stored, Waveform data is read. A multiplier 63 multiplies both the read-out waveform data and the 16-bit multiplier value output from the level setting unit 62, which is a multiplier data setting unit for setting the level of the waveform data, and performs multiplication. The multiplication is performed by extracting 16 bits from the high-order side of the result and truncating the lower bits. Each data is a binary number with a sign in 2's complement.

【0004】ここで、例えば−96dBの入力において
もデジタル増幅器が正常に作用するかを試験したい場合
がある。このような場合に乗算装置によって、例えば、
8000(H)の波形データ(0dBの正弦波の負側最
大値)に0001(H)すなわち−96dBの乗数を乗
算する。このときにおける乗算結果は00008000
(H)の32ビットとなり、上位側16ビットが取られ
て、0000(H)が乗算出力値として送出される。こ
こで(H)は16進数であることを示す(以下、同
様)。
Here, there is a case where it is desired to test whether the digital amplifier works properly even at an input of, for example, -96 dB. In such a case, by the multiplication device, for example,
The waveform data of 8000 (H) (the maximum value of the negative side of the 0 dB sine wave) is multiplied by 0001 (H), that is, a multiplier of -96 dB. The multiplication result at this time is 00008000
It becomes 32 bits of (H), the upper 16 bits are taken, and 0000 (H) is sent as a multiplication output value. Here, (H) indicates a hexadecimal number (the same applies hereinafter).

【0005】しかるに、この計算結果には1/2ビット
の誤差を生じ、本来0.5(10進数)は四捨五入で1
でなければならないのに、0になってしまっている。し
たがって、出力波形信号レベルが−96dBの場合、す
なわち−96dBの入力でデジタル増幅器を試験したい
場合に、波形信号の最大値は0になってしまって、不都
合である。
However, an error of 1/2 bit occurs in this calculation result, and 0.5 (decimal number) is originally rounded to 1
It should be 0, but it has become 0. Therefore, when the output waveform signal level is -96 dB, that is, when it is desired to test the digital amplifier with an input of -96 dB, the maximum value of the waveform signal becomes 0, which is inconvenient.

【0006】ここで、上記において乗数が0001
(H)となるのは次の演算による。8000(H)を0
dBとして計算すると、乗数−96dBは、 10(−96/20)×8000(H)=10(−96/20)×32768 =0.000015849×32768 =0.519337801 …(1) であって、四捨五入すると1となり、上記の乗数は00
01(H)となる。
In the above, the multiplier is 0001.
(H) is obtained by the following calculation. 8000 (H) is 0
When calculated as dB, the multiplier −96 dB is 10 (−96/20) × 8000 (H) = 10 (−96/20) × 32768 = 0.000015849 × 32768 = 0.5193337801 (1), Rounding it to 1 gives the above multiplier of 00
It becomes 01 (H).

【0007】7FFF(H)(0dBの正弦波の正側最
大値)に0001(H)すなわち−96dBの乗数を乗
算する例の場合は、 7FFF(H)×0001(H)=00007FFF
(H) となり、乗算結果のMSB側16ビットを取ると000
0(H)になる。
In the case of an example in which 7FFF (H) (maximum positive value of 0 dB sine wave) is multiplied by 0001 (H), that is, a multiplier of -96 dB, 7FFF (H) × 0001 (H) = 00007FFF
(H), and taking the 16 bits on the MSB side of the multiplication result, 000
It becomes 0 (H).

【0008】ここで、上記において乗数が0001
(H)になるのは次の演算による。7FFF(H)を0
dBとして計算すると、乗数−96dBは 7FFF(H)×10(−96/20)=32767×
10(−96/20) =32767×0.000015
849=0.519321952 であって、四捨五入すると1となり、この場合も乗数は
0001(H)となる。
In the above, the multiplier is 0001.
It becomes (H) by the following calculation. 0 to 7FFF (H)
When calculated as dB, the multiplier -96 dB is 7FFF (H) x 10(-96/20)= 32767 ×
10(-96/20) = 32767 × 0.000015
849 = 0.5193321952 Then, when rounded off, it becomes 1, and in this case also the multiplier is
It becomes 0001 (H).

【0009】[0009]

【発明が解決しようとする課題】上記したように、従来
のデータ乗算装置によるときは、四捨五入が行われない
ために、演算結果が不都合なものになるという問題点が
あった。
As described above, the conventional data multiplication device has a problem that the calculation result becomes inconvenient because the rounding is not performed.

【0010】本発明は、簡単な構成で四捨五入を行った
乗算結果を得ることができる、信号発生装置に使用する
データ乗算装置を提供することを目的とする。
It is an object of the present invention to provide a data multiplication device used in a signal generation device, which can obtain a rounded multiplication result with a simple structure.

【0011】[0011]

【課題を解決するための手段】本発明にかかる請求項1
記載のデータ乗算装置は、信号発生装置に使用するデー
タ乗算装置であって、アナログ波形をデジタル変換した
2の補数による符号付き2進数表示の波形データが格納
された波形データROMと、サインビットを含み波形デ
ータROMに格納された波形データのビット数よりも少
なくとも1ビット多いビット数の乗数値が設定されるレ
ベル設定器と、波形データROMから読み出された波形
データとレベル設定器に設定された乗数値と乗算する乗
算器と、乗算器による乗算結果のサインビットに基づき
四捨五入をするためのデータが置数された第1および第
2レジスタと、乗算結果のサインビットに基づき第1ま
たは第2レジスタの置数を選択するセレクタとを備え、
セレクタからのデータを出力する加算データ設定回路
と、加算データ設定回路から出力されるデータを加算値
として乗算結果に加算する加算器とを備え、加算出力中
から上位所定ビット数の出力データを送出することを特
徴とする。
[Means for Solving the Problems] Claim 1 according to the present invention
The described data multiplication device is used for a data generator.
And a waveform data ROM in which waveform data of a binary number with a sign by a two's complement obtained by digitally converting an analog waveform is stored, and a number of bits of the waveform data stored in the waveform data ROM including a sign bit. By a multiplier that multiplies the waveform data read from the waveform data ROM by the multiplier value set in the level setter, and a multiplier A first and a second register in which data for rounding based on the sign bit of the multiplication result is placed; and a selector for selecting the number of the first or second register based on the sign bit of the multiplication result,
Equipped with an addition data setting circuit that outputs the data from the selector and an adder that adds the data output from the addition data setting circuit to the multiplication result as an addition value, and outputs the output data of the upper predetermined number of bits from the addition output. It is characterized by doing.

【0012】本発明にかかる請求項1記載のデータ乗算
装置によれば、波形データROMから読み出された波形
データとレベル設定器に設定された乗数値とが乗算器に
よって乗算され、乗算器による乗算結果のサインビット
に基づき第1または第2レジスタの置数がセレクタによ
って選択されて、セレクタから出力される加算値が加算
器において乗算結果に加算されて、加算出力中の上位所
定ビット数の出力データが送出される。この出力には四
捨五入のための加算値が加算されていて、出力は四捨五
入されたデータとなっている。
According to the data multiplication device of the first aspect of the present invention, the waveform data read from the waveform data ROM and the multiplier value set in the level setting device are multiplied by the multiplication device, and the multiplication result is obtained. The register of the first or second register is selected by the selector based on the sign bit of the multiplication result, and the addition value output from the selector is added to the multiplication result by the adder to obtain the predetermined number of high-order bits in the addition output. Output data is sent out. An addition value for rounding is added to this output, and the output is rounded data.

【0013】本発明にかかる請求項2記載のデータ乗算
装置は、請求項1記載のデータ乗算装置において、加算
データ設定回路は、レベル設定器に波形データROMに
格納された波形データをそのまま出力させるための乗数
値が設定されているときセレクタからの出力に変わって
実質的に数値0の加算値を送出する手段を備えたことを
特徴とする。
A data multiplying apparatus according to a second aspect of the present invention is the data multiplying apparatus according to the first aspect, wherein the addition data setting circuit causes the level setting unit to output the waveform data stored in the waveform data ROM as it is. When a multiplier value for is set, a means for sending out the added value of the numerical value of 0 instead of the output from the selector is provided.

【0014】本発明にかかる請求項2記載のデータ乗算
装置によれば、レベル設定器に波形データROMに格納
された波形データをそのまま出力させるための乗数値が
設定されているときには、実質的に数値0の加算値が加
算器によって加算されて、四捨五入が行われない。
According to the data multiplying device of the second aspect of the present invention, when the multiplier for setting the level setter to output the waveform data stored in the waveform data ROM as it is, it is substantially set. The addition value of the number 0 is added by the adder, and rounding is not performed.

【0015】本発明にかかる請求項3記載のデータ乗算
装置は、出力データのビット数が24ビットと16ビッ
トの何れかを選択可能な信号発生装置に使用するデータ
乗算装置であって、アナログ波形をデジタル変換した2
の補数による符号付き2進数表示の24ビットの波形デ
ータが格納された波形データROMと、サインビットを
含み波形データROMに格納された波形データのビット
数よりも少なくとも1ビット多いビット数の乗数値が設
定されるレベル設定器と、波形データROMから読み出
された波形データとレベル設定器に設定された乗数値と
乗算する乗算器と、出力データのビット数が24ビット
のとき乗算器による乗算結果のサインビットに基づき四
捨五入をするためのデータが置数された第1および第2
レジスタと、出力データのビット数が16ビットのとき
乗算器による乗算結果のサインビットに基づき四捨五入
をするためのデータが置数された第3および第4レジス
タと、出力データのビット数が24ビットのとき乗算結
果のサインビットに基づき第1または第2レジスタの置
数を選択する第1セレクタと、出力データのビット数が
16ビットのとき乗算結果のサインビットに基づき第3
または第4レジスタの置数を選択する第2セレクタと、
出力データのビット数が24ビットのとき第1セレクタ
からの出力を選択し、かつ出力データのビット数が16
ビットのとき第2セレクタからの出力を選択する第3セ
レクタとを備え、第3セレクタからのデータを出力する
加算データ設定回路と、加算データ設定回路から出力さ
れるデータを加算値として乗算結果に加算する加算器と
を備え、24ビットと16ビットとの出力ビット数に基
づいて、加算出力中から所定の上位24ビットまたは上
位16ビットの出力データを送出することを特徴とす
る。
A data multiplication device according to a third aspect of the present invention is a data multiplication device for use in a signal generator capable of selecting either 24 bits or 16 bits of output data, and an analog waveform. Digitally converted 2
Waveform data ROM that stores 24-bit waveform data in signed binary number representation by the complement of, and a multiplier value of a bit number that is at least 1 bit larger than the bit number of the waveform data stored in the waveform data ROM that includes sign bits , A multiplier for multiplying the waveform data read from the waveform data ROM by the multiplier value set in the level setter, and multiplication by the multiplier when the number of bits of output data is 24 bits 1st and 2nd data with the data for rounding based on the resulting sign bit
When the number of bits of output data is 16 bits, the number of bits of output data is 24 bits, and the number of bits of output data is 24 bits. , A first selector that selects the register number of the first or second register based on the sign bit of the multiplication result; and a third selector based on the sign bit of the multiplication result when the number of bits of output data is 16 bits.
Or a second selector for selecting the register number of the fourth register,
When the number of bits of output data is 24 bits, the output from the first selector is selected, and the number of bits of output data is 16
When the bit is a bit, a third selector that selects the output from the second selector is provided, and the addition data setting circuit that outputs the data from the third selector and the data that is output from the addition data setting circuit are used as the addition value in the multiplication result. It is characterized in that it is provided with an adder for adding and outputs predetermined upper 24 bits or upper 16 bits of output data from the addition output based on the number of output bits of 24 bits and 16 bits.

【0016】本発明にかかる請求項3記載のデータ乗算
装置によれば、波形データROMから読み出された波形
データとレベル設定器に設定された乗数値とが乗算器に
よって乗算され、出力データのビット数が24ビットの
ときには乗算器による乗算結果のサインビットに基づき
第1または第2レジスタの置数が第1セレクタによって
選択され、出力データのビット数が16ビットのときに
は乗算器による乗算結果のサインビットに基づき第3ま
たは第4レジスタの置数が第2セレクタによって選択さ
れ、出力データのビット数に基づき第1または第2セレ
クタの出力が第3セレクタによって選択され、第3セレ
クタから出力される加算値が加算器において乗算結果に
加算されて、加算出力中の上位所定ビット数の出力デー
タが送出される。この出力には四捨五入のための加算値
が加算されていて、出力は四捨五入されたデータとなっ
ている。
According to the data multiplying apparatus of the third aspect of the present invention, the waveform data read from the waveform data ROM and the multiplier value set in the level setting unit are multiplied by the multiplier to obtain the output data. When the number of bits is 24 bits, the register number of the first or second register is selected by the first selector based on the sign bit of the result of multiplication by the multiplier, and when the number of bits of output data is 16 bits, the result of multiplication by the multiplier is The register number of the third or fourth register is selected by the second selector based on the sign bit, the output of the first or second selector is selected by the third selector based on the bit number of the output data, and is output from the third selector. The addition value is added to the multiplication result in the adder, and the output data of the upper predetermined number of bits in the addition output is transmitted. An addition value for rounding is added to this output, and the output is rounded data.

【0017】本発明にかかる請求項4記載のデータ乗算
装置は、請求項3記載のデータ乗算装置において、加算
データ設定回路は、出力データのビット数が24ビット
のときにレベル設定器に波形データROMに格納された
波形データをそのまま出力させるための乗数値が設定さ
れているとき、または出力ビット数が16ビットのとき
であって乗算結果の所定の上位16ビットが7FFF
(H)または8000(H)のとき第3セレクタからの
出力に変わって実質的に数値0の加算値を送出する手段
を備えたことを特徴とする。
A data multiplying apparatus according to a fourth aspect of the present invention is the data multiplying apparatus according to the third aspect, wherein the addition data setting circuit causes the level setting unit to display the waveform data when the number of bits of the output data is 24 bits. When the multiplier value for outputting the waveform data stored in the ROM as it is is set, or when the output bit number is 16 bits and the predetermined upper 16 bits of the multiplication result are 7FFF.
In the case of (H) or 8000 (H), it is characterized in that it is provided with a means for substantially transmitting the added value of the numerical value 0 instead of the output from the third selector.

【0018】本発明にかかる請求項4記載のデータ乗算
装置によれば、出力ビット数が24ビットのときにレベ
ル設定器に波形データROMに格納された波形データを
そのまま出力させるための乗数値が設定されていると
き、出力ビット数が16ビットのときであって乗算結果
の所定の上位16ビットが7FFF(H)または800
0(H)のときは、波形データROMに格納されている
波形データをそのまま出力するときであって、実質的に
数値0の加算値が加算器によって加算されて、四捨五入
が行われない。
According to the data multiplying apparatus of the fourth aspect of the present invention, when the number of output bits is 24 bits, a multiplier value for causing the level setter to output the waveform data stored in the waveform data ROM as it is. When it is set, when the number of output bits is 16 and the predetermined upper 16 bits of the multiplication result are 7FFF (H) or 800
When it is 0 (H), the waveform data stored in the waveform data ROM is output as it is, and the addition value of the numerical value 0 is substantially added by the adder and rounding is not performed.

【0019】[0019]

【発明の実施の形態】以下、本発明にかかるデータ乗算
装置を実施の形態によって説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A data multiplication device according to the present invention will be described below with reference to embodiments.

【0020】図1は本発明の実施の一形態にかかるデー
タ乗算装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a data multiplication device according to an embodiment of the present invention.

【0021】本発明の実施の一形態にかかるデータ乗算
装置31は、24ビット出力の場合を例示している。
The data multiplication device 31 according to the embodiment of the present invention exemplifies the case of 24-bit output.

【0022】本発明の実施の一形態にかかるデータ乗算
装置31は、図1に示すように、例えば正弦波信号をデ
ジタル変換したサインビットを含む24ビットの波形デ
ータが格納された波形データROM1と、サインビット
(サインビットは常に0に設定されている)を含む、波
形データのレベルを設定するための26ビットの乗数デ
ータが設定されるレベル設定器2と、波形データROM
1から読み出された波形データとレベル設定器2から出
力される乗数データと乗算する乗算器3と、乗算器3に
よる乗算結果に四捨五入を行うための加算データ設定回
路5からの出力を加算数として加算する加算器4を備
え、加算器14から上位24ビットの出力を取り出す。
As shown in FIG. 1, a data multiplication device 31 according to an embodiment of the present invention includes a waveform data ROM 1 in which 24-bit waveform data including a sign bit obtained by digitally converting a sine wave signal is stored. , A level setter 2 in which 26-bit multiplier data for setting the level of waveform data including a sign bit (the sign bit is always set to 0) is set, and a waveform data ROM
The multiplier 3 that multiplies the waveform data read from 1 and the multiplier data that is output from the level setter 2, and the output from the addition data setting circuit 5 that rounds the multiplication result by the multiplier 3 Is added, and the output of the upper 24 bits is taken out from the adder 14.

【0023】さらに、加算データ設定回路5は、000
0003(H)が置数されたレジスタ6と、00000
01(H)が置数されたレジスタ7と、乗算結果のサイ
ンビットが0の場合にレジスタ6の置数を選択し、かつ
乗算結果のサインビットが1の場合にレジスタ7の置数
を選択するセレクタ8と、0000000(H)が置数
されたレジスタ9と、レベル設定器2に設定された乗数
データが0dB(=×1)でない場合にセレクタ8の出
力を選択し、かつ乗数データが0dBの場合にレジスタ
9の置数を選択するセレクタ10とを備えて、セレクタ
10の出力を加算数として加算器4に供給して乗算結果
と加算する。
Further, the addition data setting circuit 5 is 000.
Register 6 in which 0003 (H) is registered, and 00000
The register 7 in which 01 (H) is set, and the register 6 in which the sign bit of the multiplication result is 0, and the register 7 in which the sign bit of the multiplication result is 1 are selected Selector 8, a register 9 in which 0000000 (H) is entered, and when the multiplier data set in the level setter 2 is not 0 dB (= × 1), the output of the selector 8 is selected and the multiplier data is A selector 10 for selecting the register number of the register 9 in the case of 0 dB is provided, and the output of the selector 10 is supplied to the adder 4 as an addition number and added with the multiplication result.

【0024】ここで、レジスタ9とセレクタ10とを設
けて、乗数データが0dBのときセレクタ10を介して
レジスタ9の置数0000000(H)を乗算器3から
出力される乗算出力と加算するのは、乗数データが0d
Bの場合は波形データROM1に格納されている波形デ
ータをそのまま出力する場合であり、四捨五入をする必
要がないためである。
Here, the register 9 and the selector 10 are provided, and when the multiplier data is 0 dB, the register number 0000000 (H) of the register 9 is added to the multiplication output output from the multiplier 3 via the selector 10. Multiplier data is 0d
In the case of B, the waveform data stored in the waveform data ROM 1 is output as it is, and it is not necessary to round off.

【0025】乗算結果のサインビットに基づき選択され
るレジスタ6および7には、乗算結果の出力中の上位2
4ビットを10進数で表したときに、最後の桁を四捨五
入するためのデータ0000003(H)、00000
01(H)が置数してある。
Registers 6 and 7, which are selected based on the sign bit of the multiplication result, store the upper two bits in the output of the multiplication result.
Data for rounding off the last digit when four bits are represented by a decimal number 00000003 (H), 00000
The number 01 (H) is registered.

【0026】上記のように構成されたデータ乗算装置3
1において、波形データROM1に格納された波形デー
タとレベル設定器2に設定された乗数データとが乗算器
3にて乗算されて、乗算出力の有効ビットが加算器4へ
送出され、加算器4においてデータ発生器5から出力さ
れた加算数と加算される。
The data multiplication device 3 configured as described above
1, the waveform data stored in the waveform data ROM 1 and the multiplier data set in the level setter 2 are multiplied by the multiplier 3, and the effective bit of the multiplication output is sent to the adder 4 and the adder 4 In addition, it is added with the addition number output from the data generator 5.

【0027】ここで、波形データROM1に格納された
波形データは24ビットであって、例えば800000
(H)、レベル設定器2に設定された乗数データは26
ビット(=サインビット1+有効ビット25)であっ
て、例えば000010A(H)、乗算器3による乗算
結果は50ビットであって、例えば3FFFF7B00
0000(H)であり、その内のビット47〜ビット2
2までの26ビットFFFF7B0(H)が有効ビット
として抽出されて加算器4に送出される。
Here, the waveform data stored in the waveform data ROM 1 is 24 bits and has, for example, 800000.
(H), the multiplier data set in the level setter 2 is 26
The number of bits (= sign bit 1 + valid bit 25) is, for example, 000010A (H), and the multiplication result by the multiplier 3 is 50 bits, and for example, 3FFFF7B00.
0000 (H), of which bit 47 to bit 2
26 bits FFFF7B0 (H) up to 2 are extracted as effective bits and sent to the adder 4.

【0028】加算データ設定回路5から出力される加算
数は26ビットであって、例えば0007FC(H)、
加算器14による加算結果は26ビットであって、例え
ばFFFFFAC(H)であり、加算出力として上位2
4ビットのFFFFFA(H)が抽出される。
The number of additions output from the addition data setting circuit 5 is 26 bits, and for example, 0007FC (H),
The addition result by the adder 14 is 26 bits, for example, FFFFFAC (H), and the higher-order 2 as the addition output.
4-bit FFFFFA (H) is extracted.

【0029】ここで、乗数データは28ビット中の下位
26ビットであるが判りやすくするために28ビットで
表した。有効ビット、加算数、加算結果を28ビットで
表したのも判りやすくするためであって、実際は上位2
6ビットが演算に使用される。
Here, the multiplier data is the lower 26 bits of the 28 bits, but is represented by 28 bits for easy understanding. The effective bit, the number of additions, and the addition result are expressed in 28 bits for the purpose of easy understanding.
6 bits are used for the operation.

【0030】次に加算データ設定回路5から出力される
加算数について説明する。乗算結果が10進数で0.5
になる乗数データは、次の(2)式で求まる。
Next, the number of additions output from the addition data setting circuit 5 will be described. The multiplication result is a decimal number of 0.5
Multiplier data is expressed by the following equation (2).

【0031】 20×log(0.5/800000(H)) =20×log(0.5/8388608) =−144.49dB …(2) したがって、乗数データ(レベルdB)が−144.4
dBのとき四捨五入後の値が000001(H)および
FFFFF(H)となり、−144.5dBのとき四捨
五入後の値が000000(H)してとなるように四捨
五入のための加算数を決める必要がある。ここで、−1
44.49dBに対して、−144.4dBと−14
4.5dBとしたのはレベル設定器2による乗数データ
がdB表示で小数点以下1桁までの設定を可能としたた
めである。
20 × log (0.5 / 800000 (H)) = 20 × log (0.5 / 8388608) = − 144.49 dB (2) Therefore, the multiplier data (level dB) is −144.4.
It is necessary to determine the number of additions for rounding so that the value after rounding is 000001 (H) and FFFFF (H) when it is dB, and the value after rounding is 000000 (H) when it is -144.5 dB. is there. Where -1
444.4 dB and -144.4 dB and -14
The reason why it is set to 4.5 dB is that the multiplier data by the level setting device 2 can be set to one digit after the decimal point in dB display.

【0032】したがって、波形データの最大値(7FF
FFF(H))と最小値(800000(H))に対
し、乗数データが−144.4dBのとき、乗算結果は
式(3)、式(4)に示すようになる。
Therefore, the maximum value of the waveform data (7FF
When the multiplier data is −144.4 dB with respect to FFF (H)) and the minimum value (800000 (H)), the multiplication results are as shown in Expressions (3) and (4).

【0033】 7FFFFF(H)×0000001(H) =00000007FFFFF(H) …(3) 800000(H)×0000001(H) =3FFFFFF800000(H) …(4) ここで、乗数データ0000001(H)は−144.
4dBのときの乗数データである。
7FFFFF (H) × 0000001 (H) = 00000007FFFFF (H) (3) 800000 (H) × 0000001 (H) = 3FFFFFF8000000 (H) (4) where the multiplier data 00000001 (H) is − 144.
It is the multiplier data when it is 4 dB.

【0034】次に上位24ビットを取ったときそれぞれ
000001(H)、FFFFFF(H)になる値を4
8ビットで表したときの最小値00000100000
0(H)、FFFFFFFFFFFF(H)からそれぞ
れ式(3)、式(4)の値から上位4ビットを削除した
値を減算した値である下記の式(5)、式(6)の値に
基づく値が加算数となる。
Next, when the upper 24 bits are taken, the value which becomes 000001 (H) and FFFFFF (H) is 4 respectively.
Minimum value 0000100000 when expressed in 8 bits
0 (H), FFFFFFFFFFFF (H) to the values of the following equations (5) and (6), which are the values obtained by subtracting the upper 4 bits from the values of equation (3) and equation (4), respectively. The value based on this is the addition number.

【0035】 000001000000(H)−0000007FFFFF(H) =000000800001(H) …(5) FFFFFFFFFFFF(H)−FFFFFF800000(H) =0000007FFFFF(H) …(6) となり、サインビットが0のときは加算数は00000
0800001(H)以上、000001800001
(H)未満でなければならず、サインビットが1のとき
は加算数は0000007FFFFF(H)以下でなけ
ればならない。
0000001000000 (H) −00000007FFFFF (H) = 0000000008001 (H) (5) FFFFFFFFFFFF (H) −FFFFFF800000 (H) = 0000007FFFFF (H) (6), and when the sign bit is 0, the number of additions Is 00000
0800001 (H) or more, 000001800001
It must be less than (H), and when the sign bit is 1, the number of additions must be less than 00000007FFFFF (H).

【0036】上記の値は48ビットでの値であり、26
ビットで条件を満たすためには、サインビットが0の場
合は、 000001000000(H)の上位26ビット 0000 0000 0000 0000 0000 0001 00(B) から0000007FFFFF(H)の上位26ビット 0000 0000 0000 0000 0000 0000 01(B) を減算した値 0000 0000 0000 0000 0000 0000 11(B) となる。これを下位ビットから16進数で示せば000
0003(H)となり、これがサインビット0の場合の
加算数となる。これがレジスタ6に置数されている。
The above value is a 48-bit value, and is 26
In order to satisfy the condition with bits, when the sign bit is 0, the upper 26 bits of 000001000000 (H) 0000 0000 0000 0000 0000 0000 0001 00 (B) to the upper 26 bits of 00000007 FFFFF (H) are 0000 0000 0000 0000 0000 0000 0000. The value obtained by subtracting 01 (B) is 0000 0000 0000 0000 0000 0000 11 (B). If this is shown in hexadecimal from the lower bit, 000
0003 (H), which is the number of additions when the sign bit is 0. This is registered in the register 6.

【0037】同様にサインビットが1の場合は、 FFFFFFFFFFFF(H)の上位26ビット 1111 1111 1111 1111 1111 1111 11(B) からFFFFFF800000(H)の上位26ビット 1111 1111 1111 1111 1111 1111 10(B) を減算した値 0000 0000 0000 0000 0000 0000 01(B) となる。これを下位ビットから16進数で示せば000
0001(H)となり、これがサインビット1の場合の
加算数となる。これがレジスタ7に置数されている。
Similarly, when the sign bit is 1, the upper 26 bits 1111 1111 1111 1111 1111 1111 11 (B) of FFFFFFFFFFFF (H) to the upper 26 bits 1111 1111 1111 1111 1111 1111 10 (B) of FFFFFF800000 (H). The value obtained by subtracting is 0000 0000 0000 0000 0000 0000 01 (B). If this is shown in hexadecimal from the lower bit, 000
0001 (H), which is the number of additions when the sign bit is 1. This is registered in the register 7.

【0038】したがって、乗算結果のサインビットに基
づいてレジスタ6またはレジスタ7の置数がセレクタに
よって選択され、加算器4において乗算出力と加算さ
れ、加算出力の上位24ビットが取り出されることによ
り四捨五入されたデータが得られる。また、乗算データ
が0dBのときにはレジスタ9の置数が選択されて、乗
算結果のがそのまま上位24ビットが出力される。
Therefore, the register of the register 6 or the register 7 is selected by the selector based on the sign bit of the multiplication result, is added to the multiplication output in the adder 4, and the upper 24 bits of the addition output are extracted and rounded off. Obtained data. When the multiplication data is 0 dB, the register number of the register 9 is selected, and the higher 24 bits of the multiplication result are output as they are.

【0039】なお上記したデータ乗算装置31におい
て、レベル設定器2にサインビットを含む26ビットの
乗数データが設定される場合を例示したが、レベル設定
器2にサインビットを含む25ビットの乗数データを設
定するようにしても差し支えない。
In the data multiplying device 31 described above, the case where 26-bit multiplier data including a sign bit is set in the level setter 2 has been exemplified, but 25-bit multiplier data including a sign bit is set in the level setter 2. It does not matter if you set.

【0040】次に本発明の実施の一形態にかかるデータ
乗算装置の第1変形例について説明する。
Next, a first modification of the data multiplication device according to the embodiment of the present invention will be described.

【0041】図2は本発明の実施の一形態にかかるデー
タ乗算装置の第1変形例の構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing the configuration of the first modification of the data multiplication device according to the embodiment of the present invention.

【0042】本発明の実施の一形態にかかるデータ乗算
装置の第1変形例は、16ビット出力の場合を例示して
いる。
The first modification of the data multiplication device according to the embodiment of the present invention exemplifies the case of 16-bit output.

【0043】本第1変形例のデータ乗算装置32は、図
2に示すように、例えば正弦波信号をデジタル変換した
サインビットを含む16ビットの波形データが格納され
た波形データROM11と、サインビット(サインビッ
トは常に0に設定されている)を含む、波形データのレ
ベルを設定するための18ビットの乗数データが設定さ
れるレベル設定器12と、波形データROM11から読
み出された波形データとレベル設定器12から出力され
る乗数データと乗算する乗算器13と、乗算器13によ
る乗算結果に四捨五入を行うための加算データ設定回路
15からの出力を加算数として加算する加算器14を備
え、加算器14から上位16ビットの出力を取り出す。
As shown in FIG. 2, the data multiplying device 32 of the first modified example includes a waveform data ROM 11 in which 16-bit waveform data including a sign bit obtained by digitally converting a sine wave signal is stored, and a sign bit. A level setter 12 in which 18-bit multiplier data for setting the level of waveform data, including (the sign bit is always set to 0), and waveform data read from the waveform data ROM 11 are included. A multiplier 13 for multiplying the multiplier data output from the level setter 12 and an adder 14 for adding the output from the addition data setting circuit 15 for rounding the multiplication result by the multiplier 13 as an addition number are provided. The output of the upper 16 bits is taken out from the adder 14.

【0044】さらに、加算データ設定回路15は、00
003(H)が置数されたレジスタ16と、00001
(H)が置数されたレジスタ17と、乗算結果のサイン
ビットが0の場合にレジスタ16の置数を選択し、かつ
乗算結果のサインビットが1の場合にレジスタ17の置
数を選択するセレクタ18と、000000(H)が置
数されたレジスタ19と、レベル設定器12に設定され
た乗数データが0dB(=×1)でない場合にセレクタ
18の出力を選択し、かつ乗数データが0dBの場合に
レジスタ19の置数を選択するセレクタ20とを備え
て、セレクタ20の出力を加算数として加算器14に供
給して乗算結果と加算する。
Further, the addition data setting circuit 15 uses 00
The register 16 in which 003 (H) is registered, and 00001
The register 17 in which (H) is registered and the register 16 in which the sign bit of the multiplication result is 0 is selected, and the register 17 in which the sign bit of the multiplication result is 1 is selected. The selector 18, the register 19 in which 000000 (H) is registered, and the output of the selector 18 is selected when the multiplier data set in the level setter 12 is not 0 dB (= × 1), and the multiplier data is 0 dB. In this case, a selector 20 for selecting the register number of the register 19 is provided, and the output of the selector 20 is supplied to the adder 14 as an addition number to be added to the multiplication result.

【0045】ここで、レジスタ19とセレクタ20とを
設けて、乗数データが0dBのときセレクタ20を介し
てレジスタ19の置数000000(H)を乗算器13
から出力される乗算出力と加算するのは、乗数データが
0dBの場合は波形データROM11に格納されている
波形データそのまま出力する場合であり、四捨五入をす
る必要がないためである。
Here, a register 19 and a selector 20 are provided, and when the multiplier data is 0 dB, the register number 000000 (H) of the register 19 is multiplied by the multiplier 13 via the selector 20.
The addition with the multiplication output output from is that when the multiplier data is 0 dB, the waveform data stored in the waveform data ROM 11 is output as it is, and rounding is not necessary.

【0046】乗算結果のサインビットに基づき選択され
るレジスタ16および17には、乗算結果の出力中の上
位16ビットを10進数で表したときに、最後の桁を四
捨五入するためのデータ00003(H)、00001
(H)が置数してある。
Data 00003 (H) for rounding off the last digit when the upper 16 bits in the output of the multiplication result are represented by a decimal number are stored in the registers 16 and 17 selected based on the sign bit of the multiplication result. ), 00001
(H) is registered.

【0047】上記のように構成されたデータ乗算装置3
2において、波形データROM11に格納された波形デ
ータとレベル設定器12に設定された乗数データとが乗
算器13にて乗算されて、乗算出力の有効ビットが加算
器14へ送出され、加算器14においてデータ発生器1
5から出力された加算数と加算される。
Data multiplication device 3 configured as described above
2, the waveform data stored in the waveform data ROM 11 and the multiplier data set in the level setting unit 12 are multiplied by the multiplier 13, and the effective bit of the multiplication output is sent to the adder 14 and the adder 14 Data generator 1 at
It is added with the number of additions output from 5.

【0048】上記したデータ乗算装置32におけるレジ
スタ16および17に置数される値は、24ビット出力
の場合と同様にして求められる。
The values stored in the registers 16 and 17 in the data multiplication device 32 are obtained in the same manner as in the case of 24-bit output.

【0049】この結果、乗算結果のサインビットに基づ
いてレジスタ16またはレジスタ17の置数がセレクタ
18によって選択され、加算器14において乗算出力と
加算され、加算出力の上位16ビットが取り出されるこ
とにより四捨五入されたデータが得られる。また、乗算
データが0dBのときにはレジスタ19の置数が選択さ
れて、乗算結果のがそのまま上位16ビットが出力され
る。
As a result, the register 18 or the register 17 is selected by the selector 18 on the basis of the sign bit of the multiplication result, is added to the multiplication output in the adder 14, and the upper 16 bits of the addition output are taken out. Rounded data is obtained. When the multiplication data is 0 dB, the register number of the register 19 is selected, and the upper 16 bits of the multiplication result are output as they are.

【0050】なお上記したデータ乗算装置32におい
て、レベル設定器12にサインビットを含む18ビット
の乗数データが設定される場合を例示したが、レベル設
定器12にサインビットを含む17ビットの乗数データ
を設定するようにしても差し支えない。
In the data multiplying device 32 described above, the case where the 18-bit multiplier data including the sign bit is set in the level setter 12 has been exemplified, but the 17-bit multiplier data including the sign bit is set in the level setter 12. It does not matter if you set.

【0051】次に、本発明の実施の一形態にかかるデー
タ乗算装置の第2変形例について説明する。
Next, a second modified example of the data multiplication device according to the embodiment of the present invention will be described.

【0052】図3は本発明の実施の一形態にかかるデー
タ乗算装置の第2変形例の構成を示すブロック図であ
る。
FIG. 3 is a block diagram showing the configuration of a second modification of the data multiplication device according to the embodiment of the present invention.

【0053】本発明の実施の一形態にかかるデータ乗算
装置の第2変形例は、24ビット出力と16ビット出力
とを選択して出力可能にした場合を例示している。
A second modified example of the data multiplication device according to the embodiment of the present invention exemplifies a case where 24-bit output and 16-bit output are selected to enable output.

【0054】本第2変形例のデータ乗算装置33は、図
3に示すように、例えば正弦波信号をデジタル変換した
サインビットを含む24ビットの波形データが格納され
た波形データROM1と、サインビット(サインビット
は常に0に設定されている)を含む、波形データのレベ
ルを設定するための26ビットの乗数データが設定され
るレベル設定器2と、波形データROM1から読み出さ
れた波形データとレベル設定器2から出力される乗数デ
ータと乗算する乗算器3と、乗算器3による乗算結果に
四捨五入を行うための加算データ設定回路30からの出
力を加算数として加算する加算器4と、加算器4の出力
中の上位24ビット、上位16ビットを選択して出力す
るセレクタ29を備え、セレクタ29から24ビットの
出力、または16ビットの出力を取り出す。
As shown in FIG. 3, the data multiplying device 33 of the second modified example includes a waveform data ROM 1 in which 24-bit waveform data including a sign bit obtained by digitally converting a sine wave signal is stored, and a sign bit. Level setting device 2 in which 26-bit multiplier data for setting the level of waveform data, including (the sign bit is always set to 0), and waveform data read from waveform data ROM 1 A multiplier 3 for multiplying the multiplier data output from the level setting device 2; an adder 4 for adding the output from the addition data setting circuit 30 for rounding the multiplication result by the multiplier 3 as an addition number; A selector 29 for selecting and outputting the upper 24 bits and the upper 16 bits in the output of the container 4; Take out the output of Tsu door.

【0055】加算データ設定回路30は、000000
3(H)が置数されたレジスタ6と、0000001
(H)が置数されたレジスタ7と、乗算結果のサインビ
ットが0の場合にレジスタ6の置数を選択し、かつ乗算
結果のサインビットが1の場合にレジスタ7の置数を選
択するセレクタ8と、0000200(H)が置数され
たレジスタ22、00001FF(H)が置数されたレ
ジスタ23と、乗算結果のサインビットが0の場合にレ
ジスタ22の置数を選択し、かつ乗算結果のサインビッ
トが1の場合にレジスタ23の置数を選択するセレクタ
24と、24ビット出力選択のときはセレクタ8の出力
を選択し、かつ16ビット出力選択のときはセレクタ2
4の出力を選択するセレクタ25とを備えている。
The addition data setting circuit 30 has 000000
Register 6 in which 3 (H) is registered, and 0000001
(H) is a register 7 having a register number, and when the sign bit of the multiplication result is 0, the register number of the register 6 is selected, and when the sign bit of the multiplication result is 1, the register number of the register 7 is selected. Selector 8, register 22 in which 0000200 (H) is registered, register 23 in which 00001FF (H) is registered, and the register of register 22 is selected when the sign bit of the multiplication result is 0, and multiplication is performed. The selector 24 that selects the register number of the register 23 when the resulting sign bit is 1, and the selector 2 that selects the output of the selector 8 when the 24-bit output is selected and the selector 2 when the 16-bit output is selected.
And a selector 25 for selecting the output of No. 4 of FIG.

【0056】加算データ設定回路30は、さらに、00
00000(H)が置数されたレジスタ26と、16ビ
ット出力が選択されているときであって乗算器3から出
力される乗算結果の上位が8000(H)または7FF
F(H)と一致したことを検出して出力を発生する比較
器27と、比較器27から出力が発生しているときか、
または24ビット出力が選択されてかつレベル設定器2
において設定された乗算データが0dBのときレジスタ
26の置数を選択し、それ以外のときにはセレクタ25
の出力を選択するセレクタ28とを備えて、セレクタ2
8の出力を加算数として加算器4に供給して乗算結果と
加算する。
The addition data setting circuit 30 further adds 00
When the 16-bit output is selected and the register 26 in which 00000 (H) is registered, the higher order of the multiplication result output from the multiplier 3 is 8000 (H) or 7FF.
When the comparator 27 detects the coincidence with F (H) and produces an output, and when the comparator 27 produces an output,
Or 24-bit output is selected and level setter 2
When the multiplication data set in step 2 is 0 dB, the register number of the register 26 is selected, otherwise the selector 25 is selected.
And a selector 28 for selecting the output of
The output of 8 is supplied to the adder 4 as an addition number and added with the multiplication result.

【0057】ここで、比較器27とレジスタ26とセレ
クタ28とを設けて、24ビット出力が選択されかつ乗
数データが0dBのときセレクタ28を介してレジスタ
26の置数0000000(H)を乗算器3から出力さ
れる乗算結果と加算するのは、24ビット出力が選択さ
れかつ乗数データが0dBの場合は波形データROM1
に格納されている波形データをそのまま出力する場合で
あり、四捨五入をする必要はなく、乗算出力をそのまま
出力させるためである。
Here, a comparator 27, a register 26 and a selector 28 are provided, and when the 24-bit output is selected and the multiplier data is 0 dB, the register number 0000000 (H) of the register 26 is multiplied via the selector 28. When the 24-bit output is selected and the multiplier data is 0 dB, the waveform data ROM1 is added to the multiplication result output from 3
This is because the waveform data stored in is output as it is, and it is not necessary to round it off, and the multiplication output is output as it is.

【0058】さらに、16ビット出力が選択されている
ときであって乗算器3から出力される乗算結果の上位が
8000(H)または7FFF(H)と一致したときは
16ビット出力の最大値または最小値の場合であって、
これを比較器27で検出し、このときはレジスタ26の
置数を選択するのは、16ビット出力選択のときにおい
て乗算結果が16ビット出力の最大値または最小値のと
きは四捨五入する必要はなく、乗算出力をそのまま出力
させるためである。
Further, when the 16-bit output is selected and the higher order of the multiplication result output from the multiplier 3 matches 8000 (H) or 7FFF (H), the maximum value of the 16-bit output or For the minimum value,
This is detected by the comparator 27, and the register number of the register 26 is selected at this time. It is not necessary to round off when the multiplication result is the maximum value or the minimum value of the 16-bit output when the 16-bit output is selected. This is because the multiplication output is output as it is.

【0059】乗算結果のサインビットに基づき選択され
るレジスタ6および7には、乗算結果の出力中の上位2
4ビットを10進数で表したときに、最後の桁を四捨五
入するためのデータ0000003(H)、00000
01(H)が置数してある。これはデータ乗算装置31
の場合と同様である。
Registers 6 and 7, which are selected based on the sign bit of the multiplication result, have the upper two bits in the output of the multiplication result.
Data for rounding off the last digit when four bits are represented by a decimal number 00000003 (H), 00000
The number 01 (H) is registered. This is the data multiplication device 31
It is similar to the case of.

【0060】乗算結果のサインビットに基づき選択され
るレジスタ22および23には、乗算結果の出力中の上
位16ビットを10進数で表したときに、最後の桁を四
捨五入するためのデータ0000200(H)、000
01FF(H)が置数してある。この値は16ビット出
力の場合であるデータ乗算装置32の場合のレジスタ1
6および17の置数とは異なっている。これは波形デー
タROM1には24ビットの波形データが格納されて2
4ビットの波形データに基づいて演算し、出力を16ビ
ット出力としているためである。
Data 0000200 (H) for rounding off the last digit when the upper 16 bits in the output of the multiplication result are represented by a decimal number are stored in the registers 22 and 23 selected based on the sign bit of the multiplication result. ), 000
01FF (H) is registered. This value is for 16-bit output. Register 1 in the case of the data multiplier 32.
It differs from the numbers 6 and 17. This is because the waveform data ROM1 stores 24-bit waveform data.
This is because the calculation is performed based on the 4-bit waveform data and the output is a 16-bit output.

【0061】上記のように構成されたデータ乗算装置3
3において、波形データROM1に格納された波形デー
タとレベル設定器2に設定された乗数データとが乗算器
3にて乗算されて、乗算出力の有効ビットが加算器4へ
送出され、加算器4においてデータ発生器5から出力さ
れた加算数と加算され、加算結果の上位24ビットまた
は上位16ビットが選択して出力される。
Data multiplication device 3 configured as described above
3, the waveform data stored in the waveform data ROM 1 and the multiplier data set in the level setter 2 are multiplied by the multiplier 3, and the effective bit of the multiplication output is sent to the adder 4 and the adder 4 In, the sum is added to the number of additions output from the data generator 5, and the upper 24 bits or the upper 16 bits of the addition result are selected and output.

【0062】次に、セレクタ29において24ビットの
出力が選択されたときに選択されるレジスタ6および7
の置数についてはデータ乗算装置31の場合と同様であ
りその説明は省略する。セレクタ29において16ビッ
トの出力が選択されたときに選択されるレジスタ22お
よび23の置数ついて説明する。
Next, the registers 6 and 7 selected when the 24-bit output is selected by the selector 29.
Since the register number of is the same as that of the data multiplication device 31, the description thereof is omitted. The numbers of the registers 22 and 23 selected when the 16-bit output is selected by the selector 29 will be described.

【0063】セレクタ29において16ビットの出力が
選択される場合においても、波形データROM1に格納
された波形データは24ビットであって、例えば800
000(H)、レベル設定器2に設定された乗数データ
は26ビット(=サインビット1+有効ビット25)で
あって、例えば000010A(H)、乗算器3による
乗算結果は50ビットであって、例えば3FFFF7B
000000(H)であり、その内のビット47〜ビッ
ト22までの26ビットFFFF7B0(H)が有効ビ
ットとして抽出されて加算器4に送出される。
Even when 16-bit output is selected by the selector 29, the waveform data stored in the waveform data ROM 1 is 24 bits, for example 800
000 (H), the multiplier data set in the level setting unit 2 is 26 bits (= sign bit 1 + valid bit 25), for example, 000010A (H), the multiplication result by the multiplier 3 is 50 bits, For example, 3FFFF7B
26 bits FFFF7B0 (H) from bit 47 to bit 22 are extracted as valid bits and sent to the adder 4.

【0064】加算データ設定回路5から出力される加算
数は26ビットであって、例えば0007FC(H)、
加算器14による加算結果は26ビットであって、例え
ばFFFFFAC(H)であり、加算出力として上位2
4ビットのFFFFFA(H)が抽出される。
The number of additions output from the addition data setting circuit 5 is 26 bits, and for example, 0007FC (H),
The addition result by the adder 14 is 26 bits, for example, FFFFFAC (H), and the higher-order 2 as the addition output.
4-bit FFFFFA (H) is extracted.

【0065】ここで、乗数データは28ビット中の下位
26ビットであるが判りやすくするために28ビットで
表した。有効ビット、加算数、加算結果を28ビットで
表したのも判りやすくするためであって、実際は上位2
6ビットが演算に使用される。
Here, the multiplier data is the lower 26 bits of 28 bits, but is represented by 28 bits for easy understanding. The effective bit, the number of additions, and the addition result are expressed in 28 bits for the purpose of easy understanding.
6 bits are used for the operation.

【0066】次にセレクタ29において16ビットの出
力データが選択されたときに加算データ設定回路30か
ら出力される加算数、すなわち、レジスタ22および2
3の置数について説明する。乗算結果が10進数で0.
5になる乗数データは、次の(7)式で求まる。
Next, when the selector 29 selects 16-bit output data, the number of additions output from the addition data setting circuit 30, that is, the registers 22 and 2.
The number of 3 will be described. The result of multiplication is 0.
Multiplier data that becomes 5 is obtained by the following equation (7).

【0067】 20×log(0.5/8000(H)) =20×log(0.5/32768) =−96.33dB …(7) したがって、乗数データ(レベルdB)が−96.3d
Bのとき四捨五入後の値が0001(H)およびFFF
F(H)となり、−96.4dBのとき四捨五入後の値
が0000(H)となるように四捨五入のための加算数
を求める必要がある。ここで、−96.33dBに対し
て、−96.3dBと−96.4dBとしたのはレベル
設定器2による乗数データがdB表示で小数点以下1桁
までの設定を可能としたためである。
20 × log (0.5 / 8000 (H)) = 20 × log (0.5 / 32768) = − 96.33 dB (7) Therefore, the multiplier data (level dB) is −96.3d.
When B, the value after rounding is 0001 (H) and FFF
It becomes F (H), and when -96.4 dB, it is necessary to find the number of additions for rounding so that the value after rounding becomes 0000 (H). Here, the reason why -96.3 dB and -96.4 dB are used instead of -96.33 dB is that the multiplier data by the level setting device 2 can be set to one digit after the decimal point in dB display.

【0068】したがって、波形データの最大値(7FF
FFF(H))と最小値(800000(H))に対
し、乗数データが−96.33dBのとき、乗算結果は
式(8)、式(9)に示すようになる。
Therefore, the maximum value of the waveform data (7FF
When the multiplier data is −96.33 dB with respect to FFF (H)) and the minimum value (800000 (H)), the multiplication results are as shown in Expressions (8) and (9).

【0069】 7FFFFF(H)×0000100(H) =000007FFFFF00(H) …(8) 800000(H)×0000100(H) =3FFFF80000000(H) …(9) ここで、乗数データ0000100(H)は−96.3
3dBのときの乗数データである。
7FFFFF (H) × 0000100 (H) = 000007FFFFF00 (H) (8) 800000 (H) × 0000100 (H) = 3FFFF80000000 (H) (9) where the multiplier data 0000100 (H) is − 96.3
This is multiplier data when the level is 3 dB.

【0070】次に上位16ビットを取ったときそれぞれ
0001(H)、FFFF(H)になる値を48ビット
で表したときの最小値000100000000
(H)、FFFFFFFFFFFF(H)からそれぞれ
式(8)、式(9)の値から上位4ビットを削除した値
を減算した値である下記の式(10)、式(11)の値
に基づく値が加算数となる。
Next, when the upper 16 bits are taken, 0001 (H) and FFFF (H) are represented by 48 bits.
(H) and FFFFFFFFFFFF (H) are respectively based on the values of the following equations (10) and (11), which are values obtained by subtracting the values obtained by removing the upper 4 bits from the values of equations (8) and (9), respectively. The value becomes the addition number.

【0071】 000100000000(H)−00007FFFFF00(H) =000080000100(H) …(10) FFFFFFFFFFFF(H)−FFFF80000000(H) =00007FFFFFFF(H) …(11) となり、サインビットが0のときは加算数は00008
0000100(H)以上、000180000100
(H)未満でなければならず、サインビットが1のとき
は加算数は00007FFFFFFF(H)以下でなけ
ればならない。
0000100000000 (H) -00007FFFFF00 (H) = 0000800000100 (H) (10) FFFFFFFFFFFF (H) -FFFF80000000 (H) = 00007FFFFFFF (H) (11), and when the sign bit is 0, the number of additions Is 00008
0000100 (H) or higher, 00018000100
It must be less than (H), and when the sign bit is 1, the number of additions must be 00007FFFFFFF (H) or less.

【0072】上記の値は48ビットでの値であり、26
ビットで条件を満たすためには、サインビットが0の場
合は、 000100000000(H)の上位26ビット 0000 0000 0000 0001 0000 0000 00(B) から00007FFFFFFF(H)の上位26ビット 0000 0000 0000 0000 0111 1111 11(B) を減算した値 0000 0000 0000 0000 1000 0000 00(B) となる。これを下位ビットから16進数で示せば000
0200(H)となり、これがサインビット0の場合の
加算数となる。これがレジスタ22に置数されている。
The above value is a 48-bit value, and is 26
In order to satisfy the condition with bits, when the sign bit is 0, the upper 26 bits of 000100000000 (H) 0000 0000 0000 0001 0000 0000 00 (B) to the upper 26 bits of 00007FFFFFFF (H) 0000 0000 0000 0000 0111 1111 The value obtained by subtracting 11 (B) is 0000 0000 0000 0000 1000 1000 0000 00 (B). If this is shown in hexadecimal from the lower bit, 000
It becomes 0200 (H), which is the number of additions when the sign bit is 0. This is registered in the register 22.

【0073】同様にサインビットが1の場合は、 FFFFFFFFFFFF(H)の上位26ビット 1111 1111 1111 1111 1111 1111 11(B) からFFFF80000000(H)の上位26ビット 1111 1111 1111 1111 1111 1111 11(B) を減算した値 0000 0000 0000 0000 0111 1111 11(B) となる。これを下位ビットから16進数で示せば000
01FF(H)となり、これがサインビット1の場合の
加算数となる。これがレジスタ23に置数されている。
Similarly, when the sign bit is 1, the upper 26 bits 1111 1111 1111 1111 1111 1111 11 (B) of FFFFFFFFFFFF (H) to the upper 26 bits 1111 1111 1111 1111 1111 1111 11 (B) of FFFF80000000 (H). The value is 0000 0000 0000 0000 0111 1111 11 (B). If this is shown in hexadecimal from the lower bit, 000
01FF (H), which is the number of additions when the sign bit is 1. This is registered in the register 23.

【0074】したがって、セレクタ29によって24ビ
ットとの出力が選択され、かつレベル設定器2にて設定
された乗算データが0dBでないときには、乗算器3の
乗算結果のサインビットに基づいてレジスタ6またはレ
ジスタ7の置数がセレクタ8によって選択され、セレク
タ25および28を介して加算器4に供給されて、加算
器4において乗算出力と加算され、加算出力の上位24
ビットが取り出されることにより四捨五入されたデータ
が得られる。
Therefore, when the output of 24 bits is selected by the selector 29 and the multiplication data set by the level setter 2 is not 0 dB, the register 6 or the register 6 is selected based on the sign bit of the multiplication result of the multiplier 3. The register number 7 is selected by the selector 8 and supplied to the adder 4 via the selectors 25 and 28, and is added to the multiplication output in the adder 4 to obtain the higher 24 of the addition output.
The bits are taken out to obtain rounded data.

【0075】また、セレクタ29によって24ビットと
の出力が選択され、かつレベル設定器2にて設定された
乗算データが0dBのときにはレジスタ26の置数がセ
レクタ28によって選択されて加算器4に供給され、加
算器4において乗算出力と加算され、加算出力の上位2
4ビットが取り出されることにより、波形データROM
1のデータがそのまま出力される。
When the output of 24 bits is selected by the selector 29 and the multiplication data set by the level setter 2 is 0 dB, the register number of the register 26 is selected by the selector 28 and supplied to the adder 4. Are added to the multiplication output in the adder 4, and the higher 2 of the addition output
Waveform data ROM by extracting 4 bits
The data of 1 is output as it is.

【0076】セレクタ29によって16ビットとの出力
が選択され、かつ比較器27によって乗算器3の出力の
上位ビットが8000(H)、または7FFF(H)で
ないと検出されたときには、乗算器3の乗算結果のサイ
ンビットに基づいてレジスタ22またはレジスタ23の
置数がセレクタ24によって選択され、セレクタ25お
よび28を介して加算器4に供給されて、加算器4にお
いて乗算出力と加算され、加算出力の上位16ビットが
取り出されることにより四捨五入されたデータが得られ
る。
When the selector 29 selects the output of 16 bits and the comparator 27 detects that the upper bit of the output of the multiplier 3 is not 8000 (H) or 7FFF (H), the multiplier 3 outputs. The register 24 or the register 23 is selected by the selector 24 based on the sign bit of the multiplication result, is supplied to the adder 4 via the selectors 25 and 28, and is added to the multiplication output in the adder 4 to obtain the addition output. The upper 16 bits of are taken out to obtain rounded data.

【0077】また、セレクタ29によって16ビットと
の出力が選択され、かつ比較器27によって乗算器3の
出力の上位ビットが8000(H)、または7FFF
(H)であると検出されたときには、レジスタ26の置
数がセレクタ28によって選択されて加算器4に供給さ
れ、加算器4において乗算出力と加算され、加算出力の
上位16ビットが取り出されることにより、波形データ
ROM1のデータがそのまま出力される。
The selector 29 selects the output of 16 bits, and the comparator 27 sets the upper bit of the output of the multiplier 3 to 8000 (H) or 7FFF.
When it is detected to be (H), the register 26 register number is selected by the selector 28 and supplied to the adder 4, and is added to the multiplication output in the adder 4 to extract the upper 16 bits of the addition output. As a result, the data in the waveform data ROM 1 is output as it is.

【0078】なお上記したデータ乗算装置33におい
て、レベル設定器2にサインビットを含む26ビットの
乗数データが設定される場合を例示したが、レベル設定
器2にサインビットを含む25ビットの乗数データを設
定するようにしても差し支えない。
In the data multiplying device 33 described above, the case where 26-bit multiplier data including a sign bit is set in the level setter 2 has been exemplified, but 25-bit multiplier data including a sign bit is set in the level setter 2. It does not matter if you set.

【0079】[0079]

【発明の効果】以上説明したように本発明にかかるデー
タ乗算装置によれば、簡単な構成で出力データが16ビ
ットの場合および24ビットの場合に四捨五入を行った
乗算結果を得ることができるという効果が得られる。ま
た、本発明にかかるデータ乗算装置によれば、切り捨て
た場合よりも正確な演算結果を得ることができる。ま
た、本発明にかかるデータ乗算装置において出力データ
として24ビットと16ビットを選択可能にしたとき
は、出力データに16ビットが必要なときにおいても2
4ビットで乗算されるために、演算誤差を小さくするこ
とができる。
As described above, according to the data multiplying apparatus of the present invention, it is possible to obtain the result of rounding when the output data is 16 bits and 24 bits with a simple structure. The effect is obtained. Further, according to the data multiplication device of the present invention, it is possible to obtain a more accurate calculation result than in the case of truncation. Further, in the data multiplying device according to the present invention, when 24 bits and 16 bits can be selected as output data, even when 16 bits are required for the output data, 2
Since it is multiplied by 4 bits, the calculation error can be reduced.

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

【図1】本発明の実施の一形態にかかるデータ乗算装置
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a data multiplication device according to an embodiment of the present invention.

【図2】本発明の実施の一形態にかかるデータ乗算装置
の第1変形例の構成を示すブロック図である。
FIG. 2 is a block diagram showing the configuration of a first modification of the data multiplication device according to the embodiment of the present invention.

【図3】本発明の実施の一形態にかかるデータ乗算装置
の第2変形例の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a second modified example of the data multiplication device according to the embodiment of the present invention.

【図4】従来のデータ乗算装置の構成を示すブロック図
である。
FIG. 4 is a block diagram showing a configuration of a conventional data multiplication device.

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

1および11 波形データROM 2および12 レベル設定器 3および13 乗算器 4および14 加算器 5、15および30 加算データ設定回路 6、7、9、10、16、17、19、22、23およ
び26 レジスタ 8、10、18、20、24、25および28 セレク
タ 31、32および33 データ乗算装置
1 and 11 Waveform data ROM 2 and 12 Level setting device 3 and 13 Multiplier 4 and 14 Adder 5, 15 and 30 Addition data setting circuit 6, 7, 9, 10, 16, 17, 19, 22, 23 and 26 Registers 8, 10, 18, 20, 24, 25 and 28 Selectors 31, 32 and 33 Data multiplication device

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/38 G06F 7/00 ─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 7/38 G06F 7/00

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】信号発生装置に使用するデータ乗算装置で
あって、 アナログ波形をデジタル変換した2の補数による符号付
き2進数表示の波形データが格納された波形データRO
Mと、 サインビットを含み波形データROMに格納された波形
データのビット数よりも少なくとも1ビット多いビット
数の乗数値が設定されるレベル設定器と、 波形データROMから読み出された波形データとレベル
設定器に設定された乗数値と乗算する乗算器と、 乗算器による乗算結果のサインビットに基づき四捨五入
をするためのデータが置数された第1および第2レジス
タと、乗算結果のサインビットに基づき第1または第2
レジスタの置数を選択するセレクタとを備え、セレクタ
からのデータを出力する加算データ設定回路と、 加算データ設定回路から出力されるデータを加算値とし
て乗算結果に加算する加算器とを備え、加算出力中から
上位所定ビット数の出力データを送出することを特徴と
するデータ乗算装置。
1.Data multiplier used for signal generator
There Signed with 2's complement that digitally converted analog waveform
Waveform data RO that stores the waveform data in binary notation
M and Waveforms including sign bit and stored in waveform data ROM
Bits that are at least 1 more than the number of bits of data
A level setter to which the multiplier value of the number is set, Waveform data and level read from waveform data ROM
A multiplier that multiplies the multiplier value set in the setter, Rounded based on the sign bit of the multiplication result by the multiplier
First and second regis with data for
And the first or second based on the sign bit of the multiplication result
And a selector for selecting the register number
An addition data setting circuit that outputs the data from Use the data output from the addition data setting circuit as the addition value.
Equipped with an adder that adds to the multiplication result by
The output data of a predetermined number of upper bits is transmitted.
Data multiplication device.
【請求項2】請求項1記載のデータ乗算装置において、
加算データ設定回路は、レベル設定器に波形データRO
Mに格納された波形データをそのまま出力させるための
乗数値が設定されているときセレクタからの出力に変わ
って実質的に数値0の加算値を送出する手段を備えたこ
とを特徴とするデータ乗算装置。
2. The data multiplication device according to claim 1, wherein
The addition data setting circuit causes the level setting device to display the waveform data RO
Data multiplication comprising means for sending out an added value of a numerical value of 0 instead of an output from a selector when a multiplier value for outputting the waveform data stored in M as it is is set. apparatus.
【請求項3】出力データのビット数が24ビットと16
ビットの何れかを選択可能な信号発生装置に使用する
ータ乗算装置であって、 アナログ波形をデジタル変換した2の補数による符号付
き2進数表示の24ビットの波形データが格納された波
形データROMと、 サインビットを含み波形データROMに格納された波形
データのビット数よりも少なくとも1ビット多いビット
数の乗数値が設定されるレベル設定器と、 波形データROMから読み出された波形データとレベル
設定器に設定された乗数値と乗算する乗算器と、 出力データのビット数が24ビットのとき乗算器による
乗算結果のサインビットに基づき四捨五入をするための
データが置数された第1および第2レジスタと、出力デ
ータのビット数が16ビットのとき乗算器による乗算結
果のサインビットに基づき四捨五入をするためのデータ
が置数された第3および第4レジスタと、出力データの
ビット数が24ビットのとき乗算結果のサインビットに
基づき第1または第2レジスタの置数を選択する第1セ
レクタと、出力データのビット数が16ビットのとき乗
算結果のサインビットに基づき第3または第4レジスタ
の置数を選択する第2セレクタと、出力データのビット
数が24ビットのとき第1セレクタからの出力を選択
し、かつ出力データのビット数が16ビットのとき第2
セレクタからの出力を選択する第3セレクタとを備え、
第3セレクタからのデータを出力する加算データ設定回
路と、 加算データ設定回路から出力されるデータを加算値とし
て乗算結果に加算する加算器と を備え、24ビットと16ビットとの出力ビット数に基
づいて、加算出力中から所定の上位24ビットまたは上
位16ビットの出力データを送出することを特徴とする
データ乗算装置。
3. The number of bits of output data is 24 bits and 16 bits.
A data multiplication device for use in a signal generation device capable of selecting any of the bits, wherein 24-bit waveform data represented by a binary number with a sign by 2's complement obtained by digitally converting an analog waveform is stored. Waveform data ROM, a level setter for setting a multiplier value of the number of bits including the sign bit, which is at least 1 bit larger than the number of bits of the waveform data stored in the waveform data ROM, and read from the waveform data ROM. The multiplier for multiplying the waveform data and the multiplier value set in the level setter, and when the number of bits of the output data is 24 bits, the data for rounding based on the sign bit of the multiplication result by the multiplier is registered. The first and second registers are rounded off based on the sign bit of the multiplication result by the multiplier when the number of bits of output data is 16 bits. Third and fourth registers in which the data for registering are registered, and a first selector that selects the register in the first or second register based on the sign bit of the multiplication result when the number of bits of the output data is 24 bits, A second selector that selects the register number of the third or fourth register based on the sign bit of the multiplication result when the number of bits of output data is 16 bits, and an output from the first selector when the number of bits of output data is 24 bits When is selected and the number of bits of output data is 16 bits, the second
A third selector for selecting an output from the selector,
An addition data setting circuit that outputs the data from the third selector and an adder that adds the data output from the addition data setting circuit to the multiplication result as an addition value are provided, and the number of output bits of 24 bits and 16 bits is increased. On the basis of the addition output, a predetermined upper 24 bits or upper 16 bits of output data is sent out based on the above.
【請求項4】請求項3記載のデータ乗算装置において、
加算データ設定回路は、出力データのビット数が24ビ
ットのときにレベル設定器に波形データROMに格納さ
れた波形データをそのまま出力させるための乗数値が設
定されているとき、または出力データのビット数が16
ビットのときであって乗算結果の所定の上位16ビット
が7FFF(H)または8000(H)のとき第3セレ
クタからの出力に変わって実質的に数値0の加算値を送
出する手段を備えたことを特徴とするデータ乗算装置。
4. The data multiplication device according to claim 3,
The addition data setting circuit is used when the multiplier for setting the level setter to output the waveform data stored in the waveform data ROM as it is when the number of bits of the output data is 24 bits, or when the bit of the output data is set. Number is 16
In the case of bits and when the predetermined upper 16 bits of the multiplication result is 7FFF (H) or 8000 (H), it is provided with a means for substantially changing the output from the third selector and transmitting the addition value of the numerical value 0. A data multiplication device characterized by the above.
JP34560999A 1999-12-06 1999-12-06 Data multiplier Expired - Fee Related JP3499481B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34560999A JP3499481B2 (en) 1999-12-06 1999-12-06 Data multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34560999A JP3499481B2 (en) 1999-12-06 1999-12-06 Data multiplier

Publications (2)

Publication Number Publication Date
JP2001166919A JP2001166919A (en) 2001-06-22
JP3499481B2 true JP3499481B2 (en) 2004-02-23

Family

ID=18377762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34560999A Expired - Fee Related JP3499481B2 (en) 1999-12-06 1999-12-06 Data multiplier

Country Status (1)

Country Link
JP (1) JP3499481B2 (en)

Also Published As

Publication number Publication date
JP2001166919A (en) 2001-06-22

Similar Documents

Publication Publication Date Title
EP1094401A1 (en) Data calculating device
US9059726B2 (en) Apparatus and method for performing a convert-to-integer operation
JP3499481B2 (en) Data multiplier
US5796641A (en) System and table-based method for converting binary floating-point numbers to a decimal representation
JPH0145078B2 (en)
JPH0114610B2 (en)
EP1441277B1 (en) Electronic control apparatus
JPH0746959Y2 (en) Sound source device
JP2803506B2 (en) Divider
JP2822577B2 (en) Square root arithmetic unit
JPH043556B2 (en)
CN116865763A (en) High-linearity edge ramp wave generation device and method
US5412155A (en) Envelope generator for electronic musical instrument
JP2820701B2 (en) Conversion method to binary
JPH0381175B2 (en)
JP3078696B2 (en) Reciprocal arithmetic unit
JP2600266B2 (en) Address generator
JP2606580B2 (en) Numerical data calculation method
JP2578827B2 (en) Normalized multiplier
JPS6126135A (en) Conversion circuit of floating point data
JP2000081968A (en) Arithmetic unit for reciprocal
JP3551992B2 (en) Electronic musical instrument
JP2871509B2 (en) Signal processing device
JP2877597B2 (en) Spectrum analyzer
JP2575856B2 (en) Arithmetic circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081205

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081205

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091205

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees