[go: up one dir, main page]

JP2000298638A - DMA transfer device - Google Patents

DMA transfer device

Info

Publication number
JP2000298638A
JP2000298638A JP11106903A JP10690399A JP2000298638A JP 2000298638 A JP2000298638 A JP 2000298638A JP 11106903 A JP11106903 A JP 11106903A JP 10690399 A JP10690399 A JP 10690399A JP 2000298638 A JP2000298638 A JP 2000298638A
Authority
JP
Japan
Prior art keywords
signal
mask
dreq
dma
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.)
Granted
Application number
JP11106903A
Other languages
Japanese (ja)
Other versions
JP4549458B2 (en
JP2000298638A5 (en
Inventor
Eiji Azuma
栄次 我妻
Hiroshi Ueno
博 上野
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data 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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP10690399A priority Critical patent/JP4549458B2/en
Publication of JP2000298638A publication Critical patent/JP2000298638A/en
Publication of JP2000298638A5 publication Critical patent/JP2000298638A5/ja
Application granted granted Critical
Publication of JP4549458B2 publication Critical patent/JP4549458B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

(57)【要約】 【課題】 外部リクエストデバイスが複数存在する場
合、または、DREQ信号の発生周期が短い外部リクエ
ストデバイスが同一のバスに存在する場合、DMAによ
るバス占有率を低減し、時間的にバスを有効に利用する
ことができるDMA転送装置を提供する。 【解決手段】 DMA転送装置は、CPU100、DM
AC110、外部リクエストデバイス111、外部リク
エストデバイス112及び外部メモリ113から構成さ
れ、外部リクエストデバイス111,112は、DRE
Q信号をマスクするDREQ信号マスク回路121,1
22を備え、DREQ信号マスク回路121,122が
DREQ0/DREQ1信号をマスクしてDMA転送に
よるバス占有状態を制御するように構成する。
(57) [Problem] To reduce the bus occupancy by DMA and reduce the time in the case where there are a plurality of external request devices or when there are external request devices with a short DREQ signal generation cycle on the same bus. And a DMA transfer device capable of effectively using a bus. SOLUTION: The DMA transfer device includes a CPU 100, a DM
An AC 110, an external request device 111, an external request device 112, and an external memory 113 are provided.
DREQ signal mask circuit 121,1 for masking Q signal
The DREQ signal mask circuits 121 and 122 mask the DREQ0 / DREQ1 signals to control the bus occupation state by the DMA transfer.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、DMA(Direct M
emory Access)転送装置に係り、詳細には、CPUの動
作と独立に、メモリと外部リクエストデバイス間で直接
データを転送するDMA転送制御を行うDMA制御部を
備えたDMA転送装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA (Direct M
More specifically, the present invention relates to a DMA transfer device having a DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device independently of the operation of a CPU.

【0002】[0002]

【従来の技術】DMA転送は、CPUを介さずに直接メ
インメモリとI/O装置(例えば、外部リクエストデバ
イス)などの周辺機器間でデータ転送を行うものであ
る。これにより高速・大容量のデータ転送がCPUのオ
ーバヘッドを伴わずに可能となる。DMA転送は、一般
にDMAC(Direct Memory Access Controler)がバス
を管理して転送を制御する。
2. Description of the Related Art In a DMA transfer, data is transferred directly between a main memory and a peripheral device such as an I / O device (for example, an external request device) without using a CPU. This enables high-speed and large-capacity data transfer without the overhead of the CPU. In DMA transfer, a DMAC (Direct Memory Access Controller) generally manages the bus to control the transfer.

【0003】従来、DMACと外部リクエストデバイス
との間でDMA転送を行うシステムにおいて、DMAC
は、外部リクエストデバイスから出力されるDMAリク
エスト(DREQ)信号を受けてメモリデバイスと外部
リクエストデバイス間でデータ転送ができるよう他のデ
バイスを制御する。
Conventionally, in a system for performing a DMA transfer between a DMAC and an external request device, a DMAC
Receives a DMA request (DREQ) signal output from an external request device and controls another device so that data can be transferred between the memory device and the external request device.

【0004】図32は従来のDMA転送装置の構成を示
すブロック図であり、DMACと外部リクエストデバイ
ス間のデータ転送を例としたものである。
FIG. 32 is a block diagram showing the configuration of a conventional DMA transfer device, which exemplifies data transfer between a DMAC and an external request device.

【0005】図32において、1はCPU、2はDMA
C、3,4は複数の(2つの)外部リクエストデバイス
(外部リクエストデバイス1,2)、5は外部メモリで
ある。
In FIG. 32, 1 is a CPU and 2 is a DMA.
C, 3 and 4 are a plurality of (two) external request devices (external request devices 1 and 2) and 5 is an external memory.

【0006】外部リクエストデバイス3,4からリクエ
スト信号DREQ1/DREQ2がDMAC2に対して
出力される。DMAC2には、それぞれのDMAリクエ
スト信号DREQ1/DREQ2が入力され、DMAC
2は、このDREQ信号の入力によって、CPU1に対
してバスリクエスト(BREQ)信号を出力し、バスの
開放を要求する。
[0006] Request signals DREQ1 / DREQ2 are output from the external request devices 3 and 4 to the DMAC2. DMAC2 receives respective DMA request signals DREQ1 / DREQ2,
2 outputs a bus request (BREQ) signal to the CPU 1 in response to the input of the DREQ signal, and requests the CPU 1 to release the bus.

【0007】BREQを受けたCPU1は、バス開放許
可(BACK)信号を出力し、バスをDMAC2に開放
する。ここで、外部リクエストデバイスが複数存在する
場合は、各デバイスからのDREQの発生回数が増加す
るため、DMACの内部でBREQ信号を発生させる順
序を調整(調停)し、各外部リクエストデバイスのDM
A転送を実現している。
[0007] Upon receiving the BREQ, the CPU 1 outputs a bus release permission (BACK) signal to release the bus to the DMAC 2. Here, when there are a plurality of external request devices, the number of occurrences of DREQ from each device increases. Therefore, the order in which BREQ signals are generated inside the DMAC is adjusted (arbitrated), and the DM of each external request device is adjusted.
A transfer is realized.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のDMA転送装置にあっては、上述したように
複数の外部リクエストデバイスシステムに搭載した場合
に、DREQ信号の調停が必要である。また、外部リク
エストデバイスの数と外部リクエストデバイスのDRE
Q信号の発生周期によってDMAによるバスの占有率が
大きくなり、通常の一連のCPUによる処理が極端に延
ばされてしまう可能性があるという問題点があった。
However, such a conventional DMA transfer device requires arbitration of a DREQ signal when mounted on a plurality of external request device systems as described above. The number of external request devices and the DRE of the external request device
There is a problem in that the bus occupation ratio by the DMA increases due to the generation cycle of the Q signal, and there is a possibility that a normal series of processing by the CPU is extremely extended.

【0009】以下、この不具合について説明する。Hereinafter, this problem will be described.

【0010】図33はDMACの調停のタイミングを概
念的に示すタイミングチャートである。
FIG. 33 is a timing chart conceptually showing DMAC arbitration timing.

【0011】3チャンネル持っているDMACにおい
て、各CHの1回のDMA転送に所要する時間をTとす
る。図33の場合は、DMACが各チャンネルのDMA
の調停を行って、CH1→CH2→CH3→CH1とい
ったラウンドロビン型の方式でチャンネルを使用してい
る。しかし、この方法を用いると、DMA転送にだけバ
スが占有されることになり、プロセッサがバスを使用し
て処理している時間が、時間的に極端に延ばされてしま
うことがある。
In a DMAC having three channels, the time required for one DMA transfer of each CH is T. In the case of FIG. 33, the DMAC is the DMA of each channel.
And the channels are used in a round-robin system such as CH1 → CH2 → CH3 → CH1. However, when this method is used, the bus is occupied only for the DMA transfer, and the time during which the processor performs processing using the bus may be extremely extended in time.

【0012】本発明は、外部リクエストデバイスが複数
存在する場合、または、DREQ信号の発生周期が短い
外部リクエストデバイスが同一のバスに存在する場合、
DMAによるバス占有率を低減し、時間的にバスを有効
に利用することができるDMA転送装置を提供すること
を目的とする。
According to the present invention, when a plurality of external request devices exist, or when an external request device having a short DREQ signal generation cycle exists on the same bus,
It is an object of the present invention to provide a DMA transfer device capable of reducing the bus occupation ratio by DMA and effectively using the bus in time.

【0013】[0013]

【課題を解決するための手段】本発明に係るDMA転送
装置は、CPUの動作と独立に、メモリと外部リクエス
トデバイス間で直接データを転送するDMA転送制御を
行うDMA制御部を備え、DMA制御部は、外部リクエ
ストデバイスからDREQ信号が発生したとき、CPU
に対してBREQN信号を出力してバスの開放を要求
し、CPUからBACKN信号が返されると、外部リク
エストデバイスにDACK信号を送出し、メモリと外部
リクエストデバイス間のデータ転送制御を行うDMA転
送装置において、外部リクエストデバイスは、DREQ
信号をマスクするマスク手段を備え、マスク手段により
DREQ信号をマスクしてDMA転送によるバス占有状
態を制御すること特徴とする。
SUMMARY OF THE INVENTION A DMA transfer device according to the present invention includes a DMA controller for performing a DMA transfer control for directly transferring data between a memory and an external request device, independently of an operation of a CPU. When a DREQ signal is generated from an external request device, the
A DMA transfer device that outputs a BREQN signal to request a bus release, sends a DACK signal to an external request device when a BACKN signal is returned from the CPU, and controls data transfer between the memory and the external request device. In the external request device, the DREQ
A mask means for masking a signal is provided, and the DREQ signal is masked by the mask means to control a bus occupation state by DMA transfer.

【0014】本発明に係るDMA転送装置は、CPUの
動作と独立に、メモリと外部リクエストデバイス間で直
接データを転送するDMA転送制御を行うDMA制御部
を備え、DMA制御部は、外部リクエストデバイスから
DREQ信号が発生したとき、CPUに対してBREQ
N信号を出力してバスの開放を要求し、CPUからBA
CKN信号が返されると、外部リクエストデバイスにD
ACK信号を送出し、メモリと外部リクエストデバイス
間のデータ転送制御を行うDMA転送装置において、D
MA制御部は、DREQ信号をマスクするマスク手段を
備え、マスク手段によりDREQ信号をマスクしてDM
A転送によるバス占有状態を制御することを特徴とす
る。
A DMA transfer device according to the present invention includes a DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device, independently of the operation of the CPU. When the DREQ signal is generated from the
N signal is output to request bus release, and BA
When the CKN signal is returned, D is sent to the external request device.
In a DMA transfer device that sends an ACK signal and controls data transfer between a memory and an external request device,
The MA control unit includes masking means for masking the DREQ signal.
The bus occupation state by the A transfer is controlled.

【0015】本発明に係るDMA転送装置は、CPUの
動作と独立に、メモリと外部リクエストデバイス間で直
接データを転送するDMA転送制御を行うDMA制御部
を備え、DMA制御部は、外部リクエストデバイスから
DREQ信号が発生したとき、CPUに対してBREQ
N信号を出力してバスの開放を要求し、CPUからBA
CKN信号が返されると、外部リクエストデバイスにD
ACK信号を送出し、メモリと外部リクエストデバイス
間のデータ転送制御を行うDMA転送装置において、D
MA制御部は、BREQN信号をマスクするマスク手段
を備え、マスク手段によりBREQN信号をマスクして
DMA転送によるバス占有状態を制御することを特徴と
する。
A DMA transfer device according to the present invention includes a DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device, independently of the operation of the CPU. When the DREQ signal is generated from the
N signal is output to request bus release, and BA
When the CKN signal is returned, D is sent to the external request device.
In a DMA transfer device that sends an ACK signal and controls data transfer between a memory and an external request device,
The MA control unit includes mask means for masking the BREQN signal, and controls the bus occupation state by DMA transfer by masking the BREQN signal by the mask means.

【0016】本発明に係るDMA転送装置は、同時動作
可能な外部リクエストデバイスの数に応じてマスク時間
を制御する手段をさらに備えたものであってもよい。
The DMA transfer apparatus according to the present invention may further include means for controlling a mask time according to the number of external request devices that can operate simultaneously.

【0017】本発明に係るDMA転送装置は、CPUの
処理負荷を管理する管理手段と、CPUの処理負荷に応
じてマスク時間を制御する手段とを備えたものであって
もよい。
The DMA transfer device according to the present invention may include a management unit for managing the processing load of the CPU and a unit for controlling the mask time according to the processing load of the CPU.

【0018】本発明に係るDMA転送装置は、DREQ
信号の発生周期を検出するDREQ信号周期検出手段を
備え、マスク手段は、DREQ信号発生周期に基づいて
DREQ信号をマスクするものであってもよい。
The DMA transfer device according to the present invention has a DREQ
DREQ signal cycle detection means for detecting a signal generation cycle may be provided, and the mask means may mask the DREQ signal based on the DREQ signal generation cycle.

【0019】本発明に係るDMA転送装置は、動作を許
可する複数の外部リクエストデバイスのDREQ信号に
伴い発生するBREQN信号の発生周期を検出するBR
EQN信号周期検出手段を備え、マスク手段は、BRE
QN信号発生周期に基づいてBREQN信号をマスクす
るものであってもよい。
The DMA transfer apparatus according to the present invention includes a BR for detecting a generation cycle of a BREQN signal generated in response to a DREQ signal of a plurality of external request devices permitted to operate.
EQN signal period detecting means, and the masking means comprises a BRE
The BREQN signal may be masked based on the QN signal generation cycle.

【0020】本発明に係るDMA転送装置は、CPUの
処理負荷を管理する管理手段と、CPU処理に伴うバス
占有率を求め、その限界値を設定する設定手段と、CP
Uの処理負荷及び限界値に応じてマスク時間を制御する
手段とを備えたものであってもよい。
[0020] The DMA transfer device according to the present invention comprises a managing means for managing the processing load of the CPU, a setting means for determining a bus occupancy rate associated with the CPU processing and setting a limit value thereof,
Means for controlling the mask time in accordance with the processing load and the limit value of U.

【0021】[0021]

【発明の実施の形態】第1の実施形態 図1は本発明の第1の実施形態に係るDMA転送装置の
構成を示すブロック図である。本実施形態は、外部メモ
リと外部リクエストデバイスとの間でDMA転送を行う
システムに適用したものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment FIG. 1 is a block diagram showing a configuration of a DMA transfer device according to a first embodiment of the present invention. The present embodiment is applied to a system that performs a DMA transfer between an external memory and an external request device.

【0022】図1において、DMA転送装置は、CPU
100、DMAC110(DMA制御部)、外部リクエ
ストデバイス111、外部リクエストデバイス112、
及び外部メモリ113から構成される。
In FIG. 1, a DMA transfer device includes a CPU
100, DMAC 110 (DMA control unit), external request device 111, external request device 112,
And an external memory 113.

【0023】DMAC110は、2つのDMAチャンネ
ルを搭載しており、それらをCH0,CH1とする。ま
た、CH0とCH1はそれぞれ、外部リクエストデバイ
ス111、外部リクエストデバイス112に接続されて
いる。
The DMAC 110 has two DMA channels, which are called CH0 and CH1. CH0 and CH1 are connected to the external request device 111 and the external request device 112, respectively.

【0024】外部リクエストデバイス111の内部に
は、DREQ信号マスク回路121(マスク手段)が、
また外部リクエストデバイス112の内部には、DRE
Q信号マスク回路122(マスク手段)が設置され、D
REQ信号マスク回路121,122は、CPU100
からのマスク信号mask_en0,mask_en1
により制御される。
Inside the external request device 111, a DREQ signal masking circuit 121 (masking means) is provided.
Also, the DRE is provided inside the external request device 112.
A Q signal masking circuit 122 (masking means) is provided.
The REQ signal mask circuits 121 and 122
Mask signals mask_en0 and mask_en1 from
Is controlled by

【0025】マスク信号mask_en0,mask_
en1は、DREQ信号マスク回路121,122のイ
ネーブル/ディセーブルをコントロールする信号であ
り、両信号ともアクティブ“H”(“H”レベルでアク
ティブな信号)である。
The mask signals mask_en0, mask_
The signal en1 is a signal for controlling enable / disable of the DREQ signal mask circuits 121 and 122, and both signals are active “H” (a signal active at “H” level).

【0026】また、DMAC110からCPU100に
BREQ(バス開放要求)信号が出力され、CPU10
0からDMAC110にBACK(バス開放許可)信号
が出力される。
A BREQ (bus release request) signal is output from the DMAC 110 to the CPU 100,
From 0, a BACK (bus release permission) signal is output to the DMAC 110.

【0027】外部メモリ113は、DMA転送のディス
ティネーシ(転送先)、または、ソース(転送元)にな
る。
The external memory 113 serves as a destination (transfer destination) or a source (transfer source) of the DMA transfer.

【0028】図2及び図3は上記DREQ信号マスク回
路121,122の構成を示す回路図であり、図2はD
REQ信号がアクティブ“H”の場合の回路構成を、図
3はDREQ信号がアクティブ“L”(“L”レベルで
アクティブな信号)の場合の回路構成をそれぞれ示す。
FIGS. 2 and 3 are circuit diagrams showing the structure of the DREQ signal mask circuits 121 and 122. FIG.
FIG. 3 shows a circuit configuration when the REQ signal is active "H", and FIG. 3 shows a circuit configuration when the DREQ signal is active "L" (active signal at "L" level).

【0029】図2において、DREQ信号がアクティブ
“H”の場合のDREQ信号マスク回路121,122
は、ANDゲート131により構成される。外部リクエ
ストデバイス内部のDREQ信号をDREQ_P_in
(アクティブ“H”の場合)とし、マスクを制御するマ
スク信号をmask_enとする。
In FIG. 2, the DREQ signal mask circuits 121 and 122 when the DREQ signal is active "H"
Is constituted by an AND gate 131. DREQ signal inside the external request device is DREQ_P_in
(In the case of active “H”), and a mask signal for controlling the mask is mask_en.

【0030】ANDゲート131は、マスク信号mas
k_enの反転信号とDREQ_P_in信号のAND
論理をとりDREQ_Pを出力する。この場合、mas
k_en=“H”のときにDREQ_P_in信号がマ
スクされて、出力としてDREQ_Pが出力される。
The AND gate 131 outputs the mask signal mas.
AND of inverted signal of k_en and DREQ_P_in signal
Takes logic and outputs DREQ_P. In this case, mas
When k_en = “H”, the DREQ_P_in signal is masked, and DREQ_P is output as an output.

【0031】同様に、図3において、DREQ信号がア
クティブ“L”の場合のDREQ信号マスク回路12
1,122は、ORゲート132により構成される。
Similarly, in FIG. 3, when the DREQ signal is active "L", the DREQ signal mask circuit 12
Reference numerals 1 and 122 each include an OR gate 132.

【0032】ORゲート132は、マスク信号mask
_enとDREQ_N_in信号のOR論理をとりDR
EQ_Nを出力する。この場合、mask_en=
“H”のときにDREQ_N_in信号がマスクされ
て、出力としてDREQ_Nが出力される。
The OR gate 132 outputs the mask signal mask
OR logic of _en and DREQ_N_in signals and DR
Outputs EQ_N. In this case, mask_en =
When “H”, the DREQ_N_in signal is masked, and DREQ_N is output as an output.

【0033】以下、上述のように構成されたDMA転送
装置の動作を説明する。
Hereinafter, the operation of the DMA transfer device configured as described above will be described.

【0034】ここでは、mask_en0によりCH0
のDREQ信号マスク回路121がイネーブルになり、
mask_en1によりCH1のDREQ信号マスク回
路122がイネーブルになる場合を説明する。
Here, CH0 is set by mask_en0.
DREQ signal mask circuit 121 is enabled,
A case where the DREQ signal mask circuit 122 of CH1 is enabled by mask_en1 will be described.

【0035】図4は上記DMA転送装置のDMA転送動
作を示すタイミングチャートであり、時間T(例えば、
500ns)で1回のDMA転送が行われる。図中、C
H0,CH1は、DMAC110の2つのDMAチャン
ネルを示す。
FIG. 4 is a timing chart showing the DMA transfer operation of the DMA transfer device.
500 ns), one DMA transfer is performed. In the figure, C
H0 and CH1 indicate two DMA channels of the DMAC 110.

【0036】図4に示すように、T1の区間でCH0/
CH1の各々のDREGが同時に発生したとする。
As shown in FIG. 4, CH0 /
It is assumed that each DREG of CH1 has occurred simultaneously.

【0037】T2の区間においては、CH0のDREQ
0信号は、mask_en0信号によってマスクされて
いるため、CH1のDMA転送が行われている。そのと
き、mask_en1信号はディセーブルの状態
(“L”)である。
In the section of T2, DREQ of CH0
Since the 0 signal is masked by the mask_en0 signal, the DMA transfer of CH1 is being performed. At this time, the mask_en1 signal is in a disabled state (“L”).

【0038】次に、T3の区間においては、両方のDM
Aチャネルがマスクされているため、DMA転送が行わ
れない。この区間では、CPU100がバスを占有し、
プログラムに応じた処理を行っている。
Next, in the section of T3, both DMs
Since the A channel is masked, no DMA transfer is performed. In this section, the CPU 100 occupies the bus,
Performs processing according to the program.

【0039】次に、T4の区間においては、mask_
en1がイネーブルの状態(“H”)になっているた
め、CH1のDREQ1信号がマスクされ、DREQ1
が出力されないため、DMAシーケンスが行われない。
この区間では、CH0のDMA転送が行われる。
Next, in the section of T4, mask_
Since en1 is in an enabled state (“H”), the DREQ1 signal of CH1 is masked, and DREQ1
Is not output, so that the DMA sequence is not performed.
In this section, the DMA transfer of CH0 is performed.

【0040】次に、T5の区間においては、T3の区間
と同様に、CPU100の処理が行われる。よって、こ
こでもCPU100の処理は停止しない。
Next, in the section of T5, the processing of the CPU 100 is performed as in the section of T3. Therefore, the processing of the CPU 100 does not stop here.

【0041】このように、mask_en0,mask
_en1を利用して、DREQ信号をマスクしてDRE
Q0/DREQ1信号の発生周期を変えている。
As described above, mask_en0, mask
_En1 to mask the DREQ signal and
The generation cycle of the Q0 / DREQ1 signal is changed.

【0042】また、mask_en0/mask_en
1は、CPU100が制御しているが、このような周期
的なイネーブル信号は、CPU100の内蔵のタイマを
使用して実現することが可能である。例えば、500n
sの割り込み処理で、mask_en0/mask_e
n1を交互にイネーブルにするように設定すれば、各C
HのDMAは、2μsに1回DREQが発生する。さら
に、設定間隔を短くする場合には、CPU100から設
定するのではなく、外部リクエストデバイスの内部に周
期的にイネーブルを制御するタイマを内蔵することによ
って実現できる。
Also, mask_en0 / mask_en
1 is controlled by the CPU 100, but such a periodic enable signal can be realized by using a timer built in the CPU 100. For example, 500n
s interrupt processing, mask_en0 / mask_e
By setting n1 to be alternately enabled, each C
In the H DMA, DREQ occurs once every 2 μs. Furthermore, the setting interval can be shortened by setting a timer for periodically controlling the enable in the external request device, instead of setting from the CPU 100.

【0043】以上説明したように、第1の実施形態に係
るDMA転送装置は、CPU100、DMAC110、
外部リクエストデバイス111、外部リクエストデバイ
ス112及び外部メモリ113から構成され、外部リク
エストデバイス111,112は、DREQ信号をマス
クするDREQ信号マスク回路121,122を備え、
DREQ信号マスク回路121,122がDREQ0/
DREQ1信号をマスクしてDMA転送によるバス占有
状態を制御するように構成したので、CPU100から
のmask_en0/mask_en1信号(アクティ
ブ“H”)により、DREQ信号マスク回路121,1
22が、DREQ0/DREQ1信号をマスクすること
で、周期的にDREQ信号を発生させることにより、D
MAによるシステバス占有率を制御することができる。
その結果、DMAにバスを占有されてCPUの処理がで
きなくなることを避けることができ、システムのDMA
Cの介在による破綻を防止するという効果がある。
As described above, the DMA transfer device according to the first embodiment includes the CPU 100, the DMAC 110,
It comprises an external request device 111, an external request device 112, and an external memory 113. The external request devices 111 and 112 include DREQ signal mask circuits 121 and 122 for masking a DREQ signal.
The DREQ signal mask circuits 121 and 122 output DREQ0 /
Since the DREQ1 signal is masked to control the bus occupation state by the DMA transfer, the DREQ signal masking circuits 121 and 1 are controlled by the mask_en0 / mask_en1 signal (active “H”) from the CPU 100.
22 generates the DREQ signal periodically by masking the DREQ0 / DREQ1 signal,
It is possible to control the occupancy of the system bus by the MA.
As a result, it is possible to avoid that the bus is occupied by the DMA and the processing of the CPU cannot be performed.
This has the effect of preventing breakdown due to the intervention of C.

【0044】また、DMAC側の構成には一切変更がな
いため、既存のCPUシステムの変更なしにシステム全
体のスループットの向上及び信頼性の向上を図ることが
できる。また、ゲート回路という簡単な部品の追加で実
現できるので、低コストで実施できる。
Further, since there is no change in the configuration of the DMAC, the throughput and reliability of the entire system can be improved without changing the existing CPU system. In addition, since it can be realized by adding a simple component called a gate circuit, it can be implemented at low cost.

【0045】なお、本実施形態では、外部リクエストデ
バイス111,112の内部に、DREQ0/DREQ
1信号をマスクするDREQ信号マスク回路121,1
22を設けるようにしているが、これらマスク回路12
1,122は外部リクエストデバイス側に設置されてい
ればよく、必ずしも外部リクエストデバイスの内部に設
置する構成でなくてもよい。 第2の実施形態 図5は本発明の第2の実施形態に係るDMA転送装置の
構成を示すブロック図である。本実施形態は、DMAC
を使用して、外部メモリデバイスと外部リクエストデバ
イスとの間でDMA転送を行うシステムに適用した例で
ある。本実施形態に係るDMA転送装置の説明にあたり
前記図1と同一構成部分には同一符号を付している。
In this embodiment, DREQ0 / DREQ is stored inside the external request devices 111 and 112.
DREQ signal mask circuit 121,1 for masking one signal
22 are provided, but these mask circuits 12
The components 1 and 122 need only be installed on the external request device side, and need not necessarily be configured to be installed inside the external request device. Second Embodiment FIG. 5 is a block diagram showing a configuration of a DMA transfer device according to a second embodiment of the present invention. In this embodiment, the DMAC
This is an example applied to a system that performs DMA transfer between an external memory device and an external request device by using. In the description of the DMA transfer device according to the present embodiment, the same components as those in FIG. 1 are denoted by the same reference numerals.

【0046】図5において、DMA転送装置は、CPU
100、DMAC200、外部リクエストデバイス24
0、外部リクエストデバイス241、及び外部メモリ1
13から構成される。
In FIG. 5, the DMA transfer device has a CPU
100, DMAC 200, external request device 24
0, external request device 241, and external memory 1
13.

【0047】DMAC200は、2つのDMAチャンネ
ルを搭載しており、それらをCH0,CH1とする。ま
た、CH0とCH1はそれぞれ、外部リクエストデバイ
ス240、外部リクエストデバイス241に接続されて
いる。
The DMAC 200 has two DMA channels, which are called CH0 and CH1. CH0 and CH1 are connected to the external request device 240 and the external request device 241, respectively.

【0048】DMAC200は、各チャンネル毎に設置
され、CPU100からのマスク信号mask_en
0,mask_en1により制御されるDREQ信号マ
スク回路210,220と、DREQ信号マスク回路2
10,220のBREQ0信号,BREQ1信号を調停
する調停回路230とを備える。
The DMAC 200 is provided for each channel, and a mask signal mask_en from the CPU 100 is provided.
DREQ signal masking circuits 210 and 220 controlled by 0, mask_en1, and DREQ signal masking circuit 2
An arbitration circuit 230 that arbitrates the BREQ0 signal and the BREQ1 signal of 10, 220.

【0049】マスク信号mask_en0,mask_
en1は、CH0とCH1のDREQ信号マスク回路2
10,220のイネーブル/ディセーブルの切替えをす
る信号であり、両信号ともアクティブ“H”である。
The mask signals mask_en0, mask_
en1 is a DREQ signal mask circuit 2 for CH0 and CH1
These signals are for switching enable / disable of the signals 10, 220, and both signals are active "H".

【0050】なお、前記第1の実施形態のmask_e
n信号は、マスク信号そのものを意味するが、本実施形
態を含む後述する各実施形態で記載されるmask_e
n信号はマスク回路を動作させるか否かを制御するため
の信号を意味する。したがって、必ずマスク回路を動作
させる場合は、mask_en信号を省略することがで
きる。
The mask_e of the first embodiment is used.
The n signal means the mask signal itself, but the mask_e described in each embodiment described later including this embodiment.
The n signal means a signal for controlling whether to operate the mask circuit. Therefore, when the mask circuit is always operated, the mask_en signal can be omitted.

【0051】CPU100は、このマスク信号mask
_en0,mask_en1をDREQ信号マスク回路
210,220に出力してDREQ信号マスク回路21
0,220を制御する。また、CPU100は、DRE
Q信号マスク回路210,220に対してタイマカウン
ト値を設定することが可能であり、CPU100が設定
するタイマカウント値によって、生成されるマスク信号
の長さが変わる。
The CPU 100 outputs the mask signal mask
_En0 and mask_en1 are output to the DREQ signal mask circuits 210 and 220 to output the DREQ signal mask circuit 21.
0,220. In addition, the CPU 100
A timer count value can be set for the Q signal mask circuits 210 and 220, and the length of the generated mask signal changes according to the timer count value set by the CPU 100.

【0052】外部リクエストデバイス240がDMAC
200に出力するDREQ信号をDREQ0、外部リク
エストデバイス241がDMAC200に出力するDR
EQ信号をDREQ1とし、DMAC200から外部リ
クエストデバイス240,241に返すDREQ0とD
REQ1に対するDACK信号をそれぞれDACK0,
DACK1とする。
When external request device 240 is DMAC
DREQ0 to be output to the DMAC 200, and DR which the external request device 241 outputs to the DMAC 200.
The EQ signal is set to DREQ1, and DREQ0 and DREQ returned from the DMAC 200 to the external request devices 240 and 241.
DACK signals for REQ1 are respectively DACK0,
DACK1.

【0053】また、DMAC200からCPU100に
BREQN信号(バス開放リクエスト信号:CPUに対
して、バス権の開放を要求する信号/アクティブ
“L”)が出力され、CPU100からDMAC200
に対してBACKN信号(バス・アクノリッジ信号:外
部DMACに対して、バス権の開放を許可していること
を示す信号/アクティブ“L”)が出力される。
The DMAC 200 outputs a BREQN signal (bus release request signal: a signal for requesting the CPU to release the bus right / active “L”) to the CPU 100.
BACKN signal (bus acknowledge signal: signal indicating that release of bus right is permitted to external DMAC / active "L") is output.

【0054】ここで、DMAの転送方向は、外部リクエ
ストデバイス→外部メモリ方向と、外部メモリ→外部リ
クエストデバイス方向の2通りあり、この転送方向は、
CPU100がDMAC200に対して設定可能なもの
とする。
Here, there are two DMA transfer directions, that is, an external request device → external memory direction and an external memory → external request device direction.
It is assumed that the CPU 100 can set the DMAC 200.

【0055】図6は上記DREQ信号マスク回路21
0,220の構成を示すブロック図である。各チャンネ
ルのDREQ信号マスク回路210,220は、同一構
成をとるため、DREQ信号マスク回路210を代表し
て説明する。
FIG. 6 shows the DREQ signal mask circuit 21.
It is a block diagram which shows the structure of 0,220. Since the DREQ signal mask circuits 210 and 220 of each channel have the same configuration, the DREQ signal mask circuit 210 will be described as a representative.

【0056】図6において、DREQ信号マスク回路2
10は、サンプリングクロックの立ち上がりエッジでカ
ウント(デクリメント)するカウンタ回路211、カウ
ントデータを所定値“0”と比較し、“0”とカウント
データが一致したときサンプリングクロックの周期分の
パルス、すなわちカウンタTC(Terminal Count:最終
カウントを意味する)信号を出力する比較器212、及
びマスク回路213から構成される。
In FIG. 6, the DREQ signal mask circuit 2
Reference numeral 10 denotes a counter circuit 211 that counts (decrements) at the rising edge of the sampling clock, compares the count data with a predetermined value “0”, and when “0” matches the count data, a pulse for the period of the sampling clock, ie, a counter. It is composed of a comparator 212 that outputs a TC (Terminal Count) signal, and a mask circuit 213.

【0057】カウンタ回路211には、データバスから
カウントするための初期値と、カウントするためのサン
プリングクロックが入力される。また、比較器212に
は、カウンタ回路211がカウントしたデータである現
在のカウント値が入力され、比較器212からはカウン
タTC信号が出力される。
The counter circuit 211 receives an initial value for counting from the data bus and a sampling clock for counting. Further, a current count value which is data counted by the counter circuit 211 is input to the comparator 212, and a counter TC signal is output from the comparator 212.

【0058】上記カウンタTC信号は、入力されてくる
カウントデータ値が“0”になった区間で1サンプリン
グクロック分の幅で“H”のパルスになる信号であり、
カウントが終了したことを示す。
The counter TC signal is a signal which becomes a pulse of "H" with a width of one sampling clock in a section where the input count data value becomes "0".
Indicates that the count has ended.

【0059】また、マスク回路213には、比較器21
2から出力されるカウンタTC信号が入力されるととも
に、DREQ信号及びDACK信号が入力され、BRE
Q信号が出力される。
The mask circuit 213 includes the comparator 21
2 is input, the DREQ signal and the DACK signal are input while the counter TC signal output from
A Q signal is output.

【0060】図7は図6のマスク回路213の内部の詳
細な構成を示す図である。
FIG. 7 is a diagram showing a detailed configuration inside mask circuit 213 of FIG.

【0061】図7において、マスク回路213は、カウ
ンタTC信号を基にDACK信号が入力された時点で内
部で生成されたマスク信号がイネーブルになるマスク信
号を出力するマスク信号発生回路214、及び発生した
マスク信号とDREQ信号のOR論理をとるORゲート
215から構成される。
In FIG. 7, a mask circuit 213 includes a mask signal generation circuit 214 for outputting a mask signal that enables a mask signal generated internally when a DACK signal is input based on a counter TC signal, and a generation circuit. And an OR gate 215 that takes the OR logic of the mask signal and the DREQ signal.

【0062】以下、上述のように構成されたDMA転送
装置の動作を説明する。
Hereinafter, the operation of the DMA transfer device configured as described above will be described.

【0063】図8はDMA転送装置の動作を説明するた
めのタイミングチャートである。なお、図中、番号(1)
〜(5)は動作タイミングまたは動作の区間を説明するた
めの符号である。
FIG. 8 is a timing chart for explaining the operation of the DMA transfer device. In the figure, the number (1)
Symbols (5) to (5) are used to describe operation timings or sections of operation.

【0064】2チャンネルCH0,CH1のうち、まず
CH0のDREQ0信号マスク回路210を例にして説
明する。
First, the DREQ0 signal mask circuit 210 for CH0 of the two channels CH0 and CH1 will be described as an example.

【0065】図8のタイミングチャートにおいて、DR
EQ0信号は、DACK0信号がディセーブル
(“L”)になってから、一定時間経過後にイネーブル
(“H”)になるものとする。
In the timing chart of FIG.
It is assumed that the EQ0 signal is enabled (“H”) after a lapse of a predetermined time after the DACK0 signal is disabled (“L”).

【0066】図8の(1)のタイミングでCPU100は
DREQ0信号マスク回路210に対して、タイマカウ
ント値をライトする。本動作の場合は、“5”をライト
するものとする。
At the timing (1) in FIG. 8, the CPU 100 writes the timer count value to the DREQ0 signal mask circuit 210. In the case of this operation, “5” is written.

【0067】次に、図8の(1)−1のタイミングでCP
U100は、mask_en0を“H”にする。ここま
でのCPU100の動作で、DREQ0信号マスク回路
210は動作可能状態になる。
Next, at the timing of (1) -1 in FIG.
U100 sets mask_en0 to “H”. With the operation of the CPU 100 so far, the DREQ0 signal mask circuit 210 is in an operable state.

【0068】次に、外部リクエストデバイス240から
出力されるDREQ0信号がタイマに入力される。この
とき、DREQ0信号マスク回路210は動作すること
なしに、DMAC200はDREQ0の入力のタイミン
グTEQN信号をCPU100に対して出力する。
Next, the DREQ0 signal output from the external request device 240 is input to the timer. At this time, the DMAC 200 outputs the DREQ0 input timing TEQN signal to the CPU 100 without operating the DREQ0 signal mask circuit 210.

【0069】BREQN信号を受け取ったCPU100
は、ある決まったタイミング(CPUの仕様によって異
なる)で、BACKN信号を出力する(図8の(2)−1
の区間参照)。この区間は、DMAC200がバスを占
有する区間であり、この区間ではCPU100はバス権
を開放している状態になる。
CPU 100 that has received the BREQN signal
Outputs a BACKN signal at a certain timing (depending on the specifications of the CPU) ((2) -1 in FIG. 8).
Section). This section is a section in which the DMAC 200 occupies the bus, and in this section, the CPU 100 releases the bus right.

【0070】図8の(2)−1区間でDMAC200は、
BACKN信号からDACK0信号を生成し、外部リク
エストデバイス240に出力する。この時、DACK0
信号の立ち下がりのタイミング(図8の(3)−1参照)
で、マスク信号を“H”にする。その後、図8の(5)−
1のタイミングでDREQ0信号は、マスク信号でマス
クされる。
In the section (2) -1 of FIG. 8, the DMAC 200
A DACK0 signal is generated from the BACKN signal and output to the external request device 240. At this time, DACK0
Timing of signal falling (see (3) -1 in Fig. 8)
Then, the mask signal is set to "H". Then, (5)-of FIG.
At the timing of 1, the DREQ0 signal is masked by the mask signal.

【0071】ここで、図6及び図7を参照してDREQ
信号マスク回路210,220のマスク動作について説
明する。
Here, referring to FIG. 6 and FIG.
The mask operation of the signal mask circuits 210 and 220 will be described.

【0072】図6において、CPU100がカウンタ回
路211に対してカウントの初期値(本実施形態では、
“5h”)をセットする。このとき、DACK信号が入
力されて初めてカウントが行われる。
In FIG. 6, the CPU 100 sends an initial count value to the counter circuit 211 (in this embodiment,
"5h") is set. At this time, counting is performed only after the DACK signal is input.

【0073】サンプリングクロックの立ち上がりエッジ
でカウント(デクリメント)が行われ、比較器212で
は、このカウントデータを所定値“0”と比較する。
“0”とカウントデータが一致した場合は、サンプリン
グクロックの周期の分だけカウンタTC信号が出力され
る。
The count (decrement) is performed at the rising edge of the sampling clock, and the comparator 212 compares the count data with a predetermined value “0”.
If the count data matches "0", the counter TC signal is output for the period of the sampling clock.

【0074】一方、マスク回路213では、DACK信
号が入力された時点で、内部のマスク信号発生回路21
4(図7)のマスク信号がイネーブル(アクティブ
“H”)となり、ORゲート215でこのマスク信号と
DREQ信号とのOR論理がとられ、BREQ信号とし
て出力される。マスク信号がディセーブルになるために
は、カウンタTC信号を使用し、マスク信号をディセー
ブルにする。このマスク信号は、マスク信号発生回路2
14で生成される信号で、DACK信号により“H”と
なり、カウンタTC信号で“L”となる信号である。
On the other hand, in the mask circuit 213, when the DACK signal is input, the internal mask signal generation circuit 21
4 (FIG. 7) is enabled (active "H"), and the OR signal of the mask signal and the DREQ signal is taken by the OR gate 215 and output as a BREQ signal. In order to disable the mask signal, the counter TC signal is used to disable the mask signal. This mask signal is supplied to the mask signal generation circuit 2
The signal generated in step 14 is "H" by the DACK signal and "L" by the counter TC signal.

【0075】図8のタイミングチャートの説明に戻る。Returning to the description of the timing chart of FIG.

【0076】入力にDREQ0信号と上記マスク信号か
ら生成された出力を使用してBREQN信号を作成す
る。
The BREQN signal is created by using the DREQ0 signal as an input and the output generated from the mask signal.

【0077】図8の(3)−1地点からサンプルクロック
に同期して、DREQ信号マスク回路210のカウンタ
回路211のカウンタがデクリメントされる。カウンタ
値が“0”になった時点で、カウンタTC信号が発生す
る(アクティブ“H”)。
The counter of the counter circuit 211 of the DREQ signal mask circuit 210 is decremented in synchronization with the sample clock from the point (3) -1 in FIG. When the counter value becomes "0", a counter TC signal is generated (active "H").

【0078】このカウンタTC信号の立ち下がりを利用
してマスク信号が“L”となり、マスクがディセーブル
になる(図8の(4)−1参照)。マスク信号が“L”に
なった時点でマスク回路213のマスク信号が“L”に
なるので、DREQ0信号がそのままゲートを抜けて出
力となる。この出力信号を利用して、BREQN信号が
出力される(タイミングは図8の(4)−1参照)。
Using the falling edge of the counter TC signal, the mask signal becomes "L" and the mask is disabled (see (4) -1 in FIG. 8). Since the mask signal of the mask circuit 213 becomes "L" when the mask signal becomes "L", the DREQ0 signal passes through the gate as it is and is output. The BREQN signal is output using this output signal (for the timing, see (4) -1 in FIG. 8).

【0079】ここで、図8の(5)−1〜(2)−2のBAC
KN信号の立ち下がりエッジまでの区間においては、B
REQNが出力されないため、バス権はCPU100に
あることになる。
Here, the BAC of (5) -1 to (2) -2 in FIG.
In the section up to the falling edge of the KN signal, B
Since REQN is not output, the CPU 100 has the bus right.

【0080】図8の(4)−1以降の動作シーケンスに関
しては上記説明と同様である。
The operation sequence after (4) -1 in FIG. 8 is the same as described above.

【0081】図8に示すように、区間(2)−1、(2)−
2、(2)−3はDMAC200がバス権を所有している
区間であり、それ以外の区間はCPU100がバス権を
所有している区間である。
As shown in FIG. 8, sections (2) -1, (2)-
2, (2) -3 are sections in which the DMAC 200 owns the bus right, and the other sections are sections in which the CPU 100 owns the bus right.

【0082】上記では、外部リクエストデバイス240
に関しての動作の説明をしたが、外部リクエストデバイ
ス241に関しても、同じ動作である。
In the above description, the external request device 240
Has been described, but the same applies to the external request device 241.

【0083】次に、CH0とCH1のDREQ0/DR
EQ1信号の調停に関して説明する。
Next, DREQ0 / DR of CH0 and CH1
The arbitration of the EQ1 signal will be described.

【0084】図9はDMA転送装置のDMAC200の
調停動作を説明するためのタイミングチャートである。
図中、○印はCH0のDMAシーケンスの開始を、●印
はCH0のDMAシーケンスの開始を指し、番号(1)〜
(2)は動作タイミングを説明するための符号である。ま
た、DREQ信号監視CHは調停回路230の内部にあ
る。
FIG. 9 is a timing chart for explaining the arbitration operation of the DMAC 200 of the DMA transfer device.
In the figure, the mark を indicates the start of the DMA sequence of CH0, and the mark ● indicates the start of the DMA sequence of CH0.
(2) is a code for explaining the operation timing. The DREQ signal monitoring CH is inside the arbitration circuit 230.

【0085】DMAC200内部でのDREQ0/DR
EQ1信号の調停は、調停回路230によって、CH0
→CH1→CH0→…の順(ラウンドロビン式)にDR
EQが入力されたかどうかを監視している。
DREQ0 / DR inside DMAC 200
The arbitration of the EQ1 signal is performed by the arbitration circuit 230 on CH0.
DR in the order of → CH1 → CH0 → ... (round robin)
It monitors whether EQ has been input.

【0086】ここではT1区間の始まりにDREQ0、
DREQ1が入力された場合を例にとり説明する。
Here, DREQ0,
The case where DREQ1 is input will be described as an example.

【0087】まず、図9の(1)の箇所で、DREQ監視
がCH0を監視しているときに同時にDREQ0/DR
EQ1が入力されたことから、DREQ0が優先され
る。DREQ0を受けたBREQN信号は“L”となる
(図9の○の部分参照)。
First, at the point (1) in FIG. 9, when DREQ monitoring is monitoring CH0, DREQ0 / DR
Since EQ1 is input, DREQ0 has priority. The BREQN signal that has received DREQ0 becomes "L" (see the circled portion in FIG. 9).

【0088】次に、T3の区間((2)の箇所参照)でC
H0のDMAシーケンスが終了した時点で、DREQ信
号監視CHがCH1を示していて、しかも、DREQ1
信号がイネーブルであるために、T4の区間でDREQ
1を受けたBREQN信号が“L”となる(図9の●部
分参照)。CH1のDMAシーケンスはT5区間で終了
する。
Next, in the section T3 (see the section (2)), C
At the end of the H0 DMA sequence, the DREQ signal monitor CH indicates CH1, and the DREQ1
Since the signal is enabled, DREQ
The BREQN signal which has received 1 becomes "L" (see the portion ● in FIG. 9). The DMA sequence of CH1 ends in the T5 section.

【0089】T6〜T8区間では、DREQ信号監視C
Hが1周期毎に、CH0/CH1のDREQ0/DRE
Q1を監視し、DREQ信号が入力されるのを待ってい
る状態である。このとき、マスク信号CH0とマスク信
号CH1が動作しているために、T6でDREQ0が、
T8でDREQ1がマスクされている。
In the section from T6 to T8, the DREQ signal monitoring C
H is DREQ0 / DRE of CH0 / CH1 every cycle.
It is in a state of monitoring Q1 and waiting for a DREQ signal to be input. At this time, since the mask signal CH0 and the mask signal CH1 are operating, DREQ0 is set at T6.
DREQ1 is masked at T8.

【0090】T9において、マスク信号CH1が“L”
になるために、T10区間でBREQN信号がイネーブ
ル(“L”)になり、CH1のDMAシーケンスが行わ
れ、T11区間でそのシーケンスが終了する。
At T9, the mask signal CH1 becomes "L".
, The BREQN signal is enabled (“L”) in the section T10, the DMA sequence of CH1 is performed, and the sequence ends in the section T11.

【0091】また、T12区間においてマスク信号CH
0が“L”になり、なおかつ、DREQ監視CHが
“0”を示しているため、T13区間でDREQ0を受
けたBREQN信号が“L”となり、CH0のDMAシ
ーケンスが行われる。
Further, in the section T12, the mask signal CH
Since 0 becomes “L” and the DREQ monitoring CH indicates “0”, the BREQN signal which has received DREQ0 in the section T13 becomes “L”, and the DMA sequence of CH0 is performed.

【0092】このように、DREQ監視CHによってD
REQ信号を監視して、有効になったDREQ信号と監
視CHが同じくなった場合にBREQN信号を“L”に
してDMAシーケンスをスタートさせている。
As described above, DREQ is monitored by the DREQ monitor CH.
The REQ signal is monitored, and when the validated DREQ signal is the same as the monitored CH, the BREQN signal is set to "L" to start the DMA sequence.

【0093】以上説明したように、第2の実施形態に係
るDMA転送装置は、DMAC200が、各チャンネル
毎に設置され、CPU100からのマスク信号mask
_en0,mask_en1により制御されるDREQ
信号マスク回路210,220と、DREQ信号マスク
回路210,220のBREQ0信号,BREQ1信号
を調停する調停回路230とを備え、DREQ信号マス
ク回路210,220がDREQ0/DREQ1信号を
マスクしてDMA転送によるバス占有状態を制御するよ
うに構成したので、DMAC側(内部)で外部リクエス
トデバイスのDREQ信号をマスクすることによって、
周期的にDREQ信号を発生させることにより、DMA
によるシステムのバス占有率を制御することができ、D
MAにバスを占有され、CPUの処理ができなくなるこ
とを避けることができ、システムの破綻を防止できると
いう効果がある。
As described above, in the DMA transfer device according to the second embodiment, the DMAC 200 is provided for each channel, and the mask signal mask from the CPU 100 is provided.
_En0, DREQ controlled by mask_en1
Signal masking circuits 210 and 220; and an arbitration circuit 230 for arbitrating the BREQ0 signal and the BREQ1 signal of the DREQ signal masking circuits 210 and 220. Since the bus occupation state is controlled, by masking the DREQ signal of the external request device on the DMAC side (internal),
By periodically generating the DREQ signal, the DMA
Can control the bus occupancy of the system by
It is possible to avoid that the bus is occupied by the MA and the processing of the CPU becomes impossible, thereby preventing the failure of the system.

【0094】さらに、本実施形態では、DREQ信号マ
スク回路210,220をDMAC200内部に搭載す
るようにしているので、外部リクエストデバイスを新規
に追加した場合に、新規デバイス搭載の度に、上記マス
ク回路を追加することによるハードウェアの増加を防ぐ
ことができるという効果がある。
Further, in the present embodiment, the DREQ signal mask circuits 210 and 220 are mounted inside the DMAC 200. Therefore, when an external request device is newly added, the mask circuit is mounted every time a new device is mounted. This has the effect of preventing an increase in hardware due to the addition of.

【0095】また、DMAC側(内部)に調停回路23
0によるDREQ監視CHを搭載することで、DMA転
送チャンネルに優先順位を付与し、均等にDMAのチャ
ネルを配分することが可能になるという効果がある。
The arbitration circuit 23 is provided on the DMAC side (inside).
By mounting the DREQ monitoring CH by 0, there is an effect that it is possible to assign priorities to the DMA transfer channels and evenly distribute the DMA channels.

【0096】なお、本実施形態では、DMAC200の
内部に、DREQ信号をマスクするDREQ信号マスク
回路210,220を設けるようにしているが、これら
マスク回路210,220はDMAC側に設置されてい
ればよく、必ずしもDMACの内部に設置する構成でな
くてもよい。 第3の実施形態 図10は本発明の第3の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図5と同一構成部分には
同一符号を付している。
In this embodiment, the DREQ signal masking circuits 210 and 220 for masking the DREQ signal are provided inside the DMAC 200. However, if these masking circuits 210 and 220 are provided on the DMAC side, The configuration may not always be installed inside the DMAC. Third Embodiment FIG. 10 is a block diagram showing a configuration of a DMA transfer device according to a third embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIG. 5 are denoted by the same reference numerals.

【0097】図10において、DMA転送装置は、CP
U100、DMAC300、外部リクエストデバイス3
50、外部リクエストデバイス351、外部リクエスト
デバイス352及び外部メモリ113から構成され、D
MAC300は、BREQN信号をマスクするカウンタ
付きマスク回路310を備えて構成される。
In FIG. 10, the DMA transfer device has a CP
U100, DMAC300, external request device 3
50, an external request device 351, an external request device 352, and an external memory 113.
The MAC 300 includes a mask circuit 310 with a counter that masks the BREQN signal.

【0098】DMAC300は、3つのDMAチャンネ
ルを搭載しており、それらをCH0,CH1,CH3と
する。また、CH0,CH1,CH2はそれぞれ、外部
リクエストデバイス351、外部リクエストデバイス3
52、外部リクエストデバイス353に接続されてい
る。
The DMAC 300 has three DMA channels, which are called CH0, CH1, and CH3. Also, CH0, CH1, and CH2 are the external request device 351 and the external request device 3 respectively.
52, connected to the external request device 353.

【0099】外部リクエストデバイス351のDMAチ
ャンネルをCH1、外部リクエストデバイス352のD
MAチャンネルをCH2、外部リクエストデバイス35
3のDMAチャンネルをCH3とする。
The DMA channel of the external request device 351 is CH1 and the DMA channel of the external request device 352 is D.
CH2 MA channel, external request device 35
The DMA channel of No. 3 is CH3.

【0100】図10の破線に示すように、CH0,CH
1,CH2毎に、外部リクエストデバイス351、外部
リクエストデバイス352、外部リクエストデバイス3
53からDMAC300にDMA要求信号DREQ1,
DREQ2,DREQ3が出力され、また、DMAC3
00から外部リクエストデバイス351、外部リクエス
トデバイス352、外部リクエストデバイス353にD
MA許可信号DACK1,DACK2,DACK3が出
力される。
As shown by the broken lines in FIG.
The external request device 351, the external request device 352, the external request device 3
53 to the DMAC 300 from the DMA request signal DREQ1,
DREQ2 and DREQ3 are output, and DMAC3
00 to the external request device 351, the external request device 352, and the external request device 353
MA permission signals DACK1, DACK2, and DACK3 are output.

【0101】DMAC300は、CPU100に対して
バス開放リクエスト信号BREQNを出力し、CPU1
00は、DMAC300に対してバス開放許可信号BA
CKNを出力する。
DMAC 300 outputs a bus release request signal BREQN to CPU 100,
00 indicates a bus release permission signal BA to the DMAC 300.
CKN is output.

【0102】また、CPU100からDMAC300に
出力されるmask_en信号は、CPU100のポー
トから出力される信号であり、カウンタ付きマスク回路
310のカウンタ回路をイネーブルにする信号(アクテ
ィブ“H”)である。
The mask_en signal output from the CPU 100 to the DMAC 300 is a signal output from the port of the CPU 100, and is a signal (active “H”) for enabling the counter circuit of the mask circuit with counter 310.

【0103】図11は上記カウンタ付きマスク回路31
0の構成を示すブロック図である。
FIG. 11 shows the mask circuit 31 with the counter.
FIG. 3 is a block diagram showing a configuration of a 0.

【0104】図11において、サンプリングクロックの
立ち上がりエッジでカウント(デクリメント)するカウ
ンタ回路311と、カウントデータを所定値“0”と比
較し、“0”とカウントデータが一致したときサンプリ
ングクロックの周期分のパルス、すなわちカウンタTC
信号を出力する比較器312と、DMAC300内部で
作成したBREQ信号とmask_enマスク信号との
OR(論理和)を作成して、BREQN信号を作成する
マスク回路313とから構成される。
In FIG. 11, a counter circuit 311 that counts (decrements) at the rising edge of the sampling clock, compares the count data with a predetermined value “0”, and when “0” and the count data match, the number of cycles of the sampling clock is exceeded. Pulse, that is, the counter TC
It comprises a comparator 312 that outputs a signal, and a mask circuit 313 that creates an OR (logical sum) of the BREQ signal and the mask_en mask signal created inside the DMAC 300 to create a BREQN signal.

【0105】カウンタ回路311には、データバス、サ
ンプルクロック、BACKN信号が入力され、現在のカ
ウント値が出力される。
The counter circuit 311 receives a data bus, a sample clock, and a BACKN signal, and outputs a current count value.

【0106】比較器312には、カウンタ回路311か
ら出力された現在のカウント値のデータが入力され、カ
ウンタTC信号が出力される。
The comparator 312 receives the data of the current count value output from the counter circuit 311 and outputs a counter TC signal.

【0107】マスク回路313には、DMAC300内
部でDREQ信号から作成したBREQ信号、CPU1
00からのBACKN信号、mask_en信号、比較
器312からカウンタTC信号が入力され、BREQN
信号を出力する。
The mask circuit 313 includes the BREQ signal generated from the DREQ signal inside the DMAC 300 and the CPU 1
00, a counter TC signal from the comparator 312, and a BREQN signal
Output a signal.

【0108】図12は図11のマスク回路313の内部
の詳細な構成を示す図である。
FIG. 12 is a diagram showing a detailed configuration inside mask circuit 313 of FIG.

【0109】図12において、マスク回路313は、カ
ウンタTC信号を基にBACKN信号が入力された時点
で内部で生成されたマスク信号がイネーブルになるマス
ク信号を出力するマスク信号発生回路314、及び発生
したマスク信号とBREQ信号のOR論理をとるORゲ
ート315から構成される。
In FIG. 12, a masking circuit 313 includes a masking signal generating circuit 314 for outputting a masking signal that enables a masking signal generated internally when a BACKN signal is input based on a counter TC signal, and a generating circuit. And an OR gate 315 that performs OR logic of the mask signal and the BREQ signal.

【0110】図13は上記DMA要求信号DREQ1,
DREQ2,DREQ3からBREQN信号発生までの
構成を示す図である。
FIG. 13 shows the DMA request signals DREQ1 and DREQ1.
FIG. 9 is a diagram showing a configuration from DREQ2, DREQ3 to BREQN signal generation.

【0111】図13において、316は、外部リクエス
トデバイス351、外部リクエストデバイス352、外
部リクエストデバイス353からのDREQ1,DRE
Q2,DREQ3信号を調停し、DMAC300内部で
作成したBREQ信号を出力するDREQ信号調停回路
である。
In FIG. 13, reference numerals 316 denote DREQ1 and DRE from the external request device 351, the external request device 352, and the external request device 353.
A DREQ signal arbitration circuit that arbitrates the Q2 and DREQ3 signals and outputs the BREQ signal created inside the DMAC 300.

【0112】DREQ信号調停回路316で作成された
BREQ信号は、マスク回路313(図11及び図1
2)に出力され、マスク回路313はBREQN信号を
出力する。
The BREQ signal generated by the DREQ signal arbitration circuit 316 is supplied to the mask circuit 313 (FIG. 11 and FIG. 1).
2), and the mask circuit 313 outputs a BREQN signal.

【0113】ここで、本実施形態のマスクカウンタ付き
マスク回路310は、第2の実施形態のDREQ信号マ
スク回路210,220と同様に、ハード的なカウンタ
(タイマ)を設けてマスク時間を決定する方法をとる。
但し、第2の実施形態のようにハード的なカウンタ(タ
イマ)を設けてマスク時間を決定する方法も可能である
し、CPU自体のタイマ割り込みを利用して、CPUポ
ートを利用してマスク時間を制御することも可能であ
る。
Here, the mask circuit with mask counter 310 of the present embodiment determines the mask time by providing a hardware counter (timer), similarly to the DREQ signal mask circuits 210 and 220 of the second embodiment. Take the way.
However, a method of determining a mask time by providing a hardware counter (timer) as in the second embodiment is also possible, and a mask time is determined by using a CPU port using a timer interrupt of the CPU itself. Can also be controlled.

【0114】また、本実施形態では、マスク時間(外部
リクエストデバイスの数に応じて選択する)になるよう
に、マスクカウンタ付きマスク回路310内のカウンタ
回路311のカウンタの値をセットするものであり、こ
のカウンタに対して、所定のマスク時間になるようにデ
ータをセットする。これも、CPU自体のタイマ割り込
みを使ってでも実現可能である。
In the present embodiment, the value of the counter of the counter circuit 311 in the mask circuit 310 with a mask counter is set so that the mask time is selected (selected according to the number of external request devices). Data is set in this counter so that a predetermined mask time is reached. This can also be realized by using a timer interrupt of the CPU itself.

【0115】以下、上述のように構成されたDMA転送
装置の動作を説明する。
The operation of the above-configured DMA transfer device will be described below.

【0116】まず、カウンタ付きマスク回路310の動
作について述べる。
First, the operation of the mask circuit with counter 310 will be described.

【0117】図11に示すように、CPU100はカウ
ンタ回路311にカウントすべき初期値をセット(本実
施形態の場合は“5h”をセット)する。次に、BAC
KN信号が入力されると、サンプルクロックの立ち上が
りエッジでカウント(デクリメント)が行われる。次
に、比較器312により現在のカウント値を“0”と比
較し、一致するとサンプルクロックの1周期分のパルス
を出力する。
As shown in FIG. 11, the CPU 100 sets an initial value to be counted in the counter circuit 311 ("5h" is set in this embodiment). Next, BAC
When the KN signal is input, counting (decrement) is performed at the rising edge of the sample clock. Next, the comparator 312 compares the current count value with “0”, and outputs a pulse for one cycle of the sample clock when they match.

【0118】一方、マスク回路313においては、図1
2に示すようにBACKN信号により内部のマスク信号
がイネーブル(アクティブ“H”)となり、DMAC3
00内部でDREQから作成したBREQ信号と内部の
マスク信号とのORゲート315の出力をBREQNと
して出力する。ここで、内部のマスク信号は、BACK
N信号にてイネーブル(アクティブ“H”)となり、カ
ウンタTC信号にてディセーブル(アクティブ“L”)
となる信号である。
On the other hand, in the mask circuit 313, FIG.
As shown in FIG. 2, the internal mask signal is enabled (active “H”) by the BACKN signal, and the DMAC 3
00, the output of the OR gate 315 of the BREQ signal generated from DREQ and the internal mask signal is output as BREQN. Here, the internal mask signal is BACK
Enable (active "H") by N signal, disable (active "L") by counter TC signal
This is the signal.

【0119】また、図10に示すように、mask_e
n信号はCPU100からDMAC300に入力される
信号であり、CPU100のポートで制御される。この
mask_en信号は、マスクカウンタ付きマスク回路
310全体をイネーブルにするかディセーブルにするか
を制御する信号であり、マスクカウンタ付きマスク回路
310を使用しないでBREQを出力する場合は、CP
U100はディセーブル(“L”)になるように制御す
る。
Further, as shown in FIG.
The n signal is a signal input from the CPU 100 to the DMAC 300, and is controlled by a port of the CPU 100. The mask_en signal is a signal for controlling whether to enable or disable the entire mask circuit with a mask counter 310. When the BREQ is output without using the mask circuit with a mask counter 310, the mask_en signal is used.
U100 is controlled to be disabled ("L").

【0120】図14はDMA転送装置の動作を説明する
ためのタイミングチャートである。なお、図中、番号
(1)〜(4)は動作タイミングまたは動作の区間を説明する
ための符号である。
FIG. 14 is a timing chart for explaining the operation of the DMA transfer device. The numbers in the figure
Reference numerals (1) to (4) denote operation timings or operation sections.

【0121】図14のタイミングチャートにおいて、D
REQ1、DREQ2、DREQ3信号が図14の(2)
のタイミングで同時にイネーブルになるものとする。各
CH(CH1、CH2、CH3)のDMA要求の優先度
は、CH1→CH2→CH3→CH1というようなラウ
ンドロビン方式である。
In the timing chart of FIG.
The REQ1, DREQ2, and DREQ3 signals are (2) in FIG.
At the same time. The priority of the DMA request of each CH (CH1, CH2, CH3) is a round robin method such as CH1 → CH2 → CH3 → CH1.

【0122】カウンタ付きマスク回路310のカウンタ
値を“5”に設定した場合を例にする。
A case where the counter value of the mask circuit with counter 310 is set to “5” will be described as an example.

【0123】図14の(1)のタイミングでカウント値
“5”がセットされる。
The count value "5" is set at the timing (1) in FIG.

【0124】次に、図14の(2)のタイミングで、3つ
のDREQ(DREQ1、DREQ2、DREQ3)が
同時にイネーブルになる。ここで、図14の(2)−1の
区間はCH1のDMAが実行されている区間である。
Next, at timing (2) in FIG. 14, three DREQs (DREQ1, DREQ2, DREQ3) are simultaneously enabled. Here, the section (2) -1 in FIG. 14 is a section in which DMA of CH1 is being executed.

【0125】次に、図14の(3)−1のタイミング(B
ACKN信号の立ち上がり)でマスク信号イネーブルに
なり、BREQ信号がマスクされる。カウントの開始
も、(3)−1の地点つまり、BACKN信号が“H”に
なったタイミングで開始される。BREQ信号のマスク
回路は、前記図11のマスク回路313であり、DMA
C300内部のBREQ信号がこのマスク回路313の
マスク信号にてマスクされる。
Next, the timing (B) of (3) -1 in FIG.
The mask signal is enabled at the rising edge of the ACKN signal), and the BREQ signal is masked. The counting is also started at the point (3) -1, that is, at the timing when the BACKN signal becomes “H”. The mask circuit for the BREQ signal is the mask circuit 313 in FIG.
The BREQ signal in C300 is masked by the mask signal of mask circuit 313.

【0126】次に、図14の(4)−1のタイミングでカ
ウンタ値が“0”となり、マスク信号が“L”(ディセ
ーブル)になり、マスクが解除され、BREQN信号が
DMAC300外部に出力される。図14の(2)−2の
区間は、CH2のDMA転送が行われる。
Next, at the timing of (4) -1 in FIG. 14, the counter value becomes "0", the mask signal becomes "L" (disable), the mask is released, and the BREQN signal is output to the outside of the DMAC 300. Is done. In the section (2) -2 in FIG. 14, the DMA transfer of CH2 is performed.

【0127】次に、図14の(3)−2のタイミング(B
ACKN信号の立ち上がり)でマスク信号がイネーブル
になりBREQN信号がマスクされる。このマスク動作
は、前記図11に示したマスク回路313により行われ
る。
Next, the timing (B) of (3) -2 in FIG.
At the rising edge of the ACKN signal), the mask signal is enabled and the BREQN signal is masked. This mask operation is performed by the mask circuit 313 shown in FIG.

【0128】次に、図14の(4)−2のタイミングでカ
ウンタが“0”となり、マスク信号が“L”(ディセー
ブル)になり、マスクが解除され、BREQN信号がD
MAC300外部に出力される。
Next, at the timing of (4) -2 in FIG. 14, the counter becomes "0", the mask signal becomes "L" (disable), the mask is released, and the BREQN signal becomes D.
Output to the outside of the MAC 300.

【0129】このようにして、BREQN信号をマスク
してBREQNが発生する周期を調整している。
In this way, the period in which BREQN is generated is adjusted by masking the BREQN signal.

【0130】以上説明したように、第3の実施形態に係
るDMA転送装置は、DMAC300は、BREQN信
号をマスクするカウンタ付きマスク回路310を備え、
カウンタ付きマスク回路310がBREQN信号をマス
クしてDMA転送によるバス占有状態を制御するように
構成したので、第1及び第2の実施形態と同様の効果を
得ることができる。
As described above, in the DMA transfer device according to the third embodiment, the DMAC 300 includes the mask circuit 310 with a counter for masking the BREQN signal.
Since the mask circuit with counter 310 masks the BREQN signal and controls the bus occupation state by the DMA transfer, the same effect as in the first and second embodiments can be obtained.

【0131】特に、本実施形態によれば、第2の実施形
態のように外部リクエストデバイスから出力されるDR
EQ信号をマスクするのではなく、DMAC300内部
で、BREQN信号をマスクしている。このようにする
と、第2の実施形態のように、各CHごとにマスク回路
を付加するよりも、マスク回路を1個にすることがで
き、第2の実施形態の場合よりもハードウェアを小さく
できる効果がある。
In particular, according to this embodiment, the DR output from the external request device as in the second embodiment
Instead of masking the EQ signal, the DMAC 300 masks the BREQN signal. This makes it possible to reduce the number of mask circuits to one, rather than to add a mask circuit for each CH as in the second embodiment, and to reduce the hardware size compared to the second embodiment. There is an effect that can be done.

【0132】また、BREQN信号をマスクするので、
複数の外部リクエストデバイスからのDREQ信号が頻
繁に重なってきた場合でも、BREQN信号を周期的に
出力するように制御することが可能になり、DMAC3
00によるバス占有率を一定にできる効果がある。 第4の実施形態 図15は本発明の第4の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図5と同一構成部分には
同一符号を付している。
Since the BREQN signal is masked,
Even when DREQ signals from a plurality of external request devices are frequently overlapped, it is possible to control the BREQN signal to be output periodically, and the DMAC 3
00 has the effect of making the bus occupancy constant. Fourth Embodiment FIG. 15 is a block diagram illustrating a configuration of a DMA transfer device according to a fourth embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIG. 5 are denoted by the same reference numerals.

【0133】図15において、DMA転送装置は、CP
U100、DMAC400、複数の外部リクエストデバ
イス(451,452,453,…,N−1,N)、及
び外部メモリ113から構成される。
In FIG. 15, the DMA transfer device has a CP
U100, DMAC400, a plurality of external request devices (451, 452, 453,..., N-1, N), and an external memory 113.

【0134】DMAC400は、複数のDMAチャンネ
ルを搭載しており、それらをCH1,CH2,CH3,
…,CHN−1,CHNとする。また、CH1,CH
2,CH3,…,CHN−1,CHNはそれぞれ、対応
する外部リクエストデバイス(451,452,45
3,…,N−1,N)に接続されている。
The DMAC 400 is equipped with a plurality of DMA channels, and these are assigned to CH1, CH2, CH3,
..., CHN-1, CHN. Also, CH1, CH
, CHN-1, and CHN are the corresponding external request devices (451, 452, and 45, respectively).
3,..., N-1, N).

【0135】DMAC400は、CH1,CH2,CH
3,…,CHN−1,CHNに対応して設置された複数
のDREQ信号マスク回路410,…と、DREQ信号
マスク回路410,…のBREQ信号を調停する調停回
路230とを備える。
The DMAC 400 has CH1, CH2, CH
, CHN-1, CHN-1, and a plurality of DREQ signal mask circuits 410,..., And an arbitration circuit 230 for arbitrating the BREQ signals of the DREQ signal mask circuits 410,.

【0136】外部リクエストデバイス451、外部リク
エストデバイス452、外部リクエストデバイス453
が出力するDREQ信号をそれぞれ、DREQ1、DR
EQ2、DREQ3とし、そのリクエスト信号に対する
DACK信号をそれぞれ、DACK1、DACK2、D
ACK3とする。このとき、外部リクエストデバイス
(N−1),外部リクエストデバイス(N)は、複数個
外部リクエストデバイスがあるという意味で、DMAC
400が対応可能な外部リクエストデバイスの数を示し
ている。外部メモリ113は、DMAシステムのメモリ
であり、DMAシステムのソースデバイスにもなり、デ
ィスティネーションデバイスにもなる。
External request device 451, external request device 452, external request device 453
Respectively output DREQ signals DREQ1 and DR
EQ2 and DREQ3, and DACK signals corresponding to the request signals are DACK1, DACK2 and DACK, respectively.
ACK3. At this time, the external request device (N-1) and the external request device (N) are DMAC in the sense that there are a plurality of external request devices.
400 indicates the number of external request devices that can be supported. The external memory 113 is a memory of the DMA system, and also serves as a source device and a destination device of the DMA system.

【0137】DMAC400内部には、マスクカウンタ
及びマスク回路を内蔵したマスクカウンタ付きマスク回
路(DREQ信号マスク回路)が各チャンネル毎に搭載
されている。このマスク回路は、前記図2及び図3と同
様な回路構成であり、マスクカウンタに対しては、CP
U100がマスク時間に見合ったカウンタ値を設定す
る。
In the DMAC 400, a mask circuit with a mask counter (DREQ signal mask circuit) incorporating a mask counter and a mask circuit is mounted for each channel. This mask circuit has a circuit configuration similar to that of FIG. 2 and FIG. 3 described above.
U100 sets a counter value corresponding to the mask time.

【0138】DMAC400の内部のDRPQ信号の調
停回路230は、各チャンネルから出力されたDREQ
信号を調停し、BREQN信号をCPU100に対して
出力する。調停方法は、第2の実施形態と同様であり、
DREQ信号の入力順番とDREQ信号監視CH(前記
図9の動作説明参照)によりどのDMAシーケンスを行
うか決定する。
The DRPQ signal arbitration circuit 230 inside the DMAC 400 outputs the DREQ signal output from each channel.
It arbitrates the signal and outputs a BREQN signal to CPU 100. The arbitration method is the same as in the second embodiment,
Which DMA sequence is to be performed is determined based on the input sequence of the DREQ signal and the DREQ signal monitoring CH (see the operation description in FIG. 9).

【0139】また、DMAC400からCPU100に
BREQN信号(バス開放リクエスト信号:CPUに対
して、バス権の開放を要求する信号/アクティブ
“L”)が出力され、CPU100からDMAC400
に対してBACKN信号(バス開放許可信号:外部DM
ACに対して、バス権の開放を許可していることを示す
信号/アクティブ“L”)が出力される。
The DMAC 400 outputs a BREQN signal (bus release request signal: a signal requesting release of the bus right to the CPU / active "L") to the CPU 100.
To the BACKN signal (bus release permission signal: external DM
A signal indicating that the release of the bus right is permitted / active "L") is output to the AC.

【0140】以下、上述のように構成されたDMA転送
装置の動作を説明する。
Hereinafter, the operation of the DMA transfer device configured as described above will be described.

【0141】図16はDMA転送装置の動作を説明する
ためのタイミングチャートである。なお、図中、番号
(1)〜(12)は動作タイミングまたは動作の区間を説明す
るための符号である。
FIG. 16 is a timing chart for explaining the operation of the DMA transfer device. The numbers in the figure
Reference numerals (1) to (12) denote operation timings or operation sections.

【0142】外部リクエストデバイス451、外部リク
エストデバイス452、外部リクエストデバイス453
からそれぞれDREQ1、DREQ2、DREQ3信号
が任意のタイミングで同時(図16の(1)、(7)の地点)
に出力された場合の動作について説明する。
External request device 451, external request device 452, external request device 453
, DREQ1, DREQ2, and DREQ3 signals are simultaneously transmitted at arbitrary timings (points (1) and (7) in FIG. 16).
Will be described.

【0143】CPU100は、DMAコントローラ40
0内部のマスクタイマー(Ch1〜ChN)に対してマ
スク時間を設定する。設定値は図17に示す値である。
本実施形態の場合、外部リクエストデバイスの個数が3
個なので、図17に示す表からマスク時間=2μsに設
定する。
[0143] The CPU 100
0 sets a mask time for a mask timer (Ch1 to ChN) inside. The set values are the values shown in FIG.
In the case of this embodiment, the number of external request devices is 3
Therefore, the mask time is set to 2 μs from the table shown in FIG.

【0144】DMAC400は、任意のタイミングにお
いて、1つのチャネルのDMAのみを有効にするため、
チャンネルが有効になる順番をCh1,Ch2,…,C
hNという順序で有効にする。
The DMAC 400 enables DMA of only one channel at an arbitrary timing.
Ch1, Ch2,..., C
Valid in the order of hN.

【0145】図16のタイミングチャートにおいて、
(1)、(7)地点でDREQ1を受けてBREQNが“L”
となり、DMAシーケンスが開始される。このDMAシ
ーケンスが終了したあと、(2)、(8)地点でMASK1信
号がイネーブルになる。マスク時間の設定が2μsであ
るため、2μs分マスクされる。
In the timing chart of FIG.
BREQN is “L” upon receiving DREQ1 at points (1) and (7)
And the DMA sequence is started. After the end of this DMA sequence, the MASK1 signal is enabled at points (2) and (8). Since the setting of the mask time is 2 μs, the mask is masked for 2 μs.

【0146】次に、図16の(3)、(9)のタイミングでD
REQ2を受けて、BREQNが“L”となり、DMA
シーケンスが開始される。図16の(4)、(10)のタイミ
ングでこのDMAシーケンスが終了するが、このタイミ
ングでマスクが開始される。ここでも、マスク時間が2
μs設定であるために、マスクは2μs分行われる。
Next, at timings (3) and (9) in FIG.
Upon receiving REQ2, BREQN becomes “L” and DMA
The sequence starts. The DMA sequence ends at the timings (4) and (10) in FIG. 16, but the masking starts at this timing. Again, the mask time is 2
Because of the μs setting, the mask is performed for 2 μs.

【0147】同様に、図16の(5)、(11)地点のタイミ
ングでDREQ3を受けて、DMAシーケンスが開始さ
れて、(6)、(12)地点でDMAシーケンスが終了し、マ
スクが開始される。この一連の流れにおいて、(6)の地
点と(13)の地点の間に、DMAが行われていない区間が
存在するが、この区間では、CPU100は、そのシス
テムのプログラムに準じた処理を行うことができる。こ
の区間は、DREQのマスクがなければ存在しない区間
である。この区間はDREQ1、DREQ2、DREQ
3の発生周期と、外部リクエストデバイスを搭載する個
数によって、決まってくる。
Similarly, the DREQ 3 is received at the timings of the points (5) and (11) in FIG. 16 to start the DMA sequence, and the DMA sequence ends at the points (6) and (12) and the mask starts. Is done. In this series of flows, a section where DMA is not performed exists between the point (6) and the point (13). In this section, the CPU 100 performs processing according to the program of the system. be able to. This section is a section that does not exist without the DREQ mask. This section is DREQ1, DREQ2, DREQ
3 and the number of mounted external request devices.

【0148】以上説明したように、第4の実施形態に係
るDMA転送装置は、DMAC400側(内部)に、C
H1,CH2,CH3,…,CHN−1,CHNに対応
して設置された複数のDREQ信号マスク回路410,
…と、DREQ信号マスク回路410,…のBREQ信
号を調停する調停回路230とを設け、各チャネル毎に
配置された複数のDREQ信号マスク回路410,…
が、CPU100により外部同時動作するリクエストデ
バイスの数に応じてマスク時間を制御するように構成し
たので、各DMAチャンネルのDMA転送の機会を時間
的に均等に与えることが可能になりDMAチャンネルの
時間的調停が可能になる。
As described above, the DMA transfer device according to the fourth embodiment includes the C
A plurality of DREQ signal mask circuits 410 installed corresponding to H1, CH2, CH3,.
, And an arbitration circuit 230 for arbitrating the BREQ signal of the DREQ signal mask circuits 410,..., And a plurality of DREQ signal mask circuits 410,.
However, since the mask time is controlled by the CPU 100 in accordance with the number of request devices that operate simultaneously externally, the opportunity of DMA transfer of each DMA channel can be given evenly in time. Mediation is possible.

【0149】すなわち、複数の動作可能な外部リクエス
トデバイスが同一のバス上に存在する場合に、システム
としては、DMAC400がバスを占有する時間は自ず
と増加する。つまり、DMAC400によるバス占有率
が増加する。本実施形態では、DREQ信号のマスク時
間を外部リクエストデバイスの同時動作する個数により
制御することで、平均的なDMACのバス占有率を制御
することができ、外部リクエストデバイスが複数存在す
ることによる、システムにおけるDMAC400のバス
占有率の著しい増加を防止することができる効果があ
る。
That is, when a plurality of operable external request devices are present on the same bus, the time for which the DMAC 400 occupies the bus naturally increases as a system. That is, the bus occupancy by the DMAC 400 increases. In the present embodiment, the average DMAC bus occupancy can be controlled by controlling the mask time of the DREQ signal by the number of external request devices that operate simultaneously. There is an effect that a remarkable increase in the bus occupancy of the DMAC 400 in the system can be prevented.

【0150】なお、本実施形態では、DMAC400の
バス占有率制御方法として第2の実施形態の方法を使用
した例を示したが、第1の実施形態の方法に示したよう
に、動作可能な外部リクエストデバイス側で制御するこ
とも、また第3の実施形態の方法でDMAC400のB
REQを制御することによっても実現可能である。 第5の実施形態 図18は本発明の第5の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図15と同一構成部分に
は同一符号を付している。
In the present embodiment, an example is shown in which the method of the second embodiment is used as the bus occupancy control method of the DMAC 400. However, the operation is possible as shown in the method of the first embodiment. The control on the external request device side can also be performed by the method of the third embodiment.
It can also be realized by controlling REQ. Fifth Embodiment FIG. 18 is a block diagram showing a configuration of a DMA transfer device according to a fifth embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIG. 15 are denoted by the same reference numerals.

【0151】図18において、DMA転送装置は、CP
U500、DMAC400、複数の外部リクエストデバ
イス(451,452,453,…,N−1,N)、及
び外部メモリ113から構成される。
In FIG. 18, the DMA transfer device has a CP
U500, DMAC400, a plurality of external request devices (451, 452, 453,..., N-1, N), and an external memory 113.

【0152】CPU500のプログラムの中には、プロ
グラムの処理タスクを管理するタスク管理機能510
(管理手段)が搭載されている。
The program of the CPU 500 includes a task management function 510 for managing a processing task of the program.
(Management means).

【0153】DMAC400は、複数のDMAチャンネ
ルを搭載しており、それらをCH1,CH2,CH3,
…,CHN−1,CHNとする。また、CH1,CH
2,CH3,…,CHN−1,CHNはそれぞれ、対応
する外部リクエストデバイス(451,452,45
3,…,N−1,N)に接続されている。
The DMAC 400 is equipped with a plurality of DMA channels, and these are used as CH1, CH2, CH3,
..., CHN-1, CHN. Also, CH1, CH
, CHN-1, and CHN are the corresponding external request devices (451, 452, and 45, respectively).
3,..., N-1, N).

【0154】DMAC400は、CH1,CH2,CH
3,…,CHN−1,CHNに対応して設置された複数
のDREQ信号マスク回路410,…と、DREQ信号
マスク回路410,…のBREQ信号を調停する調停回
路230とを備える。
The DMAC 400 has CH1, CH2, CH
, CHN-1, CHN-1, and a plurality of DREQ signal mask circuits 410,..., And an arbitration circuit 230 for arbitrating the BREQ signals of the DREQ signal mask circuits 410,.

【0155】外部リクエストデバイス451、外部リク
エストデバイス452、外部リクエストデバイス453
が出力するDREQ信号をそれぞれ、DREQ1、DR
EQ2、DREQ3とし、そのリクエスト信号に対する
DACK信号をそれぞれ、DACK1、DACK2、D
ACK3とする。このとき、外部リクエストデバイス
(N−1),外部リクエストデバイス(N)は、複数個
外部リクエストデバイスがあるという意味で、DMAC
400が対応可能な外部リクエストデバイスの数を示し
ている。外部メモリ113は、DMAシステムのメモリ
であり、DMAシステムのソースデバイスにもなり、デ
ィスティネーションデバイスにもなる。
External request device 451, external request device 452, external request device 453
Respectively output DREQ signals DREQ1 and DR
EQ2 and DREQ3, and DACK signals corresponding to the request signals are DACK1, DACK2 and DACK, respectively.
ACK3. At this time, the external request device (N-1) and the external request device (N) are DMAC in the sense that there are a plurality of external request devices.
400 indicates the number of external request devices that can be supported. The external memory 113 is a memory of the DMA system, and also serves as a source device and a destination device of the DMA system.

【0156】また、CPU500から出力されるmas
k_en1、mask_en2、mask_en3はそ
れぞれDREQ信号マスク回路410,…(DREQ信
号マスク回路CH1、CH2、CH3)のマスクを有効
にする信号である。制御は、CPU500自体がポート
制御により行う。
Also, mas output from CPU 500
k_en1, mask_en2, and mask_en3 are signals for enabling the masks of the DREQ signal mask circuits 410,... (DREQ signal mask circuits CH1, CH2, CH3), respectively. The control is performed by the CPU 500 itself through port control.

【0157】DMAC400の内部のDRPQ信号の調
停回路230は、各チャンネル(CH1/2/3…)の
DREQ信号を調停し、BREQN信号をCPU500
に出力する。調停方法は、第2の実施形態と同様であ
る。
The DRPQ signal arbitration circuit 230 in the DMAC 400 arbitrates the DREQ signal of each channel (CH1 / 2/3...) And sends the BREQN signal to the CPU 500.
Output to The arbitration method is the same as in the second embodiment.

【0158】また、DMAC400からCPU500に
BREQN信号(バス開放リクエスト信号:アクティブ
“L”)が出力され、また、このBREQN信号に応答
して、CPU500は、DMAC400に対して、BA
CKN信号(バス開放許可信号:アクティブ“L”)を
出力する。
A BREQN signal (bus release request signal: active “L”) is output from the DMAC 400 to the CPU 500. In response to the BREQN signal, the CPU 500 sends a BA signal to the DMAC 400.
The CKN signal (bus release permission signal: active "L") is output.

【0159】以下、上述のように構成されたDMA転送
装置の動作を説明する。
The operation of the thus configured DMA transfer device will be described below.

【0160】CPU500は、通常プログラムに則って
処理をしているが、処理するタスクによっては、CPU
に対する処理負荷が異なっている。CPU500の内部
にあるタスク管理機能510は、現在何のタスクを処理
しているかを常に監視し、その情報を保持する機能をも
つものである。このタスク管理機能510はソフトウェ
アにより実現されている。
[0160] The CPU 500 normally performs processing in accordance with a program.
Are different in processing load. The task management function 510 provided inside the CPU 500 has a function of constantly monitoring what task is currently being processed and retaining the information. This task management function 510 is realized by software.

【0161】まず、プログラム上のタスク名T1〜T1
0とその処理負荷と対応するマスク時間の関係を図19
の表に示す。
First, task names T1 to T1 on the program
FIG. 19 shows the relationship between 0 and its processing load and the corresponding mask time.
Is shown in the table.

【0162】図19に示すように、CPU500は、タ
スクをT1,T2,T3,…,T10,T1,…の順番
で処理していくようなプログラムになっている。
As shown in FIG. 19, the CPU 500 is a program for processing tasks in the order of T1, T2, T3,..., T10, T1,.

【0163】以下、DREQ1が連続して発生する時の
DREQ1のイネーブル間隔が1μsである場合を例に
挙げて説明する。
Hereinafter, a case where the enable interval of DREQ1 is 1 μs when DREQ1 is continuously generated will be described as an example.

【0164】図20はDMA転送装置の動作を説明する
ためのタイミングチャートである。
FIG. 20 is a timing chart for explaining the operation of the DMA transfer device.

【0165】まず、図20に示すように、タスクT1が
処理されている最中は、マスク時間が1μsにセットさ
れている(図19の表参照)。このときDREQ1信号
がイネーブルされた場合、必ず1μs分DREQ1信号
がDMAC400内部のマスクでマスクされて、DMA
転送が行われる。この場合は、マスク設定時間が1μs
であったが、DREQ1のイネーブル間隔が1μsであ
るために、マスクタイマが有効であってもまったく効果
がない。
First, as shown in FIG. 20, while the task T1 is being processed, the mask time is set to 1 μs (see the table in FIG. 19). At this time, if the DREQ1 signal is enabled, the DREQ1 signal is always masked by the mask inside the DMAC 400 for 1 μs,
A transfer is performed. In this case, the mask setting time is 1 μs
However, since the enable interval of DREQ1 is 1 μs, there is no effect even if the mask timer is valid.

【0166】次に、タスクT2が処理されている最中に
ついて説明する。このときは、マスク時間が2μsにセ
ットされている(図19の表参照)。このとき、DRE
Q1信号がイネーブルされた場合、必ず2μs分DRE
Q1信号がDMAC400内部のDREQ信号マスク回
路410でマスクされ、DMA転送が行われる。この場
合は、DREQのイネーブル間隔が1μsであるのに対
し、マスク設定時間が2μsであったため、マスクの効
果が1μs出すことができたことになる。
Next, a description will be given of a state where the task T2 is being processed. At this time, the mask time is set to 2 μs (see the table in FIG. 19). At this time, DRE
When the Q1 signal is enabled, the DRE must be 2 μs.
The Q1 signal is masked by the DREQ signal mask circuit 410 inside the DMAC 400, and DMA transfer is performed. In this case, since the enable interval of DREQ is 1 μs, whereas the mask setting time is 2 μs, the effect of the mask can be obtained 1 μs.

【0167】同様にして、タスクT3の場合は、マスク
の効果が2μs、タスクT4の場合は3μsだけマスク
の効果が出てくる。
Similarly, in the case of the task T3, the mask effect appears for 2 μs, and in the case of the task T4, the mask effect appears for 3 μs.

【0168】各チャンネル毎に上記動作を行う。また、
各チャンネルの調停動作は第2の実施形態と同様であ
る。
The above operation is performed for each channel. Also,
The arbitration operation of each channel is the same as in the second embodiment.

【0169】以上説明したように、第5の実施形態に係
るDMA転送装置は、CPU500が、プログラムの処
理タスクを管理するタスク管理機能510を備え、CP
Uの処理負荷に応じてマスク時間を制御するように構成
したので、以下のような効果を得ることができる。
As described above, in the DMA transfer device according to the fifth embodiment, the CPU 500 has the task management function 510 for managing the processing task of the program, and
Since the mask time is controlled in accordance with the processing load of U, the following effects can be obtained.

【0170】すなわち、CPU処理(タスク)が複雑で
あり、しかも、所定の時間内に処理を完了させなければ
ならないタスクがシステム上に多くある場合、DMAC
から出力されるBREQ信号はそのCPU処理を時間的
に非効率的にしてしまうことがある。このとき、本実施
形態のように、タスクごとのDREQ信号のマスク動作
を行うことで、CPU処理を所定の時間内に完了させる
ことを遂行することができ、システム上のCPUの時間
的処理能力の低下を防止することができる効果がある。
That is, if the CPU processing (task) is complicated and there are many tasks in the system which must be completed within a predetermined time, the DMAC
The BREQ signal output from the CPU may make the CPU processing inefficient in time. At this time, by performing the masking operation of the DREQ signal for each task as in the present embodiment, it is possible to complete the CPU processing within a predetermined time, and the temporal processing capability of the CPU on the system This has the effect of preventing a decrease in

【0171】なお、本実施形態では、DMACの動作を
第2の実施形態の方法を制御したが、第1の実施形態に
示したように、外部リクエストデバイス側で制御する方
法でも、また第3の実施形態に示したように、DMAC
内部のBREQ信号を制御する方法でも実現可能であ
る。 第6の実施形態 図21は本発明の第6の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図5と同一構成部分には
同一符号を付している。
In this embodiment, the operation of the DMAC is controlled by the method of the second embodiment. However, as shown in the first embodiment, the operation of the DMAC is controlled by the external request device, As shown in the embodiment, the DMAC
It can also be realized by a method of controlling the internal BREQ signal. Sixth Embodiment FIG. 21 is a block diagram illustrating a configuration of a DMA transfer device according to a sixth embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIG. 5 are denoted by the same reference numerals.

【0172】図21において、DMA転送装置は、CP
U100、DMAC600、外部リクエストデバイス6
50及び外部メモリ113から構成され、DMAC60
0は、DREQ信号マスク回路610(マスク手段)
と、DREQ信号の発生周期を検出するDREQ周期検
出回路620(DREQ周期検出手段)とを備えて構成
される。
In FIG. 21, the DMA transfer device has a CP
U100, DMAC600, external request device 6
50 and an external memory 113.
0 is a DREQ signal mask circuit 610 (mask means)
And a DREQ cycle detection circuit 620 (DREQ cycle detection means) for detecting a generation cycle of the DREQ signal.

【0173】外部リクエストデバイス650からDMA
C600にDREQ信号が出力され、DMAC600か
ら外部リクエストデバイス650にDACK信号が出力
される。
[0173] DMA from external request device 650
The DREQ signal is output to C600, and the DACK signal is output from DMAC 600 to external request device 650.

【0174】DMAC600からCPU100にBRE
Q信号が出力され、CPU100からDMAC600に
BACK信号が出力される。
BRE from DMAC 600 to CPU 100
The Q signal is output, and a BACK signal is output from the CPU 100 to the DMAC 600.

【0175】また、外部メモリ113は、DMA転送の
ソースデバイス(または、ディスティネーションデバイ
ス)になる。
The external memory 113 is a source device (or a destination device) for DMA transfer.

【0176】CPU100から出力されるmask_e
n信号は、DREQ信号マスク回路610を有効にする
信号である。
Mask_e output from CPU 100
The n signal is a signal that enables the DREQ signal mask circuit 610.

【0177】CPU100は、このマスク信号mask
_enをDREQ信号マスク回路610に出力してDR
EQ信号マスク回路610を制御する。
The CPU 100 sets the mask signal mask
_En to the DREQ signal mask circuit 610 to output DR
The EQ signal mask circuit 610 is controlled.

【0178】図22は上記DREQ周期検出回路620
の回路構成を示す図である。
FIG. 22 shows the DREQ cycle detection circuit 620.
FIG. 3 is a diagram showing a circuit configuration of FIG.

【0179】図22において、DREQ周期検出回路6
20は、DREQ信号を入力してDREQ信号のエッジ
を論理的に検出するエッジ検出回路621、サンプリン
グクロックの立ち上がりエッジでカウント(デクリメン
ト)するカウンタ622、及びカウントデータを格納す
るデータバッファ623から構成される。
In FIG. 22, DREQ cycle detection circuit 6
Reference numeral 20 denotes an edge detection circuit 621 which receives a DREQ signal and logically detects an edge of the DREQ signal, a counter 622 which counts (decrements) at a rising edge of a sampling clock, and a data buffer 623 which stores count data. You.

【0180】データバッファ623は、カウンタ623
の結果をCPU100(図21)がリードできるように
データを保持しておくバッファである。
The data buffer 623 has a counter 623
Is a buffer for storing data so that the CPU 100 (FIG. 21) can read the result of (1).

【0181】以下、上述のように構成されたDMA転送
装置の動作を説明する。
The operation of the above-configured DMA transfer device will be described below.

【0182】図23はDREQ周期検出回路620の動
作を示すタイミングチャートである。
FIG. 23 is a timing chart showing the operation of DREQ cycle detection circuit 620.

【0183】まず、外部リクエストデバイス650から
DREC信号がDMAC600に入力され、その入力信
号が内部のDREQ周期検出回路620に入力される。
First, the DREC signal is input from the external request device 650 to the DMAC 600, and the input signal is input to the internal DREQ cycle detection circuit 620.

【0184】DREQ周期検出回路620の内部回路に
おいては、図23のタイミングチャートに示すように、
エッジ検出部621がDREQ信号の立ち上がりエッジ
を検出し、検出したパルスをトリガとして、カウンタ6
22がカウントを開始する。このカウントは次のDRE
Q信号のエッジまでカウントする。
In the internal circuit of DREQ cycle detection circuit 620, as shown in the timing chart of FIG.
The edge detector 621 detects the rising edge of the DREQ signal, and the detected pulse is used as a trigger to trigger the counter 6
22 starts counting. This count is the next DRE
Count up to the edge of the Q signal.

【0185】カウンタ622によりカウントされたカウ
ントデータは、データバッファ623に転送され、カウ
ント終了後はデータバッファ623はそのデータを保持
している。
The count data counted by the counter 622 is transferred to the data buffer 623, and after the count is completed, the data buffer 623 holds the data.

【0186】図24はDMA転送装置の動作を説明する
ためのタイミングチャートである。
FIG. 24 is a timing chart for explaining the operation of the DMA transfer device.

【0187】CPU100は、データバッファ623の
カウントデータを任意のタイミングで読み出し、そのデ
ータに従ってCPUのポートにより、mask_en信
号のイネーブル/ディセーブルの操作を行う。すなわ
ち、CPU100は、読み出したカウントデータが小さ
ければmask_en信号をイネーブルにしている時間
を長くする。
The CPU 100 reads out the count data of the data buffer 623 at an arbitrary timing, and performs an operation of enabling / disabling the mask_en signal by a port of the CPU according to the data. That is, if the read count data is small, the CPU 100 increases the time in which the mask_en signal is enabled.

【0188】図24に示すように、mask_en信号
がイネーブルの場合、DREQ信号は一定期間(区間)
マスクされ、マスク解除後、mask_en信号がディ
セーブルとなりBREQ信号となってCPU100に出
力される。
As shown in FIG. 24, when the mask_en signal is enabled, the DREQ signal is kept for a certain period (section).
After being masked and unmasked, the mask_en signal is disabled and becomes a BREQ signal to be output to the CPU 100.

【0189】BREQ信号を受け付けたCPU100
は、バス権を開放したことを知らせるためにBACK信
号を出力する。
CPU 100 receiving BREQ signal
Outputs a BACK signal to notify that the bus right has been released.

【0190】図24に示すように、mask_en信号
がディセーブルの区間は、BREQ信号の発生間隔が短
くなっているが、mask_en信号がイネーブルの区
間はBREQの発生間隔がディセーブルの区間に比べて
長くなっているのがわかる。この区間(マスク効果が出
ている区間)では、CPU100がプログラムに従って
処理している区間である。
As shown in FIG. 24, the interval in which the BREQ signal is generated is shorter in the period in which the mask_en signal is disabled, but the interval in which the mask_en signal is enabled is shorter than that in the period in which the BREQ signal is disabled. You can see that it is getting longer. This section (section in which the mask effect is generated) is a section in which the CPU 100 performs processing according to the program.

【0191】以上説明したように、第6の実施形態に係
るDMA転送装置は、DMAC600が、DREQ信号
マスク回路610と、DREQ信号の発生周期を検出す
るDREQ周期検出回路620とを備え、DREQ周期
検出回路620が入力されるDREQ信号の発生周期を
検出し、そのカウンタデータ値を利用してDREQ信号
をマスクするように構成したので、DMAの周期(間
隔)を広げることができ、しかも、DMAC600によ
る、システムにおけるバス占有率を低減するという効果
がある。
As described above, in the DMA transfer apparatus according to the sixth embodiment, the DMAC 600 includes the DREQ signal mask circuit 610 and the DREQ cycle detection circuit 620 for detecting the generation cycle of the DREQ signal. Since the detection circuit 620 detects the generation cycle of the input DREQ signal and masks the DREQ signal by using the counter data value, the DMA cycle (interval) can be extended, and the DMAC 600 Has the effect of reducing the bus occupancy in the system.

【0192】また、この方法を使用すれば、DMA転送
のスピードをCPU100によって制御することが可能
になるため、DREQ信号発生周期が変動するI/O装
置(外部リクエストデバイス)がバス上に存在する場
合、同じ周期でBREQ信号を発生させ、バス占有率を
低減させる効果がある。
Further, if this method is used, the speed of the DMA transfer can be controlled by the CPU 100. Therefore, an I / O device (external request device) whose DREQ signal generation cycle varies exists on the bus. In this case, the BREQ signal is generated at the same cycle, and the bus occupancy is reduced.

【0193】なお、本実施形態においては、DMACの
動作を第2の実施形態の方法で制御したが、第1の実施
形態の方法に示したように、動作可能な外部リクエスト
デバイス側で制御することも、また第3の実施形態の方
法に示したようにDMAC内部のBREQを制御する方
法でも実現可能である。 第7の実施形態 図25は本発明の第7の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図21と同一構成部分に
は同一符号を付している。
In this embodiment, the operation of the DMAC is controlled by the method of the second embodiment. However, as shown in the method of the first embodiment, the operable external request device controls the DMAC. This can also be realized by a method of controlling the BREQ inside the DMAC as shown in the method of the third embodiment. Seventh Embodiment FIG. 25 is a block diagram showing a configuration of a DMA transfer device according to a seventh embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIG. 21 are denoted by the same reference numerals.

【0194】図25において、DMA転送装置は、CP
U100、DMAC700、外部リクエストデバイス7
51、外部リクエストデバイス752及び外部メモリ1
13から構成され、DMAC700は、BREQN信号
マスク回路720(マスク手段)と、動作を許可する複
数の外部リクエストデバイスのDREQ信号に伴い発生
するBREQN信号の発生周期を検出するBREQN周
期検出回路720(BREQN周期検出手段)とを備え
て構成される。
Referring to FIG. 25, the DMA transfer device
U100, DMAC700, external request device 7
51, external request device 752 and external memory 1
The DMAC 700 comprises a BREQN signal masking circuit 720 (masking means) and a BREQN cycle detecting circuit 720 (BREQN) for detecting the generation cycle of the BREQN signal generated in response to the DREQ signals of a plurality of external request devices that permit the operation. Period detecting means).

【0195】DMAC700は、複数の(2つの)DM
Aチャンネルを搭載しており、それらをCH1,CH2
とする。また、CH1,CH2はそれぞれ、外部リクエ
ストデバイス751、外部リクエストデバイス752に
接続されている。
The DMAC 700 has a plurality of (two) DMs.
A channel is installed, and those are CH1, CH2
And Further, CH1 and CH2 are connected to an external request device 751 and an external request device 752, respectively.

【0196】外部リクエストデバイス751のDMAチ
ャンネルをCH1、外部リクエストデバイス752のD
MAチャンネルをCH2とする。
The DMA channel of the external request device 751 is set to CH1, and the DMA channel of the external request device 752 is set to D1.
Let the MA channel be CH2.

【0197】図25の破線に示すように、CH1,CH
2毎に、外部リクエストデバイス751、外部リクエス
トデバイス752からDMAC700に対してDMA要
求信号DREQ1,DREQ2(アクテイブ“H”)が
出力され、また、DMAC700から外部リクエストデ
バイス751、外部リクエストデバイス752に対して
DMA許可信号DACK1,DACK2が出力される。
As shown by the broken lines in FIG.
The DMAC 700 outputs DMA request signals DREQ1 and DREQ2 (active “H”) to the DMAC 700 from the external request device 751 and the external request device 752 for each of the external request devices 751 and 752. DMA permission signals DACK1 and DACK2 are output.

【0198】DMAC700は、CPU100に対して
バス開放リクエスト信号BREQN(アクティブ
“L”)を出力し、CPU100は、DMAC700に
対してバス開放許可信号BACKN(アクティブ
“L”)を出力する。
The DMAC 700 outputs a bus release request signal BREQN (active "L") to the CPU 100, and the CPU 100 outputs a bus release permission signal BACKN (active "L") to the DMAC 700.

【0199】また、CPU100からDMAC700に
出力されるmask_en信号は、CPU100のポー
トから出力される信号であり、BREQNマスク回路7
20のカウンタ回路をイネーブルにする信号(アクティ
ブ“H”)である。
The mask_en signal output from the CPU 100 to the DMAC 700 is a signal output from the port of the CPU 100, and is output from the BREQN mask circuit 7
This is a signal (active “H”) for enabling the 20 counter circuits.

【0200】図26は上記BREQN信号周期検出回路
720の回路構成を示す図である。
FIG. 26 is a diagram showing a circuit configuration of the BREQN signal cycle detection circuit 720.

【0201】図26において、BREQN信号周期検出
回路720は、BREQN信号を入力してBREQN信
号のエッジを論理的に検出するエッジ検出回路721、
サンプリングクロックの立ち上がりエッジでカウント
(デクリメント)するカウンタ722、及びカウントデ
ータを格納するデータバッファ723から構成される。
Referring to FIG. 26, a BREQN signal cycle detecting circuit 720 receives an BREQN signal and logically detects an edge of the BREQN signal.
The counter 722 counts (decrements) at the rising edge of the sampling clock, and the data buffer 723 stores count data.

【0202】エッジ検出回路721からカウントパルス
がカウンタに対して出力され、カウンタ722から、カ
ウントデータがデータバッファ723に転送される。
A count pulse is output from the edge detection circuit 721 to the counter, and the count data is transferred from the counter 722 to the data buffer 723.

【0203】データバッファ723は、カウンタ723
の結果をCPU100(図25)がリードできるように
データを保持しておくバッファである。
The data buffer 723 includes a counter 723
Is a buffer for storing data so that the CPU 100 (FIG. 25) can read the result of (1).

【0204】以下、上述のように構成されたDMA転送
装置の動作を説明する。
Hereinafter, the operation of the DMA transfer device configured as described above will be described.

【0205】図27はBREQN信号周期検出回路72
0の動作を示すタイミングチャートであり、図28はD
MA転送装置の動作を説明するためのタイミングチャー
トである。
FIG. 27 shows a BREQN signal cycle detection circuit 72.
FIG. 28 is a timing chart showing the operation of D.
5 is a timing chart for explaining the operation of the MA transfer device.

【0206】まず、CH1とCH2のDMA転送の優先
度は、本実施形態の場合、CH1→CH2→CH1→C
H2のようにラウンドするラウンドロビン型をとるもの
とする。同時にDREQ(要求信号)がDMAC700
に入力された場合は、CH1優先とし、その他の場合
は、時間的に先にDREQ(要求信号)が入ってきた方
を優先とする。
First, in this embodiment, the priority of the DMA transfer of CH1 and CH2 is CH1 → CH2 → CH1 → C
A round robin type that performs a round like H2 is taken. At the same time, DREQ (request signal) is
, The priority is given to CH1. In other cases, the priority is given to the one in which the DREQ (request signal) comes earlier in time.

【0207】DREQ1とDREQ2が同時に図28の
(1)の地点でアクティブになっている場合を例にする。
このとき、DMAは、CH1のDMAが行われる。
DREQ1 and DREQ2 are simultaneously set in FIG.
Let's take the case where it is active at point (1) as an example.
At this time, the DMA of CH1 is performed.

【0208】次に、図28の(2)の地点で、CH2のD
MAが行われる。このとき、図28の(1)と(2)のBRE
QN信号の立ち下がりエッジで、図26に示すBREQ
N信号周期検出回路720が動作し、カウンタ722が
動作する。そして、図27のタイミングチャートに示す
ように、カウントデータがデータバッファ723に転送
される。
Next, at the point (2) in FIG.
MA is performed. At this time, the BRE of (1) and (2) of FIG.
At the falling edge of the QN signal, the BREQ signal shown in FIG.
The N signal period detection circuit 720 operates, and the counter 722 operates. Then, as shown in the timing chart of FIG. 27, the count data is transferred to the data buffer 723.

【0209】また、図28の(3)の地点でCH1のDM
Aが実行されるが、このときも、BREQN信号周期検
出回路720により図28の(2)と(3)のBREQNのエ
ッジからエッジの間のカウントが行われる。この時のカ
ウントデータも、データバッファ723に上書きされ
る。
At the point (3) in FIG. 28, the DM of CH1 is
A is performed, but also at this time, the BREQN signal period detection circuit 720 counts between the edges of the BREQN in (2) and (3) of FIG. The count data at this time is also overwritten in the data buffer 723.

【0210】図28の(3)のDMA転送終了した時点で
CPU100は、データバッファ723のデータをリー
ドする。このリードした値で、DMAC700のBRE
QN信号の発生周期をCPU100が認識することがで
きる。
When the DMA transfer of (3) in FIG. 28 is completed, the CPU 100 reads the data in the data buffer 723. With this read value, the BRE of DMAC700
The CPU 100 can recognize the generation cycle of the QN signal.

【0211】次に、図28の(4)−1の地点、つまりB
ACKN信号が“H”になった時点で、CPU100
は、mask_en1信号を“H”にする。mask_
en1を“H”にした時点で、BREQN信号は、マス
クされていて、DREQ1、DREQ2が入力されて
も、BREQN信号は外部に出力されない(図28のマ
スク効果が出ている区間参照)。
Next, point (4) -1 in FIG.
When the ACKN signal becomes “H”, the CPU 100
Sets the mask_en1 signal to “H”. mask_
When en1 is set to "H", the BREQN signal is masked, and even if DREQ1 and DREQ2 are input, the BREQN signal is not output to the outside (see the section in FIG. 28 where the mask effect is obtained).

【0212】図28の(4)−2、(4)−3地点でも同様で
ある。
The same applies to points (4) -2 and (4) -3 in FIG.

【0213】CPU100がmask_en1を“H”
にする時間は、先にリードしたBREQ信号の発生周期
の値をもとに制御する。例えば、データバッファ723
からリードした数値が極端に短かかった場合は、mas
k_en1を“H”にしている時間を長くして、DMA
C100によるバス占有率を低下させ、逆に、データバ
ッファ723からリードした数値が極端に長かった場合
には、mask_en1信号を“H”にする時間を短め
に制御することが可能である。
[0213] The CPU 100 sets the mask_en1 to "H".
Is controlled based on the value of the generation cycle of the previously read BREQ signal. For example, the data buffer 723
If the value read from is extremely short, mas
The time during which k_en1 is kept at “H” is increased, and DMA
If the bus occupancy by C100 is reduced and, conversely, the value read from the data buffer 723 is extremely long, it is possible to control the time for which the mask_en1 signal is set to "H" to be shorter.

【0214】このように、BREQの発生周期をCPU
100が認識することで装置のDMAC700によるバ
ス占有率をCPU100が制御することが可能である。
As described above, the generation cycle of BREQ is determined by the CPU.
The CPU 100 can control the bus occupancy of the device by the DMAC 700 by the recognition by the CPU 100.

【0215】以上説明したように、第7の実施形態に係
るDMA転送装置は、DMAC700が、BREQN信
号マスク回路720と、動作を許可する複数の外部リク
エストデバイスのDREQ信号に伴い発生するBREQ
N信号の発生周期を検出するBREQN周期検出回路7
20とを備え、BREQN信号周期検出回路720は、
BREQN信号を入力してBREQN信号のエッジを論
理的に検出するエッジ検出回路721、サンプリングク
ロックの立ち上がりエッジでカウント(デクリメント)
するカウンタ722、及びカウントデータを格納するデ
ータバッファ723により構成したので、BREQN信
号の発生周期(発生間隔)をBREQNの信号のエッジ
を使用してカウントし、カウントデータをデータバッフ
ァ723に保持しておくことで、CPU100が、DM
AC700から入力されるBREQの発生周期を認識す
ることできるようになり、CPU100によって、DM
AC700によるバス占有率を制御することが可能にな
る。
As described above, in the DMA transfer device according to the seventh embodiment, in the DMAC 700, the DMAC 700 includes the BREQN signal mask circuit 720 and the BREQ signal generated in accordance with the DREQ signals of a plurality of external request devices permitted to operate.
BREQN cycle detection circuit 7 for detecting the generation cycle of N signal
20. The BREQN signal cycle detection circuit 720 includes:
An edge detection circuit 721 that inputs a BREQN signal and logically detects an edge of the BREQN signal, and counts (decrements) at a rising edge of a sampling clock.
And the data buffer 723 for storing count data, the generation cycle (generation interval) of the BREQN signal is counted using the edge of the BREQN signal, and the count data is held in the data buffer 723. In this case, the CPU 100
The generation cycle of the BREQ input from the AC 700 can be recognized.
It is possible to control the bus occupancy by the AC 700.

【0216】また、第6の実施形態のように、CH(チ
ャンネル)ごとに、DREQの発生周期を検出するDR
EQ周期検出回路620を搭載すると、外部リクエスト
デバイスを多数搭載したときに、DREQ周期検出回路
を構成するカウンタや、データバッファを新規にCHご
とに追加する必要がある。本実施形態によれば、BRE
QN信号に対して、BREQN周期検出回路720を搭
載しているために、外部リクエストデバイスが多数搭載
されても、BREQN周期検出回路を構成するカウンタ
やデータバッファは1個のみで済むので、ハードウェア
の規模を小さくできる効果がある。
Further, as in the sixth embodiment, the DR for detecting the generation cycle of DREQ for each CH (channel) is used.
When the EQ cycle detection circuit 620 is mounted, when a large number of external request devices are mounted, it is necessary to newly add a counter and a data buffer constituting the DREQ cycle detection circuit for each CH. According to the present embodiment, the BRE
Since the BREQN cycle detection circuit 720 is provided for the QN signal, even if a large number of external request devices are mounted, only one counter or data buffer is required to configure the BREQN cycle detection circuit. This has the effect of reducing the size of the device.

【0217】なお、本実施形態では、第3の実施形態の
方法でDMACの動作を制御したが、制御の方法はCP
Uによる制御でも、マスク回路にハード的なタイマーを
設けて、ハードでマスクすることも可能である。また、
第1の実施形態の方法に示したように、動作可能な外部
リクエストデバイス側で制御することも、第2の実施形
態の方法に示したように、DMAC側で制御することも
可能である。 第8の実施形態 図29は本発明の第8の実施形態に係るDMA転送装置
の構成を示すブロック図である。本実施形態に係るDM
A転送装置の説明にあたり前記図18及び図21と同一
構成部分には同一符号を付している。
In the present embodiment, the operation of the DMAC is controlled by the method of the third embodiment.
Even with the control by U, it is also possible to provide a hardware timer in the mask circuit and perform the masking with hardware. Also,
The control can be performed on the operable external request device side as shown in the method of the first embodiment, or the DMAC side can be controlled as shown in the method of the second embodiment. Eighth Embodiment FIG. 29 is a block diagram showing a configuration of a DMA transfer device according to an eighth embodiment of the present invention. DM according to the present embodiment
In the description of the A transfer device, the same components as those in FIGS. 18 and 21 are denoted by the same reference numerals.

【0218】図29において、DMA転送装置は、CP
U800(設定手段)、DMAC600、外部リクエス
トデバイス650及び外部メモリ113から構成され、
DMAC600は、DREQ信号マスク回路610と、
DREQ周期検出回路620とを備えて構成される。
In FIG. 29, the DMA transfer device
U800 (setting means), DMAC 600, external request device 650 and external memory 113,
The DMAC 600 includes a DREQ signal mask circuit 610,
And a DREQ cycle detection circuit 620.

【0219】CPU800のプログラムの中には、プロ
グラムの処理タスクを管理するタスク管理機能810
(管理手段)が搭載されている。このタスク管理機能8
10はソフトウェアにより実現されている。
The program of the CPU 800 includes a task management function 810 for managing a processing task of the program.
(Management means). This task management function 8
10 is realized by software.

【0220】DMAC600は、外部リクエストデバイ
ス650からDREQ信号が入力され、マスクイネーブ
ルの場合はDREQ信号をmask_en信号の区間分
だけマスクしてBREQN信号をCPU800に対して
出力する。CPU800がバス権を開放したときにBA
CKN信号がDMAC600に出力される。
The DMAC 600 receives the DREQ signal from the external request device 650, and masks the DREQ signal for the period of the mask_en signal to output the BREQN signal to the CPU 800 when masking is enabled. BA when CPU 800 releases the bus right
The CKN signal is output to DMAC 600.

【0221】そのBACKN信号を受けてDMAC60
0は、外部リクエストデバイス650に対して、DAC
K信号を出力する。
Upon receiving the BACKN signal, DMAC 60
0 is the DAC to the external request device 650
Outputs K signal.

【0222】DREQ周期検出回路620は、第6の実
施形態の図22と同じ回路構成である。
The DREQ cycle detection circuit 620 has the same circuit configuration as that of the sixth embodiment shown in FIG.

【0223】以下、上述のように構成されたDMA転送
装置の動作を説明する。
Hereinafter, the operation of the DMA transfer device configured as described above will be described.

【0224】まず、システム全体のバス負荷率を規定す
る。説明を簡単にするために、本実施形態ではシステム
全体のバス負荷率を12%以下とする。また、外部リク
エストデバイス650のDREQ信号発生間隔を5μs
とし、1回(Word分)のDMA転送のバス占有率を
10%とする。これによりDMAでバスを占有する時間
=500nsとなる。
First, the bus load factor of the entire system is defined. For simplicity, in the present embodiment, the bus load factor of the entire system is set to 12% or less. Further, the DREQ signal generation interval of the external request device 650 is set to 5 μs.
It is assumed that the bus occupancy of one DMA transfer is 10%. As a result, the time for occupying the bus in the DMA becomes 500 ns.

【0225】まず、プログラム上のタスク名T1〜T1
0とその処理負荷と対応するマスク時間及びDMACの
負荷率の関係を図30の表に示す。
First, task names T1 to T1 on the program
FIG. 30 shows the relationship between 0, the processing load, the mask time corresponding to the processing load, and the load factor of the DMAC.

【0226】図30に示すように、本実施形態は、タス
クT1〜T10を使って処理するシステムであり、その
中のT1,T3,T5,T7を図31に示すタイミング
チャートのような順序でタスク処理していく場合を考え
る。
As shown in FIG. 30, the present embodiment is a system for processing using tasks T1 to T10, in which T1, T3, T5 and T7 are arranged in the order shown in the timing chart of FIG. Consider the case where task processing is performed.

【0227】図31はDMA転送装置の動作を説明する
ためのタイミングチャートである。
FIG. 31 is a timing chart for explaining the operation of the DMA transfer device.

【0228】まず、DREQ信号がタスクT1区間で入
力される。この場合、図30の表から計算すると、合計
のバス占有率が11%となり、本実施形態の占有率12
%を超えることはない。そのためマスク回路を動作させ
る必要はないために、mask_en信号はディセーブ
ルのままで、何ら問題がない。よってDREQ信号と同
じ周期でBREQ信号が発生する。
First, the DREQ signal is input in the section of task T1. In this case, when calculated from the table in FIG. 30, the total bus occupancy is 11%, and the occupancy 12
% Will not be exceeded. Therefore, since there is no need to operate the mask circuit, the mask_en signal remains disabled and there is no problem. Therefore, the BREQ signal is generated in the same cycle as the DREQ signal.

【0229】次に、タスクT3区間でDREQ信号が発
生した場合、図30の表とDMAのバス占有率から計算
すると13%となってしまう。本実施形態のバスの占有
率は12%以下であるため、問題が生じる。このような
ことが起きないように、処理がタスクT3に入った場合
にmask_en信号を図31に示すタイミングで出力
するようにCPU800がコントロールする。このと
き、DREQ信号はmask_en信号によりマスクさ
れてBREQ信号としてCPU800に出力される。こ
のBREQ信号によってCPU800はバス権を開放す
るためにBACK信号を出力する。このようなやり取り
でDMA転送のシーケンスを実行する。
Next, when the DREQ signal is generated in the section of the task T3, it becomes 13% when calculated from the table in FIG. 30 and the bus occupancy of the DMA. Since the bus occupancy of this embodiment is 12% or less, a problem occurs. To prevent this from occurring, the CPU 800 controls the mask_en signal to be output at the timing shown in FIG. 31 when the process enters the task T3. At this time, the DREQ signal is masked by the mask_en signal and output to the CPU 800 as a BREQ signal. In response to the BREQ signal, the CPU 800 outputs a BACK signal to release the bus right. The DMA transfer sequence is executed by such exchange.

【0230】次に、タスクT5区間にDREQ信号が入
力された場合を説明する。
Next, the case where the DREQ signal is input in the section of task T5 will be described.

【0231】この場合はタスクT3の場合と同様にバス
占有率を計算すると15%になってしまう。これもま
た、本実施形態のバス占有率12%以下を満たしていな
いので、この条件を満たすために、図30の表を使用し
てマスク時間を設定する。
In this case, when the bus occupancy is calculated in the same manner as in the case of the task T3, it becomes 15%. Since this also does not satisfy the bus occupancy of 12% or less in the present embodiment, the mask time is set using the table of FIG. 30 to satisfy this condition.

【0232】この表によればT5の場合は、mask_
enがイネーブルの時間が2.14μs+5μsとな
り、バス占有率が12%以下になる。この時のマスク時
間を満たすようにCPU800がmask_enを制御
する。
According to this table, in the case of T5, mask_
The time during which en is enabled is 2.14 μs + 5 μs, and the bus occupancy is 12% or less. The CPU 800 controls the mask_en so as to satisfy the mask time at this time.

【0233】同様に、タスクT7の場合も図30の表か
らマスク時間を設定して、本実施形態で設定したバス占
有率12%以下になるようにmask_en時間を決
め、このマスク時間を満たすようにCPU800がma
sk_enを制御する。
Similarly, in the case of the task T7, the mask time is set from the table of FIG. 30, the mask_en time is determined so that the bus occupancy set in this embodiment is 12% or less, and the mask time is satisfied. CPU 800 is ma
sk_en is controlled.

【0234】以上説明したように、第8の実施形態に係
るDMA転送装置は、CPU800が、プログラムの処
理タスクを管理するタスク管理機能810を備え、CP
Uの処理負荷に応じて所定のシステムのバス負荷を保持
して、マスク時間を制御するように構成したので、各タ
スクが動作しているときのバス占有率を予め計算してお
き、その計算値からシステム全体のバス占有率の限界値
を設定し、CPU処理が効果的でかつ、DMA周期もバ
ス占有率の上限を超えないような値で行うことが可能に
なり、予め計算していたバス占有率の値まで、確実にバ
ス占有率を低減する効果がある。
As described above, in the DMA transfer device according to the eighth embodiment, the CPU 800 is provided with the task management function 810 for managing the processing task of the program.
Since the mask time is controlled while maintaining the bus load of the predetermined system according to the processing load of U, the bus occupancy when each task is operating is calculated in advance, and the calculation is performed. By setting the limit value of the bus occupancy of the entire system from the value, it becomes possible to perform the CPU processing at a value that is effective and the DMA cycle does not exceed the upper limit of the bus occupancy, and it has been calculated in advance. This has the effect of reliably reducing the bus occupancy to the value of the bus occupancy.

【0235】なお、本実施形態は、第2の実施形態の方
法でDMACを制御していたが、第1の実施形態の方法
に示したように、動作可能な外部リクエストデバイス側
で制御することも、第3の実施形態の方法でDMAC内
部のBREQ信号を制御することによっても実現可能で
ある。
In the present embodiment, the DMAC is controlled by the method of the second embodiment. However, as shown in the method of the first embodiment, the operable external request device controls the DMAC. This can also be realized by controlling the BREQ signal inside the DMAC by the method of the third embodiment.

【0236】また、マスク時間はCPUによって制御す
ることも、マスク回路にハード的なタイマを設けてCP
Uからタイマの時間をセットすることによって実現する
ことも可能である。
The mask time can be controlled by the CPU, or the mask circuit can be provided with a hardware-based timer.
It is also possible to realize by setting the time of the timer from U.

【0237】したがって、このような特長を有するDM
A転送装置を、例えば、プリンタなどに代表されるよう
な、PC(パーソナルコンピュータ)周辺機器におい
て、PCからのデータ転送速度と周辺機器自身のデータ
処理速度がお互いに高速処理が必要な場合で、しかもシ
ステムの破綻を避けることが不可欠なシステムにおい
て、データ転送とCPU処理を時間的に均等に処理した
い場合に有効である。また、CPUを中心としたDMA
によるデータ転送を含むすべてのシステムにおいて利用
可能である。
Therefore, the DM having such features is
An A-transfer device is used in a PC (personal computer) peripheral device such as a printer, for example, when the data transfer speed from the PC and the data processing speed of the peripheral device themselves need to be high-speed processing. Moreover, in a system where it is essential to avoid a failure of the system, it is effective when it is desired to perform data transfer and CPU processing uniformly over time. In addition, DMA with a focus on the CPU
It can be used in all systems, including data transfer by.

【0238】また、上記各実施形態では、外部リクエス
トデバイスまたはDMAC内にマスク回路等を設置する
ようにしているが、これは一例であり、外部に外付けす
るように設置してもよい。また、DMACは、専用のD
MAコントローラでも汎用のDMAコントローラでもよ
く、特に、高速性が要求されるときにはカウンタ及びバ
ッファ等の個別部品を用いて構成するものでもよい。
In each of the above embodiments, the mask circuit and the like are provided in the external request device or DMAC. However, this is an example, and the mask circuit and the like may be provided externally. The DMAC has a dedicated D
An MA controller or a general-purpose DMA controller may be used. In particular, when high speed is required, the controller may be configured using individual components such as a counter and a buffer.

【0239】さらに、上記DMA転送装置を構成するレ
ジスタ、カウンタ、各種制御回路等の種類、数などは上
述した実施形態に限られないことは言うまでもない。
Further, it goes without saying that the types and numbers of the registers, counters, various control circuits, and the like constituting the DMA transfer device are not limited to those in the above-described embodiment.

【0240】[0240]

【発明の効果】本発明に係るDMA転送装置では、外部
リクエストデバイスまたはDMA制御部が、DREQ信
号をマスクするマスク手段を備え、マスク手段によりD
REQ信号をマスクしてDMA転送によるバス占有状態
を制御するように構成したので、外部リクエストデバイ
スが複数存在する場合、または、DREQ信号の発生周
期が短い外部リクエストデバイスが同一のバスに存在す
る場合、DMAによるバス占有率を低減でき、時間的に
バスを有効に利用することができる。
In the DMA transfer device according to the present invention, the external request device or the DMA control unit includes a masking means for masking the DREQ signal, and the masking means controls the DREQ signal.
Since the bus occupation state by DMA transfer is controlled by masking the REQ signal, when there are a plurality of external request devices, or when there is an external request device with a short DREQ signal generation cycle on the same bus , DMA occupancy can be reduced, and the bus can be used effectively over time.

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

【図1】本発明を適用した第1の実施形態に係るDMA
転送装置の構成を示すブロック図である。
FIG. 1 shows a DMA according to a first embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of a transfer device.

【図2】上記DMA転送装置のDREQ信号マスク回路
の構成を示す回路図である。
FIG. 2 is a circuit diagram showing a configuration of a DREQ signal mask circuit of the DMA transfer device.

【図3】上記DMA転送装置のDREQ信号マスク回路
の構成を示す回路図である。
FIG. 3 is a circuit diagram showing a configuration of a DREQ signal mask circuit of the DMA transfer device.

【図4】上記DMA転送装置のDMA転送動作を示すタ
イミングチャートである。
FIG. 4 is a timing chart showing a DMA transfer operation of the DMA transfer device.

【図5】本発明を適用した第2の実施形態に係るDMA
転送装置の構成を示すブロック図である。
FIG. 5 shows a DMA according to a second embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of a transfer device.

【図6】上記DMA転送装置のDREQ信号マスク回路
の構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a DREQ signal mask circuit of the DMA transfer device.

【図7】上記DMA転送装置のマスク回路の内部の詳細
な構成を示す図である。
FIG. 7 is a diagram showing a detailed configuration inside a mask circuit of the DMA transfer device.

【図8】上記DMA転送装置の動作を説明するためのタ
イミングチャートである。
FIG. 8 is a timing chart for explaining the operation of the DMA transfer device.

【図9】上記DMA転送装置のDMACの調停動作を説
明するためのタイミングチャートである。
FIG. 9 is a timing chart for explaining the arbitration operation of the DMAC of the DMA transfer device.

【図10】本発明を適用した第3の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 10 shows a DM according to a third embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図11】上記DMA転送装置のカウンタ付きマスク回
路の構成を示すブロック図である。
FIG. 11 is a block diagram showing a configuration of a mask circuit with a counter of the DMA transfer device.

【図12】上記DMA転送装置のマスク回路の内部の詳
細な構成を示す図である。
FIG. 12 is a diagram showing a detailed configuration inside a mask circuit of the DMA transfer device.

【図13】上記DMA転送装置のDMA要求信号DRE
Q1,DREQ2,DREQ3からBREQN信号発生
までの構成を示す図である。
FIG. 13 shows a DMA request signal DRE of the DMA transfer device.
FIG. 9 is a diagram showing a configuration from Q1, DREQ2, DREQ3 to generation of a BREQN signal.

【図14】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 14 is a timing chart for explaining the operation of the DMA transfer device.

【図15】本発明を適用した第4の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 15 shows a DM according to a fourth embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図16】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 16 is a timing chart for explaining the operation of the DMA transfer device.

【図17】上記DMA転送装置のマスク時間を設定の表
を示す図である。
FIG. 17 is a diagram showing a table of setting a mask time of the DMA transfer device.

【図18】本発明を適用した第5の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 18 shows a DM according to a fifth embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図19】上記DMA転送装置のプログラム上のタスク
名とその処理負荷と対応するマスク時間の関係の表を示
す図である。
FIG. 19 is a diagram showing a table of a relationship between a task name on a program of the DMA transfer device, its processing load, and a corresponding mask time.

【図20】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 20 is a timing chart for explaining the operation of the DMA transfer device.

【図21】本発明を適用した第6の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 21 shows a DM according to a sixth embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図22】上記DMA転送装置のDREQ周期検出回路
の回路構成を示す図である。
FIG. 22 is a diagram showing a circuit configuration of a DREQ cycle detection circuit of the DMA transfer device.

【図23】上記DMA転送装置のDREQ周期検出回路
の動作を示すタイミングチャートである。
FIG. 23 is a timing chart showing the operation of the DREQ cycle detection circuit of the DMA transfer device.

【図24】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 24 is a timing chart for explaining the operation of the DMA transfer device.

【図25】本発明を適用した第7の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 25 shows a DM according to a seventh embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図26】上記DMA転送装置のBREQN信号周期検
出回路の回路構成を示す図である。
FIG. 26 is a diagram showing a circuit configuration of a BREQN signal cycle detection circuit of the DMA transfer device.

【図27】上記DMA転送装置のBREQN信号周期検
出回路の動作を示すタイミングチャートである。
FIG. 27 is a timing chart showing the operation of the BREQN signal cycle detection circuit of the DMA transfer device.

【図28】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 28 is a timing chart for explaining the operation of the DMA transfer device.

【図29】本発明を適用した第8の実施形態に係るDM
A転送装置の構成を示すブロック図である。
FIG. 29 shows a DM according to an eighth embodiment to which the present invention is applied.
FIG. 2 is a block diagram illustrating a configuration of an A transfer device.

【図30】上記DMA転送装置のプログラム上のタスク
名とその処理負荷と対応するマスク時間の関係の表を示
す図である。
FIG. 30 is a diagram showing a table of a relationship between a task name on a program of the DMA transfer device, its processing load, and a corresponding mask time.

【図31】上記DMA転送装置の動作を説明するための
タイミングチャートである。
FIG. 31 is a timing chart for explaining the operation of the DMA transfer device.

【図32】従来のDMA転送装置の構成を示すブロック
図である。
FIG. 32 is a block diagram illustrating a configuration of a conventional DMA transfer device.

【図33】従来のDMACの調停のタイミングを概念的
に示すタイミングチャートである。
FIG. 33 is a timing chart conceptually showing arbitration timing of a conventional DMAC.

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

100,500,800 CPU、110,200,3
00,400,600,700 DMAC(DMA制御
部)、111,112,240,241,351,35
2,353,451,452,453,751,752
外部リクエストデバイス、113 外部メモリ、12
1,122,210,220,410,610 DRE
Q信号マスク回路(マスク手段)、131 ANDゲー
ト、132 ORゲート、230 調停回路、211,
311 カウンタ回路、212,312 比較器、21
3,313 マスク回路、214 マスク信号発生回
路、215,315 ORゲート、310 カウンタ付
きマスク回路(マスク手段)、316 DREQ信号調
停回路、313 BREQ信号マスク回路、314マス
ク信号生成回路、510,810 タスク管理機能(管
理手段)、620DREQ周期検出回路(DREQ周期
検出手段)、621,721 エッジ検出回路、62
2,722 カウンタ、623,723 データバッフ
ァ、710BREQN信号マスク回路(マスク手段)、
720 BREQN周期検出回路(BREQN周期検出
手段)
100, 500, 800 CPU, 110, 200, 3
00, 400, 600, 700 DMAC (DMA control unit), 111, 112, 240, 241, 351, 35
2,353,451,452,453,751,752
External request device, 113 External memory, 12
1,122,210,220,410,610 DRE
Q signal mask circuit (mask means), 131 AND gate, 132 OR gate, 230 arbitration circuit, 211,
311 counter circuit, 212, 312 comparator, 21
3,313 mask circuit, 214 mask signal generation circuit, 215, 315 OR gate, 310 mask circuit with counter (mask means), 316 DREQ signal arbitration circuit, 313 BREQ signal mask circuit, 314 mask signal generation circuit, 510, 810 tasks Management function (management means), 620 DREQ cycle detection circuit (DREQ cycle detection means), 621, 721 edge detection circuit, 62
2,722 counter, 623,723 data buffer, 710BREQN signal masking circuit (masking means),
720 BREQN cycle detection circuit (BREQN cycle detection means)

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 CPUの動作と独立に、メモリと外部リ
クエストデバイス間で直接データを転送するDMA転送
制御を行うDMA制御部を備え、 DMA制御部は、外部リクエストデバイスからデータ転
送リクエスト(以下、DREQという)信号が発生した
とき、CPUに対してバスリクエスト(以下、BREQ
Nという)信号を出力してバスの開放を要求し、CPU
からバス開放許可(以下、BACKNという)信号が返
されると、外部リクエストデバイスにデータ転送リクエ
スト確認(以下、DACKという)信号を送出し、メモ
リと外部リクエストデバイス間のデータ転送制御を行う
DMA転送装置において、 前記外部リクエストデバイスは、前記DREQ信号をマ
スクするマスク手段を備え、 前記マスク手段により前記DREQ信号をマスクしてD
MA転送によるバス占有状態を制御すること特徴とする
DMA転送装置。
1. A DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device independently of an operation of a CPU, wherein the DMA control unit receives a data transfer request (hereinafter, referred to as a “data transfer request”) from the external request device. When a DREQ signal is generated, a bus request (hereinafter, BREQ) is sent to the CPU.
N) to request the release of the bus,
Sends a data transfer request acknowledgment (DACK) signal to an external request device when a bus release permission (BACKN) signal is returned from the device, and a DMA transfer device for controlling data transfer between the memory and the external request device In the above, the external request device may include mask means for masking the DREQ signal, and mask the DREQ signal by the mask means.
A DMA transfer device for controlling a bus occupation state by MA transfer.
【請求項2】 CPUの動作と独立に、メモリと外部リ
クエストデバイス間で直接データを転送するDMA転送
制御を行うDMA制御部を備え、 DMA制御部は、外部リクエストデバイスからDREQ
信号が発生したとき、CPUに対してBREQN信号を
出力してバスの開放を要求し、CPUからBACKN信
号が返されると、外部リクエストデバイスにDACK信
号を送出し、メモリと外部リクエストデバイス間のデー
タ転送制御を行うDMA転送装置において、 前記DMA制御部は、前記DREQ信号をマスクするマ
スク手段を備え、 前記マスク手段により前記DREQ信号をマスクしてD
MA転送によるバス占有状態を制御することを特徴とす
るDMA転送装置。
2. A DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device, independently of an operation of the CPU, wherein the DMA control unit receives a DREQ from the external request device.
When a signal is generated, a BREQN signal is output to the CPU to request the release of the bus. When the BACKN signal is returned from the CPU, a DACK signal is sent to the external request device, and data between the memory and the external request device is transmitted. In a DMA transfer device that performs transfer control, the DMA control unit includes a masking unit that masks the DREQ signal, and masks the DREQ signal with the masking unit.
A DMA transfer device for controlling a bus occupation state by MA transfer.
【請求項3】 CPUの動作と独立に、メモリと外部リ
クエストデバイス間で直接データを転送するDMA転送
制御を行うDMA制御部を備え、 DMA制御部は、外部リクエストデバイスからDREQ
信号が発生したとき、CPUに対してBREQN信号を
出力してバスの開放を要求し、CPUからBACKN信
号が返されると、外部リクエストデバイスにDACK信
号を送出し、メモリと外部リクエストデバイス間のデー
タ転送制御を行うDMA転送装置において、 前記DMA制御部は、前記BREQN信号をマスクする
マスク手段を備え、 前記マスク手段により前記BREQN信号をマスクして
DMA転送によるバス占有状態を制御することを特徴と
するDMA転送装置。
3. A DMA control unit for performing a DMA transfer control for directly transferring data between a memory and an external request device, independently of an operation of the CPU, wherein the DMA control unit receives a DREQ from the external request device.
When a signal is generated, a BREQN signal is output to the CPU to request the release of the bus. When the BACKN signal is returned from the CPU, a DACK signal is sent to the external request device, and data between the memory and the external request device is transmitted. In the DMA transfer device that performs transfer control, the DMA control unit includes a mask unit that masks the BREQN signal, and controls the bus occupation state by the DMA transfer by masking the BREQN signal by the mask unit. DMA transfer device.
【請求項4】 同時動作可能な外部リクエストデバイス
の数に応じて前記マスク時間を制御する手段をさらに備
えたことを特徴とする請求項1乃至3の何れかに記載の
DMA転送装置。
4. The DMA transfer device according to claim 1, further comprising a unit that controls the mask time according to the number of external request devices that can operate simultaneously.
【請求項5】 CPUの処理負荷を管理する管理手段
と、 CPUの処理負荷に応じて前記マスク時間を制御する手
段とを備えたこと特徴とする請求項1乃至4の何れかに
記載のDMA転送装置。
5. The DMA according to claim 1, further comprising management means for managing a processing load on the CPU, and means for controlling the mask time according to the processing load on the CPU. Transfer device.
【請求項6】 DREQ信号の発生周期を検出するDR
EQ信号周期検出手段を備え、 前記マスク手段は、前記DREQ信号発生周期に基づい
て前記DREQ信号をマスクすることを特徴とする請求
項1乃至3の何れかに記載のDMA転送装置。
6. A DR for detecting a generation cycle of a DREQ signal.
4. The DMA transfer device according to claim 1, further comprising an EQ signal cycle detecting unit, wherein the masking unit masks the DREQ signal based on the DREQ signal generation cycle.
【請求項7】 動作を許可する複数の外部リクエストデ
バイスのDREQ信号に伴い発生するBREQN信号の
発生周期を検出するBREQN信号周期検出手段を備
え、 前記マスク手段は、前記BREQN信号発生周期に基づ
いて前記BREQN信号をマスクすることを特徴とする
請求項1乃至3の何れかに記載のDMA転送装置。
7. A BREQN signal period detection unit for detecting a generation period of a BREQN signal generated in response to a DREQ signal of a plurality of external request devices that permit an operation, wherein the mask unit is configured to detect a generation period of the BREQN signal based on the BREQN signal generation period. 4. The DMA transfer device according to claim 1, wherein the BREQN signal is masked.
【請求項8】 CPUの処理負荷を管理する管理手段
と、 CPU処理に伴うバス占有率を求め、その限界値を設定
する設定手段と、 CPUの処理負荷及び前記限界値に応じて前記マスク時
間を制御する手段とを備えたこと特徴とする請求項1乃
至4の何れかに記載のDMA転送装置。
8. A management means for managing the processing load of the CPU, a setting means for obtaining a bus occupancy rate associated with the CPU processing and setting a limit value thereof, and a mask time according to the processing load of the CPU and the limit value. 5. The DMA transfer device according to claim 1, further comprising: means for controlling the DMA transfer.
JP10690399A 1999-04-14 1999-04-14 DMA transfer device Expired - Fee Related JP4549458B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10690399A JP4549458B2 (en) 1999-04-14 1999-04-14 DMA transfer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10690399A JP4549458B2 (en) 1999-04-14 1999-04-14 DMA transfer device

Publications (3)

Publication Number Publication Date
JP2000298638A true JP2000298638A (en) 2000-10-24
JP2000298638A5 JP2000298638A5 (en) 2005-10-27
JP4549458B2 JP4549458B2 (en) 2010-09-22

Family

ID=14445427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10690399A Expired - Fee Related JP4549458B2 (en) 1999-04-14 1999-04-14 DMA transfer device

Country Status (1)

Country Link
JP (1) JP4549458B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005352666A (en) * 2004-06-09 2005-12-22 Murata Mach Ltd Dma controller and dma control method
JP2010191492A (en) * 2009-02-16 2010-09-02 Ricoh Co Ltd Device, method, and program for contreolling data transfer and recording medium
KR101214068B1 (en) 2006-02-03 2012-12-20 삼성전자주식회사 Method and apparatus for controlling a bus in direct memory access controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60205652A (en) * 1984-03-29 1985-10-17 Hitachi Ltd Dma transfer system
JPS63214860A (en) * 1987-03-03 1988-09-07 Toshiba Corp Dma device
JPH0546540A (en) * 1991-08-15 1993-02-26 Pfu Ltd Competitive mediation method with prohibited time

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60205652A (en) * 1984-03-29 1985-10-17 Hitachi Ltd Dma transfer system
JPS63214860A (en) * 1987-03-03 1988-09-07 Toshiba Corp Dma device
JPH0546540A (en) * 1991-08-15 1993-02-26 Pfu Ltd Competitive mediation method with prohibited time

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005352666A (en) * 2004-06-09 2005-12-22 Murata Mach Ltd Dma controller and dma control method
KR101214068B1 (en) 2006-02-03 2012-12-20 삼성전자주식회사 Method and apparatus for controlling a bus in direct memory access controller
JP2010191492A (en) * 2009-02-16 2010-09-02 Ricoh Co Ltd Device, method, and program for contreolling data transfer and recording medium

Also Published As

Publication number Publication date
JP4549458B2 (en) 2010-09-22

Similar Documents

Publication Publication Date Title
US7062582B1 (en) Method and apparatus for bus arbitration dynamic priority based on waiting period
JP4457168B2 (en) Resource request arbitration device, resource request arbitration method, and computer program
US5572686A (en) Bus arbitration scheme with priority switching and timer
US8549199B2 (en) Data processing apparatus and a method for setting priority levels for transactions
US20120042105A1 (en) Bus arbitration apparatus
US7450606B2 (en) Bit slice arbiter
JP2004334552A (en) Bus connection circuit and bus connection system
US20060155903A1 (en) Resource management device
US6571306B1 (en) Bus request mechanism for bus master which is parked on a shared bus
JP2000298638A (en) DMA transfer device
US6784890B1 (en) Accelerated graphics port expedite cycle throttling control mechanism
JP5677007B2 (en) Bus arbitration device and bus arbitration method
US6105082A (en) Data processor used in a data transfer system which includes a detection circuit for detecting whether processor uses bus in a forthcoming cycle
JP2004078508A (en) Bus arbitration circuit, bus arbitration method, and its program
JP4309508B2 (en) DMA controller
JP4344163B2 (en) Resource request arbitration device, resource request arbitration method, and computer program
JPH0696014A (en) Bus using priority order controller
US7747806B2 (en) Resource use management device, resource use management system, and control method for a resource use management device
JP2005004563A (en) Dma transfer controller
JP4898527B2 (en) RESOURCE USE MANAGEMENT DEVICE, RESOURCE USE MANAGEMENT SYSTEM, AND RESOURCE USE MANAGEMENT DEVICE CONTROL METHOD
JPH10334042A (en) Bus arbitration control device method therefor, and recording medium recorded with bus arbitration control program
JP2001117860A (en) Memory access priority switching control device
JP2000259550A (en) Dma controller
JP5494925B2 (en) Semiconductor integrated circuit, information processing apparatus, and processor performance guarantee method
JP2002091903A (en) Bus system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080708

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080905

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090331

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090525

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100121

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100706

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100707

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130716

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees