JP3246605B2 - Data transfer method - Google Patents

Data transfer method

Info

Publication number
JP3246605B2
JP3246605B2 JP07381991A JP7381991A JP3246605B2 JP 3246605 B2 JP3246605 B2 JP 3246605B2 JP 07381991 A JP07381991 A JP 07381991A JP 7381991 A JP7381991 A JP 7381991A JP 3246605 B2 JP3246605 B2 JP 3246605B2
Authority
JP
Japan
Prior art keywords
transfer
dma
block
bytes
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 - Fee Related
Application number
JP07381991A
Other languages
Japanese (ja)
Other versions
JPH05181786A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP07381991A priority Critical patent/JP3246605B2/en
Publication of JPH05181786A publication Critical patent/JPH05181786A/en
Application granted granted Critical
Publication of JP3246605B2 publication Critical patent/JP3246605B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、DMAコントロ−ラに
よるデ−タ転送方法に関し、特に転送誤り発生時の残転
送数を求める方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer method using a DMA controller, and more particularly, to a method for determining the remaining transfer number when a transfer error occurs.

【0002】[0002]

【従来の技術】従来より、周辺装置を接続したコンピュ
−タにおいて、主メモリと各周辺装置間でデ−タを転送
するためには、プログラムにより転送する方法と、DM
A(Direct Memory Access)コントロ−ラによりハ
−ドウェアで転送する方法とがある。DMAコントロ−
ラによる転送方法のうち、1バスサイクルで1オペラン
ドの転送を行うときには、コントロ−ラ内のFIFOを
介在することなく、主メモリと周辺装置間で直接デ−タ
の転送を行うことができる。また、メモリとアドレシン
グを必要とする他の周辺装置との間のデ−タ転送を行う
ときには、DMAコントロ−ラ内のFIFOレジスタを
介して行われる。すなわち、1本のアドレスバスを用い
てメモリと周辺装置の両者をアドレスする必要があるた
め、デ−タ転送をメモリとDMAコントロ−ラ、DMA
コントロ−ラと周辺装置の2回に分けてデ−タ転送を行
う。また、複数ブロックの連続転送を行う場合には、コ
ンティニュ−、アレイチェイン、およびリンクドチェイ
ンの3つの方法がある。コンティニュ−モ−ドでは、次
のブロック転送情報をベ−スアドレスレジスタ、ベ−ス
トランスファカウンタ、ベ−スファンクションコ−ドレ
ジスタに予めセットして、1つのブロック転送が終了す
ると、それらが上記各レジスタに移されて、次のブロッ
ク転送を続行する。次のアレイチェインモ−ドでは、メ
モリアドレスとトランスファカウント情報をメモリ内に
アレイとして格納しておき、このこのアレイの先頭アド
レスをベ−スアドレスレジスタ、エントリ数をベ−スト
ランスファカウンタにセットしておく。DMAコントロ
−ラは、1つのブロック転送前に先ずこのアレイ情報を
フェッチし、その後転送を開始する。ベ−ストランスフ
ァカウンタが0になったとき、アレイチェインは終了す
る。次のリンクドチェインモ−ドでは、メモリ内にリン
クアドレス情報を持っている。このリンクアドレスで毎
回ベ−スアドレスレジスタを書き換えるので、オペラン
ドブロックの削除、挿入が、アレイ情報の再構成をする
ことなく可能である。このチェインは、リンクアドレス
が0になると終了する。なお、DMA転送については、
例えば、『日経エレクトロニクス』1986年2月10
日号、pp.259〜279、あるいは『日立評論』第64巻第
7号昭和57年7月25日発行、pp.9〜14に記載された
技術がある。
2. Description of the Related Art Conventionally, in a computer to which peripheral devices are connected, in order to transfer data between a main memory and each peripheral device, a method of transferring data by a program, a method of transferring data,
A (Direct Memory Access) controller can be used to transfer data by hardware. DMA control
When one operand is transferred in one bus cycle, data can be directly transferred between the main memory and the peripheral device without interposing a FIFO in the controller. When data is transferred between the memory and another peripheral device requiring addressing, the data transfer is performed via a FIFO register in the DMA controller. That is, since it is necessary to address both the memory and the peripheral device using one address bus, the data transfer is performed by the memory, the DMA controller, and the DMA controller.
Data transfer is performed twice, that is, by the controller and the peripheral device. When performing continuous transfer of a plurality of blocks, there are three methods: continuity, array chain, and linked chain. In the continuous mode, the next block transfer information is set in advance in a base address register, a base transfer counter, and a base function code register. It is moved to each register and the next block transfer is continued. In the next array chain mode, the memory address and transfer count information are stored as an array in the memory, and the start address of this array is set in a base address register and the number of entries is set in a base transfer counter. Keep it. The DMA controller first fetches this array information before transferring one block, and then starts the transfer. When the base transfer counter becomes 0, the array chain ends. In the next linked chain mode, the memory has link address information. Since the base address register is rewritten each time with this link address, deletion and insertion of an operand block can be performed without reconfiguring array information. This chain ends when the link address becomes 0. For DMA transfer,
For example, "Nikkei Electronics" February 10, 1986
The technology described in the Japanese issue, pp. 259 to 279, or "Hitachi Hyoron," Vol. 64, No. 7, issued on July 25, 1982, pp. 9 to 14, is available.

【0003】図3は、従来の情報処理システムの構成図
である。図3において、1は処理装置(CPU)、2は
バスの使用権を管理するバスコントロ−ラ、3は主メモ
リ、4は主メモリの読み書きを制御するメモリコントロ
−ラ、5は入出力機器を制御する入出力制御機構、6は
入出力機器、7はデ−タ転送を制御するDMAコントロ
−ラである。DMAコントロ−ラにより、入出力機器6
と主メモリ3間でDMA転送を行う場合には、次のよう
な処理を行う。すなわち、先ず主メモリ3上にDMA転
送情報テ−ブルを作成した後、最初のDMA転送情報ブ
ロックをDMAコントロ−ラ7内のアドレスレジスタ
と、カウントレジスタと、チェイニングアドレスレジス
タにそれぞれセットする。次に、入出力制御機構5に起
動をかけて入出力機器6と主メモリ3の間でDMAによ
るデ−タ転送が開始される。ところで、このDMA転送
の途中で、アドレスパリティエラ−等の理由により中断
した場合には、エラ−ロギング等の処置の後にDMA転
送を再開する。このDMA転送を再開する場合、再度D
MAコントロ−ラ7内の各レジスタおよび入出力制御機
構5に、初期値をセットしてDMA転送を最初からやり
直していた。また、最初からやり直さないようにするた
めには、ソフトウェアによりDMAコントロ−ラ7の内
部レジスタと主メモリ3のDMA転送情報テ−ブルを順
次検索して、転送済数を求め、転送再開アドレスと残転
送数を算出する必要があった。しかし、この算出のため
のソフトウェアは、作成するのに極めて面倒であり、実
行に時間もかかっていた。
FIG. 3 is a configuration diagram of a conventional information processing system. In FIG. 3, 1 is a processing device (CPU), 2 is a bus controller for managing the right to use the bus, 3 is a main memory, 4 is a memory controller for controlling reading and writing of the main memory, and 5 is an input / output device. , An input / output device 6, and a DMA controller 7 for controlling data transfer. I / O device 6 by DMA controller
When a DMA transfer is performed between the main memory 3 and the main memory 3, the following processing is performed. That is, first, a DMA transfer information table is created on the main memory 3, and then the first DMA transfer information block is set in the address register, the count register, and the chaining address register in the DMA controller 7, respectively. Next, the input / output control mechanism 5 is activated, and data transfer by DMA between the input / output device 6 and the main memory 3 is started. If the DMA transfer is interrupted during the DMA transfer due to an address parity error or the like, the DMA transfer is restarted after a measure such as an error logging. When restarting this DMA transfer, D
The initial value is set in each register and the input / output control mechanism 5 in the MA controller 7, and the DMA transfer is restarted from the beginning. In order not to start over from the beginning, the internal register of the DMA controller 7 and the DMA transfer information table of the main memory 3 are sequentially searched by software to determine the number of transferred data, and the transfer restart address and It was necessary to calculate the number of remaining transfers. However, the software for this calculation was extremely cumbersome to create and took a long time to execute.

【0004】[0004]

【発明が解決しようとする課題】このように、従来の方
法では、DMA転送の途中で中断した場合のリトライ
は、転送の最初からやり直す必要があったので、既に転
送済みのデ−タも再度転送することになり、DMA転送
によるシステムバスの占有率が上ってしまい、システム
全体としてのバススル−プットは低下してしまうという
問題があった。また、チェイニングモ−ドにおいて、D
MA転送が中断した場合、ソフトウェアがリトライする
ために必要となる転送済数を得るためには、ソフトウェ
アにより転送情報テ−ブルを検索し、転送済数と、転送
再開アドレスを算出しなければならないという問題があ
った。本発明の目的は、このような従来の課題を解決
し、DMA転送が中断した場合に、ソフトウェアによる
転送再開アドレスと、残転送数の算出が簡単に行うこと
ができ、デ−タ処理の効率を向上させることができるデ
−タ転送方法を提供することにある。
As described above, in the conventional method, when the DMA transfer is interrupted in the middle of the transfer, it is necessary to start over from the beginning of the transfer. Since the transfer is performed, the occupation rate of the system bus by the DMA transfer is increased, and there is a problem that the bus throughput of the entire system is reduced. In the chaining mode, D
If the MA transfer is interrupted, the transfer information table must be searched by software to calculate the transferred number and the transfer restart address in order to obtain the transferred number required for the software to retry. There was a problem. SUMMARY OF THE INVENTION An object of the present invention is to solve such a conventional problem, and when a DMA transfer is interrupted, a transfer restart address and the number of remaining transfers can be easily calculated by software, and the efficiency of data processing can be improved. Another object of the present invention is to provide a data transfer method capable of improving the data transfer.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するた
め、本発明のデータ転送方法は、DMAコントローラ内
にDMA転送を行った回数をカウントする手段を配置
し、DMA転送終了の割り込みがあると、処理装置上の
プログラムは、まずメモリ上の第1の転送ブロックバイ
ト数とDMA転送回数カウント手段の内容を比較し、該
第1の転送ブロックバイト数よりDMA転送回数カウン
ト手段の内容が大きい場合に、該第1の転送ブロックバ
イト数と第2の転送ブロックバイト数の総和とDMA転
送回数カウント手段の内容を比較し、第1の転送ブロッ
クバイト数と第2の転送ブロックバイト数の総和よりD
MA転送回数カウント手段の内容が大きい場合に、該第
1の転送ブロックバイト数と第2の転送ブロックバイト
数と第3の転送ブロックバイト数の総和とDMA転送回
数カウント手段の内容を比較するという処理を、それ以
前の転送バイト数の総和がDMA転送回数カウント手段
の内容以上になるまで続け、そのときの転送バイト数の
総和とDMA転送回数カウント手段の内容に基づいて、
全ての転送ブロックについて正常終了したか、あるいは
どの転送ブロックの何バイト数転送した時点で異常終了
したかを判別し、異常終了した場合には、DMAコント
ローラに終了した次のデータから転送再開させること
特徴としている。
In order to achieve the above object, the data transfer method according to the present invention includes a means for counting the number of DMA transfers performed in a DMA controller. , The program on the processing device firstly stores the first transfer block
The number of data transfer and the contents of the DMA transfer number counting means are compared.
DMA transfer count count from first transfer block byte count
When the contents of the transfer means are large, the first transfer block
Sum of the number of bytes and the number of bytes of the second transfer block and DMA transfer
Compare the contents of the number-of-times-of-sending
From the sum of the number of bytes and the number of bytes of the second transfer block
If the content of the MA transfer count means is large,
1 transfer block byte number and 2nd transfer block byte
Sum of the number of transfer blocks and the number of third transfer block bytes and the number of DMA transfer times
The process of comparing the contents of the number counting means is
DMA transfer number counting means is the sum of the number of previous transfer bytes
Until the number of bytes transferred at that time
Based on the sum and the contents of the DMA transfer number counting means,
It is determined whether all transfer blocks have been completed normally or the number of bytes in which transfer block has been transferred and the transfer has been completed abnormally. If the transfer has been completed abnormally, the DMA controller restarts the transfer from the next data that has been completed. To
Features.

【0006】[0006]

【作用】本発明においては、DMAコントロ−ラ内に、
アドレスレジスタ、カウントレジスタ、およびチェイニ
ングアドレスレジスタの他に、各チャネル毎にDMA転
送の回数を保持するカウンタを内蔵する。このDMA転
送回数を保持するカウンタは、入出力機器と主メモリ間
のDMAによるデ−タ転送が、DMAコントロ−ラのチ
ャネル制御機構の下で実行された場合のDMA転送回数
をカウントするものである。これにより、DMA転送が
中断した場合でも、ソフトウェアによりDMA転送のリ
トライアドレスと残転送回数の算出を簡単に行うことが
できるので、デ−タ処理の効率は向上する。
According to the present invention, in the DMA controller,
In addition to an address register, a count register, and a chaining address register, a counter that holds the number of DMA transfers for each channel is incorporated. The counter for holding the number of times of DMA transfer counts the number of times of DMA transfer when data transfer by DMA between the input / output device and the main memory is executed under the channel control mechanism of the DMA controller. is there. As a result, even when the DMA transfer is interrupted, the retry address and the remaining transfer count of the DMA transfer can be easily calculated by software, so that the efficiency of the data processing is improved.

【0007】[0007]

【実施例】以下、本発明の実施例を、図面により詳細に
説明する。第1図は本発明の一実施例を示すDMAコン
トロ−ラ内の制御レジスタ群の配置図である。図1にお
いて、7はDMAコントロ−ラ内の1チャネル分の制御
レジスタ群、8はDMAを行う主メモリアドレスが保持
されるアドレスレジスタ、9は転送バイト数がセットさ
れ、転送される毎にカウントダウンするカウントレジス
タ、10はチェイニングに用いるデ−タのアドレスを格
納するチェイニングアドレスレジスタである。以上の各
レジスタ8〜10は従来より内蔵されていたが、本発明
では、さらにDMAによりデ−タ転送された転送回数を
カウントするためのム−ブカウントレジスタ26を新た
に設ける。このカウントレジスタ26の値を参照するこ
とにより、転送済みの回数が明確となるので、DMA転
送の途中で中断された場合でも、再開時にはその中断さ
れた点の次のアドレスから転送を開始すればよい。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is an arrangement diagram of a control register group in a DMA controller showing one embodiment of the present invention. In FIG. 1, 7 is a control register group for one channel in the DMA controller, 8 is an address register for holding a main memory address for performing DMA, 9 is the number of bytes to be transferred, and counts down every time data is transferred. A counting register 10 is a chaining address register for storing an address of data used for chaining. Although the above registers 8 to 10 have conventionally been built in, in the present invention, a move count register 26 for counting the number of times of data transfer by DMA is newly provided. By referring to the value of the count register 26, the number of times of transfer is clear. Therefore, even if the transfer is interrupted in the middle of the DMA transfer, when the transfer is restarted, the transfer is started from the next address of the interrupted point. Good.

【0008】図2は、主メモリ上のマップを示す概略図
である。図2において、3は主メモリ、12はDMA転
送デ−タ領域、13はDMA転送情報テ−ブルである。
図2に示すように、主メモリ3においては、DMA転送
を行う場合に、DMA転送情報テ−ブル13を作成した
後、最初のDMA転送情報ブロックをDMAコントロ−
ラ内の各レジスタにそれぞれセットする。ここでは、1
00(16進)番地以降に実際に転送されるDMA転送
デ−タ領域をとり、1000(16進)番地以降にDM
A転送情報テ−ブル、例えば、各転送ブロックのメモリ
アドレスと転送バイト数と連続する次のブロックのリン
クアドレス等が記述される。これらの詳細は、図4にお
いて説明する。
FIG. 2 is a schematic diagram showing a map on the main memory. In FIG. 2, 3 is a main memory, 12 is a DMA transfer data area, and 13 is a DMA transfer information table.
As shown in FIG. 2, in the main memory 3, when performing the DMA transfer, after the DMA transfer information table 13 is created, the first DMA transfer information block is transferred to the DMA controller.
Is set to each register in the register. Here, 1
The DMA transfer data area actually transferred after the address 00 (hexadecimal) is taken.
A transfer information table, for example, the memory address of each transfer block, the number of transfer bytes, and the link address of the next block that is continuous. These details will be described with reference to FIG.

【0009】図4は、図2の詳細な配置を示す図であっ
て、リンクアレイチェインデ−タ転送時のメモリマップ
を示している。図4において、3は主メモリ、14,1
5,16は転送されるデ−タブロックの領域であって、
DMA転送デ−タ領域、17〜25はこれらの転送デ−
タのDMA転送情報を記述するためのDMA転送情報テ
−ブルである。DMA転送デ−タ領域における14は転
送ブロックA、15は転送ブロックB、16は転送ブロ
ックCである。また、DMA転送情報テ−ブルにおい
て、17〜19は転送ブロックBの情報を格納するテ−
ブル、20〜22は転送ブロックCの情報を格納するテ
−ブル、23〜25は転送ブロックAの情報を格納する
テ−ブルである。このように、リンクチェインで連結す
るので、ブロック毎に、主メモリ3の任意の領域を各デ
−タ転送ブロックに割り当てることができる。情報テ−
ブルにおける17はメモリアドレスB、18は転送バイ
ト数B、19はリンクアドレスY、20はメモリアドレ
スC、21は転送バイト数C、22は転送終了情報、2
3はメモリアドレスA、24は転送バイト数A、25は
リンクアドレスxである。リンクはX→Y→転送終了情
報の順序で結合される。
FIG. 4 is a diagram showing a detailed arrangement of FIG. 2, and shows a memory map at the time of link array chain data transfer. In FIG. 4, 3 is a main memory, and 14 and 1
5 and 16 are data block areas to be transferred,
DMA transfer data area, 17 to 25
This is a DMA transfer information table for describing the DMA transfer information of the data. 14 is a transfer block A, 15 is a transfer block B, and 16 is a transfer block C in the DMA transfer data area. In the DMA transfer information table, 17 to 19 are tables for storing information on the transfer block B.
Tables 20 to 22 are tables for storing information of the transfer block C, and 23 to 25 are tables for storing information of the transfer block A. As described above, since the links are connected by the link chain, an arbitrary area of the main memory 3 can be allocated to each data transfer block for each block. Information table
17 is a memory address B, 18 is a transfer byte number B, 19 is a link address Y, 20 is a memory address C, 21 is a transfer byte number C, 22 is transfer end information, 2
3 is a memory address A, 24 is a transfer byte number A, and 25 is a link address x. Links are linked in the order of X → Y → transfer end information.

【0010】図5A,図5Bは、それぞれDMAコント
ロ−ラおよび処理装置上のプログラムの動作フロ−チャ
−トである。いま、入出力機器6と主メモリ3との間
で、DMAによるデ−タ転送を3段のリンクアレイチェ
インで行う場合、処理装置1上のプログラムは、先ず1
段目のDMA転送情報23〜25を主メモリ3上の例え
ば1200番地以降に、2段目のDMA転送情報17〜
19を主メモリ3上の例えば1000番地以降に、3段
目のDMA転送情報20〜22を主メモリ3上の例えば
1100番地以降に、それぞれ作成する。次に、1段目
のDMA転送情報に基づいて、DMA転送メモリアドレ
スA23をDMAコントロ−ラ7内のアドレスレジスタ
8に、またDMA転送バイト数A24をDMAコントロ
−ラ7内のカウントレジスタ9に、またリンクアドレス
X25をDMAコントロ−ラ7内のチェイニングアドレ
スレジスタ10に、そしてDMAコントロ−ラ7内のム
−ブカウントレジスタ26を初期値‘0’に、それぞれ
セットする(ステップ101)。次に、プログラムによ
り入出力機器6に接続された入出力制御機構5に対し
て、チャネル動作に必要な処理を行うことにより、DM
Aコントロ−ラ7は入出力制御機構5からのデ−タ転送
要求に従って入出力機器6と主メモリ3との間でデ−タ
転送を行う(ステップ102)。デ−タ転送の期間中、
1バイトのデ−タが転送される毎にム−ブカウントレジ
スタ26は、+1ずつカウントアップする(ステップ1
03)。DMAコントロ−ラ7は、主メモリ3上のアド
レス100番地からAバイト分の転送(転送ブロックA
14)を行うと(ステップ104)、チェイニングアド
レスレジスタ10の内容リンクアドレスX、つまり10
00番地以降を新しいDMA転送情報とする(ステップ
101)。この時点では、ム−ブカウントレジスタ26
の値は、Aとなっている。次に、DMAコントロ−ラ
は、1000番地以降のデ−タ、メモリアドレスB、転
送バイト数B、リンクアドレスYを、順番に、アドレス
レジスタ8、カウントレジスタ9、およびチェイニング
アドレスレジスタ10に、それぞれセットした後、主メ
モリ3上のアドレス、つまり600番地から引き続きデ
−タ転送を行う。600番地からBバイト分の転送(ブ
ロック16)を行った時点で、チェイニングアドレスレ
ジスタ10の内容としてリンクアドレスY、つまり11
00番地以降を新しいDMA転送情報にする(ステップ
101)。この時点では、ム−ブカウントレジスタ26
の値は、A+Bとなっている。次に、DMAコントロ−
ラ7は、主メモリ3上の1100番地以降のデ−タ、つ
まりメモリアドレスC20、転送バイト数C21、およ
び終了情報22を、順番にDMAコントロ−ラ7内のア
ドレスレジスタ8、カウントレジスタ9、およびチェイ
ニングアドレスレジスタ10に、それぞれセットした後
(ステップ101)、主メモリ3上のアドレス、つまり
400番地から引き続きデ−タ転送を行う(ステップ1
02)。400番地からCバイト分の転送(ブロック1
5)を行った時点で、チェイニングアドレスレジスタ1
0には、以降のチェイニングアドレスが入っていないの
で、リンクアレイチェインによるDMA転送は終了する
(ステップ104,105)。
FIGS. 5A and 5B are operation flowcharts of programs on the DMA controller and the processing device, respectively. Now, when data transfer by DMA between the input / output device 6 and the main memory 3 is performed in a three-stage link array chain, the program on the processing device 1 first has 1
The second-stage DMA transfer information 17 to 25 is stored in the main memory 3 at, for example, the address 1200 or later.
19 is created on the main memory 3 at, for example, address 1000, and the third-stage DMA transfer information 20 to 22 is created on the main memory 3, for example, at address 1100 and on. Next, based on the DMA transfer information of the first stage, the DMA transfer memory address A23 is stored in the address register 8 in the DMA controller 7, and the DMA transfer byte number A24 is stored in the count register 9 in the DMA controller 7. The link address X25 is set to the chaining address register 10 in the DMA controller 7, and the move count register 26 in the DMA controller 7 is set to the initial value "0" (step 101). Next, a program necessary for the channel operation is performed on the input / output control mechanism 5 connected to the input / output device 6 by the program, so that the DM
The A controller 7 transfers data between the input / output device 6 and the main memory 3 in accordance with the data transfer request from the input / output control mechanism 5 (step 102). During the data transfer,
Every time one byte of data is transferred, the move count register 26 counts up by +1 (step 1).
03). The DMA controller 7 transfers A bytes from address 100 on the main memory 3 (transfer block A
14) (step 104), the content link address X of the chaining address register 10, that is, 10
Addresses subsequent to 00 are set as new DMA transfer information (step 101). At this point, the move count register 26
Is A. Next, the DMA controller sequentially stores the data after address 1000, the memory address B, the number of transfer bytes B, and the link address Y in the address register 8, the count register 9, and the chaining address register 10 in order. After each setting, data transfer is continuously performed from the address on the main memory 3, that is, address 600. When the transfer of B bytes from address 600 (block 16) is performed, the link address Y, ie, 11
Addresses subsequent to 00 are set as new DMA transfer information (step 101). At this point, the move count register 26
Is A + B. Next, the DMA control
The controller 7 sequentially stores data after address 1100 on the main memory 3, that is, the memory address C20, the number of transfer bytes C21, and the end information 22 in the address register 8, the count register 9, and the After setting in the chaining address register 10 (step 101), data transfer is continuously performed from the address on the main memory 3, that is, address 400 (step 1).
02). Transfer of C bytes from address 400 (Block 1
5), the chaining address register 1
Since 0 does not include the subsequent chaining address, the DMA transfer by the link array chain ends (steps 104 and 105).

【0011】DMA転送が正常に終了した場合、ム−ブ
カウントレジスタ26の値は、ブロックA14の転送バ
イト数A24と、ブロックB16の転送バイト数B18
と、ブロックC15の転送バイト数C21の総和と一致
する。いま、DMA転送が転送ブロックC15を、例え
ば10バイト転送した時点で、転送エラ−が発生した場
合、ム−ブカウントレジスタ26には、A+B+10と
いう値が残っている。DMA転送が終了すると、DMA
コントロ−ラ7は処理装置1に対して終了割り込みを報
告する(ステップ105)。処理装置1上のプログラム
は、図5Bに示すように、終了割り込みを受け取ると、
入出力制御機構6のステ−タスレジスタをチェックし
(ステップ201)、デ−タ転送が正常終了したか、異
常終了したかを判定する(ステップ202)。正常終了
した場合には、引き続き次の処理に進む(ステップ20
3)。また、異常終了した場合、例えば、ブロックCの
転送途中で異常終了したときには、ブロックA14の転
送バイト数24と、ム−ブカウントレジスタ26の内容
を比較すると、ム−ブカウントレジスタ26の方が大き
いので(ステップ204)、ブロックAの転送は正常に
終了したことがわかる。この場合には、リンクアレイチ
ェイニングで、次ブロックに続く(ステップ205)。
次に、ブロックA14の転送バイト数A24およびブロ
ックB16の転送バイト数B18の和と、ム−ブカウン
トレジスタ26の内容を比較すると、ム−ブカウントレ
ジスタ26の方が大きいので(ステップ204)、ブロ
ックA14、ブロックB16は、ともに転送が正常終了
したことがわかる。この場合にも、リンクアレイチェイ
ニングで、次ブロックに続く(ステップ205)。次
に、ブロックA14の転送バイト数A24、ブロックB
16の転送バイト数B18、およびブロックC15の転
送バイト数C21の総和と、ム−ブカウントレジスタ2
6の内容とを比較すると、ム−ブカウントレジスタ26
の方が小さいので(ステップ204)、ブロックC15
の転送途中で終了したことと、ブロックC15への転送
済みバイト数、つまり10バイトがわかる。ム−ブカウ
ントレジスタの値から転送済みバイト数を得て、次の情
報からDMA転送指示を行う(ステップ206)。
When the DMA transfer is completed normally, the value of the move count register 26 is determined by the transfer byte number A24 of the block A14 and the transfer byte number B18 of the block B16.
And the sum of the transfer byte number C21 of the block C15. If a transfer error occurs when the DMA transfer transfers the transfer block C15, for example, by 10 bytes, the value A + B + 10 remains in the move count register 26. When the DMA transfer is completed,
The controller 7 reports an end interrupt to the processing device 1 ( step 105 ). When the program on the processing device 1 receives the end interrupt, as shown in FIG. 5B,
The status register of the input / output control mechanism 6 is checked (step 201), and it is determined whether the data transfer has been completed normally or abnormally (step 202). If the processing is normally completed, the process proceeds to the next process (step 20).
3). When the transfer is abnormally terminated, for example, when the transfer is terminated abnormally in the middle of the transfer of the block C, the transfer byte number 24 of the block A14 is compared with the contents of the move count register 26. Since it is large (step 204), it can be seen that the transfer of block A has been completed normally. In this case, the link array chaining continues to the next block (step 205).
Next, comparing the sum of the transfer byte number A24 of the block A14 and the transfer byte number B18 of the block B16 with the content of the move count register 26, the move count register 26 is larger (step 204). It can be seen that both the blocks A14 and B16 have successfully completed the transfer. Also in this case, the link array chaining continues to the next block (step 205). Next, the number of transfer bytes A24 of the block A14, the block B
The sum of the transfer byte number B18 of 16 and the transfer byte number C21 of the block C15 and the move count register 2
6, the move count register 26
Is smaller (step 204), so block C15
And the number of bytes transferred to the block C15, that is, 10 bytes. The number of transferred bytes is obtained from the value of the move count register, and a DMA transfer instruction is issued from the next information (step 206).

【0012】これにより、ブロックC15の10バイト
の次から転送を再開すればよいことがわかる。従って、
処理装置1のプログラムは、ブロックC15へのDMA
転送情報20〜22を基にして、DMAコントロ−ラ7
内のアドレスレジスタ8にはメモリアドレスC20+1
0をセットし、カウントレジスタ9には転送バイト数C
21−10をセットし、チェイニングアドレスレジスタ
10には終了情報22をセットする(ステップ10
1)。そして、入出力制御機構5にDMA転送スタ−ト
の起動を行うことにより、DMA転送を再開し、ブロッ
クC15の残りの分、例えば40バイトを転送する。こ
のように、DMA転送中エラ−が発生してソフトウェア
がリトライする時にも、ム−ブカウントレジスタ26に
より、転送済みバイト数を簡単に求めることができるの
で、最初から転送し直す必要がなく、次のデ−タから再
開すればよいので、デ−タ処理効率は向上する。また、
DMA転送の先頭からリトライが不可能な入出力機器に
対して、ソフトウェアによる転送継続処理が容易にな
る。
Thus, it is understood that the transfer should be resumed after the 10 bytes of the block C15. Therefore,
The program of the processing device 1 stores the DMA in the block C15.
DMA controller 7 based on transfer information 20-22
Memory register C20 + 1
0 is set, and the number of transfer bytes C is set in the count register 9.
21-10, and the end information 22 is set in the chaining address register 10 (step 10).
1). Then, by starting the DMA transfer start to the input / output control mechanism 5, the DMA transfer is restarted and the remaining block C15, for example, 40 bytes, is transferred. As described above, even when an error occurs during DMA transfer and the software retries, the number of transferred bytes can be easily obtained by the move count register 26, so that it is not necessary to transfer the data again from the beginning. Since it is sufficient to restart from the next data, the data processing efficiency is improved. Also,
For input / output devices that cannot be retried from the beginning of DMA transfer, transfer continuation processing by software becomes easy.

【0013】[0013]

【発明の効果】以上説明したように、本発明によれば、
DMA転送中にエラ−が発生した場合でも、転送済みバ
イト数を簡単に得ることができるので、ソフトウェアに
よる転送リトライをDMA転送の先頭からやり直す必要
がなく、途中から再開すればよいため、デ−タ処理の効
率を向上させることができる。
As described above, according to the present invention,
Even if an error occurs during the DMA transfer, the number of transferred bytes can be easily obtained. Therefore, there is no need to restart the transfer retry by software from the beginning of the DMA transfer. Data processing efficiency can be improved.

【0014】[0014]

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

【図1】本発明の一実施例を示すDMAコントロ−ラ内
のレジスタ群の配置図である。
FIG. 1 is an arrangement diagram of a register group in a DMA controller according to an embodiment of the present invention.

【図2】DMA転送における主メモリ上のマップ図であ
る。
FIG. 2 is a map diagram on a main memory in a DMA transfer.

【図3】本発明が適用される処理システムの構成図であ
る。
FIG. 3 is a configuration diagram of a processing system to which the present invention is applied.

【図4】図2の詳細な配置(リンクアレイチェインデー
タ転送時のメモリマップ)を示す図である。
FIG. 4 is a detailed layout of FIG . 2 (link array chain
FIG. 6 is a diagram showing a memory map at the time of data transfer.

【図5A】本発明におけるDMAコントロ−ラの動作フ
ロ−チャ−トである。
FIG. 5A is an operation flowchart of a DMA controller according to the present invention.

【図5B】本発明における処理装置のプログラムの動作
フロ−チャ−トである。
FIG. 5B is an operation flowchart of a program of the processing apparatus according to the present invention.

【符号の説明】[Explanation of symbols]

1 処理装置 2 バスコントロ−ラ 3 主メモリ 4 メモリコントロ−ラ 5 入出力制御機構 6 入出力機器 7 DMAコントロ−ラ 8 アドレスレジスタ 9 カウントレジスタ 10 チェイニングアドレスレジスタ 26 ム−ブカウントレジスタ 12 DMA転送デ−タ領域 13 DMA転送情報テ−ブル 14〜16 転送ブロック 17,20,23 メモリアドレスA,B,C 18,21,24 転送バイト数A,B,C 19,22,25 リンクアドレス DESCRIPTION OF SYMBOLS 1 Processing device 2 Bus controller 3 Main memory 4 Memory controller 5 I / O control mechanism 6 I / O device 7 DMA controller 8 Address register 9 Count register 10 Chaining address register 26 Move count register 12 DMA transfer Data area 13 DMA transfer information table 14-16 Transfer block 17, 20, 23 Memory address A, B, C 18, 21, 24 Number of transfer bytes A, B, C 19, 22, 25 Link address

───────────────────────────────────────────────────── フロントページの続き (72)発明者 稲川 隆 神奈川県海老名市下今泉810番地 株式 会社日立製作所 オフィスシステム設計 開発センタ内 (56)参考文献 特開 平1−283659(JP,A) 特開 平1−321541(JP,A) 特開 平1−255061(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 13/28 - 13/362 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Takashi Inagawa 810 Shimoimaizumi, Ebina-shi, Kanagawa Hitachi, Ltd. Office System Design and Development Center (56) References JP-A-1-283659 (JP, A) JP-A-1-321541 (JP, A) JP-A-1-2505061 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 13/28-13/362

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 DMAコントローラを備え、入出力機器
と主メモリ間でDMAによるデータ転送を行う情報処理
システムのデータ転送方法であって、 上記DMAコントローラ内にDMA転送を行った回数を
カウントする手段を配置し、 DMA転送終了の割り込みがあると、処理装置上のプロ
グラムは、まず上記メモリ上の第1の転送ブロックバイト数と上記
DMA転送回数カウント手段の内容を比較し、該第1の
転送ブロックバイト数より上記DMA転送回数カウント
手段の内容が大きい場合に、該第1の転送ブロックバイ
ト数と第2の転送ブロックバイト数の総和と上記DMA
転送回数カウント手段の内容を比較し、第1の転送ブロ
ックバイト数と第2の転送ブロックバイト数の総和より
上記DMA転送回数カウント手段の内容が大きい場合
に、該第1の転送ブロックバイト数と第2の転送ブロッ
クバイト数と第3の転送ブロックバイト数の総和と上記
DMA転送回数カウント手段の内容を比較する処理を、
それ以前の転送バイト数の総和が上記DMA転送回数カ
ウント手段の内容以上になるまで続け、 そのときの転送バイト数の総和とDMA転送回数カウン
ト手段の内容に基づいて、 全ての転送ブロックについて
正常終了したか、あるいはどの転送ブロックの何バイト
数転送した時点で異常終了したかを判別し、 異常終了した場合には、上記DMAコントローラに終了
した次のデータから転送再開させることを特徴とするデ
ータ転送方法。
1. A data transfer method for an information processing system comprising a DMA controller and performing data transfer by DMA between an input / output device and a main memory, wherein a means for counting the number of times a DMA transfer is performed in the DMA controller. When there is an interrupt to end the DMA transfer, the program on the processing device firstly determines the first transfer block byte number on the memory and the
The contents of the DMA transfer number counting means are compared and the first
DMA transfer count from above transfer block byte count
When the content of the means is large, the first transfer block
And the sum of the number of bytes of the second transfer block and the DMA
The contents of the transfer number counting means are compared, and the first transfer block
From the sum of the number of check bytes and the number of bytes of the second transfer block
When the content of the DMA transfer number counting means is large
The first transfer block byte number and the second transfer block
The sum of the number of bytes and the number of bytes of the third transfer block and the above
The process of comparing the contents of the DMA transfer number counting means is as follows:
The sum of the number of bytes transferred before that is the number of DMA transfers.
The number of bytes transferred at that time and the count of the number of DMA transfers
Based on the contents of the transfer means, it is determined whether all the transfer blocks have been completed normally or the number of bytes in which transfer block has been transferred abnormally. If the transfer ends abnormally, the DMA controller terminates. A data transfer method characterized by restarting transfer from the next data.
JP07381991A 1991-03-13 1991-03-13 Data transfer method Expired - Fee Related JP3246605B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07381991A JP3246605B2 (en) 1991-03-13 1991-03-13 Data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07381991A JP3246605B2 (en) 1991-03-13 1991-03-13 Data transfer method

Publications (2)

Publication Number Publication Date
JPH05181786A JPH05181786A (en) 1993-07-23
JP3246605B2 true JP3246605B2 (en) 2002-01-15

Family

ID=13529149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07381991A Expired - Fee Related JP3246605B2 (en) 1991-03-13 1991-03-13 Data transfer method

Country Status (1)

Country Link
JP (1) JP3246605B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4563829B2 (en) * 2005-01-27 2010-10-13 富士通株式会社 Direct memory access control method, direct memory access control device, information processing system, program

Also Published As

Publication number Publication date
JPH05181786A (en) 1993-07-23

Similar Documents

Publication Publication Date Title
JP3433385B2 (en) Apparatus and method for dynamically chaining direct memory access operations to be performed on input / output devices
JP3609444B2 (en) Data processing system
US11003606B2 (en) DMA-scatter and gather operations for non-contiguous memory
JP3266470B2 (en) Data processing system with per-request write-through cache in forced order
JP3246605B2 (en) Data transfer method
US6718405B2 (en) Hardware chain pull
JP2807010B2 (en) Tape drive control unit for interconnection between host computer and tape drive and method of operating the same
JP3206580B2 (en) DMA data transfer control method and input / output processing device
JP2001014266A (en) Dma transfer circuit and dma transfer method
US5694584A (en) Information processing system capable of quickly processing a parameter and a command necessary for drawing processing
JPS6240736B2 (en)
JP3168845B2 (en) Digital signal processor
JP2000276438A (en) Dma data transfer method
JPS6299827A (en) Buffer control system
JP2825589B2 (en) Bus control method
JPH07152574A (en) Program loading system
JPS6118032A (en) External memory controller
JPS59144955A (en) Information processor
JP2785855B2 (en) Information processing device
JPH08305686A (en) Character processor
JPH0561668B2 (en)
JPH01261763A (en) Dma transfer control device
JPS6215644A (en) Cache memory control circuit
JPH02299048A (en) Transfer control system
JPH02287661A (en) Data access system

Legal Events

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