JP2004192180A - Real number-logarithm transformation circuit - Google Patents

Real number-logarithm transformation circuit Download PDF

Info

Publication number
JP2004192180A
JP2004192180A JP2002357461A JP2002357461A JP2004192180A JP 2004192180 A JP2004192180 A JP 2004192180A JP 2002357461 A JP2002357461 A JP 2002357461A JP 2002357461 A JP2002357461 A JP 2002357461A JP 2004192180 A JP2004192180 A JP 2004192180A
Authority
JP
Japan
Prior art keywords
value
real
read
table memory
logarithmic
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
JP2002357461A
Other languages
Japanese (ja)
Inventor
Akihiko Okutsu
明彦 奥津
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 JP2002357461A priority Critical patent/JP2004192180A/en
Publication of JP2004192180A publication Critical patent/JP2004192180A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the capacity of a transformation table memory in a real number-logarithm transformation circuit for performing the mutual transformation of real number and logarithm by use of the transformation table memory. <P>SOLUTION: This circuit comprises the transformation table memory 1 storing a real number value and a logarithmic value corresponding to the real number value as a set in the same address; a read address counter 3 for starting counting operation by updating of an inputted real number value, and outputting the count content as the read address RADR of the transformation table memory 1; and a comparator 2 for comparing the inputted real number value with the real number value read from the transformation table memory, and stopping the counting operation of the read address counter 3 when they are mutually matched or matched within an allowable error range as the result of comparison. The logarithmic value read from the transformation table memory 1 in the stopping of the counting operation is taken as a transformed logarithmic output. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、実数から対数に又対数から実数に変換テーブルメモリを用いて変換する実数−対数変換回路に関する。
【0002】
【従来の技術】
信号処理分野等に於ける増幅率や電力値を効率良く取り扱う為に、対数値を用いる場合が多い。その為に実数を対数に変換する手段が必要となる。従って、実数を対数に変換する為の演算処理回路を用いる場合が一般的であったが、構成を簡単化する為に、変換テーブルを用いた構成が知られている(例えば、特許文献1参照)。即ち、実数に対応する対数を、実数をアドレスとしたメモリの領域に格納し、入力した実数をアドレスとして対数を読出すことにより、実数を対数に変換するものである。
【0003】
例えば、図24に示すように、実数を16ビット構成とし、対数を10ビット構成とすると、アドレス数=65536のメモリ領域に、実数に対応する対数を格納した変換テーブルメモリを用いることになる。この場合、変換テーブルメモリの総ビット数は640kビットとなる。
【0004】
【特許文献1】
特開昭55−95181号公報
【0005】
【発明が解決しようとする課題】
従来例の図24に示す変換テーブルメモリに於いて、前述のように、16ビット構成の実数を、10ビット構成の対数(0〜64、ステップ0.0625)に変換する場合、1024種類の対数が得られるに過ぎないものである。従って、アドレス数が65536の中の1024を利用する状態となり、異なるアドレスに同一の対数が格納されていることになる。
【0006】
従って、変換テーブルメモリとしての変換効率が低く、余分なメモリ領域を確保する必要があり、コストアップとなる問題がある。又16ビット構成の実数の上位10ビットを用いてアドレス数を1024とすることも考えられるが、変換精度が低下する問題がある。
【0007】
本発明は、前述の従来の問題を解決するもので、従来と同一の変換精度でメモリ容量を削減することを目的とする。
【0008】
【課題を解決するための手段】
本発明の実数−対数変換回路は、図1を参照して説明すると、実数値と、この実数値に対応した対数値とを同一アドレスに格納した変換テーブルメモリ1と、入力実数値の更新によりカウント動作を開始し、カウント内容を変換テーブルメモリの読出アドレスRADRとして出力する読出アドレスカウンタ3と、入力実数値と変換テーブルメモリから読出した実数値とを比較し、比較一致又は許容誤差範囲内の一致により、読出アドレスカウンタ3のカウント動作を停止させて、変換テーブルメモリ1から読出した対数値を変換対数出力とする為の比較器2とを備えている。
【0009】
又入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、この第2の比較器から、入力実数値が閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウント動作を開始する読出アドレスカウンタとを備えることができる。又変換テーブルメモリは、実数値の差分又は対数値の差分との何れか一方又は両方を同一アドレスに格納した構成を有し、変換テーブルメモリから読出した実数値の差分又は対数値の差分を順次加算して実数値又は対数値として出力する手段を備えることができる。
【0010】
又対数値をアドレスとして実数値を格納した変換テーブルメモリと、入力実数値と変換テーブルメモリから読出した実数値とを比較する比較器と、入力実数値の更新によりカウント動作を開始して対数値の読出アドレスを出力し、比較器からの比較一致又は許容誤差範囲内の一致によりカウント動作を停止し、対数値の読出アドレスを、変換対数出力とする読出アドレスカウンタとを備えることができる。又入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、この第2の比較器から入力実数値が閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウントを開始して対数のアドレスを出力する読出アドレスカウンタとを備えることができる。
【0011】
【発明の実施の形態】
図1は本発明の第1の実施の形態の説明図であり、1は変換テーブルメモリ、2は比較器、3は読出アドレスカウンタを示す。又RADRは読出アドレス、R実数は読出実数値、ENは比較器2からのカウントイネーブル信号、acは入力実数値の更新時の制御信号を示す。
【0012】
変換テーブルメモリ1は、実数値とこの実数値に対応した対数値とを同一アドレスに格納した構成を有するもので、例えば、16ビット構成の実数値と10ビット構成の対数値との26ビットを1ワードとして格納し、アドレス数を1024とすると、総ビット数は26kビットとなる。即ち、前述の従来の変換テーブルメモリの総ビット数は640kビットであるから、これに比較して約4%に総ビット数を削減することができる。従って、半導体チップに組み込む場合の必要面積を飛躍的に縮小することができる。
【0013】
又読出アドレスカウンタ3は、入力実数値の更新時の制御信号acによりカウント内容をクリアし、比較器2からのカウントイネーブル信号ENに従ってカウント動作を開始する構成とすることができる。この読出アドレスカウンタ3のカウント内容を、変換テーブルメモリ1の読出アドレスRADRとする。変換テーブルメモリ1からは、この読出アドレスRADRに従って、R実数と対数出力として示すように、実数値とそれに対応する対数値とが読出される。
【0014】
又比較器2は、対数に変換する為の入力実数値と、変換テーブルメモリ1から読出したR実数として示す読出実数値とを比較し、入力実数値<R実数となるまで、読出アドレスカウンタ3にカウントイネーブル信号ENを入力する。そして、この条件となった時に、読出アドレスカウンタ3のカウント動作を停止し、その時の読出アドレスRADRに従って変換テーブルメモリ1から読出された対数値を、入力実数値に対する変換対数出力とする。この場合、読出アドレスカウンタ3からの読出アドレスRADRにより、実数値と対数値とが読出されるが、対数値については、読出アドレスカウンタ3のカウント動作を停止した時の読出対数値をラッチする構成を設けることができる。
【0015】
図2はアドレスと実数との関係曲線図であり、変換テーブルメモリ1のアドレスと格納した実数との関係を示し、又図3はアドレスと対数との関係曲線図であり、変換テーブルメモリ1のアドレスと格納した対数との関係を示す。又図4は、変換テーブルメモリ1に格納した実数と対数との関係の一例を示すもので、実数0〜65535と対数0〜770との対応関係を示す。
【0016】
図5は本発明の第2の実施の形態の説明図であり、図1と同一符号は同一機能部分を示し、4は第2の比較器である。この第2の比較器4は、入力実数値と閾値とを比較した判定信号を、入力実数値≦閾値の関係の場合に“0”、入力実数値>閾値の関係の場合に“1”とする。読出アドレスカウンタ3は、この判定信号と、実数値更新時の制御信号acとにより、判定信号が“0”の場合は、図1に示す実施の形態と同様に、読出アドレスカウンタ3をクリア(リセット)するが、判定信号が“1”の場合は、ロード用アドレスとして、例えば、読出アドレスカウンタ3のカウント内容の中間値等を予め定めてロードし、読出アドレスカウンタ3のカウントアップを開始する。即ち、入力実数値が閾値を超えている場合は、変換テーブルメモリ1の読出アドレスRADRを、最下位アドレス位置から順次アクセスするのではなく、中間アドレス位置からアクセス開始することにより、対数変換に要する時間を短縮するものである。
【0017】
図6は本発明の第3の実施の形態の説明図であり、図1及び図5と同一符号は同一機能部分を示す。この実施の形態に於ける読出アドレスカウンタ3は、ロード用アドレス最大値をロードした時に、アップカウントからダウンカウントにカウント動作を切替える構成を有し、第2の比較器4に於いて、入力実数値と閾値とを比較し、前述と同様に、入力実数値≦閾値の関係の場合に“0”、入力実数値>閾値の関係の場合に“1”の判定信号を読出アドレスカウンタ3に入力し、実数値更新時の制御信号acにより、判定信号が“1”の場合、読出アドレスカウンタ3にロード用アドレス最大値をロードして、ダウンカウントに切替える。従って、変換テーブルメモリ1の最上位アドレス位置から順に下位アドレス方向に向かってアクセスを開始することになる。それにより、最下位アドレス位置から最上位アドレス方向に向かってアクセスする場合に比較して、対数変換に要する時間を短縮することができる。
【0018】
図7は本発明の第4の実施の形態の説明図であり、前述の各実施の形態の各図と同一符号は同一機能部分を示し、5は近似アドレス算出部である。この近似アドレス算出部は、例えば、入力実数値をx、近似アドレスをyとした時に、x<1000の条件では、y=0.4x、又x≧1000の条件では、y=0.0023x+390とすることができる。この近似アドレス算出部5に於いて入力実数値に基づいて算出した近似アドレスを、実数値更新時の制御信号acのタイミングで読出アドレスカウンタ3にロードして、カウント動作を開始させる。従って、入力実数値に対応するアドレスに近いアドレス位置から変換テーブルメモリ1に対するアクセスが開始される。従って、対数変換に要する時間を更に短縮することができる。
【0019】
図8は本発明の第5の実施の形態の説明図であり、前述の各実施の形態の各図と同一符号は同一機能部分を示し、6は粗密モード判定部を示す。この粗密モード判定部6は、比較器2からの入力実数値と変換テーブルメモリ1から読出したR実数とを比較して、差分が大きい時に、粗密モード信号は粗を示す信号として読出アドレスカウンタ3に入力し、差分が小さくなると、粗密モード信号は密を示す信号として読出アドレスカウンタ3に入力する。
【0020】
読出アドレスカウンタ3は、粗/密ステップ値が入力されており、粗密モード信号が粗を示す時は、粗ステップ値に従ったステップ、例えば、+20としてカウントアップを行い、変換テーブルメモリ1からのR実数と入力実数値との差分が小さくなると、粗密モード信号は密を示すことにより、密ステップ値に従ったステップ、例えば、+1としてカウントアップする。従って、入力実数値に近いR実数の読出し為の読出アドレスを、順次カウントアップして出力する場合に比較して迅速化することができる。
【0021】
図9は本発明の第6の実施の形態の説明図であり、前述の各実施の形態の各図と同一符号は同一機能部分を示し、7は加算器、8は保持器を示す。この実施の形態の変換テーブルメモリ1は、実数値と対数値とを組とする代わりに、アドレス間の実数値の差分と対数値とを組として格納したものである。従って、読出アドレスカウンタ3からの読出アドレスRADRにより読出されたR実数差分を加算器7に入力し、保持器8に保持された前回の加算結果とを加算することにより、今回の読出実数値が得られる。この読出実数値と入力実数値とを比較器2に於いて比較し、入力実数値<読出実数値となった時点で読出アドレスカウンタ3のカウント動作を停止して、その時の読出対数値を変換対数出力とする。従って、変換テーブルメモリ1に、実数差分と対数とを組として格納するものであるから、実数と対数とを組として格納する場合に比較して、差分に相当するビット数分を少なくして、更に総ビット数を削減することができる。
【0022】
図10は本発明の第7の実施の形態の説明図であり、前述の各実施の形態の各図と同一符号は同一機能部分を示し、9は加算器、10は保持器を示す。この実施の形態の変換テーブルメモリ1は、実数値と対数値とを組とする代わりに、実数値とアドレス間の対数値の差分とを組として格納したものである。従って、読出アドレスカウンタ3からの読出アドレスRADRにより読出されたR対数差分を加算器9に入力し、保持器10に保持された前回の加算結果とを加算することにより、今回の読出対数値となる。従って、実数値と対数値とを組として格納する場合に比較して、対数値の差分として格納する分だけ、総ビット数を削減することができる。又比較器2と読出アドレスカウンタ3との制御構成については、前述の各実施の形態に於ける制御構成を適用することも可能である。
【0023】
図11は本発明の第8の実施の形態の説明図であり、図9及び図10と同一符号は同一部分を示し、重複した動作の説明は省略する。この実施の形態は、図9に示す実施の形態と、図10に示す実施の形態とを組合せた構成に相当し、変換テーブルメモリ1は、アドレス間の実数値差分と対数値差分とを組として格納する。それによって、変換テーブルメモリ1の総ビット数を更に削減することができる。又比較器2と読出アドレスカウンタ3とにより、変換テーブルメモリ1をアクセスする制御構成は、前述の各実施の形態に於ける制御構成を適用することも可能である。
【0024】
図12は本発明の第9の実施の形態の説明図であり、実数から対数への変換及び対数から実数への変換を可能とした構成を示し、1は変換テーブルメモリ、2は比較器、3は読出アドレスカウンタ、11は選択切替回路、12はセレクタ(SEL)、acは入力値の更新時の制御信号、s1,s2は実数と対数との何れかに切替える切替信号を示す。
【0025】
変換テーブルメモリ1は、前述の実施の形態と同様に、実数値と対数値とを組として格納した構成とし、実数から対数に変換する場合は、切替信号s1,s2を実数に切替える信号とする。それにより、セレクタ12は入力実数値を選択して比較器2に入力する。又選択切替回路11は、変換テーブルメモリ1からの読出値の中の実数値を比較器2に入力し、対数値を変換出力とする。従って、読出アドレスカウンタ3からの読出アドレスRADRに従って、変換テーブルメモリ1から読出された実数値と対数値との組の中の実数値が選択切替回路11を介して比較器2に入力される。それにより、入力実数値と読出実数値とを比較し、比較結果に応じて読出アドレスカウンタ3のカウント動作を継続し、入力実数値と読出実数値とが等しくなった時、又は読出実数値が入力実数値を超えた時、即ち、比較一致の時又は許容誤差範囲内の一致の時に、読出対数値を出力する。
【0026】
又切替信号s1,s2を対数に切替える信号とすると、セレクタ12は、入力対数値を選択して比較器2に入力する。又選択切替回路11は、変換テーブルメモリ1からの読出値の中の対数値を比較器2に入力し、実数値を変換出力とする。従って、読出アドレスカウンタ3からの読出アドレスRADRに従って変換テーブルメモリ1から読出された実数値と対数値との組の中の対数値が選択切替回路11を介して比較器2に入力されて、入力対数値と読出対数値とを比較し、読出アドレスカウンタ3のカウント動作に従って、入力対数値と読出対数値とが等しくなった時、又は入力対数値を読出対数値が超えた時に、読出アドレスカウンタ3のカウント動作を停止して、その時の読出実数値を変換実数値として出力する。
【0027】
図13は本発明の第10の実施の形態の説明図であり、変換テーブルメモリ1には、実数値のみを格納する。又読出アドレスカウンタ3は、前述の各実施の形態と同様に、入力実数値の更新時の制御信号acによってクリアして、カウント動作を開始するものであるが、カウントのステップは、単純に+1のようにカウントアップするものではなく、対数値に従ったカウント内容となるようにカウントアップする構成とするもので、通常のカウンタにカウントステップを制御する簡単な論理回路を付加することにより実現することができる。
【0028】
従って、読出アドレスカウンタ3からの読出アドレスRADRは、対数値を示すものであるから、変換テーブルメモリ1は、対数値をアドレスとして実数値を格納した構成とする。そして、読出したR実数と入力実数値とを比較器2により比較し、入力実数値とR実数とが等しくなった時、又は入力実数値をR実数が超えた時に、比較器2からのカウントイネーブル信号ENによって読出アドレスカウンタ3のカウント動作を停止し、その時の読出アドレスRADRを変換対数出力とするものである。
【0029】
図14は本発明の第11の実施の形態の説明図であり、図5に示す実施の形態と制御構成は同一であるが、変換テーブルメモリ1は、図13に示す実施の形態と同様に、読出アドレスカウンタ3からの読出アドレスRADRを対数値とし、そのアドレス対応に実数値を格納したものである。従って、比較器2により、入力実数値と変換テーブルメモリ1から読出したR実数とが等しい時又は入力実数値をR実数が超えた時の読出アドレスカウンタ3からの読出アドレスRADRを、変換対数出力とすることができる。
【0030】
又第2の比較器4により入力実数値と閾値とを比較し、入力実数値が閾値を超えていない時は、第2の比較器4からの判定信号によって、読出アドレスカウンタ3は、入力実数値の更新による制御信号acによりクリアされて、カウントアップを開始し、又入力実数値が閾値を超えている場合は、ロード用アドレスをロードしてカウントアップを開始する。それにより、入力実数値が閾値を超える大きい値の場合に、ロード用アドレスからカウントアップを開始することにより、変換処理時間を短縮することができる。
【0031】
図15は本発明の第12の実施の形態の説明図であり、図6に示す実施の形態と制御構成は同一であり、重複した説明は省略するが、変換テーブルメモリ1は、図13に示す実施の形態と同様に、読出アドレスカウンタ3からの読出アドレスRADRを対数値とし、そのアドレス対応に実数値を格納したものである。又読出アドレスカウンタ3は、第2の比較器4からの判定信号に従って、ロード用アドレス最大値をロード可能とし、且つアップカウントとダウンカウントとの切替えが可能の構成とする。
【0032】
そして、入力実数値が閾値を超えていない時の第2の比較器4からの判定信号と制御信号acとにより、読出アドレスカウンタ3をクリアして、対数値としての読出アドレスRADRが得られるようにアップカウントを開始させ、入力実数値が閾値を超えている時は、第2の比較器4からの判定信号と制御信号acとにより、読出アドレスカウンタ3に、ロード用アドレス最大値をロードし、且つダウンカウント動作に切替える。
【0033】
又比較器2は、入力実数値とR実数とが等しくなった時に、カウントイネーブル信号ENにより読出アドレスカウンタ3のカウントを停止する構成とするものであるが、入力実数値とR実数とが完全に等しくならなくても、許容誤差範囲の差分が得られた時に、入力実数値とR実数とが等しくなったとして、読出アドレスカウンタ3のカウントを停止させる構成とすることができる。このような構成により、変換テーブルメモリ1として必要な総ビット数を削減し、入力実数値が大きい場合も、対数変換に要する時間を短縮することができる。
【0034】
図16は本発明の第13の実施の形態の説明図であり、図7に示す実施の形態と制御構成は同一であり、重複した説明は省略するが、変換テーブルメモリ1は、図13に示す実施の形態と同様に、対数値をアドレスとして実数値を格納した構成を有するものである。又近似アドレス算出部15は、図7に於ける近似アドレス算出部5に対応し、入力実数値に対応する近似読出アドレスを算出する機能を有するものであるが、この実施の形態に於いては、読出アドレスRADRは対数値とするものであるから、入力実数値から近似対数を算出して読出アドレスカウンタ3にロードする。従って、入力実数値近傍のアドレスから実数値を読出すことができるので、変換に要する時間を短縮することができる。
【0035】
図17は本発明の第14の実施の形態の説明図であり、図8に示す実施の形態と制御構成は同一であり、重複した説明は省略するが、変換テーブルメモリ1は、図13〜図16に示す実施の形態と同様に、対数値をアドレスとして実数値を格納した構成を有するものである。又粗密モード判定部16は、図8に於ける粗密モード判定部6と同様の機能を有するものである。従って、入力実数値と変換テーブルメモリ1から読出したR実数との差が大きい時に、読出アドレスカウンタ3のカウントアップのステップを粗とし、差が小さくなった時に、カウントアップのステップを密として、入力実数値を高速に且つ精度良く対数に変換することができる。
【0036】
図18は本発明の第15の実施の形態の説明図であり、図9に示す実施の形態と制御構成は同一であり、重複した説明は省略するが、変換テーブルメモリ1は、対数値をアドレスとし、アドレス間の実数値の差分を格納した構成を有するものである。従って、実数値を格納した場合に比較して、更に総ビット数を削減することができる。そして、変換テーブルメモリ1からは、実数値差分がR実数差分として示すように読出されるから、加算器17と保持器18とにより、実数値を復元し、比較器2に入力する。この比較器2に於いては、入力実数値と、保持器18からの実数値とを比較し、比較一致又は許容範囲の比較差分となった時に、読出アドレスカウンタ3によるカウントを停止させ、その時の読出アドレスRADRを、変換対数出力とする。
【0037】
図19は本発明の第16の実施の形態の説明図であり、変換テーブルメモリ1は、対数値をアドレスとして実数値を格納し、且つ実数値が同一の格納アドレスをスキップする為の“0”等の制御符号を格納している。そして、入力実数値の更新時の制御信号acにより読出アドレスカウンタ3をクリアして、カウントアップを開始させ、比較器2により入力実数値と、変換テーブルメモリ1からのR実数とを比較し、比較一致又は許容範囲の比較誤差となった時に、カウントイネーブル信号ENにより読出アドレスカウンタ3のカウント動作を停止させて、その時の読出アドレスRADRを変換対数として出力するもので、その過程に於いて、変換テーブルメモリ1から、実数値と共に制御符号が読出された時に、読出アドレスカウンタ3に於けるカウントアップを、制御符号がなくなるまで読出アドレスRADRをスキップさせる。又はジャンプ先アドレスを格納し、このジャンプ先アドレスを読出した時に、読出アドレスカウンタ3にロードして、読出アドレスRADRをジャンプさせ、それ以降は通常のカウントアップを行うことができる。このような制御構成により、実数から対数に変換する変換時間を短縮することができる。
【0038】
図20は本発明の第17の実施の形態の説明図であり、前述の各実施の形態に於ける符号と同一符号は同一機能部分を示し、変換テーブルメモリ1は、対数値をアドレスとして実数値を格納したものであるが、同一実数値となるアドレスを省略した構成とし、そのアドレスのスキップ数を累算器21に入力する。又読出アドレスカウンタ3は、入力実数値更新時にクリアし、入力実数値とR実数とを比較する比較器2からのカウントイネーブル信号ENに従ってカウントアップし、カウント内容を読出アドレスRADRとする。加算器22は、読出アドレスRADRが、対数として順次増加する場合は、そのまま変換対数出力とするものであるが、変換テーブルメモリ1のアドレスを省略した個数を累算器21により累算し、累算結果を加算器22に入力して、読出アドレスRADRに対数値となるように加算処理する。この場合、変換テーブルメモリ1には、同一実数値を格納しないので、更に総ビット数を削減することができる。
【0039】
図21は本発明の第18の実施の形態の説明図であり、図18に示す実施の形態と、図19に示す実施の形態とを組合せた実施の形態に相当し、重複した動作の説明は省略する。変換テーブルメモリ1には、前述のように、対数値をアドレスとして実数値の差分を格納し、同一実数値となるアドレス、即ち、差分が0となるアドレスをスキップする為に、制御符号の一つとして、次アドレス値を格納し、この次アドレス値を読出した時に、読出アドレスカウンタ3にロードして、読出アドレスカウンタ3からの読出アドレスRADRをスキップさせて、変換テーブルメモリ1に対するアクセスを高速化することができる。
【0040】
図22は本発明の第19の実施の形態の説明図であり、図18に示す実施の形態と、図20に示す実施の形態とを組合せた実施の形態に相当し、重複した動作説明は省略する。変換テーブルメモリ1は、対数値をアドレスとして実数値差分を格納し、同一実数値を示す実数差分0のアドレスを省略した構成とし、そのアドレスのスキップ数を累算器21に入力する。加算器22は、読出アドレスRADRが、対数として順次増加する場合は、そのまま対数出力とするものであるが、変換テーブルメモリ1のアドレスを省略した個数を累算器21により累算し、累算結果を加算器22に入力して、読出アドレスRADRに対数値となるように加算処理する。又入力実数値と、読出した実数差値分を順次加算した実数値とを比較器2により比較して、比較一致又は許容誤差範囲内の一致により、カウントイネーブル信号ENにより、読出アドレスカウンタ3のカウントを停止させ、その時の読出アドレスRADRに対して、加算器22による加算処理により、対数を求めて変換対数出力とする。
【0041】
図23は本発明の第20の実施の形態の説明図であり、前述の各実施の形態に於ける符号と同一符号は同一機能部分を示し、25はセレクタ(SEL)、s3は選択信号を示す。変換テーブルメモリ1は、対数のアドレスに対して実数値を格納した構成を有し、セレクタ25は、選択信号s3に従って、読出アドレスカウンタ3からの読出アドレスRADRと、入力対数値とを選択して、変換テーブルメモリ1の読出アドレスとする。
【0042】
例えば、実数から対数に変換する場合は、選択信号s3によりセレクタ25は読出アドレスカウンタ3からの読出アドレスRADRを選択出力して、変換テーブルメモリ1をアクセスし、入力実数値と、変換テーブルメモリ1から読出したR実数とを比較器2により比較し、比較一致又は許容誤差範囲内の一致により、カウントイネーブル信号ENにより読出アドレスカウンタ3のカウントを停止させて、その時の読出アドレスRADRを、セレクタ25を介して変換した対数として出力する。
【0043】
又対数から実数に変換する場合は、選択信号s3によりセレクタ25は、入力対数値を選択して、変換テーブルメモリ1に対する読出アドレスとして入力し、変換テーブルメモリ1から読出したR実数を、変換した実数値として出力する。即ち、変換テーブルメモリ1を用いて、実数から対数への変換と、対数から実数への変換との切替えを行うことができる。
【0044】
本発明は、前述の各実施の形態のみに限定されるものではなく、各実施の形態の組合せや他の制御構成との組合せも可能である。又変換テーブルメモリ1は、各種のROM(リードオンリーメモリ)構成とすることができる。
【0045】
(付記1)実数値と該実数値に対応した対数値とを同一アドレスに格納した変換テーブルメモリと、入力実数値の更新によりカウント動作を開始し、カウント内容を前記変換テーブルメモリの読出アドレスとして出力する読出アドレスカウンタと、前記入力実数値と前記変換テーブルメモリから読出した実数値とを比較し、比較一致又は許容誤差範囲内の一致により前記読出アドレスカウンタのカウント動作を停止させて、前記変換テーブルメモリから読出した対数値を変換対数出力とする為の比較器とを備えたことを特徴とする実数−対数変換回路。
(付記2)前記入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、該第2の比較器から前記入力実数値が前記閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウント動作を開始する読出アドレスカウンタとを備えたことを特徴とする付記1記載の実数−対数変換回路。
【0046】
(付記3)前記入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、該第2の比較器による前記入力実数値が前記閾値を超えないことを示す判定信号により、アップカウント動作を開始し、前記入力実数値が前記閾値を超えたことを示す判定信号により、アドレス最大値をロードしてダウンカウント動作を開始して、前記変換テーブルメモリの読出アドレスを出力する読出アドレスカウンタとを備えたことを特徴とする付記1記載の実数−対数変換回路。
(付記4)前記入力実数値を基に前記変換テーブルメモリから実数値を読出す為の近似アドレスを算出する近似アドレス算出部と、該近似アドレス算出部により算出した近似アドレスをロードしてカウント動作を開始し、前記変換テーブルメモリの読出アドレスを出力する読出アドレスカウンタとを備えたことを特徴とする付記1記載の実数−対数変換回路。
【0047】
(付記5)前記入力実数値と前記変換テーブルメモリから読出した実数値とを比較する比較器と、該比較器の比較差分に対応した粗密モード信号を出力する粗密モード判定部と、前記入力実数値の更新時にクリアしてカウント動作を開始し、前記入力実数値と前記変換テーブルメモリから読出した実数値との差分が大きい時の粗密モード信号によりカウントステップの大きい粗ステップ値をカウントし、前記入力実数値と前記変換テーブルメモリから読出した実数値との差分が小さい時の粗密モード信号によりカウントステップの小さい密ステップ値をカウントする読出アドレスカウンタとを備えたことを特徴とする付記1記載の実数−対数変換回路。
(付記6)前記変換テーブルメモリは、前記実数値の差分又は対数値の差分との何れか一方又は両方を同一アドレスに格納した構成を有し、前記変換テーブルメモリから読出した前記実数値の差分又は対数値の差分を順次加算して実数値又は対数値として出力する手段を有することを特徴とする付記1記載の実数−対数変換回路。
(付記7)実数から対数への変換時に入力実数値を選択出力し、対数から実数への変換時に入力対数値を選択出力するセレクタと、実数値と該実数値に対応した対数値とを同一アドレスに格納した変換テーブルメモリと、前記入力実数値又は入力対数値の更新によりカウント動作を開始し、カウント内容を前記変換テーブルメモリの読出アドレスとして出力する読出アドレスカウンタと、前記変換テーブルメモリから読出した実数値と対数値との何れか一方と他方とを選択し、実数から対数への変換時は前記対数値を変換対数値として出力し、対数から実数への変換時は前記実数値を変換実数値として出力する選択切替回路と、前記セレクタから選択出力された入力実数値又は入力対数値と前記選択切替回路から出力された実数値又は対数値とを比較し、比較一致又は許容誤差範囲内の一致により前記読出アドレスカウンタのカウント動作を停止させる比較器とを備えたことを特徴とする実数−対数変換回路。
【0048】
(付記8)対数値をアドレスとして実数値を格納した変換テーブルメモリと、入力実数値と前記変換テーブルメモリから読出した実数値とを比較する比較器と、前記入力実数値の更新によりカウント動作を開始して対数値の読出アドレスを出力し、前記比較器からの比較一致又は許容誤差範囲内の一致によりカウント動作を停止し、対数値の読出アドレスを、変換対数出力とする読出アドレスカウンタとを備えたことを特徴とする実数−対数変換回路。
(付記9)前記入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、該第2の比較器から前記入力実数値が前記閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウントを開始して対数値のアドレスを出力する読出アドレスカウンタとを備えたことを特徴とする付記8記載の実数−対数変換回路。
【0049】
(付記10)対数値をアドレスとして格納する実数値を、アドレス間の実数値の差分として格納した変換テーブルメモリと、該変換テーブルメモリから読出した前記実数値の差分を加算して読出実数値とする手段と、該読出実数値と前記入力実数値とを比較し、比較一致又は許容誤差範囲内の一致により前記読出アドレスカウンタのカウント動作を停止させる比較器とを備えたことを特徴とする付記8記載の実数−対数変換回路。
【0050】
【発明の効果】
以上説明したように、本発明は、実数値と対数値とを組として同一アドレスに格納し、更にはアドレス間の差分値として格納することにより、変換テーブルメモリ1の大幅なメモリ容量削減が可能となり、半導体チップに搭載する場合の所要面積が小さくなる利点がある。又実数値と対数値との何れか又は両方のアドレス間の差分として格納することにより、更にメモリ容量の削減が可能となる。又対数値のアドレス付けにより実数値を格納した変換テーブルメモリを用いた場合は、実数から対数への変換構成に於いて、実数値のみを格納するから、メモリ容量の大幅な削減が可能となる。なお、変換速度は、1クロックとすることは困難であるが、入力実数値と閾値との比較結果や、近似アドレス算出等の手段を適用することにより、変換速度を数クロック〜10数クロック程度とすることも可能である。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態の説明図である。
【図2】アドレスと実数との関係曲線図である。
【図3】アドレスと対数との関係曲線図である。
【図4】実数と対数との関係曲線図である。
【図5】本発明の第2の実施の形態の説明図である。
【図6】本発明の第3の実施の形態の説明図である。
【図7】本発明の第4の実施の形態の説明図である。
【図8】本発明の第5の実施の形態の説明図である。
【図9】本発明の第6の実施の形態の説明図である。
【図10】本発明の第7の実施の形態の説明図である。
【図11】本発明の第8の実施の形態の説明図である。
【図12】本発明の第9の実施の形態の説明図である。
【図13】本発明の第10の実施の形態の説明図である。
【図14】本発明の第11の実施の形態の説明図である。
【図15】本発明の第12の実施の形態の説明図である。
【図16】本発明の第13の実施の形態の説明図である。
【図17】本発明の第14の実施の形態の説明図である。
【図18】本発明の第15の実施の形態の説明図である。
【図19】本発明の第16の実施の形態の説明図である。
【図20】本発明の第17の実施の形態の説明図である。
【図21】本発明の第18の実施の形態の説明図である。
【図22】本発明の第19の実施の形態の説明図である。
【図23】本発明の第20の実施の形態の説明図である。
【図24】従来例の説明図である。
【符号の説明】
1 変換テーブルメモリ
2 比較器
3 読出アドレスカウンタ
4 第2の比較器
5 近似アドレス算出部
6 粗密モード判定部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a real-log conversion circuit for converting a real number to a logarithm and a logarithm to a real number using a conversion table memory.
[0002]
[Prior art]
In order to efficiently handle amplification factors and power values in the field of signal processing, logarithmic values are often used. Therefore, means for converting a real number to a logarithm is required. Therefore, an arithmetic processing circuit for converting a real number to a logarithm is generally used. However, in order to simplify the configuration, a configuration using a conversion table is known (for example, see Patent Document 1). ). That is, the logarithm corresponding to the real number is stored in a memory area having the real number as an address, and the logarithm is read out using the input real number as an address, thereby converting the real number into a logarithm.
[0003]
For example, as shown in FIG. 24, when a real number has a 16-bit configuration and a logarithm has a 10-bit configuration, a conversion table memory storing a logarithm corresponding to a real number is used in a memory area of the number of addresses = 65536. In this case, the total bit number of the conversion table memory is 640 k bits.
[0004]
[Patent Document 1]
JP-A-55-95181
[0005]
[Problems to be solved by the invention]
In the conventional conversion table memory shown in FIG. 24, as described above, when converting a 16-bit real number to a 10-bit logarithm (0 to 64, step 0.0625), 1024 types of logarithms are used. Is simply obtained. Accordingly, the number of addresses uses 1024 of 65536, and the same logarithm is stored at different addresses.
[0006]
Therefore, the conversion efficiency as the conversion table memory is low, and it is necessary to secure an extra memory area, and there is a problem that the cost increases. Although it is conceivable that the number of addresses is set to 1024 by using the upper 10 bits of a 16-bit real number, there is a problem that conversion accuracy is reduced.
[0007]
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-described conventional problem, and to reduce the memory capacity with the same conversion accuracy as the conventional one.
[0008]
[Means for Solving the Problems]
Referring to FIG. 1, the real number-logarithmic conversion circuit of the present invention includes a conversion table memory 1 storing a real value and a log value corresponding to the real value at the same address, and updating an input real value. The count operation is started, the read address counter 3 that outputs the count content as the read address RADR of the conversion table memory is compared with the input real value and the real value read from the conversion table memory. A comparator 2 is provided for stopping the counting operation of the read address counter 3 upon a match and for converting the logarithmic value read from the conversion table memory 1 into a converted logarithmic output.
[0009]
Further, a second comparator that compares the input real value with a preset threshold value and outputs a determination signal, and a determination signal indicating that the input real value has exceeded the threshold value from the second comparator, A read address counter that loads a set address and starts a count operation. Further, the conversion table memory has a configuration in which either one or both of the real value difference and the log value difference are stored at the same address, and the real value difference or the log value difference read from the conversion table memory is sequentially stored. Means for adding and outputting as a real value or a logarithmic value can be provided.
[0010]
Also, a conversion table memory storing a real value with a logarithmic value as an address, a comparator for comparing the input real value with the real value read from the conversion table memory, and a count operation by starting the count operation by updating the input real value. And a read address counter that stops the count operation by comparison match from the comparator or match within the allowable error range, and sets a logarithmic value read address to a converted logarithmic output. A second comparator for comparing the input real value with a preset threshold value and outputting a determination signal, and a determination signal indicating that the input real value exceeds the threshold value from the second comparator, set in advance. And a read address counter which starts counting and outputs a logarithmic address.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is an explanatory diagram of a first embodiment of the present invention, wherein 1 is a conversion table memory, 2 is a comparator, and 3 is a read address counter. RADR is a read address, R real number is a read real value, EN is a count enable signal from the comparator 2, and ac is a control signal for updating the input real value.
[0012]
The conversion table memory 1 has a configuration in which a real value and a log value corresponding to the real value are stored at the same address. For example, 26 bits of a 16-bit configuration real value and a 10-bit configuration log value are stored. If it is stored as one word and the number of addresses is 1024, the total number of bits is 26 k bits. That is, since the total number of bits of the conventional conversion table memory described above is 640 kbits, the total number of bits can be reduced to about 4% as compared with this. Therefore, the required area when incorporating the semiconductor chip into a semiconductor chip can be significantly reduced.
[0013]
Further, the read address counter 3 can be configured to clear the count content by the control signal ac at the time of updating the input real value and start the count operation in accordance with the count enable signal EN from the comparator 2. The count content of the read address counter 3 is used as the read address RADR of the conversion table memory 1. From the conversion table memory 1, a real value and a log value corresponding to the real value are read in accordance with the read address RADR as shown as R real number and log output.
[0014]
The comparator 2 compares the input real value for conversion to logarithm with the read real value indicated as the R real number read from the conversion table memory 1 and reads the read address counter 3 until the input real value <R real number. Is input with a count enable signal EN. Then, when this condition is satisfied, the counting operation of the read address counter 3 is stopped, and the logarithmic value read from the conversion table memory 1 in accordance with the read address RADR at that time is set as a converted logarithmic output for the input real value. In this case, the real address and the logarithmic value are read out by the read address RADR from the read address counter 3, but the logarithmic value is latched when the count operation of the read address counter 3 is stopped. Can be provided.
[0015]
FIG. 2 is a relationship curve diagram between an address and a real number, showing a relationship between an address of the conversion table memory 1 and a stored real number. FIG. 3 is a relationship curve diagram between an address and a logarithm. The relationship between the address and the stored logarithm is shown. FIG. 4 shows an example of the relationship between the real numbers stored in the conversion table memory 1 and the logarithm, and shows the correspondence between the real numbers 0 to 65535 and the logarithms 0 to 770.
[0016]
FIG. 5 is an explanatory diagram of the second embodiment of the present invention. The same reference numerals as those in FIG. 1 denote the same functional parts, and reference numeral 4 denotes a second comparator. The second comparator 4 outputs a determination signal obtained by comparing the input real value and the threshold value to “0” when the relationship of input real value ≦ the threshold value is “1” when the relationship of the input real value> threshold value is “1”. I do. When the determination signal is "0", the read address counter 3 clears the read address counter 3 according to the determination signal and the control signal ac at the time of updating the real value, as in the embodiment shown in FIG. However, when the determination signal is “1”, for example, an intermediate value of the count content of the read address counter 3 is loaded in advance as a load address, and the read address counter 3 starts counting up. . That is, when the input real value exceeds the threshold value, the read address RADR of the conversion table memory 1 is not sequentially accessed from the lowest address position, but is accessed from an intermediate address position, thereby requiring logarithmic conversion. It saves time.
[0017]
FIG. 6 is an explanatory diagram of the third embodiment of the present invention, and the same reference numerals as those in FIGS. 1 and 5 indicate the same functional parts. The read address counter 3 in this embodiment has a configuration in which the count operation is switched from up-counting to down-counting when the maximum value of the load address is loaded. The numerical value and the threshold value are compared, and a determination signal of “0” is input to the read address counter 3 when the relationship of the input real number value ≦ the threshold value is “1” and when the relationship of the input real number value> the threshold value is the same as described above. However, when the control signal ac at the time of updating the real value indicates that the determination signal is "1", the read address counter 3 is loaded with the maximum value of the load address and is switched to the down count. Therefore, the access is started in order from the highest address position of the conversion table memory 1 toward the lower address direction. As a result, the time required for logarithmic conversion can be reduced as compared with the case where access is made from the lowest address position toward the highest address.
[0018]
FIG. 7 is an explanatory diagram of the fourth embodiment of the present invention. The same reference numerals as those in each of the above-described embodiments denote the same functional parts, and reference numeral 5 denotes an approximate address calculating unit. For example, when the input real value is x and the approximate address is y, the approximate address calculation unit calculates y = 0.4x under the condition of x <1000, and y = 0.0023x + 390 under the condition of x ≧ 1000. can do. The approximate address calculated by the approximate address calculation unit 5 based on the input real value is loaded into the read address counter 3 at the timing of the control signal ac at the time of updating the real value, and the counting operation is started. Therefore, access to the conversion table memory 1 is started from an address position close to the address corresponding to the input real value. Therefore, the time required for logarithmic conversion can be further reduced.
[0019]
FIG. 8 is an explanatory diagram of the fifth embodiment of the present invention, wherein the same reference numerals as those in the above-described respective embodiments denote the same functional portions, and 6 denotes a coarse / fine mode determining section. The coarse / fine mode judging section 6 compares the real value input from the comparator 2 with the R real number read from the conversion table memory 1, and when the difference is large, the coarse / fine mode signal is regarded as a signal indicating coarse and the read address counter 3 When the difference decreases, the coarse / fine mode signal is input to the read address counter 3 as a signal indicating the fineness.
[0020]
The coarse / fine step value is input to the read address counter 3, and when the coarse / fine mode signal indicates coarse, the read address counter 3 counts up as a step according to the coarse step value, for example, +20. When the difference between the R real number and the input real value decreases, the coarse / fine mode signal indicates dense, and is counted up as a step according to the fine step value, for example, +1. Therefore, the read address for reading the R real number close to the input real value can be speeded up as compared with the case where the read address is sequentially counted up and output.
[0021]
FIG. 9 is an explanatory diagram of the sixth embodiment of the present invention. The same reference numerals as those in the above-described respective embodiments denote the same functional portions, 7 denotes an adder, and 8 denotes a holder. The conversion table memory 1 of this embodiment stores a real value difference between addresses and a logarithmic value as a pair instead of a real value and a logarithmic value as a pair. Therefore, the difference between the R real number read by the read address RADR from the read address counter 3 is input to the adder 7 and the result of the previous addition held in the holder 8 is added, whereby the current read real numerical value is obtained. can get. The read real value and the input real value are compared in the comparator 2, and when the input real value <read real value, the counting operation of the read address counter 3 is stopped and the read log value at that time is converted. Logarithmic output. Therefore, since the real number difference and the logarithm are stored as a set in the conversion table memory 1, the number of bits corresponding to the difference is reduced as compared with the case where the real number and the logarithm are stored as a set. Further, the total number of bits can be reduced.
[0022]
FIG. 10 is an explanatory view of the seventh embodiment of the present invention. The same reference numerals as those in the above-described respective embodiments denote the same functional portions, 9 denotes an adder, and 10 denotes a retainer. The conversion table memory 1 of this embodiment stores a real value and a logarithmic difference between addresses as a set instead of a real value and a logarithmic value. Accordingly, the R logarithmic difference read by the read address RADR from the read address counter 3 is input to the adder 9 and the result of the previous read logarithmic value and the previous addition result held in the holder 10 are added. Become. Therefore, compared to the case where the real value and the log value are stored as a set, the total number of bits can be reduced by the amount stored as the difference between the log values. Further, as for the control configuration of the comparator 2 and the read address counter 3, the control configuration in each of the above-described embodiments can be applied.
[0023]
FIG. 11 is an explanatory view of the eighth embodiment of the present invention. The same reference numerals as those in FIGS. 9 and 10 indicate the same parts, and the description of the duplicated operations will be omitted. This embodiment corresponds to a configuration in which the embodiment shown in FIG. 9 and the embodiment shown in FIG. 10 are combined. The conversion table memory 1 stores a real-valued difference and a logarithmic-valued difference between addresses. Stored as Thereby, the total number of bits of the conversion table memory 1 can be further reduced. As the control configuration for accessing the conversion table memory 1 by the comparator 2 and the read address counter 3, the control configuration in each of the above-described embodiments can be applied.
[0024]
FIG. 12 is an explanatory diagram of the ninth embodiment of the present invention, showing a configuration in which conversion from a real number to a logarithm and conversion from a logarithm to a real number are possible, 1 is a conversion table memory, 2 is a comparator, Reference numeral 3 denotes a read address counter, 11 denotes a selection switching circuit, 12 denotes a selector (SEL), ac denotes a control signal for updating an input value, and s1 and s2 denote switching signals for switching between a real number and a logarithm.
[0025]
The conversion table memory 1 has a configuration in which a real value and a logarithmic value are stored as a set, similarly to the above-described embodiment. When converting a real number to a logarithm, the switching signals s1 and s2 are signals for switching to a real number. . Thereby, the selector 12 selects the input real value and inputs it to the comparator 2. Further, the selection switching circuit 11 inputs a real value in the read value from the conversion table memory 1 to the comparator 2 and uses a logarithmic value as a conversion output. Therefore, according to the read address RADR from the read address counter 3, the real value in the set of the real value and the logarithm value read from the conversion table memory 1 is input to the comparator 2 via the selection switching circuit 11. As a result, the input real value and the read real value are compared, and the count operation of the read address counter 3 is continued according to the comparison result. When the input real value and the read real value become equal, or When the input real value is exceeded, that is, at the time of comparison match or at the time of matching within the allowable error range, a read log value is output.
[0026]
If the switching signals s1 and s2 are signals for switching to a logarithm, the selector 12 selects an input logarithmic value and inputs it to the comparator 2. Further, the selection switching circuit 11 inputs the logarithmic value of the read value from the conversion table memory 1 to the comparator 2 and uses the real value as a conversion output. Therefore, the logarithmic value in the set of the real value and the logarithmic value read from the conversion table memory 1 in accordance with the read address RADR from the read address counter 3 is input to the comparator 2 via the selection switching circuit 11, and The logarithmic value is compared with the read logarithmic value, and when the input logarithmic value and the read logarithmic value become equal or the read logarithmic value exceeds the input logarithmic value according to the counting operation of the read address counter 3, the read address counter is read. The counting operation of Step 3 is stopped, and the read real value at that time is output as a converted real value.
[0027]
FIG. 13 is an explanatory diagram of the tenth embodiment of the present invention, and the conversion table memory 1 stores only real values. The read address counter 3 is, as in the above-described embodiments, cleared by the control signal ac at the time of updating the input real value and starts the counting operation. However, the counting step is simply +1. Instead of counting up as in the above, the counter is configured to count up according to the logarithmic value, and is realized by adding a simple logic circuit that controls the counting step to a normal counter. be able to.
[0028]
Therefore, since the read address RADR from the read address counter 3 indicates a logarithmic value, the conversion table memory 1 has a configuration in which a real value is stored using the logarithmic value as an address. Then, the read R real number and the input real value are compared by the comparator 2, and when the input real value becomes equal to the R real number or when the input real value exceeds the R real number, the count from the comparator 2 is counted. The count operation of the read address counter 3 is stopped by the enable signal EN, and the read address RADR at that time is converted to a logarithmic output.
[0029]
FIG. 14 is an explanatory diagram of the eleventh embodiment of the present invention. Although the control configuration is the same as that of the embodiment shown in FIG. 5, the conversion table memory 1 is similar to the embodiment shown in FIG. The read address RADR from the read address counter 3 is a logarithmic value, and a real value is stored corresponding to the address. Therefore, when the input real value is equal to the R real number read from the conversion table memory 1 or when the R real number exceeds the input real value, the comparator 2 outputs the read address RADR from the read address counter 3 to the converted logarithmic output. It can be.
[0030]
The second comparator 4 compares the input real value with the threshold value. If the input real value does not exceed the threshold value, the read address counter 3 uses the judgment signal from the second comparator 4 to read the input real value. The count is started by being cleared by the control signal ac by updating the numerical value, and when the input real numerical value exceeds the threshold value, the load address is loaded and the count-up is started. Thereby, when the input real value is a large value exceeding the threshold value, the count-up is started from the load address, whereby the conversion processing time can be reduced.
[0031]
FIG. 15 is an explanatory diagram of the twelfth embodiment of the present invention. The control configuration is the same as that of the embodiment shown in FIG. 6, and the duplicate description is omitted. As in the embodiment shown, the read address RADR from the read address counter 3 is a logarithmic value, and a real value is stored corresponding to the address. The read address counter 3 is configured to be able to load the maximum value of the load address in accordance with the determination signal from the second comparator 4 and to be capable of switching between up-counting and down-counting.
[0032]
Then, the read address counter 3 is cleared by the determination signal from the second comparator 4 and the control signal ac when the input real value does not exceed the threshold value, so that the read address RADR as a logarithmic value is obtained. When the input real value exceeds the threshold, the read address counter 3 is loaded with the read address maximum value by the determination signal from the second comparator 4 and the control signal ac. , And switch to a down-count operation.
[0033]
The comparator 2 has a configuration in which the count of the read address counter 3 is stopped by the count enable signal EN when the input real value and the R real number become equal. Even if it does not become equal to, when the difference in the allowable error range is obtained, it is possible to assume that the input real value and the R real number are equal, and the reading address counter 3 stops counting. With such a configuration, the total number of bits required for the conversion table memory 1 can be reduced, and the time required for logarithmic conversion can be reduced even when the input real value is large.
[0034]
FIG. 16 is an explanatory diagram of the thirteenth embodiment of the present invention. The control configuration is the same as that of the embodiment shown in FIG. 7, and the duplicate description is omitted. As in the illustrated embodiment, it has a configuration in which real values are stored using logarithmic values as addresses. The approximate address calculating unit 15 corresponds to the approximate address calculating unit 5 in FIG. 7 and has a function of calculating an approximate read address corresponding to an input real value. In this embodiment, Since the read address RADR is a logarithmic value, an approximate logarithm is calculated from the input real value and loaded into the read address counter 3. Therefore, since the real value can be read from an address near the input real value, the time required for conversion can be reduced.
[0035]
FIG. 17 is an explanatory diagram of the fourteenth embodiment of the present invention. The control configuration is the same as that of the embodiment shown in FIG. 8, and the duplicate description is omitted. As in the embodiment shown in FIG. 16, this embodiment has a configuration in which real numbers are stored using logarithmic values as addresses. The coarse / fine mode determining section 16 has the same function as the coarse / fine mode determining section 6 in FIG. Therefore, when the difference between the input real value and the R real number read from the conversion table memory 1 is large, the count-up step of the read address counter 3 is coarse, and when the difference is small, the count-up step is fine. It is possible to convert an input real value into a logarithm at high speed and with high accuracy.
[0036]
FIG. 18 is an explanatory diagram of the fifteenth embodiment of the present invention. The control configuration is the same as that of the embodiment shown in FIG. 9, and the duplicate description is omitted. It has a configuration in which an address is stored and a difference between real numbers between addresses is stored. Therefore, the total number of bits can be further reduced as compared with the case where a real value is stored. Then, since the real value difference is read from the conversion table memory 1 so as to be indicated as the R real number difference, the real value is restored by the adder 17 and the holder 18 and input to the comparator 2. In the comparator 2, the input real value is compared with the real value from the holder 18, and when a comparison match or a comparison difference within an allowable range is reached, the counting by the read address counter 3 is stopped. Is a converted logarithmic output.
[0037]
FIG. 19 is an explanatory diagram of the sixteenth embodiment of the present invention. The conversion table memory 1 stores a real value using a logarithmic value as an address, and skips a storage address having the same real value. And the like. Then, the read address counter 3 is cleared by the control signal ac at the time of updating the input real value, the count-up is started, and the comparator 2 compares the input real value with the R real number from the conversion table memory 1, When a comparison match or a comparison error of an allowable range occurs, the count operation of the read address counter 3 is stopped by the count enable signal EN, and the read address RADR at that time is output as a conversion logarithm. When the control code is read out from the conversion table memory 1 together with the real value, the read-out address RADR is skipped until the read-out address counter 3 runs out until the control code is exhausted. Alternatively, a jump destination address is stored, and when the jump destination address is read, it is loaded into the read address counter 3 to cause the read address RADR to jump, and thereafter, a normal count up can be performed. With such a control configuration, the conversion time for converting a real number to a logarithm can be reduced.
[0038]
FIG. 20 is an explanatory diagram of the seventeenth embodiment of the present invention. The same reference numerals as those in the above-described embodiments indicate the same functional parts, and the conversion table memory 1 stores the logarithmic values as addresses. Although a numerical value is stored, an address having the same real numerical value is omitted, and the number of skipped addresses is input to the accumulator 21. The read address counter 3 is cleared when the input real value is updated, counts up according to the count enable signal EN from the comparator 2 that compares the input real value with the R real number, and sets the count as a read address RADR. When the read address RADR sequentially increases as a logarithm, the adder 22 outputs the converted logarithm as it is. However, the adder 22 accumulates the number of addresses in the conversion table memory 1 from which the addresses are omitted by the accumulator 21. The result of the calculation is input to the adder 22 and added to the read address RADR so as to be a logarithmic value. In this case, since the same real value is not stored in the conversion table memory 1, the total number of bits can be further reduced.
[0039]
FIG. 21 is an explanatory diagram of the eighteenth embodiment of the present invention, which corresponds to an embodiment obtained by combining the embodiment shown in FIG. 18 and the embodiment shown in FIG. Is omitted. As described above, the conversion table memory 1 stores the difference between the real numbers with the logarithmic value as the address, and skips the address having the same real value, that is, the address of the control code in order to skip the address where the difference is 0. First, the next address value is stored, and when the next address value is read, the address is loaded into the read address counter 3 so that the read address RADR from the read address counter 3 is skipped, and the access to the conversion table memory 1 is performed at high speed. Can be
[0040]
FIG. 22 is an explanatory diagram of the nineteenth embodiment of the present invention, and corresponds to an embodiment in which the embodiment shown in FIG. 18 and the embodiment shown in FIG. 20 are combined. Omitted. The conversion table memory 1 stores a real value difference using a logarithmic value as an address, omits the address of the real number difference 0 indicating the same real value, and inputs the skip number of the address to the accumulator 21. When the read address RADR sequentially increases as a logarithm, the adder 22 outputs the logarithm as it is. However, the adder 22 accumulates the number of addresses omitting the address of the conversion table memory 1 by the accumulator 21, and accumulates the number. The result is input to the adder 22 and added to the read address RADR so as to have a logarithmic value. The comparator 2 compares the input real value with the real value obtained by sequentially adding the read real number difference values, and upon a comparison match or a match within an allowable error range, the count enable signal EN causes the read address counter 3 The counting is stopped, the logarithm of the read address RADR at that time is calculated by the adder 22 and the converted logarithm is output.
[0041]
FIG. 23 is an explanatory view of the twentieth embodiment of the present invention. The same reference numerals as those in the above-described embodiments denote the same functional parts, 25 denotes a selector (SEL), and s3 denotes a selection signal. Show. The conversion table memory 1 has a configuration in which real values are stored for logarithmic addresses, and the selector 25 selects a read address RADR from the read address counter 3 and an input logarithmic value according to a selection signal s3. , The read address of the conversion table memory 1.
[0042]
For example, when converting from a real number to a logarithm, the selector 25 selects and outputs the read address RADR from the read address counter 3 according to the selection signal s3, accesses the conversion table memory 1, and inputs the input real value and the conversion table memory 1 The comparator 2 compares the R real number read from the memory with the comparator 2, and upon a comparison match or a match within the allowable error range, the count of the read address counter 3 is stopped by the count enable signal EN, and the read address RADR at that time is set to the selector 25. Is output as a logarithm converted via.
[0043]
When converting from a logarithmic number to a real number, the selector 25 selects the input logarithmic value according to the selection signal s3, inputs it as a read address to the conversion table memory 1, and converts the R real number read from the conversion table memory 1. Output as a real value. That is, the conversion from the real number to the logarithm and the conversion from the logarithm to the real number can be performed by using the conversion table memory 1.
[0044]
The present invention is not limited to only the above-described embodiments, and a combination of the embodiments or a combination with another control configuration is also possible. Further, the conversion table memory 1 can have various ROM (read only memory) configurations.
[0045]
(Supplementary Note 1) A conversion table memory storing a real value and a logarithm value corresponding to the real value at the same address, a count operation is started by updating the input real value, and the count content is used as a read address of the conversion table memory. The read address counter to be output is compared with the input real value and the real value read from the conversion table memory, and the counting operation of the read address counter is stopped by a comparison match or a match within an allowable error range. A comparator for converting a logarithmic value read from a table memory into a converted logarithmic output.
(Supplementary Note 2) A second comparator that compares the input real value with a preset threshold and outputs a determination signal, and indicates that the input real value from the second comparator exceeds the threshold. 2. The real number-logarithmic conversion circuit according to claim 1, further comprising: a read address counter that loads a preset address according to a determination signal and starts a count operation.
[0046]
(Supplementary Note 3) A second comparator that compares the input real value with a preset threshold value and outputs a determination signal, and indicates that the input real value by the second comparator does not exceed the threshold value. In response to a determination signal, an up-count operation is started, and in response to a determination signal indicating that the input real value has exceeded the threshold, an address maximum value is loaded and a down-count operation is started to read out the read address of the conversion table memory. And a read address counter for outputting the real number-logarithmic conversion circuit.
(Supplementary Note 4) An approximate address calculating unit for calculating an approximate address for reading a real value from the conversion table memory based on the input real value, and a counting operation by loading the approximate address calculated by the approximate address calculating unit And a read address counter for outputting a read address of the conversion table memory.
[0047]
(Supplementary Note 5) A comparator for comparing the input real value with the real value read from the conversion table memory, a coarse / fine mode determining unit for outputting a coarse / fine mode signal corresponding to a comparison difference of the comparator, The count operation is started by clearing when the numerical value is updated, and counting the coarse step value of the count step by the coarse / fine mode signal when the difference between the input real value and the real value read from the conversion table memory is large, The read address counter according to claim 1, further comprising: a read address counter that counts a fine step value having a small count step by a coarse / fine mode signal when a difference between an input real value and a real value read from the conversion table memory is small. Real number-logarithmic conversion circuit.
(Supplementary Note 6) The conversion table memory has a configuration in which one or both of the real value difference and the log value difference are stored at the same address, and the real value difference read from the conversion table memory is provided. A real-log conversion circuit according to claim 1, further comprising means for sequentially adding a difference between logarithmic values and outputting the result as a real value or a logarithmic value.
(Supplementary Note 7) A selector that selects and outputs an input real value at the time of conversion from a real number to a logarithm and selects and outputs an input logarithm value at the time of conversion from a logarithm to a real number has the same real value and a logarithmic value corresponding to the real value. A conversion table memory stored at an address, a count operation is started by updating the input real value or input logarithm value, and a read address counter for outputting the count content as a read address of the conversion table memory; One of the real number and the logarithmic value, and the other is selected.When the real number is converted to a logarithm, the logarithmic value is output as a conversion logarithmic value, and when the logarithm is converted to a real number, the real number is converted. A selection switching circuit that outputs as a real value, an input real value or an input log value that is selectively output from the selector, and a real value or a log value that is output from the selection switching circuit Compare, comparison match or tolerance in matching the real number, characterized in that a comparator for stopping the count operation of the read address counter - logarithmic converter.
[0048]
(Supplementary Note 8) A conversion table memory storing a real value using a logarithmic value as an address, a comparator for comparing an input real value with a real value read from the conversion table memory, and performing a count operation by updating the input real value. Start and output the read address of the logarithmic value, stop the count operation by the comparison match from the comparator or the match within the allowable error range, and read the logarithmic value read address with a read address counter that sets the converted logarithmic output. A real-to-logarithmic conversion circuit, comprising:
(Supplementary Note 9) A second comparator that compares the input real value with a preset threshold value and outputs a determination signal, and indicates that the input real value from the second comparator has exceeded the threshold value. The real number-logarithmic conversion circuit according to claim 8, further comprising: a read address counter that loads a preset address in response to the determination signal, starts counting, and outputs a logarithmic address.
[0049]
(Supplementary Note 10) A conversion table memory storing a real value storing a logarithmic value as an address as a difference between real values between addresses, and adding a difference between the real values read from the conversion table memory to obtain a read real value And a comparator for comparing the read real value with the input real value, and stopping the count operation of the read address counter upon comparison match or match within an allowable error range. 8. The real number-logarithmic conversion circuit according to 8.
[0050]
【The invention's effect】
As described above, according to the present invention, by storing a real value and a logarithmic value as a set at the same address, and further storing the difference value between the addresses, the memory capacity of the conversion table memory 1 can be significantly reduced. Thus, there is an advantage that the required area for mounting on a semiconductor chip is reduced. In addition, by storing the difference between any one or both of the real value and the log value, the memory capacity can be further reduced. Also, when a conversion table memory that stores real values by addressing logarithmic values is used, only real numbers are stored in a conversion configuration from real numbers to logarithms, so that the memory capacity can be greatly reduced. . Although it is difficult to set the conversion speed to one clock, the conversion speed can be set to several clocks to several tens clocks by applying a result of comparison between the input real value and the threshold value and calculating an approximate address. It is also possible.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram of a first embodiment of the present invention.
FIG. 2 is a relationship curve diagram between addresses and real numbers.
FIG. 3 is a relationship curve diagram between an address and a logarithm.
FIG. 4 is a relationship curve diagram between a real number and a logarithm.
FIG. 5 is an explanatory diagram of a second embodiment of the present invention.
FIG. 6 is an explanatory diagram of a third embodiment of the present invention.
FIG. 7 is an explanatory diagram of a fourth embodiment of the present invention.
FIG. 8 is an explanatory diagram of a fifth embodiment of the present invention.
FIG. 9 is an explanatory diagram of a sixth embodiment of the present invention.
FIG. 10 is an explanatory diagram of a seventh embodiment of the present invention.
FIG. 11 is an explanatory diagram of an eighth embodiment of the present invention.
FIG. 12 is an explanatory diagram of a ninth embodiment of the present invention.
FIG. 13 is an explanatory diagram of a tenth embodiment of the present invention.
FIG. 14 is an explanatory diagram of an eleventh embodiment of the present invention.
FIG. 15 is an explanatory diagram of a twelfth embodiment of the present invention.
FIG. 16 is an explanatory diagram of a thirteenth embodiment of the present invention.
FIG. 17 is an explanatory diagram of a fourteenth embodiment of the present invention.
FIG. 18 is an explanatory diagram of a fifteenth embodiment of the present invention.
FIG. 19 is an explanatory diagram of a sixteenth embodiment of the present invention.
FIG. 20 is an explanatory diagram of a seventeenth embodiment of the present invention.
FIG. 21 is an explanatory diagram of an eighteenth embodiment of the present invention.
FIG. 22 is an explanatory diagram of a nineteenth embodiment of the present invention.
FIG. 23 is an explanatory diagram of a twentieth embodiment of the present invention.
FIG. 24 is an explanatory diagram of a conventional example.
[Explanation of symbols]
1 Conversion table memory
2 Comparator
3 Read address counter
4 Second comparator
5 Approximate address calculator
6 Coarse / fine mode judgment section

Claims (5)

実数値と該実数値に対応した対数値とを同一アドレスに格納した変換テーブルメモリと、
入力実数値の更新によりカウント動作を開始し、カウント内容を前記変換テーブルメモリの読出アドレスとして出力する読出アドレスカウンタと、
前記入力実数値と前記変換テーブルメモリから読出した実数値とを比較し、比較一致又は許容誤差範囲内の一致により前記読出アドレスカウンタのカウント動作を停止させて、前記変換テーブルメモリから読出した対数値を変換対数出力とする為の比較器と
を備えたことを特徴とする実数−対数変換回路。
A conversion table memory storing a real value and a logarithmic value corresponding to the real value at the same address;
A read address counter for starting a count operation by updating an input real value and outputting the count content as a read address of the conversion table memory;
The input real value is compared with the real value read from the conversion table memory, and the count operation of the read address counter is stopped by a comparison match or a match within an allowable error range, and the logarithmic value read from the conversion table memory is compared. And a comparator for obtaining a converted logarithmic output.
前記入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、該第2の比較器から前記入力実数値が前記閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウント動作を開始する読出アドレスカウンタとを備えたことを特徴とする請求項1記載の実数−対数変換回路。A second comparator that outputs a determination signal by comparing the input real value with a preset threshold value, and a determination signal indicating that the input real value has exceeded the threshold value from the second comparator, 2. The real number-logarithmic conversion circuit according to claim 1, further comprising a read address counter for loading a preset address and starting a count operation. 前記変換テーブルメモリは、前記実数値の差分又は対数値の差分との何れか一方又は両方を同一アドレスに格納した構成を有し、前記変換テーブルメモリから読出した前記実数値の差分又は対数値の差分を順次加算して実数値又は対数値として出力する手段を有することを特徴とする請求項1記載の実数−対数変換回路。The conversion table memory has a configuration in which one or both of the real value difference and the log value difference are stored at the same address, and the real value difference or the log value read from the conversion table memory is used. 2. The real number-logarithmic conversion circuit according to claim 1, further comprising means for sequentially adding the difference and outputting the result as a real value or a log value. 対数値をアドレスとして実数値を格納した変換テーブルメモリと、
入力実数値と前記変換テーブルメモリから読出した実数値とを比較する比較器と、
前記入力実数値の更新によりカウント動作を開始して対数値の読出アドレスを出力し、前記比較器からの比較一致又は許容誤差範囲内の一致によりカウント動作を停止し、対数値の読出ドアドレスを、変換対数出力とする読出アドレスカウンタと
を備えたことを特徴とする実数−対数変換回路。
A conversion table memory that stores real values using logarithmic values as addresses,
A comparator for comparing the input real value with the real value read from the conversion table memory;
The count operation is started by updating the input real value and the logarithmic value read address is output.The count operation is stopped by the comparison match from the comparator or the match within the allowable error range, and the log value read address is changed. And a read address counter for converting the logarithmic output.
前記入力実数値と予め設定した閾値とを比較して判定信号を出力する第2の比較器と、該第2の比較器から前記入力実数値が前記閾値を超えたことを示す判定信号により、予め設定したアドレスをロードしてカウントを開始して対数値のアドレスを出力する読出アドレスカウンタとを備えたことを特徴とする請求項4記載の実数−対数変換回路。A second comparator that outputs a determination signal by comparing the input real value with a preset threshold value, and a determination signal indicating that the input real value has exceeded the threshold value from the second comparator, 5. The real number-logarithmic conversion circuit according to claim 4, further comprising: a read address counter that loads a preset address, starts counting, and outputs a logarithmic address.
JP2002357461A 2002-12-10 2002-12-10 Real number-logarithm transformation circuit Withdrawn JP2004192180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002357461A JP2004192180A (en) 2002-12-10 2002-12-10 Real number-logarithm transformation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002357461A JP2004192180A (en) 2002-12-10 2002-12-10 Real number-logarithm transformation circuit

Publications (1)

Publication Number Publication Date
JP2004192180A true JP2004192180A (en) 2004-07-08

Family

ID=32757453

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002357461A Withdrawn JP2004192180A (en) 2002-12-10 2002-12-10 Real number-logarithm transformation circuit

Country Status (1)

Country Link
JP (1) JP2004192180A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114034238A (en) * 2021-11-19 2022-02-11 珠海润谷科技有限公司 Implementation method for compensating hysteresis of magnetoresistive sensor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114034238A (en) * 2021-11-19 2022-02-11 珠海润谷科技有限公司 Implementation method for compensating hysteresis of magnetoresistive sensor
CN114034238B (en) * 2021-11-19 2024-05-28 珠海润谷科技有限公司 Realization method for compensating hysteresis of magnetoresistive sensor

Similar Documents

Publication Publication Date Title
JP3227292B2 (en) Encoding device, encoding method, decoding device, decoding method, encoding / decoding device, and encoding / decoding method
US7130952B2 (en) Data transmit method and data transmit apparatus
JP2001188600A5 (en)
JP2004192180A (en) Real number-logarithm transformation circuit
US20030187899A1 (en) Matrix operation processing device
JP3275224B2 (en) Digital signal processing system
JPH0353815B2 (en)
JPH0870250A (en) A/d converter
US5268686A (en) Data compression method
JPH0566921A (en) Data shift circuit
CN113495669A (en) Decompression device, accelerator and method for decompression device
JP3533339B2 (en) Decoding device, decoding method, and program recording medium
JP2007140858A (en) Method for accessing memory, and device for accessing memory
WO2005013105A1 (en) Lookup table and data acquisition method
US6574722B2 (en) Semiconductor storage device
JPS59218550A (en) Logarithm converting circuit of digital signal
JP3711290B2 (en) Digital arithmetic circuit
US7277906B2 (en) Method for determining an output value having a lowest error value from an input value
JPS6037502B2 (en) conversion device
JPH0583143A (en) Data converter
EP1041720A1 (en) Binary zero determination signal generating circuit
JPH05134807A (en) A/d converter
JP2642731B2 (en) Address generation circuit
JPS6243572B2 (en)
JP3009533B2 (en) Large-capacity counter using memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050328

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20061228