JPH1078861A - System for converting data using lookup table - Google Patents

System for converting data using lookup table

Info

Publication number
JPH1078861A
JPH1078861A JP23309596A JP23309596A JPH1078861A JP H1078861 A JPH1078861 A JP H1078861A JP 23309596 A JP23309596 A JP 23309596A JP 23309596 A JP23309596 A JP 23309596A JP H1078861 A JPH1078861 A JP H1078861A
Authority
JP
Japan
Prior art keywords
data
converted
lookup table
conversion
flag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP23309596A
Other languages
Japanese (ja)
Inventor
Hirotsugu Sato
博世 佐藤
Eiji Yokogawa
英二 横川
Mitsuru Mima
充 美馬
Hisataka Nakajima
久貴 中嶋
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.)
Kokusai Electric Corp
Original Assignee
Kokusai Electric 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 Kokusai Electric Corp filed Critical Kokusai Electric Corp
Priority to JP23309596A priority Critical patent/JPH1078861A/en
Publication of JPH1078861A publication Critical patent/JPH1078861A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the use efficiency of the memory of a lookup table in which the range of a value to be converted is dynamically changed, and the wide value to be converted range is always used in an unnecessary way. SOLUTION: Two lookup tables 2 and 3 are serially connected in a hierarchical structure. The upper 16 bit of data to be converted 1 are connected with the address bus of the memory of the master lookup table 2, a flag part 22 of a flag for judging the data to be converted of a conversion data/slave table is provided at the 1 bit of the data, and a data part 21 in which the data to be converted of the conversion data/slave table are stored is provided at the residual 8 hit. The lower 8 bit of the data to be converted and the 8 bit of a data bus 41 of the master lookup table 2 are connected with the address bus of the memory of the slave lookup table 3, and conversion data are stored in a data part 31. When a flag = 0, the data of the master lookup table 2 are selected by a selector 6, and when a flag = 1, the data of the slave lookup table 3 are selected.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、高速にデータ変換
を行なうルックアップテーブルを用いたデータ変換シス
テムに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a data conversion system using a look-up table for performing high-speed data conversion.

【0002】[0002]

【従来の技術】高速に、データ変換する方法として、従
来、ルックアップテーブルを用いた変換方法がよく知ら
れている。ルックアップテーブルとは、ROM、または
RAMなどのメモリを用いて、変換したいデータ値(被
変換データ値)をメモリのアドレス値に入力して、メモ
リから出力されるデータ値を変換値とするデータ変換を
行う方法である。
2. Description of the Related Art As a high-speed data conversion method, a conversion method using a lookup table is well known. A look-up table is a data in which a data value to be converted (data value to be converted) is input to an address value of the memory using a memory such as a ROM or a RAM, and a data value output from the memory is used as a conversion value. This is the method of performing the conversion.

【0003】これによるデータ変換時間は、メモリのア
クセス時間のみなので高速にデータ変換が行える。しか
し、ルックアップテーブルは、被変換値範囲が固定され
ていて、常に広い被変換値範囲が必要な使われかた(た
とえば、非線型データを線形データに変換するような
時)で使用されることが多い。
Since the data conversion time is only the memory access time, data conversion can be performed at high speed. However, lookup tables are used in applications where the transformed value range is fixed and always requires a wide transformed value range (eg, when converting non-linear data to linear data). Often.

【0004】そこで、今、被変換値範囲が動的に変化し
て、常に広い被変換値範囲が必要でない使われかたをす
るシステムに、このルックアップテーブルをそのまま使
用すると、メモリの使用効率が悪く、経済的ではない。
Therefore, if the look-up table is used as it is in a system in which the range of converted values is dynamically changed and a wide range of converted values is not always necessary, the efficiency of memory usage can be improved. Bad and not economic.

【0005】[0005]

【発明が解決しようとする課題】たとえば、全被変換デ
ータ数が1677216(24ビット)の内、ある時に
使用される被変換データ数が256(8ビット)のデー
タ変換システムにおいて、ルックアップテーブルを使用
すると、1677216word×8bit(1341
7728bit)のメモリが必要になり、その時の、メ
モリの使用効率は(=データ検索数(256)/メモリ
容量(1677216)*100=0.0015%)と
なり使用効率が悪く、不経済である。
For example, in a data conversion system in which the total number of data to be converted is 256 (8 bits) out of 1677216 (24 bits), a look-up table is used. When used, 1677216 words × 8 bits (1341
7728 bits) of memory is required, and the memory usage efficiency at that time is (= number of data searches (256) / memory capacity (1677216) * 100 = 0.0015%), which is inefficient and uneconomical.

【0006】本発明の目的は、上記のように被変換値範
囲が動的に変化して、常に広い被変換値範囲を必要でな
い使われ方をするルックアップテーブルのメモリの使用
効率を改善する方法を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to improve the efficiency of use of a look-up table memory in which a range of converted values is dynamically changed and a wide range of converted values is not necessarily used as described above. It is to provide a method.

【0007】[0007]

【課題を解決するための手段】前記の目的は、ルックア
ップテーブルをマスタ/スレーブの階層構造に設ける。
マスタルックアップテーブルのデータ構造をデータ部と
フラグ部で構成する。フラグによってマスタ/スレーブ
の選択をする手段を有せしめることによって達成する。
The above object is achieved by providing a look-up table in a master / slave hierarchical structure.
The data structure of the master lookup table is composed of a data part and a flag part. This is achieved by providing a means for selecting a master / slave by a flag.

【0008】前記の手段によれば、まず、マスタルック
アップテーブルで被変換データのあるビット範囲領域で
の検索を行い、そのビット範囲で一意的に変換データが
決定する被変換データと、一意的に変換データが決定で
きない被変換データに分け、一意的に変換データが決定
できない被変換データは、スレーブルックアップテーブ
ルで変換を行う。
According to the above-described means, first, a search is performed in a certain bit range area of the data to be converted in the master lookup table, and the converted data whose conversion data is uniquely determined in the bit range is determined. The converted data for which the converted data cannot be determined is converted, and the converted data for which the converted data cannot be uniquely determined is converted using the slave lookup table.

【0009】スレーブルックアップテーブルは、マスタ
ルックアップテーブルで使用されなかった被変換データ
のビット範囲のデータ値と、マスタルックアップテーブ
ルから出力されたデータ値より検索を行い、変換データ
を出力する。
The slave lookup table performs a search based on the data values in the bit range of the converted data not used in the master lookup table and the data values output from the master lookup table, and outputs the converted data.

【0010】マスタルックアップテーブルからは、出力
されるデータが、変換データなのか、スレーブルックア
ップテーブルの検索のためのデータ値なのかを判別でき
るフラグを出力する機能があり、また、そのフラグによ
り、マスタルックアップテーブルから出力されるデータ
値とスレーブルックアップテーブルから出力されるデー
タ値を選択する機能がある。
The master look-up table has a function of outputting a flag which can determine whether the output data is converted data or a data value for searching the slave look-up table. Has a function of selecting a data value output from the master lookup table and a data value output from the slave lookup table.

【0011】このようにルックアップテーブルをマスタ
/スレーブの階層構造にし多段従属接続としたことによ
り、ルックアップテーブルのメモリ容量の低減ができ
る。
As described above, the look-up table has a hierarchical structure of a master / slave and has a multistage cascade connection, so that the memory capacity of the look-up table can be reduced.

【0012】[0012]

【発明の実施の形態】以下本発明の実施の形態を図によ
り説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0013】図1は、本発明の一実施形態の構成図であ
る。同図は、例として、全被変換データ数が16772
16(24ビット)の内、ある時に使用される被変換デ
ータ数が256(8ビット)のデータ変換システムにお
ける、ルックアップテーブルの構成図である。2つのル
ックアップテーブル2,3が階層構造に従属接続して設
けられる。
FIG. 1 is a configuration diagram of an embodiment of the present invention. The figure shows that, as an example, the total number of data to be converted is 16772
FIG. 10 is a configuration diagram of a look-up table in a data conversion system in which the number of data to be converted used at a certain time out of 16 (24 bits) is 256 (8 bits). Two lookup tables 2 and 3 are provided in a hierarchical connection.

【0014】マスタルックアップテーブル2には655
36word×9bit(589824bit)の容量
のメモリが使用され、そのアドレス・バスには被変換デ
ータ1の上位16bit11が接続されており、データ
の1bitには変換データ/スレーブテーブルの被変換
データを判定するフラグのフラグ部22が、残り8bi
tには、変換データ/スレーブテーブルの被変換データ
が記憶されるデータ部21が設けられている。今、仮に
フラグが“0”の時は、変換データが、“1”の時はス
レーブテーブルの被変換データが記憶されているとす
る。
The master lookup table 2 has 655
A memory having a capacity of 36 words × 9 bits (589824 bits) is used. The upper 16 bits 11 of the data to be converted 1 are connected to the address bus, and the conversion data / data to be converted in the slave table is determined for one bit of data. The flag section 22 of the flag has the remaining 8 bi
At t, a data section 21 for storing the converted data / converted data of the slave table is provided. Now, it is assumed that when the flag is “0”, the conversion data is stored, and when the flag is “1”, the conversion target data of the slave table is stored.

【0015】スレーブルックアップテーブル3には、6
5536word×8bit(524288bit)の
容量のメモリが使用され、そのアドレス・バスには、被
変換データの下位8bit12とマスタルックアップテ
ーブル2のデータ・バス41の8bitが接続されてお
り、データ部31には、変換データが記憶されている。
The slave lookup table 3 contains 6
A memory having a capacity of 5536 words × 8 bits (524288 bits) is used. The lower 8 bits 12 of the data to be converted and the 8 bits of the data bus 41 of the master lookup table 2 are connected to the address bus. Stores conversion data.

【0016】なお、本実施形態では、マスタルックアッ
プテーブル2、スレーブルックアップテーブル3のアド
レス・バスの接続をそれぞれ、上位16bit、下位8
bitとしているが、下位16bit、上位8bitで
接続しても、動作上問題は生じない。
In this embodiment, the connection of the address buses of the master look-up table 2 and the slave look-up table 3 is set to the upper 16 bits and lower 8 bits, respectively.
Although the number of bits is set, there is no operational problem even if the connection is made with the lower 16 bits and the upper 8 bits.

【0017】マスタルックアップテーブル2、スレーブ
ルックアップテーブル3から出力されるデータ・バス4
1,51は、セレクタ6に接続されている。
Data bus 4 output from master look-up table 2 and slave look-up table 3
1 and 51 are connected to the selector 6.

【0018】被変換データをそれぞれのルックアップテ
ーブル2,3のアドレスに入力すると、それぞれのルッ
クアップテーブルから記憶されているデータが出力さ
れ、フラグが“0”の時は、マスタルックアップテーブ
ル2のデータが、フラグが“1”の時は、スレーブルッ
クアップテーブル3のデータが、セレクタ6により選択
され、変換データ7として出力される。
When the converted data is input to the addresses of the lookup tables 2 and 3, the stored data is output from the lookup tables. When the flag is "0", the master lookup table 2 is output. When the flag is “1”, the data of the slave lookup table 3 is selected by the selector 6 and output as the conversion data 7.

【0019】このような、構成にすることにより、メモ
リの容量は、1114112bitで済み、従来の方法
で使用したときに比べ約1/10(=1114112b
it/13417728bit)に低減でき、メモリの
使用効率が向上する。
By adopting such a configuration, the memory capacity can be 1114112 bits, which is about 1/10 (= 1114112b) as compared with the conventional method.
it / 13471728 bits), and the memory use efficiency is improved.

【0020】以上の実施形態では、セレクタをハードウ
ェアで構成したが、変換時間に余裕があれば、MPUの
ソフトウエア処理でセレクタを実現することが可能であ
る。図2にソフトウエアで実現した時の、フローチャー
トを示す。
In the above embodiment, the selector is configured by hardware. However, if there is enough time for conversion, the selector can be realized by software processing of the MPU. FIG. 2 shows a flowchart when implemented by software.

【0021】データ変換開始し、ステップS1で被変換
データの上位16bitのデータ値をアドレスとするマ
スタルックアップテーブル2のデータ値を読み出す。ス
テップS2で読み出したデータ値のフラグ判定をし、フ
ラグ“0”ではステップS3でマスタルックアップテー
ブル2のデータ値を変換データとする。ステップS2の
判定でフラグ“1”のときは、ステップS4で被変換デ
ータの下位8bitのデータ値とマスタルックアップテ
ーブル2のデータ値からアドレス生成してスレーブルッ
クアップテーブル3のデータ値を読み出し、このスレー
ブルックアップテーブル3のデータ値を変換データとす
る(S5)。
Data conversion is started, and in step S1, the data value of the master lookup table 2 having the address of the upper 16 bits of the data to be converted is read. In step S2, the flag of the read data value is determined, and if the flag is "0", the data value of the master lookup table 2 is set as converted data in step S3. If the flag is "1" in the determination in step S2, an address is generated from the data value of the lower 8 bits of the converted data and the data value of the master lookup table 2 in step S4, and the data value of the slave lookup table 3 is read. The data value of the slave lookup table 3 is set as conversion data (S5).

【0022】[0022]

【発明の効果】以上のように本発明によれば、被変換値
範囲が動的に変化するデータ変換システムにおいて、ル
ックアップテーブルのメモリの使用効率を著しく改善す
ることができ、経済的に効果が大きい。
As described above, according to the present invention, in a data conversion system in which the range of values to be converted dynamically changes, the use efficiency of the memory of the look-up table can be remarkably improved, which is economically effective. Is big.

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

【図1】本発明の一実施形態の構成図である。FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】本発明の他の実施形態の処理フローチャート図
である。
FIG. 2 is a process flowchart of another embodiment of the present invention.

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

1…被変換データ、2…マスタルックアップテーブルの
メモリ、3…スレーブルックアップテーブルのメモリ、
41,51…データ・バス、6…セレクタ、7…変換デ
ータ値。
1 ... Data to be converted, 2 ... Memory of master lookup table, 3 ... Memory of slave lookup table,
41, 51: data bus, 6: selector, 7: converted data value.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中嶋 久貴 東京都中野区東中野三丁目14番20号 国際 電気株式会社内 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Kuki Nakajima 3-14-20 Higashinakano, Nakano-ku, Tokyo Inside Kokusai Electric Corporation

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 被変換値範囲が動的に変化するデータの
データ変換システムにおいて、複数のルックアップテー
ブルを階層構造に多段従属接続して設け、該階層構造の
マスタルックアップテーブルに該マスタルックアップテ
ーブルから出力されるデータが変換データか、他のスレ
ーブルックアップテーブルの被変換データなのかを示す
フラグ領域を設け、該フラグから前記マスタルックアッ
プテーブルから出力される変換データとスレーブルック
アップテーブルから出力される変換データを選択する手
段を設けたことを特徴とするルックアップテーブルを用
いたデータ変換システム。
1. A data conversion system for data in which a range of values to be converted dynamically changes, a plurality of lookup tables are provided in a multi-tiered connection in a hierarchical structure, and the master look-up table in the hierarchical structure has a master look-up table. A flag area is provided to indicate whether data output from the up-table is converted data or data to be converted in another slave lookup table, and the conversion data output from the master lookup table and the slave lookup table from the flag are provided. A data conversion system using a look-up table, further comprising means for selecting conversion data output from the data processing apparatus.
【請求項2】 前記データ選択手段が、フラグにより出
力変換データを切り換えるセレクタであることを特徴と
する請求項1記載のルックアップテーブルを用いたデー
タ変換システム。
2. A data conversion system using a look-up table according to claim 1, wherein said data selection means is a selector for switching output conversion data according to a flag.
【請求項3】 前記データ選択手段が、フラグが一方の
ときマスタルックアップテーブルのデータ値を変換デー
タとし、フラグが他方のとき被変換データの下位データ
値とマスタルックアップテーブルの被変換データからア
ドレス生成してスレーブルックアップテーブルのデータ
値を読み出し、スレーブルックアップテーブルのデータ
値を変換データとするMPUのソフトウェア処理である
ことを特徴とする請求項1記載のルックアップテーブル
を用いたデータ変換システム。
3. The data selection means according to claim 1, wherein when the flag is one, the data value of the master lookup table is used as the conversion data, and when the flag is the other, the data selection means uses the lower data value of the conversion data and the conversion data of the master lookup table. 2. A data conversion using a look-up table according to claim 1, wherein the data conversion is MPU software processing in which an address is generated, a data value of a slave lookup table is read, and a data value of the slave lookup table is converted data. system.
JP23309596A 1996-09-03 1996-09-03 System for converting data using lookup table Pending JPH1078861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23309596A JPH1078861A (en) 1996-09-03 1996-09-03 System for converting data using lookup table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23309596A JPH1078861A (en) 1996-09-03 1996-09-03 System for converting data using lookup table

Publications (1)

Publication Number Publication Date
JPH1078861A true JPH1078861A (en) 1998-03-24

Family

ID=16949709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23309596A Pending JPH1078861A (en) 1996-09-03 1996-09-03 System for converting data using lookup table

Country Status (1)

Country Link
JP (1) JPH1078861A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111504427A (en) * 2020-05-27 2020-08-07 岳海民 Gas meter detecting method and gas meter using same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111504427A (en) * 2020-05-27 2020-08-07 岳海民 Gas meter detecting method and gas meter using same

Similar Documents

Publication Publication Date Title
US5659700A (en) Apparatus and method for generating a modulo address
US7406561B2 (en) Data coding system and method
US7299338B2 (en) Vector indexed memory unit and method
US6785798B2 (en) Method and system for circular addressing with efficient memory usage
CN112955878B (en) Apparatus for implementing activation logic of neural network and method thereof
US7317329B2 (en) Lookup table circuit
JPH1078861A (en) System for converting data using lookup table
US20040186972A1 (en) Associated Content Storage System
JP2000173261A (en) Memory operated in corrected ping-pong mode
US6311199B1 (en) Sign extension unit
US5909185A (en) Lookup table device and signal conversion method
JP2000187607A (en) Name converting device and recording medium
JPS6037502B2 (en) conversion device
JPH03189749A (en) Address converting device
JP2002153074A (en) Pwm generator
JP2622553B2 (en) Microcomputer
JPH0660019A (en) Data storage system
JP2002358236A (en) Information processing equipment, memory management unit, address translation device
JPH01303545A (en) Memory address converting circuit
JPS5914184A (en) Address converting system
JPH05334191A (en) Address translator
JPH09305481A (en) Address generator for generating addresses used for zigzag scan of contents of memory array
JPS60117351A (en) Address converter
Karagianni et al. A novel hardware algorithm for residue evaluation
JPH08190507A (en) Memory device and memory access method