JP2009140040A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2009140040A
JP2009140040A JP2007313053A JP2007313053A JP2009140040A JP 2009140040 A JP2009140040 A JP 2009140040A JP 2007313053 A JP2007313053 A JP 2007313053A JP 2007313053 A JP2007313053 A JP 2007313053A JP 2009140040 A JP2009140040 A JP 2009140040A
Authority
JP
Japan
Prior art keywords
data
value
flag
valid flag
valid
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.)
Granted
Application number
JP2007313053A
Other languages
Japanese (ja)
Other versions
JP5072558B2 (en
Inventor
Junichi Kato
順一 加藤
Akiko Oteru
晶子 大輝
Kazuhiko Terada
和彦 寺田
Takeshi Sakamoto
健 坂本
Nobuyuki Tanaka
伸幸 田中
Tomoaki Kawamura
智明 川村
Sadayuki Yasuda
禎之 安田
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2007313053A priority Critical patent/JP5072558B2/en
Publication of JP2009140040A publication Critical patent/JP2009140040A/en
Application granted granted Critical
Publication of JP5072558B2 publication Critical patent/JP5072558B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To execute data processing at high speed for selecting only necessary data from a plurality of data, and storing the data in a memory by packing the data in an arbitrary width. <P>SOLUTION: This data processor is configured to process a plurality of data making a pair with a validity flag having "0" showing invalidity or "1" showing validity to be continuously input with a sequential relation in each cycle, and provided with a validity flag integrator 20 which fetches every prescribed number of data in each cycle along the sequential relation, and outputs the total value of the validity flags of all the data whose sequence is prior to the data as the validity flag integrated value of the data; and a storage device 10 in which the data designated as validity by the validity flag are written in an address corresponding to the "quotient" of the memory of the number corresponding to "remainder" in dividing the validity flag integrated value corresponding to the data by the number of memories. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、複数の入力データから、必要なデータのみを選択し、これを高速に任意の間隔に配置して記憶装置に記憶するデータ処理装置に関するものである。   The present invention relates to a data processing device that selects only necessary data from a plurality of input data, arranges them at arbitrary intervals at high speed, and stores them in a storage device.

複数の入力データから必要なデータのみを取り出して、記憶装置に順番に詰めて書き込む間引き処理が必要とされることがある。通常行われるのは、対象となる入力データについて1つづつ順番に、要/不要を判断し、必要と判断された入力データをその前に書き込まれた入力データの次のアドレスに書き込む方法である。この処理をハードウェアで行う従来の方法として、図15に示すFIFOメモリ100を用いる方法がある。   In some cases, it is necessary to perform a thinning process in which only necessary data is extracted from a plurality of input data, and written in the storage device in order. The normal method is to determine the necessity / unnecessity of the target input data one by one and write the input data determined to be necessary to the next address of the previously written input data. . As a conventional method for performing this processing by hardware, there is a method using a FIFO memory 100 shown in FIG.

この方法では、まず、各入力データとその入力データの要/不要を示す有効フラグとを組にして1組づつ順番に入力する。このとき、有効フラグの値が有効を示す「1」である入力データのみ、入力順にFIFOメモリ100に詰めて記憶する。図15の例では、入力データD1、D2、D3、D4、D5の内、D1、D4のみFIFOメモリ100に詰めて記憶する手順を示したものである。D1、D2、D3、D4、D5の順に入力データが入力され、各入力データが入力されるごとに有効フラグが「1」か「0」かを判断し、「1」であるD1、D4のみをFIFOメモリ100に記憶する。この結果、記憶すべき入力データD1、D4のみをFIFOメモリ100に詰めて記憶することができる。   In this method, first, each set of input data and a valid flag indicating necessity / unnecessity of the input data are paired and input one by one. At this time, only the input data whose validity flag value is “1” indicating validity is packed and stored in the FIFO memory 100 in the order of input. In the example of FIG. 15, only D1 and D4 of the input data D1, D2, D3, D4, and D5 are stored in the FIFO memory 100 and stored. Input data is input in the order of D1, D2, D3, D4, and D5, and each time the input data is input, it is determined whether the valid flag is “1” or “0”, and only D1 and D4 that are “1”. Is stored in the FIFO memory 100. As a result, only the input data D1 and D4 to be stored can be stored in the FIFO memory 100 in a packed manner.

別の従来技術として、特許文献1には、シリアル入力データの内、必要な入力データのみを詰めてパラレルに出力し、これをレジスタに書き込む方法が記載されている。この方法では、シリアルデータをパラレルデータに変換する際に、必要な入力データを、その直前の不要な入力データの数だけシフトレジスタによってデータ位置をシフトさせる。これによって、要/不要の入力データが混在して飛び飛びであったシリアルデータを、必要な入力データのみが詰めて配置されたパラレルデータに変換できる。
特開平8−123683号公報
As another conventional technique, Patent Document 1 describes a method of filling only necessary input data from serial input data, outputting the data in parallel, and writing the data in a register. In this method, when serial data is converted into parallel data, the required input data is shifted in data position by the shift register by the number of unnecessary input data immediately before that. This makes it possible to convert serial data that has been skipped due to a mixture of necessary / unnecessary input data into parallel data in which only necessary input data is packed.
JP-A-8-123683

しかしながら、FIFOメモリ100に詰めて記憶する方法では、入力データを1つづつ逐次的に処理せざるを得ないため、データ処理の高速化をはかることが出来ないという問題がある。また、特許文献1に記載の方法でも、シリアル入力のデータ1つづに対して、逐次そのシフト量を判定して、格納場所を決めていかなければならないため、処理速度を速くすることができないという問題がある。   However, the method of storing the data in the FIFO memory 100 has a problem that it is impossible to increase the data processing speed because input data must be processed sequentially one by one. Further, even with the method described in Patent Document 1, the processing speed cannot be increased because it is necessary to sequentially determine the shift amount and determine the storage location for each serial input data. There's a problem.

さらに、対象のデータをレジスタではなく、RAM等のメモリに書き込む場合には、1回に1ワード単位(1ワードの大きさはそのメモリによる)でしか書き込めないという制限があるため、常に1ワード分データを詰めた状態になるまで蓄積しておいてから書き込まねばならないという問題も生じる。例えば、1ワード4ビットのメモリに書き込む場合を考えると、1回目の書き込みで、1ビットだけデータを書き込み、2回目の書き込みで残りの3ビット分を書き込むということができない。そのため、この従来技術の方法を使うと、4ビット分データが集まるまで、これをバッファしておいてから書き込まねばならないという問題がある。   Furthermore, when writing target data to a memory such as a RAM instead of a register, there is a restriction that data can be written only in units of one word at a time (the size of one word depends on the memory). There also arises a problem that data must be written after it has been packed until the minute data is packed. For example, when writing to a memory of 4 bits per word, it is impossible to write data for only 1 bit in the first write, and write the remaining 3 bits in the second write. Therefore, when this conventional method is used, there is a problem that data must be buffered and written until 4 bits of data are collected.

本発明は、複数データから必要なデータのみ選択し、これを任意の幅に詰めてメモリに記憶する処理を、複数データに対して並列に行うことにより、高速にデータ処理を実施することを目的とする。   It is an object of the present invention to perform high-speed data processing by selecting only necessary data from a plurality of data, and storing the data in a memory with an arbitrary width stored in a memory in parallel. And

上記目的を達成するために、請求項1にかかる発明のデータ処理装置は、無効を示す「0」、又は有効を示す正の整数値、又は有効を示す負の整数値を持つ有効フラグと対になり、且つ順序関係をもって連続して入力する複数のデータを、1サイクル毎に処理するデータ処理装置において、前記データを前記1サイクル毎に前記順序関係に沿って所定数ずつ取り込み、当該データより順序が前の全てのデータの有効フラグの値の合計値、又はこれに当該データの有効フラグの値を加算した値を当該データの有効フラグ積算値として出力する有効フラグ積算器と、複数のアドレスを有する複数のメモリからなり、前記有効フラグで有効と指定されたデータが、当該データに対応する前記有効フラグ積算値を前記メモリの数で割算した際の「余り」に対応する番号のメモリの「商」に対応するアドレスに書き込まれる記憶装置と、を備えることを特徴とする。
請求項2にかかる発明は、請求項1に記載のデータ処理装置において、前記記憶装置は、前記所定数づつ取り込むデータ数が2のn乗で表されるとき、前記有効フラグ積算値の2進数表示から直接得られた前記「余り」と前記「商」に基づき書き込みが行われることを特徴とする。
請求項3にかかる発明は、請求項1に記載のデータ処理装置において、前記記憶装置は、前記所定数づつ取り込むデータ数が2のn乗で表されないとき、前記有効フラグ積算値を前記メモリの数で割算する割算器で得られた前記「余り」と前記「商」に基づき書き込みが行われることを特徴とする。
請求項4にかかる発明は、請求項1、2又は3に記載のデータ処理装置において、前記入力データの内の連続する2以上のデータがまとまりのあるデータであるとき、当該まとまりのある各データに同じ値の有効フラグを付与することを特徴とする。
請求項5にかかる発明は、請求項1、2又は3に記載のデータ処理装置において、前記有効フラグ積算器で得られた有効フラグ積算値に拡大倍率をかけて新たな有効フラグ積算値として出力する乗算手段を備えたことを特徴とする。
請求項6にかかる発明のデータ処理装置は、無効を示す「0」又は有効を示す「1」を持つ有効フラグと対になり、且つ順序関係をもって連続して入力する複数のデータを、1サイクル毎に処理するデータ処理装置において、前記データを前記1サイクル毎に前記順序関係に沿って所定数ずつ取り込み、当該データより順序が当該サイクルでの前のデータの有効フラグの値の合計値、又はこれに当該データの有効フラグの値を加算した値を当該データの有効フラグ積算値として出力する有効フラグ積算器と、複数のアドレスを有する複数のメモリからなり、前記有効フラグで有効と指定されたデータが、当該データに対応する前記有効フラグ積算値で示される特定のメモリの前記サイクルに対応するアドレスに書き込まれる記憶装置と、を備えることを特徴とする。
In order to achieve the above object, a data processing apparatus according to a first aspect of the present invention is compatible with a valid flag having “0” indicating invalidity, a positive integer value indicating validity, or a negative integer value indicating validity. In a data processing apparatus that processes a plurality of data that are successively input with an order relationship, every cycle, the data is fetched in a predetermined number along the order relationship for each cycle, and from the data A valid flag integrator that outputs the sum of the valid flag values of all the data in the previous order, or the value obtained by adding the valid flag value of the data to the valid flag accumulated value of the data, and a plurality of addresses The data designated as valid by the valid flag is “remainder when the valid flag integrated value corresponding to the data is divided by the number of memories. Characterized in that it comprises a storage device to be written into the corresponding address in the "quotient" of the memory in the corresponding number.
According to a second aspect of the present invention, in the data processing device according to the first aspect, the storage device is a binary number of the effective flag integrated value when the number of data to be fetched by the predetermined number is represented by n 2. Writing is performed based on the “remainder” and the “quotient” obtained directly from the display.
According to a third aspect of the present invention, in the data processing device according to the first aspect, the storage device stores the effective flag integrated value in the memory when the predetermined number of data to be captured is not represented by 2 to the nth power. Writing is performed based on the “remainder” and the “quotient” obtained by a divider that divides by a number.
According to a fourth aspect of the present invention, in the data processing device according to the first, second, or third aspect, when two or more continuous data of the input data is a grouped data, each grouped data A valid flag having the same value is assigned to each.
According to a fifth aspect of the present invention, in the data processing device according to the first, second, or third aspect, the effective flag integrated value obtained by the effective flag integrator is multiplied by an enlargement factor and output as a new effective flag integrated value. The multiplication means to perform is provided.
According to a sixth aspect of the present invention, there is provided a data processing device that is paired with a valid flag having “0” indicating invalidity or “1” indicating validity and that sequentially inputs a plurality of pieces of data input in an order relationship. In the data processing apparatus that processes each time, the data is fetched in a predetermined number along the order relationship for each cycle, and the order of the valid flag values of the previous data in the cycle from the data, or It consists of a valid flag integrator that outputs a value obtained by adding the value of the valid flag of the data as a valid flag integrated value of the data and a plurality of memories having a plurality of addresses, and is designated as valid by the valid flag. A storage device in which data is written at an address corresponding to the cycle of the specific memory indicated by the effective flag integrated value corresponding to the data. And wherein the Rukoto.

本発明によれば、複数のデータから任意のデータを選択し、これを任意の幅に詰めてメモリに記憶する処理を、複数データに対して並列に行なうことが可能になる。これにより、例えば、画像や音声などの情報データの圧縮や拡大などの処理も高速に実行することができる。   According to the present invention, it is possible to perform parallel processing on a plurality of data by selecting arbitrary data from a plurality of data and storing the data in an arbitrary width. Thereby, for example, processing such as compression and expansion of information data such as images and sounds can be executed at high speed.

<発明の概要>
図1A、1Bは、本発明のデータ処理装置によるデータ処理の流れを示したものである。この図では、例として、8個のデータD0、D1、D2、D3、D4、D5、D6、D7のうち、D0、D3、D4〜D7の6個のデータを選択して、データ番号の順番に詰めて記憶する場合を示す。データを4個づつ同時に入力し、記憶装置10の4つのメモリM0〜M3のアドレスの若い方からメモリM0、M1、M2、M3の順番に詰めて配置し、同時に書き込む。このようにすると、1回の書き込み処理で、1つのメモリに2つ以上のデータが同時に書き込まれることはないので、最大4つのデータを同時並行処理で書き込んでいくことが可能である。
<Outline of the invention>
1A and 1B show the flow of data processing by the data processing apparatus of the present invention. In this figure, as an example, among the eight data D0, D1, D2, D3, D4, D5, D6, and D7, six data D0, D3, D4 to D7 are selected, and the order of the data numbers It shows the case where it is packed and stored. Four pieces of data are input simultaneously, arranged in the order of memories M0, M1, M2, and M3 from the youngest address of the four memories M0 to M3 of the storage device 10, and written simultaneously. In this way, since two or more data are not simultaneously written in one memory by one writing process, a maximum of four data can be written by simultaneous parallel processing.

図1Aでは最初の4つの入力データD0〜D3の処理について示している。各データは、その要/不要を1ビットで示す有効フラグ(「1」が有効、「0」が無効)を持ち、本データ処理装置では、この有効フラグによってデータの要/不要を判断する。入力データD0〜D3のうち、データD0、D3の有効フラグが「1」、残りのD1、D2の有効フラグが「0」となっている。すでに、メモリM0、M1、M2のアドレスAD0には、データが書き込まれているとすると、データD0は、この次のメモリM3のアドレスAD0に、データD3は、メモリM0のアドレスAD1にそれぞれ書き込む。   FIG. 1A shows processing of the first four input data D0 to D3. Each data has a valid flag (“1” is valid and “0” is invalid) indicating the necessity / unnecessity by 1 bit. In this data processing apparatus, the necessity / unnecessity of the data is determined by the validity flag. Among the input data D0 to D3, the validity flags of the data D0 and D3 are “1”, and the validity flags of the remaining D1 and D2 are “0”. Assuming that data has already been written to the address AD0 of the memories M0, M1, and M2, the data D0 is written to the address AD0 of the next memory M3, and the data D3 is written to the address AD1 of the memory M0.

次の入力データD4〜D7の処理を図1Bに示す。入力データD4〜D7はすべて記憶対象であるので、それらの有効フラグはすべて「1」となっている。そして、入力データD4はメモリM1のアドレスAD1に、入力データD5はメモリM2のアドレスAD1に、入力データD6はメモリM3のアドレスAD1に、データD7はメモリM0のアドレスAD2にそれぞれ書き込む。   The processing of the next input data D4 to D7 is shown in FIG. 1B. Since all the input data D4 to D7 are to be stored, their valid flags are all “1”. The input data D4 is written to the address AD1 of the memory M1, the input data D5 is written to the address AD1 of the memory M2, the input data D6 is written to the address AD1 of the memory M3, and the data D7 is written to the address AD2 of the memory M0.

このようにして、8個の入力データD0〜D7のうち、記憶すべき6個の入力データD0、D3、D4〜D7が、メモリM0〜M3にアドレスの若い方からに詰めて書き込まれる。   In this way, among the eight input data D0 to D7, six input data D0, D3, and D4 to D7 to be stored are written in the memories M0 to M3 from the lowest address.

図2A,2Bは、本発明のデータ処理装置によるデータ処理の動作説明図である。本データ処理装置では、入力データ線DATA0〜DATA3と、各入力データごとに要/不要を1ビットで示す有効フラグV0〜V3が接続される。そして、そこに入力するデータと有効フラグを組にして、4組づつ同時に入力し、並列処理する。   2A and 2B are explanatory diagrams of data processing operations by the data processing apparatus of the present invention. In this data processing apparatus, input data lines DATA0 to DATA3 are connected to valid flags V0 to V3 that indicate necessity / unnecessity by 1 bit for each input data. Then, the data to be input there and a valid flag are combined, and four sets are input simultaneously and processed in parallel.

図2Aでは、1回目の入力データとして入力データ線DATA0〜DATA3に、それぞれデータD0〜D3が入力され、このうち、記憶すべきデータD0、D3の有効フラグV0、V3を「1」、残りのデータD1、D2の有効フラグV1、V2を「0」と設定している。図2Bは、2回目の入力に対する処理を示している。入力データ線DATA0〜DATA3に、それぞれデータD4〜D7が入力される。データD4〜D7のすべてを記憶するので、データD4〜D7に対する有効フラグV0〜V3はすべて「1」である。   In FIG. 2A, data D0 to D3 are input to the input data lines DATA0 to DATA3 as the first input data, and among these, the valid flags V0 and V3 of the data D0 and D3 to be stored are “1”, and the remaining data The valid flags V1 and V2 of the data D1 and D2 are set to “0”. FIG. 2B shows processing for the second input. Data D4 to D7 are input to the input data lines DATA0 to DATA3, respectively. Since all the data D4 to D7 are stored, the valid flags V0 to V3 for the data D4 to D7 are all “1”.

入力されたデータは、有効フラグ積算器20によって、各データごとにそれより順番が前の全てのデータの有効フラグ値を合計した積算値をそれぞれ計算し、これを有効フラグ積算値として出力する。有効フラグ積算器20は、有効フラグ積算先頭値格納部21と、有効フラグ値同士を加算する3個の加算器22と、この加算器22の加算結果と有効フラグ積算先頭値格納部21の有効フラグ積算先頭値とを加算する4個の加算器23とを備える。   With respect to the input data, the effective flag integrator 20 calculates an integrated value obtained by summing up the effective flag values of all the data in the previous order for each data, and outputs this as an effective flag integrated value. The valid flag integrator 20 includes an effective flag integration head value storage unit 21, three adders 22 that add the valid flag values, and the addition result of the adder 22 and the validity flag integration head value storage unit 21. And four adders 23 for adding the flag integrated head value.

この例では、すでに3つのデータがメモリM0、メモリM1、メモリM2のアドレスAD0に書き込まれているので、有効フラグ積算値の先頭値である有効フラグ積算先頭値として「3」を与える。そして、データD0〜D3に対する有効フラグ積算値、および次計算サイクル(データD4〜D7に対する計算サイクル)で用いる有効フラグ積算先頭値を次のように計算する。   In this example, since three pieces of data have already been written in the address AD0 of the memory M0, the memory M1, and the memory M2, “3” is given as the effective flag integrated start value that is the start value of the effective flag integrated value. Then, the effective flag integrated value for data D0 to D3 and the effective flag integrated head value used in the next calculation cycle (calculation cycle for data D4 to D7) are calculated as follows.

D0の有効フラグ積算値=有効フラグ積算先頭値
D1の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値
D2の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値
D3の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値+D2の有効フラグ値
次計算サイクルの有効フラグ積算先頭値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値+D2の有効フラグ値+D3の有効フラグ値
D0 valid flag integrated value = valid flag accumulated start value D1 valid flag accumulated value = valid flag accumulated start value + D0 valid flag value D2 valid flag accumulated value = valid flag accumulated start value + D0 valid flag value + D1 valid flag Value D3 valid flag accumulated value = valid flag accumulated start value + D0 valid flag value + D1 valid flag value + D2 valid flag value Valid flag accumulated start value of next calculation cycle = valid flag accumulated start value + D0 valid flag value + D1 Valid flag value + D2 valid flag value + D3 valid flag value

その結果、図2Aに示すように、データD0、D1、D2、D3に対する有効フラグ積算値はそれぞれ「3」、「4」、「4」、「4」となり、次計算サイクルの有効フラグ積算先頭値は「5」となる。   As a result, as shown in FIG. 2A, the effective flag integrated values for the data D0, D1, D2, and D3 are “3”, “4”, “4”, and “4”, respectively. The value is “5”.

図2Bは、次サイクルのデータD4〜D7に対する計算処理を示している。有効フラグ積算先頭値として、前の計算サイクルで計算した値「5」を用いて、同様に以下の通り計算する。
D4の有効フラグ積算値=有効フラグ積算先頭値
D5の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値
D6の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値
D7の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値+D6の有効フラグ値
次計算サイクルの有効フラグ積算先頭値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値+D6の有効フラグ値+D7の有効フラグ値
FIG. 2B shows calculation processing for data D4 to D7 in the next cycle. Using the value “5” calculated in the previous calculation cycle as the effective flag integration head value, the same calculation is performed as follows.
D4 valid flag integrated value = valid flag accumulated start value D5 valid flag accumulated value = valid flag accumulated start value + D4 valid flag value D6 valid flag accumulated value = valid flag accumulated start value + D4 valid flag value + D5 valid flag Value D7 valid flag accumulated value = valid flag accumulated head value + D4 valid flag value + D5 valid flag value + D6 valid flag value Valid flag accumulated top value in next calculation cycle = valid flag accumulated top value + D4 valid flag value + D5 Valid flag value + D6 valid flag value + D7 valid flag value

この結果、図2Bに示すように、データD4、D5、D6、D7に対する有効フラグ積算値はそれぞれ「5」、「6」、「7」、「8」となり、次計算サイクルの有効フラグ積算先頭値は「9」となる。   As a result, as shown in FIG. 2B, the effective flag integrated values for the data D4, D5, D6, and D7 are “5”, “6”, “7”, and “8”, respectively. The value is “9”.

こうして得られた有効フラグ積算値は、そのデータが有効フラグ「1」の全データのうち先頭から何番目にあるかを示すことになる。ただし、メモリM0のアドレスAD0にある先頭データを0番目として数えている。従って、データD0は3番目となる。一方、図2A、2Bの例では、有効フラグが「1」であるデータをメモリM0〜メモリM3のアドレスに順番に書き込んで行く。   The effective flag integrated value obtained in this way indicates the number of the data from the beginning of all the data of the effective flag “1”. However, the top data at the address AD0 of the memory M0 is counted as 0th. Therefore, the data D0 is the third. On the other hand, in the example of FIGS. 2A and 2B, the data having the valid flag “1” is sequentially written to the addresses of the memories M0 to M3.

従って、各データの有効フラグ積算値を4で割った「余り」がメモリM0〜メモリM3のどのメモリに書き込むかを示し、有効フラグ積算値を4で割った「商」が書き込むべきメモリのアドレスを示している。さらに、この例では、有効フラグ積算値を2進数で書いた場合、下位2ビットが有効フラグ積算値を4で割った「余り」にあたり、3ビット目以上の数値が有効フラグ積算値を4で割った「商」になるから、各データの有効フラグ積算値が、そのデータをどのメモリのどのアドレスに書き込むかを示すことになる。   Accordingly, the “remainder” obtained by dividing the effective flag integrated value of each data by 4 indicates which memory in the memory M0 to the memory M3 is written, and the “quotient” obtained by dividing the effective flag integrated value by 4 is the address of the memory to be written. Is shown. Further, in this example, when the effective flag integrated value is written in binary, the lower 2 bits are the “remainder” obtained by dividing the effective flag integrated value by 4, and the numerical value of the third bit or more is the effective flag integrated value of 4. Since the divided “quotient” is obtained, the effective flag integrated value of each data indicates to which address of which memory the data is written.

例えば、図2BのデータD4に対する有効フラグ積算値は「5」で、これを2進数で表示すると「0101」となる。このうちの下位2ビットは「01」で10進数表示すると「1」であり、3ビット目以上は「01」で10進数表示すると「1」である。従って、データD4はメモリM1のアドレスAD1に書き込む。   For example, the effective flag integrated value for the data D4 in FIG. 2B is “5”, which is “0101” when displayed in binary. Of these, the lower 2 bits are “01”, which is “1” when displayed in decimal, and the third and subsequent bits are “01”, which is “1” when displayed in decimal. Therefore, the data D4 is written to the address AD1 of the memory M1.

このようにして、各データの有効フラグ積算値を計算した上で、有効フラグが「1」であるデータについて、有効フラグ積算値の下位2ビット値によってメモリを選択し、3ビット目以上の数値を当該メモリのアドレスとしてデータをメモリに書き込む。この方法によれば、4個の入力データに対して、書き込むべきデータを選択して、メモリに順番に詰めて書き込むという処理を同時に並行処理することができる。   In this way, after calculating the effective flag integrated value of each data, for the data for which the effective flag is “1”, the memory is selected by the lower 2 bit value of the effective flag integrated value, and the numerical value of the third bit or more Is written in the memory using the address of the memory. According to this method, it is possible to simultaneously perform parallel processing of selecting data to be written for four pieces of input data and sequentially writing the data to the memory.

以上の説明では、データを4個ずつ入力する構成で説明した。これは、通常、デジタル回路のデータ単位として、4バイト、8バイト、16バイトなどの2のn乗バイトが使用されるということ、および入力データ数が2、4、8、16のような2のn乗である方が構成が簡単であるということからこの例で説明したものであり、入力データ数が3、5、6等のように2のn乗でない数であっても、本発明を適用可能である。   In the above description, the configuration in which four pieces of data are input has been described. This means that 2 n bytes such as 4 bytes, 8 bytes, and 16 bytes are normally used as the data unit of the digital circuit, and the number of input data is 2 such as 2, 4, 8, and 16 This is explained in this example because the configuration is simpler to the nth power, and even if the number of input data is not a second power of 2, such as 3, 5, 6, etc., the present invention Is applicable.

入力データ数が2のn乗である方が構成が簡単になる理由は、次の通りである。実施例で、有効フラグ積算値を入力データ数(上記例では4)で割った「余り」と「商」を求める必要があるが、入力データ数が2のn乗個であるときは、割算回路を設ける必要がない。有効フラグ積算値は2進数で表されるので、例えば、入力データ数が4のとき、有効フラグ積算値の下2桁が「余り」、第3桁目以上が「商」となる。入力データ数が8の場合は、有効フラグ積算値を8で割った「余り」と「商」を求める必要があるが、有効フラグ積算値の下3桁が「余り」、第4桁目以上の部分が「商」となり、この場合も割算回路を設ける必要がない。   The reason why the configuration is simpler when the number of input data is 2 to the power of n is as follows. In the embodiment, it is necessary to obtain “remainder” and “quotient” obtained by dividing the effective flag integrated value by the number of input data (4 in the above example), but when the number of input data is 2 to the nth power, There is no need to provide an arithmetic circuit. Since the valid flag integrated value is represented by a binary number, for example, when the number of input data is 4, the last two digits of the valid flag integrated value are “remainder”, and the third and higher digits are “quotient”. When the number of input data is 8, it is necessary to obtain the “remainder” and “quotient” obtained by dividing the effective flag integrated value by 8, but the last 3 digits of the effective flag integrated value is “remainder”, the fourth digit and higher. This part is a “quotient”, and in this case, it is not necessary to provide a division circuit.

一方、入力データ数が2のn乗でない数である場合も、有効フラグ積算値を入力数で割った「余り」と「商」を計算すれば、同様に処理できるので、本発明を適用することができる。ただし、この場合は、入力データ数で有効フラグ積算値を割る割算回路を設ける必要がある。この例については、後記する。   On the other hand, even when the number of input data is not 2 to the power of n, if the “remainder” and “quotient” obtained by dividing the effective flag integrated value by the number of inputs are calculated, the same processing can be performed. be able to. However, in this case, it is necessary to provide a division circuit that divides the effective flag integrated value by the number of input data. This example will be described later.

<実施例1>
図3A、3Bは、本発明のデータ処理装置を用いて、複数の入力データのうち、必要なデータのみ選択して、レジスタ等の記憶装置10に詰めて書き込むようにした実施例1を示したものである。図2A,2Bの例と同じく、1回目の入力データD0〜D3、2回目の入力データD4〜D7のうち、6個のデータD0、D3、D4〜D7をメモリM0〜メモリM3にアドレスの若い方からに詰めて書き込む場合について説明する。
<Example 1>
FIGS. 3A and 3B show Embodiment 1 in which only necessary data is selected from a plurality of input data and written into a storage device 10 such as a register by using the data processing apparatus of the present invention. Is. As in the example of FIGS. 2A and 2B, among the first input data D0 to D3 and the second input data D4 to D7, six data D0, D3, and D4 to D7 are stored in the memories M0 to M3 with younger addresses. A case where data is written in the direction from the side will be described.

まず、本データ処理装置の構成を説明する。有効フラグ積算器20によって算出した各データの有効フラグ積算値のうち、下位2ビットの値をそれぞれAD0_X〜AD3_Xとして出力する。このAD0_X〜AD3_Xと、有効フラグV0〜V3をセレクタ制御信号生成回路30に入力する。一方、各データの有効フラグ積算値のうち、3ビット目以上の値をそれぞれAD0_Y〜AD3_Yとして出力する。このAD0_Y〜AD3_Yと、各入力データ線DATA0〜DATA3をデータセレクタ40に接続する。セレクタ制御信号生成回路30から、データセレクタ40の制御信号SEL0_S〜SEL3_Sを出力し、データセレクタ40に入力する。データセレクタ40からは、データ信号OUT_DATA0〜OUT_DATA3、データ書込アドレス信号OUT_AD0〜OUT_AD3、データ書込制御信号OUT_WE0〜OUT_WE3が出力し、それぞれメモリM0〜M3に入力する。   First, the configuration of the data processing apparatus will be described. Out of the effective flag integrated values of each data calculated by the effective flag integrator 20, the lower 2 bits are output as AD0_X to AD3_X, respectively. The AD0_X to AD3_X and the valid flags V0 to V3 are input to the selector control signal generation circuit 30. On the other hand, among the valid flag integrated values of the respective data, values of the third bit or more are output as AD0_Y to AD3_Y, respectively. The AD0_Y to AD3_Y and the input data lines DATA0 to DATA3 are connected to the data selector 40. The control signals SEL0_S to SEL3_S of the data selector 40 are output from the selector control signal generation circuit 30 and input to the data selector 40. The data selector 40 outputs data signals OUT_DATA0 to OUT_DATA3, data write address signals OUT_AD0 to OUT_AD3, and data write control signals OUT_WE0 to OUT_WE3, which are input to the memories M0 to M3, respectively.

図4にセレクタ制御信号生成回路30の構成を示す。本モジュールは、複数の比較器31とアンド回路32からなり、有効フラグV0〜V3と、有効フラグ積算値の下位2ビット値であるAD0_X〜AD3_Xを入力し、データセレクタ制御信号SEL0_S〜SEL3_Sを出力する。このデータセレクタ制御信号SEL0_S〜SEL3_Sは、それぞれ4ビット幅の信号であり、次のように計算する。   FIG. 4 shows the configuration of the selector control signal generation circuit 30. This module is composed of a plurality of comparators 31 and an AND circuit 32, and inputs valid flags V0 to V3 and AD0_X to AD3_X which are lower two bit values of the valid flag integrated value, and outputs data selector control signals SEL0_S to SEL3_S. To do. Each of the data selector control signals SEL0_S to SEL3_S is a 4-bit signal and is calculated as follows.

SELn_S[0]=(AD0_X=n)&V0
SELn_S[1〕=(AD1_X=n)&V1
SELn_S[2]=(AD2_X=n)&V2
SELn_S〔3]=(AD3_X=n)&V3
ただし、n=0〜3
上記の式「 SELn_S[0]=(AD0_X=n)&V0 」の意味は、AD0_X=n且つV0=Trueのとき、SELn_S[0]=Trueを意味する。[0]は0ビット目を示す。
SELn_S [0] = (AD0_X = n) & V0
SELn_S [1] = (AD1_X = n) & V1
SELn_S [2] = (AD2_X = n) & V2
SELn_S [3] = (AD3_X = n) & V3
However, n = 0-3
The meaning of the above expression “SELn_S [0] = (AD0_X = n) & V0” means SELn_S [0] = True when AD0_X = n and V0 = True. [0] indicates the 0th bit.

例えば、図3Aの例では、AD0_X=3、AD1_X=0、AD2_X=0、AD3_X=0であり、V0=1、V1=0、V2=0、V3=1であるので、SEL0_Sは、
SEL0_S[0]=0
SEL0_S[1〕=0
SEL0_S[2]=0
SEL0_S〔3]=1
となる。つまり、SEL0_S=1000となる。同様に、SEL1_S=0000、SEL2_S=0000、SEL3_S=0001と出力する。
For example, in the example of FIG. 3A, AD0_X = 3, AD1_X = 0, AD2_X = 0, AD3_X = 0, and V0 = 1, V1 = 0, V2 = 0, V3 = 1, so SEL0_S is
SEL0_S [0] = 0
SEL0_S [1] = 0
SEL0_S [2] = 0
SEL0_S [3] = 1
It becomes. That is, SEL0_S = 1000. Similarly, SEL1_S = 0000, SEL2_S = 0000, and SEL3_S = 0001 are output.

図5にデータセレクタ40の構成を示す。データセレクタ40には、入力データ線DATA0〜DATA3と、各データの有効フラグ積算値の3ビット目以上の値AD0_Y〜AD3_Yが入力する。DATA0とAD0_X、DATA1とAD1_X、DATA2とAD2_X、DATA3とAD3_Xがそれぞれ組になって、データセレクタ40の4つのセレクタSEL0〜SEL3のすべてに入力する。そして、セレクタSEL0〜SEL3はそれぞれ、セレクタ制御信号生成回路30からの制御信号SEL0_S〜SEL3_Sに応じて、下記のように出力信号を切り替える。   FIG. 5 shows the configuration of the data selector 40. The data selector 40 receives input data lines DATA0 to DATA3 and values AD0_Y to AD3_Y of the third bit or more of the valid flag integrated value of each data. DATA0 and AD0_X, DATA1 and AD1_X, DATA2 and AD2_X, and DATA3 and AD3_X are set as a set and input to all four selectors SEL0 to SEL3 of the data selector 40. The selectors SEL0 to SEL3 switch the output signals as follows according to the control signals SEL0_S to SEL3_S from the selector control signal generation circuit 30, respectively.

SELn_S=0001のとき
OUT_DATAn←DATA0
OUT_ADn←AD0_Y
OUT_WEn←True
SELn_S=0010のとき
OUT_DATAn←DATA1
OUT_ADn←AD1_Y
OUT_WEn←True
SELn_S=0100のとき
OUT_DATAn←DATA2
OUT_ADn←AD2_Y
OUT_WEn←True
SELn_S=1000のとき
OUT_DATAn←DATA3
OUT_ADn←AD3_Y
OUT_WEn←True
SELn_Sが上記以外の値のとき
OUT_DATAn←Don’t care(任意の値を設定してよい)
OUT_ADn←Don’t care(任意の値を設定してよい)
OUT_WEn←False
ただし、n=0〜3
ここで、OUT_WEnは、メモリMnのライトイネーブル信号で、Trueのとき書込動作するものとする。
When SELn_S = 0001
OUT_DATAn ← DATA0
OUT_ADn ← AD0_Y
OUT_WEn ← True
When SELn_S = 0010
OUT_DATAn ← DATA1
OUT_ADn ← AD1_Y
OUT_WEn ← True
When SELn_S = 0100
OUT_DATAn ← DATA2
OUT_ADn ← AD2_Y
OUT_WEn ← True
When SELn_S = 1000
OUT_DATAn ← DATA3
OUT_ADn ← AD3_Y
OUT_WEn ← True
When SELn_S is a value other than the above
OUT_DATAn ← Don't care (any value may be set)
OUT_ADn ← Don't care (any value may be set)
OUT_WEn ← False
However, n = 0-3
Here, OUT_WEn is a write enable signal of the memory Mn, and a write operation is performed when True.

例えば、図3Aの例では、上記したように、
SEL0_S=1000
であるので、セレクタSEL0の出力は、OUT_DATA0=D3(=DATA3)、OUT_AD0=1(=AD3_Y)、OUT_WE0=True(=V3)となる。同様に、
OUT_DATA1=Don’t care、OUT_AD1=Don’t care、OUT_WE1=False
OUT_DATA2=Don’t care、OUT_AD2=Don’t care、OUT_WE2=False
OUT_DATA3=D0(=DATA0)、OUT_AD3=0(=AD0_Y)、OUT_WE3=True(=V0)
となる。
For example, in the example of FIG. 3A, as described above,
SEL0_S = 1000
Therefore, the output of the selector SEL0 is OUT_DATA0 = D3 (= DATA3), OUT_AD0 = 1 (= AD3_Y), and OUT_WE0 = True (= V3). Similarly,
OUT_DATA1 = Don't care, OUT_AD1 = Don't care, OUT_WE1 = False
OUT_DATA2 = Don't care, OUT_AD2 = Don't care, OUT_WE2 = False
OUT_DATA3 = D0 (= DATA0), OUT_AD3 = 0 (= AD0_Y), OUT_WE3 = True (= V0)
It becomes.

このような構成にすることにより、各入力データのうち、有効フラグ値が「1」であるデータのみが、その有効フラグ積算値の下位2ビット値ADn_Xで指定されるメモリの、ADn_Yで指定されるアドレスに書き込まれる。   With such a configuration, only the data having the valid flag value “1” among the input data is designated by ADn_Y of the memory designated by the lower 2-bit value ADn_X of the valid flag integrated value. Written to the address.

本発明の有効フラグ積算器20は、有効フラグ同士を加算する加算器22と、その加算器22の加算結果と有効フラグ積算先頭値とを加算する加算器23からなる簡単な構造であるため、並列度の規模や加算器の性能にもよるが、有効フラグ積算値の計算、データのメモリヘの書込処理を通常1クロックづつで行うことも可能である。そして、複数の入力データに対して同時に並列処理することができるので、非常に高速にデータ処理を行うことが出来る。   The valid flag accumulator 20 of the present invention has a simple structure including an adder 22 that adds valid flags to each other, and an adder 23 that adds the addition result of the adder 22 and the valid flag accumulated head value. Depending on the scale of parallelism and the performance of the adder, it is possible to calculate the effective flag integrated value and write the data into the memory usually in one clock. Since a plurality of input data can be simultaneously processed in parallel, data processing can be performed at a very high speed.

<実施例2>
上記の実施例1では、入力データを4つづつ同時に入力して、記憶装置10の4個のメモリM0〜M3に書き込むようにしたが、本実施例2は、図6に示すように、入力データを4つづつ同時に入力して、記憶装置10Aの8個のメモリM0〜M7に書き込むようにしたものである。この場合には、各データの有効フラグ積算値を8で割った「余り」がメモリM0〜M7のどのメモリに書き込むかを示し、有効フラグ積算値を8で割った「商」が書き込むべきメモリのアドレスを示している。
<Example 2>
In the first embodiment, four pieces of input data are simultaneously input and written in the four memories M0 to M3 of the storage device 10. However, in the second embodiment, as shown in FIG. Four pieces of data are input simultaneously and written in the eight memories M0 to M7 of the storage device 10A. In this case, the “remainder” obtained by dividing the effective flag integrated value of each data by 8 indicates which memory in the memories M0 to M7 is written, and the “quotient” obtained by dividing the effective flag integrated value by 8 is the memory to be written. Indicates the address.

従って、この例では、各データの有効フラグ積算値の下位3ビットをそれぞれAD0_X〜AD3_Xとし、有効フラグ積算値の4ビット目以上の値をAD0_Y〜AD3_Yとして、この値の示すアドレスに書き込むようにすればよい。   Therefore, in this example, the lower 3 bits of the valid flag integrated value of each data are set as AD0_X to AD3_X, and the value of the fourth bit or more of the effective flag integrated value is written as AD0_Y to AD3_Y at the address indicated by this value. do it.

<実施例3>
本実施例3は、図7に示すように、入力データを4つづつ同時に入力して、これを記憶装置10Bの6個のメモリM0〜M5に書き込むようにしたものである。本装置は、各データの有効フラグ積算値を「6」で割り算する割算器50をもつ。そして、有効フラグ積算値を6で割った「余り」に応じてメモリM0〜M5のどのメモリに書き込むかを判断し、有効フラグ積算値を「6」で割った「商」によって書き込むべきメモリのアドレスを決定している。
<Example 3>
In the third embodiment, as shown in FIG. 7, four pieces of input data are simultaneously inputted and written into the six memories M0 to M5 of the storage device 10B. This apparatus has a divider 50 that divides the effective flag integrated value of each data by “6”. Then, it is determined which memory of the memories M0 to M5 is written according to the “remainder” obtained by dividing the effective flag integrated value by 6, and the memory of the memory to be written is determined by “quotient” obtained by dividing the effective flag integrated value by “6”. The address is determined.

<実施例4>
図2A、2B、図3A、3Bに示した有効フラグ積算器20では、各データの有効フラグ積算値として、そのデータより前にあるすべてのデータの有効フラグを合計して求めた。これに対して、図8A、8Bに示す本実施例4では、各データの有効フラグ積算値を、そのデータより前のすべてデータの有効フラグとそのデータ自身の有効フラグを加算することで求める構成にしている。その一方、有効フラグ積算先頭値を図2A,2B、図3A、3Bの方法より、「1」だけ小さい値を設定するようにする。このような本実施例の方法によっても、実施例1と同様の有効フラグ積算値を算出することが出来、有効フラグが「1」であるデータのみを選択して順に詰めて書き込むことが可能になる。
<Example 4>
In the valid flag integrator 20 shown in FIGS. 2A, 2B, 3A and 3B, the valid flags of all the data preceding the data are obtained as the sum of the valid flags of each data. On the other hand, in the fourth embodiment shown in FIGS. 8A and 8B, the valid flag integrated value of each data is obtained by adding the valid flags of all the data before the data and the valid flag of the data itself. I have to. On the other hand, the effective flag integration head value is set to a value smaller by “1” than the method of FIGS. 2A, 2B, 3A, and 3B. Also by this method of the present embodiment, the same effective flag integrated value as in the first embodiment can be calculated, and only data with the effective flag “1” can be selected and written in order. Become.

図8A、8Bは、実施例1(図3A、3B)と同じ入力データを入力した場合の、本実施例4によるデータ処理方法および構成を示している。まず、図8Aにおいては、有効フラグ積算先頭値の初期値として「2」を与える。そして、入力データD0〜D3に対する有効フラグ積算値、および次計算サイクル(D4〜D7に対する計算サイクル)で用いる有効フラグ積算先頭値を次のように計算する。
D0の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値
D1の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値
D2の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値+D2の有効フラグ値
D3の有効フラグ積算値=有効フラグ積算先頭値+D0の有効フラグ値+D1の有効フラグ値+D2の有効フラグ値+D3の有効フラグ値
次計算サイクルの有効フラグ積算先頭値=D3の有効フラグ積算値
8A and 8B show a data processing method and configuration according to the fourth embodiment when the same input data as in the first embodiment (FIGS. 3A and 3B) is input. First, in FIG. 8A, “2” is given as the initial value of the effective flag integration head value. Then, the effective flag integrated value for the input data D0 to D3 and the effective flag integrated head value used in the next calculation cycle (the calculation cycle for D4 to D7) are calculated as follows.
D0 effective flag integrated value = effective flag integrated start value + D0 effective flag value D1 effective flag integrated value = effective flag integrated start value + D0 effective flag value + D1 effective flag value D2 effective flag integrated value = effective flag integrated start Value + D0 valid flag value + D1 valid flag value + D2 valid flag value D3 valid flag accumulated value = valid flag accumulated head value + D0 valid flag value + D1 valid flag value + D2 valid flag value + D3 valid flag value Effective flag integrated head value of cycle = effective flag integrated value of D3

その結果、図8Aに示すように、入力データD0〜D3に対する有効フラグ積算値はそれぞれ「3」、「3」、「3」、「4」となり、次計算サイクルめ有効フラグ積算先頭値は「4」となる。   As a result, as shown in FIG. 8A, the effective flag integrated values for the input data D0 to D3 are “3”, “3”, “3”, and “4”, respectively. 4 ".

図8Bは、次サイクルの入力データD4〜D7に対する計算処理を示している。有効フラグ積算先頭値として、前の計算サイクルで計算した値4を用いて、同様に以下の通り計算する。
D4の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値
D5の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値
D6の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値+D6の有効フラグ値
D7の有効フラグ積算値=有効フラグ積算先頭値+D4の有効フラグ値+D5の有効フラグ値+D6の有効フラグ値+D7の有効フラグ値
次計算サイクルの有効フラグ積算先頭値=D7の有効フラグ積算値
FIG. 8B shows calculation processing for input data D4 to D7 in the next cycle. Using the value 4 calculated in the previous calculation cycle as the effective flag integration head value, the same calculation is performed as follows.
D4 effective flag integrated value = effective flag integrated start value + D4 effective flag value D5 effective flag integrated value = effective flag integrated start value + D4 effective flag value + D5 effective flag value D6 effective flag integrated value = effective flag integrated start Value + D4 valid flag value + D5 valid flag value + D6 valid flag value D7 valid flag accumulated value = valid flag accumulated head value + D4 valid flag value + D5 valid flag value + D6 valid flag value + D7 valid flag value Next calculation Effective flag integrated value of cycle = Effective flag integrated value of D7

この結果、図8Bに示すように、入力データD4〜D7に対する有効フラグ積算値はそれぞれ「5」、「6」、「7」、「8」となり、次計算サイクルの有効フラグ積算先頭値は「8」となる。     As a result, as shown in FIG. 8B, the effective flag integrated values for the input data D4 to D7 are “5”, “6”, “7”, and “8”, respectively. 8 ”.

このように本実施例4の方法によっても、有効フラグが「1」であるデータの有効フラグ積算値は、実施例1で得られる値と同じ値が算出できる。この得られた有効フラグ積算値を用いて、実施例1と同様の方法により、記憶装置10のメモリM0〜M3にデータを詰めて書き込むことができる。   As described above, also by the method according to the fourth embodiment, the same value as the value obtained in the first embodiment can be calculated as the valid flag integrated value of the data whose valid flag is “1”. Using the obtained effective flag integrated value, data can be packed and written in the memories M0 to M3 of the storage device 10 in the same manner as in the first embodiment.

<実施例5>
本実施例は、大きさが異なる入力データに対して、本発明の方法を適用した場合である。図9A、9Bに示した例では、入力データD0、D1、D3は1バイト、D2は2バイト、D4は3バイトとし、このうち、網掛け表示したD0、D2、D4のみ選択して順に詰めて記憶装置10に記憶した場合を示している。各データとも、単位データ量である1バイトに1つづつ有効フラグを持つようにしている。すなわち、2バイトのD2は2つ、3バイトのD4は3つの有効フラグをもつ。そして、記憶装置10に記憶したいデータの有効フラグは対応する有効フラグを「1」にする。このような入力データと有効フラグのペアに対して、実施例1〜4と同様の計算により、各データの1バイトごとに有効フラグ積算値を算出する。
<Example 5>
In this embodiment, the method of the present invention is applied to input data having different sizes. In the example shown in FIGS. 9A and 9B, the input data D0, D1, and D3 are 1 byte, D2 is 2 bytes, and D4 is 3 bytes. Of these, only D0, D2, and D4 shown by shading are selected and packed in order. In this case, the data is stored in the storage device 10. Each data has a valid flag for each byte that is the unit data amount. That is, the 2-byte D2 has two valid flags and the 3-byte D4 has three valid flags. Then, the valid flag of the data desired to be stored in the storage device 10 is set to “1”. For such a pair of input data and valid flag, a valid flag integrated value is calculated for each byte of each data by the same calculation as in the first to fourth embodiments.

図9Aでは、データD0の有効フラグ積算値が「0」であり、データD2の1バイト目、2バイト目の有効フラグ積算値は、それぞれ「1」、「2」となる。これから、D0、D2の1バイト目、D2の2バイト目をそれぞれメモリM0、M1、M2のアドレスAD0に書き込む。これによって、D0、D2を詰めてメモリM0、M1、M2に書き込むことが出来る。   In FIG. 9A, the effective flag integrated value of the data D0 is “0”, and the effective flag integrated values of the first byte and the second byte of the data D2 are “1” and “2”, respectively. From now on, the first byte of D0 and D2 and the second byte of D2 are written to the address AD0 of the memories M0, M1 and M2, respectively. Thus, D0 and D2 can be packed and written to the memories M0, M1 and M2.

同様に、図9Bでは、記憶すべきデータD4の1バイト目、2バイト目、3バイト目の有効フラグ積算値はそれぞれ「3」、「4」、「5」と求められるので、それぞれメモリM3のアドレスAD0、メモリM0のアドレスAD1、メモリM1のアドレスAD1に書き込む。この結果、1バイトのデータD0、2バイトのデータD2、3バイトのデータD4のみ取り出して、図9Bに示すように、メモリに順に詰めて記憶する処理を4バイトづつ高速に実行することが出来る。   Similarly, in FIG. 9B, the effective flag integrated values of the first byte, the second byte, and the third byte of the data D4 to be stored are obtained as “3”, “4”, and “5”, respectively. Are written in the address AD0, the address AD1 of the memory M0, and the address AD1 of the memory M1. As a result, it is possible to execute a process of extracting only 1-byte data D0, 2-byte data D2, and 3-byte data D4 and sequentially storing them in the memory as shown in FIG. .

<実施例6>
以上の実施例1〜5では、各データの有効フラグ値を「0」又は「1」に設定した。これに対して、本実施例6では、各データの有効フラグ値を例えば「0」又は「2」、「3」などのように、「1」以外の値に設定することにより、データの間隔をもとの入力時の間隔より広げる処理を可能にするものである。
<Example 6>
In the above Examples 1 to 5, the valid flag value of each data is set to “0” or “1”. On the other hand, in the sixth embodiment, by setting the effective flag value of each data to a value other than “1” such as “0”, “2”, “3”, etc. This makes it possible to extend the interval from the original input interval.

図10Aに示した例では、入力データD0〜D3に対する有効フラグ値を全て「2」と設定して、実施例1と同様の方法で、有効フラグ積算値を算出する。すると、データD0〜D3に対する有効フラグ積算値は、それぞれ「0」、「2」、「4」、「6」となる。これらの値から、各データD0、D1、D2、D3を記憶装置10AのメモリM0、M2、M4、M6のアドレスAD0に書き込む。これにより、図10Aに示すように、データD0〜D3が記憶装置10Aの1つおきのメモリに書き込まれ、データ間隔を拡げて書くことが出来る。   In the example shown in FIG. 10A, the valid flag values for the input data D0 to D3 are all set to “2”, and the valid flag integrated value is calculated by the same method as in the first embodiment. Then, the effective flag integrated values for the data D0 to D3 are “0”, “2”, “4”, and “6”, respectively. From these values, the data D0, D1, D2, and D3 are written to the address AD0 of the memories M0, M2, M4, and M6 of the storage device 10A. As a result, as shown in FIG. 10A, data D0 to D3 are written in every other memory of the storage device 10A, and the data interval can be increased.

ただし、この例において、書込先のメモリが1度に1つのアドレスヘの書込しかできないタイプのメモリである場合は、入力データの数(この場合4)の2倍の8個ないしそれ以上の個数のメモリを用意する必要がある。8個未満の場合、同一のメモリの異なるアドレスに同時に書込動作が行われる可能性があるためであり、注意が必要である。   However, in this example, if the memory of the write destination is a type that can only write to one address at a time, 8 or more times twice the number of input data (in this case 4) It is necessary to prepare the number of memories. If the number is less than 8, the writing operation may be performed simultaneously on different addresses in the same memory, so care must be taken.

図10Aに示した例では、メモリM1、M3、M5、M7にはデータを書き込まず空白としていた。これに対して、図10Bの例は、メモリM0とM1にデータD0、メモリM2とM3にデータD1、メモリM4とM5にデータD2、メモリM6とM7にデータD3を、それぞれ書き込むようにすることも出来る。各データに対して、その有効フラグ積算値を先頭アドレスとして、そこから有効フラグ値の数だけのメモリ位置に各データを書き込むようにする。これにより、例えば、画像データをより面積の広い画像に拡大処理することなどにも応用できる。   In the example shown in FIG. 10A, data is not written in the memories M1, M3, M5, and M7, and is left blank. On the other hand, in the example of FIG. 10B, data D0 is written in the memories M0 and M1, data D1 is written in the memories M2 and M3, data D2 is written in the memories M4 and M5, and data D3 is written in the memories M6 and M7. You can also. For each data, the effective flag integrated value is used as a head address, and each data is written to memory locations corresponding to the number of effective flag values. Thereby, for example, the present invention can be applied to enlargement processing of image data into an image having a larger area.

図10Cに示すように、入力データのうち、任意のデータのみ選んで、これを指定した間隔で並べることも可能である。図10Cの例では、入力データD0〜D3のうち、D0、D2、D3の有効フラグを「2」、D1の有効フラグを「0」と設定する。実施例1などと同様の計算により、D0〜D3の各データの有効フラグ積算値を算出すると、それぞれ、「0」、「2」、「2」、「4」となる。このうち、有効フラグが「0」でないD0、D2、D3を、その有効フラグ積算値をアドレスとして記憶装置に書き込むと、図10Cのように、D0、D2、D3がメモリM0、M2、M4のアドレスAD0に書き込まれる。   As shown in FIG. 10C, it is also possible to select only arbitrary data from the input data and arrange them at specified intervals. In the example of FIG. 10C, among the input data D0 to D3, the valid flags of D0, D2, and D3 are set to “2”, and the valid flag of D1 is set to “0”. When the effective flag integrated value of each data of D0 to D3 is calculated by the same calculation as in the first embodiment, it becomes “0”, “2”, “2”, “4”, respectively. Among these, when D0, D2, and D3 whose valid flag is not “0” are written in the storage device using the valid flag integrated value as an address, D0, D2, and D3 are stored in the memories M0, M2, and M4 as shown in FIG. 10C. It is written at address AD0.

図10Dは、図10Cと入力データ、有効フラグ値、算出された有効フラグ積算値は同じだが、図10Bと同じように、各データ間を空白とせず、その前のデータで埋めるようにしたものである。各データに対して、その有効フラグ積算値を先頭アドレスとして、そこから有効フラグ値の数だけのメモリ位置に各データを書き込むようにする。これにより、例えば、画像データをより面積の広い画像に拡大処理することも可能になる。図10Bの場合は一律にデータを拡大することができたが、図10Dのようにすれば、画像データの任意の領域を選んでこれを拡大するということも可能になる。   FIG. 10D shows the same input data, valid flag value, and calculated valid flag integrated value as in FIG. 10C, but, as in FIG. 10B, each data is not left blank and is filled with the previous data. It is. For each data, the effective flag integrated value is used as a head address, and each data is written to memory locations corresponding to the number of effective flag values. Thereby, for example, the image data can be enlarged to an image having a larger area. In the case of FIG. 10B, the data can be expanded uniformly. However, as shown in FIG. 10D, it is also possible to select an arbitrary area of the image data and expand it.

図10Eのように、各データの有効フラグ値を任意に設定して、データ選択およびデータ間隔を任意に設定することもできる。入力データD0〜D3に対する有効フラグ値をそれぞれ「2」、「0」、「3」、「2」に設定すると、有効フラグ積算値はそれぞれ「0」、「2」、「2」、「5」となる。このうち、有効フラグ値が「0」でないデータD0、D2、D3をそれぞれの有効フラグ積算値に応じて、それぞれメモリM0、M2、M5のアドレスAD0に書き込まれる。   As shown in FIG. 10E, the valid flag value of each data can be arbitrarily set, and the data selection and the data interval can be arbitrarily set. When the valid flag values for the input data D0 to D3 are set to “2”, “0”, “3”, “2”, respectively, the valid flag integrated values are “0”, “2”, “2”, “5”, respectively. " Among these, the data D0, D2, and D3 whose valid flag values are not “0” are written in the addresses AD0 of the memories M0, M2, and M5, respectively, according to the respective valid flag integrated values.

このように、有効フラグを「0」に設定したデータD1を除き、さらにその他のデータD0、D2、D3を、それぞれ設定した有効フラグ値の間隔で記憶装置10Aに書き込むことが可能になる。この場合も、図9A、9Bと同様、データ間の空白領域にその前後のデータ等を書き込むことも可能であることは言うまでもない。本実施例に示したように、本発明の方法により、有効フラグ値の設定によって、任意のデータを選択して、これを任意の間隔に配置することが可能になる。   As described above, except for the data D1 in which the valid flag is set to “0”, other data D0, D2, and D3 can be written to the storage device 10A at intervals of the set valid flag values. Also in this case, it goes without saying that the data before and after the data can be written in the blank area between the data as in FIGS. 9A and 9B. As shown in the present embodiment, according to the method of the present invention, it becomes possible to select arbitrary data by setting the effective flag value and arrange it at arbitrary intervals.

<実施例7>
上記実施例6においては、各データの有効フラグ値として、「2」や「3」などのデータ拡大率を設定することによって、入力時の間隔より広げて出力する方法を示した。これに対し、本実施例は、有効フラグ積算器20において、入力された有効フラグ値に拡大倍率をかけた値を積算するようにしたものである。
<Example 7>
In the above-described sixth embodiment, the method of outputting the data by expanding the interval at the time of input by setting the data expansion rate such as “2” or “3” as the valid flag value of each data has been shown. On the other hand, in the present embodiment, the valid flag accumulator 20 accumulates values obtained by multiplying the input valid flag value by an enlargement factor.

図11Aに示す例では、入力データD0、D1、D2、D3と、それぞれの有効フラグ値「1」、「0」、「1」、「1」が入力されている。これに対して、有効フラグ積算器20で、各有効フラグ値をデータ拡大倍率2をかけた値を積算するようにしている。この結果、出力される有効フラグ積算値は、それぞれ「0」、「2」、「2」、「4」となる。このうち、有効フラグ積算値が「0」でないデータD0、D2、D3を、その有効フラグ積算値をもとに実施例1などの方法に基づき、記憶装置10Aの各メモリに書き込む。その結果、データD1を除くデータD0、D2、D3が、メモリM0、M2、M4のアドレスAD0に書き込まれ、指定した間隔「2」に拡大して記憶装置10A上に配置することが出来る。   In the example shown in FIG. 11A, input data D0, D1, D2, and D3 and valid flag values “1”, “0”, “1”, and “1” are input. On the other hand, the valid flag accumulator 20 accumulates values obtained by multiplying each valid flag value by the data enlargement magnification 2. As a result, the effective flag integrated values to be output are “0”, “2”, “2”, and “4”, respectively. Among these, the data D0, D2, D3 whose effective flag integrated value is not “0” is written in each memory of the storage device 10A based on the effective flag integrated value based on the method of the first embodiment or the like. As a result, the data D0, D2, and D3 excluding the data D1 are written to the address AD0 of the memories M0, M2, and M4, and can be arranged on the storage device 10A with the specified interval “2” expanded.

図11Bは、本実施例の有効フラグ積算器20周辺の構成を示したものである。図3Aに示した実施例1の有効フラグ積算器10の出力値を、データ拡大倍率だけ乗じる乗算器60に入力し、その結果を出力するように構成されている。   FIG. 11B shows a configuration around the valid flag integrator 20 of the present embodiment. The output value of the valid flag integrator 10 of the first embodiment shown in FIG. 3A is input to a multiplier 60 that multiplies by the data enlargement magnification, and the result is output.

図11Cは、乗算器60を用いる代わりにシフト演算器60Aを用いたものである。例えば、データ拡大倍率を2倍、4倍とするときは、入力値を左にそれぞれ1シフト、2シフトすればよい。図11A、11Bでは、入力データに対して一律のデータ拡大倍率を乗じる場合を示したが、各データごとにデータ拡大倍率を可変に設定できるように構成してもよい。また、図10A〜図10Eに示した実施例6と同様に、データ間の空白領域にその前後のデータ等を書き込むように構成してもよい。   FIG. 11C uses a shift computing unit 60 </ b> A instead of using the multiplier 60. For example, when the data enlargement magnification is set to 2 × or 4 ×, the input value may be shifted by 1 shift or 2 shift to the left. 11A and 11B show the case where the input data is multiplied by a uniform data enlargement ratio, but the data enlargement ratio may be variably set for each data. Further, similarly to the sixth embodiment shown in FIGS. 10A to 10E, data before and after the data may be written in a blank area between the data.

<実施例8>
以上の実施例1〜7では、入力データのうち有効フラグ値が「0」でないデータ全てを順番に詰めて並べるため、全入力データの有効フラグ値を積算していく構成としていた。これに対して、本実施例では、有効フラグ積算器20Bにおいて、1回の入力データごとの有効フラグ積算値を算出して記憶装置10Dのメモリに書き込んでいく。このために、有効フラグ積算先頭値は、毎回同じ固定値を設定する。
<Example 8>
In the first to seventh embodiments described above, all the input data whose valid flag values are not “0” are sequentially packed and arranged so that the valid flag values of all the input data are integrated. On the other hand, in this embodiment, the effective flag integrator 20B calculates the effective flag integrated value for each input data and writes it in the memory of the storage device 10D. For this reason, the same fixed value is set as the effective flag integration head value every time.

図12Aの例は、各入力データのうち、有効フラグ値が「1」のデータのみ左詰めにして出力し、これをFIFOメモリを使用した記憶装置10Cに書き込んでいくように構成したものである。まず、最初の入力データ0(=D0、D1、D2、D3、有効フラグ=「1」、「0」、「0」、「1」)に対して、有効フラグ積算先頭値を「0」として、各データの有効フラグ積算値を算出し、それぞれ「0」、「1」、「1、「1」を得る。このうち、有効フラグ値が「1」であるデータD0とD3をその有効フラグ積算値の値に従って左から順に並べて出力する。これにより、有効フラグ値が「1」であるD0とD3が左詰めで出力される。   The example of FIG. 12A is configured such that only the data with the valid flag value “1” out of each input data is left-justified and output, and this is written to the storage device 10C using the FIFO memory. . First, with respect to the first input data 0 (= D0, D1, D2, D3, valid flag = “1”, “0”, “0”, “1”), the effective flag integration head value is set to “0”. The effective flag integrated value of each data is calculated to obtain “0”, “1”, “1,” “1”, respectively. Among these, the data D0 and D3 having the valid flag value “1” are arranged and output sequentially from the left according to the value of the valid flag integrated value. As a result, D0 and D3 whose valid flag value is “1” are output left justified.

次に、2回目の入力データ1(=D4、D5、D6、D7、有効フラグ=「1」、「0」、「1」、「0」)に対しても、有効フラグ積算先頭値を「0」として、各データの有効フラグ積算値を算出する。その結果、それぞれ「0」、「1」、「1」、「2」を得る。このうち、有効フラグ値が「1」であるD4、D6をその有効フラグ積算値の値に従って左から順に並べて出力する。そして、出力したデータを、記憶装置10Dの2つのメモリFIFO_0、FIFO_1に書き込むようにする。このように構成することにより、選択したデータのみ2つのメモリFIFO_0、FIFO_1に順に詰めて書き込んでいくことが可能になる。   Next, for the second input data 1 (= D4, D5, D6, D7, valid flag = “1”, “0”, “1”, “0”), the valid flag integration top value is “ The effective flag integrated value of each data is calculated as “0”. As a result, “0”, “1”, “1”, and “2” are obtained, respectively. Among these, D4 and D6 whose valid flag value is “1” are arranged and output in order from the left according to the value of the valid flag integrated value. Then, the output data is written in the two memories FIFO_0 and FIFO_1 of the storage device 10D. With this configuration, it is possible to write only the selected data in the two memories FIFO_0 and FIFO_1 in order.

図12Bの例は、図12Aの構成において、2つのメモリFIFO_0、FIFO_1を有する記憶装置10Cの代わりに、アドレス指定して書き込むメモリM0、メモリM1を有する記憶装置10D用い、さらに、有効フラグ積算器20B内に、データの入力回数を数えるカウンタ24を備えていて、このカウンタ値が示す値を記憶装置10Dヘの書込アドレスとして利用するものである。   The example of FIG. 12B uses the storage device 10D having the memory M0 and the memory M1 to be written by addressing instead of the storage device 10C having the two memories FIFO_0 and FIFO_1 in the configuration of FIG. A counter 24 for counting the number of data inputs is provided in 20B, and the value indicated by the counter value is used as a write address to the storage device 10D.

まず、最初の入力データ0に対して、有効フラグ値が「1」であるデータD0とD3の有効フラグ積算値はそれぞれ「0」、「1」と算出されるので、それぞれメモリM0、M1に書き込む。書き込むアドレスAD_Yは、データ数カウンタ値に従いAD0とする。   First, with respect to the first input data 0, the effective flag integrated values of the data D0 and D3 whose effective flag value is “1” are calculated as “0” and “1”, respectively, so that they are stored in the memories M0 and M1, respectively. Write. The write address AD_Y is set to AD0 according to the data number counter value.

次に、2回目の入力データ1に対しては、有効フラグ値が「1」であるデータD4とD6の有効フラグ積算値はそれぞれ「0」、「1」で、データ数カウンタ値は「1」となるので、それぞれメモリM0、M1の次のアドレスAD1に書き込む。このように構成することにより、選択したデータのみを2つのメモリM0、M1に順に詰めて書き込んでいくことが可能になる。   Next, for the second input data 1, the valid flag integrated values of the data D4 and D6 whose valid flag value is “1” are “0” and “1”, respectively, and the data number counter value is “1”. Are written to the next address AD1 of the memories M0 and M1, respectively. With this configuration, it is possible to write only selected data in the two memories M0 and M1 in order.

図12A、図12Bに示した有効フラグ積算器20Bでは、各データの有効フラグ積算値を、各入力ごとにそのデータより前のデータの有効フラグを合計して求めるようにしている。この代わりに、図12Cに示す構造の有効フラグ積算器20Cを用いても良い。図12Cに示す有効フラグ積算器20Cでは、各データの有効フラグ積算値を、各入力ごとにそのデータより前のデータの有効フラグの合計値とそのデータ自身の有効フラグを加算することで求める構成にしている。その一方、有効フラグ積算値を「−1」に設定するようにする。このように構成した有効フラグ積算器20Cの出力値を用いても、図12A、12Bと同様の機能を得ることができる。   In the valid flag integrator 20B shown in FIGS. 12A and 12B, the valid flag integrated value of each data is obtained by summing up the valid flags of the data before the data for each input. Instead, an effective flag integrator 20C having the structure shown in FIG. 12C may be used. In the valid flag integrator 20C shown in FIG. 12C, the valid flag accumulated value of each data is obtained by adding the total value of the valid flags of the data before the data and the valid flag of the data itself for each input. I have to. On the other hand, the effective flag integrated value is set to “−1”. Even if the output value of the valid flag integrator 20C configured in this way is used, the same function as that of FIGS. 12A and 12B can be obtained.

なお、この実施例8では、有効フラグが「1」であるデータが2つ以内である必要がある。これ以外のときは、エラー処理するような手段を設ける。また、以上の説明では、有効フラグ積算先頭値として「0」(図12A、12B)又は「−1」(図12C)に固定した場合を例に説明したが、この値は「0」、「−1」以外の値に設定してもよいし、さらに各入力ごとにこの値を可変に設定できるようにしてもよい。これによって、各入力ごとに先頭の有効なデータの出力先メモリを変えることが可能となる。   In the eighth embodiment, it is necessary that the number of data having the valid flag “1” is within two. In other cases, a means for error processing is provided. In the above description, the case where the effective flag integration top value is fixed to “0” (FIGS. 12A and 12B) or “−1” (FIG. 12C) has been described as an example. It may be set to a value other than “−1”, or this value may be variably set for each input. This makes it possible to change the output destination memory of the first valid data for each input.

<実施例9>
上記の実施例1〜8の有効フラグ積算器20、20A、20B、20Cでは、有効フラグ値を外部から入力するようにしたが、図13に示すように、各入力データに対する有効フラグ値を、内部で設定するようにした有効フラグ積算器20Dとしてもよい。このとき、設定する有効フラグ値は固定値でもよいし、各データごとに動的に設定してもよい。
<Example 9>
In the valid flag integrators 20, 20A, 20B, and 20C of the first to eighth embodiments described above, the valid flag value is input from the outside. However, as shown in FIG. The valid flag integrator 20D may be set internally. At this time, the valid flag value to be set may be a fixed value or may be dynamically set for each data.

<実施例10>
以上の実施例1〜9では、有効フラグ値として、「0」又は「正の整数値」をとる場合を例に説明したが、その代わりに、「0」又は「負の整数値」をとるようにしてもよい。このとき、算出される有効フラグ積算値は、「0」、「−1」、「−2」などとなるが、それぞれに対応するデータを記憶装置のアドレスAD0、AD1、AD2に書き込むようにすることで、同様のデータ処理を行うことができる。
<Example 10>
In the first to ninth embodiments, the case where “0” or “positive integer value” is taken as an example of the valid flag value has been described as an example. Instead, “0” or “negative integer value” is taken. You may do it. At this time, the calculated effective flag integrated value is “0”, “−1”, “−2”, etc., and the corresponding data is written to the addresses AD0, AD1, and AD2 of the storage device. Thus, the same data processing can be performed.

<実施例11>
また、有効フラグ値は、「0」又は「正の整数値」、あるいは「0」又は「負の整数値」のどちらかに限定されるわけではない。有効フラグ値として、「0」、「正の整数値」、「負の整数値」をとるようにすることで、入力データの順番を入れ替えることができる。
<Example 11>
The valid flag value is not limited to either “0” or “positive integer value”, or “0” or “negative integer value”. By taking “0”, “positive integer value”, and “negative integer value” as valid flag values, the order of input data can be changed.

図14A、14Bは本実施例11を説明する図である。この例では、図8A、8Bで示した実施例4の構造の有効フラグ積算器20Aを用い、有効フラグ先頭値を「−1」に設定している。まず、1組目の入力として、有効フラグ値がそれぞれ「1」、「2」、「−1」、「2」である入力データD0〜D3を入力している。(図14A)。こらから有効フラグ積算値を求めると、それぞれ「0」、「2」、「1」、「3」となる。これに従って、有効フラグ値が「0」でない入力データD0〜D3をその有効フラグ積算値に従って、それぞれ記憶装置10のメモリM0、M2、M3に書き込む。この結果、データD0、D1、D2、D3の順で入力されたデータを、D0、D2、D1、D3と、D2の順番を入れ替えて、メモリに書き込むことができる。   14A and 14B are diagrams for explaining the eleventh embodiment. In this example, the valid flag integrator 20A having the structure of the fourth embodiment shown in FIGS. 8A and 8B is used, and the valid flag leading value is set to “−1”. First, as the first set of inputs, input data D0 to D3 having valid flag values “1”, “2”, “−1”, and “2” are input. (FIG. 14A). When the effective flag integrated values are obtained from these, they become “0”, “2”, “1”, and “3”, respectively. Accordingly, the input data D0 to D3 whose valid flag value is not “0” are written in the memories M0, M2 and M3 of the storage device 10 respectively according to the valid flag integrated value. As a result, the data input in the order of the data D0, D1, D2, and D3 can be written to the memory by changing the order of D0, D2, D1, D3, and D2.

続いて、2組目の入力データD4〜D7の処理を説明したのが図14Bである。この例では、入力データD4〜D7の有効フラグ値は、それぞれ「3」、「0」、「−1」、「−1」となっている。これから有効フラグ積算値を求めると、それぞれ「6」、「6」、「5」、「4」となる。このうち有効フラグ値が「0」でない入力データD4、D6、D7をその有効フラグ積算値に従って、それぞれメモリM2、M1、M0に書き込む。この結果、入力データD4〜D7からD5を除いた3つのデータを、D7、D6、D4と順番を入れ替えて、詰めてメモリに書き込むことが出来る。以上のように、本実施例11によれば、選択したデータのみを任意の順番に入れ替えて、記憶装置のメモリに書き込んでいくことが可能になる。   Next, FIG. 14B illustrates the processing of the second set of input data D4 to D7. In this example, the valid flag values of the input data D4 to D7 are “3”, “0”, “−1”, and “−1”, respectively. When the effective flag integrated values are obtained from this, they become “6”, “6”, “5”, and “4”, respectively. Among these, the input data D4, D6, D7 whose valid flag value is not “0” are written in the memories M2, M1, M0, respectively, according to the valid flag integrated value. As a result, the three pieces of data excluding D5 from the input data D4 to D7 can be written in the memory by changing the order of D7, D6, and D4. As described above, according to the eleventh embodiment, only selected data can be exchanged in an arbitrary order and written to the memory of the storage device.

本発明のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of this invention. 本発明のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of this invention. 本発明のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of this invention. 本発明のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of this invention. 本発明の実施例1のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 1 of this invention. 本発明の実施例1のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 1 of this invention. 本発明の実施例1のデータ処理装置のセレクタ制御信号生成回路の構成を示す回路図である。It is a circuit diagram which shows the structure of the selector control signal generation circuit of the data processor of Example 1 of this invention. 本発明の実施例1のデータ処理装置のデータセレクタの構成を示す回路図である。It is a circuit diagram which shows the structure of the data selector of the data processor of Example 1 of this invention. 本発明の実施例2のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 2 of this invention. 本発明の実施例3のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 3 of this invention. 本発明の実施例4のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 4 of this invention. 本発明の実施例4のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 4 of this invention. 本発明の実施例5のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 5 of this invention. 本発明の実施例5のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 5 of this invention. 本発明の実施例6のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 6 of this invention. 本発明の実施例6のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 6 of this invention. 本発明の実施例6のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 6 of this invention. 本発明の実施例6のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 6 of this invention. 本発明の実施例6のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 6 of this invention. 本発明の実施例7のデータ処理の概略説明図である。It is a schematic explanatory drawing of the data processing of Example 7 of this invention. 本発明の実施例7のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 7 of this invention. 本発明の実施例7のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 7 of this invention. 本発明の実施例8のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 8 of this invention. 本発明の実施例8のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 8 of this invention. 本発明の実施例8のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 8 of this invention. 本発明の実施例9のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 9 of this invention. 本発明の実施例11のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 11 of this invention. 本発明の実施例11のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the data processor of Example 11 of this invention. 従来のデータ処理装置の動作説明図である。It is operation | movement explanatory drawing of the conventional data processing apparatus.

符号の説明Explanation of symbols

10、10A、10B、10C、10D:記憶装置
20、20A、20B、20C、20D:有効フラグ積算器
30:セレクタ制御信号生成回路
40:データセレクタ
50:割算器
60:乗算器
70:シフト演算器
10, 10A, 10B, 10C, 10D: Storage device 20, 20A, 20B, 20C, 20D: Valid flag multiplier 30: Selector control signal generation circuit 40: Data selector 50: Divider 60: Multiplier 70: Shift operation vessel

Claims (6)

無効を示す「0」、又は有効を示す正の整数値、又は有効を示す負の整数値を持つ有効フラグと対になり、且つ順序関係をもって連続して入力する複数のデータを、1サイクル毎に処理するデータ処理装置において、
前記データを前記1サイクル毎に前記順序関係に沿って所定数ずつ取り込み、当該データより順序が前の全てのデータの有効フラグの値の合計値、又はこれに当該データの有効フラグの値を加算した値を当該データの有効フラグ積算値として出力する有効フラグ積算器と、
複数のアドレスを有する複数のメモリからなり、前記有効フラグで有効と指定されたデータが、当該データに対応する前記有効フラグ積算値を前記メモリの数で割算した際の「余り」に対応する番号のメモリの「商」に対応するアドレスに書き込まれる記憶装置と、
を備えることを特徴とするデータ処理装置。
A plurality of data that is paired with a valid flag having “0” indicating invalidity, a positive integer value indicating validity, or a negative integer value indicating validity, and continuously input in an order relationship, is included in each cycle. In a data processing device for processing
Capture a predetermined number of the data along the order relationship for each cycle, and add the value of the valid flag of all the data whose order is earlier than the data, or add the value of the valid flag of the data to this An effective flag integrator that outputs the calculated value as the effective flag integrated value of the data,
Data composed of a plurality of memories having a plurality of addresses, and data designated as valid by the valid flag corresponds to a “remainder” when the valid flag integrated value corresponding to the data is divided by the number of the memories. A storage device to be written to an address corresponding to the “quotient” of the number memory;
A data processing apparatus comprising:
請求項1に記載のデータ処理装置において、
前記記憶装置は、前記所定数づつ取り込むデータ数が2のn乗で表されるとき、前記有効フラグ積算値の2進数表示から直接得られた前記「余り」と前記「商」に基づき書き込みが行われることを特徴とするデータ処理装置。
The data processing apparatus according to claim 1,
The storage device writes data based on the “remainder” and the “quotient” obtained directly from the binary display of the effective flag integrated value when the number of data to be fetched by the predetermined number is represented by 2 to the power of n. A data processing apparatus characterized by being performed.
請求項1に記載のデータ処理装置において、
前記記憶装置は、前記所定数づつ取り込むデータ数が2のn乗で表されないとき、前記有効フラグ積算値を前記メモリの数で割算する割算器で得られた前記「余り」と前記「商」に基づき書き込みが行われることを特徴とするデータ処理装置。
The data processing apparatus according to claim 1,
In the storage device, when the number of data to be fetched by the predetermined number is not represented by 2 to the power of n, the “remainder” obtained by the divider that divides the effective flag integrated value by the number of the memories and the “ A data processing apparatus in which writing is performed based on a quotient.
請求項1、2又は3に記載のデータ処理装置において、
前記入力データの内の連続する2以上のデータがまとまりのあるデータであるとき、当該まとまりのある各データに同じ値の有効フラグを付与することを特徴とするデータ処理装置。
The data processing device according to claim 1, 2, or 3,
When two or more continuous data of the input data is a unitary data, a data processing apparatus is characterized in that a valid flag having the same value is assigned to each united data.
請求項1、2又は3に記載のデータ処理装置において、
前記有効フラグ積算器で得られた有効フラグ積算値に拡大倍率をかけて新たな有効フラグ積算値として出力する乗算手段を備えたことを特徴とするデータ処理装置。
The data processing device according to claim 1, 2, or 3,
A data processing apparatus comprising: multiplication means for multiplying the effective flag integrated value obtained by the effective flag integrator by an enlargement factor and outputting the result as a new effective flag integrated value.
無効を示す「0」又は有効を示す「1」を持つ有効フラグと対になり、且つ順序関係をもって連続して入力する複数のデータを、1サイクル毎に処理するデータ処理装置において、
前記データを前記1サイクル毎に前記順序関係に沿って所定数ずつ取り込み、当該データより順序が当該サイクルでの前のデータの有効フラグの値の合計値、又はこれに当該データの有効フラグの値を加算した値を当該データの有効フラグ積算値として出力する有効フラグ積算器と、
複数のアドレスを有する複数のメモリからなり、前記有効フラグで有効と指定されたデータが、当該データに対応する前記有効フラグ積算値で示される特定のメモリの前記サイクルに対応するアドレスに書き込まれる記憶装置と、
を備えることを特徴とするデータ処理装置。
In a data processing apparatus that processes a plurality of data that is paired with a valid flag having “0” indicating invalidity or “1” indicating valid and that is sequentially input with an order relationship, for each cycle.
A predetermined number of the data is fetched in accordance with the order relation for each cycle, and the total value of the valid flag values of the previous data in the cycle from the data, or the valid flag value of the data An effective flag integrator that outputs a value obtained by adding as an effective flag integrated value of the data;
A memory composed of a plurality of memories having a plurality of addresses, in which data designated as valid by the valid flag is written to an address corresponding to the cycle of a specific memory indicated by the valid flag integrated value corresponding to the data Equipment,
A data processing apparatus comprising:
JP2007313053A 2007-12-04 2007-12-04 Data processing device Expired - Fee Related JP5072558B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007313053A JP5072558B2 (en) 2007-12-04 2007-12-04 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007313053A JP5072558B2 (en) 2007-12-04 2007-12-04 Data processing device

Publications (2)

Publication Number Publication Date
JP2009140040A true JP2009140040A (en) 2009-06-25
JP5072558B2 JP5072558B2 (en) 2012-11-14

Family

ID=40870616

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007313053A Expired - Fee Related JP5072558B2 (en) 2007-12-04 2007-12-04 Data processing device

Country Status (1)

Country Link
JP (1) JP5072558B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016102787A (en) * 2014-11-11 2016-06-02 インフィネオン テクノロジーズ アーゲーInfineon Technologies Ag Method and device for processing radar signals

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62254248A (en) * 1986-04-25 1987-11-06 Omron Tateisi Electronics Co Ic card writing and reading device
JPH08123683A (en) * 1994-10-27 1996-05-17 Sony Corp Parallel processor device
JPH1011354A (en) * 1996-06-19 1998-01-16 Olympus Optical Co Ltd Address data generating device
JP2002050172A (en) * 2000-08-03 2002-02-15 Nec Eng Ltd Fifo control circuit
JP2009122964A (en) * 2007-11-15 2009-06-04 Nippon Telegr & Teleph Corp <Ntt> Data processor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62254248A (en) * 1986-04-25 1987-11-06 Omron Tateisi Electronics Co Ic card writing and reading device
JPH08123683A (en) * 1994-10-27 1996-05-17 Sony Corp Parallel processor device
JPH1011354A (en) * 1996-06-19 1998-01-16 Olympus Optical Co Ltd Address data generating device
JP2002050172A (en) * 2000-08-03 2002-02-15 Nec Eng Ltd Fifo control circuit
JP2009122964A (en) * 2007-11-15 2009-06-04 Nippon Telegr & Teleph Corp <Ntt> Data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016102787A (en) * 2014-11-11 2016-06-02 インフィネオン テクノロジーズ アーゲーInfineon Technologies Ag Method and device for processing radar signals

Also Published As

Publication number Publication date
JP5072558B2 (en) 2012-11-14

Similar Documents

Publication Publication Date Title
JPH0612487A (en) Sample rate converter for picture data
CN115238863A (en) Hardware acceleration method, system and application of convolutional neural network convolutional layer
JP5549442B2 (en) FFT arithmetic unit
KR930001689A (en) Electronic zooming system using image buffer
JP2502836B2 (en) Preprocessing device for division circuit
JP5072558B2 (en) Data processing device
JP4920559B2 (en) Data processing device
CN115908132A (en) Image scaling processing method and device based on cubic convolution interpolation method
CN116051345A (en) Image data processing method, device, computer equipment and readable storage medium
US20210082082A1 (en) Data processing method and processing circuit
JP2001056806A (en) Fast fourier transform device
JPH0767063B2 (en) Digital signal processing circuit
JP4748007B2 (en) LDPC decoder operation control data generation method and LDPC decoder
KR100954843B1 (en) Method and Apparatus of elliptic curve cryptographic operation based on block indexing on sensor mote and Recording medium using by the same
KR100235537B1 (en) Variable tap of digital filter and multiplier circuit thereof
JP4156538B2 (en) Matrix operation unit
JPH1155076A (en) Sampling frequency converting device
JPS58151644A (en) Digital operating device
JP2001160736A (en) Digital filter circuit
JPH1153344A (en) Matrix operation unit and numerical operation processor having the same
JP4973042B2 (en) Data position conversion apparatus and data position conversion method
SU1019456A1 (en) Device for computing polynomials with fixed coefficients
JPH1049347A (en) Multiplicator
JP2541697B2 (en) Pipeline arithmetic unit
JPH0743698B2 (en) Parallel data processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120802

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120821

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

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees