JPH1049479A - Master device - Google Patents

Master device

Info

Publication number
JPH1049479A
JPH1049479A JP20355496A JP20355496A JPH1049479A JP H1049479 A JPH1049479 A JP H1049479A JP 20355496 A JP20355496 A JP 20355496A JP 20355496 A JP20355496 A JP 20355496A JP H1049479 A JPH1049479 A JP H1049479A
Authority
JP
Japan
Prior art keywords
transfer
data
dma
dma transfer
external bus
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
JP20355496A
Other languages
Japanese (ja)
Inventor
Hideaki Yamashita
英明 山下
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP20355496A priority Critical patent/JPH1049479A/en
Publication of JPH1049479A publication Critical patent/JPH1049479A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a master device which serves as a bus master to perform the DMA(direct memory access) transfer of two data to an external bus and also reduces the interrupt notification frequency to the external bus. SOLUTION: The DMA transfer data are allocated to the DMA transfer parts 101 and 102. When the using right of an external bus is given to a device, a DMA selection part 104 selects one of both parts 101 and 102 to instruct it to perform the DMA transfer of data. At the same time, the part 104 compares the remaining transfer sizes of the parts 101 and 102 with each other and selects one of both parts 101 and 102 that has a larger remaining transfer size. An interrupt control part 105 notifies the external bus of an interrupt when both parts 101 and 102 end the transfer of allocated data respectively.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マスタデバイスに
関し、より特定的には、外部バスに接続され、当該バス
に対してバスマスタとなって、DMA転送を行うマスタ
デバイスに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a master device, and more particularly, to a master device connected to an external bus and acting as a bus master for the bus to perform DMA transfer.

【0002】[0002]

【従来の技術】外部バスに対してバスマスタとなり、C
PUとは独立してバスアクセスを行うデバイスがマスタ
デバイスである。マスタデバイスを用いて、外部バスと
内部メモリとの間でダイレクトメモリアクセス(DM
A)転送を行うことにより、CPUの負荷を軽減するこ
とが可能となる。
2. Description of the Related Art A bus master for an external bus,
A device that performs bus access independently of the PU is a master device. Direct memory access (DM) between the external bus and internal memory using a master device
A) By performing the transfer, the load on the CPU can be reduced.

【0003】図3は、従来のマスタデバイスの構成を示
すブロック図である。図3のデバイスは、DMA転送部
301、DMA転送部302およびメモリ303を備え
ている。なお、図3のデバイスは、CPUおよび他のデ
バイスとともに、外部バスに接続されている。ただし、
この外部バスは、複数のデバイスが非同期にアクセスで
きるようなバスである。
FIG. 3 is a block diagram showing a configuration of a conventional master device. 3 includes a DMA transfer unit 301, a DMA transfer unit 302, and a memory 303. The device shown in FIG. 3 is connected to an external bus together with the CPU and other devices. However,
This external bus is a bus that allows a plurality of devices to access asynchronously.

【0004】DMA転送部301およびDMA転送部3
02は、外部バスとメモリ303との間で、それぞれに
割り当てられたデータをDMA転送し、かつ、転送が終
了すると、割り込み信号を用いて、転送の終了を外部バ
スへ通知する。メモリ303は、データをリード/ライ
トすることが可能な記憶媒体である。
[0004] DMA transfer unit 301 and DMA transfer unit 3
In a case 02, the data allocated to each of the external bus and the memory 303 is DMA-transferred, and when the transfer is completed, the completion of the transfer is notified to the external bus using an interrupt signal. The memory 303 is a storage medium from which data can be read / written.

【0005】以下には、図3のデバイスが二つのデータ
をDMA転送する動作について説明する。ここで、二つ
のデータとは、メモリ空間内の互いに異なる位置に記憶
された、連続性のある符号列を意味している(以下の説
明でも同様である)。メモリ空間内のアドレスを指定す
ることにより、DMA転送部301に二つのデータのう
ちの一方のデータが、DMA転送部302には他方のデ
ータが、それぞれ割り当てられている。
The operation of the device shown in FIG. 3 for performing DMA transfer of two data will be described below. Here, the two data means continuous code strings stored at different positions in the memory space (the same applies to the following description). By designating an address in the memory space, one of the two data is assigned to the DMA transfer unit 301 and the other data is assigned to the DMA transfer unit 302.

【0006】外部バスの使用権が図3のデバイスに与え
られると、外部バスからの制御信号に基づいて、DMA
転送部301およびDMA転送部302のうちのいずれ
かが、例えば、DMA転送部301が、割り当てられた
データのDMA転送を開始する。転送中、他のデバイス
が外部バスへのアクセスを希望すると、外部バスの使用
権は、他のデバイスに与えられる。このとき、DMA転
送部301は、割り当てられたデータのDMA転送を終
了する前に、転送を中断する。
[0006] When the right to use the external bus is given to the device shown in FIG.
One of the transfer unit 301 and the DMA transfer unit 302, for example, the DMA transfer unit 301 starts the DMA transfer of the allocated data. During transfer, if another device wants to access the external bus, the right to use the external bus is granted to the other device. At this time, the DMA transfer unit 301 interrupts the transfer before ending the DMA transfer of the assigned data.

【0007】他のデバイスが外部バスへのアクセスを終
了して、図3のデバイスに再度、外部バスの使用権が与
えられると、DMA転送部302が、割り当てられたデ
ータのDMA転送を開始する。転送中、他のデバイスが
外部バスへのアクセスを希望すると、外部バスの使用権
は、他のデバイスに与えられる。このとき、DMA転送
部302は、割り当てられたデータのDMA転送を終了
する前に、転送を中断する。
When another device finishes accessing the external bus and the right to use the external bus is given to the device shown in FIG. 3 again, the DMA transfer unit 302 starts DMA transfer of the allocated data. . During transfer, if another device wants to access the external bus, the right to use the external bus is granted to the other device. At this time, the DMA transfer unit 302 suspends the transfer before ending the DMA transfer of the allocated data.

【0008】他のデバイスが外部バスへのアクセスを終
了して、図3のデバイスに再度、外部バスの使用権が与
えられると、DMA転送部301およびDMA転送部3
02のいずれかが、例えばDMA転送部301が、割り
当てられたデータのうち、転送済み分を除く残りのデー
タのDMA転送を開始する。以降、図3のデバイスに外
部バスの使用権が与えられる毎に、DMA転送部301
およびDMA転送部302のいずれかが、それぞれに割
り当てられたデータの、転送済み分を除く残りのデータ
を順次、DMA転送する。
When another device terminates the access to the external bus and is given the right to use the external bus again to the device in FIG. 3, the DMA transfer unit 301 and the DMA transfer unit 3
02, for example, the DMA transfer unit 301 starts the DMA transfer of the remaining data excluding the transferred data among the allocated data. Thereafter, each time the right to use the external bus is given to the device in FIG.
And one of the DMA transfer units 302 sequentially DMA-transfers the remaining data excluding the transferred data of the data allocated to each.

【0009】割り当てられたデータの転送を終了する
と、DMA転送部301およびDMA転送部302はそ
れぞれ、割り込み信号を用いて、外部バスに転送の終了
を通知する。そして、外部バスに接続されたCPUが、
所定の割り込み処理を行う。
When the transfer of the allocated data is completed, each of the DMA transfer unit 301 and the DMA transfer unit 302 notifies the external bus of the end of the transfer using an interrupt signal. Then, the CPU connected to the external bus
Performs predetermined interrupt processing.

【0010】[0010]

【発明が解決しようとする課題】上記のように、図3の
デバイスでは、二つのデータをDMA転送する場合、D
MA転送部301およびDMA転送部302はそれぞ
れ、自己に割り当てられたデータの転送を終了した時点
で、割り込み通知を行う。このため、DMA転送部30
1およびDMA転送部302が互いに異なるタイミング
で割り込み通知を行うことになり、CPUは、DMA転
送部301およびDMA転送部302がそれぞれ転送を
終了する毎に、割り込み処理を行う必要があった。
As described above, in the device of FIG. 3, when two data are DMA-transferred,
Each of the MA transfer unit 301 and the DMA transfer unit 302 issues an interrupt notification when the transfer of the data allocated to itself is completed. Therefore, the DMA transfer unit 30
1 and the DMA transfer unit 302 perform interrupt notification at different timings, and the CPU needs to perform an interrupt process each time the DMA transfer unit 301 and the DMA transfer unit 302 complete the transfer.

【0011】また、図3のデバイスでは、一つデータを
DMA転送する場合、そのデータは、DMA転送部30
1またはDMA転送部302のいずれか一方が転送す
る。その際、DMA転送部(301または302)は、
図3のデバイスに外部バスの使用権が与えられる毎に、
順次、そのデータを転送するが、転送を中断してから再
開する毎に、アドレスの演算およびバッファの管理のた
めの処理を行う必要があるため、転送に時間がかかると
いう問題があった。
In the device shown in FIG. 3, when one data is DMA-transferred, the data is transferred to the DMA transfer unit 30.
1 or the DMA transfer unit 302. At that time, the DMA transfer unit (301 or 302)
Each time the device of FIG. 3 is given the right to use the external bus,
The data is sequentially transferred, but every time the transfer is interrupted and then restarted, it is necessary to perform processing for address calculation and buffer management, so that there is a problem that the transfer takes time.

【0012】従って、本発明の目的は、外部バスに接続
され、その外部バスに対してバスマスタとなって、複数
のデータをDMA転送し、かつ、外部バスに割り込みを
通知する回数がより少ないマスタデバイスを提供するこ
とである。
Accordingly, an object of the present invention is to provide a master which is connected to an external bus, acts as a bus master for the external bus, DMA-transfers a plurality of data, and notifies the external bus of an interrupt less frequently. Is to provide a device.

【0013】また、本発明の他の目的は、上記マスタデ
バイスにおいて、一つのデータをDMA転送する場合、
転送に要する時間をより短くすることである。
Another object of the present invention is to provide a case where one data is DMA-transferred in the master device.
It is to shorten the time required for the transfer.

【0014】[0014]

【課題を解決するための手段および発明の効果】第1の
発明は、外部バスに接続され、当該バスに対してバスマ
スタとなって、ダイレクトメモリアクセス(DMA)転
送を行うマスタデバイスであって、転送すべきデータが
それぞれ割り当てられており、割り当てられたデータ
を、指示に応じてそれぞれDMA転送する複数のDMA
転送手段と、外部バスの使用権を与えられる毎に、複数
のDMA転送手段のうち、DMA転送を行うものを、そ
れぞれに割り当てられたデータの、転送済み分を除く残
りのデータ量に基づいて選択して、転送を指示するDM
A選択手段と、複数のDMA転送手段が、割り当てられ
たデータの転送を終了したことをそれぞれ検出して、外
部バスに割り込みを通知する割り込み制御手段とを備え
ている。
A first aspect of the present invention is a master device connected to an external bus, acting as a bus master for the bus, and performing direct memory access (DMA) transfer. A plurality of DMAs to which data to be transferred are assigned, respectively, and the assigned data are DMA-transferred according to an instruction.
Each time the transfer means and the right to use the external bus are given, one of the plurality of DMA transfer means that performs the DMA transfer is determined based on the remaining data amount of the data allocated to each of the transfer means excluding the transferred data. Select and direct transfer DM
A selection means and interrupt control means for detecting that the transfer of the assigned data has been completed by each of the plurality of DMA transfer means and notifying the external bus of an interrupt.

【0015】上記のように、第1の発明では、複数のD
MA転送手段には予め、転送すべきデータがそれぞれ割
り当てられている。外部バスの使用権を与えられる毎
に、DMA選択手段は、複数のDMA転送手段のうち、
DMA転送を行うものを、それぞれに割り当てられたデ
ータの、転送済み分を除く残りのデータ量に基づいて選
択して、転送を指示する。転送を指示されたDMA転送
手段は、自己に割り当てられたデータの、転送済み分を
除く残りのデータをDMA転送する。割り込み制御手段
は、複数のDMA転送手段が、割り当てられたデータの
転送を終了したことをそれぞれ検出して、外部バスに割
り込みを通知する。
As described above, in the first invention, a plurality of D
Data to be transferred is assigned to the MA transfer unit in advance. Each time the right to use the external bus is given, the DMA selecting means selects one of the plurality of DMA transfer means.
A DMA transfer is selected based on the remaining data amount of the data allocated to each of the DMAs except for the transferred data, and the transfer is instructed. The DMA transfer means instructed to transfer DMA-transfers the remaining data of the data allocated to itself except for the transferred data. The interrupt control unit detects that each of the plurality of DMA transfer units has finished transferring the assigned data, and notifies the external bus of the interrupt.

【0016】このように、外部バスの使用権を与えられ
る毎に、複数のDMAチャネルのうち、転送を行うチャ
ネルを、各チャネルにそれぞれ割り当てられたデータ
の、転送済み分を除く残りのデータ量に基づいて選択す
ることにより、各チャネルがそれぞれに割り当てられた
データの転送を終了するタイミングを、管理することが
できる。
As described above, each time the right to use the external bus is given, the channel to be transferred among the plurality of DMA channels is changed to the remaining data amount excluding the transferred portion of the data allocated to each channel. , It is possible to manage the timing of terminating the transfer of the data allocated to each channel.

【0017】第2の発明は、第1の発明において、DM
A選択手段は、複数のDMA転送手段のうち、それぞれ
に割り当てられたデータの、転送済み分を除く残りのデ
ータ量が最も多いものを選択することを特徴としてい
る。
According to a second aspect, in the first aspect, the DM
The A selecting means is characterized by selecting, from the plurality of DMA transfer means, the one having the largest amount of remaining data excluding the transferred data among the data allocated to each of the plurality of DMA transfer means.

【0018】これにより、各チャネルがデータの転送を
終了するタイミングを、それぞれ互いに接近させること
ができる。
Thus, the timings at which the channels end the data transfer can be brought closer to each other.

【0019】第3の発明は、第2の発明において、DM
A選択手段は、所定のしきい値を保持しており、複数の
DMA転送手段にそれぞれ割り当てられたデータの、転
送済み分を除く残りのデータ量の差が、当該しきい値以
上である場合には、残りのデータ量の多少とは無関係に
選択することを特徴としている。
The third invention is the second invention, wherein the DM
The A selection means holds a predetermined threshold value, and when the difference between the data amounts of the data allocated to the plurality of DMA transfer means, excluding the transferred data, is equal to or greater than the threshold value. Is characterized in that selection is made irrespective of the amount of remaining data.

【0020】これにより、各チャネルに割り当てられた
データの、転送済み分を除く残りのデータ量の差が、比
較的大きい場合、残りのデータ量が小さいチャネルが長
時間、選択されないのを防ぐことができる。
This prevents a channel having a small remaining data amount from being selected for a long time when the difference between the remaining data amounts of the data allocated to each channel excluding the transferred data is relatively large. Can be.

【0021】第4の発明は、第2の発明において、割り
込み制御手段は、複数のDMA転送手段のうち、少なく
とも二つのDMA転送手段が転送を終了したことを検出
した時点で、割り込みを通知することを特徴としてい
る。
In a fourth aspect based on the second aspect, the interrupt control means notifies the interrupt when it detects that at least two of the plurality of DMA transfer means have completed the transfer. It is characterized by:

【0022】このように、一つのチャネルが、割り当て
られたデータの転送を終了しても、その時点では割り込
みを通知せず、他の、少なくとも一つのチャネルが転送
を終了した時点で割り込みを通知する。これにより、外
部バスに割り込みを通知する回数をより少なくできる。
As described above, even if one channel ends the transfer of the assigned data, the interrupt is not notified at that time, and the interrupt is notified at the time when the other at least one channel ends the transfer. I do. As a result, the number of times of notifying an external bus of an interrupt can be further reduced.

【0023】第5の発明は、第3の発明において、割り
込み制御手段は、DMA選択手段が保持しているものと
同様のしきい値を保持しており、複数のDMA転送手段
にそれぞれ割り当てられたデータの、転送済み分を除く
残りのデータ量の差が、当該しきい値よりも小さい場
合、複数のDMA転送手段のうち、少なくとも二つのD
MA転送手段が転送を終了したことを検出した時点で、
割り込みを通知し、当該しきい値以上である場合には、
複数のDMA転送手段がそれぞれ転送を終了したことを
検出する毎に、割り込みを通知することを特徴としてい
る。
In a fifth aspect based on the third aspect, the interrupt control means holds a threshold value similar to that held by the DMA selection means and is assigned to each of the plurality of DMA transfer means. If the difference in the remaining data amount of the transferred data excluding the transferred data is smaller than the threshold value, at least two D
When the MA transfer means detects that the transfer has been completed,
Notify the interrupt, and if it is more than the threshold,
Each time a plurality of DMA transfer means detects that the transfer is completed, an interrupt is notified.

【0024】このように、各チャネルに割り当てられた
データの、転送済み分を除く残りのデータ量の差が、比
較的小さい場合、一つのチャネルが、割り当てられたデ
ータの転送を終了しても、その時点では割り込みを通知
せず、他の、少なくとも一つのチャネルが転送を終了し
た時点で割り込みを通知し、残りのデータ量の差が比較
的大きい場合には、各チャネルがそれぞれ転送を終了す
る毎に、割り込みを通知する。これにより、外部バスに
割り込みを通知する回数をより少なくできるとともに、
残りのデータ量の差が比較的大きい場合に、一つのチャ
ネルが転送を終了してから長時間、割り込みが通知され
ないのを防ぐことができる。
As described above, when the difference between the data amounts of the data allocated to the respective channels, excluding the transferred data, is relatively small, even if one channel has finished transferring the allocated data. , The interrupt is not notified at that time, and the interrupt is notified when at least one other channel has completed the transfer.If the difference between the remaining data amounts is relatively large, each channel ends the transfer. Every time it does, it notifies the interruption. As a result, the number of times of notifying an external bus of an interrupt can be reduced, and
When the difference between the remaining data amounts is relatively large, it is possible to prevent the interruption from being notified for a long time after one channel ends the transfer.

【0025】第6の発明は、第1〜第5の発明におい
て、一つのデータを複数のデータに分割して、複数のD
MA転送手段にそれぞれ割り当てるDMA分割手段をさ
らに備えている。
In a sixth aspect based on the first to fifth aspects, one data is divided into a plurality of data,
The apparatus further includes DMA division means for assigning to each of the MA transfer means.

【0026】上記のように、第6の発明では、転送しよ
うとする一つのデータを、DMA分割手段が複数のデー
タに分割して、複数のDMA転送手段にそれぞれ割り当
てる。一つのデータをDMA転送する場合、複数のチャ
ネルのうちの一つのチャネルが、外部バスの使用権を与
えられる毎に、順次、そのデータを転送する。そのた
め、そのデータを転送するチャネルは、転送を中断して
から再開する毎に、アドレスの演算やバッファの管理の
ための処理を行う必要がある。そこで、そのデータを複
数のデータに分割して、複数のチャネルでDMA転送す
ることにより、一つのチャネルが、分割して得られたあ
るデータをDMA転送している間に、他のチャネルは、
分割して得られた他のデータを転送する際のアドレスの
演算やバッファの管理のための処理を、予め行うことが
できる。これにより、一つのデータをDMA転送する場
合、転送に要する時間を短縮できる。
As described above, in the sixth invention, one data to be transferred is divided into a plurality of data by the DMA dividing means, and the divided data are respectively assigned to the plurality of DMA transfer means. In the case of DMA transfer of one data, one of the plurality of channels sequentially transfers the data every time the right to use the external bus is given. Therefore, the channel for transferring the data needs to perform processing for address calculation and buffer management every time the transfer is interrupted and then restarted. Therefore, by dividing the data into a plurality of data and performing DMA transfer on a plurality of channels, while one channel is DMA-transferring certain data obtained by division, other channels are
Processing for address calculation and buffer management when transferring other data obtained by division can be performed in advance. As a result, when one piece of data is DMA-transferred, the time required for the transfer can be reduced.

【0027】第7の発明は、第1〜第6の発明におい
て、外部バスは、PCIローカルバスであることを特徴
としている。
According to a seventh aspect, in the first to sixth aspects, the external bus is a PCI local bus.

【0028】PCIローカルバス上では、複数のデバイ
スが非同期に転送を行うことができるため、顕著な効果
が得られる。
On the PCI local bus, since a plurality of devices can perform asynchronous transfer, a remarkable effect can be obtained.

【0029】[0029]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第1の実施形態)以下、本発明の第1の実施形態につ
いて、図面を参照しながら説明する。図1は、本発明の
第1の実施形態に係るマスタデバイスの構成を示すブロ
ック図である。図1のデバイスは、DMA転送部10
1、DMA転送部102、メモリ103、DMA選択部
104および割り込み制御部105を備えている。な
お、図1のデバイスは、CPUおよび他のデバイスとと
もに、外部バスに接続されている。ただし、この外部バ
スは、複数のデバイスが非同期にアクセスできるような
バスである。
(First Embodiment) Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of a master device according to the first embodiment of the present invention. The device shown in FIG.
1, a DMA transfer unit 102, a memory 103, a DMA selection unit 104, and an interrupt control unit 105. The device in FIG. 1 is connected to an external bus together with the CPU and other devices. However, this external bus is a bus that can be accessed asynchronously by a plurality of devices.

【0030】DMA転送部101およびDMA転送部1
02はそれぞれ、外部バスとメモリ103との間で、自
己に割り当てられたデータをDMA転送する。メモリ1
03は、データをリード/ライトすることが可能な記憶
媒体である。DMA選択部104は、図1のデバイスに
外部バスの使用権が与えられる毎に、DMA転送部10
1およびDMA転送部102のうち、DMA転送を行う
ものを選択して、転送を指示する。
DMA transfer unit 101 and DMA transfer unit 1
02 DMA-transfers data allocated to itself between the external bus and the memory 103. Memory 1
03 is a storage medium from which data can be read / written. Each time the device of FIG. 1 is given the right to use the external bus, the DMA selection unit 104
1 and the DMA transfer unit 102 that performs the DMA transfer are selected and the transfer is instructed.

【0031】その際、DMA選択部104は、DMA転
送部101およびDMA転送部102にそれぞれ割り当
てられたデータの、転送済み分を除く残りのデータ量
(以下、残り転送サイズ)を相互に比較して、より残り
転送サイズが大きい方のDMA転送部(101または1
02)を選択する。割り込み制御部105は、DMA転
送部101およびDMA転送部102がともに、割り当
てられたデータの転送を終了した時点で、割り込み信号
を用いて、外部バスに転送の終了を通知する。
At this time, the DMA selection unit 104 compares the data amounts of the data allocated to the DMA transfer unit 101 and the DMA transfer unit 102 other than the transferred data (hereinafter, the remaining transfer size) with each other. The DMA transfer unit (101 or 1) having the larger remaining transfer size.
02) is selected. When both the DMA transfer unit 101 and the DMA transfer unit 102 complete the transfer of the assigned data, the interrupt control unit 105 notifies the external bus of the end of the transfer using the interrupt signal.

【0032】以下には、図1のデバイスが二つのデータ
をDMA転送する動作について説明する。DMA転送部
101およびDMA転送部102には、上記従来例と同
様にして、DMA転送すべきデータがそれぞれ割り当て
られており、DMA転送部101およびDMA転送部1
02はそれぞれ、割り当てられたデータの一部を、すで
に転送済みであるとする。このとき、DMA選択部10
4は、DMA転送部101およびDMA転送部102
の、それぞれの残り転送サイズを認識しており、図1の
デバイスに外部バスの使用権が与えられると、これらの
残り転送サイズを相互に比較する。
The operation of the device shown in FIG. 1 for DMA transfer of two data will be described below. Data to be DMA-transferred are assigned to the DMA transfer units 101 and 102 in the same manner as in the above-described conventional example.
02 respectively assume that a part of the allocated data has already been transferred. At this time, the DMA selection unit 10
4 is a DMA transfer unit 101 and a DMA transfer unit 102
When the device of FIG. 1 is given the right to use the external bus, these remaining transfer sizes are compared with each other.

【0033】DMA転送部101の残り転送サイズがよ
り大きい場合、DMA選択部104は、DMA転送部1
01に対して、割り当てられたデータの、転送済み分を
除く残りのデータをDMA転送するよう指示し、DMA
転送部102の残り転送サイズがより大きい場合には、
DMA転送部102に対して、割り当てられたデータ
の、転送済み分を除く残りのデータをDMA転送するよ
う指示する。指示に応じて、DMA転送部(101また
は102)は、割り当てられたデータの、転送済み分を
除く残りのデータのDMA転送を開始する。
When the remaining transfer size of the DMA transfer unit 101 is larger, the DMA selection unit 104
01, and instructs DMA transfer of the remaining data of the allocated data excluding the transferred data.
If the remaining transfer size of the transfer unit 102 is larger,
It instructs the DMA transfer unit 102 to perform DMA transfer of the remaining data of the allocated data excluding the transferred data. In response to the instruction, the DMA transfer unit (101 or 102) starts the DMA transfer of the remaining data of the allocated data excluding the transferred data.

【0034】DMA転送部(101または102)が残
りのデータをDMA転送中、外部バスの使用権が他のデ
バイスに与えられると、DMA転送部(101または1
02)は、転送を一時中断する。そして、他のデバイス
が外部バスへのアクセスを終了して、図3のデバイスに
再度、外部バスの使用権が与えられると、DMA選択部
104は、DMA転送部101およびDMA転送部10
2の、それぞれの残り転送サイズを相互に比較する。以
降、図1のデバイスは、上記と同様の動作を繰り返す。
While the DMA transfer unit (101 or 102) is performing DMA transfer of the remaining data, if the right to use the external bus is given to another device, the DMA transfer unit (101 or 1)
02) temporarily suspends the transfer. Then, when another device finishes accessing the external bus and the device of FIG. 3 is given the right to use the external bus again, the DMA selecting unit 104 sets the DMA transfer unit 101 and the DMA transfer unit 10
2 are compared with each other. Thereafter, the device of FIG. 1 repeats the same operation as described above.

【0035】割り込み制御部105は、DMA転送部1
01およびDMA転送部102の動作を監視しており、
DMA転送部101およびDMA転送部102がとも
に、割り当てられたデータの転送を終了した時点で、割
り込み信号を用いて、外部バスに転送の終了を通知す
る。そして、外部バスに接続されたCPUが、所定の割
り込み処理を行う。
The interrupt control unit 105 controls the DMA transfer unit 1
01 and the operation of the DMA transfer unit 102.
When both the DMA transfer unit 101 and the DMA transfer unit 102 complete the transfer of the assigned data, they notify the external bus of the end of the transfer using an interrupt signal. Then, the CPU connected to the external bus performs a predetermined interrupt process.

【0036】以上のように、本実施形態では、図1のデ
バイスに外部バスの使用権が与えられる毎に、二つのD
MA転送部(101および102)のうち、DMA転送
を行うものを、各DMA転送部(101および102)
にそれぞれ割り当てられたデータの、転送済み分を除く
残りのデータ量に基づいて選択することにより、各DM
A転送部(101および102)がそれぞれに割り当て
られたデータの転送を終了するタイミングを、管理する
ことができる。
As described above, in this embodiment, every time the right to use the external bus is given to the device shown in FIG.
Among the MA transfer units (101 and 102), the DMA transfer unit (101 and 102)
Each DM is selected based on the remaining data amount excluding the transferred amount of the data allocated to each DM.
The timing at which the A transfer units (101 and 102) end the transfer of the data assigned to each can be managed.

【0037】また、二つのDMA転送部(101および
102)のうち、残り転送サイズがより大きいものを選
択することにより、各DMA転送部(101および10
2)が、割り当てられたデータの転送を終了するタイミ
ングを、それぞれ互いに接近させることができる。
Further, by selecting one of the two DMA transfer units (101 and 102) having the larger remaining transfer size, each DMA transfer unit (101 and 10) is selected.
2), the timings for terminating the transfer of the allocated data can be brought closer to each other.

【0038】さらに、一方のDMA転送部(101また
は102)が、割り当てられたデータの転送を終了して
も、割り込み制御部105は、その時点では割り込みを
通知せず、他方のDMA転送部(102または101)
が転送を終了した時点で割り込みを通知することによ
り、外部バスに割り込みを通知する回数をより少なくで
きる。
Further, even if one of the DMA transfer units (101 or 102) completes the transfer of the assigned data, the interrupt control unit 105 does not notify the interrupt at that time and the other DMA transfer unit (101 or 102) 102 or 101)
By notifying the interrupt at the time when the transfer is completed, the number of times of notifying the interrupt to the external bus can be further reduced.

【0039】なお、本実施形態では、二つのデータをD
MA転送をする場合について説明したが、代わりに、三
つ以上のDMA転送部を備えるようにして、DMA選択
部104が、これら三つ以上のDMA転送部のうち、最
も残り転送サイズが大きいDMA転送部を選択し、か
つ、割り込み制御部105は、少なくとも二つのDMA
転送部が転送を終了した時点で割り込みを通知すること
により、三つ以上のデータをDMA転送する場合にも、
外部バスに割り込みを通知する回数をより少なくするこ
とができる。
In this embodiment, two data are stored in D
Although the case of performing the MA transfer has been described, instead, three or more DMA transfer units are provided, and the DMA selection unit 104 selects the DMA having the largest remaining transfer size among the three or more DMA transfer units. The transfer unit is selected, and the interrupt control unit 105 has at least two DMAs.
By notifying an interrupt when the transfer unit has completed the transfer, even when DMA transfer of three or more data is performed,
The number of times of notifying an external bus of an interrupt can be further reduced.

【0040】ところで、本実施形態では、二つのDMA
転送部(101および102)の残り転送サイズの差が
比較的大きい場合には、残り転送サイズがより小さい方
のDMA転送部(101または102)が長時間、選択
されないため、遅延などの不都合が生じることがある。
次に説明する第2の実施形態は、こうした不都合を防ぐ
ことができるマスタデバイスに関するものである。
In this embodiment, two DMAs are used.
When the difference between the remaining transfer sizes of the transfer units (101 and 102) is relatively large, the DMA transfer unit (101 or 102) having the smaller remaining transfer size is not selected for a long time, so that inconvenience such as delay may occur. May occur.
The second embodiment described below relates to a master device that can prevent such inconvenience.

【0041】(第2の実施形態)以下、本発明の第2の
実施形態について、図面を参照しながら説明する。本実
施形態に係るマスタデバイスの構成は、図1のものと同
様であるため、以下の説明には、図1を用いることにす
る。DMA選択部104は、所定のしきい値を保有して
おり、DMA転送部101およびDMA転送部102の
残り転送サイズの差と、このしきい値とを相互に比較す
る。DMA選択部104は、比較の結果、残り転送サイ
ズの差がこのしきい値よりも小さい場合、DMA転送部
101およびDMA転送部102のうち、残り転送サイ
ズがより大きいものを選択し、残り転送サイズの差がこ
のしきい値以上である場合には、いずれか一方を任意に
選択する。
(Second Embodiment) Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. Since the configuration of the master device according to the present embodiment is the same as that of FIG. 1, FIG. 1 will be used in the following description. The DMA selection unit 104 has a predetermined threshold value, and compares the difference between the remaining transfer sizes of the DMA transfer unit 101 and the DMA transfer unit 102 with this threshold value. If the difference between the remaining transfer sizes is smaller than this threshold as a result of the comparison, the DMA selecting unit 104 selects the DMA transfer unit 101 or the DMA transfer unit 102 with the larger remaining transfer size, and selects the remaining transfer size. If the size difference is greater than or equal to this threshold, either one is arbitrarily selected.

【0042】割り込み制御部105は、DMA選択部1
04が保有しているものと同様のしきい値を保有してお
り、DMA転送部101およびDMA転送部102の残
り転送サイズの差と、このしきい値とを相互に比較す
る。割り込み制御部105は、比較の結果、残り転送サ
イズの差がこのしきい値よりも小さい場合、DMA転送
部101およびDMA転送部102がともに、割り当て
られたデータの転送を終了した時点で、外部バスに割り
込みを通知し、残り転送サイズの差がこのしきい値以上
である場合には、DMA転送部101およびDMA転送
部102がそれぞれ、割り当てられたデータの転送を終
了する毎に、割り込みを通知する。他の構成要素は、上
記第1の実施形態におけるものと同様の動作を行う。
The interrupt control unit 105 includes a DMA selection unit 1
04 has a threshold value similar to the threshold value, and compares the difference between the remaining transfer sizes of the DMA transfer units 101 and 102 with this threshold value. When the difference between the remaining transfer sizes is smaller than the threshold value as a result of the comparison, the interrupt control unit 105 determines whether the DMA transfer unit 101 and the DMA transfer unit 102 have finished transferring the assigned data. When an interrupt is notified to the bus and the difference between the remaining transfer sizes is equal to or larger than the threshold value, the DMA transfer unit 101 and the DMA transfer unit 102 generate an interrupt each time the transfer of the assigned data ends. Notice. Other components perform operations similar to those in the first embodiment.

【0043】以下には、図1のデバイスが二つのデータ
をDMA転送する動作について説明する。DMA転送部
101およびDMA転送部102には、上記第1の実施
形態と同様にして、DMA転送すべきデータがそれぞれ
割り当てられており、DMA転送部101およびDMA
転送部102はそれぞれ、割り当てられたデータの一部
を、すでに転送済みであるとする。このとき、DMA選
択部104は、DMA転送部101およびDMA転送部
102の、それぞれの残り転送サイズを認識しており、
図1のデバイスに外部バスの使用権が与えられると、最
初、これらの残り転送サイズの差と、保有しているしき
い値とを比較する。
The operation of the device shown in FIG. 1 for DMA transfer of two data will be described below. Data to be DMA-transferred is allocated to the DMA transfer unit 101 and the DMA transfer unit 102 in the same manner as in the first embodiment.
It is assumed that each of the transfer units 102 has already transferred a part of the allocated data. At this time, the DMA selection unit 104 recognizes the remaining transfer size of each of the DMA transfer unit 101 and the DMA transfer unit 102,
When the device of FIG. 1 is given the right to use the external bus, first, the difference between these remaining transfer sizes is compared with the retained threshold value.

【0044】残り転送サイズの差がしきい値よりも小さ
い場合、DMA選択部104は、次に、DMA転送部1
01およびDMA転送部102の残り転送サイズを相互
に比較する。以降、図1のデバイスの動作は、上記第1
の実施形態におけるものと同様である。
If the difference between the remaining transfer sizes is smaller than the threshold value, the DMA selection unit 104
01 and the remaining transfer size of the DMA transfer unit 102 are compared with each other. Hereinafter, the operation of the device of FIG.
This is the same as that in the embodiment.

【0045】残り転送サイズの差がしきい値以上である
場合には、DMA選択部104は、DMA転送部101
およびDMA転送部102のうち、転送を行うものを任
意に選択して、転送を指示する。転送を指示されたDM
A転送部(101または102)は、自己に割り当てら
れたデータの、転送済み分を除く残りのデータのDMA
転送を開始し、そして、外部バスの使用権が他のデバイ
スに与えられると、転送を一時中断する。
If the difference between the remaining transfer sizes is equal to or larger than the threshold value, the DMA selecting unit 104
And the DMA transfer unit 102 is arbitrarily selected to perform the transfer, and instructs the transfer. DM instructed to transfer
The A transfer unit (101 or 102) performs the DMA transfer of the remaining data of the data allocated to itself except the transferred data.
The transfer is started, and when the right to use the external bus is given to another device, the transfer is suspended.

【0046】他のデバイスが外部バスへのアクセスを終
了して、図1のデバイスに再度、外部バスの使用権が与
えられると、DMA選択部104は、DMA転送部10
1およびDMA転送部102の、それぞれの残り転送サ
イズの差と、保有しているしきい値とを相互に比較す
る。以降、図1のデバイスは、上記と同様の動作を繰り
返す。
When another device terminates the access to the external bus and the right to use the external bus is given to the device in FIG. 1 again, the DMA selecting unit 104
The difference between the remaining transfer sizes of 1 and the DMA transfer unit 102 is compared with the stored threshold value. Thereafter, the device of FIG. 1 repeats the same operation as described above.

【0047】割り込み制御部105は、DMA選択部1
04が保有しているものと同様のしきい値を保有してお
り、DMA転送部101およびDMA転送部102の残
り転送サイズの差と、このしきい値とを比較する。残り
転送サイズの差がしきい値よりも小さい場合、割り込み
制御部105は、DMA転送部101およびDMA転送
部102がともに、割り当てられたデータの転送を終了
した時点で、外部バスに割り込みを通知する。
[0047] The interrupt control unit 105 controls the DMA selection unit 1
04 has a threshold value similar to the threshold value, and compares the difference between the remaining transfer sizes of the DMA transfer unit 101 and the DMA transfer unit 102 with this threshold value. When the difference between the remaining transfer sizes is smaller than the threshold value, the interrupt control unit 105 notifies the external bus of the interrupt when both the DMA transfer unit 101 and the DMA transfer unit 102 complete the transfer of the allocated data. I do.

【0048】残り転送サイズの差がしきい値以上である
場合には、割り込み制御部105は、DMA転送部10
1およびDMA転送部102がそれぞれ、割り当てられ
たデータの転送を終了する毎に、外部バスに割り込みを
通知する。そして、外部バスに接続されたCPUが、所
定の割り込み処理を行う。
If the difference between the remaining transfer sizes is equal to or larger than the threshold value, the interrupt control unit 105
1 and the DMA transfer unit 102 notify the external bus of an interrupt each time the transfer of the assigned data is completed. Then, the CPU connected to the external bus performs a predetermined interrupt process.

【0049】以上のように、本実施形態では、DMA選
択部104に、所定のしきい値を設定しておく。DMA
選択部104は、二つのDMA転送部(101および1
02)の、残り転送サイズの差が、しきい値よりも小さ
い場合、二つのDMA転送部(101および102)の
うち、残り転送サイズがより大きいものを選択して転送
を指示し、残り転送サイズの差が、しきい値以上である
場合には、残り転送サイズの大小とは無関係に選択す
る。これにより、各DMA転送部(101および10
2)がデータの転送を終了するタイミングを、それぞれ
互いに接近させることができるとともに、各DMA転送
部(101および102)の残り転送サイズの差が比較
的大きい場合に、残り転送サイズが小さい方のDMA転
送部(101または102)が長時間、選択されないの
を防ぐことができる。
As described above, in this embodiment, a predetermined threshold value is set in the DMA selection unit 104. DMA
The selection unit 104 includes two DMA transfer units (101 and 1).
02), when the difference between the remaining transfer sizes is smaller than the threshold value, the DMA transfer unit (101 and 102) selects the one with the larger remaining transfer size to instruct the transfer, and issues the remaining transfer. If the difference between the sizes is equal to or greater than the threshold, the size is selected irrespective of the size of the remaining transfer size. Thereby, each DMA transfer unit (101 and 10)
2), the data transfer end timings can be approached to each other, and when the difference between the remaining transfer sizes of the DMA transfer units (101 and 102) is relatively large, the smaller the remaining transfer size is, It is possible to prevent the DMA transfer unit (101 or 102) from being not selected for a long time.

【0050】そして、二つのDMA転送部(101およ
び102)の、残り転送サイズの差が、しきい値よりも
小さい場合、割り込み制御部105は、一方のDMA転
送部(101または102)が、割り当てられたデータ
の転送を終了しても、その時点では割り込みを通知せ
ず、他方のDMA転送部(102または101)が転送
を終了した時点で、割り込みを通知する。一方、残り転
送サイズの差がしきい値以上である場合には、各DMA
転送部(101および102)が転送を終了する毎に、
割り込みを通知する。これにより、外部バスに割り込み
を通知する回数をより少なくできるとともに、各DMA
転送部(101および102)の残り転送サイズの差が
比較的大きい場合に、一方のDMA転送部(101およ
び102)が転送を終了してから長時間、割り込みが通
知されないのを防ぐことができる。
When the difference between the remaining transfer sizes of the two DMA transfer units (101 and 102) is smaller than the threshold value, the interrupt control unit 105 determines whether one of the DMA transfer units (101 or 102) Even when the transfer of the allocated data is completed, the interrupt is not notified at that time, and the interrupt is notified when the other DMA transfer unit (102 or 101) completes the transfer. On the other hand, if the difference between the remaining transfer sizes is equal to or larger than the threshold,
Each time the transfer unit (101 and 102) completes the transfer,
Signal an interrupt. As a result, the number of times of notifying an external bus of an interrupt can be reduced, and each DMA
When the difference between the remaining transfer sizes of the transfer units (101 and 102) is relatively large, it is possible to prevent the interrupt from being notified for a long time after one of the DMA transfer units (101 and 102) completes the transfer. .

【0051】なお、本実施形態では、二つのデータをD
MA転送をする場合について説明したが、三つ以上のD
MA転送部を備えるようにして、三つ以上のデータをD
MA転送するようにしてもよい。ただし、この場合、D
MA選択部104は、これら三つ以上のDMA転送部
の、相互の残り転送サイズの差をそれぞれ、しきい値と
比較して、全ての残り転送サイズの差がしきい値よりも
小さい場合、三つ以上のDMA転送部のうち、残り転送
サイズが最も大きいものを選択して、転送を指示し、い
ずれかの残り転送サイズの差がしきい値以上である場合
には、残り転送サイズの大小とは無関係に選択する。
In this embodiment, two data are stored in D
Although the case of performing MA transfer has been described, three or more D
MA transfer unit, and three or more data
MA transfer may be performed. However, in this case, D
The MA selection unit 104 compares the difference between the remaining transfer sizes of the three or more DMA transfer units with a threshold value, respectively. If all the remaining transfer size differences are smaller than the threshold value, Of the three or more DMA transfer units, the one with the largest remaining transfer size is selected and transfer is instructed. If the difference between any of the remaining transfer sizes is greater than or equal to the threshold value, the remaining transfer size is Choose regardless of size.

【0052】また、割り込み制御部105は、残り転送
サイズの差をそれぞれ、しきい値と比較して、全ての残
り転送サイズの差がしきい値よりも小さい場合、少なく
とも二つのDMA転送部が転送を終了した時点で、割り
込みを通知し、いずれかの残り転送サイズの差がしきい
値以上である場合には、各DMA転送部がそれぞれDM
A転送を終了する毎に、割り込みを通知することにな
る。
Further, the interrupt control unit 105 compares the difference between the remaining transfer sizes with the threshold value, and if all the difference between the remaining transfer sizes is smaller than the threshold value, at least two DMA transfer units At the end of the transfer, an interrupt is notified, and if the difference between any of the remaining transfer sizes is equal to or greater than the threshold, each DMA transfer unit
Each time the A transfer is completed, an interrupt is notified.

【0053】(第3の実施形態)以下、本発明の第3の
実施形態について、図面を参照しながら説明する。図2
は、本発明の第3の実施形態に係るマスタデバイスの構
成を示すブロック図である。図2のデバイスは、DMA
転送部201、DMA転送部202、メモリ203、D
MA選択部204、割り込み制御部205およびDMA
分割部206を備えている。なお、図2のデバイスは、
CPUおよび他のデバイスとともに、外部バスに接続さ
れている。ただし、この外部バスは、複数のデバイスが
非同期にアクセスできるようなバスである。
(Third Embodiment) Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. FIG.
FIG. 11 is a block diagram illustrating a configuration of a master device according to a third embodiment of the present invention. The device of FIG.
Transfer unit 201, DMA transfer unit 202, memory 203, D
MA selection unit 204, interrupt control unit 205, and DMA
A dividing unit 206 is provided. In addition, the device of FIG.
It is connected to an external bus together with the CPU and other devices. However, this external bus is a bus that can be accessed asynchronously by a plurality of devices.

【0054】DMA分割部206は、一つのデータを二
つのデータに分割して、DMA転送部201およびDM
A転送部202にそれぞれ割り当てる。すなわち、メモ
リ空間内のある位置に記憶された、連続性のある符号列
を、DMA転送部201およびDMA転送部202のう
ちのいずれか一方がDMA転送しようとしている場合、
DMA分割部206は、その符号列の一部をDMA転送
部201に、残りをDMA転送部202に、それぞれア
ドレスを指定して割り当てる。他の構成要素は、上記第
1の実施形態におけるものと同様の動作を行う。
The DMA dividing unit 206 divides one data into two data, and
A is assigned to each of the A transfer units 202. That is, when one of the DMA transfer unit 201 and the DMA transfer unit 202 attempts to perform a DMA transfer of a continuous code string stored at a certain position in the memory space,
The DMA division unit 206 assigns a part of the code string to the DMA transfer unit 201 and assigns the rest to the DMA transfer unit 202 by designating addresses. Other components perform operations similar to those in the first embodiment.

【0055】以下には、図2のデバイスが一つのデータ
を二つに分割してDMA転送する動作について説明す
る。図2のデバイスに外部バスの使用権が与えられる
と、DMA分割部206は、DMA転送部201または
DMA転送部202のいずれか一方が転送しようとして
いる一つのデータを二つのデータに分割して、DMA転
送部201およびDMA転送部202にそれぞれ割り当
てる。ただし、本実施形態では、DMA分割部206
は、一つのデータを、ほぼ同じデータ量を有する二つの
データに分割する。以降、DMA転送部201およびD
MA転送部202が割り当てられたデータをDMA転送
し、割り込み制御部205が割り込み信号を送信する動
作はそれぞれ、上記第1の実施形態におけるDMA転送
部101およびDMA転送部102、割り込み制御部1
05のものと同様である。
The operation of the device shown in FIG. 2 for dividing one data into two and performing DMA transfer will be described below. When the right to use the external bus is given to the device in FIG. 2, the DMA dividing unit 206 divides one data to be transferred by either the DMA transfer unit 201 or the DMA transfer unit 202 into two data. , DMA transfer unit 201 and DMA transfer unit 202, respectively. However, in the present embodiment, the DMA dividing unit 206
Divides one piece of data into two pieces of data having substantially the same data amount. Hereinafter, the DMA transfer units 201 and D
The operations of the MA transfer unit 202 performing DMA transfer of the allocated data and the interrupt control unit 205 transmitting an interrupt signal are performed by the DMA transfer unit 101, the DMA transfer unit 102, and the interrupt control unit 1 in the first embodiment, respectively.
05.

【0056】以上のように、本実施形態では、転送しよ
うとする一つのデータを、DMA分割部206が二つの
データに分割して、二つのDMA転送部(201および
202)にそれぞれ割り当てる。一つのデータをDMA
転送する場合、二つのDMA転送部(201および20
2)のうちのいずれか一方が、図2のデバイスに外部バ
スの使用権が与えられる毎に、順次、そのデータを転送
する。そのため、そのデータを転送するDMA転送部
(201または202)は、転送を中断してから再開す
る毎に、アドレスの演算やバッファの管理のための処理
を行う必要がある。
As described above, in the present embodiment, one data to be transferred is divided by the DMA dividing unit 206 into two data and allocated to the two DMA transfer units (201 and 202). One data is DMA
When transferring, two DMA transfer units (201 and 20)
2) sequentially transfers the data each time the right to use the external bus is given to the device in FIG. Therefore, the DMA transfer unit (201 or 202) that transfers the data needs to perform processing for address calculation and buffer management every time the transfer is interrupted and restarted.

【0057】そこで、そのデータを二つのデータに分割
して、二つのDMA転送部(201および202)が交
互にDMA転送することにより、一つのDMA転送部
(201または202)が、分割して得られた一方のデ
ータをDMA転送している間に、もう一つのDMA転送
部(202または201)は、分割して得られた他方の
データを転送する際のアドレスの演算やバッファの管理
のための処理を、予め行うことができる。これにより、
一つのデータをDMA転送する場合、転送に要する時間
を短縮できる。
Therefore, the data is divided into two data, and the two DMA transfer units (201 and 202) perform DMA transfer alternately, whereby one DMA transfer unit (201 or 202) is divided. While one of the obtained data is being DMA-transferred, the other DMA transfer unit (202 or 201) performs an address calculation and a buffer management when transferring the other data obtained by division. Can be performed in advance. This allows
When one piece of data is DMA-transferred, the time required for the transfer can be reduced.

【0058】なお、本実施形態では、DMA分割部20
6は、一つのデータを、ほぼ同じデータ量を有する二つ
のデータに分割しているが、代わりに、DMA分割部2
06が、一つのデータを互いに異なるデータ量を有する
二つのデータに分割してもよい。ただし、この場合に
は、DMA転送部201およびDMA転送部202が割
り当てられたデータをDMA転送し、割り込み制御部2
05が割り込み信号を送信する動作はそれぞれ、上記第
2の実施形態におけるDMA転送部101およびDMA
転送部102、割り込み制御部105のものと同様とな
る。
In this embodiment, the DMA division unit 20
6 divides one piece of data into two pieces of data having substantially the same data amount.
06 may divide one piece of data into two pieces of data having different data amounts. However, in this case, the DMA transfer unit 201 and the DMA transfer unit 202 transfer the assigned data by DMA, and the interrupt control unit 2
The operations performed by the DMA transfer unit 101 and the DMA transfer unit in the second embodiment are respectively performed by the DMA transfer unit 05 and the DMA transfer unit.
This is the same as that of the transfer unit 102 and the interrupt control unit 105.

【0059】また、本実施形態では、一つのデータを二
つのデータに分割して、二つのDMA転送部(201お
よび202)がDMA転送しているが、三つ以上のDM
A転送部を備えるようにし、一つのデータを三つ以上の
データに分割して、三つ以上のDMA転送部がDMA転
送してもよい。
In this embodiment, one data is divided into two data and two DMA transfer units (201 and 202) perform the DMA transfer.
An A transfer unit may be provided, one data may be divided into three or more data, and three or more DMA transfer units may perform the DMA transfer.

【0060】また、図1および図2のマスタデバイスは
それぞれ、メモリ(103、203)を備えているが、
代わりに、メモリをマスタデバイスの外部に設け、マス
タデバイスはメモリを備えないような構成であってもよ
い。
Each of the master devices shown in FIGS. 1 and 2 has a memory (103, 203).
Alternatively, the memory may be provided outside the master device, and the master device may not include the memory.

【0061】また、図1および図2のマスタデバイスが
接続されている外部バスがPCIローカルバスである場
合、PCIローカルバス上では、複数のデバイスが非同
期に転送を行うことができるため、顕著な効果が得られ
る。
When the external bus to which the master device shown in FIGS. 1 and 2 is connected is a PCI local bus, a plurality of devices can perform asynchronous transfer on the PCI local bus, which is remarkable. The effect is obtained.

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

【図1】本発明の第1の実施形態に係るマスタデバイス
の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a master device according to a first embodiment of the present invention.

【図2】本発明の第3の実施形態に係るマスタデバイス
の構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a master device according to a third embodiment of the present invention.

【図3】一従来例に係るマスタデバイスの構成を示すブ
ロック図である。
FIG. 3 is a block diagram illustrating a configuration of a master device according to a conventional example.

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

101、102、201、202 DMA転送部 103、203 メモリ 104、204 DMA選択部 105、205 割り込み制御部 206 DMA分割部 101, 102, 201, 202 DMA transfer unit 103, 203 Memory 104, 204 DMA selection unit 105, 205 Interrupt control unit 206 DMA division unit

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 外部バスに接続され、当該バスに対して
バスマスタとなって、ダイレクトメモリアクセス(DM
A)転送を行うマスタデバイスであって、 転送すべきデータがそれぞれ割り当てられており、割り
当てられたデータを、指示に応じてそれぞれDMA転送
する複数のDMA転送手段と、 外部バスの使用権を与えられる毎に、前記複数のDMA
転送手段のうち、DMA転送を行うものを、それぞれに
割り当てられたデータの、転送済み分を除く残りのデー
タ量に基づいて選択して、転送を指示するDMA選択手
段と、 前記複数のDMA転送手段が、割り当てられたデータの
転送を終了したことをそれぞれ検出して、前記外部バス
に割り込みを通知する割り込み制御手段とを備えるマス
タデバイス。
An external bus is connected to an external bus and serves as a bus master for the bus.
A) A master device that performs transfer, to which data to be transferred is assigned, a plurality of DMA transfer means for respectively transferring the assigned data by DMA according to an instruction, and a right to use an external bus is given. The plurality of DMAs
DMA transfer means for selecting one of the transfer means for performing the DMA transfer based on the remaining data amount excluding the transferred data of the data allocated to each of the transfer means, and instructing the transfer, A master device comprising: interrupt control means for detecting completion of transfer of assigned data, and notifying the external bus of an interrupt.
【請求項2】 前記DMA選択手段は、前記複数のDM
A転送手段のうち、それぞれに割り当てられたデータ
の、転送済み分を除く残りのデータ量が最も多いものを
選択することを特徴とする、請求項1に記載のマスタデ
バイス。
2. The method according to claim 1, wherein the DMA selection unit includes a plurality of the DMs.
2. The master device according to claim 1, wherein, among the A transfer units, a transfer unit that has the largest remaining data amount except for the transferred portion of the data allocated to each unit is selected.
【請求項3】 前記DMA選択手段は、所定のしきい値
を保持しており、前記複数のDMA転送手段にそれぞれ
割り当てられたデータの、転送済み分を除く残りのデー
タ量の差が、当該しきい値以上である場合には、残りの
データ量の多少とは無関係に選択することを特徴とす
る、請求項2に記載のマスタデバイス。
3. The DMA selection means holds a predetermined threshold value, and the difference between the data amounts of the data allocated to the plurality of DMA transfer means, excluding the transferred data, is determined by the DMA threshold value. 3. The master device according to claim 2, wherein when the data amount is equal to or larger than the threshold value, the selection is made regardless of the remaining data amount.
【請求項4】 前記割り込み制御手段は、前記複数のD
MA転送手段のうち、少なくとも二つのDMA転送手段
が転送を終了したことを検出した時点で、割り込みを通
知することを特徴とする、請求項2に記載のマスタデバ
イス。
4. The interrupt control means according to claim 1, wherein
3. The master device according to claim 2, wherein an interrupt is notified when it is detected that at least two of the MA transfer units have completed the transfer.
【請求項5】 前記割り込み制御手段は、前記DMA選
択手段が保持しているものと同様のしきい値を保持して
おり、前記複数のDMA転送手段にそれぞれ割り当てら
れたデータの、転送済み分を除く残りのデータ量の差
が、当該しきい値よりも小さい場合、前記複数のDMA
転送手段のうち、少なくとも二つのDMA転送手段が転
送を終了したことを検出した時点で、割り込みを通知
し、当該しきい値以上である場合には、前記複数のDM
A転送手段がそれぞれ転送を終了したことを検出する毎
に、割り込みを通知することを特徴とする、請求項3に
記載のマスタデバイス。
5. The interrupt control means holds a threshold value similar to the threshold value held by the DMA selection means, and stores a transfer amount of data assigned to each of the plurality of DMA transfer means. Is smaller than the threshold value, the plurality of DMAs
When it is detected that at least two of the DMA transfer means have completed the transfer, an interrupt is notified.
4. The master device according to claim 3, wherein an interrupt is notified each time the A transfer unit detects that the transfer has been completed.
【請求項6】 一つのデータを複数のデータに分割し
て、前記複数のDMA転送手段にそれぞれ割り当てるD
MA分割手段をさらに備える、請求項1〜5のいずれか
に記載のマスタデバイス。
6. A method in which one data is divided into a plurality of data and assigned to each of the plurality of DMA transfer means.
The master device according to claim 1, further comprising an MA dividing unit.
【請求項7】 前記外部バスは、PCIローカルバスで
あることを特徴とする、請求項1〜6のいずれかに記載
のマスタデバイス。
7. The master device according to claim 1, wherein said external bus is a PCI local bus.
JP20355496A 1996-08-01 1996-08-01 Master device Pending JPH1049479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20355496A JPH1049479A (en) 1996-08-01 1996-08-01 Master device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20355496A JPH1049479A (en) 1996-08-01 1996-08-01 Master device

Publications (1)

Publication Number Publication Date
JPH1049479A true JPH1049479A (en) 1998-02-20

Family

ID=16476067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20355496A Pending JPH1049479A (en) 1996-08-01 1996-08-01 Master device

Country Status (1)

Country Link
JP (1) JPH1049479A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100868766B1 (en) 2007-01-31 2008-11-17 삼성전자주식회사 Method and apparatus for determining priority in direct memory access apparatus having multiple direct memory access requesting blocks
US7640374B2 (en) 2005-01-14 2009-12-29 Fujitsu Limited Data transfer apparatus by direct memory access controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7640374B2 (en) 2005-01-14 2009-12-29 Fujitsu Limited Data transfer apparatus by direct memory access controller
KR100868766B1 (en) 2007-01-31 2008-11-17 삼성전자주식회사 Method and apparatus for determining priority in direct memory access apparatus having multiple direct memory access requesting blocks

Similar Documents

Publication Publication Date Title
JPS6138507B2 (en)
JPH0560623B2 (en)
US7822952B2 (en) Context switching device
JP2008009817A (en) Semiconductor device and data transfer method
JP3525518B2 (en) Data transfer device
US5717949A (en) System for reading transfer control parameters based on identification codes stored in first and second registers storing destination identification and designated control section identification data
US20080147906A1 (en) DMA Transferring System, DMA Controller, and DMA Transferring Method
JPH1049479A (en) Master device
JP2000227897A (en) Device and system for dma transfer
JP2624989B2 (en) Data transfer control device
KR100615694B1 (en) Control system for controlling plural function block
JP2004118300A (en) Dma controller
JP2840536B2 (en) Bus connection control device
JPS61125670A (en) Data transfer device
JP2004164202A (en) Data sending/receiving system, method of controlling ring buffer, and control program
JPH08194602A (en) Buffer length varying type access controller
JP3678537B2 (en) Data transfer method and apparatus
JPS6059464A (en) Bus request control system
JPH0773136A (en) Operation method for computer system
JPS62219153A (en) Dma controller
JPH05120215A (en) Input/output controller
JPH0628301A (en) Direct memory access circuit
JP2000305878A (en) Function extension system and data transfer method used for the same
JPS588336A (en) Data transferring method
JPH06314249A (en) Data transfer equipment