JPH0225922A - Data detector - Google Patents

Data detector

Info

Publication number
JPH0225922A
JPH0225922A JP17511188A JP17511188A JPH0225922A JP H0225922 A JPH0225922 A JP H0225922A JP 17511188 A JP17511188 A JP 17511188A JP 17511188 A JP17511188 A JP 17511188A JP H0225922 A JPH0225922 A JP H0225922A
Authority
JP
Japan
Prior art keywords
data
address
delimiter
read
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP17511188A
Other languages
Japanese (ja)
Inventor
Junichi Komuro
純一 小室
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 JP17511188A priority Critical patent/JPH0225922A/en
Priority to KR1019890008774A priority patent/KR0152979B1/en
Priority to US07/375,386 priority patent/US5115490A/en
Priority to CA000604840A priority patent/CA1324684C/en
Priority to EP89112869A priority patent/EP0350929B1/en
Priority to DE68924377T priority patent/DE68924377T2/en
Publication of JPH0225922A publication Critical patent/JPH0225922A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To process the data of variable length at high speed by detecting a delimiter serving as a segmenting character of the variable length data, etc., via the hardware and outputting the store address of the delimiter. CONSTITUTION:A CPU sets a delimiter at a data designating means 2, the head address of the record stored in a data memory 1 at a read address designating means 4, and the address storing the address of the delimiter in the record at an address store means 3 respectively. Then a delimiter detector inputs a delimiter detections request signal received from, the CPU and reads successively the data out of the head address of the source data stored in the means 3 to detect the delimiter. Thus the delimiter is retrieved out of the record at high speed. When the delimiter is detected, the delimiter address in the record is automatically set at the means 3. In such a way, the processing speed is improved for a variable length record file.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、電子計算機に係り、特に主記憶装置に格納さ
れた特定データの検出に関する。′〔発明の概要〕 コンピュータでは、メモリの使用効率をよくするために
、データを可変長形式で記憶する場合が多い。可変長デ
ータの終わりには、通常データの終りを示す区切り文字
であるデリミタが格納される。したがって、メモリ内に
格納された複数の可変長データを処理する場合、デリミ
タを検出して個々の可変長データに分離する処理が必要
となる。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to electronic computers, and particularly to detection of specific data stored in a main memory. [Summary of the Invention] Computers often store data in a variable length format in order to improve memory usage efficiency. A delimiter, which is a delimiter character indicating the end of the normal data, is stored at the end of the variable length data. Therefore, when processing a plurality of variable length data stored in memory, it is necessary to detect the delimiter and separate the data into individual variable length data.

従来は、その分離処理をプログラムの実行により行って
おり、複数命令の実行を必要とするために処理速度が遅
かった。本発明は、可変長データの区切り文字であるデ
リミタ等をハードウェアにより検出し、そのデリミタの
格納アドレスを出力するものであり、可変長データの処
理を高速に行うことが可能となる。
Conventionally, this separation processing has been performed by executing a program, which required execution of multiple instructions, resulting in slow processing speed. The present invention uses hardware to detect a delimiter or the like that is a delimiter of variable-length data, and outputs the storage address of the delimiter, thereby making it possible to process variable-length data at high speed.

〔従来の技術〕[Conventional technology]

コンピュータによるデータ処理においては、例えば在庫
管理における商品名や、給与管理における従業異名等の
ような可変長データを処理する場合が多い。可変長デー
タは、語長が任意であるので、メモリやファイルに記憶
する場合、データの最後に可変長データの終りを示す区
切り文字(デリミタ)を付加して記憶する。前記商品名
や従業員等の可変長データは、通常lレコード内の1フ
イールドとして磁気ディスクやフロッピーディスク等の
外部記憶装置内のファイルに記憶されており、ファイル
の更新時に外部記憶装置から主記憶装置に読み出され、
データ書き換えやソート等の処理を施される。ファイル
のルコードは、通常、複数のフィールドから構成され、
フィールド単゛位で処理を行う場合、デリミタを基に書
き換えるフィールドをレコード内から取り出す処理が必
要となる。
In data processing by computers, variable length data is often processed, such as product names in inventory management, employee nicknames in payroll management, and the like. Variable-length data has an arbitrary word length, so when it is stored in a memory or file, a delimiter indicating the end of the variable-length data is added to the end of the data. The variable-length data such as product names and employees is usually stored as one field in a record in a file in an external storage device such as a magnetic disk or floppy disk, and is transferred from the external storage device to the main memory when the file is updated. read out to the device,
Processing such as data rewriting and sorting is performed. A file's code typically consists of multiple fields,
When processing on a field-by-field basis, it is necessary to extract the field to be rewritten from the record based on the delimiter.

従来、デリミタの検出は、デリミタを検出するプログラ
ムを作成し、そのプログラムによりレコードから1ワー
ド(1バイト)づつ読み出しデリミタであるかどうか判
別することによって行っていた。そして、例えばルコー
ド内のデリミタを全て検出し、そのデリミタが格納され
たアドレスをメモリ内の所定領域にセーブしておき、そ
のアドレスを基に各フィールドのデータを読み出しなが
ら処理を行っていた。
Conventionally, delimiters have been detected by creating a program for detecting delimiters, and using that program to read each word (one byte) from a record and determine whether or not it is a delimiter. For example, all delimiters in a field code are detected, the addresses where the delimiters are stored are saved in a predetermined area in the memory, and data in each field is read and processed based on the addresses.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したデリミタを検出するためのプログラムは、複数
ステップの命令から成り、命令の実行による処理時間が
長く問題となっていた。
The program for detecting the delimiter described above consists of instructions of multiple steps, and the processing time required for executing the instructions is long.

本発明は、上記従来の問題点に迄み、可変長データに付
加されるデリミタのような特殊データを、高速に検出す
ることにより可変長データ等の処理速度を高めるデータ
検出装置を捉供することを目的とする。
The present invention solves the above conventional problems by providing a data detection device that increases the processing speed of variable-length data by quickly detecting special data such as delimiters added to variable-length data. With the goal.

〔問題点を解決するための手段〕[Means for solving problems]

■は複数のデータを記憶するデータ記憶手段、2は検出
すべきデータを指定するデータ指定手段、 3は該データ指定手段2の指定するデータが格納された
前記データ記憶手段1のアドレスを格納するアドレス格
納手段、 4は前記データ記憶手段1から読み出すデータのアドレ
スを指定する読み出しアドレス指定手段、5は該読み出
しアドレス指定手段4の指定するアドレスのデータを前
記データ記憶手段1から読み出してそのデータと前記デ
ータ指定手段2の指定するデータとが一致するかどうか
を判別する判別手段、 6は該判別手段5により前記データ記憶手段lから読み
出されたデータと前記データ指定手段22の指定するデ
ータとが一致した時には、前記読み出しアドレス指定手
段4の指定するアドレスを前記アドレス格納手段3に格
納し、一致しない場合には前記読み出しアドレス指定手
段4の指定するアドレスを変更する制御手段である。
2 is a data storage means for storing a plurality of data; 2 is a data specification means for specifying data to be detected; 3 is for storing the address of the data storage means 1 in which the data specified by the data specification means 2 is stored. address storage means; 4 read address designation means for specifying the address of data to be read from the data storage means 1; 5 read data at the address designated by the read address designation means 4 from the data storage means 1; a determining means for determining whether or not the data specified by the data specifying means 2 match; If they match, the address designated by the read address designating means 4 is stored in the address storage means 3, and if they do not match, the address designated by the read address designation means 4 is changed.

〔作   用〕[For production]

判別手段5は、読み出しアドレス指定手段4の指定する
アドレスのデータをデータ記憶手段1から読み出し、デ
ータ指定手段2の指定するデータと一致するかどうか判
別し、その判別結果を制御手段6に加える。制御手段6
は、判別手段5からデータ記憶手段1から読み出された
データと、データ指定手段2の指定するデータが一致し
ない旨の判別結果を入力した場合には読み出しアドレス
指定手段4にアドレス変更命令を出力し読み出しアドレ
ス指定手段4のアドレスを変更する。上記動作は、判別
手段5により、データ記憶手段lから読み出されたデー
タとデータ指定手段2の指定するデータとが一致される
と判別されるまで繰り返される。
The determining means 5 reads the data at the address designated by the read address designating means 4 from the data storage means 1, determines whether it matches the data designated by the data designating means 2, and applies the determination result to the control means 6. Control means 6
outputs an address change command to the read address specifying means 4 when the discriminating means 5 inputs a judgment result indicating that the data read from the data storage means 1 and the data specified by the data specifying means 2 do not match. Then, the address of the read address designating means 4 is changed. The above operation is repeated until the determining means 5 determines that the data read from the data storage means 1 and the data specified by the data specifying means 2 match.

また制御手段6は、判別手段5からデータ記憶手段lか
ら読み出されたデータとデータ指定手段2の指定するデ
ータとが一致する旨の判別結果を入力すると、読み出し
アドレス指定手段4の指定するアドレスをアドレス格納
手段3に格納する。
When the control means 6 receives a determination result indicating that the data read from the data storage means 1 and the data designated by the data designation means 2 match from the determination means 5, the control means 6 addresses the address designated by the read address designation means 4. is stored in the address storage means 3.

データ指定手段2の指定するデータは、例えばレコード
内の各フィールドを区切る区切り文字、または可変長デ
ータの終了コードであってもよく、CPUによりデータ
指定手段2にデリミタを、読み出しアドレス指定手段4
にデータ記憶手段l内に格納されたレコードの先頭アド
レスを、アドレス格納手段3に前記レコード内のデリミ
タのアドレスを格納するアドレスをセントすれば、レコ
ード内のデリミタの検索が高速に行われ、デリミタが検
出されると前記アドレス格納手段3にレコード内のデリ
ミタのアドレスが自動的にセットされる。
The data specified by the data specifying means 2 may be, for example, a delimiter that separates each field in a record, or an end code of variable length data, and the CPU sets the delimiter to the data specifying means 2 and the read address specifying means 4.
If the start address of the record stored in the data storage means 1 is stored in the address storage means 3, and the address for storing the address of the delimiter in the record is stored in the address storage means 3, the delimiter in the record can be searched at high speed, and the delimiter can be searched at high speed. When detected, the address of the delimiter in the record is automatically set in the address storage means 3.

〔実  施  例〕〔Example〕

以下、図面を参照しながら本発明の実施例について説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

第2図は、本発明の一実施例であるデリミタ検出装置1
2を適用したコンピュータのシステム構成図である。同
図において、CPUI 1は、デリミタ検出装置I2、
メモリエ3、FDC(フロンビイディスク・コントロー
ラ’)14、CRTC(CRTコントローラ)16、キ
ーボード・コントローラ18とアドレスバスA1データ
バスD1コントロールバスCで接続されている。メモリ
13は、ROM (リード・オンリ・メモリ)及びRA
M (ランダム・アクセス・メモリ)から成る主記憶装
置であり、オペレーティング・システム(O3)やアプ
リケーション・プログラムが格納されている。CPUI
 1はキーボード19からキーボード・コントーラ18
を介して入力されるコマンドデータを解読し、そのコマ
ンドに対応するアプリケーション・プログラムをメモリ
13から読み出し実行する。フロッピィディスク15内
には、複数のファイルのデータが記憶されており、CP
UIIはフロッピィディスク・コントローラ18に入出
力命令を出力し、フロンビイディスク・コントローラ1
4を介しフロッピィディスク15内のファイルのデータ
をメモリ13に読み出したり、メモリ13内のデータを
フロッピィディスク15内のファイルに書き込む、また
、CPU11はCRTコントローラ16に表示命令を出
力し、メモリ13内に格納されている表示データをCR
Tコントローラ16を介し、CRT (Cath−od
e Ray Tube)  17に表示させる。さらに
、キーボード19からユーザーがデータ入力を行うと、
キーボード・コントローラ18を介しキー人力データが
メモリ13内の所定の領域に格納される。
FIG. 2 shows a delimiter detection device 1 which is an embodiment of the present invention.
2 is a system configuration diagram of a computer to which 2 is applied. In the figure, CPU 1 includes delimiter detection device I2,
It is connected to a memory area 3, an FDC (Frombi disk controller) 14, a CRTC (CRT controller) 16, and a keyboard controller 18 via an address bus A1, a data bus D1, and a control bus C. The memory 13 includes ROM (read only memory) and RA
It is a main storage device consisting of M (random access memory), and stores an operating system (O3) and application programs. C.P.U.I.
1 is from keyboard 19 to keyboard controller 18
It decodes the command data inputted via the memory 13, reads out the application program corresponding to the command from the memory 13, and executes it. The floppy disk 15 stores data of a plurality of files.
The UII outputs input/output commands to the floppy disk controller 18, and the UII outputs input/output instructions to the floppy disk controller 18.
4, the CPU 11 reads the data of the file in the floppy disk 15 to the memory 13, writes the data in the memory 13 to the file in the floppy disk 15, and outputs a display command to the CRT controller 16. CR the display data stored in
CRT (Cath-od) via T controller 16.
e Ray Tube) 17. Furthermore, when the user inputs data from the keyboard 19,
Key manual data is stored in a predetermined area in the memory 13 via the keyboard controller 18 .

CPUIIは、メモリ13内に格納されたキー人力デー
タを読み出し、そのキー人力データを編集する等の処理
を行う。
The CPU II reads key manual data stored in the memory 13 and performs processing such as editing the key manual data.

さらに、本発明の一実施例であるデリミタ検出装置12
は、CPUI 1から入力する制御命令により起動され
、メモリ13のCPUIIの指定するアドレス以降に格
納されたデータを順次検索し指定したデリミタを検出す
る装置である。デリミタ検出装置12は、ユーザがプロ
グラミングした制御命令により動作する装置であり、ユ
ーザが、検出したデリミタのアドレスを格納するアドレ
ス、デリミタを検出するソースデータの先頭アドレス及
びデリミタを指定する命令を行ってデリミタ検出装W1
2の動作開始のための制御命令を行うことにより動作す
る。CPUI 1は、デリミタ検出装置12に検出した
デリミタのアドレスを格納するアドレス、デリミタを検
出するソースデータの先頭アドレス、及び指定デリミタ
をセットした後、デリミタ検出装置12にデリミタ検出
要求信号を出力しアドレスA、データバスD、コントロ
ールバスCを解放する。デリミタ検出装置12は、上記
デリミタ検出要求信号を入力するとメモリ13内の前記
ソースデータの先頭アドレスからデータを順次読み出し
、デリミタの検出を行う。そして、デリミタを検出する
と、指定された前記格納アドレスにデリミタの格納され
たアドレスをセットする。そして、アドレスバスA、デ
ータバスD1コントロールバスCを解放し、CPUII
にデリミタ検出終了信号を出力する。
Further, a delimiter detection device 12 which is an embodiment of the present invention
is a device that is activated by a control command input from the CPU 1 and sequentially searches data stored after the address specified by the CPU 13 in the memory 13 to detect a specified delimiter. The delimiter detection device 12 is a device that operates according to control instructions programmed by the user, and when the user issues an instruction to specify the address for storing the address of the detected delimiter, the start address of the source data to detect the delimiter, and the delimiter. Delimiter detection device W1
It operates by issuing a control command for starting the operation in step 2. After setting the address for storing the address of the delimiter detected in the delimiter detection device 12, the start address of the source data for which the delimiter is to be detected, and the specified delimiter, the CPU 1 outputs a delimiter detection request signal to the delimiter detection device 12 and outputs the address. A, data bus D, and control bus C are released. When the delimiter detection request signal is input, the delimiter detection device 12 sequentially reads data from the first address of the source data in the memory 13 and detects a delimiter. When a delimiter is detected, the address where the delimiter is stored is set to the designated storage address. Then, address bus A, data bus D1, and control bus C are released, and CPU II
Outputs the delimiter detection end signal.

第3図は、前記デリミタ検出装置12の詳しい回路構成
を示すブロック図である。R側アドレスカウンタ21は
、データバスD、双方向性バスバ・7フア22を介し入
力されるCPUI 1の出力するアドレスデータを初期
値としてセットするカウンタであり、制御回路23から
カウント信号すが加わる毎に記憶しているアドレスデー
タaddRを1ずつ増加する。また、W側アドレスカウ
ンタ24は、データバスD、双方向性パスバッファ22
を介し入力されるCPUI 1の出力するアドレスデー
タを初期値としてセットするカウンタであり、制御回路
23からカウント信号Cが加わる毎に、記憶しているア
ドレスデータaddWを1づつ増加する。R側アドレス
カウンタ21及びW側アドレスカウンタ24の出力する
アドレスデータa d d Rsアドレスデータadd
Wはマルチプレクサ25に入力しており、マルチプレク
サ25は制御回路23から加わるセレクト信号dにより
、前記アドレスデータaddR,addWのいずれかを
選択しアドレスバス14に出力する。また、制御回路2
3からセレクト信号dがトライ・ステート・バッファ2
6に加わると、トライ・ステート・バッファ26のゲー
トが開きR側アドレスカウンタ21の出力するアドレス
データaddRが双方向性パスバッファ22に加わる。
FIG. 3 is a block diagram showing a detailed circuit configuration of the delimiter detection device 12. The R-side address counter 21 is a counter that sets as an initial value the address data output from the CPUI 1 that is input via the data bus D and the bidirectional bus bar 22, and receives a count signal from the control circuit 23. The stored address data addR is increased by 1 each time. Further, the W side address counter 24 is connected to the data bus D, the bidirectional path buffer 22
This is a counter that sets as an initial value the address data output from the CPU 1 that is input via the control circuit 23, and increases the stored address data addW by 1 each time the count signal C is applied from the control circuit 23. Address data a d d Rs address data add output from the R side address counter 21 and the W side address counter 24
W is input to a multiplexer 25, and the multiplexer 25 selects either of the address data addR or addW in response to a select signal d applied from the control circuit 23 and outputs it to the address bus 14. In addition, the control circuit 2
3 to select signal d from tri-state buffer 2
6, the gate of the tri-state buffer 26 opens and the address data addR output from the R-side address counter 21 is added to the bidirectional path buffer 22.

次に、双方向性パスバッファ22にはセレクト信号eが
加わり前記アドレスデータaddRがデータバスDに出
力される。
Next, a select signal e is applied to the bidirectional path buffer 22, and the address data addR is output to the data bus D.

デリミタ指定レジスタ27は、データバスD、双方向性
パスバッファ22を介し入力されるCPU1lの出力す
るデリミタデータDDを格納するレジスタであり、格納
しているデリミタデータDDを比較回路29に加える。
The delimiter designation register 27 is a register that stores the delimiter data DD output from the CPU 11 that is input via the data bus D and the bidirectional path buffer 22, and adds the stored delimiter data DD to the comparison circuit 29.

さらに、リード・バッファレジスタ28は、データバス
D、双方向性パスバッファ22を介し入力されるメモリ
13から読み出されたデータRDを保持するレジスタで
あり、リード・バッファレジスタ28の保持するデータ
RDは比較回路29に加わる。比較回路29は、デリミ
タ指定レジスタ27から入力するデリミタデータDDと
リード・バッファレジスタ28から入力するデータRD
とを比較して、一致するかどうか判別する回路であり、
一致した場合には、一致信号a0を、また−敗しない場
合には不−敗信号a、を制御回路23に加える。
Further, the read buffer register 28 is a register that holds the data RD read from the memory 13 input via the data bus D and the bidirectional path buffer 22, and the read buffer register 28 holds the data RD held by the read buffer register 28. is added to the comparison circuit 29. The comparison circuit 29 compares delimiter data DD input from the delimiter designation register 27 and data RD input from the read buffer register 28.
This is a circuit that compares and determines whether they match.
If they match, a match signal a0 is applied to the control circuit 23, and if there is no loss, a non-defeat signal a is applied to the control circuit 23.

制御回路23は、一致信号a0が加わるとマルチプレク
サ25、及びトライ・ステート・バッファ26にセレク
ト信号dを双方向性バスバ・7フア22にセレクト信号
eを加える。そして、アドレスデータaddWの亭旨定
するメモリ13のアドレスに、アドレスデータaddR
の書き込みが終了すると、制御回路23はカウント信号
CをW側アドレスカウンタ24に加え、、W側アドレス
カウンタ24をカウントさせアドレスデータaddWを
1増加させる。セレクト信号dがマルチプレクサ25に
加わることにより、W側アドレスカウンタ24の記憶す
るアドレスデータaddWが、マルチプレクサ25によ
り選択されアドレスバスAに出力され、セレクト信号d
がトライ・ステート・バッファ26にセレクト信号eが
双方向性パスバッファ22に加わることによりR側アド
レスカウンタ21の記憶するアドレスデータaddRが
、トライ・ステート・バッファ26、双方向性パスバッ
ファ22を介しデータバスDに出力される。
When the match signal a0 is added, the control circuit 23 applies a select signal d to the multiplexer 25 and the tri-state buffer 26, and a select signal e to the bidirectional bus bar 7 buffer 22. Then, the address data addR is added to the address of the memory 13 specified by the address data addW.
When writing is completed, the control circuit 23 applies the count signal C to the W-side address counter 24, causes the W-side address counter 24 to count, and increases the address data addW by 1. By applying the select signal d to the multiplexer 25, the address data addW stored in the W-side address counter 24 is selected by the multiplexer 25 and output to the address bus A, and the select signal d
When the select signal e is applied to the tri-state buffer 26 and the bidirectional path buffer 22, the address data addR stored in the R side address counter 21 is transferred via the tri-state buffer 26 and the bidirectional path buffer 22. It is output to data bus D.

そして、CPU11の制御によりアドレスデータadd
Wの指定するメモリ13のアドレスに、アドレスデータ
addRの書き込みが終了すると、制御回路23はカウ
ント信号CをW側アドレスカウンタ24に加え、W側ア
ドレスカウンタ24をカウントさせアドレスデータad
dWを1増加させる。また、制御回路23は前記データ
RDと前記デリミタデータDDが一致しない場合にはカ
ウント信号すをR側アドレスカウンタ21に加え、R側
アドレスカウンタ21をカウントさせアドレスデータa
ddRを1増加させる。
Then, under the control of the CPU 11, the address data add
When writing of the address data addR to the address of the memory 13 specified by W is completed, the control circuit 23 applies a count signal C to the W side address counter 24 to cause the W side address counter 24 to count.
Increase dW by 1. Further, if the data RD and the delimiter data DD do not match, the control circuit 23 applies a count signal S to the R side address counter 21 to cause the R side address counter 21 to count the address data a.
Increase ddR by 1.

次に、以上のように構成されたデリミタ検出装置12の
動作について説明する。デリミタ検出装置f12は、ユ
ーザーがプログラムによりデリミタの指定、メモリ内の
デリミタを含む検索するデータの先頭アドレス(リード
アドレス)及びその検索データに含まれるデリミタのア
ドレスを格納するテーブルの先頭アドレス(ライトアド
レス)を指定し、さらにデリミタ検索命令を行うことに
より実行される。
Next, the operation of the delimiter detection device 12 configured as above will be explained. The delimiter detection device f12 allows the user to specify a delimiter through a program, the start address (read address) of data to be searched including the delimiter in memory, and the start address (write address) of a table that stores the address of the delimiter included in the search data. ) and then execute a delimiter search command.

すなわち、アプリケーション・プログラムの実行時に、
CPUIIが前記デリミタ検索命令を読み出すと、CP
UIIはデータバスDにデリミタ格納テーブルの先頭ア
ドレス(ライトアドレス)を出力し、デリミタ検出装W
12の制御回路23にデータ書込み要求信号(不図示)
を出力する。
That is, when an application program is executed,
When the CPU II reads the delimiter search command, the CPU
The UII outputs the start address (write address) of the delimiter storage table to the data bus D, and the delimiter detection device W
A data write request signal (not shown) is sent to the control circuit 23 of 12.
Output.

制御回路23は、データ書込み要求信号が加わると、双
方向性パスバッファ22にセレクト信号eを加え、デー
タバスDからデリミタ格納テーブルの先頭アドレスを入
力し、W側アドレスカウンタ24にセットする。
When the data write request signal is applied, the control circuit 23 applies a select signal e to the bidirectional path buffer 22, inputs the start address of the delimiter storage table from the data bus D, and sets it in the W side address counter 24.

次にCPUIIは、データバスDにデリミタの検索を行
うデータの先頭アドレスを出力し再びデータ書込み要求
信号をデリミタ検出装置12の制御回路23に出力する
。制御回路23は、データ書込み要求信号が加わると、
前述と同様に、セレクト信号eを双方向性パスバッファ
22に加えデータバスDから前記先頭アドレスを入力し
、R側アドレスカウンタ21にセントする。次に、CP
U1lはデータバスDに指定デリミタを出力し、再びデ
リミタ検出装置12の制御回路23にデータ書込み要求
信号を出力する。制御回路23は、データ書込み要求信
号を入力すると、セレクト信号eを双方向性パスバッフ
ァ22に加えデータバスDから指定デリミタを入力し、
デリミタ指定レジスタ27にセットする。さらに、CP
UI 1はデリミタ検出装置12の制御回路23にデリ
ミタ検出要求信号を出力し、データバスD、アドレスバ
スA1コントロールバスCを解放し自ら停止する。制御
回路23は、デリミタ検出要求信号を入力すると、以下
の動作のための制御を行う。
Next, the CPU II outputs the start address of the data for which the delimiter is to be searched to the data bus D, and again outputs a data write request signal to the control circuit 23 of the delimiter detection device 12. When the control circuit 23 receives the data write request signal,
In the same way as described above, the select signal e is added to the bidirectional path buffer 22, the start address is input from the data bus D, and the data is sent to the R side address counter 21. Next, C.P.
U1l outputs the designated delimiter to the data bus D, and again outputs a data write request signal to the control circuit 23 of the delimiter detection device 12. When the control circuit 23 receives the data write request signal, it adds the select signal e to the bidirectional path buffer 22 and inputs the specified delimiter from the data bus D.
Set in the delimiter specification register 27. Furthermore, C.P.
The UI 1 outputs a delimiter detection request signal to the control circuit 23 of the delimiter detection device 12, releases the data bus D, address bus A1, and control bus C, and stops itself. When the control circuit 23 receives the delimiter detection request signal, it controls the following operations.

■ セレクト信号dをマルチプレクサ25に加え、マル
チプレクサ25によりR側アドレスカウンタ21にセッ
トされたアドレスデータaddRを選択しアドレスバス
Aに出力する。
(2) Add the select signal d to the multiplexer 25, and the multiplexer 25 selects the address data addR set in the R side address counter 21 and outputs it to the address bus A.

■ 次に、制御回路23はメモリ13にデータの読み出
しのための制御信号を出力し、メモリ13のアドレスa
ddRに格納されたデータをデータバスD上に読み出す
■ Next, the control circuit 23 outputs a control signal for reading data to the memory 13, and the address a of the memory 13 is
The data stored in ddR is read onto data bus D.

■ そして、双方向性パスバッファ22に制御信号eを
加え、データバスD上のメモリ13から読み出されたデ
ータをリードバッファレジスタ28にセットする。
(2) Then, a control signal e is applied to the bidirectional path buffer 22, and the data read from the memory 13 on the data bus D is set in the read buffer register 28.

■ リードバッファレジスタ28にデータがセットされ
ると、比較回路29はそのデータをデリミタ指定レジス
タ27にセットされた指定デリミタと比較する。
(2) When data is set in the read buffer register 28, the comparison circuit 29 compares the data with the designated delimiter set in the delimiter designation register 27.

■ そして、比較の結果リードバッファレジスタ28に
セットされたデータがデリミタ指定レジスタ27にセッ
トされた指定デリミタと一致しない場合には、比較回路
29は制御回路23に不一致信号a、を加える。
(2) As a result of the comparison, if the data set in the read buffer register 28 does not match the designated delimiter set in the delimiter designation register 27, the comparison circuit 29 applies a mismatch signal a to the control circuit 23.

■ 制御回路23は、不一致信号a1が加わると、カウ
ント信号すをR側アドレスカウンタ21に加え、R側ア
ドレスカウンタ21をカウントさせアドレスデータad
dRを1増加する。
■ When the mismatch signal a1 is added, the control circuit 23 applies a count signal S to the R-side address counter 21, causing the R-side address counter 21 to count.
Increase dR by 1.

上記■〜■の動作は、比較回路29によりり一ドバソフ
ァレジスタ28に読み出されたデータとデリミタ指定レ
ジスタ27に格納された指定デリミタとが一致されると
判別されるまで繰り返される。一方、上記■の動作で比
較回路29は、リードバッファレジスタ28に読み出さ
れたデータとデリミタ指定レジスタ27に格納された指
定デリミタとが一致すると、一致信号a0を制御回路2
3に加える。一致信号a0が加わると、制御回路23は
セレクト信号dをマルチプレクサ25及びトライ・ステ
ート・バッファ26に加え、マルチプレクサ25により
W側アドレスカウンタ24に格納されたアドレスデータ
addWを選択し、アドレスバスAに出力させ、さらに
、トライ・ステート・バッファ26を介しR側アドレス
カウンタ21に格納されたアドレスデータのaddRを
双方向性パスバッファ22に加える。
The above operations ① to ② are repeated until it is determined by the comparison circuit 29 that the data read into the one-domain sofa register 28 and the designated delimiter stored in the delimiter designation register 27 match. On the other hand, when the data read into the read buffer register 28 and the designated delimiter stored in the delimiter designation register 27 match in the operation (2) above, the comparison circuit 29 sends a match signal a0 to the control circuit 29.
Add to 3. When the match signal a0 is applied, the control circuit 23 applies the select signal d to the multiplexer 25 and the tri-state buffer 26, selects the address data addW stored in the W side address counter 24 by the multiplexer 25, and transfers it to the address bus A. Further, addR of the address data stored in the R side address counter 21 is added to the bidirectional path buffer 22 via the tri-state buffer 26.

次に、制御回路23は、双方向性パスバッファ22にセ
レクト信号eを加え、双方向性パスバッファ22を介し
データバスDにアドレスデータaddRを出力する。さ
らに制御回路23はメモリ13にデータ書込みのための
制御信号(不図示)を出力し、アドレスバスA上に出力
されたアドレスのaddWの指定するメモリ13の領域
に、データバスD上に出力されているアドレスデータa
ddRを書込む。メモリ13にアドレスデータaddR
を書き込んだ後、制御回路23はカウント信号CをW側
アドレスカウンタ24に加え、そのカウント信号Cによ
りW側アドレスカウンタ24はカウントを行い、アドレ
スデータaddWを1増加させる。
Next, the control circuit 23 applies the select signal e to the bidirectional path buffer 22 and outputs the address data addR to the data bus D via the bidirectional path buffer 22. Furthermore, the control circuit 23 outputs a control signal (not shown) for writing data to the memory 13, and outputs the data onto the data bus D to the area of the memory 13 specified by the address addW output onto the address bus A. address data a
Write ddR. Address data addR to memory 13
After writing, the control circuit 23 applies a count signal C to the W-side address counter 24, and the W-side address counter 24 performs counting based on the count signal C, and increases the address data addW by 1.

以上の動作が終了すると、制御回路23はCPU1lに
対しデリミタ検出終了信号(不図示)を出力しデリミタ
検出装置12はアドレスバスA、データバスDを解放し
動作を停止する。
When the above operations are completed, the control circuit 23 outputs a delimiter detection end signal (not shown) to the CPU 1l, and the delimiter detection device 12 releases the address bus A and data bus D and stops its operation.

このように、本実施例によれば、データ内のデリミタ検
索をハードウェアにより高速に行うことができる。また
、フロッピーディスク内のファイルに対しレコード修正
等を行う場合、メモリ13上にルコードを読み出した後
、フィールドの区切りコードを指定デリミタとしてデリ
ミタ検索命令を行うようにすれば、高速にルコードをフ
ィールド単位に分割することができる。
In this way, according to this embodiment, delimiter searches within data can be performed at high speed using hardware. In addition, when modifying a record of a file on a floppy disk, after reading the code into the memory 13, you can perform a delimiter search command using the field delimiter code as the specified delimiter, and then the code can be quickly read in field units. It can be divided into.

第4図(al、(b)にその具体例を示す。第4図(a
lは、メモリ13内に読み出された24バイトの可変長
レコード40の内容であり、各フィールドは区切り文字
“、”によって区切られている。また、その可変長レコ
ードの先頭アドレスはaddXとなっている。
A specific example is shown in Fig. 4 (al, (b)). Fig. 4 (a
l is the content of the 24-byte variable length record 40 read into the memory 13, and each field is separated by a delimiter ",". Further, the start address of the variable length record is addX.

そして、上記可変長レコード40内の区切り文字(デリ
ミタ)のアドレスを第4図(blに示す先頭アドレスが
addYである格納テーブル41に格納する場合、ライ
トアドレスにaddYを、リードアドレスにaddXを
、指定デリミタに“を指定して、デリミタ検索命令を実
行すると、デリミタ検出装置12によりアドレスadd
Yにレコード40内の第1フィールド40−1の区切り
文字(デリミタ)のアドレスadd 1がセントされる
。デリミタ検出装置12では、ライトアドレスaddW
を自動的に+1しているので、次にリードアドレスad
dRのみを、検出されたデリミタの次のアドレスである
(add1+1)として再びデリミタ検索命令を実行す
ることにより、デリミタ検出装置12によって格納テー
ブル41のアドレス(a d dW+ 1)に第2フイ
ールド402の区切り文字(デリミタ)のアドレスad
d2が格納される。以後、同様にして第4フィールド4
0−4の区切り文字(デリミタ)の検出まで終了した場
合、格納テーブル41には第4図(b)に示すように第
1フィールド40−1〜第4フィールド40−4までの
区切り文字(デリミタ)のアドレスaddl〜add4
が格納される。
When storing the address of the delimiter in the variable length record 40 in the storage table 41 whose first address is addY as shown in FIG. When the delimiter search command is executed with " specified as the specified delimiter, the delimiter detection device 12 detects the address add
The address add 1 of the delimiter of the first field 40-1 in the record 40 is placed in Y. In the delimiter detection device 12, the write address addW
Since it automatically increments +1, next read address ad
By executing the delimiter search command again with only dR as the next address of the detected delimiter (add1+1), the delimiter detection device 12 sets the second field 402 to the address (a dd dW+1) of the storage table 41. Delimiter address ad
d2 is stored. Thereafter, in the same manner, the fourth field 4
When the detection of delimiters 0-4 is complete, the storage table 41 contains delimiters (delimiters) from the first field 40-1 to the fourth field 40-4, as shown in FIG. 4(b). ) addresses addl to add4
is stored.

また、デリミタ検出装置12にデリミタ検出回数指定レ
ジスタを設け、CPU11によりそのデリミタ検出回数
指定レジスタにデリミタの検出回数をセントし、デリミ
タ検出回数レジスタにセントされた回数だけデリミタが
検出されるまで、デリミタキ食出装置12を動作させる
ようにすることも可能である。デリミタ検出回数レジス
タを設けた場合、デリミタ検出装置12を1回起動させ
るだけで、ルコード内の全てのフィールドの区切り文字
(デリミタ)のアドレスを検出できるようになり、処理
速度は更に向上する。
Further, the delimiter detection device 12 is provided with a delimiter detection number designation register, and the CPU 11 sets the number of delimiter detections in the delimiter detection number designation register. It is also possible to operate the eating device 12. When a delimiter detection count register is provided, the addresses of delimiters (delimiters) of all fields in the code can be detected by activating the delimiter detection device 12 once, and the processing speed is further improved.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、本発明によれば、指定した
データのアドレスを指定したアドレスに格納する処理を
高速に行えるので、以下のような効果が生じる。
As described above in detail, according to the present invention, the process of storing specified data at a specified address can be performed at high speed, so that the following effects are produced.

a、可変長レコードのフィールドデータの取り出しを高
速に行えるので、可変長レコードファイルの処理速度が
向上する。
a. Since field data of variable-length records can be retrieved at high speed, the processing speed of variable-length record files is improved.

b、可変長データの終了コードの検索を高速に行えるの
で、可変長のBCD等の数値データを用いた数値演算の
処理速度が向上する。
b. Since the end code of variable length data can be searched at high speed, the processing speed of numerical calculations using numerical data such as variable length BCD is improved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明のブロック図、 第2図は、本発明の一実施例を適用したシステム構成図
、 第3図は、本発明の一実施例のデリミタ検出装置の回路
構成を示すブロック図、 第4図(a)、(blは、上記デリミタ検出装置の動作
を説明する図である。 1・・・データ記憶手段、 2・・・データ指定手段、 3・・・アドレス格納手段、 4・・・読み出しアドレス措定手段、 5・・・判別手段、 ・制御手段。
FIG. 1 is a block diagram of the present invention. FIG. 2 is a system configuration diagram to which an embodiment of the present invention is applied. FIG. 3 is a block diagram showing the circuit configuration of a delimiter detection device according to an embodiment of the present invention. Figures 4(a) and 4(bl) are diagrams for explaining the operation of the delimiter detection device. 1... Data storage means, 2... Data designation means, 3... Address storage means, 4... Read address setting means, 5... Discrimination means, - Control means.

Claims (1)

【特許請求の範囲】 複数のデータを記憶するデータ記憶手段と、検出すべき
データを指定するデータ指定手段と、該データ指定手段
の指定するデータが格納された前記データ記憶手段のア
ドレスを格納するアドレス格納手段と、 前記データ記憶手段から読み出すデータのアドレスを指
定する読み出しアドレス指定手段と、該読み出しアドレ
ス指定手段の指定するアドレスのデータを前記データ記
憶手段から読み出して、そのデータと前記データ指定手
段の指定するデータとが一致するかどうかを判別する判
別手段と、該判別手段により前記データ記憶手段から読
み出されたデータと前記データ指定手段の指定するデー
タとが一致した時には、前記読み出しアドレス指定手段
の指定するアドレスを前記アドレス格納手段に格納し、
一致しない場合には前記読み出しアドレス指定手段の指
定するアドレスを変更する制御手段とを有することを特
徴とするデータ検出装置。
[Scope of Claims] Data storage means for storing a plurality of data, data designation means for designating data to be detected, and an address of the data storage means in which the data designated by the data designation means is stored. address storage means; read address designation means for specifying an address of data to be read from the data storage means; and data at an address designated by the read address designation means is read from the data storage means, and the data and the data designation means are read from the data storage means. and when the data read from the data storage means by the determining means match the data specified by the data specifying means, the read address is specified. storing an address designated by the means in the address storage means;
A data detection device comprising: control means for changing the address designated by the read address designation means if the data do not match.
JP17511188A 1988-07-15 1988-07-15 Data detector Pending JPH0225922A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP17511188A JPH0225922A (en) 1988-07-15 1988-07-15 Data detector
KR1019890008774A KR0152979B1 (en) 1988-07-15 1989-06-24 Variable length data processing apparatus
US07/375,386 US5115490A (en) 1988-07-15 1989-07-03 Variable length data processing apparatus with delimiter location-based address table
CA000604840A CA1324684C (en) 1988-07-15 1989-07-05 Variable length data processing apparatus
EP89112869A EP0350929B1 (en) 1988-07-15 1989-07-13 Variable length data processing apparatus
DE68924377T DE68924377T2 (en) 1988-07-15 1989-07-13 Processing systems for variable data lengths.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17511188A JPH0225922A (en) 1988-07-15 1988-07-15 Data detector

Publications (1)

Publication Number Publication Date
JPH0225922A true JPH0225922A (en) 1990-01-29

Family

ID=15990461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17511188A Pending JPH0225922A (en) 1988-07-15 1988-07-15 Data detector

Country Status (1)

Country Link
JP (1) JPH0225922A (en)

Similar Documents

Publication Publication Date Title
JPS5846742B2 (en) Interactive data search device
US3510847A (en) Address manipulation circuitry for a digital computer
JPH0225922A (en) Data detector
JPS58189750A (en) Memory device
JPS6145485A (en) Magnetic bubble memory control device
JPS6391756A (en) Partial write instruction processing system for storage device
JPS6214919B2 (en)
JPS6211426B2 (en)
JPH0716189Y2 (en) Break circuit
JPH03147036A (en) Variable length data processor
JPS61199126A (en) Microprogram check system
JPH01114962A (en) Direct memory access controller
JPH01263819A (en) Integrated circuit
JPS6211746B2 (en)
JPH0399343A (en) Additional record control processing system
JPH0578052B2 (en)
JPS5829046A (en) Memory sorting system
JPH02310746A (en) Memory access wait control circuit
JPS62184561A (en) Input/output buffer controller
JPS6036614B2 (en) information processing equipment
JPH02157934A (en) Variable length data processor
JPH0567148A (en) Record read-in control system
JPH0313605B2 (en)
JPH02178836A (en) Central arithmetic processing unit
JPS5852248B2 (en) Read data length extraction method