JPH04255056A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPH04255056A
JPH04255056A JP1463991A JP1463991A JPH04255056A JP H04255056 A JPH04255056 A JP H04255056A JP 1463991 A JP1463991 A JP 1463991A JP 1463991 A JP1463991 A JP 1463991A JP H04255056 A JPH04255056 A JP H04255056A
Authority
JP
Japan
Prior art keywords
transfer
block
data
mode
bytes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1463991A
Other languages
Japanese (ja)
Inventor
Yoshio Murota
室田 美穂
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1463991A priority Critical patent/JPH04255056A/en
Publication of JPH04255056A publication Critical patent/JPH04255056A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To execute sure data transfer free from overrun even in a high operation frequency state by switching a transfer mode to single transfer with slow speed at the fixed number of bytes before the interruption of transfer. CONSTITUTION:A current count register block (CCR block) 11 in a count register block 1 calculates the number of remaining bytes not to be transferred to a memory (not shown). The remaining transfer byte number data 201 calculated by the block 11 are inputted to a control register block 2. Data for turning a low active DMARQ signal into an inactive state in each fixed number of bytes and interrupting transfer are stored in a transfer unit specifying register in a mask circuit 12 built in the block 2. At the time of transferring a demand or a block, the low active DMARQ is turned to the inactive state. Namely the transfer mode is switched to the single transfer before the end of transfer of each transfer unit.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、DMAコントローラに
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA controller.

【0002】0002

【従来の技術】従来、使用されているDMAコントロー
ラは、I/Oデバイスとメモリ間、またはメモリとメモ
リ間でのデータ転送を高速に行うため、3種類の転送モ
ードを持つDMA転送を行う。
2. Description of the Related Art Conventionally used DMA controllers perform DMA transfer with three types of transfer modes in order to transfer data between an I/O device and memory or between memories at high speed.

【0003】この3通りの方法とは、DMA転送が1回
終了するごとにバスを解放するシングル転送、サービス
・チャネルのDMA転送要求がある限りか又はより優先
順位の高いチャネルのDMA転送要求があるまで転送を
続けるディマンド転送、カウント・レジスタのカウント
・ダウン終了または外部から転送終了信号が入力される
までDMA転送を続けるブロック転送で、いずれのモー
ドで転送するかはモード・レジスタによって選択される
。このうちディマンド転送とブロック転送はほぼ同じス
ピードで、共にシングル転送の転送速度の約2倍である
These three methods are: single transfer, in which the bus is released every time a DMA transfer is completed; The mode register selects which mode to transfer between demand transfer, which continues DMA transfer until the end of the count register countdown, or block transfer, which continues DMA transfer until the end of the count register or an external transfer end signal is input. . Among these, demand transfer and block transfer have almost the same speed, and both are about twice the transfer speed of single transfer.

【0004】ここでシングル転送とディマンド転送のタ
イミングの一例を図5及び図6を用いて説明する。
[0004] Here, an example of the timing of single transfer and demand transfer will be explained using FIGS. 5 and 6.

【0005】(1)シングル転送 図5に示すように、T1ステートのクロックの立ち上が
りでロウアクティブのDMARQ信号(以下、  DM
ARQ信号という)をサンプリングし、“L”の場合T
Hステートに移る。THステートでは、  HLDRQ
信号をクロックの立ち上がりで、“L”にしてCPUに
対しバスの占有を要求する。次にCPUからの  HL
DACK信号をTHステートのクロックの立ち上がりで
サンプリングし、“L”になるまでTHステートを繰り
返し、  HLDACK信号が“L”になるとT1ステ
ートに移る。T1ステートでアドレス、バス制御信号を
出力し、  BCYST信号を“L”にする。次にステ
ートはT2ステートになる。T2ステートの次のクロッ
クの立ち上がりで、  READYI信号が“H”なら
ばウェイトステートが挿入される。  READY信号
がアクティブになるとステートはT1に遷移する。
(1) Single transfer As shown in FIG. 5, a low active DMARQ signal (hereinafter referred to as DM
ARQ signal) is sampled, and if it is “L”, T
Move to H state. In TH state, HLDRQ
At the rising edge of the clock, the signal is set to "L" to request the CPU to occupy the bus. Next, HL from CPU
The DACK signal is sampled at the rising edge of the TH state clock, and the TH state is repeated until it becomes "L". When the HLDACK signal becomes "L", it moves to the T1 state. In the T1 state, address and bus control signals are output, and the BCYST signal is set to “L”. The state then becomes the T2 state. At the rising edge of the next clock after the T2 state, if the READYI signal is "H", a wait state is inserted. When the READY signal becomes active, the state transitions to T1.

【0006】(2)  ディマンド転送図6に示すよう
に、T1ステートのクロックの立ち上がりで、  DM
ARQ信号をサンプリングし、“L”の時DMAサイク
ルが始まる。T2ステートの立ち上がりで、  DMA
RQ信号が“L”の時、その次のクロックの立ち上がり
で  READYI信号をサンプリングし、“L”なら
ばT1ステートに移り、DMA転送サイクルを継続する
。  DMARQ信号が“H”で、  TC、  EO
P、  BERRが“L”ならばT1ステートを終了す
る。
(2) Demand transfer As shown in FIG. 6, at the rising edge of the clock in the T1 state, DM
The ARQ signal is sampled and a DMA cycle starts when it is "L". At the rise of T2 state, DMA
When the RQ signal is "L", the READYI signal is sampled at the next rising edge of the clock, and if it is "L", it moves to the T1 state and continues the DMA transfer cycle. DMARQ signal is “H”, TC, EO
If P and BERR are "L", the T1 state ends.

【0007】[0007]

【発明が解決しようとする課題】図7に示すように、デ
ィマンド転送やブロック転送で高速に転送を行う場合、
周波数が高くなるなどでスピードが上がってデータ転送
がオーバーランしてしまうことがある。
[Problems to be Solved by the Invention] As shown in FIG. 7, when performing high-speed transfer using demand transfer or block transfer,
As the frequency increases, the speed increases and data transfer may overrun.

【0008】ディマンド転送に例を取ってみる。例えば
、ハードディスクとの転送では256バイト毎に  D
MARQ信号がインアクティブになりデータ転送が中断
される。ところが、周波数が高くなって  DMARQ
信号がLになるのがT2ステートにずれ込んだ場合、 
 DMARQ信号はサンプリングの行われるT2の立ち
上がりではまだアクティブである為DMAコントローラ
は転送は継続されると判断して、1回余分に転送を実行
してしまうことになる。
[0008] Let us take an example of demand transfer. For example, when transferring to a hard disk, D is sent every 256 bytes.
The MARQ signal becomes inactive and data transfer is interrupted. However, as the frequency increases, DMARQ
If the signal becomes L but shifts to the T2 state,
Since the DMARQ signal is still active at the rising edge of T2 when sampling is performed, the DMA controller determines that the transfer will continue, and ends up executing the transfer one more time.

【0009】本発明の目的は、動作周波数の高い状態で
もオーバーランの危険のない確実なデータ転送が行える
DMAコントローラを提供することにある。
An object of the present invention is to provide a DMA controller that can perform reliable data transfer without the risk of overrun even at high operating frequencies.

【0010】0010

【課題を解決するための手段】本発明は、シングル転送
モードと連続転送モードをレジスタによって指定するD
MAコントローラに於いて、転送単位指定レジスタと、
連続転送モード時に前記転送単位の転送終了前にシング
ル転送に切り替える変換手段とを有する。
[Means for Solving the Problems] The present invention provides a D
In the MA controller, a transfer unit specification register,
and conversion means for switching to single transfer before the end of transfer of the transfer unit in continuous transfer mode.

【0011】[0011]

【実施例】以下図面を参照して本発明の実施例につき詳
細に説明する。図1は本発明の一実施例のブロック図で
ある。カウント・レジスタ・ブロック1の一部であるカ
レント・カウント・レジスタブロック11(以降CCR
ブロックと略す)は、メモリに対しまだ転送が行われて
いない残りバイト数を計算する。このCCRブロック1
1で計算された残り転送バイト数データ201を制御レ
ジスタ・ブロック2に入力する構成となっている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Examples of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram of one embodiment of the present invention. Current count register block 11 (hereinafter referred to as CCR) is a part of count register block 1.
block) calculates the number of remaining bytes that have not yet been transferred to memory. This CCR block 1
The remaining transfer byte count data 201 calculated in step 1 is input to the control register block 2.

【0012】図2は制御レジスタブロック2内部の概略
図である。転送単位指定レジスタ102内には、何バイ
ト毎に  DMARQ信号がインアクティブになり転送
が中断されるかのデータが格納されている。上位ビット
マスク回路103はCCRブロック11の出力201(
24ビット)の上位ビット(例えば、転送単位バイト数
が256バイトならビット8以上のビット、64バイト
ならビット6以上のビット)を“0”にマスクする。
FIG. 2 is a schematic diagram of the inside of the control register block 2. As shown in FIG. The transfer unit designation register 102 stores data indicating every byte at which the DMARQ signal becomes inactive and the transfer is interrupted. The upper bit mask circuit 103 outputs the output 201 (
24 bits) (for example, if the transfer unit byte number is 256 bytes, bits 8 and above, and if the transfer unit number is 64 bytes, bits 6 and above) are masked to "0".

【0013】比較回路104はモード・レジスタA10
1からポート幅ビット207及びバス幅ビット208を
とりこむ。メモリ・メモリ転送の時、つまり入力信号M
  Mがアクティブの時はバス幅ビット、メモリ・IO
転送の時(他のブロックからの入力信号M  M205
がインアクティブの時)は、バス幅とポート幅の小さい
方のビットを比較回路104で選び、それが1バスサイ
クルで転送される転送バイト数を決定する。下位ビット
マスク回路105ではこの転送バイト数の立っているビ
ットまで(4ビット転送なら下位3ビット、2バイト転
送なら下位2ビット)を“0”でマスクする。このマス
クされた出力202がオール“0”の間、つまり、指定
単位の転送が終了し、転送が中断する前の2バスサイク
ルの間、オール0検出回路14はストローブ信号203
を出力する。
Comparison circuit 104 includes mode register A10.
The port width bit 207 and bus width bit 208 are taken in from 1. At the time of memory-to-memory transfer, that is, input signal M
When M is active, bus width bit, memory/IO
At the time of transfer (input signal from other block M M205
is inactive), the comparison circuit 104 selects the smaller bit of the bus width and port width, which determines the number of transfer bytes transferred in one bus cycle. The lower bit mask circuit 105 masks the bits up to which the transfer byte number is set (lower 3 bits for 4-bit transfer, lower 2 bits for 2-byte transfer) with "0". While this masked output 202 is all "0", that is, for two bus cycles after the transfer of the specified unit is completed and before the transfer is interrupted, the all-0 detection circuit 14 outputs the strobe signal 203.
Output.

【0014】転送モード変換回路14では、モードレジ
スタ110に格納された転送モード情報を取り込む。デ
ィマンド転送もしくはブロック転送の場合はモード選択
回路111がストローブ信号206を出し、オール0検
出回路13からのストローブ信号203が出ている間つ
まり転送が中断される前の最後の2バスサイクルの間だ
けシングル転送を行うよう、出力204は他のブロック
にモードを指定する。
Transfer mode conversion circuit 14 takes in transfer mode information stored in mode register 110. In the case of demand transfer or block transfer, the mode selection circuit 111 outputs the strobe signal 206, and only while the strobe signal 203 from the all-0 detection circuit 13 is output, that is, during the last two bus cycles before the transfer is interrupted. Output 204 specifies the mode for other blocks to perform a single transfer.

【0015】次に図3を参照して本発明の他の実施例に
つき詳細に説明する。図2は本実施例のモードレジスタ
A内情報の図である。本来未定義であったビット5を転
送モード変換を行うか否かの情報を持つ転送モード変換
ビット209とし、“0”ならば転送モード変換無し、
“1”ならば転送モード変換ありとする。
Next, another embodiment of the present invention will be described in detail with reference to FIG. FIG. 2 is a diagram of information in mode register A of this embodiment. Bit 5, which was originally undefined, is set as transfer mode conversion bit 209, which has information on whether or not to perform transfer mode conversion.If it is "0", no transfer mode conversion is performed;
If it is "1", it is assumed that transfer mode conversion has occurred.

【0016】図4は本実施例のブロック図である。本実
施例と第1の実施例との相違は、モードレジスタA11
0のビット5からの出力209とセレクタ16のみであ
る。転送モード変換を行うか否かをモードレジスタA1
10のビット5  209で指定する。ビット5が“0
”の場合はセレクタ16から転送モード変換回路15へ
の入力は常に“0”となり、転送モード変換は行われな
い。
FIG. 4 is a block diagram of this embodiment. The difference between this embodiment and the first embodiment is that the mode register A11
There is only output 209 from bit 5 of 0 and selector 16. Mode register A1 indicates whether or not to perform transfer mode conversion.
Specify with bit 5 209 of 10. Bit 5 is “0”
”, the input from the selector 16 to the transfer mode conversion circuit 15 is always “0” and no transfer mode conversion is performed.

【0017】[0017]

【発明の効果】ディマンド転送もしくはブロック転送時
に、  DMARQがインアクティブになる、つまり転
送が中断する一定バイト前になるとスピードの遅いシン
グル転送に転送モードを切り替ることにより、動作周波
数の高い状態でもオーバーランの危険のない確実なデー
タ転送が行える。
[Effects of the Invention] During demand transfer or block transfer, when DMARQ becomes inactive, that is, a certain number of bytes before the transfer is interrupted, the transfer mode is switched to a slow single transfer, thereby preventing overflow even at high operating frequencies. Data can be transferred reliably without the risk of running.

【図面の簡単な説明】[Brief explanation of the drawing]

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

【図2】図1内の制御レジスタブロック内の概略図であ
る。
FIG. 2 is a schematic diagram within the control register block in FIG. 1;

【図3】本発明の第2の実施例のモードレジスタA内の
情報概略図である。
FIG. 3 is a schematic diagram of information in mode register A of a second embodiment of the invention.

【図4】第2の実施例のブロック図である。FIG. 4 is a block diagram of a second embodiment.

【図5】シングル転送時のタイミング図である。FIG. 5 is a timing diagram during single transfer.

【図6】ディマンド転送時のタイミング図である。FIG. 6 is a timing diagram during demand transfer.

【図7】ディマンド転送でオーバーランが起こった場合
のタイミング図である。
FIG. 7 is a timing diagram when an overrun occurs in demand transfer.

【符号の説明】 1    カウント・レジスタ・ブロック2    制
御レジスタ・ブロック 3    DMAコントローラ内の他のブロック11 
   カレント・カウント・レジスタ・ブロック12 
   マスク回路 13    オール0検出回路 14    転送モード変換回路 15    制御レジスタ内の他のブロック16   
 セレクタ 101    モードレジスタA 102    転送単位指定レジスタ 103    上位ビットマスク回路 104    比較回路 105    下位ビットマスク回路 110    モードレジスタ 111    モード選択回路 201    残り転送バイト数データ202    
マスク後の残り転送バイト数データ203,206  
  ストローブ信号204    転送モード指定デー
タ 205    入力信号M  M 207    ポート幅データ 208    バス幅データ
[Explanation of symbols] 1 Count register block 2 Control register block 3 Other blocks 11 in the DMA controller
Current count register block 12
Mask circuit 13 All 0 detection circuit 14 Transfer mode conversion circuit 15 Other blocks 16 in the control register
Selector 101 Mode register A 102 Transfer unit specification register 103 Upper bit mask circuit 104 Comparison circuit 105 Lower bit mask circuit 110 Mode register 111 Mode selection circuit 201 Remaining transfer byte number data 202
Remaining transfer byte count data after masking 203, 206
Strobe signal 204 Transfer mode specification data 205 Input signal M M 207 Port width data 208 Bus width data

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  シングル転送モードと連続転送モード
をレジスタによって指定するDMAコントローラに於い
て、転送単位指定レジスタと、連続転送モード時に前記
転送単位の転送終了前にシングル転送に切り替える変換
手段とを有することを特徴とするDMAコントローラ。
1. A DMA controller that specifies a single transfer mode and a continuous transfer mode by a register, comprising a transfer unit specification register and a conversion means for switching to single transfer before the end of transfer of the transfer unit in the continuous transfer mode. A DMA controller characterized by:
JP1463991A 1991-02-06 1991-02-06 Dma controller Pending JPH04255056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1463991A JPH04255056A (en) 1991-02-06 1991-02-06 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1463991A JPH04255056A (en) 1991-02-06 1991-02-06 Dma controller

Publications (1)

Publication Number Publication Date
JPH04255056A true JPH04255056A (en) 1992-09-10

Family

ID=11866771

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1463991A Pending JPH04255056A (en) 1991-02-06 1991-02-06 Dma controller

Country Status (1)

Country Link
JP (1) JPH04255056A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009193282A (en) * 2008-02-14 2009-08-27 Sharp Corp Data processing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009193282A (en) * 2008-02-14 2009-08-27 Sharp Corp Data processing apparatus

Similar Documents

Publication Publication Date Title
US5339395A (en) Interface circuit for interfacing a peripheral device with a microprocessor operating in either a synchronous or an asynchronous mode
US8176221B2 (en) DMA controller
KR940005346B1 (en) Computer system ensuring the timing separability between the consecutive r/w signals
US6806872B2 (en) Video signal processing system
CN112802518A (en) Data writing method, system-on-chip and computer readable storage medium
KR100395383B1 (en) Data transfer apparatus
US3961312A (en) Cycle interleaving during burst mode operation
JPH04255056A (en) Dma controller
JP2536415B2 (en) DMA transfer control device
JP2624388B2 (en) DMA device
JPH01258163A (en) Direct memory access controller
JPH0876876A (en) Clock supply control circuit of microprocessor
JPH0222748A (en) Non-volatile memory control circuit
JPH10326248A (en) Dma controller
JP2635863B2 (en) Central processing unit
JPH0258152A (en) Microprocessor
JPS62120561A (en) Data transfer system
JPH0850567A (en) Data transfer device
JPH07182266A (en) Interface device
JP2719227B2 (en) Processing equipment
JP2002222161A (en) Semiconductor device, and method of transferring data
JPS61183764A (en) Direct memory access controlling system
JP2006164119A (en) Data processing unit
JPH05314059A (en) Memory access control circuit
JPS60142768A (en) Data transfer device