JPH0635844A - Direct memory access device - Google Patents

Direct memory access device

Info

Publication number
JPH0635844A
JPH0635844A JP19124992A JP19124992A JPH0635844A JP H0635844 A JPH0635844 A JP H0635844A JP 19124992 A JP19124992 A JP 19124992A JP 19124992 A JP19124992 A JP 19124992A JP H0635844 A JPH0635844 A JP H0635844A
Authority
JP
Japan
Prior art keywords
data
output
comparator
registers
register
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.)
Withdrawn
Application number
JP19124992A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Miki
良行 三木
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
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP19124992A priority Critical patent/JPH0635844A/en
Publication of JPH0635844A publication Critical patent/JPH0635844A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To attain the high speed working of a direct memory access device by performing the transfer of data with sorting through the hardware. CONSTITUTION:Key word registers 1a and 1b store two different types of data given from a source memory, and a comparator 3 compares the contents of both registers 1a and 1b with each other. Then, the selectors SL1 and SL2 output the data stored in one of both registers 1a and 1b based on the comparison result of the comparator 3. Furthermore, the AND gates AG1 and AG2 update the contents of both registers 1a and 1b based on the comparison result of the comparator 3.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はダイレクトメモリアクセ
ス装置に関し、特に情報処理装置における入出力装置,
主記憶装置間のデータ転送を行うダイレクトメモリアク
セス装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a direct memory access device, and more particularly to an input / output device in an information processing device,
The present invention relates to a direct memory access device that transfers data between main storage devices.

【0002】[0002]

【従来の技術】ダイレクトメモリアクセス装置は、磁気
ディスク装置,通信装置,ディスプレイ装置などの入出
力装置が共通データ転送経路(以下システムバスとい
う)に接続された時に、データの転送速度を上げるため
に、これら入出力装置と主記憶装置との間のデータ転送
を中央処理装置(以下CPUという)に代って高速に行
なうための装置である。
2. Description of the Related Art A direct memory access device increases the data transfer rate when input / output devices such as magnetic disk devices, communication devices, and display devices are connected to a common data transfer path (hereinafter referred to as a system bus). , A device for performing high-speed data transfer between the input / output device and the main storage device instead of the central processing unit (hereinafter referred to as CPU).

【0003】従来、ダイレクトメモリアクセス装置は、
データの転送が主な使用用途であるが、最近では検索機
能を持つものが発表されている(i82258コーザー
ズマニュアル参照)。この検索機能は、データベースの
操作において必要になってくる機能である。またデータ
ベースの操作においてはソート機能も重要な機能であ
る。従来、このソート機能は図4に示すようなソフトウ
ェアにより実現されてきた。
Conventionally, direct memory access devices have been
It is mainly used for data transfer, but recently it has been announced that it has a search function (see i82258 Cousers Manual). This search function is a function that becomes necessary for database operation. The sorting function is also an important function in database operations. Conventionally, this sort function has been realized by software as shown in FIG.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のダイレ
クトメモリアクセス装置では、ソート機能をCPUによ
るソフトウェアにより実現しているので、このソート機
能を実行するのに、命令のフェッチ,デコード,データ
の読出し書込み等のために時間がかかるという欠点があ
る。
In the above-mentioned conventional direct memory access device, the sorting function is realized by software by the CPU. Therefore, in order to execute this sorting function, instruction fetch, decoding, and data reading are executed. There is a drawback that it takes time for writing.

【0005】本発明の目的は、ソート付きのDMAデー
タ転送を短時間に行うことができるダイレクトメモリア
クセス装置を提供することにある。
It is an object of the present invention to provide a direct memory access device capable of performing DMA data transfer with sort in a short time.

【0006】[0006]

【課題を解決するための手段】本発明のダイレクトメモ
リアクセス装置は、ソースメモリからの2つのデータを
それぞれ対応して格納する第1及び第2のレジスタと、
これら第1及び第2のレジスタに格納されているデータ
を比較し比較結果を出力する比較器と、この比較器によ
る比較結果に応じて前記第1及び第2のレジスタに格納
されているデータのうちの一方を選択しデスティネーシ
ョンメモリへ送出する選択出力部と、前記比較器による
比較結果に応じて前記第1及び第2のレジスタに格納さ
れているデータを更新する格納データ更新部と、前記ソ
ースメモリ及びデスティネーションメモリのアドレスを
指定するアドレス指定部とを有している。
A direct memory access device of the present invention includes first and second registers which respectively store two data from a source memory in a corresponding manner.
A comparator for comparing the data stored in the first and second registers and outputting a comparison result, and a comparator for storing the data stored in the first and second registers according to the comparison result by the comparator. A selection output unit that selects one of the two and sends it to a destination memory; a stored data updating unit that updates the data stored in the first and second registers according to the comparison result by the comparator; And an address designation unit for designating addresses of the source memory and the destination memory.

【0007】[0007]

【実施例】次に本発明の実施例について図面を参照して
説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0008】図1及び図2はそれぞれ本発明の一実施例
を示す回路図及びこの実施例により取扱われるデータの
データフォオマットとその記憶場所のソースメモリのメ
モリマップである。
FIGS. 1 and 2 are a circuit diagram showing an embodiment of the present invention and a data format of data handled by this embodiment and a memory map of a source memory of its storage location, respectively.

【0009】転送と同時にソート処理されるデータのフ
ォーマットは、下位32ビットの1つのデータフィール
ドDFと、上位32ビットの1つのキーワードフィール
ドKFとが1対となって1単位のデータを構成し、1つ
のソースアドレスに格納されている。ソート処理はこの
キーワードフィールドKF内の情報により行なわれる。
The format of the data to be sorted at the same time as the transfer is such that one data field DF of the lower 32 bits and one keyword field KF of the upper 32 bits make a pair to form one unit of data. It is stored in one source address. The sorting process is performed by the information in this keyword field KF.

【0010】この実施例は、アドレス入力端AI及びデ
ータ入力端DIに伝達されたソースメモリ(100)か
らの2つのデータのキーワードフィールドKF,データ
フィールドDFをそれぞれ対応して格納する第1のキー
ワードレジスタ1a,データレジスタ2a及び第2のキ
ーワードレジスタ1b,データレジスタ2bと、第1及
び第2のキーワードレジスタ1a,1bに格納されてい
るデータ(それぞれA,Bとする)を比較し、A≧Bの
とき“1”となる比較結果を出力する比較器3と、この
比較器3による比較結果及びセカンド・ラスト信号SC
D・LSTに応じて第1のキーワードレジスタ1a,デ
ータレジスタ2a及び第2のキーワードレジスタ1b,
データレジスタ2bのうちの一方を選択してアドレス出
力端AO,データ出力端DOからデスティネーションメ
モリへ送出する選択出力部のEXCLUSIVE OR
ゲートEG1,セレクタSL1,SL2,3ステートバ
ッファTSB1,TSB2と、比較器3による比較結果
及びセカンド・ラスト信号SCD・LSTに応じて第1
及び第2のキーワードレジスタ1a,1b、データレジ
スタ2a,2bに格納されているデータを更新する格納
データ更新部のインバータIV1,ANDゲートAG
1,AG2と、データ転送及びソート処理の対象となる
データのソートメモリ側のソートアドレス、デスティネ
ーションメモリのデスティネーションアドレスを順次発
生しアドレス出力端AOから送出するソースアドレスイ
ンクリメンタ4,デスティネーションアドレスインタリ
メンタ5及び3ステートバッファTSB3,TSB4
と、クロック信号CKに従って上述した各部の動作を制
御する順序制御回路6及びANDゲートAG3〜AG5
とを有する構成となっている。
In this embodiment, a first keyword for storing a keyword field KF and a data field DF of two data from the source memory (100) transmitted to the address input terminal AI and the data input terminal DI respectively correspondingly. The register 1a, the data register 2a, the second keyword register 1b, and the data register 2b are compared with the data (A and B, respectively) stored in the first and second keyword registers 1a and 1b, and A ≧ When it is B, the comparator 3 which outputs a comparison result of "1", the comparison result by the comparator 3 and the second last signal SC
A first keyword register 1a, a data register 2a, and a second keyword register 1b in accordance with D / LST,
EXCLUSIVE OR of the selection output section which selects one of the data registers 2b and sends it to the destination memory from the address output terminal AO and the data output terminal DO.
The gate EG1, the selectors SL1, SL2 and the three-state buffers TSB1 and TSB2, and the first result depending on the comparison result by the comparator 3 and the second / last signal SCD / LST.
And an inverter IV1 and an AND gate AG of the stored data update unit for updating the data stored in the second keyword registers 1a and 1b and the data registers 2a and 2b.
1, AG2, a sort address on the sort memory side of data to be subjected to data transfer and sort processing, a destination address of the destination memory, and a source address incrementer 4 for sending out from the address output terminal AO. Interlimator 5 and 3-state buffers TSB3, TSB4
And an order control circuit 6 and AND gates AG3 to AG5 that control the operations of the above-described units according to the clock signal CK.
It is configured to have and.

【0011】次に、この実施例の動作について説明す
る。図3はこの実施例の動作を説明するための各部信号
のタイミング図である。
Next, the operation of this embodiment will be described. FIG. 3 is a timing chart of signals of respective parts for explaining the operation of this embodiment.

【0012】この実施例においては、2バスサイクル
(4クロックサイクル)でデータのメモリ間転送を行
う。
In this embodiment, data is transferred between memories in two bus cycles (4 clock cycles).

【0013】まず、ソート,転送する先頭のソースアド
レスAs1及びデスティネーションアドレスAd1をソ
ースアドレスインクリメンタ4及びデスティネーション
アドレスインクリメンタ5にそれぞれ初期設定する。ソ
ート付のデータ転送を開始する前にキーワードレジスタ
1bを“0”にリセットしておく。これにより比較器3
は“1”の比較結果を出力するようになる。なお比較器
3はA≧Bのとき“1”それ以外のときは“0”となる
比較結果を出力する。図3では、ソートすべきデータの
数は“5”としている。
First, the head source address As1 and the destination address Ad1 to be sorted and transferred are initialized to the source address incrementer 4 and the destination address incrementer 5, respectively. The keyword register 1b is reset to "0" before starting the data transfer with sorting. As a result, the comparator 3
Will output the comparison result of "1". The comparator 3 outputs a comparison result of "1" when A≥B and "0" otherwise. In FIG. 3, the number of data to be sorted is “5”.

【0014】ソート付のデータ転送を開始すると、順序
制御回路6は図3に示すようなリード信号Reod,ラ
イト信号WRITE,セカンド・ラスト信号SCD・L
ST,1クロック図バスサイクル信号T1,2クロック
図バスサイクル信号T2を出力する。セカンド・ラスト
信号SCD・LSTは2回目のバスサイクルと最後のバ
スサイクルのときにアクティブになる信号である。1ク
ロック目バスサイクル信号T1はバスサイクルの1クロ
ック目であることを示す信号,2クロック目バスサイク
ル信号T2はバスサイクルの2クロック目であることを
示す信号である。
When data transfer with sorting is started, the sequence control circuit 6 reads the read signal Reod, the write signal WRITE, and the second last signal SCD.L as shown in FIG.
ST, 1 clock diagram bus cycle signal T1, 2 clock diagram bus cycle signal T2 is output. The second / last signal SCD / LST is a signal which becomes active in the second bus cycle and the last bus cycle. The first clock bus cycle signal T1 is a signal indicating that it is the first clock of the bus cycle, and the second clock bus cycle signal T2 is a signal indicating that it is the second clock of the bus cycle.

【0015】最初のバスサイクルではT1アクティブの
ステートでソースアドレスAs1をアドレス出力端AO
へ出力する。SCD・LSTは最初“0”であり比較器
3の出力は“1”,Reod=“1”となりT2アクテ
ィブのステートにおいてアドレス入力端AIから1番目
のキーワードフィールドを読込みキーワードレジスタ1
aに記憶する。これと同時にデータ入力端DIから1番
目のデータフィールドを読込みデータレジスタ2aに記
憶する。
In the first bus cycle, the source address As1 is sent to the address output terminal AO in the T1 active state.
Output to. SCD • LST is initially “0”, the output of the comparator 3 is “1”, and Reod = “1”. In the T2 active state, the first keyword field is read from the address input terminal AI and the keyword register 1 is read.
Store in a. At the same time, the first data field from the data input terminal DI is read and stored in the data register 2a.

【0016】2番目のバスサイクルではT1アクティブ
のステート(以下T1ステートという)でソースアドレ
スインクリメンタ4によりインクリメントしたソースア
ドレスAs2をアドレス出力端AOに出力する。SCD
・LSTはこのとき“1”であり比較器3の出力も
“1”であるのでEXCLUSIVE ORゲートEG
1の出力GEは“0”となる。このため2番目のバスサ
イクルではGE=“0”,Reod=“1”となりT2
アクティブのステート(以下T2ステートという)にお
いてアドレス入力端AIから2番目のキーワードフィー
ルドを読込みアドレスレジスタ1bに記憶する。同時に
データ入力端DIから2番目のデータを読込みデータレ
ジスタ2bに記憶する。3番目のバスサイクルではキー
ワードレジスタ1a,1bの値(A,B)を比較器3に
より比較しA≧Bの場合には“1”の比較結果を出力
し、A<Bの場合には“0”の比較結果を出力する。
In the second bus cycle, the source address As2 incremented by the source address incrementer 4 in the T1 active state (hereinafter referred to as T1 state) is output to the address output terminal AO. SCD
Since LST is "1" at this time and the output of the comparator 3 is also "1", the EXCLUSIVE OR gate EG
The output GE of 1 becomes "0". Therefore, in the second bus cycle, GE = "0" and Reod = "1", and T2
In the active state (hereinafter referred to as T2 state), the second keyword field from the address input terminal AI is stored in the read address register 1b. At the same time, the second data from the data input terminal DI is read and stored in the data register 2b. In the third bus cycle, the values (A, B) of the keyword registers 1a and 1b are compared by the comparator 3, and when A ≧ B, a comparison result of “1” is output, and when A <B, “1” is output. The comparison result of 0 "is output.

【0017】3番目のバスサイクル以降ではSCD・L
STは“0”であるので、GE12は比較結果がそのま
ま出力されることになる。このバスサイクルでは“1”
とする。3番目のバスサイクルのT1ステートではまず
デスティネーションアドレスAd1をアドレス出力端A
Oに出力する。3番目のバスサイクルのT2ステートで
はGE=“1”であるのでセレクタSL1によりキーワ
ードレジスタ1bの出力が選択されアドレス出力端AO
に出力される。同時にセレクタSL2によりデータレジ
スタ2bの出力が選択されデータ出力端DOに出力され
る。そしてデスティネーションアドレスインクリメンタ
5によりディスティネーションアドレスがAd2にイン
クリメントされる。
SCD.L after the third bus cycle
Since ST is "0", the GE 12 outputs the comparison result as it is. "1" in this bus cycle
And In the T1 state of the third bus cycle, first, the destination address Ad1 is set to the address output terminal A.
Output to O. In the T2 state of the third bus cycle, since GE = "1", the selector SL1 selects the output of the keyword register 1b and the address output terminal AO.
Is output to. At the same time, the output of the data register 2b is selected by the selector SL2 and output to the data output terminal DO. Then, the destination address incrementer 5 increments the destination address to Ad2.

【0018】4番目のバスサイクルではT1ステートで
ソースアドレスインクリメンタ4によりインクリメント
されたソースアドレスAs3をアドレス出力端AOに出
力する。T2ステートでは直前の3番目のバスサイクル
で決まったGEの値が“1”であればアドレス入力端A
Iから3番目のキーワードフィールドを読込みキーワー
ドレジスタ1aに記憶する。同時にデータ入力端DIか
ら3番目のデータを読込みデータレジスタ2aに記憶す
る。
In the fourth bus cycle, the source address As3 incremented by the source address incrementer 4 in the T1 state is output to the address output terminal AO. In the T2 state, if the GE value determined in the immediately preceding third bus cycle is "1", the address input terminal A
The third keyword field from I is read and stored in the keyword register 1a. At the same time, the third data from the data input terminal DI is read and stored in the data register 2a.

【0019】5番目,7番目,9番目のバスサイクルは
3番目のバスサイクルと同様である。また6番目,8番
目のバスサイクルは4番目のバスサイクルと同様であ
る。
The fifth, seventh and ninth bus cycles are the same as the third bus cycle. The sixth and eighth bus cycles are the same as the fourth bus cycle.

【0020】最後のバスサイクル(本実施例では10番
目)ではT1ステートでデスティネーションアドレスイ
ンクリメンタ5によりインクリメントされたディティネ
ーションアドレスAd5を出力する。最後のバスサイク
ルではSCD・LST信号が“1”になる。このためE
XCLUSIVE ORゲートEG1は比較結果否定信
号を出力する。このため1回前のバスサイクルで出力さ
れないで残っている方のレジスタを選択して出力する。
GE=“1”であればキーワードレジスタ1aの値をア
ドレス出力端AOに出力し、データレジスタ2aの値を
データ出力端DOに出力する。GE=“0”であればキ
ーワードレジスタ1bの値及びデータレジスタ2bの値
を出力する。
In the last bus cycle (10th in this embodiment), the destination address Ad5 incremented by the destination address incrementer 5 is output in the T1 state. In the last bus cycle, the SCD.LST signal becomes "1". Therefore E
The XCLUSIVE OR gate EG1 outputs a comparison result negation signal. For this reason, the remaining register that is not output in the previous bus cycle is selected and output.
If GE = "1", the value of the keyword register 1a is output to the address output terminal AO, and the value of the data register 2a is output to the data output terminal DO. If GE = "0", the value of the keyword register 1b and the value of the data register 2b are output.

【0021】この様にしてソート付のデータ転送を行な
い、ソートすべき情報のレコード数がnとするとn回ソ
ート付のデータ転送を繰返すとソートを完了する。
Thus, the data transfer with sorting is performed, and if the number of records of the information to be sorted is n, the data transfer with sorting is repeated n times to complete the sorting.

【0022】[0022]

【発明の効果】以上説明したように本発明は、内部にソ
ート機能を実現するハードウェアを設けたので、従来の
CPUによるソフトウェアによるソート付きのデータ転
送に比べ、命令のフェッチ,デコード等がなくなるた
め、ソート付きデータ転送を高速化することができる効
果がある。
As described above, according to the present invention, since the hardware for realizing the sorting function is provided inside, fetching and decoding of instructions are eliminated as compared with the conventional data transfer with sort by software by the CPU. Therefore, there is an effect that the data transfer with sorting can be speeded up.

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

【図1】本発明の一実施例を示す回路図である。FIG. 1 is a circuit diagram showing an embodiment of the present invention.

【図2】図1に示された実施例に適用されるデータフォ
ーマット及びその記憶メモリのメモリマップである。
FIG. 2 is a memory map of a data format and its storage memory applied to the embodiment shown in FIG.

【図3】図1に示された実施例の動作を説明するための
各部信号のタイミング図である。
FIG. 3 is a timing chart of signals of respective parts for explaining the operation of the embodiment shown in FIG.

【図4】従来のダイレクトメモリアクセス装置で転送さ
れるデータのソート処理を実現するためのプログラムを
示す図である。
FIG. 4 is a diagram showing a program for realizing sort processing of data transferred by a conventional direct memory access device.

【符号の説明】 1a,1b キーワードレジスタ 2a,2b データレジスタ 3 比較器 4 ソースアドレスインクリメンタ 5 デスティネーションアドレスインクリメンタ 6 順序制御回路 100 ソースメモリ AG1〜AG5 ANDゲート EG1 EXCLUSIVE ORゲート IV1 インバータ SL1,SE2 セレクタ TSB1〜TSB2 32テートバッファ[Description of Reference Signs] 1a, 1b Keyword Register 2a, 2b Data Register 3 Comparator 4 Source Address Incrementer 5 Destination Address Incrementer 6 Sequence Control Circuit 100 Source Memory AG1 to AG5 AND Gate EG1 EXCLUSIVE OR Gate IV1 Inverter SL1, SE2 Selector TSB1 to TSB2 32 Tate buffer

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ソースメモリからの2つのデータをそれ
ぞれ対応して格納する第1及び第2のレジスタと、これ
ら第1及び第2のレジスタに格納されているデータを比
較し比較結果を出力する比較器と、この比較器による比
較結果に応じて前記第1及び第2のレジスタに格納され
ているデータのうちの一方を選択しデスティネーション
メモリへ送出する選択出力部と、前記比較器による比較
結果に応じて前記第1及び第2のレジスタに格納されて
いるデータを更新する格納データ更新部と、前記ソース
メモリ及びデスティネーションメモリのアドレスを指定
するアドレス指定部とを有することを特徴とするダイレ
クトメモリアクセス装置。
1. A first register and a second register, which respectively store two data from a source memory, respectively, are compared with data stored in the first and second registers, and a comparison result is output. A comparator, a selection output section for selecting one of the data stored in the first and second registers according to a comparison result by the comparator and transmitting the selected data to the destination memory, and a comparison by the comparator A storage data updating unit that updates data stored in the first and second registers according to a result; and an addressing unit that specifies addresses of the source memory and the destination memory. Direct memory access device.
JP19124992A 1992-07-20 1992-07-20 Direct memory access device Withdrawn JPH0635844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19124992A JPH0635844A (en) 1992-07-20 1992-07-20 Direct memory access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19124992A JPH0635844A (en) 1992-07-20 1992-07-20 Direct memory access device

Publications (1)

Publication Number Publication Date
JPH0635844A true JPH0635844A (en) 1994-02-10

Family

ID=16271391

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19124992A Withdrawn JPH0635844A (en) 1992-07-20 1992-07-20 Direct memory access device

Country Status (1)

Country Link
JP (1) JPH0635844A (en)

Similar Documents

Publication Publication Date Title
US5125097A (en) Data flow type information processors where data packets pass through plurality of merging and branching portions of the internal path
WO2001042926A1 (en) Interface for a memory unit
JPH04140880A (en) Vector processor
EP0338564B1 (en) Microprogram branching method and microsequencer employing the method
US7111127B2 (en) System for supporting unlimited consecutive data stores into a cache memory
JPH11110214A (en) Command control system and method for the same
US4737908A (en) Buffer memory control system
US5050076A (en) Prefetching queue control system
JPH0635844A (en) Direct memory access device
US4574347A (en) Data processing apparatus for performing high-speed arithmetic operations
US6510480B1 (en) Data transfer circuit and data processing method using data transfer circuit for handling interruption processing
JPS6391756A (en) Partial write instruction processing system for storage device
JPH1131066A (en) Buffer control system
JPS633392B2 (en)
JPH01273132A (en) Microprocessor
JPH0385636A (en) Instruction advance control device
JP2576589B2 (en) Virtual storage access control method
JPS61237145A (en) Controlling system for store buffer
JPS61223956A (en) Store buffer control system
JP3242474B2 (en) Data processing device
JPS60189043A (en) Processor
JPS6027418B2 (en) Instruction preemption control device
JPS6084646A (en) Table search system
JPS6246353A (en) Memory read system
JPH0812601B2 (en) Data processing device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991005