JPH0660012A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPH0660012A
JPH0660012A JP20991092A JP20991092A JPH0660012A JP H0660012 A JPH0660012 A JP H0660012A JP 20991092 A JP20991092 A JP 20991092A JP 20991092 A JP20991092 A JP 20991092A JP H0660012 A JPH0660012 A JP H0660012A
Authority
JP
Japan
Prior art keywords
transfer
dma
output
signal
block
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
JP20991092A
Other languages
Japanese (ja)
Other versions
JP2821321B2 (en
Inventor
Koji Matsui
宏治 松井
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP20991092A priority Critical patent/JP2821321B2/en
Publication of JPH0660012A publication Critical patent/JPH0660012A/en
Application granted granted Critical
Publication of JP2821321B2 publication Critical patent/JP2821321B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To shorten a total channel switching time. CONSTITUTION:When one of DMA request signals 101 corresponding to plural channels becomes active, a DMA transfer start signal 103 is outputted, a bus cycle sequencer block 19 outputs a DMA transfer permission signal 109 corresponding to the DMA request channel, and a transfer frequency block 1 calculates the number of transfer bytes of data stored in a mode register 7. The DMA transfer request signal 101 is encoded and request data are inputted to a comparator 16 together with one of transfer start and interruption state signals 105 and 106; and the contents of a transfer byte storage register 2 and the number of transfer bytes generated by a constant generation block 9 are inputted to a comparator 17 simultaneously, and both the inputs are inputted to an AND circuit 18. When the value of a transfer byte storage register 2 is equal to or less than the value of the constant generation block 9, the comparator 17 generates a '0'-level output, the output of the comparator 16 is masked, and channel switching when the the remaining transfer bytes are small is suppressed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はDMAコントローラに関
し、特にメモリとI/Oデバイスとの間のデータ転送を
行うDMAコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA controller, and more particularly to a DMA controller for transferring data between a memory and an I / O device.

【0002】[0002]

【従来の技術】従来の、この種のDMAコントローラの
1例の内部ブロック図を図4に示す。また、図5
(a)、(b)、(c)、(d)、(e)、(f)、
(g)、(h)、(i)および(j)は、当該従来例に
おけるチャネル切替え時のタイミング図である。以下
に、図4および図5を参照して従来例の動作について説
明する。
2. Description of the Related Art An internal block diagram of an example of a conventional DMA controller of this type is shown in FIG. Also, FIG.
(A), (b), (c), (d), (e), (f),
(G), (h), (i) and (j) are timing charts at the time of channel switching in the conventional example. The operation of the conventional example will be described below with reference to FIGS. 4 and 5.

【0003】図4に示されるように、本従来例は、DM
A転送開始以前に転送バイト数を設定し、その後転送が
開始されると随時残り転送バイト数が更新されてゆく転
送バイト記憶レジスタ2、当該転送バイト記憶レジスタ
2の内容を更新するための加減算器5、加減算器5に対
する入力バッファ3および4を含む転送回数ブロック1
と、転送を行うチャネルの転送モード、I/Oポート幅
およびバス幅を指定するモードレジスタ7および当該モ
ードレジスタの内容をデコードするデコーダ8を含む転
送モード・ブロック6と、DMA転送中に、デコーダ8
によりデコードされた結果を基にして、内部のROM1
0に格納されている定数を発生する定数発生ブロック9
と、外部のリクエスタからのDMA要求信号101を受
付けて、DMA転送開始信号103を出力するDMA要
求受付けブロック12と、DMA要求受付けブロック1
2の出力をエンコードするプライオリティ・エンコーダ
13と、転送開始ステート信号105および転送中断ス
テート信号106の論理和を出力するOR回路14と、
外部よりのクロック信号102をCLK端子に入力し、
OR回路14の出力をS端子に入力して、プライオリテ
ィ・エンコーダ13の出力をD端子に入力するDフリッ
プフロップ15と、プライオリティ・エンコーダ13の
出力とDフリップフロップ15の出力とを比較して、両
出力が等しくない場合に“1”レベルのチャネル切替信
号104を出力する比較器16と、前記DMA転送開始
信号103ならびにチャネル切替信号104を入力する
とともに、外部よりのバス開放信号107を入力して、
前記転送開始ステート信号105および転送中断ステー
ト信号106と、バス開放要求信号108およびDMA
転送許可信号を出力して、バスサイクルの制御を行うバ
スサイクル・シーケンサ・ブロック19とを備えて構成
される。
As shown in FIG. 4, this conventional example uses DM.
A Transfer byte number is set before the transfer is started, and when the transfer is started after that, the remaining transfer byte number is updated at any time. Transfer byte storage register 2, adder / subtractor for updating the contents of the transfer byte storage register 2 5, the transfer count block 1 including the input buffers 3 and 4 for the adder / subtractor 5
A transfer mode block 6 including a transfer mode of a transfer channel, a mode register 7 for designating an I / O port width and a bus width, and a decoder 8 for decoding the contents of the mode register, and a decoder during a DMA transfer. 8
Internal ROM1 based on the result decoded by
Constant generation block 9 for generating the constant stored in 0
And a DMA request acceptance block 12 that accepts a DMA request signal 101 from an external requester and outputs a DMA transfer start signal 103, and a DMA request acceptance block 1
A priority encoder 13 for encoding the output of 2 and an OR circuit 14 for outputting the logical sum of the transfer start state signal 105 and the transfer interruption state signal 106;
Input the clock signal 102 from the outside to the CLK terminal,
The output of the OR circuit 14 is input to the S terminal and the output of the priority encoder 13 is input to the D terminal, and the output of the priority encoder 13 and the output of the D flip-flop 15 are compared, When both outputs are not equal, a comparator 16 which outputs a "1" level channel switching signal 104, the DMA transfer start signal 103 and the channel switching signal 104, and a bus release signal 107 from the outside are input. hand,
The transfer start state signal 105, the transfer interruption state signal 106, the bus release request signal 108 and the DMA
A bus cycle sequencer block 19 which outputs a transfer permission signal and controls a bus cycle is configured.

【0004】この従来例においては、DMA転送時に、
或るチャネルのDMA転送中において、他の優先順位の
高いチャネルのDMA要求信号101がアクティブとな
った時には、その以前において実行されていた前記或る
チャネルのDMA転送は無条件に中断され、優先順位の
高い方のチャネルのDMA転送に切替えられる。そし
て、当該優先度の高い方のチャネルのDMA転送終了後
に、前記中断されたチャネルの残りのDMA転送が実行
される。なお、本従来例においては、DMA要求受付け
ブロック12に入力されるDMA要求信号101は、図
4においては省略されているが、並列に入力されるチャ
ネル0〜3に対応する4種類のDMA要求信号により形
成されており、これらのDMA要求信号101の何れか
一つチャネルに対応するDMA要求信号がアクティブに
なると、DMA受付けブロック12により、当該チャネ
ルに対応するDMA要求信号に対応するDMA転送開始
信号103がアクティブな信号として出力される。DM
A転送開始信号103がアクティブになると、バスサイ
クル・シーケンサ・ブロック19によるバスサイクル制
御が行われて、バス開放要求信号108はアクティブの
信号として出力される。このアクティブなバス開放要求
信号108の出力に対応して、外部より応答入力される
バス開放信号107を介して、DMA転送要求のあった
チャネルに対応するDMA転送許可信号109がアクテ
ィブとなって出力され、当該要求元に対して、DMA転
送が受付けられたことが示される。
In this conventional example, during DMA transfer,
During the DMA transfer of a certain channel, when the DMA request signal 101 of another higher priority channel becomes active, the DMA transfer of the certain channel that was executed before that is unconditionally interrupted and the priority is given. It is switched to the DMA transfer of the higher order channel. After the DMA transfer of the higher priority channel is completed, the remaining DMA transfer of the interrupted channel is executed. In the conventional example, the DMA request signal 101 input to the DMA request receiving block 12 is omitted in FIG. 4, but four types of DMA requests corresponding to channels 0 to 3 input in parallel are provided. When a DMA request signal corresponding to one of the DMA request signals 101 is activated, the DMA acceptance block 12 starts a DMA transfer corresponding to the DMA request signal corresponding to the channel. The signal 103 is output as an active signal. DM
When the A transfer start signal 103 becomes active, the bus cycle sequencer block 19 performs bus cycle control, and the bus release request signal 108 is output as an active signal. In response to the active output of the bus release request signal 108, the DMA transfer permission signal 109 corresponding to the channel for which the DMA transfer request is issued becomes active and is output via the bus release signal 107 which is input in response from the outside. Then, it is indicated to the request source that the DMA transfer has been accepted.

【0005】また他方において、DMA転送開始信号1
03は、転送回数ブロック1に含まれる入力バッファ3
および4にも入力されており、DMA転送開始信号10
3がアクティブになると、転送回数ブロック1および転
送モード・ブロック6においては、DMA転送要求のあ
ったチャネルのアドレスが出力されて更新され、モード
レジスタ7に格納されているI/O幅、バス幅および転
送方向を示すデータがデコーダ8によりデコードされ
て、定数発生ブロック9に入力される。定数発生ブロッ
ク9は内部のROM10により構成されており、制御レ
ジスタ6より入力されるデコード出力を介してROM1
0内に格納されている定数が読出され、転送回数ブロッ
ク1に含まれる入力バッファ4に入力される。転送回数
ブロック1においては、加減算器5において、予め転送
バイト記憶レジスタ2に格納されている転送バイト数が
前記定数により減算されて、残りの転送バイト数が計算
されてゆく。
On the other hand, the DMA transfer start signal 1
03 is the input buffer 3 included in the transfer count block 1
Are also input to the DMA transfer start signal 10
3 becomes active, the transfer count block 1 and the transfer mode block 6 output and update the address of the channel for which the DMA transfer is requested, and store the I / O width and bus width stored in the mode register 7. And data indicating the transfer direction are decoded by the decoder 8 and input to the constant generation block 9. The constant generation block 9 is composed of an internal ROM 10, and the ROM 1 is supplied via a decode output input from the control register 6.
The constant stored in 0 is read and input to the input buffer 4 included in the transfer count block 1. In the transfer count block 1, the number of transfer bytes stored in advance in the transfer byte storage register 2 is subtracted by the adder / subtractor 5 by the constant, and the remaining number of transfer bytes is calculated.

【0006】DMA要求受付けブロック12において受
付けられたDMA転送要求信号は、プライオリティ・エ
ンコーダ13においてエンコードされる。この場合、プ
ライオリティ・エンコーダ13においては、チャネル0
〜3のDMA転送要求の内、最も優先順位の高いチャネ
ルが選択されるが、ここにおける優先順位は、チャネル
0、1、2、3の順である。エンコードされた要求デー
タは、バスサイクル・シーケンサ・ブロック19により
生成される転送開始ステート信号105および転送中断
ステート信号106が、OR回路14を介して何れか一
方の信号が“1”レベルになった時に、Dフリップフロ
ップ15に対するセット条件となり、その時のプライオ
リティ・エンコーダ13の出力が比較器16に対する一
方の入力となる。そして、クロック信号102の毎クロ
ックごとのプライオリティ・エンコーダ13の出力が、
比較器16に対するもう一方の入力となり、これらの両
入力が比較器16において比較され、両者が等しくない
時には、比較器16より出力されるチャネル切替信号1
04は“1”レベルとして出力されて、バスサイクル・
シーケンス・ブロック19に入力される。このチャネル
切替信号104が“1”レベルとして出力されるという
ことは、より優先順位の高いDMA転送要求が来たこと
を意味しており、バスサイクル・シーケンサ・ブロック
19においては、バス開放要求信号108およびチャネ
ル0〜3のDMA転送許可信号109をインアクティブ
として、実行中のチャネルのDMA転送を中断し、優先
順位の高いチャネルのDMA転送に切替える。
The DMA transfer request signal received by the DMA request receiving block 12 is encoded by the priority encoder 13. In this case, in the priority encoder 13, channel 0
The channel with the highest priority is selected from the DMA transfer requests 3 to 3, and the priority here is in the order of channels 0, 1, 2, 3. As for the encoded request data, one of the transfer start state signal 105 and the transfer stop state signal 106 generated by the bus cycle sequencer block 19 becomes “1” level via the OR circuit 14. At times, a set condition is set for the D flip-flop 15, and the output of the priority encoder 13 at that time becomes one input to the comparator 16. The output of the priority encoder 13 for each clock of the clock signal 102 is
It becomes the other input to the comparator 16, both of these inputs are compared in the comparator 16, and when they are not equal, the channel switching signal 1 output from the comparator 16
04 is output as "1" level, and the bus cycle
Input to sequence block 19. The fact that the channel switching signal 104 is output as a "1" level means that a DMA transfer request having a higher priority has come. In the bus cycle sequencer block 19, the bus release request signal is output. 108 and the DMA transfer permission signal 109 of the channels 0 to 3 are made inactive to interrupt the DMA transfer of the channel being executed and switch to the DMA transfer of the channel having the higher priority.

【0007】図5(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)および(j)
は、1例として、チャネル1のDMA転送中に、チャネ
ル0のDMA転送要求が入った時の動作を示すタイミン
グ図である。
5 (a), (b), (c), (d),
(E), (f), (g), (h), (i) and (j)
FIG. 4 is a timing diagram showing an operation when a DMA transfer request for channel 0 is input during a DMA transfer for channel 1, as an example.

【0008】まず、チャネル1に対応するDMA要求信
号101がアクティブになると、バス開放要求信号10
8がアクティブとなり、外部のバス・マスタに対してバ
スの開放が求められる。このアクティブなバス開放要求
信号108を受けてバスが開放されると、バス開放信号
107がアクティブの信号として入力され、要求元に対
してDMA転送許可信号109をアクティブにすること
により、転送要求が許可されたことが伝達される。そし
て、当該チャネル1におけるDMA転送中に、チャネル
0に対応するDMA要求信号101がアクティブになる
と、チャネル1よりもチャネル0の方が優先順位が高い
ために、バス開放要求信号108およびチャネル1に対
応するDMA転送許可信号109をインアクティブとし
て、無条件でチャネル切替え動作に入る。その後におい
て、チャネル0のDMA転送を行うために、バス開放要
求信号108をアクティブとし、そしてバス開放信号1
07がアクティブになると、チャネル0に対応するDM
A転送許可信号109をアクティブにして、チャネル0
のDMA転送が実行される。そして、チャネル0におけ
るDMA転送終了後において、再度前記チャネル1にお
ける残りのDMA転送のために、バス開放要求信号10
8をアクティブとし、バス開放信号107がアクティブ
の信号として入力されると、チャネル1に対応するDM
A転送許可信号109をアクティブとして、当該チャネ
ル1における残りのDMA転送が行われる。
First, when the DMA request signal 101 corresponding to channel 1 becomes active, the bus release request signal 10
8 becomes active and the external bus master is requested to release the bus. When the bus is released in response to the active bus release request signal 108, the bus release signal 107 is input as an active signal, and the DMA transfer permission signal 109 is activated to the request source so that the transfer request is issued. It is communicated that permission has been granted. When the DMA request signal 101 corresponding to the channel 0 becomes active during the DMA transfer in the channel 1, the bus release request signal 108 and the channel 1 are assigned to the channel release request signal 108 because the channel 0 has a higher priority than the channel 1. The corresponding DMA transfer permission signal 109 is made inactive, and the channel switching operation is unconditionally started. After that, the bus release request signal 108 is activated and the bus release signal 1 is sent in order to perform the DMA transfer of the channel 0.
When 07 becomes active, DM corresponding to channel 0
A transfer permission signal 109 is activated, and channel 0
DMA transfer is executed. After the completion of the DMA transfer in the channel 0, the bus release request signal 10 is again sent for the remaining DMA transfer in the channel 1.
When 8 is activated and the bus release signal 107 is input as an active signal, the DM corresponding to channel 1
The A transfer permission signal 109 is activated, and the remaining DMA transfer in the channel 1 is performed.

【0009】上記の動作説明により明らかなように、D
MA転送のチャネル切替えを無条件に実行すると、DM
A転送を中断されたチャネル1においては、バス開放要
求信号108をアクティブとして、バス開放信号107
がアクティブになるのを待つ待機動作(以下、このよう
な待機動作をオーバヘッドと云う)が、残りのDMA転
送を実行するために、どうしても必要となる。この場
合、チャネル1における残りのDMA転送回数が少ない
場合には、前記オーバーヘッドにより、無為に、デッド
・タイムとしてのDMA転送時間を要することになる。
As is clear from the above description of operation, D
If the MA transfer channel is unconditionally executed, DM
In the channel 1 in which the A transfer is suspended, the bus release request signal 108 is activated and the bus release signal 107 is set.
Wait operation (hereinafter, such a wait operation is referred to as overhead) for waiting for the activation of the DMA is required in order to execute the remaining DMA transfer. In this case, if the remaining number of DMA transfers in channel 1 is small, the overhead causes the DMA transfer time to be deadly required.

【0010】[0010]

【発明が解決しようとする課題】上述した従来のDMA
コントローラにおいては、優先順位の低いチャネルより
優先順位の高いチャネルに切替えが行われる時には、優
先順位の低いチャネルにおけるDMA転送状態に対して
は無条件に切替えが行われるために、優先順位の低いチ
ャネルの残りの転送バイト数が少ない時にチャネルの切
替えが生じると、残りの数バイトにために、優先順位の
高いチャネルにおけるDMA転送終了後において、再度
バス・マスタに対してバスの開放要求を出力して、バス
が開放されるのを待機するというオーバヘッドを徒らに
増大させる結果となり、低優先順位のチャネルにおける
DMA転送効率を著しく劣化させるという欠点がある。
DISCLOSURE OF THE INVENTION Conventional DMA described above
In the controller, when switching is performed to a channel having a higher priority than a channel having a lower priority, the DMA transfer state of the channel having a lower priority is unconditionally switched. If channel switching occurs when the number of remaining transfer bytes is small, a bus release request is output to the bus master again after the DMA transfer in the higher priority channel ends because of the remaining several bytes. As a result, the overhead of waiting for the bus to be released is unnecessarily increased, and the DMA transfer efficiency in the low priority channel is significantly deteriorated.

【0011】[0011]

【課題を解決するための手段】本発明のDMAコントロ
ーラは、外部からのデータ転送要求を受けて、DMAデ
ータ転送を行うDMAコントローラにおいて、予めDM
Aデータの転送バイト数を設定しておき、転送の開始に
伴ない残りバイト数が更新されてゆく転送バイト記憶レ
ジスタと、前記転送バイト記憶レジスタの記憶内容を更
新するための加減算器と、DMAデータ転送を行うチャ
ネルの転送モード、I/Oポート幅およびバス幅を指定
するモード・レジスタと、前記モード・レジスタの内容
をデコードするデコーダと、DMAデータ転送時に、前
記デコーダの出力を受けて、予め格納されている所定の
定数を出力する定数発生ブロックと、外部からの各チャ
ネルのデータ転送要求信号を受付けて、各チャネルのD
MA要求ならびにDMA転送開始信号を出力するDMA
要求受付けブロックと、前記DMA要求受付けブロック
の出力をエンコードするプライオリティ・エンコーダ
と、特定のレベル信号をS端子に受けてセットされ、前
記プライオリティ・エンコーダの出力をD端子に入力
し、外部からのクロック信号をCLK端子に入力するこ
とにより動作するDフリップフロップと、前記プライオ
リティ・エンコーダの出力と、前記Dフリップフロップ
の出力とを比較して、これらの両出力が等しくない時に
“1”レベルを出力する第1の比較器と、前記転送バイ
ト記憶レジスタの出力と、前記定数発生ブロックの出力
とを比較して、前記転送バイト記憶レジスタの出力が、
前記定数発生ブロックの出力に等しいか、またはそれ以
下である場合においては“0”レベルを出力し、また前
記転送バイト記憶レジスタの出力が、前記定数発生ブロ
ックの出力よりも大きい場合においては“1”レベルを
出力する第2の比較器と、前記第1および第2の比較器
の出力の論理積をとり、チャネル切替信号として出力す
るAND回路と、前記DMA要求受付けブロックから出
力されるDMA転送開始信号と、前記AND回路から出
力されるチャネル切替え信号との入力に対応して、バス
開放要求信号を出力するとともに、外部からのバス開放
信号の入力を受けて、外部に対してDMA転送許可信号
を出力し、内部に対しては、転送開始ステート信号また
は転送中断ステート信号を出力するバスサイクル・シー
ケンサ・ブロックと、前記転送開始ステート信号および
前記転送中断ステート信号の論理和をとり、前記特定の
レベル信号として、前記DフリップフロップのS端子に
出力するOR回路と、を備えと構成される。
SUMMARY OF THE INVENTION A DMA controller of the present invention receives a data transfer request from the outside and performs a DM data transfer in advance in a DMA controller that transfers DMA data.
A transfer byte number of A data is set, the transfer byte storage register in which the remaining byte number is updated with the start of transfer, an adder / subtractor for updating the storage content of the transfer byte storage register, and a DMA A mode register for designating a transfer mode of a channel for data transfer, an I / O port width and a bus width, a decoder for decoding the contents of the mode register, and a DMA data transfer receiving an output of the decoder, A constant generation block that outputs a predetermined constant stored in advance and a data transfer request signal for each channel from the outside are received, and D
DMA for outputting MA request and DMA transfer start signal
A request receiving block, a priority encoder that encodes the output of the DMA request receiving block, and a specific level signal that is set at the S terminal, the output of the priority encoder is input to the D terminal, and an external clock signal is input. A D flip-flop that operates by inputting a signal to the CLK terminal, the output of the priority encoder, and the output of the D flip-flop are compared, and a "1" level is output when these two outputs are not equal. Comparing the output of the transfer byte storage register with the output of the constant generation block, and the output of the transfer byte storage register is
When it is equal to or less than the output of the constant generation block, it outputs a "0" level, and when the output of the transfer byte storage register is larger than the output of the constant generation block, it outputs "1". A second comparator that outputs a level and an AND circuit that takes a logical product of the outputs of the first and second comparators and outputs as a channel switching signal, and a DMA transfer output from the DMA request acceptance block In response to the input of the start signal and the channel switching signal output from the AND circuit, a bus release request signal is output, and a bus release signal is received from the outside to permit DMA transfer to the outside. A bus cycle sequencer block that outputs a signal and internally outputs a transfer start state signal or a transfer suspend state signal The ORs the transfer start state signal and said transfer interrupt state signal, said a particular level signals, an OR circuit for outputting the S terminal of the D flip-flop, and a comprising a.

【0012】なお、前記定数発生ブロックの記憶手段
は、ROMにより構成してもよく、またレジスタにより
構成してもよい。
The storage means of the constant generation block may be a ROM or a register.

【0013】[0013]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0014】図1は本発明の第1の実施例を示すブロッ
ク図である。また、図3(a)、(b)、(c)、
(d)、(e)、(f)、(g)、(h)、(i)およ
び(j)は、本実施例におけるチャネル切替え時のタイ
ミング図である。以下に、図1および図3を参照して本
実施例の動作について説明する。
FIG. 1 is a block diagram showing a first embodiment of the present invention. 3 (a), (b), (c),
(D), (e), (f), (g), (h), (i) and (j) are timing charts at the time of channel switching in the present embodiment. The operation of this embodiment will be described below with reference to FIGS. 1 and 3.

【0015】図1に示されるように、本実施例は、転送
バイト記憶レジスタ2、入力バッファ3、4および加減
算器5を含む転送回数ブロック1と、モード・レジスタ
7およびデコーダ8を含む転送モード・ブロック6と、
内部にROM10を含む定数発生ブロック9と、DMA
要求受付けブロック12、プライオリティ・エンコーダ
13、OR回路14、Dフリップフロップ15、比較器
16、17およびAND回路18を含むDMA受付けブ
ロック11と、バスサイクル・シーケンサ・ブロック1
9とを備えて構成される。
As shown in FIG. 1, this embodiment has a transfer count block 1 including a transfer byte storage register 2, input buffers 3 and 4, and an adder / subtractor 5, and a transfer mode including a mode register 7 and a decoder 8.・ Block 6
A constant generation block 9 including a ROM 10 inside, and a DMA
DMA acceptance block 11 including request acceptance block 12, priority encoder 13, OR circuit 14, D flip-flop 15, comparators 16 and 17, and AND circuit 18, and bus cycle sequencer block 1
9 and 9.

【0016】図1において、チャネル0、1、2、3に
対応するDMA要求信号101の内の何れかのチャネル
に対応するDMA要求信号がアクティブになると、DM
A要求受付けブロック12により、DMA転送開始信号
103はアクテイブな信号として出力され、バスサイク
ル・シーケンサ・ブロック19およびデータレジスタ1
に含まれる入力バッファ3および4に入力される。バス
サイクル・シーケンサ・ブロック19においては、アク
ティブなDMA転送開始信号103を受けて、バスサイ
クルに対する制御が開始される。これにより、バス開放
要求信号108はアクティブな信号として出力され、外
部のバス・マスタに送られる。このバス・マスタよりバ
ス開放信号107が応答入力されると、DMA要求のあ
ったチャネルに対応するDMA転送許可信号109がア
クティブな信号として出力されて、要求元に対して、当
該DMA転送が受付けられたことが伝達される。
In FIG. 1, when the DMA request signal corresponding to any one of the DMA request signals 101 corresponding to channels 0, 1, 2, 3 becomes active, DM
The A request acceptance block 12 outputs the DMA transfer start signal 103 as an active signal, and the bus cycle sequencer block 19 and the data register 1
Are input to the input buffers 3 and 4 included in. The bus cycle sequencer block 19 receives the active DMA transfer start signal 103 and starts control of the bus cycle. As a result, the bus release request signal 108 is output as an active signal and sent to the external bus master. When a bus release signal 107 is input as a response from the bus master, the DMA transfer permission signal 109 corresponding to the channel for which the DMA request is issued is output as an active signal, and the request source accepts the DMA transfer. What is done is transmitted.

【0017】また、転送回数ブロック1においては、ア
クティブなDMA転送開始信号103を受けて、入力バ
ッファ3および4が活性化され、モードレジスタ7に格
納されているI/O幅、バス幅および転送方向を示すデ
ータをデコーダ8によりデコードし、その残りの転送バ
イト数が計算されていく。
In the transfer count block 1, the input buffers 3 and 4 are activated in response to the active DMA transfer start signal 103, and the I / O width, bus width and transfer stored in the mode register 7 are transferred. The data indicating the direction is decoded by the decoder 8 and the number of remaining transfer bytes is calculated.

【0018】DMA要求受付けブロック12において受
付けられたDMA転送要求信号は、プライオリティ・エ
ンコーダ13においてエンコードされる。この場合、プ
ライオリティ・エンコーダ13においては、チャネル0
〜3のDMA転送要求の内、最も優先順位の高いチャネ
ルが選択されるが、ここにおける優先順位は、前述の従
来例の場合と同様にチャネル0、1、2、3の順であ
る。エンコードされた要求データは、バスサイクル・シ
ーケンサ・ブロック19により生成される転送開始ステ
ート信号105および転送中断ステート信号106が、
OR回路14を介して何れか一方の信号が“1”レベル
になった時に、Dフリップフロップ15に対するセット
条件となり、その時のプライオリティ・エンコーダ13
の出力が比較器16の一方の入力端に入力される。そし
て、クロック信号102の毎クロックごとのプライオリ
ティ・エンコーダ13の出力が、比較器16のもう一方
の入力端に入力されて、これらの両入力が比較器16に
おいて比較され、両者が等しくない時には、比較器16
より出力されるチャネル切替信号104は“1”レベル
として出力されて、AND回路18に入力される。ま
た、これと同時に、比較器17においては、その時点に
おける転送バイト記憶レジスタ2の内容と、モードレジ
スタ7のデコード出力が定数発生ブロック9に入力され
て、当該定数発生ブロック9より出力される残り転送バ
イト数の値とが比較され、その比較出力は、同様にAN
D回路18に入力される。この場合、比較器17におい
て、転送バイト記憶レジスタ2の内容の値が、定数発生
ブロック9よりの出力値に等しいか、またはそれ以下の
時には、当該比較器17よりは“0”レベルが出力され
る。この比較器17に出力が“0”レベルの場合には、
AND回路18において、比較器16の出力はマスクさ
れる状態となる。これによりチャネル切替信号104の
レベルを抑制することが可能となり、残り転送バイトの
少ない時のチャネル切替え動作が行われないように制御
することができる。
The DMA transfer request signal received by the DMA request receiving block 12 is encoded by the priority encoder 13. In this case, in the priority encoder 13, channel 0
The highest priority channel is selected from the DMA transfer requests of 3 to 3, and the priority order here is the order of channels 0, 1, 2, 3 as in the case of the above-mentioned conventional example. The encoded request data includes a transfer start state signal 105 and a transfer interrupt state signal 106 generated by the bus cycle sequencer block 19.
When either one of the signals becomes the "1" level via the OR circuit 14, the set condition for the D flip-flop 15 is established, and the priority encoder 13 at that time is set.
Is output to one input terminal of the comparator 16. Then, the output of the priority encoder 13 for each clock of the clock signal 102 is input to the other input terminal of the comparator 16 and these two inputs are compared in the comparator 16, and when both are not equal, Comparator 16
The output channel switching signal 104 is output as “1” level and input to the AND circuit 18. At the same time, in the comparator 17, the contents of the transfer byte storage register 2 at that time and the decoded output of the mode register 7 are input to the constant generation block 9, and the remaining output from the constant generation block 9 is performed. The value of the number of transfer bytes is compared, and the comparison output is also the AN.
It is input to the D circuit 18. In this case, when the value of the content of the transfer byte storage register 2 is equal to or less than the output value from the constant generation block 9 in the comparator 17, the "0" level is output from the comparator 17 concerned. It When the output to the comparator 17 is at "0" level,
In the AND circuit 18, the output of the comparator 16 is masked. This makes it possible to suppress the level of the channel switching signal 104, and control so that the channel switching operation is not performed when there are few remaining transfer bytes.

【0019】図3(a)、(b)、(c)、(d)、
(e)、(f)、(g)、(h)、(i)および(j)
に示されるのは、例として、本実施例において、チャネ
ル1におけるDMA転送中に、チャネル0のDMA転送
要求が入った時の動作を示すタイミング図である。図3
において、まずチャネル1のDMA要求信号101が、
時間T1 においてアクティブ(図3において、アクティ
プ・レベルは“0”レベルを意味する)になると、バス
サイクル・シーケンサ・ブロック19より出力されるバ
ス開放要求信号108がアクティブとなり、外部のバス
・マスタに対してバスの開放要求が出される。このバス
開放要求信号108によりバスが開放されると、外部よ
りバスサイクル・シーケンサ・ブロック19に入力され
るバス開放信号107がアクティブとなる。これによ
り、チャネル1に対応するDMA転送許可信号109が
アクティブとなり、チャネル1の転送要求に対応するD
MA転送の開始が、当該要求元に伝達される。そして、
図3に示されるように、チャネル1に対応するDMA転
送許可信号109(図3(e)参照)を受けて、チャネ
ル1のDMA転送が開始される(図3(b)、(c)参
照)。
3 (a), (b), (c), (d),
(E), (f), (g), (h), (i) and (j)
Shown by way of example is a timing chart showing the operation when a DMA transfer request for channel 0 is entered during DMA transfer on channel 1 in the present embodiment. Figure 3
First, the channel 1 DMA request signal 101 is
When it becomes active at time T 1 (active level means “0” level in FIG. 3), the bus release request signal 108 output from the bus cycle sequencer block 19 becomes active, and the external bus master. A bus release request is issued to. When the bus is released by the bus release request signal 108, the bus release signal 107 externally input to the bus cycle sequencer block 19 becomes active. As a result, the DMA transfer permission signal 109 corresponding to channel 1 becomes active, and D corresponding to the channel 1 transfer request is sent.
The start of MA transfer is transmitted to the request source. And
As shown in FIG. 3, upon receiving the DMA transfer permission signal 109 corresponding to channel 1 (see FIG. 3E), the DMA transfer of channel 1 is started (see FIGS. 3B and 3C). ).

【0020】このようにして、チャネル1においてDM
A転送が実行されている途中過程において、図3(f)
に示されるように、時間T2 においてチャネル0のDM
A要求信号101がアクティブになると、チャネル0の
方がチャネル1よりも優先順位が高いにもかかわらず、
この時点におけるチャネル1のDMA転送における残り
の転送回数が1回であるために、前述のように、チャネ
ル切替信号104(図3(j)参照)は“0”レベルに
抑制されて、チャネル1よりチャネル1に対するDMA
転送切替えが行われない。そして、チャネル1のDMA
転送終了後において、チャネル0のDMA転送のため
に、バス開放要求信号108がアクティブとなり、バス
開放信号107がアクティブとなって、時間T3 におい
てDMA転送許可信号109がアクティブになり、チャ
ネル0のDMA転送が開始される(図3(b)、(c)
参照)。なお、図3に示される動作状態においては、本
実施例により、従来例による場合に比較して、チャネル
0および1の両チャネルのDMA転送終了に要する時間
として、11クロック分の転送時間を短縮することが可
能となっている。
In this way, DM in channel 1
In the middle of the A transfer being executed, FIG.
, DM of channel 0 at time T 2
When the A request signal 101 becomes active, although channel 0 has a higher priority than channel 1,
Since the number of remaining transfers in the DMA transfer of the channel 1 at this point is one, the channel switching signal 104 (see FIG. 3 (j)) is suppressed to the “0” level and the channel 1 is transferred as described above. DMA for channel 1
Transfer switching does not occur. And channel 1 DMA
After the transfer is completed, the bus release request signal 108 becomes active, the bus release signal 107 becomes active, and the DMA transfer permission signal 109 becomes active at time T 3 for the DMA transfer of the channel 0. DMA transfer is started (FIGS. 3B and 3C).
reference). In the operation state shown in FIG. 3, the transfer time of 11 clocks is shortened as the time required to complete the DMA transfer of both channels 0 and 1 by the present embodiment as compared with the case of the conventional example. It is possible to do.

【0021】次に、図2に示されるのは、本発明の第2
の実施例を示すブロック図である。図1に示されるよう
に、本実施例は、転送バイト記憶レジスタ2、入力バッ
ファ3、4および加減算器5を含む転送回数ブロック1
と、モード・レジスタ7およびデコーダ8を含む転送モ
ード・ブロック6と、内部にレジスタ20を含む定数発
生ブロック9と、DMA要求受付けブロック12、プラ
イオリティ・エンコーダ13、OR回路14、Dフリッ
プフロップ15、比較器16、17およびAND回路1
8を含むDMA受付けブロック11と、バスサイクル・
シーケンサ・ブロック19とを備えて構成される。図1
と図2とを対比して分かるように、本実施例の第1の実
施例との相違点は、定数発生ブロック9における定数の
記憶手段として、ROMの代りにレジスタが用いられて
いることである。なお、本実施例の動作については、D
MA転送が開始される前に、定数発生ブロック9の内部
のレジスタ20に、予め所定の定数値を設定すること以
外の総合動作については、前述の第1の実施例の場合と
全く同様であり、その説明は省略する。
Next, FIG. 2 shows the second embodiment of the present invention.
It is a block diagram showing an example of. As shown in FIG. 1, in this embodiment, a transfer count block 1 including a transfer byte storage register 2, input buffers 3 and 4, and an adder / subtractor 5 is provided.
A transfer mode block 6 including a mode register 7 and a decoder 8, a constant generation block 9 including a register 20 therein, a DMA request acceptance block 12, a priority encoder 13, an OR circuit 14, a D flip-flop 15, Comparators 16 and 17 and AND circuit 1
DMA receiving block 11 including 8 bus cycles
A sequencer block 19 is provided. Figure 1
As can be seen by comparing FIG. 2 with FIG. 2, the difference from the first embodiment of the present embodiment is that a register is used instead of the ROM as the constant storage unit in the constant generation block 9. is there. Regarding the operation of this embodiment, D
The general operation other than the setting of a predetermined constant value in the register 20 inside the constant generation block 9 before the MA transfer is started is exactly the same as in the case of the first embodiment. , The description is omitted.

【0022】[0022]

【発明の効果】以上説明したように、本発明は、優先順
位の低いチャネルのDMA転送過程において、優先順位
の高いチャネルのDMA転送要求が出された場合におい
ても、前記優先順位の低いチャネルにおける残り転送回
数が少ない時点においては、当該残り転送回数値を判定
することにより、優先順位の高いチャネルに対するチャ
ネル切替えを行うことなく、これにより、総体的に各チ
ャネルのDMA転送時間を短縮することができるという
効果がある。
As described above, according to the present invention, in the DMA transfer process of the low priority channel, even if the DMA transfer request of the high priority channel is issued, the low priority channel is processed in the low priority channel. When the remaining transfer count is small, the remaining transfer count value is determined, so that the DMA transfer time of each channel can be shortened as a whole without performing channel switching to a channel having a higher priority. The effect is that you can do it.

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

【図1】本発明の第1の実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】本発明の第2の実施例を示すブロック図であ
る。
FIG. 2 is a block diagram showing a second embodiment of the present invention.

【図3】本発明における動作を示すタイミング図であ
る。
FIG. 3 is a timing diagram showing the operation of the present invention.

【図4】従来例を示すブロック図である。FIG. 4 is a block diagram showing a conventional example.

【図5】従来例における動作を示すタイミング図であ
る。
FIG. 5 is a timing chart showing an operation in a conventional example.

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

1 転送回数ブロック 2 転送バイト記憶レジスタ 3、4 入力バッファ 5 加減算器 6 転送モード・ブロック 7 モード・レジスタ 8 デコーダ 9 定数発生ブロック 10 ROM 11 DMA受付けブロック 12 DMA要求受付けブロック 13 プライオリティ・エンコーダ 14 OR回路 15 Dフリップフロップ 16、17 比較器 18 AND回路 19 バスサイクル・シーケンサ・ブロック 20 レジスタ 1 Transfer Count Block 2 Transfer Byte Storage Register 3, 4 Input Buffer 5 Adder / Subtractor 6 Transfer Mode Block 7 Mode Register 8 Decoder 9 Constant Generation Block 10 ROM 11 DMA Accepting Block 12 DMA Request Accepting Block 13 Priority Encoder 14 OR Circuit 15 D flip-flop 16, 17 comparator 18 AND circuit 19 bus cycle sequencer block 20 register

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 外部からのデータ転送要求を受けて、D
MAデータ転送を行うDMAコントローラにおいて、 予めDMAデータの転送バイト数を設定しておき、転送
の開始に伴ない残りバイト数が更新されてゆく転送バイ
ト記憶レジスタと、 前記転送バイト記憶レジスタの記憶内容を更新するため
の加減算器と、 DMAデータ転送を行うチャネルの転送モード、I/O
ポート幅およびバス幅を指定するモード・レジスタと、 前記モード・レジスタの内容をデコードするデコーダと
DMAデータ転送時に、前記デコーダの出力を受けて、
予め格納されている所定の定数を出力する定数発生ブロ
ックと、 外部からの各チャネルのデータ転送要求信号を受付け
て、各チャネルのDMA要求ならびにDMA転送開始信
号を出力するDMA要求受付けブロックと、 前記DMA要求受付けブロックの出力をエンコードする
プライオリティ・エンコーダと、 特定のレベル信号をS端子に受けてセットされ、前記プ
ライオリティ・エンコーダの出力をD端子に入力し、外
部からのクロック信号をCLK端子に入力することによ
り動作するDフリップフロップと、 前記プライオリティ・エンコーダの出力と、前記Dフリ
ップフロップの出力とを比較して、これらの両出力が等
しくない時に“1”レベルを出力する第1の比較器と、 前記転送バイト記憶レジスタの出力と、前記定数発生ブ
ロックの出力とを比較して、前記転送バイト記憶レジス
タの出力が、前記定数発生ブロックの出力に等しいか、
またはそれ以下である場合においては“0”レベルを出
力し、また前記転送バイト記憶レジスタの出力が、前記
定数発生ブロックの出力よりも大きい場合においては
“1”レベルを出力する第2の比較器と、 前記第1および第2の比較器の出力の論理積をとり、チ
ャネル切替信号として出力するAND回路と、 前記DMA要求受付けブロックから出力されるDMA転
送開始信号と、前記AND回路から出力されるチャネル
切替え信号との入力に対応して、バス開放要求信号を出
力するとともに、外部からのバス開放信号の入力を受け
て、外部に対してDMA転送許可信号を出力し、内部に
対しては、転送開始ステート信号または転送中断ステー
ト信号を出力するバスサイクル・シーケンサ・ブロック
と、 前記転送開始ステート信号および前記転送中断ステート
信号の論理和をとり、前記特定のレベル信号として、前
記DフリップフロップのS端子に出力するOR回路と、 を備えることを特徴とするDMAコントローラ。
1. Upon receiving a data transfer request from the outside, D
In a DMA controller that performs MA data transfer, the transfer byte number of the DMA data is set in advance, and the transfer byte storage register in which the remaining byte number is updated with the start of transfer, and the storage content of the transfer byte storage register And adder / subtractor for updating the I / O
A mode register that specifies a port width and a bus width, a decoder that decodes the contents of the mode register, and a DMA data transfer that receives the output of the decoder,
A constant generation block that outputs a predetermined constant stored in advance; a DMA request reception block that receives an external data transfer request signal for each channel and outputs a DMA request for each channel and a DMA transfer start signal; A priority encoder that encodes the output of the DMA request acceptance block, and a specific level signal that is set by receiving on the S terminal, the output of the priority encoder is input to the D terminal, and an external clock signal is input to the CLK terminal. A first comparator that compares the output of the priority encoder and the output of the D flip-flop, and outputs a "1" level when these outputs are not equal. The output of the transfer byte storage register and the constant generation block. By comparing the output and the output of the transfer byte storage register is equal to the output of the constant generator block,
A second comparator which outputs a "0" level when it is less than or equal to it, and outputs a "1" level when the output of the transfer byte storage register is larger than the output of the constant generation block. And an AND circuit for taking the logical product of the outputs of the first and second comparators and outputting it as a channel switching signal, a DMA transfer start signal output from the DMA request acceptance block, and an output from the AND circuit. In response to the input of the channel switching signal, the bus release request signal is output, the external bus release signal is received, the DMA transfer permission signal is output to the outside, and the A bus cycle sequencer block that outputs a transfer start state signal or a transfer suspend state signal, ORs the transfer interrupt state signal, said a particular level signals, DMA controller, characterized in that it comprises an OR circuit for outputting the S terminal of the D flip-flop.
【請求項2】 前記定数発生ブロックの記憶手段が、R
OMにより構成される請求項1記載のDMAコントロー
ラ。
2. The storage means of the constant generation block is R
The DMA controller according to claim 1, which is configured by an OM.
【請求項3】 前記定数発生ブロックの記憶手段が、レ
ジスタにより構成される請求項1記載のDMAコントロ
ーラ。
3. The DMA controller according to claim 1, wherein the storage means of the constant generation block is composed of a register.
JP20991092A 1992-08-06 1992-08-06 DMA controller Expired - Lifetime JP2821321B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20991092A JP2821321B2 (en) 1992-08-06 1992-08-06 DMA controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20991092A JP2821321B2 (en) 1992-08-06 1992-08-06 DMA controller

Publications (2)

Publication Number Publication Date
JPH0660012A true JPH0660012A (en) 1994-03-04
JP2821321B2 JP2821321B2 (en) 1998-11-05

Family

ID=16580682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20991092A Expired - Lifetime JP2821321B2 (en) 1992-08-06 1992-08-06 DMA controller

Country Status (1)

Country Link
JP (1) JP2821321B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008035616A1 (en) * 2006-09-20 2008-03-27 Panasonic Corporation Data transfer device and mobile telephone

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008035616A1 (en) * 2006-09-20 2008-03-27 Panasonic Corporation Data transfer device and mobile telephone
US7908411B2 (en) 2006-09-20 2011-03-15 Panasonic Corporation Data transfer device and mobile telephone
JP5094727B2 (en) * 2006-09-20 2012-12-12 パナソニック株式会社 Data transfer device and mobile phone

Also Published As

Publication number Publication date
JP2821321B2 (en) 1998-11-05

Similar Documents

Publication Publication Date Title
US4799199A (en) Bus master having burst transfer mode
US4236213A (en) Apparatus for producing pulse width modulated signals
KR100255683B1 (en) Single-chip computer system having a direct memory access (dma) mode
JPH03188546A (en) Bus interface control system
JPH03139726A (en) Instruction readout control system
JP2548428B2 (en) Timing generator
JP2821321B2 (en) DMA controller
US5481753A (en) I/O device having identification register and data register where identification register indicates output from the data register to be an identifier or normal data
US20210117345A1 (en) Multi-threaded architecture for memory controller data paths
KR100324597B1 (en) Bit Stream Processor
JPH07134642A (en) Data transfer device
KR100267767B1 (en) Interrupt generator
JPH10224410A (en) Data transfer system
JP2704135B2 (en) Control device
JPH04138555A (en) Parallel type digital signal processor
JP3117214B2 (en) Sequencer microprogram control method
JPH03242775A (en) Microprocessor
JPH0736819A (en) Dma data transfer device
JP2003271549A (en) Semiconductor integrated circuit for communication control
JPS61183764A (en) Direct memory access controlling system
JPS6349960A (en) Bus controller
JPH11242651A (en) Interface
JPH01315858A (en) Data transfer control method and device
JPH01191965A (en) Serial bus access system
JPH09231188A (en) Multicluster information processing system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980728