JPH069038B2 - Direct memory access controller - Google Patents

Direct memory access controller

Info

Publication number
JPH069038B2
JPH069038B2 JP27382687A JP27382687A JPH069038B2 JP H069038 B2 JPH069038 B2 JP H069038B2 JP 27382687 A JP27382687 A JP 27382687A JP 27382687 A JP27382687 A JP 27382687A JP H069038 B2 JPH069038 B2 JP H069038B2
Authority
JP
Japan
Prior art keywords
counter
data
register
signal
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP27382687A
Other languages
Japanese (ja)
Other versions
JPH01114962A (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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP27382687A priority Critical patent/JPH069038B2/en
Publication of JPH01114962A publication Critical patent/JPH01114962A/en
Publication of JPH069038B2 publication Critical patent/JPH069038B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ミニコンピュータ,マイクロコンピュータ等
の情報処理装置で高速にデータを転送するためのダイレ
クトメモリアクセス(以後、DMAと称する)制御装置
に関し、特にテーブル形式に構造化された関係データベ
ースを高速検索する機能を持ったDMA制御装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a direct memory access (hereinafter referred to as DMA) control device for high-speed data transfer in an information processing device such as a minicomputer or a microcomputer. In particular, the present invention relates to a DMA controller having a function of searching a relational database structured in a table format at high speed.

〔従来の技術〕 第3図はテーブル形式に構造化された関係データベース
の各部の名称を説明する図である。#1、#2、……が
行数であり、行数のことをレコード数、各行のことをレ
コード、レコードの長さLをレコードサイズという。ま
た各列のことをフィールド、各フィールドの長さDをフ
ィールドサイズという。このようなデータベースでは同
図に示すようにフィールドの値を参照して、レコードの
中の特定フィールド(同図中にハッチングで表示)のデ
ータを選び出す処理、例えば社員番号、名前,年齢,住
所などのフィールドをもつ従業員レコードから年齢が3
5歳以上のものを選び出すような検索処理が必要にな
る。
[Prior Art] FIG. 3 is a diagram for explaining names of respective parts of a relational database structured in a table format. # 1, # 2, ... Are the number of lines, the number of lines is the number of records, each line is a record, and the length L of the record is the record size. Each column is called a field, and the length D of each field is called a field size. In such a database, a process of selecting data of a specific field (displayed by hatching in the figure) in the record by referring to the value of the field as shown in the figure, for example, employee number, name, age, address, etc. Age is 3 from employee records with fields
It is necessary to perform a search process to select those over the age of five.

従来は、汎用プロセッサのソフトウェアによってこのよ
うな処理を行っていた。すなわち、フィールドがポイン
タによって連結されたレコードの中の特定フィールドデ
ータをアクセスする際には、1つのフィールドデータの
Aから(A+D+1)までのアクセスが終わると、次の
レコードのフィールドアドレス(A+L)を計算し、フ
ィールドのデータを次々取り出す。内容を順に比較し、
その結果を別のアドレスに保存するといったデータベー
ス処理操作をきめ細かく実行していた。
Conventionally, such processing is performed by software of a general-purpose processor. That is, when accessing specific field data in a record in which fields are linked by pointers, when the access from one field data A to (A + D + 1) is completed, the field address (A + L) of the next record is set. Calculate and retrieve the field data one after another. Compare the contents in order,
The database processing operation such as saving the result in another address was executed finely.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

テーブル形式の構造化されたデータベースで特定のフィ
ールドの値を調べてマッチしたレコードを抽出する場
合、従来の汎用プロセッサのソフトウェアではアクセス
するフィールドアドレスをポインタを使って次々に計算
する処理と、フィールドを構成するデータを次々比較
(内容検索)する処理とを汎用ハードウェアで行なうた
め、きめ細かいプログラミングが必要で、実行に時間が
かかり、高性能にならないという問題があった。また、
データアクセスだけを高速化する手段としてすでにDM
A制御装置があったが、アドレスが連続したデータしか
アクセスできないという問題があった。またDMAの中
にデータ列の比較手段を持たないためにマッチしたレコ
ードを見つけ出すことには対応できないという問題もあ
った。
When checking the value of a specific field in a structured database in a table format and extracting the matched records, the conventional general-purpose processor software calculates the field address to be accessed one after another using a pointer, and Since the process of comparing the constituent data one after another (content retrieval) is performed by general-purpose hardware, there is a problem that detailed programming is required, execution takes time, and high performance is not achieved. Also,
DM already as a means to speed up only data access
There was an A control device, but there was the problem that only data with consecutive addresses could be accessed. Further, there is also a problem that finding out a matched record cannot be dealt with because the DMA does not have a means for comparing data strings.

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

本発明のDMA制御装置は、第1設定データが第1終了
信号に同期して設定されデータ読取り信号に同期して単
位数ずつ変化する第1計数器と、第1レジスタと、前記
第1計数器の出力値に前記第1レジスタの値を加えて第
1設定データを出力する第1加算器と、データ書込み信
号に同期して単位数ずつ変化する第2計数器と、第2レ
ジスタと、データ読取り信号を計算し前記第2レジスタ
の設定値を計数し終えると前記第1終了信号を発生し初
期状態に戻る第3計数器と、前記第1終了信号を計数し
既定値を計数し終えると第2終了信号を発生する第4計
数器と、読み取られる一連のデータ列と登録されている
データ列とを比較するデータ列比較手段と、このデータ
列比較手段の出力を選択するゲート回路と、このゲート
回路の動作を指定する第3レジスタと、DMA処理機能
を有し前記第1計数器の内容を読取りアドレスとしてデ
ータ読取り信号を出力し前記ゲート回路の出力信号発生
時に前記第2計数器の内容を書込みアドレスとしてデー
タ書込み信号を出力し前記第4計数器の内容を書込む制
御回路とで構成される。
The DMA control device of the present invention comprises: a first counter in which the first setting data is set in synchronization with a first end signal and changes by a unit number in synchronization with a data read signal; a first register; A first adder that outputs the first setting data by adding the value of the first register to the output value of the instrument, a second counter that changes by the number of units in synchronization with the data write signal, and a second register, When the data read signal is calculated and the set value of the second register is completed, the third counter that generates the first end signal and returns to the initial state, and the first end signal is counted and the preset value is completed. And a fourth counter for generating a second end signal, data string comparing means for comparing a series of data strings to be read with registered data strings, and a gate circuit for selecting the output of the data string comparing means. Specify the operation of this gate circuit A third register having a DMA processing function and a data read signal with the content of the first counter as a read address, and a data write signal with the content of the second counter as a write address when the output signal of the gate circuit is generated. And a control circuit for outputting a signal and writing the contents of the fourth counter.

〔作用〕[Action]

本発明のDMA制御装置は、アドレス計数器の更新値が
テーブル形式に構造化されたデータベースアクセスに対
応しているために、このようなデータベースの特定フィ
ールドを高速に読み出し、内蔵のデータ列比較手段で実
時間データ列比較を行うことが可能で、レコードの中の
特定フィールドの高速検索を可能にする。
Since the update value of the address counter corresponds to the database access structured in the table format, the DMA control device of the present invention reads out a specific field of such a database at high speed, and has a built-in data string comparison means. Real-time data string comparison can be performed with, which enables high-speed search of a specific field in a record.

〔実施例〕〔Example〕

以下、本発明について図面を用いて説明を行う。 Hereinafter, the present invention will be described with reference to the drawings.

第1図は本発明によるDMA制御装置の一実施例を示す
ブロック図である。この図で、1は第2計数器、2は第
1レジスタ、3は第1計数器、4は第1加算器、5は第
4計数器、6は第2レジスタ、7は第3計数器、8はデ
ータ列比較手段、9はモードレジスタ、10はゲート回
路、11は制御回路である。
FIG. 1 is a block diagram showing an embodiment of a DMA controller according to the present invention. In this figure, 1 is a second counter, 2 is a first register, 3 is a first counter, 4 is a first adder, 5 is a fourth counter, 6 is a second register, and 7 is a third counter. , 8 is a data string comparing means, 9 is a mode register, 10 is a gate circuit, and 11 is a control circuit.

制御回路11はCPUからのDMAREQ命令の入力に
より、CPUにHOLDREQ信号を出し、HOLDA
CK信号が帰ってくると動作を開始する。
The control circuit 11 outputs a HOLDREQ signal to the CPU when the DMAREQ command is input from the CPU,
The operation starts when the CK signal returns.

フィールドを検査して適合するレコードを調べる場合、
制御回路11は第1計数器3に格納されているフィール
ドの読取りアドレスをアドレスバスに出力し、データ読
取り信号(リード)を出力する。各フィールドを読み取
る間、データ読取り信号(リード)に同期して読取りア
ドレスは1アドレス分プラスされる。各フィールドがア
クセスされる前に、第2レジスタ6からフィールドの長
さDを第3計数器7に設定しておき、データ読取り信号
(リード)に同期してこれを1アドレス分マイナスして
零になると、キャリー信号が第1終了信号として出力さ
れ、レコードに含まれるフィールド1個の読取り終了が
わかる。
When inspecting a field to find a matching record,
The control circuit 11 outputs the read address of the field stored in the first counter 3 to the address bus, and outputs the data read signal (read). While reading each field, the read address is increased by one address in synchronization with the data read signal (read). Before each field is accessed, the field length D is set in the third counter 7 from the second register 6, and this is subtracted by one address in synchronization with the data read signal (read) to zero. Then, the carry signal is output as the first end signal, and the end of reading of one field included in the record is known.

第1レジスタ2にはレコード間の距離Lが設定されてお
り、第1加算器4は第1計数器3の出力にこれを加え第
1計数器3の設定データとして出力する。この設定デー
タは第1終了信号に同期して、第1計数器3に設定され
る。こうして、次のレコードの対象フィールドをアクセ
ス出来るようになる。
The distance L between the records is set in the first register 2, and the first adder 4 adds this to the output of the first counter 3 and outputs it as the setting data of the first counter 3. This setting data is set in the first counter 3 in synchronization with the first end signal. Thus, the target field of the next record can be accessed.

例えば、一つのレコードの特定フィールドがA番地であ
り、レコード間に距離がLであると、設定されている
と、次のレコードの特定フィールドは(A+L)番地か
ら始まる。フィールドの長さDを保持する第3計数器7
がカウントダウンする間に特定フィールドのデータがA
番地から読み出される。それが終わると(A+L)番地
にジャンプして、第3計数器7にフィールドの長さDを
再設定する。計数器7の内容をカウントダウンさせる
と、(A+L+D−1)番地にあるフィールドデータが
読み出される。(A+L)を(A+2L)とおきかえて
以上のことを繰り返す。
For example, if it is set that the specific field of one record is the address A and the distance between the records is L, the specific field of the next record starts from the address (A + L). Third counter 7 for holding field length D
Data of a specific field is A while the countdown
It is read from the address. After that, the address jumps to the address (A + L), and the field length D is reset in the third counter 7. When the contents of the counter 7 are counted down, the field data at the address (A + L + D-1) is read out. The above is repeated by replacing (A + L) with (A + 2L).

このように次々読み出されるフィールドのデータ検索
は、データ列比較手段8に登録されているデータ列と比
較し、大、小、等しい、などを出力することによって処
理される。ゲート回路10はリードかライトからのモー
ドレジスタ9の指定により、比較手段8の出力を選択
し、制御回路11に入力する。この入力により制御回路
11は、第2計数器1の内容(マッチデータの格納番
地)を書込みアドレスとして出力し、第4計数器5の内
容(レコード番号)を書込み信号(ライト)により書込
む。第2計数器1の内容はこれに同期して、1アドレス
分プラスされる。
In this way, the data retrieval of the fields read one after another is processed by comparing with the data string registered in the data string comparing means 8 and outputting the large, small, equal, or the like. The gate circuit 10 selects the output of the comparison means 8 according to the designation of the mode register 9 from the read or the write and inputs it to the control circuit 11. By this input, the control circuit 11 outputs the content of the second counter 1 (the storage address of the match data) as a write address, and writes the content of the fourth counter 5 (record number) by a write signal (write). The content of the second counter 1 is incremented by one address in synchronization with this.

最初、第4計数器5には、データベースに含まれるレコ
ード数が設定されている。これは第3計数器7の出力す
る第1終了信号により1アドレス分マイナスされ、各レ
コードを識別することができる。これが零になると、キ
ャリー信号が第2終了信号として第4計数器5から出力
されて、動作が終了する。
Initially, the number of records included in the database is set in the fourth counter 5. This is subtracted by one address by the first end signal output from the third counter 7, and each record can be identified. When this becomes zero, the carry signal is output from the fourth counter 5 as the second end signal, and the operation ends.

第2図は第1図に用いられるデータ列比較手段8の一実
施例のブロック図である。これは、比較対象のデータ列
(A、B、C)を格納するレジスタ21と、このレジス
タ21にアドレスを与える計数器7と、入力されるデー
タ単位とレジスタ21の出力とを比較し「大、小、等し
い」を出力する比較器22と、比較器22の出力を全ビ
ットマッチか否かを確認できるまで保持し次のデータ入
力タイミングに比較器22に順次入力する部分マッチ信
号のレジスタ23とから構成されている。
FIG. 2 is a block diagram of an embodiment of the data string comparison means 8 used in FIG. This is done by comparing a register 21 that stores a data string (A, B, C) to be compared, a counter 7 that gives an address to this register 21, an input data unit, and an output of the register 21. , Small, equal ”and a register 23 for a partial match signal which holds the output of the comparator 22 until it can be confirmed whether all the bits match or not and sequentially inputs it to the comparator 22 at the next data input timing. It consists of and.

この計数器7はフィールド長さ計数する第1図の第3計
数器7と同一であり、フィールドのデータ列(a、b、
c)に対応するデータ列(A、B、C)をレジスタ21
から読み出すことができる。
This counter 7 is the same as the third counter 7 of FIG. 1 for counting the field length, and the data string (a, b,
The data string (A, B, C) corresponding to c) is registered in the register 21.
Can be read from.

なお、以上の説明における計数器はプラス1づずつ更新
するものであったが、マイナス1するものでもレコード
間の距離を負数で与えることにより、同様の効果が得ら
れ、以上の説明は何等本発明の特許請求の範囲を制限す
るものではない。
Although the counter in the above description was updated by incrementing by 1, the same effect can be obtained by giving the distance between records by a negative number even if it is decrementing by 1. It is not intended to limit the scope of the invention.

〔発明の効果〕〔The invention's effect〕

本発明によれば、レコード形式の構造化された関係デー
タベースにおける特定フィールドのデータ列の検索処理
の高速化が容易に達成できるという効果がある。
According to the present invention, there is an effect that it is possible to easily achieve high speed search processing of a data string of a specific field in a structured relational database in a record format.

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

第1図は本発明の一実施例のブロック図、第2図は第1
図に用いられる比較手段の一実施例のブロック図、第3
図はテーブル形式に構造化された関係データベースの各
部の名称を説明する図である。 1,3,5,7……計数器、2,6,21,23……レ
ジスタ、9……モードレジスタ、4……加算器、8……
データ列比較手段、10……ゲート回路、11……制御
回路、22……比較器。
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG.
3 is a block diagram of an embodiment of a comparison means used in the figure, FIG.
The figure is a diagram for explaining the names of each part of the relational database structured in a table format. 1, 3, 5, 7 ... Counter, 2,6,21,23 ... Register, 9 ... Mode register, 4 ... Adder, 8 ...
Data string comparison means, 10 ... Gate circuit, 11 ... Control circuit, 22 ... Comparator.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】第1設定データが第1終了信号に同期して
設定されデータ読取り信号に同期して単位数ずつ変化す
る第1計数器と、第1レジスタと、前記第1計数器の出
力値に前記第1レジスタの値を加えて第1設定データを
出力する第1加算器と、データ書込み信号に同期して単
位数ずつ変化する第2計数器と、第2レジスタと、デー
タ読取り信号を計数し前記第2レジスタの設定値を計数
し終えると前記第1終了信号を発生し初期状態に戻る第
3計数器と、前記第1終了信号を計数し既定値を計数し
終えると第2終了信号を発生する第4計数器と、読み取
られる一連のデータ列と登録されているデータ列とを比
較するデータ列比較手段と、このデータ列比較手段の出
力を選択するゲート回路と、このゲート回路の動作を指
定する第3レジスタと、DMA処理機能を有し前記第1
計数器の内容を読取りアドレスとしてデータ読取り信号
を出力し前記ゲート回路の出力信号発生時に前記第2計
数器の内容を書込みアドレスとしてデータ書込み信号を
出力し前記第4計数器の内容を書込む制御回路とで構成
されることを特徴とするダイレクトメモリアクセス制御
装置。
1. A first counter, a first register, in which first setting data is set in synchronization with a first end signal and which changes in units of number in synchronization with a data read signal, a first register, and an output of the first counter. A first adder that outputs the first setting data by adding the value of the first register to a value, a second counter that changes by a unit number in synchronization with a data write signal, a second register, and a data read signal And a third counter that generates the first end signal and returns to the initial state when the set value of the second register is finished, and the second counter when the first end signal is counted and the predetermined value is finished. A fourth counter for generating an end signal, a data string comparing means for comparing a series of read data strings with a registered data string, a gate circuit for selecting an output of the data string comparing means, and a gate Third register that specifies the operation of the circuit When the first has the DMA processing function
A control for outputting a data read signal with the content of the counter as a read address and outputting a data write signal with the content of the second counter as a write address when the output signal of the gate circuit is generated to write the content of the fourth counter. A direct memory access control device comprising a circuit.
JP27382687A 1987-10-28 1987-10-28 Direct memory access controller Expired - Lifetime JPH069038B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27382687A JPH069038B2 (en) 1987-10-28 1987-10-28 Direct memory access controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27382687A JPH069038B2 (en) 1987-10-28 1987-10-28 Direct memory access controller

Publications (2)

Publication Number Publication Date
JPH01114962A JPH01114962A (en) 1989-05-08
JPH069038B2 true JPH069038B2 (en) 1994-02-02

Family

ID=17533090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27382687A Expired - Lifetime JPH069038B2 (en) 1987-10-28 1987-10-28 Direct memory access controller

Country Status (1)

Country Link
JP (1) JPH069038B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7675501B2 (en) 2003-12-17 2010-03-09 Samsung Electronics Co., Ltd. Liquid crystal display apparatus with light sensor

Also Published As

Publication number Publication date
JPH01114962A (en) 1989-05-08

Similar Documents

Publication Publication Date Title
JPH069038B2 (en) Direct memory access controller
JPH04112253A (en) Data accessing method using multilayer buffer
JPS6143734B2 (en)
JPH0772879B2 (en) Cache memory device
JPH029401Y2 (en)
JPH0475551B2 (en)
JPS60211540A (en) Data retrieval circuit
KR0141906B1 (en) Hardware driving device for searching data
JPS6319858Y2 (en)
JPS63148349A (en) Cache memory positioning system
JP2586172B2 (en) Table search device with learning function
JP2570407B2 (en) Programmable controller
JPS60220424A (en) Arithmetic system of array element
JPS60218146A (en) Storage device address control system
JPH02157933A (en) Variable length data processor
JPH01255924A (en) Directory memory access control device
JPS6124734B2 (en)
JPS633351A (en) Buffer retrieving control system
JPS5824822B2 (en) How to access data memory block
JPH0833812B2 (en) Sorting device
JPH06332694A (en) Table retrieving device in digital computer
JPS5917649A (en) Device for retrieving data base
JPS6244839A (en) Instruction fetching device
JPS5827239A (en) Character converting device
JPH01129324A (en) Data retrieving device