JP3563235B2 - Data interpolation circuit - Google Patents

Data interpolation circuit Download PDF

Info

Publication number
JP3563235B2
JP3563235B2 JP15067397A JP15067397A JP3563235B2 JP 3563235 B2 JP3563235 B2 JP 3563235B2 JP 15067397 A JP15067397 A JP 15067397A JP 15067397 A JP15067397 A JP 15067397A JP 3563235 B2 JP3563235 B2 JP 3563235B2
Authority
JP
Japan
Prior art keywords
data
memory
word
read
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.)
Expired - Lifetime
Application number
JP15067397A
Other languages
Japanese (ja)
Other versions
JPH10340182A (en
Inventor
賀津雄 戸崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
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 Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP15067397A priority Critical patent/JP3563235B2/en
Publication of JPH10340182A publication Critical patent/JPH10340182A/en
Application granted granted Critical
Publication of JP3563235B2 publication Critical patent/JP3563235B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、メモリに一旦データを書き込んだ後、メモリに書き込まれた一定単位のデータを読み出して処理することを繰り返し行う装置において、データの書き込み時にデータが書き込まれなかったワードのデータを予め設定された所定値で補間して出力するデータ補間回路に関するものである。
【0002】
【従来の技術】
例えば、フォーマット変換等の目的のために、データを一旦メモリに書き込んだ後、メモリに書き込まれた一定単位のデータを読み出して処理することを繰り返し行う装置において、データの書き込みの時には、読み出し動作で読み出される一定単位のデータの内、装置で予め設定された所定値ではないデータだけが書き込まれ、データの読み出しの時には、読み出し動作で読み出される一定単位のデータが順次読み出されるものとする。
【0003】
ここでは、データの書き込みの時に書き込まれる、装置で予め設定された所定値ではないデータを有効データと呼ぶこととし、装置で予め設定された所定値であるため、データの書き込みの時には書き込まれないデータを無効データと呼ぶことにする。
【0004】
このような装置においては、無効データがメモリに書き込まれないため、読み出し動作で読み出される一定単位のデータの内、有効データが書き込まれなかったメモリのワードは、今回のデータの書き込み以前に書き込まれた有効データが書き込まれたままの状態になってしまう。従って、データ処理に不具合が生じないように、有効データが書き込まれなかったメモリのワードのデータとして、装置で予め設定された所定値が読み出されるようにする必要がある。
【0005】
例えば、カラー静止画像の国際標準符号化方式であるJPEG(Joint Photographic Experts Group)アルゴリズムを採用する符号化装置において、符号化された圧縮データの復号化では、例えば図4に示されるように、圧縮データをハフマン復号化し、ジグザグスキャンの順序で得られるデータ列を一旦メモリに格納した後、ブロックスキャンの順序でメモリからデータを読み出し、逆DCT(離散コサイン)変換することにより復号化後の画像データを得る。
【0006】
ここで、メモリは、ジグザグスキャンの順序で得られるデータをブロックスキャンの順序にフォーマット変換するためのものである。メモリへのデータの書き込みおよび読み出しは、例えば1ブロック分の画像データを格納するメモリを2つ設け、一方をデータの書き込みに使用し、かつ、他方をデータの読み出しに使用し、データの書き込みと読み出しとで使用するメモリを交互に交換することにより、連続的に処理を行わせることができる。
【0007】
しかし、ハフマン復号化では、‘0’でない有効係数に相当する有効データを得ることはできるが、最後の有効係数以降の連続した‘0’である無効係数に相当する無効データを得ることができない。従って、有効データだけがメモリに書き込まれるが、データの読み出し時には、メモリから読み出したデータが有効データであるか否かの区別がつかないため、データの書き込みの時に、有効データが書き込まれなかったメモリのワードに‘0’を書き込んでいる。
【0008】
ここで、メモリへのデータの書き込み速度に対して、メモリからのデータの読み出し速度が十分に遅い場合には、例えば有効データを書き込む前に、メモリの全てのワードに‘0’を書き込む等の初期化をした後、有効データの書き込みを行うようにすれば特に問題はないが、データの書き込みとデータの読み出しとが同じ動作レートである場合には、データの書き込みが終了するまで、データの読み出しにウェイトがかかるという問題点があった。
【0009】
また、例えばメモリへ有効データを書き込む時に、有効データが書き込まれなかったメモリのワードに‘0’を書き込むようにした場合、有効データが書き込まれないメモリのワードは、データの書き込み毎に変化して予測することができないため、結局、データの読み出しにウェイトがかかってしまうという問題点があった。また、有効データが書き込まれなかったメモリのワードに‘0’を書き込むようにするためには、制御がかなり複雑になるという問題点もあった。
【0010】
【発明が解決しようとする課題】
本発明の目的は、前記従来技術に基づく問題点をかえりみて、簡単な回路構成で、メモリからのデータの読み出しにウェイトをかけることなく、有効データが書き込まれなかったメモリのワードのデータを補間することができ、効率よくデータ処理を行うことができるデータ補間回路を提供することにある。
【0011】
【課題を解決するための手段】
上記目的を達成するために、本発明は、所定数のワードを有するメモリの各々のワードに1対1に対応して、前記メモリの各々のワードにデータが書き込まれたか否かを示すフラグを保持する手段と、前記メモリのワードにデータが書き込まれた時に、このデータが書き込まれたワードに対応するフラグをセットする手段と、前記メモリのワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグがセットされていれば前記メモリの出力を出力し、前記データが読み出されたワードに対応するフラグがセットされていなければ予め設定された所定値を出力する手段と、前記メモリのワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグをリセットする手段とを備えることを特徴とするデータ補間回路を提供するものである。
【0012】
【発明の実施の形態】
以下に、添付の図面に示す好適実施例に基づいて、本発明のデータ補間回路を詳細に説明する。
【0013】
図1は、本発明のデータ補間回路の一実施例の概念図である。
図示例のデータ補間回路10は、所定ビット幅のワードを所定数有するメモリ12、アドレスADDR_INを保持するフリップフロップ14、有効データDATA_INを保持するフリップフロップ16、メモリ12の各々のワードに1対1に対応して、各々のワードに有効データが書き込まれたか否かを示すフラグを保持するフラグレジスタ18、および、ANDゲート20を有する。
【0014】
ここで、メモリ12は、アドレスによって指定されるワードへのデータの書き込みおよび読み出しができる半導体メモリであって、例えば従来より公知のSRAMやDRAM等を用いることができる。また、図示していないが、例えば2つ以上のメモリ12を設け、一方を次回のデータの書き込みに使用しつつ、他方を前回のデータの読み出しに使用し、データの書き込みと読み出しとでメモリ12を交互に使用することもできる。
【0015】
フリップフロップ14は、メモリ12のワードアドレスを指定するアドレスADDR_INを保持するもので、フリップフロップ14の出力信号は、メモリ12のアドレス入力端子およびフラグレジスタ18に入力される。
また、フリップフロップ16は、メモリ12へ書き込まれる有効データDATA_INを保持するもので、フリップフロップ16の出力信号は、メモリ12のデータ入力端子に入力される。
【0016】
フラグレジスタ18は、上述するように、メモリ12の各々のワードに1対1に対応する1ビットのフラグを保持するもので、各々のフラグは、アドレスADDR_INによって指定されるメモリ12のワードに有効データが書き込まれた時に、有効データが書き込まれたメモリ12のワードに対応するフラグがセットされ、メモリ12のワードからデータが読み出された時に、データが読み出されたメモリ12のワードに対応するフラグがリセットされる。
【0017】
各々のフラグは、例えば電源投入時に初期化される。その後、上述するように、メモリ12のワードに有効データが書き込まれた時に、このワードに対応するフラグがセットされ、メモリ12のワードからデータが読み出された時に、このワードに対応するフラグがリセットされる。
これにより、全てのフラグは、メモリ12のワードからのデータの読み出しが終了した時点で常に初期化されていることになる。
【0018】
なお、フラグレジスタ18の回路構成は特に限定されないが、例えばレジスタ等のように、メモリ12の各々のワードに1対1に対応して設けられる1ビットのフラグを保持する手段、例えばアドレスデコーダ等のように、アドレスADDR_INおよび図示していないデータの書き込み信号および読み出し信号等に基づいてフラグをセットおよびリセットする手段、例えばマルチプレクサ等のように、各々のフラグを選択的に出力する手段等を有する。
【0019】
各々のフラグは、セットされた時に予め設定された‘1’または‘0’のいずれかに設定される。すなわち、フラグは、‘1’にセットされても‘0’にセットされてもよい。また、これとは反対に、フラグは、リセットされた時には、セットされた時と反対の‘0’または‘1’に設定される。なお、本実施例では、各々のフラグは、初期化でリセットされて全て‘0’とされ、セットされると‘1’に設定され、リセットされると‘0’に設定されるものとする。
【0020】
ANDゲート20は、メモリ12から読み出されたデータを、データが読み出されたワードに対応するフラグレジスタ18からの1ビットのフラグによってゲートし、これを出力データDATA_OUTとして出力するものである。
【0021】
すなわち、メモリ12のワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグレジスタ18からのフラグがセットされて‘1’であれば、メモリ12から読み出されたデータがそのまま出力データDATA_OUTとして出力され、これに対して、データが読み出されたワードに対応するフラグレジスタ18からのフラグがリセットされて‘0’であれば、出力データDATAA_OUTとして‘0’が出力される。
【0022】
なお、本実施例では、ANDゲート20を用いているが、本発明はこれに限定されず、メモリ12のワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグレジスタ18からのフラグがセットされていれば、メモリ12から読み出されたデータがそのまま出力され、フラグがセットされていなければ、出力データDATA_OUTとして予め設定された所定値が出力されるようにしてもよい。
【0023】
例えば、ANDゲート20の代わりにマルチプレクサを使用し、フラグレジスタ18からのフラグの状態に応じて、メモリ12からの読み出しデータと予め設定された所定値とを選択的に出力するようにしてもよいし、あるいは、フラグレジスタ18からのフラグとその反転信号の状態に応じて、ANDゲート20の代わりにANDゲートやORゲートを組み合わせて使用し、予め設定された所定値が出力されるように構成するなどしてもよい。
【0024】
次に、データの書き込みと読み出しとでフォーマット変換を行う場合を例に挙げて、図1に示されるデータ補間回路10の動作について説明する。
【0025】
図2は、メモリへのデータの書き込みおよびメモリからのデータの読み出しの順序を示す一実施例の概念図である。
同図に示されるように、ここでは、メモリ12へのデータの書き込みは、書き込みアドレス0,1,2,3,4,5,6,7,8,9の順序で有効データだけが書き込まれ、メモリ12からのデータの読み出しは、読み出しアドレス0,2,4,6,8,1,3,5,7,9の順序で全てのデータが読み出されるものとする。
【0026】
また、図3は、本発明のデータ補間回路の動作の流れを示す一実施例の概念図である。
図3に示されるように、本発明のデータ補間回路10においては、まず、各々のフラグが初期化される。例えば、電源投入時にパワーオンリセットにより、あるいは、データ補間回路10に対してシステムリセットを与えることにより、全てのフラグがリセットされて‘0’に初期化される。
【0027】
データの書き込みおよび読み出しが行われるメモリ12のワードは、アドレスADDR_INによって指定される。アドレスADDR_INはフリップフロップ14に保持された後、メモリ12のアドレス入力端子およびフラグレジスタ18に入力される。また、アドレスADDR_INによって指定されたメモリ12のワードへの書き込みデータDATA_INはフリップフロップ16に保持された後、メモリ12のデータ入力端子に入力される。
【0028】
メモリ12へのデータの書き込みは、ここでは、図3に示されるように、例えば書き込みアドレス0のワードに書き込みデータ(有効データ)‘2’が書き込まれ、以下同様にして、書き込みアドレス1,3,4,7,9のワードに、それぞれ書き込みデータ‘3’、‘8’、‘1’、‘3’、‘5’が順次書き込まれ、これ以外の書き込みアドレス2,5,6,8には、有効データは書き込まれない。
【0029】
この時、フラグレジスタ18では、アドレスADDR_INによって指定されるメモリ12のワードに有効データが書き込まれた時同時に、このワード(アドレス)に対応するフラグがセットされる。すなわち、ここでは、図3に示されるように、メモリ12の各々のアドレス(ワード)0,1,2,3,4,5,6,7,8,9に対応するフラグは、それぞれ1,1,0,1,1,0,0,1,0,1となる。
【0030】
データの読み出しが行われるメモリ12のワードも、データの書き込みの場合と同様にアドレスADDR_INによって指定される。アドレスADDR_INによって指定されたメモリ12のワードからの読み出しデータは、メモリ12のデータ出力端子から出力され、このワードに対応するフラグがフラグレジスタ18から出力される。これらは共にANDゲート20に入力され、ANDゲート20からは出力データDATA_OUTが出力される。
【0031】
ここで、アドレスADDR_INによって指定されるメモリ12のワードからデータが読み出された時に、このワードに対応してフラグレジスタ18から出力されるフラグが‘1’であれば、ANDゲート20からは、このワードから読み出されたデータが出力データDATA_OUTとして出力され、これに対し、このワードに対応するフラグが‘0’であれば、このワードからの読み出しデータに係わらず‘0’が出力される。
【0032】
すなわち、フラグレジスタ18からは、読み出しアドレス0に対応するフラグとして‘1’が出力されるため、メモリ12の読み出しアドレス0のワードからの読み出しデータ‘2’が、出力データDATA_OUTとしてANDゲート20から出力される。また、読み出しアドレス2に対応するフラグとしては‘0’が出力されるため、ANDゲート20からは、メモリ12の読み出しアドレス2のワードからの読み出しデータに係わらず‘0’が出力される。
【0033】
以下同様にして、メモリ12の読み出しアドレス4,6,8,1,3,5,7,9に対応するワードのデータを読み出した場合、ANDゲート20からは、アドレス4のワードからの読み出しデータ‘1’、‘0’、‘0’、アドレス1からの読み出しデータ‘3’、アドレス3からの読み出しデータ‘8’、‘0’、アドレス7からの読み出しデータ‘3’、アドレス9からの読み出しデータ‘5’が、出力データDATA_OUTとして順次出力される。
【0034】
この時、フラグレジスタ18では、アドレスADDR_INによって指定されるメモリ12のワードからデータが読み出された時同時に、このワードに対応するフラグがリセットされる。すなわち、ここでは、図3に示されるように、全てのフラグが‘0’となる。これにより、データの読み出しが終了した時点で、フラグレジスタ18の全てのフラグがリセットされて初期化されるため、以下、データの書き込みおよび読み出しを繰り返し行うことができる。
【0035】
本発明のデータ補間回路は、基本的に、以上のようなものである。
【0036】
なお、本発明は、従来技術の説明で述べたJPEGの復号化の場合等のように、フォーマット変換の場合に限定されず、メモリに一旦データを書き込んだ後、メモリに書き込まれた一定単位のデータを読み出して処理することを繰り返し行う装置において、データの書き込み時に有効データが書き込まれなかったワードのデータを、データの読み出しの際に、予め設定された所定値で補間して出力する必要がある場合の全てに適用可能である。
【0037】
また、上記実施例においては、メモリ12からデータを読み出すのと同時に、フラグレジスタ18からフラグを読み出しているが、本発明はこれに限定されず、例えばまずフラグレジスタ18からフラグを読み出した後、フラグが‘0’の場合には、メモリ12からはデータを読み出さず、予め設定された所定値を出力ようにし、フラグが‘1’の場合にのみ、メモリ12からデータを読み出すようにしてもよい。
【0038】
以上、本発明のデータ補間回路について詳細に説明したが、本発明は上記実施例に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
【0039】
【発明の効果】
以上詳細に説明した様に、本発明のデータ補間回路は、所定数のワードを有するメモリの各々のワードに1対1に対応して、メモリの各々のワードにデータが書き込まれたか否かを示すフラグを備え、メモリのワードにデータが書き込まれた時に、このデータが書き込まれたワードに対応するフラグをセットし、メモリのワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグがセットされていればメモリの出力を出力し、フラグがセットされていなければ予め設定された所定値を出力した後、このデータが読み出されたワードに対応するフラグをリセットしておくものである。
本発明のデータ補間回路によれば、初期化のために所定値を書き込むことなく、有効データが書き込まれなかったメモリのワードのデータを補間することができるため、メモリからのデータの読み出しにウェイトをかけることなく、メモリへのデータの書き込みおよび読み出しを同じ動作レートで動作させて効率よくデータ処理を行うことができる。また、本発明のデータ補間回路によれば、フラグを参照することにより、メモリからの読み出しデータが有効データか否かを判断し、有効データが書き込まれなかったメモリのワードのデータを補間することができるため、メモリへのデータの書き込み時に、有効データが書き込まれなかったメモリのワードを判別して、そのメモリのワードに所定値を書き込む必要がなく、そのための複雑な制御回路が必要ないという利点もある。
【図面の簡単な説明】
【図1】本発明のデータ補間回路の一実施例の概念図である。
【図2】メモリへのデータの書き込みおよびメモリからのデータの読み出しの順序を示す一実施例の概念図である。
【図3】本発明のデータ補間回路の動作の流れを示す一実施例の概念図である。
【図4】JPEGにおける復号化の手順を示す一例の概念図である。
【符号の説明】
10 データ補間回路
12 メモリ
14,16 フリップフロップ
18 フラグレジスタ
20 ANDゲート
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a device that repeatedly writes data to a memory and then reads and processes a fixed unit of data written to the memory, and sets in advance data of a word where no data was written at the time of writing the data. The present invention relates to a data interpolation circuit that interpolates and outputs a predetermined predetermined value.
[0002]
[Prior art]
For example, in a device that repeatedly writes data in a memory for the purpose of format conversion and the like, and then reads and processes a certain unit of data written in the memory repeatedly, when data is written, a read operation is performed. It is assumed that, out of the data of a certain unit to be read, only data which is not a predetermined value set in advance by the device is written, and at the time of reading data, the data of a certain unit which is read by the read operation is sequentially read.
[0003]
Here, data that is written at the time of writing data and that is not a predetermined value preset by the device is referred to as valid data, and is a predetermined value preset by the device, and is not written at the time of data writing. The data will be referred to as invalid data.
[0004]
In such a device, since invalid data is not written to the memory, words of the memory to which valid data has not been written out of the fixed unit of data read out in the read operation are written before writing this data. Valid data remains written. Therefore, it is necessary to read out a predetermined value preset in the device as data of a word of a memory in which valid data has not been written so that no trouble occurs in data processing.
[0005]
For example, in an encoding apparatus that employs a JPEG (Joint Photographic Experts Group) algorithm, which is an international standard encoding method for color still images, in decoding of encoded compressed data, for example, as shown in FIG. After Huffman decoding the data, temporarily storing the data sequence obtained in the zigzag scan order in the memory, reading the data from the memory in the block scan order, and performing inverse DCT (discrete cosine) transform, the decoded image data is obtained. Get.
[0006]
Here, the memory converts the data obtained in the zigzag scan order into the block scan order. For writing and reading data to and from the memory, for example, two memories for storing one block of image data are provided, one is used for writing data, and the other is used for reading data. By alternately exchanging the memory used for the reading and the reading, the processing can be continuously performed.
[0007]
However, in Huffman decoding, valid data corresponding to non-zero effective coefficients can be obtained, but invalid data corresponding to consecutive zero coefficients after the last valid coefficient cannot be obtained. . Therefore, only valid data is written to the memory, but at the time of reading data, it is not possible to distinguish whether or not the data read from the memory is valid data. '0' is written to the memory word.
[0008]
Here, when the speed of reading data from the memory is sufficiently slower than the speed of writing data to the memory, for example, writing '0' to all words of the memory before writing valid data is performed. There is no particular problem if valid data is written after initialization, but if data writing and data reading have the same operation rate, data writing will be continued until data writing is completed. There has been a problem that a weight is required for reading.
[0009]
Further, for example, when writing valid data to the memory, if “0” is written to the word of the memory where the valid data is not written, the word of the memory where the valid data is not written changes every time data is written. As a result, there is a problem in that reading data requires a weight. Further, there is also a problem that control is considerably complicated in order to write "0" in a word of a memory in which valid data has not been written.
[0010]
[Problems to be solved by the invention]
An object of the present invention is to interpolate data of a word in a memory in which valid data is not written, with a simple circuit configuration, without giving a weight to reading data from the memory, in view of the problems based on the conventional technology. It is another object of the present invention to provide a data interpolation circuit which can perform data processing efficiently.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a flag indicating whether data has been written to each word of the memory, in one-to-one correspondence with each word of the memory having a predetermined number of words. Holding means, when data is written to a word in the memory, means for setting a flag corresponding to the word in which the data has been written, and when the data is read from the word in the memory, If the flag corresponding to the read word is set, the output of the memory is output. If the flag corresponding to the word from which the data is read is not set, a preset value is output. Means, and when data is read from a word in the memory, means for resetting a flag corresponding to the word from which the data was read. There is provided a data interpolation circuit according to claim.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a data interpolation circuit of the present invention will be described in detail based on a preferred embodiment shown in the accompanying drawings.
[0013]
FIG. 1 is a conceptual diagram of an embodiment of a data interpolation circuit according to the present invention.
The data interpolation circuit 10 in the illustrated example includes a memory 12 having a predetermined number of words having a predetermined bit width, a flip-flop 14 holding an address ADDR_IN, a flip-flop 16 holding valid data DATA_IN, and a one-to-one correspondence with each word of the memory 12. , A flag register 18 for holding a flag indicating whether or not valid data has been written to each word, and an AND gate 20.
[0014]
Here, the memory 12 is a semiconductor memory capable of writing and reading data to and from a word specified by an address. For example, a conventionally known SRAM or DRAM can be used. Further, although not shown, for example, two or more memories 12 are provided, and one is used for writing the next data, and the other is used for reading the previous data. Can be used alternately.
[0015]
The flip-flop 14 holds an address ADDR_IN that specifies a word address of the memory 12, and an output signal of the flip-flop 14 is input to an address input terminal of the memory 12 and a flag register 18.
The flip-flop 16 holds valid data DATA_IN written to the memory 12, and an output signal of the flip-flop 16 is input to a data input terminal of the memory 12.
[0016]
As described above, the flag register 18 holds a one-bit flag corresponding to each word of the memory 12 on a one-to-one basis. Each flag is valid for a word of the memory 12 specified by the address ADDR_IN. When data is written, a flag corresponding to the word of the memory 12 in which valid data is written is set, and when data is read from the word of the memory 12, the flag corresponds to the word of the memory 12 from which the data is read. Flag is reset.
[0017]
Each flag is initialized, for example, when the power is turned on. Thereafter, as described above, when valid data is written to a word in the memory 12, a flag corresponding to this word is set, and when data is read from a word in the memory 12, a flag corresponding to this word is set. Reset.
As a result, all the flags are always initialized when the reading of the data from the word in the memory 12 is completed.
[0018]
The circuit configuration of the flag register 18 is not particularly limited, but means for holding a 1-bit flag provided in one-to-one correspondence with each word of the memory 12, such as a register, for example, an address decoder Means for setting and resetting a flag based on an address ADDR_IN and a data write signal and a read signal (not shown), for example, means for selectively outputting each flag such as a multiplexer, etc. .
[0019]
Each flag is set to either "1" or "0" which is set in advance when set. That is, the flag may be set to '1' or '0'. Conversely, when the flag is reset, it is set to '0' or '1', which is the opposite of when it was set. In this embodiment, each flag is reset at initialization to be all "0", set to "1" when set, and set to "0" when reset. .
[0020]
The AND gate 20 gates the data read from the memory 12 by a 1-bit flag from the flag register 18 corresponding to the word from which the data has been read, and outputs this as output data DATA_OUT.
[0021]
That is, when data is read from a word in the memory 12 and the flag from the flag register 18 corresponding to the word from which the data is read is set to “1”, the data is read from the memory 12. The data is output as output data DATA_OUT as it is, whereas if the flag from the flag register 18 corresponding to the word from which the data has been read is reset to '0', '0' is output as DATAA_OUT. Is output.
[0022]
In this embodiment, the AND gate 20 is used. However, the present invention is not limited to this. When data is read from a word in the memory 12, a flag corresponding to the word from which the data is read is used. If the flag from the register 18 is set, the data read from the memory 12 is output as it is. If the flag is not set, a predetermined value set as the output data DATA_OUT is output. Is also good.
[0023]
For example, a multiplexer may be used in place of the AND gate 20, and data read from the memory 12 and a predetermined value may be selectively output according to the state of the flag from the flag register 18. Alternatively, an AND gate or an OR gate may be used in place of the AND gate 20 in accordance with the state of the flag from the flag register 18 and the inverted signal thereof, so that a preset predetermined value is output. You may do it.
[0024]
Next, the operation of the data interpolation circuit 10 shown in FIG. 1 will be described by taking as an example a case where format conversion is performed between writing and reading of data.
[0025]
FIG. 2 is a conceptual diagram of one embodiment showing the order of writing data to the memory and reading data from the memory.
As shown in the figure, here, when writing data to the memory 12, only valid data is written in the order of write addresses 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. In reading data from the memory 12, all data are read in the order of the read addresses 0, 2, 4, 6, 8, 1, 3, 5, 7, and 9.
[0026]
FIG. 3 is a conceptual diagram of one embodiment showing a flow of the operation of the data interpolation circuit of the present invention.
As shown in FIG. 3, in the data interpolation circuit 10 of the present invention, first, each flag is initialized. For example, all the flags are reset and initialized to '0' by a power-on reset when the power is turned on or by giving a system reset to the data interpolation circuit 10.
[0027]
The word of the memory 12 where data is written and read is specified by the address ADDR_IN. After the address ADDR_IN is held in the flip-flop 14, it is input to the address input terminal of the memory 12 and the flag register 18. The data DATA_IN to be written to the word of the memory 12 specified by the address ADDR_IN is stored in the flip-flop 16 and then input to the data input terminal of the memory 12.
[0028]
In this case, as shown in FIG. 3, for example, the write data (valid data) '2' is written to the word at the write address 0, and the write addresses 1 and 3 are similarly written. , 4, 7, 9 write data '3', '8', '1', '3', '5' are sequentially written, respectively, and the other write addresses 2, 5, 6, 8 are written. No valid data is written.
[0029]
At this time, in the flag register 18, when valid data is written in the word of the memory 12 specified by the address ADDR_IN, a flag corresponding to this word (address) is set at the same time. That is, here, as shown in FIG. 3, the flags corresponding to the respective addresses (words) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 of the memory 12 are 1, 1,0,1,1,0,0,1,0,1.
[0030]
The word of the memory 12 from which data is read is also specified by the address ADDR_IN as in the case of writing data. Read data from a word in the memory 12 specified by the address ADDR_IN is output from a data output terminal of the memory 12, and a flag corresponding to this word is output from the flag register 18. These are both input to the AND gate 20, and the output data DATA_OUT is output from the AND gate 20.
[0031]
Here, when data is read from the word in the memory 12 specified by the address ADDR_IN and the flag output from the flag register 18 corresponding to this word is “1”, the AND gate 20 outputs: The data read from this word is output as output data DATA_OUT. On the other hand, if the flag corresponding to this word is '0', '0' is output regardless of the data read from this word. .
[0032]
That is, since “1” is output from the flag register 18 as a flag corresponding to the read address 0, read data “2” from the word at the read address 0 of the memory 12 is output from the AND gate 20 as output data DATA_OUT. Is output. Since “0” is output as the flag corresponding to the read address 2, “0” is output from the AND gate 20 regardless of the read data from the word at the read address 2 in the memory 12.
[0033]
Similarly, when the data of the word corresponding to the read addresses 4, 6, 8, 1, 3, 5, 7, and 9 of the memory 12 is read, the read data from the word of the address 4 is output from the AND gate 20. '1', '0', '0', read data '3' from address 1, read data '8', '0' from address 3, read data '3' from address 7, read data from address 9 Read data '5' is sequentially output as output data DATA_OUT.
[0034]
At this time, in the flag register 18, when data is read from the word of the memory 12 specified by the address ADDR_IN, the flag corresponding to this word is reset at the same time. That is, here, as shown in FIG. 3, all flags are set to '0'. As a result, when the data reading is completed, all the flags of the flag register 18 are reset and initialized, so that the data writing and reading can be repeated thereafter.
[0035]
The data interpolation circuit of the present invention is basically as described above.
[0036]
Note that the present invention is not limited to the case of format conversion, such as the case of JPEG decoding described in the description of the related art. In an apparatus that repeatedly reads and processes data, it is necessary to interpolate and output data of words for which valid data has not been written at the time of writing data with a predetermined value at the time of reading data. Applicable to all cases.
[0037]
In the above embodiment, the flag is read from the flag register 18 at the same time as the data is read from the memory 12, but the present invention is not limited to this. For example, after reading the flag from the flag register 18 first, When the flag is “0”, data is not read from the memory 12 and a preset value is output. When the flag is “1”, data is read from the memory 12. Good.
[0038]
As described above, the data interpolation circuit of the present invention has been described in detail. However, the present invention is not limited to the above embodiment, and various improvements and changes may be made without departing from the gist of the present invention. is there.
[0039]
【The invention's effect】
As described in detail above, the data interpolation circuit of the present invention determines whether data has been written to each word of the memory in one-to-one correspondence with each word of the memory having the predetermined number of words. A flag indicating that when data is written to a word in memory, a flag corresponding to the word in which the data is written is set, and when data is read from a word in memory, this data is read. If the flag corresponding to the word is set, the memory output is output.If the flag is not set, the preset value is output, and then the flag corresponding to the word from which this data is read is reset. It is something to keep.
According to the data interpolation circuit of the present invention, without writing a predetermined value for initialization, it is possible to interpolate the data of the word of the memory in which the valid data is not written. Without writing, data can be written and read to and from the memory at the same operation rate to perform data processing efficiently. Further, according to the data interpolation circuit of the present invention, by referring to the flag, it is determined whether or not the read data from the memory is valid data, and the data of the word of the memory where the valid data is not written is interpolated. Therefore, when writing data to the memory, it is not necessary to determine the word of the memory where the valid data has not been written, and to write a predetermined value to the word of the memory, thereby eliminating the need for a complicated control circuit. There are benefits too.
[Brief description of the drawings]
FIG. 1 is a conceptual diagram of one embodiment of a data interpolation circuit of the present invention.
FIG. 2 is a conceptual diagram of an embodiment showing an order of writing data to a memory and reading data from the memory.
FIG. 3 is a conceptual diagram of one embodiment showing a flow of operation of the data interpolation circuit of the present invention.
FIG. 4 is a conceptual diagram illustrating an example of a decoding procedure in JPEG.
[Explanation of symbols]
Reference Signs List 10 Data interpolation circuit 12 Memory 14, 16 Flip-flop 18 Flag register 20 AND gate

Claims (1)

所定数のワードを有するメモリの各々のワードに1対1に対応して、前記メモリの各々のワードにデータが書き込まれたか否かを示すフラグを保持する手段と、前記メモリのワードにデータが書き込まれた時に、このデータが書き込まれたワードに対応するフラグをセットする手段と、前記メモリのワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグがセットされていれば前記メモリの出力を出力し、前記データが読み出されたワードに対応するフラグがセットされていなければ予め設定された所定値を出力する手段と、前記メモリのワードからデータが読み出された時に、このデータが読み出されたワードに対応するフラグをリセットする手段とを備えることを特徴とするデータ補間回路。Means for holding a flag indicating whether data has been written to each word of the memory in one-to-one correspondence with each word of the memory having a predetermined number of words; Means for setting, when written, a flag corresponding to the word in which the data was written; and for reading data from the word in the memory, a flag corresponding to the word from which the data was read is set. Means for outputting the output of the memory if the flag has been set, and outputting a predetermined value which is set in advance if the flag corresponding to the word from which the data has been read has not been set; and reading data from the word of the memory. Means for resetting a flag corresponding to the word from which the data has been read when the data has been read.
JP15067397A 1997-06-09 1997-06-09 Data interpolation circuit Expired - Lifetime JP3563235B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15067397A JP3563235B2 (en) 1997-06-09 1997-06-09 Data interpolation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15067397A JP3563235B2 (en) 1997-06-09 1997-06-09 Data interpolation circuit

Publications (2)

Publication Number Publication Date
JPH10340182A JPH10340182A (en) 1998-12-22
JP3563235B2 true JP3563235B2 (en) 2004-09-08

Family

ID=15501981

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15067397A Expired - Lifetime JP3563235B2 (en) 1997-06-09 1997-06-09 Data interpolation circuit

Country Status (1)

Country Link
JP (1) JP3563235B2 (en)

Also Published As

Publication number Publication date
JPH10340182A (en) 1998-12-22

Similar Documents

Publication Publication Date Title
JP4782181B2 (en) Entropy decoding circuit, entropy decoding method, and entropy decoding method using pipeline method
US6859561B2 (en) Faster lossless rotation of JPEG images
US7389007B2 (en) Semiconductor memory apparatus
JP3563235B2 (en) Data interpolation circuit
JP2004234280A (en) Memory device
JP3437197B2 (en) Image processing device
JP3032160B2 (en) Method and circuit for rearranging output data in variable length decoder
KR20050013321A (en) Image copy method of video CODEC
JPH10105672A (en) Computer and memory integrated circuit with operation function to be used in this computer
JP3251447B2 (en) Encoding device and method, and decoding device and method
JP3005384B2 (en) Huffman decoding circuit
KR100238733B1 (en) Circuit and method for transforming scanning having data packing function of mpeg decoder
JP3719699B2 (en) Encoding device and decoding device
JP3842650B2 (en) Image processing apparatus and image processing method
JP2933029B2 (en) Digital signal encoding / decoding circuit
JP3675948B2 (en) Data conversion method and apparatus
JP2005293495A (en) Data sequence changing device
JPH0431939A (en) External storage device
JP2556160B2 (en) Compression code decompression device
JPH114349A (en) Image coder, image decoder and their methods
JP2002135595A (en) Image decompression apparatus
JPH07170411A (en) Image coding method, image decoding method and image processor using the method
JP2000188750A (en) Coded data transfer system
JPH0484521A (en) Data compression and expansion circuit
JPH0326177A (en) Compression and expansion controller for image data

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040518

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040525

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040602

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110611

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110611

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120611

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120611

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130611

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130611

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140611

Year of fee payment: 10

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term