JPH06131294A - Data transfer device - Google Patents

Data transfer device

Info

Publication number
JPH06131294A
JPH06131294A JP30597892A JP30597892A JPH06131294A JP H06131294 A JPH06131294 A JP H06131294A JP 30597892 A JP30597892 A JP 30597892A JP 30597892 A JP30597892 A JP 30597892A JP H06131294 A JPH06131294 A JP H06131294A
Authority
JP
Japan
Prior art keywords
data
register
transfer
data transfer
dma
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
JP30597892A
Other languages
Japanese (ja)
Inventor
Yasuyuki Yamamoto
靖之 山本
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP30597892A priority Critical patent/JPH06131294A/en
Publication of JPH06131294A publication Critical patent/JPH06131294A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the throughput of the device. CONSTITUTION:If a DMA control circuit 15 receives a request to start data transfer of high priority while data transfer of low priority is performed, the DMA control circuit 15 interrupts the data transfer of low priority temporarily. At this time, the status at the interruption point of time is stored in an address register 16 and a current transfer quantity register 24. The DMA control circuit 15 starts the data transfer of high priority level and when the transfer ends, the circuit 15 restarts the data transfer of low priority corresponding to the status at the interruption point which is stored in the address register 16 and current transfer quantity register 24.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えばコンピュータシ
ステムなどに用いて好適なデータ転送装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer device suitable for use in, for example, a computer system.

【0002】[0002]

【従来の技術】従来のコンピュータシステムにおいて
は、そのメインメモリから周辺デバイス(例えば画像処
理ボードや音声処理ボード)へのデータの転送は、CP
U(中央演算処理装置)を介して行われるようになって
いる。
2. Description of the Related Art In a conventional computer system, a CP is used to transfer data from its main memory to a peripheral device (for example, an image processing board or an audio processing board).
It is designed to be performed via U (central processing unit).

【0003】即ち、例えば図7(a)に示すコンピュー
タシステムにおいては、そのメインメモリ3から周辺デ
バイス4へデータを転送する場合、CPU1は、リード
命令を受け取り、その解読を行う。そして、メインメモ
リ3に制御信号としてのリード信号を出力する。CPU
1よりメインメモリ3にリード信号が出力されると、メ
インメモリ3からデータが読み出され、CPU1の内蔵
するレジスタ1aに転送される。
That is, for example, in the computer system shown in FIG. 7A, when transferring data from the main memory 3 to the peripheral device 4, the CPU 1 receives a read command and decodes it. Then, a read signal as a control signal is output to the main memory 3. CPU
When a read signal is output from the main memory 3 to the main memory 3, the data is read from the main memory 3 and transferred to the register 1a incorporated in the CPU 1.

【0004】レジスタ1aに転送されたデータは、そこ
で一時記憶され、CPU1から周辺デバイス4に制御信
号としてのライト信号が出力される。CPU1より周辺
デバイス4にライト信号が出力されると、レジスタ1a
に記憶されたデータがそこから読み出され、周辺デバイ
ス4に転送される。
The data transferred to the register 1a is temporarily stored therein, and the CPU 1 outputs a write signal as a control signal to the peripheral device 4. When a write signal is output from the CPU 1 to the peripheral device 4, the register 1a
The data stored in is read from it and transferred to the peripheral device 4.

【0005】なお、図中、太い矢印はデータの流れを示
し、細い矢印は制御信号を示す。
In the figure, thick arrows indicate data flow, and thin arrows indicate control signals.

【0006】以上のように、このコンピュータシステム
においては、リード命令の受け取り→リード命令の解読
→メインメモリ3からのデータの読み出し→周辺デバイ
ス4へのデータの転送という4つのステップ(図7
(b))を1サイクルとして、メインメモリ3からCP
U1を介して周辺デバイス4へのデータの転送が行われ
るようになっている。
As described above, in this computer system, the four steps of receiving the read command, decoding the read command, reading the data from the main memory 3, and transferring the data to the peripheral device 4 (FIG. 7).
(B)) is set as one cycle, and CP from the main memory 3
Data is transferred to the peripheral device 4 via U1.

【0007】従って、データの転送に時間がかかる課題
があった。
Therefore, there is a problem that it takes time to transfer the data.

【0008】そこで、メインメモリ3から周辺デバイス
4(または、その逆)へのデータの転送を、CPU1を
介さずに行うDMA(Direct Memory Access)と呼ばれ
るデータ転送方式がある。DMAによりデータの転送を
行うコンピュータシステムにおいては、図8(a)に示
すように、CPU1に制御されるDMAコントローラ3
1がCPU1に代わって、メインメモリ3にリード信号
を出力すると、メインメモリ3からデータが読み出され
る。さらに、DMAコントローラ31がCPU1に代わ
って、周辺デバイス4にライト信号を出力すると、メイ
ンメモリ3から読み出されたデータが、CPU1を介さ
ず、直接、周辺デバイス4に転送される。
Therefore, there is a data transfer method called DMA (Direct Memory Access) in which data is transferred from the main memory 3 to the peripheral device 4 (or vice versa) without passing through the CPU 1. In a computer system that transfers data by DMA, as shown in FIG. 8A, the DMA controller 3 controlled by the CPU 1
When 1 outputs a read signal to the main memory 3 instead of the CPU 1, the data is read from the main memory 3. Further, when the DMA controller 31 outputs a write signal to the peripheral device 4 instead of the CPU 1, the data read from the main memory 3 is directly transferred to the peripheral device 4 without passing through the CPU 1.

【0009】従って、メインメモリ3からのデータの読
み出し→周辺デバイス4へのデータの転送という2つの
ステップ(図8(b))を1サイクルとして、メインメ
モリ3から周辺デバイス4へのデータの転送が行われる
ようになっているので、図7(a)における場合に比較
して、より短時間でデータを転送することができる。
Therefore, the transfer of data from the main memory 3 to the peripheral device 4 is performed with the two steps of reading data from the main memory 3 to transferring the data to the peripheral device 4 (FIG. 8B) as one cycle. As described above, the data can be transferred in a shorter time as compared with the case of FIG. 7A.

【0010】さらに、この場合、CPU1はデータの転
送処理にほとんど係る必要がないので、CPU1は他の
処理を行うことができ、従って装置の処理能力を向上さ
せることができる。
Further, in this case, since the CPU 1 has almost no need to be involved in the data transfer processing, the CPU 1 can perform other processing, and thus the processing capacity of the device can be improved.

【0011】[0011]

【発明が解決しようとする課題】ところで、DMAコン
トローラ31が、例えば2チャンネルなど、複数チャン
ネルのDMA転送を制御する場合がある。従来、このよ
うに2チャンネル以上のDMA転送を制御する場合、一
方のチャンネルのDMA転送を実行中に、優先順位の高
い他のDMA転送の要求があったとしても、現在実行中
のDMA転送が終了するまで、優先順位の高い他のDM
A転送を実行することができない課題があった。
By the way, there are cases where the DMA controller 31 controls DMA transfer of a plurality of channels such as two channels. Conventionally, when controlling a DMA transfer of two or more channels in this way, even if there is a request for another DMA transfer having a high priority during the DMA transfer of one channel, the currently executed DMA transfer is Until the end, other DM with high priority
There was a problem that A transfer could not be executed.

【0012】さらにまた、例えば図9に示すように、C
PU1が処理Aを実行した後、DMA転送を10回以上
行ってから処理Bに移行するような場合、CPU1は処
理Aを実行中に、DMA転送が1回終了する毎に、DM
Aコントローラ31からの割込を受け付け、DMAの転
送回数をカウントしなければならなかった。このため、
プログラムが煩雑になり、実行速度が低下する課題があ
った。
Furthermore, as shown in FIG. 9, for example, C
In the case where the PU1 executes the process A and then performs the DMA transfer 10 times or more and then shifts to the process B, the CPU 1 DMs each time the DMA transfer ends once while the process A is being executed.
It has been necessary to accept an interrupt from the A controller 31 and count the number of DMA transfers. For this reason,
There is a problem that the program becomes complicated and the execution speed decreases.

【0013】本発明はこのような状況に鑑みてなされた
ものであり、優先順位の高いDMA転送を速やかに開始
することができるようにし、また、コンピュータの処理
速度が低下するのを抑制するものである。
The present invention has been made in view of the above circumstances, and makes it possible to quickly start a high-priority DMA transfer and suppress a decrease in the processing speed of a computer. Is.

【0014】[0014]

【課題を解決するための手段】請求項1に記載のデータ
転送装置は、中央演算処理装置としてのCPU1を介さ
ずに、例えば周辺デバイス4などの任意の装置から、例
えばメインメモリ3などの他の装置へのデータの転送を
制御するデータ転送装置において、データ転送中に、他
のデータ転送のリクエストが発生したとき、データ転送
の優先順位を判定し、優先順位の低いデータ転送を中断
し、優先順位の高いデータ転送を開始させる制御手段と
してのDMA制御回路15と、データ転送を途中で中断
するとき、中断した時点におけるステイタスを記憶する
記憶手段としての回数レジスタ13、アドレスレジスタ
16とを備え、DMA制御回路15は、優先順位の高い
データ転送が終了したとき、回数レジスタ13およびア
ドレスレジスタ16に記憶されているステイタスに対応
して、優先順位の低いデータ転送を再開させることを特
徴とする。
A data transfer device according to a first aspect of the present invention is arranged such that, for example, a peripheral device 4 or any other device, for example, a main memory 3 or the like, other than a main memory 3 or the like, without using a CPU 1 as a central processing unit. In the data transfer device that controls the transfer of data to the device, when a request for another data transfer is generated during the data transfer, the priority order of the data transfer is determined, and the low-priority data transfer is interrupted, A DMA control circuit 15 is provided as a control means for starting high-priority data transfer, and a number register 13 and an address register 16 are provided as storage means for storing the status at the time of interrupting the data transfer. , DMA control circuit 15 counts the number of registers 13 and address register 1 when the high priority data transfer is completed. In response to status stored in, characterized in that to resume the low data priority.

【0015】このデータ転送装置は、データ転送中に、
他のデータ転送のリクエストが発生したとき、データ転
送の優先順位を判定し、優先順位の低いデータ転送を中
断し、優先順位の高いデータ転送を開始させることを許
容するか否かを指定する指定手段としてのコントロール
レジスタ18をさらに設けることができる。
This data transfer device, during data transfer,
When other data transfer requests occur, the priority of the data transfer is determined, and it is specified whether to interrupt the data transfer of the low priority and start the data transfer of the high priority. A control register 18 as a means can be further provided.

【0016】請求項3に記載のデータ転送装置は、中央
演算処理装置としてのCPU1を介さずに、例えば周辺
デバイス4などの任意の装置から、例えばメインメモリ
3などの他の装置へのデータの転送を制御するデータ転
送装置において、データ転送が終了したとき、終了時点
におけるステイタスを記憶し、CPU1の演算が終了し
たとき、記憶したステイタスをCPU1に提供する記憶
手段としての転送後ステイタスレジスタ41を備えるこ
とを特徴とする。
A data transfer apparatus according to a third aspect of the invention transfers data from an arbitrary device such as the peripheral device 4 to another device such as the main memory 3 without going through the CPU 1 as the central processing unit. In a data transfer device that controls transfer, a post-transfer status register 41 is stored as a storage unit that stores the status at the end when the data transfer ends and provides the stored status to the CPU 1 when the operation of the CPU 1 ends. It is characterized by being provided.

【0017】このデータ転送装置は、ステイタスを、C
PU1とともにアクセスが可能なメインメモリ3の所定
のアドレスに書き込むようにすることができる。また、
データ転送が終了したとき、ステイタスが所定の条件を
満たすか否かを判定し、ステイタスが所定の条件を満た
すとき、CPU1に対して割込をかけるようにすること
ができる。
In this data transfer device, the status is changed to C
It is possible to write to a predetermined address of the main memory 3 which can be accessed together with PU1. Also,
When the data transfer is completed, it is possible to determine whether or not the status satisfies a predetermined condition, and when the status satisfies the predetermined condition, the CPU 1 can be interrupted.

【0018】[0018]

【作用】請求項1に記載のデータ転送装置においては、
優先順位の低いデータ転送が実行されている場合、優先
順位の高いデータ転送のリクエストが発生したとき、優
先順位の低いデータ転送が中断され、優先順位の高いデ
ータ転送が開始される。中断した時点におけるステイタ
スが回数レジスタ13とアドレスレジスタ16に記憶さ
れ、優先順位の高いデータ転送が終了したとき、この記
憶値に対応して、優先順位の低いデータ転送が再開され
る。従って、より優先順位の高いデータ転送を迅速に実
行することが可能となる。
In the data transfer device according to claim 1,
When low-priority data transfer is being executed, when a high-priority data transfer request occurs, the low-priority data transfer is interrupted and the high-priority data transfer is started. The status at the time of the interruption is stored in the number register 13 and the address register 16, and when the data transfer with the high priority is completed, the data transfer with the low priority is restarted corresponding to the stored value. Therefore, it is possible to quickly perform data transfer with a higher priority.

【0019】請求項3に記載のデータ転送装置において
は、データ転送が終了したとき、その終了時点における
ステイタスが、転送後ステイタスレジスタ41に記憶さ
れる。従って、転送回数をCPU1が管理する必要がな
くなり、コンピュータの全体の実行速度を実質的に向上
させることができる。
In the data transfer device according to the third aspect of the present invention, when the data transfer is completed, the status at the end of the data transfer is stored in the post-transfer status register 41. Therefore, the CPU 1 does not need to manage the number of transfers, and the overall execution speed of the computer can be substantially improved.

【0020】[0020]

【実施例】図1は、本発明のデータ転送装置を応用した
コンピュータシステムの一実施例の構成を示すブロック
図である。図中、図7または図8における場合と対応す
る部分については、同一の符号を付してある。バスI/
F(バスインターフェイス)2は、CPU1へのデータ
または制御信号の入出力をCPU1に代わって制御す
る。DMAコントローラ5は、例えば図2に示すように
構成される。
1 is a block diagram showing the configuration of an embodiment of a computer system to which the data transfer apparatus of the present invention is applied. In the figure, parts corresponding to those in FIG. 7 or 8 are designated by the same reference numerals. Bus I /
An F (bus interface) 2 controls input / output of data or control signals to / from the CPU 1, instead of the CPU 1. The DMA controller 5 is configured, for example, as shown in FIG.

【0021】即ち、データバスバッファ11は、メイン
バスのデータバス(図1)に入出力するデータを一時記
憶する。アドレスバスバッファ12は、メインバスのア
ドレスバス(図1)に入出力するアドレスを一時記憶す
る。
That is, the data bus buffer 11 temporarily stores data to be input / output to / from the data bus (FIG. 1) of the main bus. The address bus buffer 12 temporarily stores the address to be input / output to / from the address bus (FIG. 1) of the main bus.

【0022】2チャンネル分の回数レジスタ13a,1
3bは、それぞれ、例えば8ビットのレジスタで構成さ
れ、そこには、メインメモリ3上でブロックに分割され
たデータを転送する各チャンネルのDMAの回数がセッ
トされる。即ち、回数レジスタ13(以下、特に13
a,13bと、チャンネルを区別する必要がない場合、
このようにまとめて記載する)には、転送するデータの
ブロックの数がセットされる。また、2チャンネル分の
現在回数レジスタ23a,23bは、それぞれ、例えば
8ビットのレジスタで構成され、ここには、各チャンネ
ルの既に行なわれた転送回数(現在回数)、即ち、転送
されたブロックの数(現在ブロック数)がセットされ
る。
Count registers 13a, 1 for two channels
Each 3b is composed of, for example, an 8-bit register, and the number of DMAs of each channel for transferring the data divided into blocks on the main memory 3 is set therein. That is, the frequency register 13 (hereinafter, especially 13
If it is not necessary to distinguish between a and 13b and the channel,
In this way, the number of blocks of data to be transferred is set. The current count registers 23a and 23b for two channels are each composed of, for example, an 8-bit register. Here, the number of times of transfer (current count) of each channel, that is, the number of transferred blocks The number (current number of blocks) is set.

【0023】2チャンネル分の転送量レジスタ14a,
14bは、それぞれ、例えば8ビットのレジスタで構成
され、そこには、1ブロック分のデータを転送するため
の各チャンネルのDMAの繰り返し回数がセットされ
る。
Transfer amount registers 14a for two channels,
Each of the 14b is composed of, for example, an 8-bit register, in which the number of DMA repetitions of each channel for transferring one block of data is set.

【0024】即ち、例えばメインメモリ3におけるデー
タの語長がワード(32ビット)で、2チャンネル分の
周辺デバイス4a,4bで取り扱われるデータの語長
が、それぞれバイト(8ビット)であり、また、周辺デ
バイス4(4a,4b)が、1回の転送で受け取ること
のできるデータの量に基づいて、データを、例えば16
バイト(128ビット=8ビット×16)単位のブロッ
クに分割するとした場合、メインメモリ3から、ワード
単位でデータを読み出し、周辺デバイス4へ転送するD
MAの動作を4回だけ繰り返せば、1ブロック分、即ち
16バイト(=ワード(4バイト)×4回)のデータが
転送されることになる。従って、この場合、転送量レジ
スタ14(14a,14b)には、1ブロック分のデー
タを転送するためのDMAの繰り返し回数としての4回
がセットされる。
That is, for example, the word length of the data in the main memory 3 is a word (32 bits), the word length of the data handled by the peripheral devices 4a and 4b for two channels is a byte (8 bits), and , The peripheral device 4 (4a, 4b) receives data, for example, 16 based on the amount of data that can be received in one transfer.
If the block is divided into units of bytes (128 bits = 8 bits × 16), the data is read from the main memory 3 in units of words and transferred to the peripheral device D.
If the operation of MA is repeated only four times, one block, that is, 16 bytes (= word (4 bytes) × 4 times) of data will be transferred. Therefore, in this case, the transfer amount register 14 (14a, 14b) is set to four times as the number of repeats of the DMA for transferring the data of one block.

【0025】さらに、例えばメインメモリ3におけるデ
ータの語長がバイト(8ビット)で、周辺デバイス4で
取り扱われるデータの語長がワード(32ビット)であ
り、またデータが、上述した場合と同様に、16バイト
(128ビット=8ビット×16)単位のブロックに分
割されるものとすると、メインメモリ3から、バイト単
位でデータを4回読み出し、即ちデータを1ワード分読
み出し、周辺デバイス4へ転送するDMAの動作を4回
だけ繰り返せば、1ブロック分、即ち16バイトのデー
タが転送されることになる。従って、この場合において
も、転送量レジスタ14には、1ブロック分のデータを
転送するためのDMAの繰り返し回数としての4回がセ
ットされることになる。
Further, for example, the word length of the data in the main memory 3 is a byte (8 bits), the word length of the data handled by the peripheral device 4 is a word (32 bits), and the data is the same as that described above. Further, assuming that the block is divided into 16-byte (128 bits = 8 bits × 16) units, data is read from the main memory 3 four times in units of bytes, that is, one word of data is read, and the data is read to the peripheral device 4. If the DMA operation for transferring is repeated only four times, one block, that is, 16 bytes of data will be transferred. Therefore, also in this case, the transfer amount register 14 is set to four times as the number of times of repeating DMA for transferring one block of data.

【0026】つまり、転送量レジスタ14には、メイン
メモリ3におけるデータの語長、および周辺デバイス4
で取り扱われるデータの語長のうちの、いずれか大きい
方の値で、1ブロック分のデータ量を割った値がセット
される。
That is, the transfer amount register 14 stores the word length of the data in the main memory 3 and the peripheral device 4.
A value obtained by dividing the data amount for one block by the larger one of the word lengths of the data handled in step 1 is set.

【0027】なお、上述したことから、転送量レジスタ
14にセットされた値と、メインメモリ3におけるデー
タの語長、および周辺デバイス4で取り扱われるデータ
の語長のうちの、いずれか大きい方の値とを乗算すれ
ば、1ブロックの大きさ(データ量)を求めることがで
きる。よって、メインメモリ3におけるデータの語長、
および周辺デバイス4で取り扱われるデータの語長は、
いずれも装置の設計段階で決まるものであるから、1ブ
ロックの大きさ(データ量)が、転送量レジスタ14に
セットされる値に基づいて決定されると考えることがで
きる。
From the above, the value set in the transfer amount register 14, the word length of the data in the main memory 3, or the word length of the data handled by the peripheral device 4, whichever is larger, is selected. By multiplying with the value, the size (data amount) of one block can be obtained. Therefore, the word length of the data in the main memory 3,
And the word length of the data handled by the peripheral device 4 is
Since all of them are determined at the design stage of the device, it can be considered that the size (data amount) of one block is determined based on the value set in the transfer amount register 14.

【0028】DMA制御回路15は、内部制御バスを介
して、DMAコントローラ5を構成する各レジスタを監
視するとともに制御する。さらに、DMA制御回路15
は、周辺デバイス4aまたは4b(図1)からの、DM
Aの要求1(DMAリクエスト1)(DMA Req
1)、または、DMAの要求2(DMAリクエスト2)
(DMA Req2)の入力を受け(DMAリクエスト
信号1または2を受信し)、コンピュータシステム(図
1)がDMAによるデータの転送をすることができる状
態であれば、DMAの要求を出力した周辺デバイス4a
または4bに、DMAの許可1(Ack1)、または許
可2(Ack2)を与える(許可信号1または2を出力
する)。
The DMA control circuit 15 monitors and controls each register constituting the DMA controller 5 via an internal control bus. Further, the DMA control circuit 15
Is the DM from the peripheral device 4a or 4b (FIG. 1).
Request 1 of A (DMA request 1) (DMA Req
1) or DMA request 2 (DMA request 2)
If the computer system (FIG. 1) is ready to transfer data by DMA after receiving (DMA Req2) input (receives DMA request signal 1 or 2), the peripheral device that outputs the DMA request 4a
Alternatively, DMA permission 1 (Ack1) or permission 2 (Ack2) is given to 4b (permit signal 1 or 2 is output).

【0029】2チャンネル分のアドレスレジスタ16
a,16bは、それぞれ、例えば32ビットのレジスタ
で構成され、そこには、各チャンネルのDMAにより転
送されるデータのブロックの現在アドレスがセットされ
る。なお、このアドレスレジスタ16(16a,16
b)は、DMAによるデータの転送が終了してもリセッ
トされず、そのまま値を記憶(保持)するようになされ
ている(後述)。
Address register 16 for two channels
Each of a and 16b is composed of, for example, a 32-bit register in which the current address of a block of data transferred by the DMA of each channel is set. The address register 16 (16a, 16a
In b), the value is not reset even after the transfer of data by DMA is completed, and the value is stored (held) as it is (described later).

【0030】2チャンネル分のスタートアドレスレジス
タ17a,17bは、それぞれ、例えば32ビットのレ
ジスタで構成され、そこには、各チャンネルのDMAに
より転送するデータのスタートアドレスがあらかじめセ
ットされている。なお、スタートアドレスレジスタ17
(17a,17b)の記憶値は、CPU1の制御により
必要に応じて変更することができるようになっている。
Each of the start address registers 17a and 17b for two channels is composed of, for example, a 32-bit register, and the start address of the data transferred by the DMA of each channel is preset therein. The start address register 17
The stored value of (17a, 17b) can be changed as required by the control of the CPU 1.

【0031】コントロールレジスタ18は、装置の動作
上必要な情報がセットされる、次に示すレジスタから構
成される。
The control register 18 is composed of the following registers in which information necessary for the operation of the device is set.

【0032】アドレスINC/DECレジスタ・・・D
MAによるデータ転送中に、アドレスレジスタ16にセ
ットされるアドレス(現在アドレス)を増加(INC)
/減少(DEC)させることを設定するレジスタ。
Address INC / DEC register ... D
Increases the address (current address) set in address register 16 during data transfer by MA (INC)
/ Register to set decrement (DEC).

【0033】DIRレジスタ・・・データの転送方向
を、例えばメインメモリ3→周辺デバイス4、または、
周辺デバイス4→メインメモリ3の各方向に設定するレ
ジスタ。
DIR register: Data transfer direction is, for example, main memory 3 → peripheral device 4, or
Registers set in each direction from peripheral device 4 to main memory 3.

【0034】メモリ語長レジスタ・・・メインメモリ3
におけるデータの語長がセットされるレジスタ。なお、
このメモリ語長レジスタには、例えばバイト(8ビッ
ト)、ハーフワード(16ビット)、ワード(32ビッ
ト)のいずれかをセットすることができるようになって
いる。そして、本実施例においては、メインメモリ3に
おけるデータの語長が、例えば32ビットになってお
り、従ってメモリ語長レジスタには、ワードがあらかじ
めセットされている。
Memory word length register: main memory 3
A register in which the word length of the data in is set. In addition,
In this memory word length register, for example, any of byte (8 bits), half word (16 bits), and word (32 bits) can be set. In this embodiment, the word length of the data in the main memory 3 is, for example, 32 bits, so that the word is preset in the memory word length register.

【0035】I/O語長レジスタ・・・周辺デバイス4
で取り扱われるデータの語長がセットされるレジスタ。
このI/O語長レジスタにおいても、メモリ語長レジス
タと同様に、バイト(8ビット)、ハーフワード(16
ビット)、ワード(32ビット)のいずれかをセットす
ることができるようになっている。そして、本実施例に
おいては、周辺デバイス4で取り扱われるデータの語長
が、例えばバイトになっており、従ってI/O語長レジ
スタには、バイトがあらかじめセットされている。
I / O word length register: peripheral device 4
A register in which the word length of the data handled in is set.
Also in this I / O word length register, similarly to the memory word length register, byte (8 bits), half word (16 bits)
Either bit) or word (32 bits) can be set. In the present embodiment, the word length of the data handled by the peripheral device 4 is, for example, a byte, and therefore the I / O word length register has a preset byte.

【0036】IRQENレジスタ・・・DMAによるデ
ータ(ブロック分割されたデータおよびブロック分割さ
れていないデータの両方を含む)の転送を終了した後
の、IRQ(割り込み要求)制御回路21のIRQ信号
の出力の許可/禁止を設定するレジスタ。
IRQEN register: Output of IRQ signal of IRQ (interrupt request) control circuit 21 after transfer of data (including both block-divided data and non-block-divided data) by DMA is completed Register to set permission / prohibition of.

【0037】DMAENレジスタ・・・DMAコントロ
ーラ5の起動/停止を設定するレジスタ。
DMAEN register ... A register for setting start / stop of the DMA controller 5.

【0038】CHCLRレジスタ・・・転送するデータ
のチャンネルのレジスタの初期化をする場合には、0お
よび1のうちの、例えば1がセットされるレジスタ。な
お、通常時には、0および1のうちの、例えば0がセッ
トされる。
CHCLR register: A register in which, for example, 1 of 0 and 1 is set when the register of the channel of the data to be transferred is initialized. Note that normally, for example, 0 of 0 and 1 is set.

【0039】BDMAENレジスタ・・・ブロック単位
でのデータの転送の許可/禁止を設定するレジスタ。
BDMAEN register: a register for setting permission / prohibition of data transfer in block units.

【0040】BIRQENレジスタ・・・ブロック分割
されたデータの、最後のブロックを転送した後の、IR
Q制御回路21のIRQ信号の出力の許可/禁止を設定
するレジスタ。なお、このBIRQENレジスタの設定
は、BDMAENレジスタに、ブロック単位でのデータ
の転送の許可が設定されている場合のみ有効になる。し
かしながら、IRQENレジスタの設定値には依存しな
い。
BIRQEN register: IR after transferring the last block of block-divided data
A register for setting permission / prohibition of the output of the IRQ signal of the Q control circuit 21. The setting of the BIRQEN register is valid only when the BDMAEN register is set to allow data transfer in block units. However, it does not depend on the setting value of the IRQEN register.

【0041】BFSADDENレジスタ・・・ブロック
分割されたデータの、最後のブロックを転送した後に、
スタートアドレスレジスタ17に記憶されているアドレ
スを、アドレスレジスタ16にセットすることを許可/
禁止することを設定するレジスタ。但し、CHCLRレ
ジスタに初期化モードがセットされ、DMAコントロー
ラ5が初期化された後、初めてDMAENレジスタに、
DMAコントローラ5の起動の設定が行われた場合、即
ちDMAコントローラ5が起動された場合、BFSAD
DENレジスタの設定値に拘らず、アドレスレジスタ1
6には、スタートアドレスレジスタ17に記憶されてい
るアドレスがセットされる。
BFSADDEN register ... After transferring the last block of the data divided into blocks,
Allows the address stored in the start address register 17 to be set in the address register 16 /
Register to set prohibition. However, after the initialization mode is set in the CHCLR register and the DMA controller 5 is initialized, the DMAEN register is first
When the DMA controller 5 is set to be activated, that is, when the DMA controller 5 is activated, BFSAD
Address register 1 regardless of the setting value of the DEN register
The address stored in the start address register 17 is set in 6.

【0042】PRINTレジスタ・・・優先順位の低い
DMA転送を中断し、優先順位の高いDMA転送を開始
する動作の許可/禁止を設定するレジスタ。
PRINT register: a register for setting permission / prohibition of an operation for interrupting a low priority DMA transfer and starting a high priority DMA transfer.

【0043】INTレジスタ・・・優先順位の低いDM
A転送を中断したとき、それを記憶しておくレジスタ。
INT register: DM with low priority
A register that stores the transfer when it is interrupted.

【0044】なお、上述したレジスタの説明で、例えば
許可/禁止などのように、○/×と記載した部分におい
て、○側を意味する場合には、0および1のうちの、例
えば1がレジスタにセットされるようになっており、ま
た、×側を意味する場合には、0および1のうちの、例
えば0がレジスタにセットされるようになっている。
In the above description of the register, in the part described as ◯ / × such as permission / prohibition, when the ◯ side is meant, for example, 1 of 0 and 1 is the register. Is set to 0. When the x side is meant, for example, 0 of 0 and 1 is set to the register.

【0045】2チャンネル分の周辺アドレスレジスタ1
9a,19bは、それぞれ、例えば32ビットのレジス
タで構成され、そこには、各チャンネルのDMAの対象
となる周辺デバイス(図1においては、周辺デバイス4
a,4b)の内蔵するバッファに割り当てられたアドレ
スがセットされる。
Peripheral address register 1 for 2 channels
Each of 9a and 19b is composed of, for example, a 32-bit register in which a peripheral device to be the target of DMA of each channel (in FIG. 1, the peripheral device 4
The addresses assigned to the built-in buffers a, 4b) are set.

【0046】タイミング制御回路20は、例えばタイマ
IC(図示せず)などより供給されるクロックから所定
の同期信号を生成し、内部制御バスを介して、DMAコ
ントローラ5を構成する各ブロックに供給する。IRQ
制御回路21は、DMAコントローラ5が所定の状態に
なったとき、バスI/F2を介し、CPU1(図1)に
対して割り込み要求を出す(割り込み要求信号(IRQ
信号)を出力する)。
The timing control circuit 20 generates a predetermined synchronization signal from a clock supplied from, for example, a timer IC (not shown), and supplies it to each block constituting the DMA controller 5 via an internal control bus. . IRQ
When the DMA controller 5 enters a predetermined state, the control circuit 21 issues an interrupt request to the CPU 1 (FIG. 1) via the bus I / F 2 (interrupt request signal (IRQ
Signal))).

【0047】バス制御回路22は、内部制御バスを制御
する他、DMA制御回路15で周辺デバイス4からのD
MAリクエスト信号が受信されると、メインバス(デー
タバス、アドレスバス、リード線、およびライト線のす
べて)をDMAによるデータの転送で使用することがで
きるように、バスI/F2を介し、CPU1(図1)に
対してバスリクエスト(Bus Req)を出す(バス
リクエスト信号を出力する)。そして、メインバスが空
くと(未使用状態になると)、CPU1が、メインバス
が空いたことを示す許可(Ack)信号を出力するの
で、バス制御回路22は、バスI/F2を介してこれを
受信し、内部制御バスを介して、DMA制御回路15に
メインバスが空いたことを知らせる。
The bus control circuit 22 controls the internal control bus, and the DMA control circuit 15 controls the D from the peripheral device 4.
When the MA request signal is received, the main bus (all of data bus, address bus, read line, and write line) can be used for data transfer by DMA, CPU 1 A bus request (Bus Req) is issued to (FIG. 1) (a bus request signal is output). Then, when the main bus is vacant (when it is in an unused state), the CPU 1 outputs a permission (Ack) signal indicating that the main bus is vacant, so that the bus control circuit 22 sends this signal via the bus I / F 2. To notify the DMA control circuit 15 that the main bus is empty via the internal control bus.

【0048】さらに、バス制御回路22は、CPU1よ
りバスI/F2を介してメインバス(データバス、アド
レスバス、リード線、およびライト線)が空いたことが
知らされると、CPU1に代わって、リード線およびラ
イト線(メインバス)を制御する(リード信号およびラ
イト信号を出力するようになる)。
Further, the bus control circuit 22 takes the place of the CPU 1 when it is notified by the CPU 1 via the bus I / F 2 that the main bus (data bus, address bus, read line, and write line) is empty. , Control read lines and write lines (main bus) (to output read signals and write signals).

【0049】次に、その動作について説明する。最初
に、データをブロックに分割して転送する動作について
説明し、次に、データ転送中に優先順位の高いデータ転
送のリクエストが発生した場合の動作について説明す
る。
Next, the operation will be described. First, the operation of dividing data into blocks and transferring the data will be described, and then the operation when a request for data transfer with a high priority occurs during data transfer will be described.

【0050】なお、データ転送は、チャンネル毎に独立
に行われるのであるが、特にチャンネルを区別する必要
がない限り、チャンネルは無視して説明を行う。
Although data transfer is performed independently for each channel, the channel will be ignored in the description unless it is necessary to distinguish the channel.

【0051】例えば、メインメモリ3のアドレス100
00000H乃至100000FFHに記憶されている
256バイトのデータを、16バイトを1ブロックとし
て、16ブロックB1乃至B16に分割し(図4)、下位
アドレスに記憶されたデータから、DMAにより周辺デ
バイス4に転送する場合、まずCPU1において、バス
I/F2およびメインバスのデータバスを介して、DM
Aコントローラ5の回数レジスタ13、転送量レジスタ
14、スタートアドレスレジスタ17、コントロールレ
ジスタ18、または周辺アドレスレジスタ19の設定が
それぞれ行われる。
For example, the address 100 of the main memory 3
The 256-byte data stored in 00000H to 100000FFH is divided into 16 blocks B 1 to B 16 with 16 bytes as one block (FIG. 4), and the peripheral device 4 by DMA from the data stored in the lower address. In the case of transferring to the DM, first, in the CPU 1, the DM is transmitted via the bus I / F 2 and the main bus data bus.
The number register 13, transfer amount register 14, start address register 17, control register 18, or peripheral address register 19 of the A controller 5 are set.

【0052】ここで、本明細書中において、下位アドレ
スとは、値の小さいアドレスを意味する。
In this specification, the lower address means an address having a smaller value.

【0053】即ち、16個のブロックのデータは、16
回のDMAにより転送することができるので、回数レジ
スタ13には、メインメモリ3上でブロックに分割され
たデータを転送するDMAの回数としての16がセット
される。
That is, the data of 16 blocks is 16
Since the transfer can be performed by the number of times of DMA, the number of times register 13 is set to 16 as the number of times of DMA of transferring the data divided into blocks on the main memory 3.

【0054】さらに、上述したように、メインメモリ3
におけるデータの語長がワード(32ビット)で、周辺
デバイス4で取り扱われるデータの語長がバイト(8ビ
ット)であり、またデータが、16バイト(128ビッ
ト=8ビット×16)単位のブロックに分割されるの
で、転送量レジスタ14には、メインメモリ3における
データの語長(ワード)、および周辺デバイス4で取り
扱われるデータの語長(バイト)のうちの大きい方の語
長(ワード)で、1ブロック分のデータ量(16バイト
=4ワード)を割った値としての4がセットされる。
Further, as described above, the main memory 3
The word length of the data is a word (32 bits), the word length of the data handled by the peripheral device 4 is a byte (8 bits), and the data is a block in units of 16 bytes (128 bits = 8 bits × 16). Therefore, the transfer amount register 14 stores in the transfer amount register 14 the larger word length (word) of the data word length (word) in the main memory 3 and the data word length (byte) handled by the peripheral device 4. Then, 4 is set as a value obtained by dividing the data amount for one block (16 bytes = 4 words).

【0055】スタートアドレスレジスタ17には、DM
Aによるデータの転送を開始するときのデータのアドレ
ス(転送元のスタートアドレス)としてのメインメモリ
3上のアドレス10000000Hがセットされ、周辺
アドレスレジスタ19には、DMAによるデータの転送
先となる周辺デバイス4の内蔵するバッファ(図示せ
ず)のアドレス(転送先のスタートアドレス)として
の、例えば20000000Hがセットされる。
The start address register 17 contains DM
The address 10000000H on the main memory 3 is set as the address of the data (start address of the transfer source) when the data transfer by A is started, and the peripheral address register 19 stores the peripheral device as the transfer destination of the data by the DMA. For example, 20000000H is set as the address (start address of the transfer destination) of the buffer (not shown) built in the No. 4 buffer.

【0056】コントロールレジスタ18においては、ま
ずDMAENレジスタに0がセットされ、DMAコント
ローラ5の動作が停止されるとともに、CHCLRレジ
スタに0→1→0が順次セットされ、転送するデータの
チャンネルのレジスタの初期化が行われる。さらに、ア
ドレスINC/DECレジスタに1がセットされ、DM
Aによるデータ転送中に、アドレスレジスタ16にセッ
トされたアドレスが増加(INC)されるように設定さ
れるとともに、DIRレジスタに1がセットされ、デー
タの転送方向が、メインメモリ3→周辺デバイス4に設
定される。
In the control register 18, first, 0 is set in the DMAEN register, the operation of the DMA controller 5 is stopped, and 0 → 1 → 0 is sequentially set in the CHCLR register to set the register of the channel of the data to be transferred. Initialization is performed. Furthermore, 1 is set in the address INC / DEC register, and DM
During the data transfer by A, the address set in the address register 16 is set to be incremented (INC) and the DIR register is set to 1, and the data transfer direction is changed from the main memory 3 to the peripheral device 4. Is set to.

【0057】また、IRQENレジスタに0がセットさ
れ、DMAによるデータの転送を終了した後の、IRQ
制御回路21のIRQ信号の出力が禁止されるととも
に、BDMAENレジスタに1がセットされ、ブロック
単位でデータを転送するように設定される。同時に、B
IRQENレジスタに1がセットされ、ブロック分割さ
れたデータの、最後のブロック(図4の実施例の場合、
ブロックB16)を転送した後の、IRQ制御回路21の
IRQ信号の出力が許可されるとともに、BFSADD
ENレジスタに0がセットされ、ブロック分割されたデ
ータの、最後のブロックを転送した後に、スタートアド
レスレジスタ17に記憶されているアドレスを、アドレ
スレジスタ16にセットすることが禁止される。
Further, after 0 is set in the IRQEN register and the data transfer by DMA is completed, the IRQ
The output of the IRQ signal of the control circuit 21 is prohibited, 1 is set in the BDMAEN register, and data is transferred in block units. At the same time, B
The IRQEN register is set to 1 and the last block of the data divided into blocks (in the case of the embodiment of FIG. 4,
After the transfer of the block B 16 ), the output of the IRQ signal from the IRQ control circuit 21 is permitted, and BFSADD
The EN register is set to 0, and it is prohibited to set the address stored in the start address register 17 to the address register 16 after transferring the last block of the data divided into blocks.

【0058】以上のように、回数レジスタ13、転送量
レジスタ14、スタートアドレスレジスタ17、コント
ロールレジスタ18、または周辺アドレスレジスタ19
の設定がそれぞれ行われた後、CPU1において、DM
Aコントローラ5におけるコントロールレジスタのうち
の、DMAENレジスタに1がセットされ、DMAコン
トローラ5が起動される。
As described above, the count register 13, transfer amount register 14, start address register 17, control register 18, or peripheral address register 19
After each setting of DM, in the CPU1, DM
Of the control registers in the A controller 5, 1 is set in the DMAEN register and the DMA controller 5 is activated.

【0059】そして、周辺デバイス4よりDMAリクエ
スト信号(図3(a))が出力され、それが、DMA制
御回路15に入力されると、DMA制御回路15から内
部制御バスを介してバス制御回路22に制御信号が出力
される。そして、バス制御回路22から、メインバス
(データバス、アドレスバス、リード線、およびライト
線)をDMAによるデータの転送で使用することができ
るように、バスI/F2を介し、CPU1(図1)にバ
スリクエスト信号(図3(b))が出力される。その
後、メインバスが空くと(未使用状態になると)、CP
U1より、メインバスが空いたことを示す許可(Ac
k)信号(図3(c))が出力され、それが、バス制御
回路22で受信される。バス制御回路22において、C
PU1からの許可(Ack)信号が受信されると、内部
制御バスを介して、DMA制御回路15にメインバスが
空いたことが知らされる。
When the DMA request signal (FIG. 3A) is output from the peripheral device 4 and is input to the DMA control circuit 15, the DMA control circuit 15 sends the bus control circuit via the internal control bus. A control signal is output to 22. Then, from the bus control circuit 22, the main bus (data bus, address bus, read line, and write line) can be used for data transfer by DMA, the CPU 1 (see FIG. 1) via the bus I / F 2. ), The bus request signal (FIG. 3B) is output. After that, when the main bus becomes available (when it is unused), CP
Permission from U1 indicating that the main bus is vacant (Ac
k) signal (FIG. 3 (c)) is output and is received by the bus control circuit 22. In the bus control circuit 22, C
When the permission (Ack) signal from PU1 is received, the DMA control circuit 15 is notified via the internal control bus that the main bus is empty.

【0060】DMA制御回路15において、メインバス
が空いたことが判ると、周辺デバイス4にDMAによる
データの転送を許可することを示す許可(Ack)信号
(図3(d))が出力され、メインメモリ3から周辺デ
バイス4への、DMAによるデータの転送が開始され
る。
When the DMA control circuit 15 finds that the main bus is empty, a permission (Ack) signal (FIG. 3 (d)) indicating that the peripheral device 4 is permitted to transfer data by DMA is output. Data transfer by DMA from the main memory 3 to the peripheral device 4 is started.

【0061】即ち、まずスタートアドレスレジスタ17
の記憶値10000000Hが、アドレスレジスタ16
にセットされ、アドレスバスバッファ12、およびメイ
ンバス(アドレスバス)を介してメインメモリ3に供給
される。また、現在回数レジスタ23に、これから転送
するブロックが、回数レジスタ13に記憶されている回
数(ブロック数)のうちの最初の回(最初のブロック)
であることを示す値1がセットされる。
That is, first, the start address register 17
10000000H is stored in the address register 16
Is supplied to the main memory 3 via the address bus buffer 12 and the main bus (address bus). Further, the block to be transferred to the current count register 23 is the first block (first block) of the counts (block number) stored in the count register 13.
The value 1 is set to indicate that.

【0062】そして、メインメモリ3におけるデータの
語長がワードであることから、メインメモリ3のアドレ
ス10000000Hから順次1ワードのデータが読み
出され、即ちメインメモリ3の任意の1アドレスに記憶
されている(記憶することのできる)データ長が、例え
ば1バイト(バイト)であるとすると、メインメモリ3
のアドレス10000000H乃至10000003H
に、それぞれ1バイトずつ記憶されているデータが読み
出され、合計4バイト(1ワード)(32ビット)のデ
ータが、32ビットのメインバス(データバス)を介し
てDMAコントローラ5のデータバスバッファ11に供
給されて記憶される。
Since the word length of the data in the main memory 3 is word, one word of data is sequentially read from the address 10000000H of the main memory 3, that is, stored in any one address of the main memory 3. If the data length (that can be stored) is, for example, 1 byte (byte), the main memory 3
Address of 10000000H to 10000003H
The data stored in each byte is read out, and a total of 4 bytes (1 word) (32 bits) of data is transferred to the data bus buffer of the DMA controller 5 via the 32-bit main bus (data bus). 11 and is stored.

【0063】32ビットのデータバスバッファ11の下
位ビット乃至上位ビットを、D0乃至D31と表すと、
周辺デバイス4で取り扱われるデータの語長がバイトで
あることから、まずデータバスバッファ11におけるビ
ットD0乃至D7のデータが、周辺アドレスレジスタ1
9にセットされた、周辺デバイス4の内蔵するバッファ
のアドレス20000000Hに転送され、その後さら
に、D8乃至D15のデータが周辺デバイス4の内蔵す
るバッファのアドレス20000000Hに転送され
る。以下同様にして、D16乃至D23のデータ、およ
びD24乃至D31のデータが、周辺デバイス4の内蔵
するバッファのアドレス20000000Hに順次転送
される。
When the lower bits to the upper bits of the 32-bit data bus buffer 11 are represented as D0 to D31,
Since the word length of the data handled by the peripheral device 4 is byte, first, the data of the bits D0 to D7 in the data bus buffer 11 is the peripheral address register 1
The data is transferred to the address 20000000H of the buffer built in the peripheral device 4 set to 9, and then the data of D8 to D15 is further transferred to the address 20000000H of the buffer built in the peripheral device 4. Similarly, the data of D16 to D23 and the data of D24 to D31 are sequentially transferred to the address 20000000H of the buffer included in the peripheral device 4.

【0064】次に、アドレスレジスタ16が、メインメ
モリ3におけるデータの語長(32ビット)を、メイン
メモリ3の任意の1アドレスに記憶されている(記憶す
ることのできる)データ量としてのバイト(8ビット)
で除算した値、即ち4だけインクリメントされ、その記
憶値が10000004Hとされる。
Next, the address register 16 uses the word length (32 bits) of the data in the main memory 3 as a byte as the amount of data stored in (stored in) any one address of the main memory 3. (8 bits)
The value divided by is incremented by 4, that is, the stored value is 10000004H.

【0065】そして、アドレスレジスタ16に記憶され
た、メインメモリ3上のアドレス10000004Hか
ら、上述した場合と同様にして1ワードのデータが周辺
デバイス4に転送される。
Then, from the address 10000004H on the main memory 3 stored in the address register 16, one word of data is transferred to the peripheral device 4 in the same manner as described above.

【0066】以下、上述の動作が合計、転送量レジスタ
14の記憶値、即ち4回だけ繰り返され、メインメモリ
3上のアドレス10000000H乃至1000000
FHに記憶された1ブロック分(16バイト)のデータ
(図4において、ブロックB1で示す部分)が、周辺デ
バイス4に転送され、DMAによるデータの転送処理を
終了する。
Hereinafter, the above-described operation is repeated in total, the storage value of the transfer amount register 14, that is, four times, and the addresses 10000000H to 1000000 on the main memory 3 are repeated.
One block (16 bytes) of data stored in the FH (portion indicated by block B 1 in FIG. 4) is transferred to the peripheral device 4, and the data transfer processing by DMA is completed.

【0067】ここで、前述したように、IRQENレジ
スタに0がセットされ、DMAによるデータの転送を終
了した後の、IRQ制御回路21のIRQ信号の出力が
禁止されているので、ブロックB1(図4)のデータの
転送が終了しても、IRQ制御回路21よりCPU1に
IRQ信号は出力されない。
As described above, since 0 is set in the IRQEN register and the output of the IRQ signal from the IRQ control circuit 21 is prohibited after the data transfer by DMA is completed, the block B 1 ( Even when the data transfer of FIG. 4) is completed, the IRQ signal is not output from the IRQ control circuit 21 to the CPU 1.

【0068】また、アドレスレジスタ16には、ブロッ
クB1(図4)のアドレス10000000C乃至10
00000FHに記憶された1ワードのデータ(1個の
ブロックB1を構成する4ワードのうちの最後の1ワー
ドのデータ)が転送されるときにセットされた値(転送
元アドレス)1000000CHがそのまま記憶されて
いる。
Further, the address register 16 has addresses 10000000C to 10000000C of the block B 1 (FIG. 4).
The value (transfer source address) 1000000CH set when the 1-word data stored in 00000FH (the last 1-word data of the 4 words forming one block B 1 ) is transferred is stored as it is. Has been done.

【0069】そして、次のブロックB2を転送するため
に、周辺デバイス4より再びDMAリクエスト信号が出
力されると、上述した場合と同様にして、DMA制御回
路15から、周辺デバイス4にDMAによるデータの転
送を許可することを示す許可(Ack)信号が出力さ
れ、メインメモリ3から周辺デバイス4への、DMAに
よるデータの転送が開始される。
When the DMA request signal is output again from the peripheral device 4 to transfer the next block B 2 , the DMA control circuit 15 transmits the DMA request signal to the peripheral device 4 in the same manner as described above. A permission (Ack) signal indicating that the data transfer is permitted is output, and the DMA data transfer from the main memory 3 to the peripheral device 4 is started.

【0070】この場合、まず、前のDMA処理が終了し
たときの、アドレスレジスタ16の記憶値が、上述した
ときと同様に、メインメモリ3におけるデータの語長
(32ビット)を、バイト(8ビット)で除算した値と
しての4Hだけインクリメントされる。
In this case, first, when the previous DMA processing is completed, the stored value of the address register 16 is the same as the above-mentioned case when the word length (32 bits) of the data in the main memory 3 is changed to byte (8 bits). It is incremented by 4H as a value divided by (bit).

【0071】即ち、アドレスレジスタ16の記憶値(ア
ドレス)が、1000000CHから4Hだけインクリ
メントされ、10000010Hとされる。
That is, the storage value (address) of the address register 16 is incremented by 4H from 1000000CH to 10000010H.

【0072】そして、このアドレスレジスタ16の記憶
値(アドレス)10000010Hを転送元のスタート
アドレスとして、メインメモリ3から周辺デバイス4へ
のデータの転送が開始される。
Data transfer from the main memory 3 to the peripheral device 4 is started using the storage value (address) 10000010H of the address register 16 as the start address of the transfer source.

【0073】また、このとき、現在回数レジスタ23の
値がインクリメントされ、値2に変更される。
At this time, the value of the current count register 23 is incremented and changed to the value 2.

【0074】つまり、図4に示すブロックB1のデータ
を転送した場合と同様にして、ブロックB2のデータが
転送される。
That is, the data of the block B 2 is transferred in the same manner as the case of transferring the data of the block B 1 shown in FIG.

【0075】以下同様にして、周辺デバイス4よりDM
Aリクエスト信号が出力されるたびに、DMAによるデ
ータの転送が行われる。
In the same manner, DM from the peripheral device 4
Each time the A request signal is output, data transfer by DMA is performed.

【0076】そして、回数レジスタ13の記憶値の回数
(16回)だけ、周辺デバイス4よりDMAリクエスト
信号が出力され、最後のブロックB16(図4)のデータ
の転送が終了すると(このとき、現在回数レジスタ23
の記憶値も16になる)、BIRQENレジスタに1が
セットされ、ブロック分割されたデータの、最後のブロ
ックを転送した後の、IRQ制御回路21のIRQ信号
の出力が許可されているので、IRQ制御回路21より
CPU1にIRQ信号(図3(e))が出力され、メイ
ンメモリ3のアドレス10000000H乃至1000
00FFHに記憶されている256バイトのデータすべ
ての、周辺デバイス4への転送が終了したことが知らさ
れる。
When the DMA request signal is output from the peripheral device 4 the number of times (16 times) stored in the number register 13 and the data transfer of the final block B 16 (FIG. 4) is completed (at this time, Current count register 23
Also becomes 16), 1 is set in the BIRQEN register, and the output of the IRQ signal of the IRQ control circuit 21 after transfer of the last block of the data divided into blocks is permitted. An IRQ signal (FIG. 3 (e)) is output from the control circuit 21 to the CPU 1, and addresses 10000000H to 1000 of the main memory 3 are output.
It is notified that transfer of all the 256-byte data stored in 00FFH to the peripheral device 4 has been completed.

【0077】以上のように、例えば周辺デバイス4の内
蔵するバッファの記憶容量が小さく、1回で大量のデー
タを転送することができない場合、そのデータを小さな
ブロックに分割して転送するようにし、さらに転送した
データのアドレスを記憶しておき、そのアドレスに基づ
いて、次に転送するデータのスタートアドレスを設定す
るようにしたので、データを転送するたびに、CPU1
がスタートアドレスを設定する必要がなく、装置の処理
能力を向上させることができる。即ち、CPU1がデー
タの転送に係る時間が減少するので、CPU1に他の処
理を行わせるようにすることができる。
As described above, for example, when the storage capacity of the buffer built in the peripheral device 4 is small and a large amount of data cannot be transferred at one time, the data is divided into small blocks and transferred. Further, since the address of the transferred data is stored and the start address of the data to be transferred next is set based on the address, the CPU 1 is set every time the data is transferred.
There is no need to set a start address, and the processing capacity of the device can be improved. That is, since the time required for the CPU 1 to transfer data is reduced, the CPU 1 can be made to perform other processing.

【0078】以上、本発明のデータ転送装置をコンピュ
ータシステムに適用した場合について説明したが、本発
明は、コンピュータシステムだけでなく、装置(回路)
間で、データを転送するあらゆるシステム(装置)に適
用することができる。
The case where the data transfer apparatus of the present invention is applied to a computer system has been described above. However, the present invention is applicable not only to a computer system but also to an apparatus (circuit).
It can be applied to any system (device) that transfers data between.

【0079】なお、本実施例においては、本来ならば1
回で転送する256バイトのデータを、1ブロックが1
6バイトのブロックに分割して転送するようにしたが、
例えば周辺デバイス4の内蔵するバッファの記憶容量が
十分大きければ、コントロールレジスタ18におけるB
DMAENレジスタを0にセットし、ブロック単位での
データの転送を禁止して、1回で256バイトのデータ
を転送するようにすることができる。
It should be noted that, in the present embodiment, originally, it is 1
One block contains 256 bytes of data to be transferred at one time
I divided it into 6-byte blocks and transferred them.
For example, if the storage capacity of the buffer built in the peripheral device 4 is sufficiently large, B in the control register 18
It is possible to set the DMAEN register to 0, prohibit transfer of data in block units, and transfer 256 bytes of data at one time.

【0080】さらに、本実施例では、IRQENレジス
タに0をセットし、DMAによるデータの転送を終了し
た後の、IRQ制御回路21のIRQ信号の出力を禁止
するようにしたが、IRQENレジスタに1をセット
し、ブロックごとのデータの転送が終了するたびに、I
RQ制御回路21よりIRQ信号を出力させるようにす
ることができる。
Further, in the present embodiment, 0 is set in the IRQEN register to prohibit the output of the IRQ signal of the IRQ control circuit 21 after the data transfer by the DMA is completed, but the IRQEN register is set to 1 Is set, and after each block of data transfer is completed, I
The IRQ signal can be output from the RQ control circuit 21.

【0081】また、本実施例においては、BFSADD
ENレジスタに0をセットし、ブロック分割されたデー
タの、最後のブロックB16(図4)を転送した後に、ス
タートアドレスレジスタ17に記憶されているアドレス
を、アドレスレジスタ16にセットすることを禁止する
ようにしたので、最後のブロックB16(図4)を転送し
た後、アドレスレジスタ16は、アドレス100000
FCHを記憶したままになる。従って、さらに周辺デバ
イス4よりDMAリクエスト信号が出力されると、アド
レスレジスタ16の記憶値(アドレス100000FC
H)が、上述したように4Hだけインクリメントされ、
これにより、メインメモリ3上のアドレス100001
00H以降に記憶されたデータが、ブロックごとに転送
されることになる。
In the present embodiment, BFSADD is used.
It is prohibited to set the address stored in the start address register 17 to the address register 16 after setting the EN register to 0 and transferring the last block B 16 (FIG. 4) of the divided data. Therefore, after transferring the last block B 16 (FIG. 4), the address register 16 sets the address 100000.
FCH remains remembered. Therefore, when the DMA request signal is further output from the peripheral device 4, the value stored in the address register 16 (address 100000FC
H) is incremented by 4H as described above,
As a result, the address 100001 on the main memory 3
The data stored after 00H will be transferred block by block.

【0082】さらに、BFSADDENレジスタに1を
セットし、ブロック分割されたデータの、最後のブロッ
クB16(図4)を転送した後に、スタートアドレスレジ
スタ17に記憶されているアドレスを、アドレスレジス
タ16にセットすることを許可するようにすれば、最後
のブロックB16(図4)を転送した後、スタートアドレ
スレジスタ17に記憶されているアドレス100000
00Hを、アドレスレジスタ16にセットするようにす
ることができる。従って、この場合、さらに周辺デバイ
ス4よりDMAリクエスト信号が出力されると、アドレ
スレジスタ16にセットされたアドレス1000000
0H以降に記憶されたデータ(ブロックB1乃至B16
データ)が、再び転送されることになる。
Further, after setting 1 to the BFSADDEN register and transferring the last block B 16 (FIG. 4) of the data divided into blocks, the address stored in the start address register 17 is set in the address register 16. If the setting is allowed, after the last block B 16 (FIG. 4) is transferred, the address 100000 stored in the start address register 17
00H can be set in the address register 16. Therefore, in this case, when the DMA request signal is further output from the peripheral device 4, the address 1000000 set in the address register 16 is set.
The data (data of blocks B 1 to B 16 ) stored after 0H will be transferred again.

【0083】また、本実施例では、説明を簡単にするた
めに、メインメモリ3と、周辺デバイス4との間のデー
タ転送について説明したが、例えばメインメモリ3と、
他の周辺デバイスとの間や、周辺デバイスどうしの間に
おいても、同様にしてデータ転送をするようにすること
ができる。
In the present embodiment, the data transfer between the main memory 3 and the peripheral device 4 has been described for the sake of simplicity. However, for example, the main memory 3 and
Data can be similarly transferred between other peripheral devices and between peripheral devices.

【0084】次に、優先順位の低いDMA転送が行われ
ているときに、優先順位の高いDMA転送のリクエスト
が発生した場合の動作について説明する。例えば図5に
示すように、チャンネル1(CH1)で、周辺デバイス
4aのアドレス20000000Hから読み出された1
000Hバイト(4096バイト)のデータが、メイン
メモリ3の00001000Hから00002000H
までのアドレスに転送されている状態において、チャン
ネル2で、メインメモリ3の00000500Hから0
0000600Hまでのアドレスに記憶されている10
0Hバイト(256バイト)のデータを、周辺デバイス
4bのアドレス30000000HにDMA転送する場
合を例に説明する。いま、チャンネル1の周辺デバイス
4aからメインメモリ3に対するDMA転送より、チャ
ンネル2のメインメモリ3から周辺デバイス4bへのD
MA転送の方が優先順位が高いものとする。
Next, the operation when a request for a DMA transfer with a high priority occurs during a DMA transfer with a low priority will be described. For example, as shown in FIG. 5, in channel 1 (CH1), 1 read from address 20000000H of peripheral device 4a
Data of 000H bytes (4096 bytes) is stored in the main memory 3 from 00001000H to 00002000H.
In the state of being transferred to the addresses up to
10 stored at addresses up to 0000600H
An example will be described in which 0H bytes (256 bytes) of data is DMA-transferred to the address 30000000H of the peripheral device 4b. Now, by DMA transfer from the peripheral device 4a of channel 1 to the main memory 3, D from the main memory 3 of channel 2 to the peripheral device 4b is performed.
It is assumed that MA transfer has a higher priority.

【0085】DMA制御回路15は、周辺デバイス4a
よりDMAリクエスト1(DMAReq1)が供給され
てきたとき、内部制御バスを介してバス制御回路22に
制御信号を出力し、メインバスを確保させる。そして、
DMA制御回路15は、上述した場合と同様に、チャン
ネル1の各レジスタを初期設定する。周辺アドレスレジ
スタ19aには、周辺デバイス4aのアドレス2000
0000Hがセットされる。スタートアドレスレジスタ
17aには、メインメモリ3の転送先アドレス0000
1000Hがセットされる。また、回数レジスタ13a
には、合計256ブロック(256バイト)を転送する
必要があるため、256がセットされる。転送量レジス
タ14aは、1ブロック分の転送の回数を示すものであ
るため、上述した場合と同様に、4がセットされる。
The DMA control circuit 15 uses the peripheral device 4a.
When the DMA request 1 (DMAReq1) is further supplied, a control signal is output to the bus control circuit 22 via the internal control bus to secure the main bus. And
The DMA control circuit 15 initializes each register of the channel 1 as in the case described above. The peripheral address register 19a stores the address 2000 of the peripheral device 4a.
0000H is set. The transfer destination address 0000 of the main memory 3 is stored in the start address register 17a.
1000H is set. In addition, the frequency register 13a
, 256 blocks (256 bytes) must be transferred in total, so 256 is set. Since the transfer amount register 14a indicates the number of transfers of one block, 4 is set as in the case described above.

【0086】このような初期設定が完了したとき、DM
A制御回路15は、周辺デバイス4aに対して、許可1
(Ack1)信号を出力し、周辺デバイス4aにDMA
転送を開始させる。
When such initial setting is completed, DM
The A control circuit 15 gives permission 1 to the peripheral device 4a.
(Ack1) signal is output and DMA is sent to the peripheral device 4a.
Start the transfer.

【0087】このとき、スタートアドレスレジスタ17
aにセットされているアドレス00001000Hがア
ドレスレジスタ16aにセットされる。また、現在回数
レジスタ23aは1にセットされる。アドレスレジスタ
16aにセットしたアドレスが、アドレスバッファ1
2、メインバスのアドレスバスを介してメインメモリ3
に供給されるため、周辺デバイス4aより読み出された
最初の16バイトのブロックB1のデータが、メインメ
モリ3のアドレス00001000Hに書き込まれる。
At this time, the start address register 17
The address 00001000H set in a is set in the address register 16a. Further, the current count register 23a is set to 1. The address set in the address register 16a is the address buffer 1
2, the main memory 3 via the address bus of the main bus
The data of the first 16 bytes of the block B 1 read from the peripheral device 4a is written to the address 00001000H of the main memory 3.

【0088】最初のブロックB1の次に、次の16バイ
トのデータがブロックB2として転送される。このた
め、アドレスレジスタ16aのアドレスが000010
10Hにインクリメントされるとともに、現在回数レジ
スタ23aの値が2に変更される。そして、メインメモ
リ3のアドレス00001010Hに、ブロックB2
データが書き込まれる。
Following the first block B 1 , the next 16 bytes of data are transferred as block B 2 . Therefore, the address of the address register 16a is 000010.
The value of the current count register 23a is changed to 2 while being incremented to 10H. Then, the data of the block B 2 is written to the address 00001010H of the main memory 3.

【0089】以下同様にして、前述した場合と同様に、
ブロック単位でデータがDMA転送される。
In the same manner as described above, as in the case described above,
Data is DMA-transferred in block units.

【0090】いま、例えばアドレスレジスタ16aに記
憶されている現在アドレスが、00001400Hであ
り、現在回数レジスタ23aの記憶値が65になってい
るとき、即ち、ブロックB65のデータをメインメモリ3
のアドレス00001400Hに転送している最中に、
周辺デバイス4bからDMA制御回路15に対して、D
MAリクエスト2(DMA Req2)が供給されてき
たとすると、DMA制御回路15は、現在実行している
DMA転送と、今回リクエストがあったDMA転送との
優先順位を判定する。
Now, for example, when the present address stored in the address register 16a is 00001400H and the stored value of the present count register 23a is 65, that is, the data in the block B 65 is stored in the main memory 3
While transferring to the address 00001400H of
D from the peripheral device 4b to the DMA control circuit 15
Assuming that the MA request 2 (DMA Req2) is supplied, the DMA control circuit 15 determines the priority order of the currently executed DMA transfer and the DMA transfer requested this time.

【0091】現在実行しているDMA転送の方が優先順
位が高い場合、そのまま現在実行中のDMA転送が継続
され、このDMA転送が終了した後、優先順位の低いD
MA転送が実行される。
When the currently executed DMA transfer has a higher priority, the currently executed DMA transfer is continued as it is, and after this DMA transfer is completed, the D transfer having a lower priority is executed.
MA transfer is performed.

【0092】しかしながら、いまの場合、DMAリクエ
スト2によるDMA転送の方が優先順位が高い。そこ
で、DMA制御回路15は、第65番目のブロックB65
の転送が完了した時点において、周辺デバイス4aから
メインメモリ3に対する優先順位の低いデータ転送を一
旦中断させる。そして、コントロールレジスタ18のチ
ャンネル1に対応するINTレジスタに1がセットさ
れ、チャンネル1のDMA転送が中断されたことが記憶
される。さらに、DMA制御回路15は、許可1(Ac
k1)を反転して、周辺デバイス4aに対してDMA転
送を禁止させる。
However, in this case, the DMA transfer by the DMA request 2 has a higher priority. Therefore, the DMA control circuit 15 controls the 65th block B 65.
When the transfer is completed, the low priority data transfer from the peripheral device 4a to the main memory 3 is temporarily suspended. Then, 1 is set in the INT register corresponding to the channel 1 of the control register 18, and it is stored that the DMA transfer of the channel 1 is interrupted. Further, the DMA control circuit 15 uses the permission 1 (Ac
k1) is inverted and the peripheral device 4a is prohibited from DMA transfer.

【0093】一方、DMA制御回路15は、チャンネル
2の各レジスタに対して初期設定を行う。このとき、周
辺アドレスレジスタ19bには、周辺デバイス4bのア
ドレス30000000Hがセットされ、スタートアド
レスレジスタ17bには、メインメモリ3の転送先のス
タートアドレス00000500Hがセットされる。転
送量レジスタ14bには、転送量レジスタ14aと同様
に4がセットされるが、回数レジスタ13bには合計1
6ブロックのデータを転送する必要があるため、16が
セットされる。
On the other hand, the DMA control circuit 15 initializes each register of channel 2. At this time, the address 30000000H of the peripheral device 4b is set in the peripheral address register 19b, and the start address 00000500H of the transfer destination of the main memory 3 is set in the start address register 17b. 4 is set in the transfer amount register 14b similarly to the transfer amount register 14a, but a total of 1 is set in the number of times register 13b.
Since 6 blocks of data need to be transferred, 16 is set.

【0094】次に、DMA制御回路15は、周辺デバイ
ス4bに対して、許可2(Ack2)を与え、DMA転
送を開始させる。
Next, the DMA control circuit 15 gives permission 2 (Ack2) to the peripheral device 4b to start the DMA transfer.

【0095】このとき、スタートアドレスレジスタ17
bにセットされているアドレス00000500Hが、
アドレスレジスタ16bにセットされ、現在回数レジス
タ23bの値が1にセットされる。そして、アドレスバ
ッファ12を介してアドレスレジスタ16bのアドレス
がメインメモリ3に供給される。これにより、アドレス
00000500Hから読み出された最初のブロックB
1のデータが、周辺デバイス4bのアドレス30000
000Hに転送される。
At this time, the start address register 17
The address 00000500H set in b is
It is set in the address register 16b, and the value of the current count register 23b is set to 1. Then, the address of the address register 16b is supplied to the main memory 3 via the address buffer 12. As a result, the first block B read from the address 00000500H
The data of 1 is the address 30000 of the peripheral device 4b.
000H.

【0096】次のブロックB2のデータを転送するため
に、アドレスレジスタ16bの値が00000510H
に更新され、現在回数レジスタ23bの値が2に更新さ
れる。そして、上述した場合と同様にして、ブロックB
2のデータが転送される。
In order to transfer the data of the next block B 2 , the value of the address register 16b is 0000510H.
And the value of the current count register 23b is updated to 2. Then, in the same manner as described above, block B
2 data is transferred.

【0097】以上のようにして、メインメモリ3から最
後のブロックB16のデータが、周辺デバイス4bに転送
されたとき、DMA制御回路15には周辺デバイス4b
からDMAリクエスト2(DMA Req2)が供給さ
れてこなくなる。このとき、DMA制御回路15は、コ
ントロールレジスタ18の他のチャンネルのINTレジ
スタの論理を読み取り、転送を中断したチャンネルがあ
るか否かを判定する。いまの場合、チャンネル1のIN
Tレジスタに1がセットされているため、DMA制御回
路15はチャンネル1がデータ転送を途中で中断したこ
とを知る。そこで、DMA制御回路15は、周辺デバイ
ス4aよりDMAリクエスト1(DMAReq1)が入
力されてきたとき、中断したDMA転送を再開させる。
As described above, when the data of the last block B 16 is transferred from the main memory 3 to the peripheral device 4b, the DMA control circuit 15 is provided with the peripheral device 4b.
Does not supply the DMA request 2 (DMA Req2). At this time, the DMA control circuit 15 reads the logic of the INT register of the other channel of the control register 18 and determines whether there is a channel for which the transfer is interrupted. In the present case, IN of channel 1
Since the T register is set to 1, the DMA control circuit 15 knows that the channel 1 has interrupted the data transfer. Therefore, when the DMA request 1 (DMAReq1) is input from the peripheral device 4a, the DMA control circuit 15 restarts the interrupted DMA transfer.

【0098】上述したように、チャンネル1のアドレス
レジスタ16aには、中断したときのアドレス0000
1410Hが記憶されており、また、現在回数レジスタ
23aには、それまで転送したブロック数に対応する値
65が記憶されている。そこで、これらの値を0000
1420Hまたは66に更新させ、第66番目のブロッ
クB66のデータを、メインメモリ3のアドレス0000
1420Hに転送させる。以後の動作は、上述した場合
と同様である。
As described above, the address register 16a of channel 1 has the address 0000 at the time of interruption.
1410H is stored, and the current count register 23a stores a value 65 corresponding to the number of blocks transferred so far. Therefore, set these values to 0000
1420H or 66, and the data of the 66th block B 66 is updated to the address 0000 of the main memory 3.
1420H. Subsequent operations are the same as those described above.

【0099】以上の実施例においては、チャンネルを2
チャンネルとしたが、それ以上のチャンネル数とするこ
とも可能である。また、メインメモリが2つ以上ある場
合において、それらの間でデータのDMA転送を行う場
合においては、それらに対応して、スタートアドレスレ
ジスタ17とアドレスレジスタ16を、その数に対応し
て設けるようにすればよい。
In the above embodiment, two channels are used.
Although the number of channels is set, it is possible to set the number of channels to be more than that. In addition, when there are two or more main memories, when performing DMA transfer of data between them, the start address register 17 and the address register 16 should be provided correspondingly to those numbers. You can do this.

【0100】さらに以上の実施例においては、優先順位
の高いDMA転送を、優先順位の低いDMA転送に対し
て優先して行うようにしたが、途中でDMA転送が中断
されては困る場合においては、コントロールレジスタ1
8の中断を禁止するチャンネルのPRINTレジスタ
に、論理1をセットしておく。このようにしておくと、
論理1がセットされているチャンネルにおいては、DM
A転送の中断が禁止される。従って、この場合において
は、優先順位に拘らず、最初に受け付けられたDMA転
送が完了するまで継続されることになる。
Further, in the above-mentioned embodiments, the DMA transfer having the high priority is prioritized over the DMA transfer having the low priority. However, in the case where it is troublesome to interrupt the DMA transfer in the middle, , Control register 1
A logic 1 is set in the PRINT register of the channel for which interruption of 8 is prohibited. If you do this,
DM for channels with logic 1 set
A transfer interruption is prohibited. Therefore, in this case, regardless of the priority order, the DMA transfer accepted first is continued until it is completed.

【0101】図6は、DMAコントローラ5の他の実施
例を示している。この実施例においては、転送後ステイ
タスレジスタ41とステイタス書込アドレスレジスタ4
2が設けられている。この転送後ステイタスレジスタ4
1には、DMA転送が終了した時点におけるステイタス
が転送され、記憶されるようになされている。また、ス
テイタス書込アドレスレジスタ42は、転送後ステイタ
スレジスタ41に記憶されているステイタスを書き込む
メインメモリ3のアドレスを記憶している。その他の構
成は、図2における場合と同様である。
FIG. 6 shows another embodiment of the DMA controller 5. In this embodiment, the post-transfer status register 41 and the status write address register 4
Two are provided. After this transfer status register 4
1, the status at the time when the DMA transfer is completed is transferred and stored. The status write address register 42 stores the address of the main memory 3 into which the status stored in the post-transfer status register 41 is written. Other configurations are similar to those in FIG.

【0102】即ち、この実施例においては、DMA転送
が終了したとき(あるいは、所定のタイミングで記憶が
指示されたとき)、他のレジスタのその時点における値
が転送後ステイタスレジスタに記憶される。例えば、ア
ドレスレジスタ16に記憶されている現在アドレスや、
現在回数レジスタ23に記憶されている転送済の回数
(ブロック数)などが、DMA転送が終了した時点、あ
るいは所定のタイミングにおいて転送され、転送後ステ
イタスレジスタ41に記憶される。
That is, in this embodiment, when the DMA transfer is completed (or when storage is instructed at a predetermined timing), the values of other registers at that time are stored in the post-transfer status register. For example, the current address stored in the address register 16,
The number of transferred times (the number of blocks) stored in the current number register 23 is transferred at the time when the DMA transfer is completed or at a predetermined timing, and is stored in the post-transfer status register 41.

【0103】その結果、例えば図9に示したように、C
PU1が処理Aを実行した後、DMA転送が10回以上
繰り返されたとき処理Bに移行するような場合、CPU
1はDMA転送が終了する度にDMAコントローラ5に
割込を発生させ、その回数をチェックする必要がなくな
る。即ち、CPU1は、自己の処理が終了した後、所定
のタイミングにおいて、転送後ステイタスレジスタ41
(またはアドレスレジスタ16や現在回数レジスタ23
でもよい)に記憶されている値を読み出し、その値から
DMA転送の回数を知ることができる。従って、CPU
1は、この回数を管理するために、DMAコントローラ
5からの割込を、その都度受け付けなければならなくな
るようなことがなくなり、実質的に実行速度を向上させ
ることができる。そして、ステップ動作時などのデバッ
グ処理が容易となる。
As a result, for example, as shown in FIG. 9, C
If the PU1 executes the process A and then shifts to the process B when the DMA transfer is repeated 10 times or more, the CPU
With No. 1, an interrupt is generated in the DMA controller 5 every time the DMA transfer is completed, and it is not necessary to check the number of times. That is, the CPU 1 has a post-transfer status register 41 at a predetermined timing after its own processing is completed.
(Or address register 16 and present count register 23
However, it is possible to know the number of times of DMA transfer from the value stored in the memory. Therefore, the CPU
No. 1 does not have to accept the interrupt from the DMA controller 5 each time in order to manage the number of times, and the execution speed can be substantially improved. Then, debug processing such as step operation becomes easy.

【0104】この転送後ステイタスレジスタ41に記憶
されているステイタスは、DMA転送が終了した時点、
あるいは所定のタイミングにおいて、ステイタス書込ア
ドレスレジスタ42に記憶されているメインメモリ3の
アドレスに転送され、記憶される。従って、CPU1
は、任意のタイミングでメインメモリ3のそのアドレス
にアクセスし、DMA転送後のステイタスを知ることも
できる。このようにすれば、DMAコントローラ5の動
作状態に影響されずに、ステイタスを読み取ることがで
きる。
After the transfer, the status stored in the status register 41 is
Alternatively, at a predetermined timing, it is transferred to and stored in the address of the main memory 3 stored in the status write address register 42. Therefore, CPU1
Can access the address of the main memory 3 at any timing to know the status after the DMA transfer. In this way, the status can be read without being affected by the operating state of the DMA controller 5.

【0105】IRQ制御回路21に、転送後ステイタス
レジスタ41(またはアドレスレジスタ16や現在回数
レジスタ23でもよい)に記憶されているステイタスが
所定の条件に達したとき、CPU1に対して割込をかけ
るように、予め設定しておくこともできる。例えばアド
レスレジスタ16に記憶されている現在アドレスの値
が、転送の一区切りを示すXXXXXXXCH(Xは不
定)になったとき、CPI1に対して割込をかけるよう
に、IRQ制御回路21に設定しておけば、CPU1は
現在アドレスがXXXXXXXCHになったか否か検出
するために、現在実行中の処理を中断し、DMAコント
ローラ5に対して頻繁に確認する必要がなくなり、時間
効率、デバッグ効率を向上させることができる。
When the status stored in the post-transfer status register 41 (or the address register 16 or the current count register 23) reaches a predetermined condition, the IRQ control circuit 21 interrupts the CPU 1. As described above, it can be set in advance. For example, when the value of the current address stored in the address register 16 becomes XXXXXXXXXCH (X is indefinite) that indicates a break in transfer, the IRQ control circuit 21 is set to interrupt CPI1. In other words, the CPU 1 does not need to interrupt the process currently being executed and frequently check the DMA controller 5 in order to detect whether or not the current address has become XXXXXXXXX, improving time efficiency and debugging efficiency. be able to.

【0106】尚、転送後ステイタスを必要としないシス
テムの場合、処理時間節約のため、ステイタス格納処理
を省略することも可能である。
In the case of a system that does not require status after transfer, the status storage processing can be omitted to save processing time.

【0107】[0107]

【発明の効果】以上の如く請求項1に記載のデータ転送
装置によれば、優先順位の低いデータを転送中に、優先
順位の高いデータの転送が指令された場合、優先順位の
低いデータ転送を中断し、その中断した時点におけるス
テイタスを記憶しておき、優先順位の高いデータ転送を
優先的に実行し、それが終了した後、中断した優先順位
の低いデータ転送を記憶したステイタスに対応して再開
するようにしたので、より効率的にデータ転送を実行す
ることが可能になる。
As described above, according to the data transfer device of the first aspect, when the transfer of the high priority data is instructed during the transfer of the low priority data, the low priority data transfer is performed. The status at the time of the interruption is stored, the high-priority data transfer is preferentially executed, and after that, the interrupted low-priority data transfer is stored. Since it is restarted by doing so, it becomes possible to execute data transfer more efficiently.

【0108】請求項2に記載のデータ転送装置によれ
ば、優先順位の低いデータ転送を中断させるか否かを指
定できるようにしたので、必要に応じてデータ転送の中
断を禁止することが可能になる。
According to the data transfer device of the second aspect, it is possible to specify whether or not to interrupt the data transfer of the low priority order. Therefore, the interrupting of the data transfer can be prohibited if necessary. become.

【0109】請求項3に記載のデータ転送装置によれ
ば、データ転送が終了した時点におけるステイタスを記
憶するようにしたので、中央演算処理装置は、データ転
送装置に対してアクセスする回数を減らすことができ、
実行速度を向上させることが可能となる。
According to the data transfer device of the third aspect, since the status at the time when the data transfer is completed is stored, the central processing unit can reduce the number of accesses to the data transfer device. Can
It becomes possible to improve the execution speed.

【0110】請求項4に記載のデータ転送装置によれ
ば、終了時点におけるステイタスをメインメモリに書き
込むようにしたので、中央演算処理装置は任意のタイミ
ングで、容易にデータ転送終了時点におけるステイタス
を知ることができる。
According to the data transfer device of the fourth aspect, since the status at the end time is written in the main memory, the central processing unit can easily know the status at the end time of the data transfer at any timing. be able to.

【0111】請求項5に記載のデータ転送装置によれ
ば、データ転送が終了した時点において、所定の条件が
満たされたとき、中央演算処理装置に対して割込をかけ
るようにしたので、中央演算処理装置は実行速度を向上
させることが可能となる。
According to the data transfer device of the fifth aspect, when the predetermined condition is satisfied when the data transfer is completed, the central processing unit is interrupted. The arithmetic processing unit can improve the execution speed.

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

【図1】本発明のデータ転送装置を応用したコンピュー
タシステムの一実施例の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of a computer system to which a data transfer device of the present invention is applied.

【図2】図1の実施例のDMAコントローラ5のより詳
細な構成を示すブロック図である。
FIG. 2 is a block diagram showing a more detailed configuration of a DMA controller 5 of the embodiment of FIG.

【図3】図1の実施例の動作を説明するためのタイミン
グチャートである。
FIG. 3 is a timing chart for explaining the operation of the embodiment of FIG.

【図4】図1の実施例のメインメモリ3および周辺デバ
イス4の内蔵するバッファのメモリマップである。
FIG. 4 is a memory map of a buffer incorporated in a main memory 3 and a peripheral device 4 of the embodiment shown in FIG.

【図5】図2の実施例の動作を説明する図である。FIG. 5 is a diagram for explaining the operation of the embodiment of FIG.

【図6】図1の実施例のDMAコントローラ5の他の構
成例を示すブロック図である。
FIG. 6 is a block diagram showing another configuration example of the DMA controller 5 of the embodiment of FIG.

【図7】従来のコンピュータシステムの一例の構成を示
すブロック図である。
FIG. 7 is a block diagram showing a configuration of an example of a conventional computer system.

【図8】従来の、DMAによるデータの転送を行うコン
ピュータシステムの一例の構成を示すブロック図であ
る。
FIG. 8 is a block diagram showing a configuration of an example of a conventional computer system that transfers data by DMA.

【図9】従来のコンピュータシステムの動作を説明する
フローチャートである。
FIG. 9 is a flowchart illustrating the operation of a conventional computer system.

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

1 CPU 1a レジスタ 2 バスI/F 3 メインメモリ 4,4a,4b 周辺デバイス 5 DMAコントローラ 11 データバスバッファ 12 アドレスバスバッファ 13,13a,13b 回数レジスタ 14,14a,14b 転送量レジスタ 15 DMA制御回路 16,16a,16b アドレスレジスタ 17,17a,17b スタートアドレスレジスタ 18 コントロールレジスタ 19,19a,19b 周辺アドレスレジスタ 20 タイミング制御回路 21 IRQ制御回路 22 バス制御回路 23,23a,23b 現在回数レジスタ 31 DMAコントローラ 41 転送後ステイタスレジスタ 42 ステイタス書込アドレスレジスタ 1 CPU 1a Register 2 Bus I / F 3 Main Memory 4, 4a, 4b Peripheral Device 5 DMA Controller 11 Data Bus Buffer 12 Address Bus Buffer 13, 13a, 13b Count Register 14, 14a, 14b Transfer Rate Register 15 DMA Control Circuit 16 , 16a, 16b Address register 17, 17a, 17b Start address register 18 Control register 19, 19a, 19b Peripheral address register 20 Timing control circuit 21 IRQ control circuit 22 Bus control circuit 23, 23a, 23b Current count register 31 DMA controller 41 Transfer Post-status register 42 Status write address register

【手続補正書】[Procedure amendment]

【提出日】平成4年12月4日[Submission date] December 4, 1992

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0014[Correction target item name] 0014

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0014】[0014]

【課題を解決するための手段】 請求項1に記載のデー
タ転送装置は、中央演算処理装置としてのCPU1を介
さずに、例えば周辺デバイス4などの任意の装置から、
例えばメインメモリ3などの他の装置へのデータの転送
を制御するデータ転送装置において、データ転送中に、
他のデータ転送のリクエストが発生したとき、データ転
送の優先順位を判定し、優先順位の低いデータ転送を中
断し、優先順位の高いデータ転送を開始させる制御手段
としてのDMA制御回路15と、データ転送を途中で中
断するとき、中断した時点におけるステイタスを記憶す
る記憶手段としての現在転送量レジスタ24、アドレス
レジスタ16とを備え、DMA制御回路15は、優先順
位の高いデータ転送が終了したとき、現在転送量レジス
タ24およびアドレスレジスタ16に記憶されているス
テイタスに対応して、優先順位の低いデータ転送を再開
させることを特徴とする。
A data transfer apparatus according to claim 1, wherein an arbitrary device such as a peripheral device 4 is provided without passing through a CPU 1 as a central processing unit,
For example, in a data transfer device that controls the transfer of data to another device such as the main memory 3, during data transfer,
When another data transfer request occurs, the priority order of the data transfer is determined, the data transfer with the lower priority order is interrupted, and the data transfer with the higher priority order is started. When the transfer is interrupted on the way, a current transfer amount register 24 and an address register 16 as storage means for storing the status at the time of the interrupt are provided, and the DMA control circuit 15 is Current transfer amount register
The data transfer with low priority is restarted corresponding to the status stored in the data register 24 and the address register 16.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0018[Correction target item name] 0018

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0018】[0018]

【作用】 請求項1に記載のデータ転送装置において
は、優先順位の低いデータ転送が実行されている場合、
優先順位の高いデータ転送のリクエストが発生したと
き、優先順位の低いデータ転送が中断され、優先順位の
高いデータ転送が開始される。中断した時点におけるス
テイタスが現在転送量レジスタ24とアドレスレジスタ
16に記憶され、優先順位の高いデータ転送が終了した
とき、この記憶値に対応して、優先順位の低いデータ転
送が再開される。従って、より優先順位の高いデータ転
送を迅速に実行することが可能となる。
In the data transfer device according to claim 1, when data transfer with a low priority is being executed,
When a request for data transfer with high priority is issued, data transfer with low priority is interrupted and data transfer with high priority is started. The status at the time of the interruption is stored in the current transfer amount register 24 and the address register 16, and when the data transfer with the high priority is completed, the data transfer with the low priority is restarted corresponding to the stored value. Therefore, it is possible to quickly perform data transfer with a higher priority.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0023[Name of item to be corrected] 0023

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0023】 2チャンネル分の転送量レジスタ14
a,14bは、それぞれ、例えば8ビットのレジスタで
構成され、そこには、データを転送するための各チャン
ネルのDMAの繰り返し回数(ブロック転送する場合
は、1ブロック分のデータを転送するのに必要なDMA
の繰り返し回数)がセットされる。
Transfer amount register 14 for two channels
a, 14b, respectively, for example, a 8-bit register, there is DMA number of repetitions of each channel for transferring data (when block transfer
Is the DMA required to transfer one block of data
Is set ) .

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0027[Name of item to be corrected] 0027

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0027】 なお、上述したことから、転送量レジス
タ14にセットされた値と、メインメモリ3におけるデ
ータの語長、および周辺デバイス4で取り扱われるデー
タの語長のうちの、いずれか大きい方の値とを乗算すれ
ば、1ブロックの大きさ(データ量)を求めることがで
きる。よって、メインメモリ3におけるデータの語長、
および周辺デバイス4で取り扱われるデータの語長は、
いずれも装置の設計段階で決まるものであるから、1ブ
ロックの大きさ(データ量)が、転送量レジスタ14に
セットされる値に基づいて決定されると考えることがで
きる。2チャンネル分の現在転送量レジスタ24a,2
4bは、それぞれ、例えば8ビットのレジスタで構成さ
れ、ここには、各チャンネルの既に行われた転送量(現
在転送量)、即ち、データを転送するのに必要な転送回
数のうち、現在行っている転送回数がセットされる。
From the above, the larger one of the value set in the transfer amount register 14, the word length of the data in the main memory 3, and the word length of the data handled by the peripheral device 4, whichever is larger, is selected. By multiplying with the value, the size (data amount) of one block can be obtained. Therefore, the word length of the data in the main memory 3,
And the word length of the data handled by the peripheral device 4 is
Since all of them are determined at the design stage of the device, it can be considered that the size (data amount) of one block is determined based on the value set in the transfer amount register 14. Current transfer amount registers 24a, 2 for two channels
Each 4b is composed of, for example, an 8-bit register.
Here, the transfer amount (currently
Current transfer amount), that is, the transfer count required to transfer data
Of the numbers, the number of transfers currently being performed is set.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0085[Correction target item name] 0085

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0085】 DMA制御回路15は、周辺デバイス4
aよりDMAリクエスト1(DMA Req1)が供給
されてきたとき、内部制御バスを介してバス制御回路2
2に制御信号を出力し、メインバスを確保させる。そし
て、DMA制御回路15は、上述した場合と同様に、チ
ャンネル1の各レジスタを初期設定する。周辺アドレス
レジスタ19aには、周辺デバイス4aのアドレス20
000000Hがセットされる。スタートアドレスレジ
スタ17aには、メインメモリ3の転送先アドレス00
001000Hがセットされる。また、回数レジスタ1
3aには、ブロック分割転送を行わないので1がセット
される。転送量レジスタ14aには、転送量として、1
024ワード(=4096バイト)がセットされる。
The DMA control circuit 15 controls the peripheral device 4
When a DMA request 1 (DMA Req1) is supplied from a, the bus control circuit 2 is sent via the internal control bus.
The control signal is output to 2 to secure the main bus. Then, the DMA control circuit 15 initializes each register of the channel 1 as in the case described above. The peripheral address register 19a stores the address 20 of the peripheral device 4a.
000000H is set. The transfer destination address 00 of the main memory 3 is stored in the start address register 17a.
001000H is set. Also, the count register 1
1 is set to 3a because block division transfer is not performed.
To be done. The transfer amount register 14a stores 1 as the transfer amount.
024 words (= 4096 bytes) are set.

【手続補正6】[Procedure correction 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0087[Correction target item name] 0087

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0087】 このとき、スタートアドレスレジスタ1
7aにセットされているアドレス00001000Hが
アドレスレジスタ16aにセットされる。また、現在回
数レジスタ23aは1にセットされる。アドレスレジス
タ16aにセットしたアドレスが、アドレスバッファ1
2、メインバスのアドレスバスを介してメインメモリ3
に供給されるため、周辺デバイス4aより読み出された
データ列が、メインメモリ3のアドレス0000100
0H以降に書き込まれる。そして、現在転送量レジスタ
24aの値が、データ転送量に対応してインクリメント
される(1ワード(=4バイト)転送される毎に1ずつ
インクリメントされる)。
At this time, the start address register 1
The address 00001000H set in 7a is set in the address register 16a. Further, the current count register 23a is set to 1. The address set in the address register 16a is the address buffer 1
2, the main memory 3 via the address bus of the main bus
Is read from the peripheral device 4a because it is supplied to
The data string is the address 0000100 of the main memory 3.
It is written after 0H. And the current transfer amount register
The value of 24a is incremented according to the data transfer amount
1 for each 1 word (= 4 bytes) transferred
Incremented).

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0088[Correction target item name] 0088

【補正方法】削除[Correction method] Delete

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0089[Correction target item name] 0089

【補正方法】削除[Correction method] Delete

【手続補正9】[Procedure Amendment 9]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0090[Correction target item name] 0090

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0090】 いま、例えばアドレスレジスタ16aに
記憶されている現在アドレスが、00001400Hで
あり、現在転送量レジスタ24aの記憶値が256ワー
ド(100Hワード)になっているとき、即ち、データ
をメインメモリ3のアドレス00001400Hに転送
している最中に、周辺デバイス4bからDMA制御回路
15に対して、DMAリクエスト2(DMA Req
2)が供給されてきたとすると、DMA制御回路15
は、現在実行しているDMA転送と、今回リクエストが
あったDMA転送との優先順位を判定する。
Now, for example, the current address stored in the address register 16a is 00001400H, and the stored value of the current transfer amount register 24a is 256 words.
When in de (100H word), i.e., in the middle of transfer the data to the address 00001400H main memory 3, the DMA control circuit 15 from the peripheral device 4b, DMA request 2 (DMA Req
2) is supplied, the DMA control circuit 15
Determines the priority order of the currently executed DMA transfer and the DMA transfer requested this time.

【手続補正10】[Procedure Amendment 10]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0092[Correction target item name] 0092

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0092】 しかしながら、いまの場合、DMAリク
エスト2によるDMA転送の方が優先順位が高い。そこ
で、DMA制御回路15は、現ワードの転送が完了した
時点において、周辺デバイス4aからメインメモリ3に
対する優先順位の低いデータ転送を一旦中断させる。そ
して、コントロールレジスタ18のチャンネル1に対応
するINTレジスタに1がセットされ、チャンネル1の
DMA転送が中断されたことが記憶される。さらに、D
MA制御回路15は、許可1(Ack1)を反転して、
周辺デバイス4aに対してDMA転送を禁止させる。
However, in this case, the DMA transfer by the DMA request 2 has a higher priority. Therefore, when the transfer of the current word is completed, the DMA control circuit 15 temporarily suspends the low-priority data transfer from the peripheral device 4a to the main memory 3. Then, 1 is set in the INT register corresponding to the channel 1 of the control register 18, and it is stored that the DMA transfer of the channel 1 is interrupted. Furthermore, D
The MA control circuit 15 inverts permission 1 (Ack1),
The peripheral device 4a is prohibited from DMA transfer.

【手続補正11】[Procedure Amendment 11]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0093[Correction target item name] 0093

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0093】 一方、DMA制御回路15のチャンネル
2の各レジスタに対しては、次のような初期設定がおこ
なわれている。すなわち、周辺アドレスレジスタ19b
には、周辺デバイス4bのアドレス30000000H
がセットされており、スタートアドレスレジスタ17b
には、メインメモリ3の転送元のスタートアドレス00
000500Hがセットされている。また、転送量レジ
スタ14bには、64ワード(256バイト)がセット
され、回数レジスタ13bには、1がセットされてい
る。
On the other hand, the channel of the DMA control circuit 15
The following initial settings are made for each register
It has been made. That is, the peripheral address register 19b
Address of peripheral device 4b is 30000000H
Is set , and the start address register 17b
Is the start address 00 of the transfer source of the main memory 3.
000500H is set . Also, transfer amount check
64 words (256 bytes) are set in the star 14b.
1 is set in the frequency register 13b.
It

【手続補正12】[Procedure Amendment 12]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0095[Correction target item name] 0095

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0095】 このとき、スタートアドレスレジスタ1
7bにセットされているアドレス00000500H
が、アドレスレジスタ16bにセットされ、現在回数レ
ジスタ23bの値が1にセットされる。そして、アドレ
スバッファ12を介してアドレスレジスタ16bのアド
レスがメインメモリ3に供給される。これにより、アド
レス00000500H以降から読み出されたデータ列
が、周辺デバイス4bのアドレス30000000Hに
転送される。この転送に対応して、現在転送量レジスタ
24bの値がインクリメントされる(1ワード転送され
る毎に1ずつインクリメントされる)。
At this time, the start address register 1
Address set to 7b 00000000H
Is set in the address register 16b, and the value of the current count register 23b is set to 1. Then, the address of the address register 16b is supplied to the main memory 3 via the address buffer 12. As a result, the data string read from the address 00000500H or later
Is transferred to the address 30000000H of the peripheral device 4b. Corresponding to this transfer, the current transfer amount register
The value of 24b is incremented (1 word is transferred
Incremented by 1 each time).

【手続補正13】[Procedure Amendment 13]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0096[Correction target item name] 0096

【補正方法】削除[Correction method] Delete

【手続補正14】[Procedure Amendment 14]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0097[Correction target item name] 0097

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0097】 以上のようにして、メインメモリ3から
最後のワードデータが、周辺デバイス4bに転送された
とき、DMA制御回路15には周辺デバイス4bからD
MAリクエスト2(DMA Req2)が供給されてこ
なくなる。このとき、DMA制御回路15は、コントロ
ールレジスタ18の他のチャンネルのINTレジスタの
論理を読み取り、転送を中断したチャンネルがあるか否
かを判定する。いまの場合、チャンネル1のINTレジ
スタに1がセットされているため、DMA制御回路15
はチャンネル1がデータ転送を途中で中断したことを知
る。そこで、DMA制御回路15は、周辺デバイス4a
よりDMAリクエスト1(DMA Req1)が入力さ
れてきたとき、中断したDMA転送を再開させる。
As described above, when the last word data is transferred from the main memory 3 to the peripheral device 4b, the DMA control circuit 15 is provided with the peripheral devices 4b to D.
MA request 2 (DMA Req2) is not supplied. At this time, the DMA control circuit 15 reads the logic of the INT register of the other channel of the control register 18 and determines whether there is a channel for which the transfer is interrupted. In this case, since 1 is set in the INT register of channel 1, the DMA control circuit 15
Knows that channel 1 has interrupted the data transfer. Therefore, the DMA control circuit 15 uses the peripheral device 4a.
When more DMA request 1 (DMA Req1) is input, the interrupted DMA transfer is restarted.

【手続補正15】[Procedure Amendment 15]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0098[Correction target item name] 0098

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0098】 上述したように、チャンネル1のアドレ
スレジスタ16aには、中断したときのアドレス000
01400Hが記憶されており、また、現在転送量レジ
スタ24aには、それまで転送したワード数に対応する
値256(=100H)が記憶されている。そこで、こ
れらの値を00001404Hまたは257ワード(1
01Hワード)に更新させ、第257番目のワードデー
タを、メインメモリ3のアドレス00001404Hに
転送させる。以後の動作は、上述した場合と同様であ
る。
As described above, the address register 16a of channel 1 has the address 000 at the time of interruption.
01400H is stored, and the current transfer amount register
The star 24a corresponds to the number of words transferred so far.
The value 256 (= 100H) is stored. So this
Set these values to 00001404H or 257 words (1
01H word), the 257th word day
To the address 00001404H of the main memory 3.
Transfer. Subsequent operations are the same as those described above.

【手続補正16】[Procedure Amendment 16]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0099[Correction target item name] 0099

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0099】 以上の実施例においては、チャンネルを
2チャンネルとしたが、それ以上のチャンネル数とする
ことも可能である。また、メインメモリの間でデータの
DMA転送を行う場合においては、それらに対応して、
スタートアドレスレジスタ17とアドレスレジスタ16
を、その数に対応して設けるようにすればよい。
In the above embodiments, the number of channels is two, but the number of channels may be more than that. Further, in the case of performing the DMA transfer of data between the main memory, in response thereto,
Start address register 17 and address register 16
May be provided corresponding to the number.

【手続補正17】[Procedure Amendment 17]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0102[Correction target item name] 0102

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0102】 即ち、この実施例においては、DMA転
送が終了したとき(あるいは、所定のタイミングで記憶
が指示されたとき)、他のレジスタのその時点における
値が転送後ステイタスレジスタに記憶される。例えば、
アドレスレジスタ16に記憶されている現在アドレス
や、現在回数レジスタ23や現在転送量レジスタ24
記憶されている転送済の回数(ブロック数)などが、D
MA転送が終了した時点、あるいは所定のタイミングに
おいて転送され、転送後ステイタスレジスタ41に記憶
される。
That is, in this embodiment, when the DMA transfer is completed (or when storage is instructed at a predetermined timing), the values of other registers at that time are stored in the post-transfer status register. For example,
The current address stored in the address register 16 and the number of transferred times (the number of blocks) stored in the current number register 23 and the current transfer amount register 24 are D
It is transferred at the time when the MA transfer is completed or at a predetermined timing, and is stored in the status register 41 after the transfer.

【手続補正19】[Procedure Amendment 19]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図2[Name of item to be corrected] Figure 2

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図2】 [Fig. 2]

【手続補正20】[Procedure amendment 20]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図5[Name of item to be corrected] Figure 5

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図5】 [Figure 5]

【手続補正21】[Procedure correction 21]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図6[Name of item to be corrected] Figure 6

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図6】 [Figure 6]

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 中央演算処理装置を介さずに任意の装置
から他の装置へのデータの転送を制御するデータ転送装
置において、 データ転送中に、他のデータ転送のリクエストが発生し
たとき、データ転送の優先順位を判定し、優先順位の低
いデータ転送を中断し、優先順位の高いデータ転送を開
始させる制御手段と、 データ転送を途中で中断するとき、中断した時点におけ
るステイタスを記憶する記憶手段とを備え、 前記制御手段は、優先順位の高いデータ転送が終了した
とき、前記記憶手段に記憶されているステイタスに対応
して、優先順位の低いデータ転送を再開させることを特
徴とするデータ転送装置。
1. A data transfer device for controlling transfer of data from an arbitrary device to another device without going through a central processing unit, and when a request for another data transfer occurs during data transfer, the data transfer device Control means for determining the priority of transfer, interrupting low-priority data transfer and starting high-priority data transfer, and storage means for storing the status at the time of interruption when interrupting data transfer And a control unit that resumes the low-priority data transfer in response to the status stored in the storage unit when the high-priority data transfer is completed. apparatus.
【請求項2】 データ転送中に、他のデータ転送のリク
エストが発生したとき、データ転送の優先順位を判定
し、優先順位の低いデータ転送を中断し、優先順位の高
いデータ転送を開始させることを許容するか否かを指定
する指定手段をさらに備えることを特徴とする請求項1
に記載のデータ転送装置。
2. When a request for another data transfer is issued during data transfer, the priority of the data transfer is determined, the data transfer of the low priority is interrupted, and the data transfer of the high priority is started. 2. The apparatus further comprises a specifying means for specifying whether or not to permit
The data transfer device described in 1.
【請求項3】 中央演算処理装置を介さずに任意の装置
から他の装置へのデータの転送を制御するデータ転送装
置において、 データ転送が終了したとき、終了時点におけるステイタ
スを記憶し、前記中央演算処理装置の演算が終了したと
き、記憶した前記ステイタスを前記中央演算処理装置に
提供する記憶手段を備えることを特徴とするデータ転送
装置。
3. A data transfer device for controlling transfer of data from an arbitrary device to another device without going through a central processing unit, when the data transfer is completed, the status at the end time is stored, and the central processing unit stores the status. A data transfer device comprising: storage means for providing the stored status to the central processing unit when the processing of the processing unit is completed.
【請求項4】 前記ステイタスを、前記中央演算処理装
置とともにアクセスが可能なメインメモリの所定のアド
レスに書き込むことを特徴とする請求項3に記載のデー
タ転送装置。
4. The data transfer device according to claim 3, wherein the status is written in a predetermined address of a main memory that can be accessed together with the central processing unit.
【請求項5】 データ転送が終了したとき、前記ステイ
タスが所定の条件を満たすか否かを判定し、前記ステイ
タスが所定の条件を満たすとき、前記中央演算処理装置
に対して割込をかけることを特徴とする請求項3または
4に記載のデータ転送装置。
5. When the data transfer is completed, it is determined whether or not the status satisfies a predetermined condition, and when the status satisfies the predetermined condition, the central processing unit is interrupted. The data transfer device according to claim 3, wherein
JP30597892A 1992-10-19 1992-10-19 Data transfer device Pending JPH06131294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30597892A JPH06131294A (en) 1992-10-19 1992-10-19 Data transfer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30597892A JPH06131294A (en) 1992-10-19 1992-10-19 Data transfer device

Publications (1)

Publication Number Publication Date
JPH06131294A true JPH06131294A (en) 1994-05-13

Family

ID=17951595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30597892A Pending JPH06131294A (en) 1992-10-19 1992-10-19 Data transfer device

Country Status (1)

Country Link
JP (1) JPH06131294A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009095969A1 (en) * 2008-01-31 2009-08-06 Panasonic Corporation Data transfer device, data transfer system, and data transfer method
CN102112971A (en) * 2008-08-06 2011-06-29 阿斯奔收购公司 Haltable and restartable dma engine
JP2014044609A (en) * 2012-08-28 2014-03-13 Renesas Electronics Corp Transfer control apparatus, transfer control method, and transfer control program
JP2015158894A (en) * 2014-01-23 2015-09-03 株式会社リコー Image forming apparatus, data transfer control method for image forming processing, and data transfer control program for image forming processing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009095969A1 (en) * 2008-01-31 2009-08-06 Panasonic Corporation Data transfer device, data transfer system, and data transfer method
CN102112971A (en) * 2008-08-06 2011-06-29 阿斯奔收购公司 Haltable and restartable dma engine
JP2011530744A (en) * 2008-08-06 2011-12-22 アスペン・アクイジション・コーポレーション Stoppable and restartable DMA engine
US8732382B2 (en) 2008-08-06 2014-05-20 Qualcomm Incorporated Haltable and restartable DMA engine
JP2014044609A (en) * 2012-08-28 2014-03-13 Renesas Electronics Corp Transfer control apparatus, transfer control method, and transfer control program
JP2015158894A (en) * 2014-01-23 2015-09-03 株式会社リコー Image forming apparatus, data transfer control method for image forming processing, and data transfer control program for image forming processing

Similar Documents

Publication Publication Date Title
US5696989A (en) Microcomputer equipped with DMA controller allowed to continue to perform data transfer operations even after completion of a current data transfer operation
US5826106A (en) High performance multifunction direct memory access (DMA) controller
US5251312A (en) Method and apparatus for the prevention of race conditions during dynamic chaining operations
US5367639A (en) Method and apparatus for dynamic chaining of DMA operations without incurring race conditions
JP2001216194A (en) Arithmetic processor
JP4499008B2 (en) DMA transfer system
EP1063594B1 (en) An interrupt controller and a microcomputer incorporating this controller
US7310717B2 (en) Data transfer control unit with selectable transfer unit size
JPH06131294A (en) Data transfer device
JPH10334037A (en) Communication dma device
US7185122B2 (en) Device and method for controlling data transfer
JP2001056793A (en) Information processor
JP3206656B2 (en) Prefetch device and prefetch method on bus
JP4560398B2 (en) Data processing circuit
JP3139310B2 (en) Digital signal processor
JPH01309445A (en) Data transfer system
JPH06119289A (en) Data transfer device
JP3353368B2 (en) Bus relay device
JP2871171B2 (en) Microcomputer
JPH11175396A (en) Memory access controller and storage medium
JPH06149703A (en) Message transfer controller
JP2000047930A (en) Data processor
JPH0668019A (en) Dma controller
JP2004145593A (en) Direct memory access device, bus arbitration controller, and control method for the same
JPH04160459A (en) Data transfer device