JP2006338390A - Logarithm and square root transformation circuit - Google Patents

Logarithm and square root transformation circuit Download PDF

Info

Publication number
JP2006338390A
JP2006338390A JP2005162966A JP2005162966A JP2006338390A JP 2006338390 A JP2006338390 A JP 2006338390A JP 2005162966 A JP2005162966 A JP 2005162966A JP 2005162966 A JP2005162966 A JP 2005162966A JP 2006338390 A JP2006338390 A JP 2006338390A
Authority
JP
Japan
Prior art keywords
mant
logarithm
value
base
square root
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
JP2005162966A
Other languages
Japanese (ja)
Inventor
Kenichiro Kumagai
憲一郎 熊谷
Michiaki Arai
通明 新井
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.)
Advantest Corp
Original Assignee
Advantest Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advantest Corp filed Critical Advantest Corp
Priority to JP2005162966A priority Critical patent/JP2006338390A/en
Publication of JP2006338390A publication Critical patent/JP2006338390A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To attain a logarithmic transformation highly precisely with a circuit configuration without using a CORDIC circuit. <P>SOLUTION: The logarithmic transformation is performed by a detector of a bit position E for comparing binary data from higher-order bits and calculating and outputing a bit position E to be a first 1, a divider for taking a value obtained by dividing the data by the E-th power of 2 as a value of Mant, a storing means for preliminarily storing a base 2 logarithm of respective Mants in a table and reading the base 2 logarithm of Mant for a desired Mant with reference to the table, and an adding means for adding and outputing the logarithm of Mant read from the storing means to the calculated E. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、スペクトラム・アナライザなどに使用される高精度で高速に動作する対数および平方根変換回路に関するものである。   The present invention relates to a logarithmic and square root conversion circuit that operates at high speed with high accuracy and is used in a spectrum analyzer or the like.

スペクトラム・アナライザのデジタルIFの信号処理には、対数変換が使用される。
従来、その対数変換は、コーディック(CORDIC)回路により実現している。
Logarithmic conversion is used for signal processing of the digital IF of the spectrum analyzer.
Conventionally, the logarithmic conversion is realized by a codec (CORDIC) circuit.

しかし、CORDIC回路は、繰り返し計算により解を収束させていくので、高速かつ高精度を実現するには、多くの反復回数が必要となり、かなりの計算時間とそのためのハードウェア量を必要とする問題があった。
特許公開平7−121687
However, since the CORDIC circuit converges the solution by iterative calculation, a large number of iterations are required to achieve high speed and high accuracy, and a considerable amount of calculation time and a hardware amount for that are required. was there.
Patent Publication No. Hei 7-121687

本発明が解決しようとする問題点は、CORDIC回路を用いないでハードウェアを構成し、高精度で高速に対数変換ができるようにすることであり、またその対数変換の応用として平方根変換を実現する。   The problem to be solved by the present invention is to configure hardware without using a CORDIC circuit so that logarithmic transformation can be performed with high accuracy and at high speed, and square root transformation is realized as an application of the logarithmic transformation. To do.

本発明の第1は、2を底とする対数に変換する対数変換回路において、
2進数のデータを上位ビットから比較し、最初に1となるビット位置Eを求めて出力するEの検出器と、
該データを2のE乗で割った値をMantの値にとる除算器と、
各々のMantに対して2を底とする対数値をあらかじめテーブルに記憶しておき、
所望のMantに対してテーブルを参照して、2を底とするMantの対数値を読み出す記憶手段と、
該記憶手段から読み出したMantの対数値と前記求めたEとを加算出力する加算手段と、
を備え、前記データを、2を底とする対数に変換することを特徴とする対数変換回路。
本発明の第2は、平方根に変換する平方根変換回路において、
2進数のデータを上位ビットから比較し、最初に1となるビット位置Eを求めて出力するEの検出器と、
該データを2のE乗で割った値をMantの値にとる除算器と、
各々のMantに対して2を底とする対数値をあらかじめテーブルに記憶しておき、
所望のMantに対してテーブルを参照して、2を底とするMantの対数値を読み出す第1の記憶手段と、
該第1の記憶手段から読み出したMantの対数値を1ビット右へシフトして1/2とする第1のシフトレジスタと、
各々のMantの2を底とする対数値に対してMantの値をあらかじめテーブルに記憶しておき、所望のMantの2を底とする対数値に対してテーブルを参照して、Mantの値を読み出す第2の記憶手段と、
前記Eの検出器の出力Eを1ビット右へシフトしてE/2を出力する第2のシフトレジスタと、
前記第2の記憶手段から読み出したMantの値を左へE/2ビットシフトする第3のシフトレジスタと、
を具備して、前記データを平方根に変換する平方根変換回路。
A first aspect of the present invention is a logarithmic conversion circuit for converting to a logarithm with a base of 2,
An E detector that compares binary data from the high-order bits and obtains and outputs a bit position E that is first 1;
A divider that takes the value obtained by dividing the data by the power of 2 to the value of Mant;
For each Mant, logarithm values with base 2 are stored in advance in the table,
A storage means for referring to a table for a desired Mant and reading out a logarithmic value of Mant based on 2;
Adding means for adding and outputting the logarithm of Mant read from the storage means and the obtained E;
And a logarithmic conversion circuit for converting the data into a logarithm having a base of 2.
A second aspect of the present invention is a square root conversion circuit for converting to a square root.
An E detector that compares binary data from the high-order bits and obtains and outputs a bit position E that is first 1;
A divider that takes the value obtained by dividing the data by the power of 2 to the value of Mant;
For each Mant, logarithm values with base 2 are stored in advance in the table,
First storage means for referring to a table for a desired Mant and reading a logarithmic value of Mant with 2 as a base;
A first shift register that shifts the logarithm of Mant read from the first storage means to the right by 1 bit to ½,
Store the value of Mant in the table for each logarithm of base 2 of Mant, and refer to the table for the logarithm of base 2 of the desired Mant. Second storage means for reading;
A second shift register for shifting the output E of the E detector to the right by 1 bit and outputting E / 2;
A third shift register for shifting the value of Mant read from the second storage means to the left by E / 2 bits;
And a square root conversion circuit for converting the data into a square root.

本発明の対数および平方根変換回路は、簡単な回路構成と、アルゴリズムにもとづいて変換できるので、回路規模を小さくでき、また高速に高精度の変換結果が得られるという利点がある。   Since the logarithm and square root conversion circuit of the present invention can be converted based on a simple circuit configuration and an algorithm, the circuit scale can be reduced and a high-precision conversion result can be obtained at high speed.

本発明は、回路規模を小さく、また高速・高精度にデータ変換する目的を、記憶手段のROM、シフトレジスタ等を使用して実現した。   The object of the present invention is to realize the purpose of data conversion with a small circuit scale and high speed and high accuracy by using a ROM, a shift register or the like of a storage means.

最初に、本発明の対数変換回路例について説明する。
図1に示すように、本発明の対数変換回路のブロック図の一例は、Eの検出器1、除算器2、ROM3、可算器4で構成し、2を底とする対数変換をおこなう。
First, an example of the logarithmic conversion circuit of the present invention will be described.
As shown in FIG. 1, an example of a block diagram of a logarithmic conversion circuit according to the present invention includes an E detector 1, a divider 2, a ROM 3, and a adder 4, and performs logarithmic conversion with 2 as the base.

入力信号のデジタル・データDの2を底とする対数Log2Dを求める場合、10進数のDを式(1)のように分解すると、Mantのとりうる範囲は、式(2)に示すように1以上で2未満となる。 When obtaining the logarithm Log 2 D with 2 as the base of the digital data D of the input signal, if the decimal D is decomposed as shown in Equation (1), the range that Mant can take is as shown in Equation (2). 1 to less than 2.

D=2 *Mant・・・・・・・・・・・・・・・・・(1) D = 2 E * Mant ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (1)

1≦Mant<2 ・・・・・・・・・・・・・・・・・(2)
式(1)の対数をとると、Log2Dは、下記式(3)で求められる。
Log2 D=E+Log2Mant ・・・・・・・・・・・(3)
1 ≦ Mant <2 (2)
Taking the logarithm of equation (1), Log 2 D is obtained by equation (3) below.
Log 2 D = E + Log 2 Mant (3)

そこで、Eの検出器1において、2進数のデジタル・データDを上位ビットから比較し、最初に“1”となるビット位置をEの検出器1で検出してEを出力する。
次に、式(1)からわかるようにDを2のE乗で割った値がMantとなるので、除算器2において、2進数のDの値をEビット右へシフトした値を2進数のMantとする。
Therefore, in the E detector 1, the binary digital data D is compared from the upper bits, and the bit position that is first “1” is detected by the E detector 1 and output E.
Next, as can be seen from Equation (1), the value obtained by dividing D by 2 to the power of E is Mant. Therefore, in the divider 2, the value obtained by shifting the binary D value to the right by E bits is converted into the binary number. Let's say Mant.

ここで、所望のMantの値に対してLog2 Mantを読み出せるように、記憶手段のROM3にテーブルとしてあらかじめ記憶しておく。
そして、各々のMantに対してROM3のテーブルを参照することでMantの対数であるLog2Mantを求め出力する。
このMantの対数値とEの検出器1の出力したEとを加算器4で加算すると、その出力は(E+Log2Mant)となる。
Here, it is stored in advance as a table in the ROM 3 of the storage means so that Log 2 Mant can be read out with respect to a desired Mant value.
Then, Log 2 Mant, which is the logarithm of Mant, is obtained by referring to the table in ROM 3 for each Mant.
When the logarithmic value of Mant and E output from the detector 1 of E are added by the adder 4, the output becomes (E + Log 2 Mant).

従って、本発明により、デジタル・データDを対数変換した値Log2Dが出力として得られる。 Therefore, according to the present invention, the logarithmically converted value Log 2 D of the digital data D is obtained as an output.

デジタル・データDの値から、直接Log2Dを引くテーブルを作ると、回路が簡単になるが、テーブルが大きくなってしまい実用的でない。
そこで本発明においては、Mantの範囲が、式(2)で示すように、1以上で2未満となるので、ROM3に記憶するデータを小さくできる利点がある。
Making a table that directly subtracts Log 2 D from the value of digital data D simplifies the circuit, but the table becomes large and is not practical.
Therefore, in the present invention, since the range of Mant is 1 or more and less than 2 as shown in Expression (2), there is an advantage that the data stored in the ROM 3 can be reduced.

次に、本発明の対数変換回路の動作について、具体的な数値例により説明する。
例えば、2進数表示のデジタル・データD=1001(2)として、Dの2を底とする対数Log2 Dを求める場合で説明する。
2進数表示のデジタル・データD=1001(2)は、10進数の9(10)であり、式(1)に示すように分解すると、下記式(4)となる。
Next, the operation of the logarithmic conversion circuit of the present invention will be described with specific numerical examples.
For example, a case will be described where the logarithm Log 2 D with 2 as the base of D is obtained as binary digital data D = 1001 (2).
Digital data D = 1001 (2) in binary number is decimal number 9 (10), and when it is decomposed as shown in equation (1), the following equation (4) is obtained.

9=2*1.125 ・・・・・・・・・・・・(4)
Eの検出器1において、2進数のデジタル・データD=1001(2)を上位ビットから比較し、最初に“1”となるビット位置は、下位ビットから、0、1、2、3と数えて3ビット目となる。
つまり、Eの検出器1の出力Eの値は、2の3乗である3となる。
9 = 2 3 * 1.125 (4)
In the detector 1 of E, binary digital data D = 1001 (2) is compared from the upper bit, and the first bit position of “1” is counted as 0, 1, 2, 3 from the lower bit. The third bit.
That is, the value of the output E of the detector 1 of E is 3, which is the cube of 2.

次に、Eの検出器1の回路例について、図5を参照して説明する。
図5に示すように、Eの検出器1は、4ビットのデータからEを検出する回路で、3つのゲート21、ゲート22、ゲート23と、エンコーダ24とで構成している。
例えば、デジタル・データDが9(10)の場合、2進数の1001(2)入力に対して、エンコーダの入力(3つのゲート21、ゲート22、ゲート23の出力)は、2進数で1000(2)となり、エンコーダの出力(Eの検出器1の出力)Eは、2進数では0011(2)、10進数では3(10)となる。
また、デジタル・データDが7(10)の場合、2進数の0111(2)入力に対して、エンコーダの入力は0100(2)、エンコーダの出力(Eの検出器1の出力)Eは、2進数では0010(2)、10進数では2(10)となる。
Next, a circuit example of the E detector 1 will be described with reference to FIG.
As shown in FIG. 5, the E detector 1 is a circuit that detects E from 4-bit data, and includes three gates 21, 22, 23, and an encoder 24.
For example, when the digital data D is 9 (10), the input of the encoder (the outputs of the three gates 21, 22 and 23) is 1000 (binary) with respect to the binary 1001 (2) input. 2) and the output of the encoder (the output of the detector 1 of E) E is 0011 (2) in binary number and 3 (10) in decimal number.
Also, when the digital data D is 7 (10), the input of the encoder is 0100 (2) and the output of the encoder (the output of the detector 1 of E) E is The binary number is 0010 (2) and the decimal number is 2 (10).

また、除算器2により、2進数のデータD=1001(2)を3ビット右へシフトした2進数のMantの値は、1.001(2)となる。   Further, the binary Mant value obtained by shifting the binary data D = 1001 (2) to the right by 3 bits by the divider 2 is 1.001 (2).

次に、本発明の回路は、デジタル値で動作しているが、ROM3以下の動作を直感的にわかりやすい10進数表示で主として説明する。
2進数のMantの値1.001(2)は、10進数では1.125(10)である。
そして、この10進数のMantの値1.125(10)に対して、図3に示すROM3のテーブルを参照することで、Log2 (1.125)の値に対する参照データ0.170(10)が読み出される。
ここで、テーブルに記憶するデータの桁数は、必要とする誤差の範囲となるように決定する。
このLog2 (Mant)の値0.170(10)とEの検出器1の出力したE=3(10)とを加算器4で加算すると、その出力であるLog2 Dは、3.170(10)となる。
Next, although the circuit of the present invention operates with digital values, the operation after the ROM 3 will be mainly described with an intuitively easy-to-understand decimal number display.
The binary Mant value 1.001 (2) is 1.125 (10) in decimal.
The reference data 0.170 (10) corresponding to the value of Log 2 (1.125) is read by referring to the table of the ROM 3 shown in FIG. 3 with respect to the decimal mant value 1.125 (10).
Here, the number of digits of data stored in the table is determined so as to fall within the required error range.
When this Log 2 (Mant) value of 0.170 (10) and E = 3 (10) output from the E detector 1 are added by the adder 4, the output Log 2 D is 3.170 (10). Become.

従って、デジタル・データの1001(2)は10進数では9(10)であり、本発明の対数変換回路により2を底とする対数の値3.170(10)に変換できる。   Therefore, 1001 (2) of the digital data is 9 (10) in decimal number, and can be converted to a logarithmic value of 3.170 (10) with 2 as a base by the logarithmic conversion circuit of the present invention.

次に、本発明の対数変換回路の応用である、平方根変換回路について以下説明する。
本発明の平方根変換回路のブロック図は、図2に示すように、Eの検出器1、除算器2、ROM3、可算器4、シフトレジスタ5、シフトレジスタ6、シフトレジスタ7、ROM8とで構成している。
ここで、加算器4は、対数変換出力を得るためであり、平方根変換出力のみを得る場合は、無くてもよい。
Next, a square root conversion circuit, which is an application of the logarithmic conversion circuit of the present invention, will be described below.
As shown in FIG. 2, the block diagram of the square root conversion circuit of the present invention is composed of E detector 1, divider 2, ROM 3, adder 4, shift register 5, shift register 6, shift register 7, ROM 8. is doing.
Here, the adder 4 is for obtaining a logarithmic conversion output, and may be omitted when only a square root conversion output is obtained.

デジタル・データDを平方根(√D)に変換する場合として以下説明する。
ただし、Eの検出器1、除算器2、ROM3、可算器4の動作については、実施例1で説明しているので、この部分の詳細説明を省略する。
最初に、対数変換回路のROM3で、所望のデジタル・データDのLog2 Mantを読み出す。
A case where the digital data D is converted into a square root (√D) will be described below.
However, since the operation of the detector 1, the divider 2, the ROM 3, and the adder 4 of E has been described in the first embodiment, detailed description of this portion is omitted.
First, the Log 2 Mant of the desired digital data D is read out in the ROM 3 of the logarithmic conversion circuit.

次に、式(1)により、Log2 Dを1/2倍すると、下記式(5)となる。 Next, when Log 2 D is halved by the equation (1), the following equation (5) is obtained.

(1/2)Log2 D=Log2 (√D)・・・・・・・・・(5)
この式より、Dの平方根を求めるには、前の実施例1を用いてLog2 (D)を計算し、
その結果を 1/2して、y=Log2 (√D)の逆変換、つまり、(√D)=(2のy乗)を求める。
ここで、yを下記式(6)に示すように整数部と少数部とに分解する。
(1/2) Log 2 D = Log 2 (√D) (5)
From this equation, to find the square root of D, calculate Log 2 (D) using the previous Example 1,
The result is halved to obtain an inverse transformation of y = Log 2 (√D), that is, (√D) = (2 to the power of y).
Here, y is decomposed into an integer part and a decimal part as shown in the following formula (6).

y=整数部+少数部・・・・・・・・・・・・・(6)
すると、(√D)は、下記式(7)で表せる。
y = integer part + decimal part ... (6)
Then, (√D) can be expressed by the following formula (7).

(√D)=2の(整数部+少数部)乗
=2の整数部乗*2の少数部乗・・・・・・(7)
ここで、2の整数部乗は、整数部だけ左へビットシフトする。
また、2の少数部乗は、ROM8のテーブルを参照して読み出す。
そして、少数部の10進数での範囲は、下記式(8)となる。
(√D) = 2 to the power of (integer part + decimal part)
= Integer power of 2 * power of 2 decimal places (7)
Here, the integer power of 2 is bit-shifted to the left by the integer part.
The fractional power of 2 is read with reference to the table in the ROM 8.
And the range by the decimal number of a decimal part becomes following formula (8).

0≦少数部<1 ・・・・・・・・・・・・・(8)
また、2の少数部乗の10進数での範囲は、下記式(9)となる。
1≦2の少数部乗<2 ・・・・・・・・・・(9)
そして、2の少数部乗は、ROM3の出力Log2 Mantを1/2倍するため、2進数をシフトレジスタ5で1ビット右へシフトすると、(1/2) Log2 Mantとなる。
ここで、各々の(1/2) Log2 Mantの入力に対して、2の((1/2) Log2 Mant)乗を読み出せるように、記憶手段のROM8にテーブルとしてあらかじめ記憶しておく。
つまり、記憶手段のROM8は、記憶手段のROM3とは逆方向に引くテーブルとなる。
そして、所望の(1/2) Log2 Mantの入力に対してROM8のテーブルを参照することで2の((1/2) Log2 Mant)乗の値を読み出す。
一方、Eの検出器1で検出したEを1/2するため、2進数をシフトレジスタ6で右へ1ビットシフトし、E/2を出力する。
0 ≤ Minority <1 (8)
Moreover, the range in decimal number of 2 to the power of the decimal part is represented by the following formula (9).
1 ≦ 2 fractional power <2 (9)
Since the fractional power of 2 halves the output Log 2 Mant of the ROM 3, when the binary number is shifted 1 bit to the right by the shift register 5, (1/2) Log 2 Mant is obtained.
Here, for each (1/2) Log 2 Mant input, 2 ((1/2) Log 2 Mant) power is stored in advance as a table in the ROM 8 of the storage means. .
That is, the ROM 8 of the storage means is a table that is pulled in the opposite direction to the ROM 3 of the storage means.
Then, a value of 2 ((1/2) Log 2 Mant) is read by referring to the table of the ROM 8 with respect to a desired (1/2) Log 2 Mant input.
On the other hand, in order to halve the E detected by the E detector 1, the binary number is shifted one bit to the right by the shift register 6 and E / 2 is output.

そして、式(7)により、(2の整数部乗*2の少数部乗)を求めれば、デジタル・データDの平方根(√D)に変換できるので、2進数のROM8の出力データをシフトレジスタ7で(E/2)ビット左へシフトする。
実施例では、シフトレジスタを用いて構成しているが、乗算器をもちいても良い。
Then, by obtaining (the integer power of 2 * the power of the decimal part of 2) according to the equation (7), it can be converted into the square root (√D) of the digital data D, so that the output data of the binary ROM 8 is converted into a shift register. 7 shifts (E / 2) bits to the left.
In the embodiment, the shift register is used, but a multiplier may be used.

次に、本発明の動作について、具体的な数値例により主として2進数で説明する。
例えば、10進数の7(10)は、2進数表示のデジタル・データD=0111(2)であり、そのデータDの平方根(√D)を求める場合で説明する。
2進数のデジタル・データD=0111(2)は、式(1)に示すように分解すると、下記式(10)となる。
Next, the operation of the present invention will be described mainly in binary numbers using specific numerical examples.
For example, the decimal number 7 (10) is digital data D = 01111 (2) in binary number, and the case where the square root (√D) of the data D is obtained will be described.
When binary digital data D = 0111 (2) is decomposed as shown in equation (1), the following equation (10) is obtained.

0111(2)=2*1.1100(2)・・・・・・・・・・・・(10)
図4に示すROM3の2進数のテーブルを参照して、Mantの1.1100(2)に対して2進数データ1101(2)を読み出す。
その読み出した2進数1101(2)を、最上位ビットの前に計算上の少数点を付けて、Log2 Mantの0.1101(2)とする。
次に、シフトレジスタ5により、2進数の1101(2)を右へ1ビットシフトすると、(1/2) Log2 Mantは0.0110(2)となる。
図4に示すROM8のテーブル(2進数)において、 Log2 Mantの0110(2)をROM3とは逆方向に引くと、1.0101(2)が読み出される。
一方、Eの検出器1で検出したEは、10進数では2(10)であり、2進数では0010(2)である。
ここで、式(7)により、(√D)は2の少数部乗に2の整数部乗を掛け算することにより求められる。
つまり、2の小数部乗に2の整数部乗を掛算することは、2の小数部乗の2進数をシフトレジスタ7により、2の整数部つまり(E/2)ビットだけ左へビットシフトして、(√D)が求められる。
この例では、シフトレジスタ6により、2進数の0010(2)を右へ1ビットシフトすると、E/2は2進数の0001(2)となり、10進数では1(10)となる。
ただし、(E/2)に少数点以下が生じる場合は切り捨てることとする。
そこで、2の小数部乗である1.0101(2)に、2の整数部乗である2の1乗を掛算するので、シフトレジスタ7により、1.0101(2)を左へ1ビットシフトして、Dの平方根(√D)は10.101(2)に変換できる。
0111 (2) = 2 2 * 1.1100 (2) ... (10)
Referring to the binary number table of ROM 3 shown in FIG. 4, binary number data 1101 (2) is read out from Mant's 1.1100 (2).
The read binary number 1101 (2) is set to 0.11101 (2) of Log 2 Mant by adding a decimal point in calculation before the most significant bit.
Next, when the binary number 1101 (2) is shifted 1 bit to the right by the shift register 5, (1/2) Log 2 Mant becomes 0.0110 (2).
In the table (binary number) of the ROM 8 shown in FIG. 4, when the Log 2 Mant 0110 (2) is pulled in the opposite direction to the ROM 3, 1.0101 (2) is read out.
On the other hand, E detected by the detector 1 of E is 2 (10) in decimal number and 0010 (2) in binary number.
Here, (√D) is obtained by multiplying the power of 2 by the integer part of 2 by (7).
In other words, multiplying the fractional part of 2 by the integer part of 2 shifts the binary number of the fractional part of 2 to the left by the integer part of 2, that is, (E / 2) bits, by the shift register 7. Therefore, (√D) is obtained.
In this example, when the shift register 6 shifts the binary number 0010 (2) to the right by 1 bit, E / 2 becomes the binary number 0001 (2), and the decimal number becomes 1 (10).
However, if a decimal point or less occurs in (E / 2), it will be rounded down.
Therefore, since 1.0101 (2), which is the power of 2's fractional part, is multiplied by 2 to the power of 2, which is the power of the integer part, 1.0101 (2) is shifted 1 bit to the left by the shift register 7. Thus, the square root of D (√D) can be converted to 10.101 (2).

本発明は、高速測定が要求される製造ライン用の他の測定器などにも適用できる。   The present invention can also be applied to other measuring instruments for production lines that require high-speed measurement.

本発明の実施方法を示したブロック図である。(実施例1)It is the block diagram which showed the implementation method of this invention. Example 1 本発明の応用例を示したブロック図である。(実施例2)It is the block diagram which showed the application example of this invention. (Example 2) 本発明の10進数のグラフとテーブル例の図である。It is a figure of the graph and table example of the decimal number of this invention. 本発明2進数のテーブル例の図である。It is a figure of the example table of this invention binary number. 本発明のEの検出器の回路図例である。It is an example of a circuit diagram of the detector of E of the present invention.

符号の説明Explanation of symbols

1 Eの検出器
2 除算器
3 ROM
4 加算器
5、6、7 シフトレジスタ
8 ROM
21、22、23 ゲート
24 エンコーダ
1 E detector 2 Divider 3 ROM
4 Adder 5, 6, 7 Shift register 8 ROM
21, 22, 23 Gate 24 Encoder

Claims (2)

2を底とする対数に変換する対数変換回路において、
2進数のデータを上位ビットから比較し、最初に1となるビット位置Eを求めて出力するEの検出器と、
該データを2のE乗で割った値をMantの値にとる除算器と、
各々のMantに対して2を底とする対数値をあらかじめテーブル記憶しておき、
所望のMantに対してテーブルを参照して、2を底とするMantの対数値を読み出す記憶手段と、
該記憶手段から読み出したMantの対数値と前記求めたEとを加算出力する加算手段と、
を備え、前記データを、2を底とする対数に変換することを特徴とする対数変換回路。
In a logarithmic conversion circuit for converting to a logarithm with a base of 2,
An E detector that compares binary data from the high-order bits and obtains and outputs a bit position E that is first 1;
A divider that takes the value obtained by dividing the data by the power of 2 to the value of Mant;
For each Mant, logarithm values with base 2 are stored in a table beforehand.
A storage means for referring to a table for a desired Mant and reading out a logarithmic value of Mant based on 2;
Adding means for adding and outputting the logarithm of Mant read from the storage means and the obtained E;
And a logarithmic conversion circuit for converting the data into a logarithm having a base of 2.
平方根に変換する平方根変換回路において、
2進数のデータを上位ビットから比較し、最初に1となるビット位置Eを求めて出力するEの検出器と、
該データを2のE乗で割った値をMantの値にとる除算器と、
各々のMantに対して2を底とする対数値をあらかじめテーブル記憶しておき、
所望のMantに対してテーブルを参照して、2を底とするMantの対数値を読み出す第1の記憶手段と、
該第1の記憶手段から読み出したMantの対数値を1ビット右へシフトして1/2とする第1のシフトレジスタと、
各々のMantの2を底とする対数値に対してMantの値をあらかじめテーブルに記憶しておき、所望のMantの2を底とする対数値に対してテーブルを参照して、Mantの値を読み出す第2の記憶手段と、
前記Eの検出器の出力Eを1ビット右へシフトしてE/2を出力する第2のシフトレジスタと、
前記第2の記憶手段から読み出したMantの値を左へE/2ビットシフトする第3のシフトレジスタと、
を具備して、前記データを平方根に変換する平方根変換回路。
In a square root conversion circuit for converting to a square root,
An E detector that compares binary data from the high-order bits and obtains and outputs a bit position E that is first 1;
A divider that takes the value obtained by dividing the data by the power of 2 to the value of Mant;
For each Mant, logarithm values with base 2 are stored in a table beforehand.
First storage means for referring to a table for a desired Mant and reading a logarithmic value of Mant with 2 as a base;
A first shift register that shifts the logarithm of Mant read from the first storage means to the right by 1 bit to ½,
Store the value of Mant in the table for each logarithm of base 2 of Mant, and refer to the table for the logarithm of base 2 of the desired Mant. Second storage means for reading;
A second shift register for shifting the output E of the E detector to the right by 1 bit and outputting E / 2;
A third shift register for shifting the value of Mant read from the second storage means to the left by E / 2 bits;
And a square root conversion circuit for converting the data into a square root.
JP2005162966A 2005-06-02 2005-06-02 Logarithm and square root transformation circuit Withdrawn JP2006338390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005162966A JP2006338390A (en) 2005-06-02 2005-06-02 Logarithm and square root transformation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005162966A JP2006338390A (en) 2005-06-02 2005-06-02 Logarithm and square root transformation circuit

Publications (1)

Publication Number Publication Date
JP2006338390A true JP2006338390A (en) 2006-12-14

Family

ID=37558890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005162966A Withdrawn JP2006338390A (en) 2005-06-02 2005-06-02 Logarithm and square root transformation circuit

Country Status (1)

Country Link
JP (1) JP2006338390A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455302A (en) * 2012-05-31 2013-12-18 上海华虹集成电路有限责任公司 Circuit for realizing logarithm operation by using hardware

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455302A (en) * 2012-05-31 2013-12-18 上海华虹集成电路有限责任公司 Circuit for realizing logarithm operation by using hardware

Similar Documents

Publication Publication Date Title
US20160313976A1 (en) High performance division and root computation unit
KR100498457B1 (en) The improved method of compressing look up table for reducing memory and non-linear function generating apparatus having look up table compressed using the method and the non-linear function generating method
CN116466910A (en) Floating point number-based table lookup method and device, electronic equipment and storage medium
US9851947B2 (en) Arithmetic processing method and arithmetic processor having improved fixed-point error
Mansour et al. A new hardware implementation of base 2 logarithm for FPGA
JP3551113B2 (en) Divider
CN107992284A (en) A kind of division function implementation method of programming device
US8868633B2 (en) Method and circuitry for square root determination
WO2017096516A1 (en) Calibration of interpolating string digital-to-analog converters
JP2006338390A (en) Logarithm and square root transformation circuit
CN110784226B (en) Data processing method and data processing device based on PCM compression coding
CN116594589A (en) Method, device and arithmetic logic unit for floating point number multiplication calculation
JP2010067251A (en) Integer division circuit with allowable error
CN114201140B (en) Exponential function processing unit, method and neural network chip
JP2008257407A (en) Logarithmic computing unit and logarithmic computing method
JP4696920B2 (en) DDS signal generator
KR20030067982A (en) SQRT device capable of reducing error
US20140164460A1 (en) Digital signal processing apparatus and processing method thereof
JP2005227811A (en) Approximation circuit
Pitchika et al. Fast Base Extension using Single Redundant Modulus in a Residue Number System
US7277906B2 (en) Method for determining an output value having a lowest error value from an input value
JP5305392B2 (en) IQ data square sum route calculation means
JP2008158855A (en) Correlation computing element and correlation computing method
KR100600699B1 (en) The device of operating the square root which is used in the hardware
US20100293211A1 (en) Apparatus and method for generating mean value

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