JPS61267825A - Retrieving system for character string - Google Patents

Retrieving system for character string

Info

Publication number
JPS61267825A
JPS61267825A JP60101978A JP10197885A JPS61267825A JP S61267825 A JPS61267825 A JP S61267825A JP 60101978 A JP60101978 A JP 60101978A JP 10197885 A JP10197885 A JP 10197885A JP S61267825 A JPS61267825 A JP S61267825A
Authority
JP
Japan
Prior art keywords
character string
data
external storage
storage device
circuit
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
JP60101978A
Other languages
Japanese (ja)
Inventor
Takenosuke Harada
原田 武之助
Hisashi Tanido
谷戸 久
Hiroshi Maruoka
寛 丸岡
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.)
Panafacom Ltd
Original Assignee
Panafacom 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 Panafacom Ltd filed Critical Panafacom Ltd
Priority to JP60101978A priority Critical patent/JPS61267825A/en
Publication of JPS61267825A publication Critical patent/JPS61267825A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To retrieve data with high efficiency by monitoring the data flowing on a data bus in terms of hardware when the data on an external storage device are transferred to a main storage by a DMA method. CONSTITUTION:A central processing unit 5 writes a desired character string to a latch circuit in a character string retrieving circuit 8. A direct memory access controller DMAC4 receives a DMA request signal DRQ from the external storage device and sends a halt request HRQ to the unit 5. Then the DMAC4 sends an answer signal DACK to the external storage service when an answer signal HLDA is sent back and starts the DMA transfer. Then the circuit 8 compares the character string read out of the external storage device with the character string designated by the unit 5 through a comparator. Then the coincidence if obtained between both character strings is reported to the unit 5 with interruption.

Description

【発明の詳細な説明】 〔概要〕 外部記憶装置上に記録されたデータの中から検索したい
文字列をDMA転送中に検出できるようにコンパレータ
やレジスタ、フリップ・フロップを用いた文字列検索回
路を設け、検索速度を向上させた文字列検索方式である
[Detailed Description of the Invention] [Summary] A character string search circuit using comparators, registers, and flip-flops is provided to detect a desired character string from data recorded on an external storage device during DMA transfer. This is a character string search method that improves search speed.

〔産業上の利用分野〕[Industrial application field]

本発明は、文字列検索回路の中に所望の文字列をセット
し、データバス上を流れる文字列が所望の文字列である
か否かを文字列検索回路により調べる文字列検索方式に
関するものである。
The present invention relates to a character string search method in which a desired character string is set in a character string search circuit and the character string search circuit checks whether or not a character string flowing on a data bus is the desired character string. be.

〔従来技術と問題点〕[Prior art and problems]

小規模な情報処理装置が普及し、個人的に使用されるデ
ータベースやワードプロセッサが広まっている。データ
ベースやワードプロセッサの特徴にキーワード検索があ
る。これはデータファイルの中から特定の文字列を探し
出すという機能である。通常、データファイルは外部記
憶装置(ハードディスク、フロッピィ・ディスク等)内
に記録されている。従来技術によればファイル中のデー
タをサーチしようとした場合、外部記憶装置()ロソピ
イ・ディスク、ハードディスク、磁気テープ装置等)か
ら成る単位(例えば256バイト)毎に読み込みを行い
、主記憶上に目的のアドレスのデータを置く。要求のあ
ったファイルの転送が全て終了した後でデータを最初か
ら逐次比較していく方法で行っている。このため特定フ
ァイルにサーチすべきデータ列があるか否かのチェック
には多大な時間を浪費するという欠点があった。
Small-scale information processing devices have become widespread, and databases and word processors for personal use have become widespread. Keyword search is a feature of databases and word processors. This is a function that searches for specific character strings within a data file. Typically, data files are recorded in an external storage device (hard disk, floppy disk, etc.). According to the conventional technology, when attempting to search for data in a file, data is read in units (e.g., 256 bytes) from an external storage device (rosopy disk, hard disk, magnetic tape device, etc.), and the data is stored in the main memory. Place the data of the desired address. This is done by sequentially comparing the data from the beginning after all requested file transfers are completed. For this reason, there is a drawback that a great deal of time is wasted in checking whether a particular file contains a data string to be searched.

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に基づくものであって、外部記憶
装置上のデータを主記憶装置上へDMA(ダイレクト・
メモリ・アクセス)手法により転送する際にデータ・バ
ス上を流れるデータをハードウェア的に監視し、これに
よりデータを効率よく検索出来る文字列検索方式を提供
することを目的としている。
The present invention is based on the above consideration, and uses DMA (direct transfer) to transfer data on an external storage device onto the main storage device.
The purpose of this invention is to provide a character string search method that can efficiently search data by monitoring data flowing on a data bus using hardware during transfer using a memory access method.

〔目的を達成するための手段〕[Means to achieve the purpose]

そしてそのため本発明の文字列検索方式は、データ・バ
ス、アドレス・バス、ダイレクト・メモリ・アクセス・
コントローラ及び外部記憶装置を持つマイクロプロセッ
サ制御の情報処理機器において、検索する文字データを
セットするレジスタ、前記レジスタのデータと前記デー
タ・バス上のデータを比較するコンパレータ及び該コン
パレータの比較結果を保持するフリップ・フロップをそ
れぞれn個持つ文字列検索回路によって、外部記憶装置
上のn語よりなる文字列をダイレクト・メモリ・アクセ
ス転送中に一致検出を可能とすることを特徴とするもの
である。
For this reason, the character string search method of the present invention uses a data bus, an address bus, a direct memory access
In a microprocessor-controlled information processing device having a controller and an external storage device, a register for setting character data to be searched, a comparator for comparing data in the register with data on the data bus, and holding the comparison results of the comparator. The present invention is characterized in that a character string search circuit having n flip-flops each makes it possible to detect a match during direct memory access transfer of a character string consisting of n words on an external storage device.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。第1図は本
発明の情報処理装置の概要を示す図である。第1図にお
いて、■は磁気テープ装置、2は磁気ディスク装置、3
はフロッピィ・ディスク装置、4はダイレクト・メモリ
・アクセス・コントローラ(以下、DMACという)、
5は中央処理装置、6はデコーダ、7はレジスタ、8は
文字列検索回路、MSは主記憶をそれぞれ示している。
Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 is a diagram showing an outline of an information processing apparatus according to the present invention. In Figure 1, ■ is a magnetic tape device, 2 is a magnetic disk device, and 3 is a magnetic tape device.
is a floppy disk device, 4 is a direct memory access controller (hereinafter referred to as DMAC),
5 is a central processing unit, 6 is a decoder, 7 is a register, 8 is a character string search circuit, and MS is a main memory.

DMAC4は、外部記憶装置側からのDMA要求DRQ
を受は取ると、ボルト(HALT)要求HRQを中央処
理装置5に送り、応答信号HLDAが返ってくると、応
答信号DACKを外部記憶装置側に送り、DMA転送を
開始する。中央処理装置5は、文字列検索回路8を動作
状態とするために所定のアドレ不や制御信号を予めアド
レス・バス及び制御線上に送出すると共に、データ・バ
ス上に所望の文字列を送出する。デコーダ6は、これら
の信号を受信すると、文字列検索回路8を初期状態にす
るための信号を送出すると共に、レジスタ7を介してイ
ネーブル信号UNABLEを送出する。
DMAC4 receives DMA request DRQ from external storage device side.
When it receives, it sends a bolt (HALT) request HRQ to the central processing unit 5, and when a response signal HLDA is returned, it sends a response signal DACK to the external storage device side and starts DMA transfer. The central processing unit 5 sends a predetermined address and control signal onto the address bus and control line in advance to put the character string search circuit 8 into operation, and also sends a desired character string onto the data bus. . When decoder 6 receives these signals, it sends out a signal for putting character string search circuit 8 into an initial state, and also sends out enable signal UNABLE via register 7.

文字列検索回路8は、外部記憶装置から読み出された文
字列と中央処理装置によって指定された文字列とを比較
し、両者が一致する場合にはその旨を割込みで以て中央
処理装置5に報告する。なお、Asはアドレス・ストロ
ーブ信号、DSはデータ・ストローブ信号、R/Wは読
み/書き指示信号をそれぞれ示している。
The character string search circuit 8 compares the character string read from the external storage device with the character string designated by the central processing unit, and if the two match, the character string search circuit 8 notifies the central processing unit 5 of this with an interrupt. Report to. Note that As represents an address strobe signal, DS represents a data strobe signal, and R/W represents a read/write instruction signal.

第2図は第1図の文字列検索回路の1実施例のブロック
図である。第2図において、9−1ないし9−nはコン
パレータ、10−1ないし10−nはラッチ、11−1
ないし11−nはフリップ・フリップ、12はアドレス
・ラッチ、13はゲート、14は割込みラッチ、15と
16はAND回路、17−1ないし17−nはOR回路
、18−2ないし18−nはAND回路、19ないし2
1はインバータ回路をそれぞれ示している。文字列検索
回路8は、コンパレータ9−1ないし9−n1ラッチ1
0−1ないし10−n、フリップ・フロップ11−1な
いし11− n sアドレス・ラッチ12、割込みラッ
チ14等から構成されている。中央処理装置5は検索し
たい文字列(1文字8ビツトとして最大n文字)を文字
列検索回路8内のラッチ10−1ないし10−nへ書き
込む。この文字列はラッチ10−1ないし10−nに記
憶される。このとき同時にn個のフリップ・フロップ1
1−1ないし11−nは全てリセットされる。次に検索
を許すためのレジスタ7をセットする。この後は通常の
データ転送シーケンスを開始する(DMAC4のレジス
タのセット、周辺装置のセットなど)。即ち、外部記憶
装置側の周辺装置からDMA要求が出るとDRQがDM
AC4に知らされる。
FIG. 2 is a block diagram of one embodiment of the character string search circuit shown in FIG. In FIG. 2, 9-1 to 9-n are comparators, 10-1 to 10-n are latches, and 11-1
to 11-n are flip flips, 12 is an address latch, 13 is a gate, 14 is an interrupt latch, 15 and 16 are AND circuits, 17-1 to 17-n are OR circuits, 18-2 to 18-n are AND circuit, 19 to 2
1 indicates an inverter circuit, respectively. The character string search circuit 8 includes comparators 9-1 to 9-n1 latch 1.
0-1 to 10-n, flip-flops 11-1 to 11-ns, an address latch 12, an interrupt latch 14, and the like. The central processing unit 5 writes a character string to be searched (maximum n characters, assuming 8 bits per character) to latches 10-1 to 10-n in the character string search circuit 8. This character string is stored in latches 10-1 to 10-n. At this time, n flip-flops 1
1-1 to 11-n are all reset. Next, register 7 is set to allow searching. After this, a normal data transfer sequence starts (setting the DMAC4 register, setting peripheral devices, etc.). That is, when a DMA request is issued from a peripheral device on the external storage device side, DRQ is
AC4 is informed.

DMAC4は中央処理装置5ヘホルト(HRQ)を出力
し、中央処理装置5がホルトしたことを示す応答信号(
HLDA)を受は取ると、このあとDMAC4はDAC
Kを出力してDMA転送を開始する。
The DMAC 4 outputs a halt (HRQ) to the central processing unit 5, and a response signal (HRQ) indicating that the central processing unit 5 has halted.
HLDA), then DMAC4 becomes DAC.
Output K and start DMA transfer.

文字列rABcJを検索する場合について文字列検索回
路8の動作を説明する。文字列検索回路8内のラッチ1
0−1ないし10−nへの書込みは[***・・・*A
BCJのn文字で行う。「*」が書き込まれると、「*
ビット・フラグ」がセットされ、如何なるデータであっ
ても「一致」と判断される。
The operation of the character string search circuit 8 will be described when searching for the character string rABcJ. Latch 1 in string search circuit 8
Writing to 0-1 to 10-n is [***...*A
Do it with the n character of BCJ. When "*" is written, "*"
A "bit flag" is set, and any data is determined to be a "match."

ラッチ1O−n−2にはr AJ 、1O−n−1には
rBJ、10−nには「C」というように記憶される。
r AJ is stored in the latch 1O-n-2, rBJ is stored in the latch 1O-n-1, and "C" is stored in the latch 10-n.

このときフリップ・フロップ11−1ないし11−nは
全てリセットされている。データ・バス上をデータが流
れ出すと、データが有効であることを示すストローブ信
号DSのサイクルでデータがラッチ情報と一致したか否
かがフリップ・フロップで監視される。
At this time, all flip-flops 11-1 to 11-n have been reset. When data flows on the data bus, a flip-flop monitors whether the data matches the latch information during the cycle of the strobe signal DS, which indicates that the data is valid.

「*ビット・フラグ」がセットされている第1番目のフ
リップ・フロップ11−1ないし第n−3番目のフリッ
プ・フロップ1l−n−3は常にセットされている状態
となる。始めてrAJを見出した時点で第n−2番目の
フリップ・フロップ1l−n−2がセットされ、引続き
rBJが転送されて来ると、第n−1番目のフリップ゛
・フロップ゛1l−n−1がセットされる。このとき第
n−2番目のフリップ・フロップ1l−n−2はリセッ
ト状態となる。即ち、フリップ・フロップはシフトレジ
スタのような動作をする。
The first flip-flop 11-1 to the (n-3)th flip-flop 1l-n-3 in which the "*bit flag" is set are always set. When rAJ is found for the first time, the n-2nd flip-flop 1l-n-2 is set, and when rBJ is subsequently transferred, the n-1th flip-flop 1l-n-1 is set. is set. At this time, the (n-2)th flip-flop 1l-n-2 enters the reset state. That is, a flip-flop operates like a shift register.

引き続いてrAJが転送されて来たとすると、第n番目
のフリップ・フロップ11−nはセットされず「不一致
」ということになる。但しrAJであるため第n−2番
目のフリップ・フロップ1l−n−2はセットされる。
If rAJ is subsequently transferred, the n-th flip-flop 11-n will not be set, resulting in a "mismatch." However, since it is rAJ, the (n-2)th flip-flop 1l-n-2 is set.

今度はrBJ、rcJと引き続いて転送されて来たとす
ると、第n番目のフリ7プ・フリップ11−nまでセッ
トされ、最終的に論理「1」信号が割込発生回路14へ
と伝えられる。このとき同時に「一致」を認めた時点の
アドレス(主記憶アドレス)がアドレスラッチ12にラ
ッチされるので、後から何処で一致が成立したのかを読
み出すことが出来る。なお、外部記憶装置から読み出さ
れたデータは全て主記憶MSに書き込まれるものとして
いる。DMAサイクル終了後に中央処理装置5は割込み
処理によりアドレス・ランチ12内のアドレス情報を読
み出し、割込み要因をクリアする。
Now, if rBJ and rcJ are transferred successively, up to the n-th flip-flop 11-n are set, and finally a logic "1" signal is transmitted to the interrupt generation circuit 14. At this time, since the address (main memory address) at the time when the "match" is recognized is latched into the address latch 12, it is possible to read out where the match was established later. It is assumed that all data read from the external storage device is written to the main memory MS. After the DMA cycle ends, the central processing unit 5 reads the address information in the address launch 12 by interrupt processing and clears the interrupt cause.

以上が第2図の文字列検索回路についての説明であるが
、データ・バスを16ビツトなどに拡張すると、一層高
速な処理が可能であり、またDMA回路を含みDMAを
行いながら一致検出を行うことも可能である。
The above is an explanation of the character string search circuit shown in Figure 2, but if the data bus is expanded to 16 bits, even faster processing is possible, and it also includes a DMA circuit to perform match detection while performing DMA. It is also possible.

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

以上の説明から明らかなように、本発明によれば、中央
処理装置に負担をかけることなく、所望の文字列の検索
を効率よく行うことができる。
As is clear from the above description, according to the present invention, it is possible to efficiently search for a desired character string without placing a burden on the central processing unit.

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

第1図は本発明の情報処理装置の概要を示す図、第2図
は第1図の文字列検索回路の1実施例のブロック図であ
る。 1・・・磁気テープ装置、2・・・磁気ディスク装置、
3・・・フロッピィ・ディスク装置、4・・・ダイレク
ト・メモリ・アクセス・コントローラ、5・・・中央処
理装置、6・・・デコーダ、7・・・レジスタ、8・・
・文字列検索回路、MS・・・主記憶、9−1ないし9
−n・・・コンパレータ、10−1ないし10−n・・
・ラッチ、11−1ないし11−n・・・フリップ・フ
ロップ、12・・・アドレス・ラッチ、13・・・ゲー
ト、14・・・割込みラッチ、15と16・・・AND
回路、17−1ないし1l−tr・OR回路、18−2
な1i’ シ1B−n・・・AND回路、19ないし2
1・・・インバータ回路。
FIG. 1 is a diagram showing an outline of the information processing apparatus of the present invention, and FIG. 2 is a block diagram of one embodiment of the character string search circuit of FIG. 1. 1... Magnetic tape device, 2... Magnetic disk device,
3... Floppy disk device, 4... Direct memory access controller, 5... Central processing unit, 6... Decoder, 7... Register, 8...
・Character string search circuit, MS...main memory, 9-1 to 9
-n...Comparator, 10-1 to 10-n...
・Latch, 11-1 to 11-n...Flip-flop, 12...Address latch, 13...Gate, 14...Interrupt latch, 15 and 16...AND
Circuit, 17-1 to 1l-tr/OR circuit, 18-2
1i' 1B-n...AND circuit, 19 to 2
1...Inverter circuit.

Claims (1)

【特許請求の範囲】[Claims] データ・バス、アドレス・バス、ダイレクト・メモリ・
アクセス・コントローラ及び外部記憶装置を持つマイク
ロプロセッサ制御の情報処理機器において、検索する文
字データをセットするレジスタ、前記レジスタのデータ
と前記データ・バス上のデータを比較するコンパレータ
及び該コンパレータの比較結果を保持するフリップ・フ
ロップをそれぞれn個持つ文字列検索回路によって、外
部記憶装置上のn語よりなる文字列をダイレクト・メモ
リ・アクセス転送中に一致検出を可能とすることを特徴
とする文字列検索方式。
Data bus, address bus, direct memory
In a microprocessor-controlled information processing device having an access controller and an external storage device, there is provided a register for setting character data to be searched, a comparator for comparing data in the register with data on the data bus, and a comparison result of the comparator. A character string search characterized in that a character string search circuit each having n flip-flops for holding can detect a match in a character string consisting of n words on an external storage device during direct memory access transfer. method.
JP60101978A 1985-05-13 1985-05-13 Retrieving system for character string Pending JPS61267825A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60101978A JPS61267825A (en) 1985-05-13 1985-05-13 Retrieving system for character string

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60101978A JPS61267825A (en) 1985-05-13 1985-05-13 Retrieving system for character string

Publications (1)

Publication Number Publication Date
JPS61267825A true JPS61267825A (en) 1986-11-27

Family

ID=14314945

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60101978A Pending JPS61267825A (en) 1985-05-13 1985-05-13 Retrieving system for character string

Country Status (1)

Country Link
JP (1) JPS61267825A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990010912A1 (en) * 1989-03-14 1990-09-20 Kabushiki Kaisha Dainichi Data retrieval device and data editing apparatus using this device
US5319574A (en) * 1988-12-27 1994-06-07 Fujitsu Limited Status change monitoring apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5319574A (en) * 1988-12-27 1994-06-07 Fujitsu Limited Status change monitoring apparatus
WO1990010912A1 (en) * 1989-03-14 1990-09-20 Kabushiki Kaisha Dainichi Data retrieval device and data editing apparatus using this device
US5321843A (en) * 1989-03-14 1994-06-14 Kabushiki Kaisha Dainichi Information retrieval apparatus and information editing system using the same

Similar Documents

Publication Publication Date Title
JP2547424B2 (en) Digital data processing system
KR880000299B1 (en) Cash apparatus
KR920010950B1 (en) Device and method of accessing information
US6904499B2 (en) Controlling cache memory in external chipset using processor
US6173353B1 (en) Method and apparatus for dual bus memory transactions
US3611315A (en) Memory control system for controlling a buffer memory
US5136714A (en) Method and apparatus for implementing inter-processor interrupts using shared memory storage in a multi-processor computer system
JPS60124754A (en) Buffer storage control system
JPS61267825A (en) Retrieving system for character string
US6442645B1 (en) Pre-decode conditional command generation for reduced SDRAM cycle latency
JP3061106B2 (en) Bus bridge and computer system having the same
EP0501621A2 (en) Address prediction and verification for burst cycle data reads
JPS58134336A (en) Word searching device
JPS61237145A (en) Controlling system for store buffer
CA1300275C (en) Destination control logic for arithmetic and logic unit for digital data processor
JPS59218692A (en) Control system of logical buffer memory
JP3242474B2 (en) Data processing device
JPS6381557A (en) Dual port memory
JPS63103342A (en) Main memory controller
JPS6136854A (en) Memory switching device
JPS6051151B2 (en) data processing system
JPS62259158A (en) Interruption request circuit
JPH0261746A (en) Dma control system
JPS5842546B2 (en) Store control method
JPH03271859A (en) Information processor