[go: up one dir, main page]

JP3018393B2 - Variable length data processor - Google Patents

Variable length data processor

Info

Publication number
JP3018393B2
JP3018393B2 JP2113684A JP11368490A JP3018393B2 JP 3018393 B2 JP3018393 B2 JP 3018393B2 JP 2113684 A JP2113684 A JP 2113684A JP 11368490 A JP11368490 A JP 11368490A JP 3018393 B2 JP3018393 B2 JP 3018393B2
Authority
JP
Japan
Prior art keywords
data
length
delimiter
delimiter code
unit
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 - Fee Related
Application number
JP2113684A
Other languages
Japanese (ja)
Other versions
JPH0410145A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2113684A priority Critical patent/JP3018393B2/en
Publication of JPH0410145A publication Critical patent/JPH0410145A/en
Application granted granted Critical
Publication of JP3018393B2 publication Critical patent/JP3018393B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、可変長データのデータ長を迅速にチェッ
クするのに好適な可変長データ処理装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a variable-length data processing device suitable for quickly checking the data length of variable-length data.

[発明の概要] この発明は、可変長データ処理装置において、N個の
区切コード検出手段を設けて、単位長のN倍のブロック
単位で可変長データ列を読出し、そのブロック内の各単
位長分について同時並行的に区切コードを検出し、この
検出状況に基づいて可変長データのデータ長を求めるこ
とにより、可変長データのデータ長を迅速にチェックで
きるようにしたものである。
[Summary of the Invention] The present invention provides a variable-length data processing apparatus, in which N delimiter code detecting means are provided, a variable-length data string is read out in block units of N times the unit length, and each unit length in the block is read. The data length of the variable-length data can be quickly checked by detecting the delimiter codes for the minutes in parallel and determining the data length of the variable-length data based on the detection status.

[従来の技術] 可変長データ処理装置にて、例えば、ワード修正によ
りそのワード長がどのように変化したかをチェックする
とき等、可変長データのデータ長をチェックする場合
は、デリミタコード(区切コード)を検出してその位置
を求める必要があるが、デリミタコードの長さは1バイ
ト等の単位長分の長さであることから、従来、デリミタ
検出は、可変長データ列を単位長の長さ、例えば1バイ
ト単位でシーケンシャルに読出して行っていた。
2. Description of the Related Art In a variable-length data processing apparatus, when checking the data length of variable-length data, for example, when checking how the word length has changed due to word correction, a delimiter code (delimiter code) is used. It is necessary to detect the position of the delimiter code, but the length of the delimiter code is the length of a unit length such as 1 byte. Reading has been performed sequentially in units of length, for example, one byte.

[発明が解決しようとする課題] このように、従来は単位長分の長さを単位として読出
し、その1単位長分ずつ順次デリミタ検出を行っていた
ため、データ長をチェックするのに長時間を要してい
た。
[Problems to be Solved by the Invention] As described above, conventionally, reading is performed in units of the length of the unit length, and delimiter detection is sequentially performed for each unit length, so that it takes a long time to check the data length. I needed it.

この問題を解決する手法として、単位長のN倍(N=
2,3,…)のブロック単位で読出し、このブロック内の各
単位長分について同時並行的にデリミタ検出を行うこと
が考えられるが、この場合、その検出結果に基づいてデ
ータ長をチェックする技術が確立されなければならな
い。
As a method for solving this problem, N times the unit length (N =
It is conceivable to read out in block units of (2, 3,...) And perform delimiter detection simultaneously and in parallel for each unit length in this block. In this case, a technique of checking the data length based on the detection result is considered. Must be established.

してみれば、単位長のN倍の長さの可変長データ列ご
とに、各単位長分について同時並行的にデリミタ検出を
行い、その検出結果に基づいてデータ長をチェックでき
れば、迅速に可変長データのデータ長をチェックできる
ことは明らかである。
Then, for each variable length data string of N times the unit length, delimiter detection is performed simultaneously and in parallel for each unit length, and if the data length can be checked based on the detection result, the variable length can be changed quickly. Obviously, the data length of the long data can be checked.

この発明の課題は、単位長の複数倍のブロック単位ご
とに各単位長分について同時並行的にデリミタ検出を行
い、その検出結果に基づいてデータ長をチェックできる
ようにすることである。
It is an object of the present invention to perform delimiter detection simultaneously and in parallel for each unit length for each block unit having a multiple of the unit length, and to check the data length based on the detection result.

[課題を解決するための手段] この発明の手段は次の通りである。[Means for Solving the Problems] The means of the present invention are as follows.

記憶手段a(第1図の機能ブロック図を参照、以下同
じ)は、単位長の区切コードで区切られた可変長データ
列を記憶する。
The storage means a (see the functional block diagram of FIG. 1, the same applies hereinafter) stores a variable-length data string delimited by a unit-length delimiter code.

区切コード検出手段bは、N個(複数個)設けられて
いる。
N (plural) delimiter code detecting means b are provided.

供給手段cは、単位長のN倍のブロック単位で記憶手
段aより可変長データ列を並列に読出し、その先頭から
単位長分ずつ各区切コード検出手段bに供給する。
The supply unit c reads the variable-length data strings from the storage unit a in parallel in block units of N times the unit length, and supplies the variable-length data strings to the delimiter code detection units b by the unit length from the beginning.

更新手段dは、N個の区切コード検出手段bのいずれ
かにより区切コードが検出されるまでの間、供給手段c
によるブロック単位での読出し毎に数値データを更新す
る。
Updating means d supplies supply means c until one of the N separating code detecting means b detects the separating code.
Numerical data is updated each time reading is performed on a block basis.

生成手段eは、上記N個の区切コード検出手段bのい
ずれかにより区切コードが検出された際、検出に係る区
切コード検出手段bがブロック内の何番目の単位長分に
対応するかを判別し、その判別結果と上記更新手段にて
更新された数値データとに基づいて可変長データの長さ
データを生成する。
The generating means e determines which unit length in the block the delimiter code detecting means b corresponds to when the delimiter code is detected by any of the N delimiter code detecting means b. Then, length data of the variable length data is generated based on the determination result and the numerical data updated by the updating means.

[作 用] この発明の手段の作用は次の通りである。[Operation] The operation of the means of the present invention is as follows.

今、記憶手段aには、単位長である1バイトの区切コ
ードで区切られた可変長データ列が記憶され、4つの区
切コード検出手段bが存在するものとする。なお、説明
の便宜上、これらを区切コード検出手段b1、b2、b3、b4
と呼ぶこととする。
Now, it is assumed that the storage means a stores a variable-length data string delimited by a one-byte delimiter code, which is a unit length, and that four delimiter code detection means b exist. For convenience of explanation, these are separated by delimiter code detecting means b1, b2, b3, b4.
Shall be called.

この場合、供給手段cは、4バイトのブロック単位で
記憶手段aより可変長データ列を並列に読み出す。そし
て、その4バイトのうち1バイト目、2バイト目、3バ
イト目、4バイト目のデータをそれぞれ区切コード検出
手段b1、b2、b3、b4に供給する。
In this case, the supply unit c reads the variable-length data strings from the storage unit a in parallel in units of 4-byte blocks. Then, the first byte, the second byte, the third byte, and the fourth byte of the four bytes are supplied to delimiter code detection means b1, b2, b3, and b4, respectively.

更新手段dは、4つの区切コード検出手段bのいずれ
かにより区切コードが検出されるまでの間、供給手段c
によるブロック単位での読出し毎に数値データを更新す
る。この数値データ更新は、例えば4バイトのブロック
単位での読出し毎にプラス1、或いはプラス4する。
The updating unit d supplies the supply unit c until the delimiter code is detected by any of the four delimiter code detection units b.
Numerical data is updated each time reading is performed on a block basis. The numerical data is updated by plus one or plus four every time the data is read in units of, for example, 4 bytes.

生成手段eは、上記4つの区切コード検出手段bのい
ずれかにより区切コードが検出された際、検出に係る区
切コード検出手段bがブロック内の何番目の単位長分に
対応するかを判別し、その判別結果と上記更新手段にて
更新されたデータとに基づいて可変長データの長さデー
タを生成する。例えば、記憶手段aから読出された1ブ
ロック目からは区切コードが1つも検出されず、2ブロ
ック目では2バイト目に対応する区切コード検出手段b2
により区切コードが検出された場合において、それまで
に更新手段dがブロック単位での読出し毎にプラス1し
て、その数値データが“2"であるときは、2ブロック目
の2バイト目から区切コードが検出されたことを意味す
るので、5バイトという長さデータを生成する。
The generating means e determines which unit length in the block the delimiter code detecting means b corresponds to when the delimiter code is detected by any of the four delimiter code detecting means b. The length data of the variable length data is generated based on the determination result and the data updated by the updating means. For example, no delimiter code is detected from the first block read from the storage means a, and the delimiter code detection means b2 corresponding to the second byte in the second block.
In the case where the delimiter code is detected, the updating means d increments by one for each readout in block units, and when the numerical data is "2", the delimiter starts from the second byte of the second block. Since the code is detected, the length data of 5 bytes is generated.

従って、単位長の複数倍のブロック単位ごとに各単位
長分について同時並行的にデリミタ検出を行い、その検
出結果に基づいてデータ長をチェックできる。
Therefore, delimiter detection can be performed simultaneously and in parallel for each unit length for each block unit having a multiple of the unit length, and the data length can be checked based on the detection result.

[第1実施例] 以下、第1実施例を第2図ないし第5図を参照しなが
ら説明する。
First Embodiment Hereinafter, a first embodiment will be described with reference to FIG. 2 to FIG.

第2図は、可変長データ処理装置に内蔵されたデータ
長計測装置のブロック構成図であり、RAM1、制御部2、
レジスタ3、4個のデリミタ検出部A,B,C,D、変換部
4、及びカウンタCTにより構成されている。
FIG. 2 is a block diagram of a data length measuring device built in the variable length data processing device, and includes a RAM 1, a control unit 2,
It comprises a register 3, four delimiter detection units A, B, C, D, a conversion unit 4, and a counter CT.

RAM1には、1バイト(単位長)のデリミタコードで区
切られた可変長データ列が記憶され、例えば、RAM1内で
データ移動される際には、制御部2の制御の下で、4バ
イトのブロック単位で並列にレジスタ3に読出され、1
バイト単位で夫々デリミタ検出部A,B,C,Dに出力され
る。
The RAM 1 stores a variable-length data string delimited by a 1-byte (unit length) delimiter code. For example, when data is moved in the RAM 1, a 4-byte data string is controlled under the control of the control unit 2. The data is read out to the register 3 in parallel in block units, and 1
The data is output to the delimiter detection units A, B, C, and D in byte units.

各デリミタ検出部A,B,C,Dは、供給されたデータがデ
リミタコードであるか否かを夫々チェックし、夫々、
“1"又は“0"の検出信号SA,SB,SC,SDを変換部4に出力
する。この場合、検出信号SA,SB,SC,SDは、“1"はデリ
ミタコードであり、“0"はデリミタコードでないことを
示している。
Each delimiter detection unit A, B, C, D checks whether the supplied data is a delimiter code, respectively,
The detection signal SA, SB, SC, SD of “1” or “0” is output to the conversion unit 4. In this case, the detection signals SA, SB, SC, and SD indicate that “1” is a delimiter code and “0” is not a delimiter code.

変換部4は、デリミタ検出部A,B,C,Dのいずれからも
デリミタコードが検出されなかったときは、カウント指
示信号を制御部2に出力する。また、デリミタ検出部A,
B,C,Dのいずれかでデリミタコードが検出されたとき
は、デリミタ検出信号を制御部2に出力すると共に、上
記検出信号SA,SB,SC,SDを2ビットデータに変換し、そ
の2ビットデータ(変換信号a,b)をデータ長データの
下位2ビットのデータとして出力する。上記の変換は、
第3図に示した変換テーブルTBに基づいて実行される。
The conversion unit 4 outputs a count instruction signal to the control unit 2 when no delimiter code is detected from any of the delimiter detection units A, B, C, and D. In addition, delimiter detector A,
When a delimiter code is detected in any of B, C, and D, a delimiter detection signal is output to the control unit 2, and the detection signals SA, SB, SC, and SD are converted into 2-bit data. The bit data (conversion signals a and b) are output as the lower two bits of the data length data. The above conversion is
This is executed based on the conversion table TB shown in FIG.

制御部2は、カウント指示信号が入力されたときは、
カウントアップ指示信号をカウンタCTに出力する。
When the count instruction signal is input, the control unit 2
The count-up instruction signal is output to the counter CT.

カウンタCTのカウント値は6ビットで構成され、デー
タ長データの上記下位2ビットに対する上位6ビットの
データとして出力される。すなわち、カウンタCTにより
1カウントアップされる毎に、データ長データとして
は、デレミタ検出部A,B,C,Dの個数に対応する4ずつア
ップすることとなる。
The count value of the counter CT is composed of 6 bits, and is output as upper 6 bits data for the lower 2 bits of the data length data. That is, every time the counter CT counts up by 1, the data length data is increased by 4 corresponding to the number of the delimiter detectors A, B, C, D.

次に、データ長の計測動作を第4図および第5図を参
照しながら説明する。
Next, the data length measurement operation will be described with reference to FIGS.

今、第4図に示したような可変長データ列がRAM1に格
納されているものとする。なお、図中、“ '"は1バイ
トのデリミタコードを示し、×はデレミタコード以外の
1バイトのデータを示している。
Now, it is assumed that a variable-length data string as shown in FIG. 4 is stored in the RAM1. In the figure, “′” indicates a 1-byte delimiter code, and “x” indicates 1-byte data other than the delimiter code.

まず、制御部2の制御により最初の4バイトのブロッ
クがRAM1から読出され、レジスタ部3にセットされると
共に、デリミタ検出部A,B,C,Dに1バイトずつ分配され
る。この際、デリミタ検出部A,B,C,Dには、夫々4バイ
トのブロック内の1バイト目、2バイト目、3バイト
目、4バイト目のデータが供給される。
First, a first 4-byte block is read from the RAM 1 under the control of the control unit 2, set in the register unit 3, and distributed to the delimiter detection units A, B, C, D one byte at a time. At this time, the first byte, second byte, third byte, and fourth byte data in the 4-byte block are supplied to the delimiter detection units A, B, C, and D, respectively.

そこで、各デリミタ検出部A,B,C,Dは、夫々、供給さ
れた1バイトデータがデリミタコードであるか否かをチ
ェックし、デリミタコードであれば、“1"、デリミタで
なければ“0"の検出信号SA,SB,SC,SDを変換部3に出力
する。上記の例では、4バイトの全てがデリミタコード
ではないので、検出信号SA,SB,SC,SDは共に“0"とな
る。このように検出信号SA,SB,SC,SDの全てが“0"の場
合は、変換部3は、カウント指示信号を制御部2に出力
し、これにより制御部2からカウンタCTにカウントアッ
プ指示信号が出力され、カウンタCTのカウント値はプラ
ス1される。上記の例ではカウンタCT内のカウント値は
“1"となる。
Therefore, each of the delimiter detection units A, B, C, and D checks whether or not the supplied 1-byte data is a delimiter code, and if it is a delimiter code, "1"; The detection signal SA, SB, SC, SD of "0" is output to the conversion unit 3. In the above example, since all of the four bytes are not delimiter codes, the detection signals SA, SB, SC, and SD are all “0”. As described above, when all of the detection signals SA, SB, SC, and SD are “0”, the conversion unit 3 outputs a count instruction signal to the control unit 2, whereby the control unit 2 instructs the counter CT to count up. A signal is output, and the count value of the counter CT is incremented by one. In the above example, the count value in the counter CT is “1”.

次に、制御部2は、レジスタ3のデータをRAM1のライ
トアドレスに書込み、次の2ブロック目のデータ(先頭
から5〜8バイト目のデータ)をRAM1から読出し、レジ
スタ3にセットし、上記のような仕方でデリミタ検出部
A,B,C,Dに1バイトずつ分配する。この場合は、第4図
のデータ例では、先頭から6バイト目のデリミタコード
は、デリミタ検出部Bに供給されるので、検出信号SBの
みが“1"となり、他の検出信号SA,SC,SDは“0"となる。
このとき、変換部4から出力される変換信号a,bは、第
3図の変換テーブルに示したように、夫々“1"、“0"と
なる。
Next, the control unit 2 writes the data of the register 3 to the write address of the RAM 1, reads the data of the next second block (data of the fifth to eighth bytes from the head) from the RAM 1, sets the data in the register 3, Delimiter detection section in a way like
A byte is distributed to A, B, C, and D at a time. In this case, in the data example of FIG. 4, the delimiter code of the sixth byte from the top is supplied to the delimiter detection unit B, so that only the detection signal SB becomes “1” and the other detection signals SA, SC, SD becomes “0”.
At this time, the conversion signals a and b output from the conversion unit 4 are “1” and “0”, respectively, as shown in the conversion table of FIG.

一方、カウンタCTの現在の6ビットの内容は、第5図
に示したようになっている。従って、カウンタCTの6ビ
ットを上位ビットとし、変換信号a,bを下位ビットとす
る数値データとして読取ると“6"になり、先頭から6バ
イト目にデリミタコードが存在することが分かり、その
デリミタコードより前の可変長データのデータ長は、5
バイトであることが明らかになる。なお、この読取り
は、制御部2、或いは図示省略したCPUにより行う。
On the other hand, the contents of the current 6 bits of the counter CT are as shown in FIG. Therefore, when read as numerical data in which the 6 bits of the counter CT are the upper bits and the converted signals a and b are the lower bits, the value becomes "6", and it can be seen that the delimiter code exists in the sixth byte from the top. The data length of the variable length data before the code is 5
It turns out to be a byte. This reading is performed by the control unit 2 or a CPU (not shown).

このようなデータ読取り方式を採用することにより、
カウンタCTではデリミタコードの存在しないブロックの
個数をカウントし、そのブロック個数に4を乗算し、さ
らにその乗算値に変換信号a,bで示される数値を加算す
るといった面倒な演算を省略できる。
By adopting such a data reading method,
The counter CT counts the number of blocks having no delimiter code, multiplies the number of blocks by 4, and adds the numerical values indicated by the conversion signals a and b to the multiplied value, thereby eliminating a troublesome operation.

[第2実施例] 次に、第2実施例を第6図ないし第9図を参照しなが
ら説明する。
Second Embodiment Next, a second embodiment will be described with reference to FIGS.

第2実施例は、第2図に示した第1実施例の変換部4
を第6図のように構成することにより、データ読出しを
連続して行っても各デリミタ間のデータのバイト数をカ
ウントし、かつ、連続する4バイト中に複数のデリミタ
が存在する場合にそれらデリミタ間のデータのバイト数
をチェックできるようにしたものである。
The second embodiment is different from the converter 4 of the first embodiment shown in FIG.
Is configured as shown in FIG. 6 so that the number of data bytes between each delimiter is counted even when data reading is performed continuously, and when a plurality of delimiters are present in four consecutive bytes, The number of bytes of data between delimiters can be checked.

この第2実施例における変換部は、第1変換部41〜第
4変換部44を有しており、これらには上記の検出信号SA
〜SDが共通に入力され、その検出信号SA〜SDを次のよう
な数値に変換する。
The conversion unit in the second embodiment includes a first conversion unit 41 to a fourth conversion unit 44, and these include the detection signal SA described above.
To SD are input in common, and the detection signals SA to SD are converted into the following numerical values.

第1変換部41は、並列に読出された4バイトのブロッ
ク内にデリミタコードが存在するとき、その最初のデリ
ミタコードがブロックの先頭から何バイト目に存在する
かを示す数値に変換する。この第1変換部41は第1実施
例の変換部4と全く同様に、第3図の変換テーブルを参
照して変換信号a,bを生成し、ブロック内にデリミタコ
ードが存在しないときは、カウント指示信号を出力す
る。
When the delimiter code exists in the 4-byte block read in parallel, the first conversion unit 41 converts the delimiter code into a numerical value indicating the number of the byte from the head of the block. The first conversion unit 41 generates conversion signals a and b with reference to the conversion table of FIG. 3 just like the conversion unit 4 of the first embodiment, and when no delimiter code exists in the block, Outputs a count instruction signal.

第2変換部42は、並列に読出された4バイトのブロッ
ク内に複数のデリミタコードが存在するとき、次のデリ
ミタコードまで何バイトであるかを示す数値に変換す
る。
When a plurality of delimiter codes are present in a 4-byte block read in parallel, the second conversion unit 42 converts the delimiter code into a numerical value indicating the number of bytes up to the next delimiter code.

第3変換部43は、並列に読出された4バイトのブロッ
ク内にデリミタコードが存在するとき、そのデリミタコ
ードより後ろに何バイトのデータが残っているかを示す
残バイト数に変換する。この第3変換部43により変換さ
れた残バイト数は、次のブロック対応の検出信号SA〜SD
が入力されることにより、前回残バイト数レジスタRに
出力され、次のデリミタコードが検出されるまで前回残
バイト数レジスタRに保存される。なお、複数のデリミ
タコードが存在するときは、最後のデリミタコードより
後ろの残バイト数に変換にする。
When the delimiter code is present in the 4-byte block read in parallel, the third conversion unit 43 converts the delimiter code into a remaining byte number indicating how many bytes of data remain after the delimiter code. The number of remaining bytes converted by the third conversion unit 43 is equal to the number of detection signals SA to SD corresponding to the next block.
Is output to the previous remaining byte count register R and stored in the previous remaining byte count register R until the next delimiter code is detected. When there are a plurality of delimiter codes, conversion is made to the number of remaining bytes after the last delimiter code.

第4変換部44は、並列に読出された4バイトのブロッ
ク内に複数のデリミタコードが存在するとき、そのデリ
ミタコードの個数に変換する。
When a plurality of delimiter codes are present in a 4-byte block read in parallel, the fourth conversion unit 44 converts the plurality of delimiter codes into the number of delimiter codes.

2ビット加算器45は、ブロック内の先頭デリミタコー
ドがそのブロック内で何バイト目かを示す第1変換部41
からのデータと、前回残バイト数レジスタRにセットさ
れている前回の残バイト数とを加算し、その加算値を変
換信号aa,bbとして出力する。この変換信号aa,bbは、第
1実施例における変換信号a,bのように、データ長デー
タの下位2ビットのデータとして活用される。
The two-bit adder 45 includes a first conversion unit 41 that indicates the number of the byte in the block where the head delimiter code is in the block.
Is added to the last remaining byte number set in the last remaining byte number register R, and the added value is output as conversion signals aa, bb. These converted signals aa, bb are used as lower two bits of data length data, like the converted signals a, b in the first embodiment.

なお、第1変換部41からのカウント指示信号、2ビッ
ト加算器45からのキャリィ信号は、カウントアップ指示
信号としてオアゲート46を介してカウンタCTに入力され
る。
The count instruction signal from the first converter 41 and the carry signal from the 2-bit adder 45 are input to the counter CT via the OR gate 46 as a count-up instruction signal.

次に、第2実施例の動作を第7図ないし第9図を参照
しながら説明する。
Next, the operation of the second embodiment will be described with reference to FIGS.

まず、第7図のデータ例で、データ長の連続チェック
動作を説明する。
First, the continuous check operation of the data length will be described with reference to the data example of FIG.

第7図の1ブロック目の4バイト「××,×」を読出
したときは、検出信号SA,SB,SC,SDは夫々「0010」とな
るので、第1変換部41は、第3図の変換テーブルTBに基
づいて変換処理を行い、変換信号a,bとして「11」を2
ビット加算器45に出力する。このとき、第1変換部41
は、検出信号SA,SB,SC,SDの中に“1"が含まれているの
でカウント指示信号は出力しない。
When the four bytes "xx, x" of the first block in FIG. 7 are read, the detection signals SA, SB, SC, and SD become "0010", respectively. The conversion processing is performed based on the conversion table TB, and “11” is set to 2 as the conversion signals a and b.
Output to the bit adder 45. At this time, the first conversion unit 41
Does not output the count instruction signal because "1" is included in the detection signals SA, SB, SC, and SD.

このとき、第2変換部42による変換結果は、デリミタ
コードが1個のみであるので変換処理を行わない。ま
た、第3変換部43により得られる残バイト数は、デリミ
タコードが先頭から3バイト目であるので“1"、第4変
換部44による変換結果は、デリミタコードが1個のみで
あるので“1"となる。そして、第3変換部43による残バ
イト数“1"は、この時点では、未だ前回残バイト数レジ
スタRには出力されない。
At this time, since the conversion result by the second conversion unit 42 has only one delimiter code, the conversion processing is not performed. The number of remaining bytes obtained by the third conversion unit 43 is “1” because the delimiter code is the third byte from the beginning, and the conversion result by the fourth conversion unit 44 is “1” because there is only one delimiter code. 1 ". At this point, the remaining byte number “1” by the third conversion unit 43 has not yet been output to the previous remaining byte number register R.

従って、2ビット加算器45から出力される変換信号a
a,bbは、第1変換部41からの変換信号a,bである「11」
のままとなり、キャリィ信号も出力されない。このた
め、カウンタCTは、“0"のままとなっている。
Therefore, the conversion signal a output from the 2-bit adder 45
a, bb is the converted signal a, b from the first converter 41, "11"
, And no carry signal is output. Therefore, the counter CT remains “0”.

従って、第1実施例と同様に、カウンタCTの6ビット
を上位ビットとし、変換信号aa,bbを下位ビットとする
数値データとして読取ると“3"となり(第8図(a)参
照)、のデリミタコードは3バイト目に存在し、それ
より前の可変長データのデータ長は2バイトであること
が明らかになる。
Therefore, similarly to the first embodiment, when read as numerical data in which the 6 bits of the counter CT are upper bits and the converted signals aa, bb are lower bits, it becomes "3" (see FIG. 8 (a)). The delimiter code exists at the third byte, and it becomes clear that the data length of the variable length data before that is 2 bytes.

そして、2ブロック目が読出されると、第3変換部43
による残バイト数“1"は、前回残バイト数レジスタRに
セットされる。このときは、2ブロック目にはデリミタ
コードが存在しないので、第1変換部41からはカウント
指示信号が出力され、この信号に基づいてカウンタCT内
のカウント値がプラス1され“1"となる。このようにカ
ウントアップが行われたときは、データ長の読取り動作
は実行されない。
When the second block is read, the third conversion unit 43
The remaining byte number "1" is set in the previous remaining byte number register R. At this time, since the delimiter code does not exist in the second block, a count instruction signal is output from the first conversion unit 41, and the count value in the counter CT is increased by 1 to "1" based on this signal. . When the count-up is performed in this manner, the data length read operation is not performed.

次に、3ブロック目の4バイト「×,××」が読出さ
れると、検出信号SA,SB,SC,SDは夫々「0100」となるの
で、第1変換部41は変換テーブルTBに基づいて変換し、
変換信号a,bとして「10」を2ビット加算器45に出力す
る。
Next, when the 4 bytes “×, XX” of the third block are read, the detection signals SA, SB, SC, and SD become “0100”, respectively. Convert
“10” is output to the 2-bit adder 45 as the converted signals a and b.

そこで、2ビット加算器45は、第1変換部41からの
「10」と、前回残バイト数レジスタR内の現在の残バイ
ト数“1"、すなわち「01」とを加算し、その加算結果
「11」を変換信号aa,bbとして出力する。
Therefore, the 2-bit adder 45 adds “10” from the first conversion unit 41 to the current remaining byte number “1” in the previous remaining byte count register R, that is, “01”, and the addition result is obtained. “11” is output as the conversion signals aa, bb.

このとき、上記のようにカウンタCTのカウント値は
“1"となっているので、第1実施例と同様に、カウンタ
CTの6ビットを上位ビットとし、変換信号aa,bbを下位
ビットとする数値データとして読取ると“7"となり(第
8図(b)参照)、とのデリミタコード間の可変長
データのデータ長は、6バイトであることが明らかにな
る。
At this time, the count value of the counter CT is "1" as described above, so that the counter
When it is read as numerical data in which the 6 bits of CT are upper bits and the converted signals aa and bb are lower bits, it becomes "7" (see FIG. 8B), and the data length of the variable length data between the delimiter codes Becomes 6 bytes.

なお、制御部2は、上記のようなカウント値と変換信
号aa,bbに基づくデータ長のチェックが終わる毎に、カ
ウンタCTのカウント値をクリアする。
The control unit 2 clears the count value of the counter CT each time the data length check based on the count value and the conversion signals aa, bb as described above is completed.

次に、4バイトのブロック内の複数のデリミタコード
が存在する場合について、第9図のデータ例で説明す
る。
Next, a case where there are a plurality of delimiter codes in a 4-byte block will be described with reference to a data example in FIG.

この「×,×,」の例では、検出信号SA,SB,SC,SD
は、夫々「0101」となる。この場合、第1変換部41は、
2番目の“1"の検出信号SDの存在は無視して“0"と見做
し、検出信号SA,SB,SC,SDとしては、夫々「0100」が入
力されたものとして変換テーブルTBによる変換を行い、
変換信号a,bとして「10」を出力する。そして、この変
換信号は、のデリミタコードと、それより前のデリミ
タコード間のデータ長をチェックするためのデータとし
て活用される。
In this example of “×, ×,”, the detection signals SA, SB, SC, SD
Becomes “0101” respectively. In this case, the first conversion unit 41
The existence of the second detection signal SD of "1" is ignored and regarded as "0". As the detection signals SA, SB, SC, and SD, "0100" is input to the conversion table TB, respectively. Perform the conversion,
"10" is output as the converted signals a and b. This converted signal is used as data for checking the data length between the delimiter code and the preceding delimiter code.

また、この例では、第2変換部42は、とのデリミ
タコードとの距離データ“2"に変換し、第4変換部44
は、デリミタコードの個数データ“2"に変換する。
Further, in this example, the second conversion unit 42 converts the distance data with the delimiter code to “2”, and the fourth conversion unit 44
Is converted to the number data “2” of the delimiter code.

そこで、上記のように、のデリミタコードと、それ
より前のデリミタコード間のデータ長をチェックした
後、第2変換部42にて変換された距離データ“2"が読出
され、それにより、とのデリミタコード間のデータ
の長さが1バイトであることが判明する。なお、本実施
例では、4バイトのブロック単位で読出しているため、
このブロック内に3個以上のデリミタコードが存在する
例は考え難いが、5バイト以上のより大きなブロック単
位で読出す場合に、3個以上のデリミタコードが存在す
るときは、第2変換部42は、これらに対応する複数の距
離データに変換する。そして、その距離データの個数
は、第4変換部44にて変換されたデリミタコードの個数
データからマイナス1した個数であると判断される。
Therefore, as described above, after checking the data length between the delimiter code and the preceding delimiter code, the distance data “2” converted by the second conversion unit 42 is read, and It turns out that the data length between the delimiter codes is 1 byte. In this embodiment, since reading is performed in units of 4-byte blocks,
It is difficult to imagine an example in which three or more delimiter codes exist in this block. However, when reading in a larger block unit of 5 bytes or more, if there are three or more delimiter codes, the second conversion unit 42 Converts into a plurality of distance data corresponding to these. Then, it is determined that the number of the distance data is a number obtained by subtracting -1 from the number data of the delimiter code converted by the fourth conversion unit 44.

また、1ブロック内に複数のデリミタコードが存在す
る場合、第3変換部43は、そのブロック内の最後のデリ
ミタコードに基づいた残バイト数に変換する。
When a plurality of delimiter codes exist in one block, the third conversion unit 43 converts the number of remaining bytes based on the last delimiter code in the block.

このようにして、データの連続読出し、1ブロック内
の複数デリミタコードに対処している。
In this way, continuous reading of data is dealt with for a plurality of delimiter codes in one block.

[発明の効果] この発明によれば、単位長の複数倍のブロック単位ご
とに各単位長分について同時並行的にデリミタ検出を行
い、その検出結果に基づいてデータ長をチェックできる
ので、可変長データのデータ長チェックの迅速化が可能
となる。
[Effects of the Invention] According to the present invention, delimiter detection can be performed simultaneously and in parallel for each unit length for each block unit having a multiple of the unit length, and the data length can be checked based on the detection result. The data length check of data can be speeded up.

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

第1図は本発明の機能ブロック図、第2図は第1実施例
のブロック構成図、第3図は変換テーブルを示す図、第
4図は第1実施例の動作を説明するための可変長データ
例を示す図、第5図は第4図のデータ例における生成デ
ータを示す図、第6図は第2実施例における変換部のブ
ロック構成図、第7図は第2実施例におけるデータ長の
連続チェック動作を説明するためのデータ例を示す図、
第8図は第7図のデータ例における生成データを示す
図、第9図は第2実施例において1ブロック内に複数の
デリミタコードが存在する場合の動作を説明するための
データ例を示す図である。 1……RAM、2……制御部、4……変換部、CT……カウ
ンタ、A,B,C,D……デリミタ検出部、TB……変換テーブ
ル。
1 is a functional block diagram of the present invention, FIG. 2 is a block diagram of the first embodiment, FIG. 3 is a diagram showing a conversion table, and FIG. 4 is a variable table for explaining the operation of the first embodiment. FIG. 5 is a view showing an example of long data, FIG. 5 is a view showing generated data in the data example of FIG. 4, FIG. 6 is a block diagram of a conversion unit in the second embodiment, and FIG. A diagram showing an example of data for explaining a long continuous check operation,
FIG. 8 is a diagram showing generated data in the data example of FIG. 7, and FIG. 9 is a diagram showing a data example for explaining an operation when a plurality of delimiter codes exist in one block in the second embodiment. It is. 1 ... RAM, 2 ... Control unit, 4 ... Conversion unit, CT ... Counter, A, B, C, D ... Delimiter detection unit, TB ... Conversion table.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】単位長の区切コードで区切られた可変長デ
ータ列を記憶する記憶手段と、 N個の区切コード検出手段と、 単位長のN倍のブロック単位で上記記憶手段より可変長
データ列を並列に読出し、その先頭から単位長分ずつ上
記各区切コード検出手段に供給する供給手段と、 上記N個の区切コード検出手段のいずれかにより区切コ
ードが検出されるまでの間、上記供給手段による並列読
出し毎に数値データを更新する更新手段と、 上記N個の区切コード検出手段のいずれかにより区切コ
ードが検出された際、検出に係る区切コード検出手段が
ブロック内の何番目の単位長分に対応するかを判別し、
その判別結果と上記更新手段にて更新された数値データ
とに基づいて可変長データの長さデータを生成する生成
手段と、 を備えたことを特徴とする可変長データ処理装置。
1. A storage means for storing a variable-length data string delimited by a unit-length delimiter code, N delimiter code detection means, and variable-length data from the storage means in block units of N times the unit length. A supply means for reading out the columns in parallel and supplying them to the respective delimiter code detecting means by a unit length from the head thereof, and the supply means until one of the N delimiter code detectors detects a delimiter code. Means for updating numerical data each time parallel reading is performed by the means; and when a delimiter code is detected by any of the N delimiter code detectors, the delimiter code detector associated with the detection determines which unit in the block. Determine if it corresponds to the long,
Generating means for generating length data of variable-length data based on the result of the determination and the numerical data updated by the updating means.
JP2113684A 1990-04-27 1990-04-27 Variable length data processor Expired - Fee Related JP3018393B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2113684A JP3018393B2 (en) 1990-04-27 1990-04-27 Variable length data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2113684A JP3018393B2 (en) 1990-04-27 1990-04-27 Variable length data processor

Publications (2)

Publication Number Publication Date
JPH0410145A JPH0410145A (en) 1992-01-14
JP3018393B2 true JP3018393B2 (en) 2000-03-13

Family

ID=14618559

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2113684A Expired - Fee Related JP3018393B2 (en) 1990-04-27 1990-04-27 Variable length data processor

Country Status (1)

Country Link
JP (1) JP3018393B2 (en)

Also Published As

Publication number Publication date
JPH0410145A (en) 1992-01-14

Similar Documents

Publication Publication Date Title
EP0221577B1 (en) Microprogram control unit
US3887901A (en) Longitudinal parity generator for mainframe memories
GB1328164A (en) Data retrieval apparatus
JP3018393B2 (en) Variable length data processor
US4975835A (en) Variable length data processing apparatus for consecutively processing variable-length data responsive to one instruction
JPH01311623A (en) Acceleration arithmetic circuit
JPH064582A (en) Central processing unit
JPH07101460B2 (en) Code detector
JP2730087B2 (en) Register file address circuit
JP2752929B2 (en) Program runaway detection device and runaway detection method
JP2704062B2 (en) Information processing device
JP2558952B2 (en) Fixed-point digital signal processor
JPS61285540A (en) Information processor
JPH0556032A (en) Frame synchronization system
JPS6016993Y2 (en) First-in, first-out memory
JPH01284971A (en) Vector processor
SU541162A1 (en) Device for processing and entering experimental data into a computer
SU1029230A2 (en) Device for checking memory error correcting units
JPH0746309B2 (en) Data processing device
JPH02306725A (en) Code conversion method and device
JPH0774988B2 (en) Processing equipment
JPS6237757A (en) Checking system for identifier
JPS59188785A (en) Reference level setting system of comparator circuit
JPH0527945A (en) Record transforming device
JPS63289688A (en) Data collecting and recording device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees