JPH08137785A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPH08137785A
JPH08137785A JP27629994A JP27629994A JPH08137785A JP H08137785 A JPH08137785 A JP H08137785A JP 27629994 A JP27629994 A JP 27629994A JP 27629994 A JP27629994 A JP 27629994A JP H08137785 A JPH08137785 A JP H08137785A
Authority
JP
Japan
Prior art keywords
transfer
dma
bus
read
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP27629994A
Other languages
Japanese (ja)
Inventor
Hideo Honma
英雄 本間
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP27629994A priority Critical patent/JPH08137785A/en
Publication of JPH08137785A publication Critical patent/JPH08137785A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To enable high-speed transferring without completely stopping CPU, corresponding to a wide-range transfer request of a DMA device. CONSTITUTION: A DMA controller 102 obtains the usage right of busses 105, 106 and 107 at the time of a DMA request and starts transferring. In this case, a transfer interval timer 211 is started, transfer is interrupted when the prescribed time elapses and returns control to CPU. During transfer, transferred data quantity is counted by a temporary counter 210. Transfer speed is calculated by data quantity and passage time, time according to the transfer speed is set in the timer 211 again and succeeding transfer is executed. Thus, since control is returned to CPU at every prescribed time, a system where a processing by CPU is not completely stopped without slowing down DMA speed more than necessity is constituted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えばマイクロコンピ
ュータシステム等におけるDMA転送を制御するDMA
制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA for controlling a DMA transfer in, for example, a microcomputer system.
Regarding the control device.

【0002】[0002]

【従来の技術】DMAによるデータ転送の手順の一例を
以下に示す。 1.CPUからDMA要求デバイスへのDMA実行コマ
ンドの発行。 2.DMA要求デバイスからバスマスターへのバス使用
権の要求。 3.バスアービトレーションによるDMA要求デバイス
のバス使用権の確保。 4.DMAシークエンスによるデータ転送。 5.データ転送完了。 6.バス使用権の放棄。 7.バスマスタのバス使用権の確保。
2. Description of the Related Art An example of a data transfer procedure by DMA is shown below. 1. Issuing a DMA execution command from the CPU to the DMA request device. 2. Request of bus right from the DMA request device to the bus master. 3. Securing the bus use right of the DMA request device by bus arbitration. 4. Data transfer by DMA sequence. 5. Data transfer completed. 6. Abandonment of bus usage rights. 7. Ensuring the bus master's right to use the bus.

【0003】ここでバスマスタとは一般的にCPUであ
るが、複数のバスマスタとなりうるデバイスを持つバス
では、DMA要求デバイスの次にバスマスタとなるデバ
イスはそれらの優先順位により決定される。DMAによ
るデータ転送モードとしてはバーストモードとサイクル
スチールモードがある。
The bus master is generally a CPU, but in a bus having a plurality of devices that can be bus masters, the device that will be the bus master next to the DMA request device is determined by their priority. The DMA data transfer mode includes a burst mode and a cycle steal mode.

【0004】バーストモードではDMA実行コマンド発
行時に設定されたデータ量の転送が完了するまでDMA
要求デバイスがバスを確保し続ける。このモードでは高
速にデータ転送可能であるが、転送期間中はDMA要求
デバイス以外のバスを使用するデバイスは機能できな
い。
In the burst mode, the DMA is executed until the transfer of the data amount set at the time of issuing the DMA execution command is completed.
The requesting device continues to reserve the bus. In this mode, high-speed data transfer is possible, but devices using the bus other than the DMA request device cannot function during the transfer period.

【0005】サイクルスチールモードではDMA要求デ
バイス以外のバスマスタがバスを使用しない期間のみD
MA転送を行う。基本的に1ワード転送実行毎にバス専
有権を放棄する。このモードではデータ転送期間中であ
ってもDMA要求デバイス以外のバスマスタは機能でき
るが、転送レートはかなり低下する。
In the cycle steal mode, D is set only when the bus master other than the DMA request device does not use the bus.
Perform MA transfer. Basically, the bus exclusive right is released every time one word is transferred. In this mode, the bus masters other than the DMA request device can function even during the data transfer period, but the transfer rate is considerably reduced.

【0006】[0006]

【発明が解決しようとする課題】バースト転送モードで
は転送は高速で実行可能であるが、その期間中他のバス
マスタは機能できない。例えば他のバスマスタがCPU
であり、バスがそのCPUに直結したアドレスバスやデ
ータバス等である場合、そのCPUは停止する。もしD
MA要求デバイス転送レートが外部I/F等で支配され
るものであれば、その外部I/Fが低速である場合CP
Uが長時間停止してシステム機能に重大な問題が生じる
可能性がある。
In the burst transfer mode, the transfer can be executed at high speed, but other bus masters cannot function during that period. For example, another bus master is the CPU
If the bus is an address bus or data bus directly connected to the CPU, the CPU stops. If D
If the MA requested device transfer rate is governed by an external I / F, etc., if the external I / F is slow CP
U may stall for an extended period of time causing serious problems with system functionality.

【0007】サイクルスチールモードでは上記ケースに
おいてもCPUは機能するが、外部I/Fが高速であっ
てもそのI/Fのハードウエアを十分に使用することが
できず、データ転送レートが低下してシステム効率を低
下させる。
In the cycle steal mode, the CPU functions in the above case as well, but even if the external I / F is high speed, the hardware of the I / F cannot be fully used and the data transfer rate is lowered. Reduce system efficiency.

【0008】本発明は上記従来例に鑑みてなされたもの
で、DMAデバイスの広範囲な転送要求に対応し、かつ
CPUを完全に停止させることなく高速転送が可能なD
MA制御を行うことができる。
The present invention has been made in view of the above-mentioned conventional example, and can cope with a wide range of transfer requests of the DMA device and can perform high-speed transfer without completely stopping the CPU.
MA control can be performed.

【0009】[0009]

【課題を解決するための手段】及び[Means for Solving the Problems] and

【作用】上記目的を達成するために本発明のDMA制御
装置は次のような構成からなる。すなわち、DMA転送
は基本的にバースト転送で行うが、所定の転送量あるい
は転送時間毎にバス専有権を放棄する。データ転送が低
速である場合は連続DMA転送量を少なくしてCPUの
バス使用権を上げる。高速である場合には連続DMA転
送料を多くしてデータ転送によるシステムパフォーマン
スの低下をおさえる。このように任意のバス専有率でD
MA転送を実行することによりDMA要求デバイスの広
範囲な転送速度に対応し、かつCPUを完全に停止させ
ることなく高速化に対応する。
In order to achieve the above object, the DMA controller of the present invention has the following structure. That is, although the DMA transfer is basically performed by the burst transfer, the bus exclusive right is abandoned every predetermined transfer amount or transfer time. If the data transfer is slow, the amount of continuous DMA transfer is reduced to increase the CPU bus right. If the transfer speed is high, the continuous DMA transfer charge is increased to prevent the system performance from being deteriorated due to the data transfer. In this way, D can be used at any bus occupation rate.
By executing the MA transfer, it is possible to cope with a wide range of transfer speeds of the DMA request device, and to cope with the speedup without completely stopping the CPU.

【0010】また、バスマスタの管理するバスを介して
転送元から転送先へのDMA転送を制御するDMA制御
装置であって、バスの使用権をバスマスタから獲得する
獲得手段と、該獲得手段により獲得したバスを介して連
続的にDMA転送を行う期間を所定期間に制限し、該期
間が経過するとバスの使用権を放棄する制限手段と、前
記獲得手段及び前記制限手段により、転送すべきデータ
が終了するまでDMA転送を行うべく制御する制御手段
とを備える。
A DMA control device for controlling a DMA transfer from a transfer source to a transfer destination via a bus managed by a bus master, and acquiring means for acquiring the right to use the bus from the bus master and the acquiring means. The period in which the DMA transfer is continuously performed via the specified bus is limited to a predetermined period, and when the period elapses, the limiting means for abandoning the right to use the bus, and the acquiring means and the limiting means determine the data to be transferred. Control means for controlling the DMA transfer until it is completed.

【0011】さらに、バスマスタの管理するバスを用い
てDMA転送するDMA制御装置であって、バスマスタ
とバス使用権の調停を行いバス使用権を得るバスアービ
タと、複数ワードの連続したDMAデータ転送の実行シ
ークエンスを制御するリードライトシークエンサと、前
記バスアービタにより使用権を得たバスの制御を前記リ
ードライトシークエンサの指示に従って行うバス制御手
段と、連続したDMAデータ転送の長さを所定の条件で
制限し、該条件を越えた場合にDMA転送の停止を前記
レードライトシークエンサ指示し、それと共にバス使用
権の放棄を前記バスアービタに指示する転送制限手段と
を備える。
Further, a DMA controller for performing a DMA transfer using a bus managed by the bus master, a bus arbiter for arbitrating the bus use right with the bus master to obtain the bus use right, and a continuous DMA data transfer of a plurality of words A read / write sequencer for controlling the sequence, a bus control means for controlling the bus obtained the right of use by the bus arbiter in accordance with the instructions of the read / write sequencer, and limiting the length of continuous DMA data transfer under a predetermined condition, When the condition is exceeded, a transfer limiting means is provided for instructing the RAID write sequencer to stop the DMA transfer, and at the same time instructing the bus arbiter to abandon the bus use right.

【0012】[0012]

【実施例】【Example】

[実施例1]DMAコントローラを含むCPU周辺回路
の構成例を図1に示す。CPU101から周辺回路への
アクセスはアドレスバス105、データバス106、制
御信号107で行う。通常はCPU101がバスマスタ
となり、これらのバス制御を行う。DMAコントローラ
102は、DMA転送元デバイス103からのDMA要
求信号108が発生すると、即ちDMA要求があるとバ
スアービトレーション信号109でCPU101を停止
させ、バスマスタとなってバスの制御を行う。この状態
でDMA転送元デバイス103とDMA転送先デバイス
104との間でデータ転送を行う。ここで言うDMA転
送元デバイスとはDMA要求を出すデバイスであり、D
MA転送先デバイスとはメモリやレジスタ等であって、
DMA転送元デバイスとのデータ転送対象となるデバイ
スである。DMA転送元デバイスは外部I/F112と
データ転送を行い、I/F規格あるいはこのI/Fに接
続する他のデバイスやホスト(図示せず)の転送能力に
応じた転送速度でデータ転送を制御する。
[Embodiment 1] FIG. 1 shows a configuration example of a CPU peripheral circuit including a DMA controller. The access from the CPU 101 to the peripheral circuits is performed by the address bus 105, the data bus 106, and the control signal 107. Normally, the CPU 101 serves as a bus master and controls these buses. When the DMA request signal 108 from the DMA transfer source device 103 is generated, that is, when there is a DMA request, the DMA controller 102 stops the CPU 101 with the bus arbitration signal 109 and becomes a bus master to control the bus. In this state, data transfer is performed between the DMA transfer source device 103 and the DMA transfer destination device 104. The DMA transfer source device mentioned here is a device that issues a DMA request, and
The MA transfer destination device is a memory or a register,
This is a device that is the target of data transfer with the DMA transfer source device. The DMA transfer source device performs data transfer with the external I / F 112, and controls the data transfer at a transfer speed according to the transfer capability of the I / F standard or another device or host (not shown) connected to this I / F. To do.

【0013】DMA転送はDMA転送元、転送先間の転
送をリード/ライト別のバスサイクルで行う2アクセス
/転送サイクルモードでもよいし、リード期間中もう一
方に同時に書き込む1アクセス/転送サイクルモードで
もよい。ただし、前者はバスサイクルとしては、データ
をDMAコントローラ内部のテンポラリレジスタに一時
格納し、後者の場合はDMA専用のリード/ライト制御
信号線(図示せず)が必要となる。
The DMA transfer may be performed in a 2-access / transfer cycle mode in which transfer between a DMA transfer source and a transfer destination is performed in read / write-specific bus cycles, or in a 1-access / transfer cycle mode in which the other is simultaneously written during the read period. Good. However, in the former case, data is temporarily stored in a temporary register inside the DMA controller as a bus cycle, and in the latter case, a read / write control signal line (not shown) dedicated to DMA is required.

【0014】DMA転送が完了すると、DMA転送元デ
バイス103はDMA要求信号108を消滅させてDM
A要求を取り下げる。DMAコントローラ102はこれ
に対応してバスの制御権をCPU101に戻す。またD
MA転送完了に対応して割り込み信号110あるいは1
11を発生し、その完了をCPU101に通知する。
When the DMA transfer is completed, the DMA transfer source device 103 extinguishes the DMA request signal 108 and DMs.
A withdraw the request. In response to this, the DMA controller 102 returns the bus control right to the CPU 101. Also D
Interrupt signal 110 or 1 in response to MA transfer completion
11 is generated and the completion is notified to the CPU 101.

【0015】DMAコントローラ102の構成例を図2
に示す。CPU101がバスマスタである通常の動作状
態では、制御信号制御回路201及びアドレスバス制御
回路203は入力回路として機能し、リードライト制御
回路206を介してDMAコントローラ102内部のレ
ジスタをアクセスするように動作する。
A configuration example of the DMA controller 102 is shown in FIG.
Shown in In a normal operation state in which the CPU 101 is a bus master, the control signal control circuit 201 and the address bus control circuit 203 function as input circuits and operate to access the registers inside the DMA controller 102 via the read / write control circuit 206. .

【0016】バスアービタ208は、DMA要求信号1
08が発生するとCPU101とアービトレーションを
行い、CPUを停止させてバスマスタとなった後リード
ライトシークエンス回路204を起動させる。リードラ
イトシークエンス回路204は制御信号制御回路201
を介して制御信号107を制御し、DMA転送元デバイ
ス103、DMA転送先デバイス104のリードライト
制御を行い、DMA転送を実行する。これらのデバイス
にアクセスするアドレスはアドレス発生回路207が発
生する。また2アクセス/転送サイクルの動作モードで
はテンポラリレジスタ205にリードサイクルで読み込
んだデータを一時格納し、ライトサイクルでデバイスに
書き出す。
The bus arbiter 208 receives the DMA request signal 1
When 08 occurs, arbitration is performed with the CPU 101, the CPU is stopped, and the read / write sequence circuit 204 is activated after becoming a bus master. The read / write sequence circuit 204 is a control signal control circuit 201.
The control signal 107 is controlled via the control signal to control the read / write of the DMA transfer source device 103 and the DMA transfer destination device 104, and the DMA transfer is executed. An address generation circuit 207 generates addresses for accessing these devices. In the operation mode of 2 access / transfer cycles, the data read in the read cycle is temporarily stored in the temporary register 205 and written to the device in the write cycle.

【0017】転送カウンタ209は転送バイト数をカウ
ントし、あらかじめ設定された値の転送が完了するとリ
ードライトシークエンス回路204を停止させ、バスア
ービタ208にバス制御権をCPU101に戻させると
ともに、割り込み制御回路212を介してCPU101
に対して転送終了処理を要求する割り込み信号110を
発生させる。またもしDMA転送元デバイスに転送バイ
ト数カウント機能があるならば、この割り込み要求はD
MA転送元デバイスから割り込み信号111を介して行
い、DMAコントローラは割り込み要求を出さなくても
良い。
The transfer counter 209 counts the number of transfer bytes. When the transfer of a preset value is completed, the read / write sequence circuit 204 is stopped, the bus arbiter 208 returns the bus control right to the CPU 101, and the interrupt control circuit 212. Via CPU 101
Generates an interrupt signal 110 for requesting a transfer end process. If the DMA transfer source device has a transfer byte count function, this interrupt request is D
The DMA controller does not have to issue an interrupt request, since the MA transfer source device performs the interrupt signal 111.

【0018】テンポラリカウンタ210は転送カウンタ
209と同様に転送バイト数をカウントするが、これは
次に述べる転送間隔タイマ211によるバス制御権の一
時放棄後、DMA転送が再スタートするときリセットさ
れる。すなわちCPU101はテンポラリカウンタ21
0の値と転送間隔タイマ211の設定値からDMA転送
速度を算出することができる。
Like the transfer counter 209, the temporary counter 210 counts the number of transfer bytes, which is reset when the DMA transfer is restarted after the transfer interval timer 211 gives up the bus control right temporarily. That is, the CPU 101 uses the temporary counter 21
The DMA transfer rate can be calculated from the value of 0 and the set value of the transfer interval timer 211.

【0019】転送間隔タイマ211はCPU101が指
定した連続最大DMA転送時間を保持し、リードライト
シークエンス回路204が起動してからこの設定時間を
経過するとリードライトシークエンスを停止させ、バス
アービタ回路208を介してバス制御権をCPU101
に戻す。これによりCPU101は動作状態となるが、
DMA転送要求信号108がアサートされていればバス
アービタ208はCPU101がバスマスタとなった直
後再びバスアービトレーションを行いバス制御権を得
る。
The transfer interval timer 211 holds the maximum continuous DMA transfer time designated by the CPU 101, stops the read / write sequence when this set time elapses after the read / write sequence circuit 204 is activated, and via the bus arbiter circuit 208. Bus control right to CPU 101
Return to. This puts the CPU 101 into an operating state,
If the DMA transfer request signal 108 is asserted, the bus arbiter 208 performs the bus arbitration again immediately after the CPU 101 becomes the bus master, and obtains the bus control right.

【0020】これらの動作を図3のタイミング図に示
す。波形301はバスアービトレーション信号109の
中のバスリクエスト信号、波形302はバスマスタ、波
形303はDMA転送状態である。DMA要求信号10
8が発生するとそれに対応してバスリクエスト信号30
1がアサートされる(タイミングt1)。これによりD
MAコントローラ102は波形302に示すようにバス
マスタとなり、波形303に示す様にDMA転送を行う
(タイミングt2)。上述したように転送間隔タイマ2
11は、リードライトシークエンス回路204が起動し
てからCPU101が設定した連続最大DMA転送時間
p1経過すると、リードライトシークエンスを停止さ
せ、バスアービタ回路208を介してバス制御権をCP
U101に戻す。これがタイミングt3である。バスア
ービタ回路208はCPU101がバスマスタとなった
直後再びバスリクエスト301をアサートさせ再びバス
制御権を得る(タイミングt4)。ここで転送間隔タイ
マ211に設定した連続最大DMA転送時間p1を短く
すれば1バイトあるいは1ワード転送毎にCPUアクセ
スサイクルが入るサイクルスチールモードに、長く取れ
ば動作は完全なバースト転送に近づいていく。もし転送
間隔タイマ211に設定した時間の経過以前に転送カウ
ンタに設定した転送を完了したり、DMAリクエスト信
号108がネゲートされた場合(タイミングt5)、そ
の時点でバスリクエスト301をネゲートし、バス制御
をCPU101に戻すとともにDMAシークエンスを停
止させる。また、この時点で必要ならばCPU101に
DMA停止処理を行わせるため割り込み信号110をア
サートする。
These operations are shown in the timing diagram of FIG. A waveform 301 is a bus request signal in the bus arbitration signal 109, a waveform 302 is a bus master, and a waveform 303 is a DMA transfer state. DMA request signal 10
When 8 occurs, the bus request signal 30 is correspondingly generated.
1 is asserted (timing t1). This makes D
The MA controller 102 becomes a bus master as shown by the waveform 302, and performs DMA transfer as shown by the waveform 303 (timing t2). As described above, transfer interval timer 2
When the continuous maximum DMA transfer time p1 set by the CPU 101 elapses after the read / write sequence circuit 204 is activated, the read / write sequence 11 stops the read / write sequence and controls the bus control right via the bus arbiter circuit 208.
Return to U101. This is the timing t3. Immediately after the CPU 101 becomes the bus master, the bus arbiter circuit 208 asserts the bus request 301 again to obtain the bus control right again (timing t4). Here, if the continuous maximum DMA transfer time p1 set in the transfer interval timer 211 is shortened, the operation approaches a complete burst transfer if the continuous maximum DMA transfer time p1 is shortened to a cycle steal mode in which a CPU access cycle enters every byte or word transfer. . If the transfer set in the transfer counter is completed before the time set in the transfer interval timer 211 is completed or the DMA request signal 108 is negated (timing t5), the bus request 301 is negated at that time and the bus control is performed. Is returned to the CPU 101 and the DMA sequence is stopped. At this point, if necessary, the interrupt signal 110 is asserted to cause the CPU 101 to perform the DMA stop process.

【0021】CPU101は、テンポラリカウンタ21
0の値を読み込むことにより設定した転送間隔の間に転
送したバイト数を、上述したようにDMA転送期間中に
知ることができ、ここから転送速度を見積もることがで
きる。この転送速度から転送効率をさらに上げるべきで
あると判断した場合、転送間隔を長くしてバースト転送
に近い状態で動作させ、逆の場合は転送間隔を短くして
サイクルスチール転送に近い状態で動作させる。この処
理手順を図7に示す。
The CPU 101 has a temporary counter 21.
By reading a value of 0, the number of bytes transferred during the set transfer interval can be known during the DMA transfer period as described above, and the transfer rate can be estimated from this. If it is judged from this transfer rate that the transfer efficiency should be further increased, the transfer interval is lengthened to operate in a state close to burst transfer, and in the opposite case, the transfer interval is shortened to operate in a state close to cycle steal transfer. Let This processing procedure is shown in FIG.

【0022】DMAからCPUに制御が移り、しかもD
MA転送がまだ終了していない場合には、まず転送間隔
タイマ211から転送間隔を読み取り(ステップS70
1)、テンポラリカウンタ210から転送データ量を読
み取る(ステップS702)。これらの値から転送速度
を算出し(ステップS703)、設定されている転送間
隔が適正か判定する(ステップS704)。適正な場合
にはそのままであるが、不適な場合には適正な値を転送
間隔タイマ211に再設定する(ステップS705)。
ステップS705における判定のためには、転送速度
と、転送間隔とを対照した表などをメモリに予め記憶し
ておけば良い。最後に、次の転送シーケンスのために、
テンポラリカウンタ210を0にしリセットする(S7
06)。
Control is transferred from the DMA to the CPU, and D
If the MA transfer is not yet completed, the transfer interval is first read from the transfer interval timer 211 (step S70).
1) The transfer data amount is read from the temporary counter 210 (step S702). The transfer rate is calculated from these values (step S703), and it is determined whether the set transfer interval is appropriate (step S704). If it is appropriate, the value remains as it is, but if it is not appropriate, an appropriate value is reset in the transfer interval timer 211 (step S705).
For the determination in step S705, a table or the like that compares transfer rates and transfer intervals may be stored in advance in the memory. Finally, for the next transfer sequence,
The temporary counter 210 is reset to 0 (S7).
06).

【0023】以上述べた様に、転送間隔タイマ211に
設定する連続最大DMA転送時間を変化させることによ
り、外部I/Fの転送速度が大きくDMA転送速度が大
きい場合はDMAによる連続的なバス専有時間を長くし
て転送効率を上げ、小さければ逆に連続的なバス専有時
間を短くしてCPUの動作効率を上げることが可能とな
る。すなわち任意のDMAのバス専有率でデータ転送を
行うことが可能となる。
As described above, by changing the continuous maximum DMA transfer time set in the transfer interval timer 211, when the external I / F transfer rate is high and the DMA transfer rate is high, continuous bus monopolization by DMA is performed. It is possible to increase the transfer efficiency by increasing the time, and conversely, if it is small, shorten the continuous bus occupation time to increase the operation efficiency of the CPU. That is, data can be transferred at an arbitrary DMA bus occupation rate.

【0024】[実施例2]第2の実施例のDMAコント
ローラを図4に示す。装置全体の構成は図1に示した通
りのものである。第1の実施例では転送間隔タイマ21
1で最大連続DMA転送時間を制御したが、本実施例で
は転送間隔タイマ211及びテンポラリカウンタ210
の代わりに転送間隔カウンタ401を設け、最大連続D
MA転送バイト数でDMAのバス専有時間を制御するも
のである。転送間隔カウンタ401はCPU101が指
定した最大連続DMA転送バイト数を保持し、DMA要
求信号108がアサートされていても連続転送バイト数
がこの設定値となったときバスアービタ208を介して
バス制御権をCPU101に戻す。CPU101はシス
テムクロック(図示せず)から設定バイト数の転送にか
かった時間を算出することができ、この結果に応じて最
大連続DMA転送バイト数の設定を制御する。この制御
は図7と同じ要領で行えば良い。ただし、テンポラリカ
ウンタ210を用いないためステップS706は不要で
あるし、転送間隔が時間でなくデータ量により設定され
ている点が異なっている。転送に要した時間の設定値を
大きくすればバースト転送に近くなり、小さくすればサ
イクルスチール転送に近くなる。すなわち第1の実施例
を同様に任意のDMAのバス専有率でデータ転送を行う
ことが可能となる。
[Second Embodiment] FIG. 4 shows a DMA controller according to the second embodiment. The configuration of the entire device is as shown in FIG. In the first embodiment, the transfer interval timer 21
Although the maximum continuous DMA transfer time is controlled by 1, the transfer interval timer 211 and the temporary counter 210 are used in this embodiment.
The transfer interval counter 401 is provided instead of
The bus occupation time of DMA is controlled by the number of MA transfer bytes. The transfer interval counter 401 holds the maximum number of continuous DMA transfer bytes designated by the CPU 101, and when the number of continuous transfer bytes reaches this set value even when the DMA request signal 108 is asserted, the bus control right is given through the bus arbiter 208. Return to CPU 101. The CPU 101 can calculate the time required to transfer the set number of bytes from a system clock (not shown), and controls the setting of the maximum number of continuous DMA transfer bytes according to this result. This control may be performed in the same manner as in FIG. However, since the temporary counter 210 is not used, step S706 is unnecessary, and the point that the transfer interval is set not by time but by the amount of data is different. If the set value of the time required for transfer is increased, it will be closer to burst transfer, and if it is set smaller, it will be closer to cycle steal transfer. That is, similarly to the first embodiment, data transfer can be performed at an arbitrary DMA bus occupation rate.

【0025】[実施例3]第3の実施例のDMAコント
ローラを図5に示す。この構成例では、連続的にDMA
転送できる最大値である最大連続DMA転送バイト数を
カウント制御回路501が制御するが、これは転送カウ
ントテーブル502の設定に従って行われる。CPU1
01は転送速度に応じたバス専有率と転送速度との関係
を転送カウントテーブル502にDMA転送に先行して
ダウンロードしておく。カウント制御回路501は第2
の実施例と同様に連続DMA転送バイト数がある転送バ
イト数に達した時点で転送シークエンスを中断し、バス
制御権をCPUに戻す。その際、DMA転送開始時にタ
イマ503を起動し、中断時にタイマを停止する。こう
して転送時間をタイマ503による時間経過から求め、
転送に要した時間から転送速度を算出する。転送カウン
トテーブル502は転送速度をインデクスとする最大連
続DMA転送バイト数を格納しており、カウント制御回
路501はこの変換結果を次のDMA転送の最大連続D
MA転送バイト数として動作を行う。以上の動作により
DMAコントローラ102はあらかじめCPUが転送カ
ウントテーブルに設定した特性に従って自動的にバス専
有率を制御して動作する。
[Third Embodiment] FIG. 5 shows a DMA controller according to a third embodiment. In this configuration example, DMA is continuously
The count control circuit 501 controls the maximum number of continuous DMA transfer bytes, which is the maximum value that can be transferred. This is performed according to the setting of the transfer count table 502. CPU1
In 01, the relationship between the bus occupation rate and the transfer rate according to the transfer rate is downloaded to the transfer count table 502 prior to the DMA transfer. The count control circuit 501 is the second
In the same manner as in the first embodiment, when the number of continuous DMA transfer bytes reaches a certain number of transfer bytes, the transfer sequence is interrupted and the bus control right is returned to the CPU. At that time, the timer 503 is started at the start of the DMA transfer and stopped at the time of interruption. In this way, the transfer time is calculated from the elapsed time by the timer 503,
The transfer speed is calculated from the time required for the transfer. The transfer count table 502 stores the maximum number of continuous DMA transfer bytes with the transfer rate as an index, and the count control circuit 501 stores the conversion result as the maximum continuous D of the next DMA transfer.
It operates as the number of MA transfer bytes. With the above operation, the DMA controller 102 operates by automatically controlling the bus occupancy rate according to the characteristics set in advance by the CPU in the transfer count table.

【0026】[実施例4]第4の実施例のDMAコント
ローラを図6に示す。この構成例ではカウント制御回路
601は最大連続DMA転送バイト数をホストI/Fテ
ーブル602に登録されている値に設定して動作する。
DMA転送元デバイス103は外部I/F112の転送
速度とDMAコントローラ102の転送速度に対応して
動作するが、外部I/F112につながるホスト(図示
せず)の転送速度はホスト、I/Fのタイプに応じてお
よそ見積もることができる。この見積もられた転送速度
とそれに対応したDMAによるバス専有率に相当する最
大連続転送バイト数の対応表がホストI/Fテーブル6
02である。CPU101はDMA転送に先立ってホス
トとI/FタイプのIDコードをホストI/Fテーブル
にインデクスとして入力し、カウント制御回路601は
そのインデクスに対応した値をテーブルから読み出して
それを最大連続転送バイト数としてカウント制御回路に
設定し、DMA制御を行う。これによりCPU101は
簡単なインデックスを指定するだけで最適なDMA転送
を行うことができる。
[Fourth Embodiment] FIG. 6 shows a DMA controller according to a fourth embodiment. In this configuration example, the count control circuit 601 operates by setting the maximum number of continuous DMA transfer bytes to the value registered in the host I / F table 602.
The DMA transfer source device 103 operates according to the transfer speed of the external I / F 112 and the transfer speed of the DMA controller 102. However, the transfer speed of the host (not shown) connected to the external I / F 112 is the host and the I / F. It can be roughly estimated according to the type. The host I / F table 6 is a correspondence table of the estimated transfer speed and the maximum number of continuous transfer bytes corresponding to the bus occupation rate by the corresponding DMA.
02. Prior to the DMA transfer, the CPU 101 inputs the host and the I / F type ID code as an index into the host I / F table, and the count control circuit 601 reads the value corresponding to the index from the table and outputs it as the maximum continuous transfer byte. The number is set in the count control circuit, and DMA control is performed. As a result, the CPU 101 can perform optimum DMA transfer simply by designating a simple index.

【0027】尚、本発明は、複数の機器から構成される
システムに適用しても、1つの機器から成る装置に適用
しても良い。また、本発明はシステム或は装置にプログ
ラムを供給することによって達成される場合にも適用で
きることはいうまでもない。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0028】[0028]

【発明の効果】以上説明したように、本発明に係るDM
A制御装置は、DMAデバイスの広範囲な転送要求に対
応し、かつCPUを完全に停止させることなく高速転送
が可能なDMA制御を行うことができるという効果を奏
する。
As described above, the DM according to the present invention
The A control device has an effect that it can handle a wide range of transfer requests from the DMA device and can perform DMA control that enables high-speed transfer without completely stopping the CPU.

【0029】[0029]

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

【図1】DMAコントローラを含むシステムの構成例で
ある。
FIG. 1 is a configuration example of a system including a DMA controller.

【図2】DMAコントローラの第1の構成例を示すブロ
ック図である。
FIG. 2 is a block diagram showing a first configuration example of a DMA controller.

【図3】DMAコントローラの動作時の波形図である。FIG. 3 is a waveform diagram during operation of the DMA controller.

【図4】DMAコントローラの第2の構成例を示すブロ
ック図である。
FIG. 4 is a block diagram showing a second configuration example of a DMA controller.

【図5】DMAコントローラの第3の構成例を示すブロ
ック図である。
FIG. 5 is a block diagram showing a third configuration example of a DMA controller.

【図6】DMAコントローラの第4の構成例を示すブロ
ック図である。
FIG. 6 is a block diagram showing a fourth configuration example of a DMA controller.

【図7】DMAによるバス占有率を制御する手順を示す
フローチャートである。
FIG. 7 is a flowchart showing a procedure for controlling a bus occupancy rate by DMA.

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

101 CPU 102 DMAコントローラ 103 DMAソースデバイス 104 DMAデスティネーションデバイス 201 制御信号制御回路 202 データバス制御回路 203 アドレスバス制御回路 204 リードライトシークエンス回路 205 テンポラリーレジスタ 206 リードライト制御回路 207 アドレス発生回路 208 バスアービター 209 転送カウンタ 210 テンポラリーカウンタ 211 転送間隔タイマ 401 転送間隔カウンタ 501 カウント制御回路 502 転送カウントテーブル 503 タイマ 602 ホストI/Fテーブル 101 CPU 102 DMA controller 103 DMA source device 104 DMA destination device 201 Control signal control circuit 202 Data bus control circuit 203 Address bus control circuit 204 Read / write sequence circuit 205 Temporary register 206 Read / write control circuit 207 Address generation circuit 208 Bus arbiter 209 Transfer counter 210 Temporary counter 211 Transfer interval timer 401 Transfer interval counter 501 Count control circuit 502 Transfer count table 503 Timer 602 Host I / F table

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 バスマスタの管理するバスを介して転送
元から転送先へのDMA転送を制御するDMA制御装置
であって、 バスの使用権をバスマスタから獲得する獲得手段と、 該獲得手段により獲得したバスを介して連続的にDMA
転送を行う期間を所定期間に制限し、該期間が経過する
とバスの使用権を放棄する制限手段と、 前記獲得手段及び前記制限手段により、転送すべきデー
タが終了するまでDMA転送を行うべく制御する制御手
段と、を備えることを特徴とするDMA制御装置。
1. A DMA control device for controlling a DMA transfer from a transfer source to a transfer destination via a bus managed by a bus master, the acquiring means acquiring the bus use right from the bus master, and the acquiring means. DMA continuously through the bus
Limiting means for limiting the transfer period to a predetermined period and for relinquishing the right to use the bus when the period elapses, and controlling means for performing the DMA transfer by the acquiring means and the limiting means until the data to be transferred is completed. And a control unit for controlling the DMA control unit.
【請求項2】 前記所定期間とその期間に転送されたデ
ータ量とから転送速度を算出し、該転送速度に応じて前
記所定期間を再設定する手段を更に備えることを特徴と
する請求項1に記載のDMA制御装置。
2. The method according to claim 1, further comprising means for calculating a transfer rate from the predetermined period and the amount of data transferred during the predetermined period, and resetting the predetermined period according to the transfer rate. The DMA controller according to item 1.
【請求項3】 バスマスタの管理するバスを用いてDM
A転送するDMA制御装置であって、 バスマスタとバス使用権の調停を行いバス使用権を得る
バスアービタと、 複数ワードの連続したDMAデータ転送の実行シークエ
ンスを制御するリードライトシークエンサと、 前記バスアービタにより使用権を得たバスの制御を前記
リードライトシークエンサの指示に従って行うバス制御
手段と、 連続したDMAデータ転送の長さを所定の条件で制限
し、該条件を越えた場合にDMA転送の停止を前記リー
ドライトシークエンサ指示し、それと共にバス使用権の
放棄を前記バスアービタに指示する転送制限手段と、を
備えることを特徴とするDMA制御装置。
3. DM using a bus managed by a bus master
A DMA controller for A transfer, which is used by a bus arbiter for arbitrating a bus mastership with a bus master to obtain a bus mastership, a read / write sequencer for controlling an execution sequence of continuous DMA data transfer of a plurality of words, and the bus arbiter. Bus control means for controlling the acquired bus according to the instructions of the read / write sequencer, and limiting the length of continuous DMA data transfer under a predetermined condition, and stopping the DMA transfer when the condition is exceeded. A DMA controller, comprising: a read / write sequencer and transfer limiting means for instructing the bus arbiter to relinquish the bus use right.
【請求項4】 前記DMAデータ転送の長さを制限する
条件を外部から設定する手段を更に備えることを特徴と
する請求項3に記載のDMA制御装置。
4. The DMA controller according to claim 3, further comprising means for externally setting a condition for limiting a length of the DMA data transfer.
【請求項5】 前記転送制限手段は、前記リードライト
シークエンサによるリードライトシークエンス動作開始
からの経過時間を条件として連続したDMAデータ転送
の長さを制限する請求項4記載のDMA制御装置。
5. The DMA control device according to claim 4, wherein the transfer limiting means limits the length of continuous DMA data transfer on condition that the elapsed time from the start of the read / write sequence operation by the read / write sequencer.
【請求項6】 前記転送制限手段は、前記リードライト
シークエンサによるリードライトシークエンス動作開始
からの転送ワード数を条件として連続したDMAデータ
転送の長さを制限することを特徴とする請求項4記載の
DMA制御装置。
6. The transfer limiting means limits the length of continuous DMA data transfer on the condition of the number of transfer words from the start of the read / write sequence operation by the read / write sequencer. DMA controller.
【請求項7】 前記転送制限手段は、連続したDMAデ
ータ転送の転送速度を計測する計測手段と、該計測手段
による計測結果と経過時間とを基に、連続的にDMAデ
ータ転送されたワード数に変換する変換手段とを有し、
該変換手段により得られたワード数を前記所定条件とす
ることを特徴とする請求項3記載のDMA制御装置。
7. The transfer limiting means measures the transfer speed of continuous DMA data transfer, and the number of words continuously transferred with DMA data based on the measurement result by the measuring means and the elapsed time. And a conversion means for converting to
4. The DMA controller according to claim 3, wherein the number of words obtained by the converting means is set as the predetermined condition.
【請求項8】 前記転送制限手段は、DMA転送を行う
デバイスを識別するIDコードを設定する設定手段と、
設定されたIDコードに基づいて連続的にDMAデータ
転送されるワード数に変換する変換手段とを有し、変換
により得られたワード数を前記所定条件とする請求項3
記載のDMA制御装置。
8. The transfer limiting means comprises a setting means for setting an ID code for identifying a device performing a DMA transfer,
4. A conversion means for converting the number of words to be continuously DMA-transferred based on the set ID code, and the number of words obtained by the conversion is the predetermined condition.
The DMA controller described.
【請求項9】 前記転送制御手段は、外部のホストマシ
ンと接続されたI/Fを有するDMA要求デバイスとの
DMAデータ転送制御を行い、この外部ホストマシンを
識別するIDコード設定手段を更に有することを特徴と
する請求項8記載のDMA制御装置。
9. The transfer control means further includes an ID code setting means for performing DMA data transfer control with a DMA request device having an I / F connected to an external host machine and for identifying the external host machine. 9. The DMA control device according to claim 8, wherein:
JP27629994A 1994-11-10 1994-11-10 Dma controller Withdrawn JPH08137785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27629994A JPH08137785A (en) 1994-11-10 1994-11-10 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27629994A JPH08137785A (en) 1994-11-10 1994-11-10 Dma controller

Publications (1)

Publication Number Publication Date
JPH08137785A true JPH08137785A (en) 1996-05-31

Family

ID=17567521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27629994A Withdrawn JPH08137785A (en) 1994-11-10 1994-11-10 Dma controller

Country Status (1)

Country Link
JP (1) JPH08137785A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008204242A (en) * 2007-02-21 2008-09-04 Ricoh Co Ltd Sub-control device and information processor
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
JP2011008413A (en) * 2009-06-24 2011-01-13 Fujitsu Semiconductor Ltd Processor

Cited By (3)

* 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
JP2008204242A (en) * 2007-02-21 2008-09-04 Ricoh Co Ltd Sub-control device and information processor
JP2011008413A (en) * 2009-06-24 2011-01-13 Fujitsu Semiconductor Ltd Processor

Similar Documents

Publication Publication Date Title
US4602327A (en) Bus master capable of relinquishing bus on request and retrying bus cycle
JP3526920B2 (en) Computer system and system and method for controlling peripheral bus clock signals
US4901234A (en) Computer system having programmable DMA control
JP3633998B2 (en) Computer system
CA2121720A1 (en) Reservation overriding normal prioritization of microprocessors in multiprocessing computer systems
JPH0623970B2 (en) Multi-bus micro computer system
JPS5837585B2 (en) Keisan Kisouchi
US5796968A (en) Bus arbiter used in a computer system
US5138709A (en) Spurious interrupt monitor
TW200400438A (en) Bus arbiter for integrated circuit systems
US6442632B1 (en) System resource arbitration mechanism for a host bridge
JPH08137785A (en) Dma controller
JPH01131943A (en) Bus error processing system
JPH0696014A (en) Bus using priority order controller
JP2002024156A (en) Dma controller and transfer method therefor
JP2005165508A (en) Direct memory access controller
JPS62154045A (en) Bus arbitration system
JPH10320349A (en) Processor and data transfer system using the processor
JPH1091568A (en) Method and device for accessing chip selection enable device in data processing system
JP2000293480A (en) Dma transferring device
JP3124544B2 (en) Bus controller
JP2846999B2 (en) Microprocessor
JP3211264B2 (en) External bus control method
JPH0724044B2 (en) Computer system with DMA access
JP3199138B2 (en) Microprocessor

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020115