JPH0736821A - Dma transfer controller - Google Patents

Dma transfer controller

Info

Publication number
JPH0736821A
JPH0736821A JP18296093A JP18296093A JPH0736821A JP H0736821 A JPH0736821 A JP H0736821A JP 18296093 A JP18296093 A JP 18296093A JP 18296093 A JP18296093 A JP 18296093A JP H0736821 A JPH0736821 A JP H0736821A
Authority
JP
Japan
Prior art keywords
data
transfer
dma
register
channel
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
JP18296093A
Other languages
Japanese (ja)
Other versions
JP2536415B2 (en
Inventor
Tomokazu Enami
智和 榎並
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 JP5182960A priority Critical patent/JP2536415B2/en
Publication of JPH0736821A publication Critical patent/JPH0736821A/en
Application granted granted Critical
Publication of JP2536415B2 publication Critical patent/JP2536415B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To provide a DMA transfer controller capable of quickly resetting the control of a bus when a DMA transfer request is stopped on the way of data packing/unpacking transfer, and at the time of restarting DMA transfer, surely and continuously transferring remaining data. CONSTITUTION:This DMA transfer controller has a DMA internal data V register 104 having capacity for holding data displaced by an input aligner in each channel, a valid bit register 124 for updating and storing the holding state of data held in each channel in each bus cycle, a means for releasing bus control in a succeeding bus cycle when a DMA transfer request is stopped, and a means for restarting the transfer of data held due to interruption at the time of generating a DMA transer restart request for an interrupted channel.

Description

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

【0001】[0001]

【産業上の利用分野】データ転送装置に関し、特に直接
メモリアクセス転送(以下DMA転送と称す)に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer device, and more particularly to a direct memory access transfer (hereinafter referred to as a DMA transfer).

【0002】[0002]

【従来の技術】CPUの性能向上の一方でI/O装置の
処理転送速度が向上されないため、データ転送を専門に
行なうDMA転送方式に、そのデータ転送処理速度の違
いを緩衡する機能を持たせた、データパック/アンパッ
ク方式がある。
2. Description of the Related Art Since the processing transfer rate of an I / O device is not improved while the performance of a CPU is improved, a DMA transfer method that specializes in data transfer has a function of balancing the difference in the data transfer processing speed. There is a data pack / unpack method.

【0003】データパック方式を図3に、データアンパ
ック方式を図4に示す。
FIG. 3 shows the data pack method and FIG. 4 shows the data unpack method.

【0004】データパック方式は、DMA転送制御装置
がデータバス幅の狭い転送元装置(ソース側)から、デ
ータバス幅の広い転送先装置(デスティネーション側)
へデータを転送しようとするときに、DMA転送制御装
置のバス制御権の専有時間をできるだけ短くする目的を
有する。
In the data pack method, the DMA transfer control device operates from a transfer source device (source side) having a narrow data bus width to a transfer destination device (destination side) having a wide data bus width.
It has the purpose of shortening the exclusive time of the bus control right of the DMA transfer control device when data is transferred to.

【0005】図3は、8ビットのデータバス幅をもつI
/O装置から32ビットのデータバス幅を持つメモリ装
置へデータを転送する例を示す図である。DMA転送制
御装置はI/O側からの転送要求を受け付けるとバスマ
スタとなって、最初のバスサイクルで、バス制御信号の
『(ソース側である)I/O装置に対する読み出し』信
号を出力し、ソース側であるI/O装置からデータを出
力させ、その8ビットのデータをDMA転送制御装置内
部の32ビットレジスタへ取り込む。続くバスサイクル
でも同様のバスサイクルを駆動し、これをデスティネー
ション側のデータバス幅である32ビットのデータを取
り込むまで4回行なわれる。そして、最後にDMA制御
装置はバスマスタとして、バス制御信号『(デスティネ
ーション側である)メモリに対する書き込み』信号を出
力し、DMA転送装置が取り込んだデータを出力して、
メモリに32ビットの転送データを書き込む、という手
順を踏む。以降は予め設定したカウント数が0になるま
で繰り返す。特に、本転送の場合、残り転送バイト数が
3バイト以下の時、残りカウント数分の読み込みバスサ
イクル発生後、強制的にDMA内部のデータをデスティ
ネーション側に書き込みを行なわせてかつ、有効なデー
タをバイト単位にバイトイネーブル信号等で示す。
FIG. 3 shows an I having a data bus width of 8 bits.
FIG. 6 is a diagram showing an example of transferring data from an / O device to a memory device having a data bus width of 32 bits. When the DMA transfer control device receives a transfer request from the I / O side, it becomes a bus master and outputs a "read to I / O device (at the source side)" signal of the bus control signal in the first bus cycle. Data is output from the I / O device on the source side, and the 8-bit data is taken into a 32-bit register inside the DMA transfer control device. In the subsequent bus cycle, the same bus cycle is driven, and this is repeated four times until the data of 32 bits which is the data bus width on the destination side is fetched. Then, finally, the DMA control device, as a bus master, outputs a bus control signal "write to memory (at the destination side)" signal and outputs the data taken in by the DMA transfer device.
The procedure of writing 32-bit transfer data in the memory is performed. After that, the process is repeated until the preset count number becomes zero. In particular, in the case of this transfer, when the number of remaining transfer bytes is 3 bytes or less, the data in the DMA is forcibly written to the destination side after the read bus cycle for the remaining count occurs, and it is effective. Data is indicated in byte units by a byte enable signal or the like.

【0006】データアンパック方式は、DMA転送装置
がデータバス幅の広い転送元装置(ソース側)から、デ
ータバス幅の狭い転送先装置(デスディネーション側)
へデータを転送しようとするときに、DMA転送制御装
置のバス制御権の専有時間をできるだけ短くする目的を
有する。
In the data unpacking method, the DMA transfer device operates from a transfer source device (source side) having a wide data bus width to a transfer destination device (destination side) having a narrow data bus width.
It has the purpose of shortening the exclusive time of the bus control right of the DMA transfer control device when data is transferred to.

【0007】図4は、32ビットのデータバス幅を持つ
メモリ装置から、16ビットのデータバス幅をもつI/
O装置へデータを転送する例を示す図である。DMAは
I/O側からの転送要求を受け付けるとバスマスタとな
り、最初のバスサイクルで、バス制御信号『(ソース側
である)メモリ装置に対する読み出し』信号を出力し、
ソース側であるメモリ装置からデータを出力させ、その
32ビットのデータをDMA転送制御装置内部の32ビ
ットレジスタへ取り込む。続くバスサイクルではデータ
パック方式とは異なり、デスティネーション側のバス幅
の方が狭いので、16ビットずつエンディアン方向に合
わせて、バス制御信号『(デスティネーション側であ
る)I/O装置に対する書き込み』信号を出力し、DM
A転送制御装置が取り込んだデータを出力して、I/O
装置に16ビットの転送データを書き込む、という手順
を踏み、以降は予め設定したカウント数が0になるまで
繰り返す。特に、本転送の場合、残り転送バイト数が3
バイト以下の時、最後の読み込みバスサイクル発生後、
強制的にDMA内部のデータをデスティネーション側に
2度書き込みを行なわせかつ、有効なデータをバイト単
位にバイトイネーブル信号で示す。
FIG. 4 shows a memory device having a data bus width of 32 bits and an I / O having a data bus width of 16 bits.
It is a figure which shows the example which transfers data to O apparatus. When the DMA receives a transfer request from the I / O side, it becomes a bus master, and in the first bus cycle, outputs a bus control signal "read to memory device (which is the source side)" signal,
Data is output from the memory device on the source side, and the 32-bit data is fetched into the 32-bit register inside the DMA transfer control device. In the subsequent bus cycle, unlike the data pack method, the bus width on the destination side is narrower, so the bus control signal "write to I / O device (on the destination side)" is adjusted in 16-bit units according to the endian direction. Output signal, DM
A Transfer control device outputs the data captured and I / O
The procedure of writing 16-bit transfer data to the device is performed, and thereafter, the process is repeated until the preset count number becomes zero. Especially, in the case of this transfer, the number of remaining transfer bytes is 3
When the number of bytes is less than, after the last read bus cycle occurs,
The data inside the DMA is forcibly written twice to the destination side, and valid data is indicated in byte units by a byte enable signal.

【0008】次に、従来のDMA転送制御装置のパック
/アンパック制御について説明する。
Next, the pack / unpack control of the conventional DMA transfer control device will be described.

【0009】図2は従来のDMA転送装置の一実施例を
示す図である。
FIG. 2 is a diagram showing an embodiment of a conventional DMA transfer device.

【0010】この従来例では4チャンネルのDMA転送
ができ、CPUからアクセスできるカウントレジスタ1
08およびモードレジスタ114は選択チャンネル情報
信号118により、転送しようとする単一チャンネルの
転送バイト数や転送モードが指定される。すなわち、D
MA転送を行なう前に、CPUにより、転送モードをモ
ードレジスタ114へ、転送バイト数をカウントレジス
タ108へ、使用するチャンネルに対応して設定する。
In this conventional example, a count register 1 capable of 4-channel DMA transfer and accessible by the CPU
08 and the mode register 114 specify the transfer byte number and transfer mode of a single channel to be transferred by the selected channel information signal 118. That is, D
Before performing the MA transfer, the CPU sets the transfer mode in the mode register 114 and the transfer byte number in the count register 108 according to the channel to be used.

【0011】I/O装置よりDMA転送要求入力端子1
17を介してDMA転送要求処理部116にDMA転送
要求が入力されると、DMA転送要求処理部116で、
各チャンネルのマスクの有無や他チャンネルの転送要求
状況に合わせた優先度判定等を行なって、DMA転送制
御部204へDMA転送の有無や、転送要求チャンネル
のカウント数チェック、優先度チェックの結果選択され
たチャンネル情報信号118を出力する。
DMA transfer request input terminal 1 from the I / O device
When a DMA transfer request is input to the DMA transfer request processing unit 116 via 17, the DMA transfer request processing unit 116
Whether or not there is a mask for each channel, priority determination according to the transfer request status of other channels, and the like are performed, and the presence or absence of DMA transfer to the DMA transfer control unit 204, the count number check of the transfer request channel, and the priority check result selection. The channel information signal 118 thus generated is output.

【0012】DMA転送制御部204はシーケンサで、
現在の状況に対して、取り込まれるDMA内部レジスタ
201のバイト毎の妥当性を示すDMA内部レジスタ有
効ビット21の状況や、転送モード112、選択チャン
ネル情報信号118の示す入力情報により次のクロック
に同期して状態遷移を行なう。
The DMA transfer control unit 204 is a sequencer,
Synchronized to the next clock according to the current status, the status of the DMA internal register valid bit 21 indicating the validity of each byte of the DMA internal register 201 fetched, the transfer mode 112, and the input information indicated by the selected channel information signal 118. Then, the state transition is performed.

【0013】内部レジスタ有効ビット制御部122は、
DMA内部レジスタ201のバイト毎にデータの妥当性
(DMA内部に読み込まれたが、まだ外部に書き込みが
行なわれていないデータを妥当とする)を4ビットの信
号で有効ビットレジスタ202上に保持させ、データパ
ック/アンパックのバスサイクルが走る度に更新する。
The internal register valid bit controller 122 is
The validity of data for each byte of the DMA internal register 201 (the data read inside the DMA but not yet written to outside is valid) is held on the valid bit register 202 by a 4-bit signal. , Updated every time a data pack / unpack bus cycle runs.

【0014】例えば、図3のデータパック方式では、転
送開始前は有効ビットレジスタ202の値は’000
0’だが、LSBが最下位バイトに対応するものとし
て、(1)のバスサイクルにより’0001’、(2)
のバスサイクルにより’0011’と更新され、転送途
中のDMA内部レジスタ201の使用状況を示してい
る。図3の転送モードの場合、DMA転送制御部204
は、有効ビットレジスタ202が’1111’となった
時にライトサイクルへ状態遷移させている。図4のデー
タアンパック方式においても、同様に有効ビットレジス
タ202が’1111’になった後、’0000’にな
るまでライトサイクルを繰り返す。
For example, in the data pack method of FIG. 3, the value of the valid bit register 202 is' 000 before the start of transfer.
Although it is 0 ', it is assumed that the LSB corresponds to the least significant byte, and the bus cycle of (1) causes'0001' and (2).
Is updated to "0011" by the bus cycle of 1, and the use status of the DMA internal register 201 during transfer is shown. In the case of the transfer mode of FIG. 3, the DMA transfer control unit 204
Shifts to the write cycle when the valid bit register 202 becomes '1111'. Also in the data unpacking method of FIG. 4, the write cycle is similarly repeated until the valid bit register 202 becomes “1111” and then becomes “0000”.

【0015】DMA転送要求があると、それが、パック
/アンパック方式であった場合、システムのデータバス
に接続されるデータ入力端子101から入力された32
ビットデータは、DMA転送前にモードレジスタ114
に予め設定された転送モードに従って、入力アライナ1
02でデータのバイト単位で配置換えを行なう。これに
より、例えば図3のデータパック方式の(1)から
(4)のようにI/O装置のLSB側8ビットバスのみ
でDMA内部32ビットレジスタ201へデータの書き
込みが可能となる。
When there is a DMA transfer request, if it is the pack / unpack method, 32 input from the data input terminal 101 connected to the data bus of the system.
The bit data is stored in the mode register 114 before the DMA transfer.
Input aligner 1 according to the transfer mode preset in
At 02, the data is rearranged in byte units. As a result, for example, as shown in (1) to (4) of the data pack method of FIG. 3, it becomes possible to write data to the DMA internal 32-bit register 201 only by the LSB side 8-bit bus of the I / O device.

【0016】入力アライナ102でデータの配置換えが
行なわれると、入力データ用内部データバス103から
単一のパック/アンパック用32ビットデータレジスタ
であるDMA内部レジスタ201へ、DMA内部32ビ
ットレジスタ制御信号203により書き込み/読み込み
が行なわれる。
When data is rearranged in the input aligner 102, a DMA internal 32-bit register control signal is sent from the input data internal data bus 103 to the DMA internal register 201 which is a single 32-bit data register for packing / unpacking. Writing / reading is performed by 203.

【0017】DMA内部レジスタから出力されたデータ
は、出力データ用内部データバス105より出力アライ
ナ106へ接続される。出力アライナ106は内部レジ
スタ有効ビット121と転送モード112により出力さ
れた出力アライナ制御信号132により出力データの配
置換えを行ない、データ出力端子107より出力され
る。
The data output from the DMA internal register is connected to the output aligner 106 through the output data internal data bus 105. The output aligner 106 rearranges the output data according to the internal register valid bit 121 and the output aligner control signal 132 output in the transfer mode 112, and outputs the data from the data output terminal 107.

【0018】カウントレジスタ108で設定された転送
バイト数がデクリメントされ、0になったことを転送終
了検出部111で検出すると、その旨をDMA転送制御
部204に出力する一方、転送最終サイクルでTC信号
125をアクティブにする。
When the transfer end detection unit 111 detects that the number of transfer bytes set in the count register 108 has been decremented and has become 0, the fact is output to the DMA transfer control unit 204, and at the final transfer cycle, TC Activate signal 125.

【0019】以上述べたDMA転送制御装置では、DM
A内部レジスタを使用するDMA転送途中にDMA転送
要求が無くなった時、DMA内部レジスタのデータの処
理方法は、以下のようになる。
In the DMA transfer control device described above, the DM
When there is no DMA transfer request during the DMA transfer using the A internal register, the data processing method of the DMA internal register is as follows.

【0020】データパック転送時は、DMA転送要求が
無くなった時点で、選択チャンネル情報信号118より
DMA転送制御部204で、有効ビットレジスタ202
が’0000’になるまで、転送モード112に依存し
てライトサイクルを一回以上遷移を繰り返す。この時、
DMA内部レジスタ201へ取り込んだデータがメモリ
装置からではなくI/O装置からのものである時のみ、
I/O装置からのデータは再びリードサイクルを駆動し
てもデータが失われている可能性があるので、必ずDM
A内部レジスタ201のデータはこの時強制的に外部に
書き込ませ、また、メモリ装置からのデータは捨てる場
合もある。
At the time of data pack transfer, when the DMA transfer request is exhausted, the effective bit register 202 is sent to the DMA transfer control unit 204 from the selected channel information signal 118.
Until it becomes '0000', the transition is repeated one or more write cycles depending on the transfer mode 112. At this time,
Only when the data fetched into the DMA internal register 201 is not from the memory device but from the I / O device,
Since the data from the I / O device may be lost even if the read cycle is driven again, be sure to DM
At this time, the data in the A internal register 201 may be forcibly written to the outside, and the data from the memory device may be discarded.

【0021】図5には、8ビットデータバスを有するI
/O装置からデータを読み込み、パック転送途中でDM
A転送要求が無くなり、DMA内部レジスタ201内部
のデータを32ビットデータバスを有するメモりへ書き
込む場合の様子をタイミングチャートで示す。
FIG. 5 shows an I having an 8-bit data bus.
Read data from the I / O device and DM during pack transfer
A timing chart shows a case where the A transfer request is lost and the data in the DMA internal register 201 is written to the memory having a 32-bit data bus.

【0022】DMA転送は(1)〜(4)までで、ソー
ス側からDMA内部レジスタ201内にデータを取り込
んでから、デスティネーション側へDMA転送を行なう
一連の転送サイクルである。
The DMA transfer is (1) to (4) and is a series of transfer cycles in which data is fetched from the source side into the DMA internal register 201 and then the DMA transfer is performed to the destination side.

【0023】Ti,Ta,Tb,はDMAがバスマスタ
となった時の、DMA転送制御装置で規定するバスステ
ートで、本例のDMA転送装置では1バスサイクルは最
低2クロックで完了する。Tiステートは、DMA転送
装置がバスマスタではないステートで、CPUまたは他
のバスマスタがバス使用権を保持している状態である。
またTaステートは、BCYST(−)信号を出力し、
そのバスサイクルのアドレスやその他バス制御信号を出
力し始めるステートで、TbステートはDA(−)信号
をアクティブにして、外部にその立ち上がりでデータを
ラッチすることができる。バス制御信号のBCYST
(−)信号は負論理でバスサイクルの最初の1クロック
を規定し、DA(−)信号は負論理でTaステートの次
のステートを規定し、MRQ(−)信号は負論理でその
バスサイクルがメモリアクセスであることを規定し、R
W(−)信号は負論理でそのバスサイクルがライトサイ
クルであることを規定する。また、データバスに出力さ
れたデータのうち妥当なバイトを知らせるために、各バ
スサイクル毎にBE(3−0)(−)信号を出力する。
毎Taサイクルのクロックの立ち下がりでサンプリング
されるDMARQ信号がアクティブになってDMA転送
要求が認識されると、、DMA転送が開始される。DM
A転送中はDMAAK信号をアクティブにして、転送元
あるいは転送先装置に知らせる。
Ti, Ta, Tb are bus states defined by the DMA transfer control device when the DMA becomes a bus master. In the DMA transfer device of this example, one bus cycle is completed in at least two clocks. The Ti state is a state in which the DMA transfer device is not the bus master, and the CPU or another bus master holds the bus use right.
The Ta state outputs the BCYST (-) signal,
In the Tb state, the DA (-) signal is activated in the state where the address of the bus cycle and other bus control signals are started to be output, and the data can be latched to the outside at the rising edge. Bus control signal BCYST
The (-) signal is negative logic and defines the first one clock of the bus cycle, the DA (-) signal is negative logic and defines the next state of the Ta state, and the MRQ (-) signal is negative logic and is the bus cycle. Is a memory access, and R
The W (-) signal has a negative logic and defines that the bus cycle is a write cycle. Further, the BE (3-0) (-) signal is output for each bus cycle in order to notify a valid byte of the data output to the data bus.
When the DMARQ signal sampled at the falling edge of the clock every Ta cycle becomes active and the DMA transfer request is recognized, the DMA transfer is started. DM
During the A transfer, the DMAAK signal is activated to notify the transfer source or transfer destination device.

【0024】8ビットのデータバスをもつソース側のI
/O装置から、32ビットのデータバスをもつデスティ
ネーション側のメモリ装置へDMA転送する転送モード
時に、I/O装置からデータを読むパック転送途中のT
aステートのクロックの立ち下がりでDMA転送要求で
あるDMARQ信号がLOWになっていれば、DMA転
送制御部204で選択チャンネル情報118により、次
のバスサイクルのための状態遷移を行なうが、このバス
サイクルについてはI/O装置からデータを読み込むサ
イクルを駆動する。
Source side I having an 8-bit data bus
In the transfer mode in which DMA transfer is performed from the I / O device to the memory device on the destination side having a 32-bit data bus, T during the pack transfer for reading data from the I / O device
If the DMARQ signal, which is a DMA transfer request, is LOW at the falling edge of the a-state clock, the DMA transfer control unit 204 makes a state transition for the next bus cycle according to the selected channel information 118. As for the cycle, it drives a cycle for reading data from the I / O device.

【0025】なお、図5ではDMA内部レジスタ201
内の3バイトのデータをデスティネーション側(図5で
はメモリ)へDMA転送を行なうDMA転送サイクルを
駆動して、DMA内部レジスタ201内の未転送のデー
タを確実に転送転送させた後、バスを開放する。
In FIG. 5, the DMA internal register 201
After driving the DMA transfer cycle for performing the DMA transfer of the 3-byte data in the memory to the destination side (memory in FIG. 5) to surely transfer and transfer the untransferred data in the DMA internal register 201, Open.

【0026】または、『特開平3−157748』(参
考文献)のように、シリアル受信の場合で転送バイト数
が不明のとき、DMA内部レジスタ内の残留データを検
出でき、かつ転送終了を検出できた時に、ソフトウェア
的あるいはハードウェア的に残留データをDMA転送さ
せる方法もある。しかし、これはデータパックでのみ可
能である。
Alternatively, as in Japanese Patent Laid-Open No. 3-157748 (reference), when the number of transfer bytes is unknown in the case of serial reception, the residual data in the DMA internal register can be detected and the end of transfer can be detected. There is also a method of performing DMA transfer of the residual data by software or hardware at the time. But this is only possible with data packs.

【0027】データアンパック転送時も、DMA転送要
求がなくなった時、データパック転送時と同様に、DM
A内部レジスタ201内のデータが無くなるまでライト
サイクルへの遷移を繰り返す。図6には、32ビットデ
ータバスを有するI/O装置からデータを読み込み、ア
ンパック転送途中にDMA転送要求が無くなり、DMA
内部レジスタ201内のデータを16ビットデータバス
を有するメモリへ書き込む様子をタイミングチャートで
示す。
In the data unpack transfer, when the DMA transfer request is exhausted, the DM is transferred in the same manner as in the data pack transfer.
The transition to the write cycle is repeated until there is no more data in the A internal register 201. In FIG. 6, data is read from an I / O device having a 32-bit data bus, a DMA transfer request disappears during unpack transfer, and
A timing chart shows how data in the internal register 201 is written to a memory having a 16-bit data bus.

【0028】I/O装置からデータを読み込む(1)の
バスサイクルのTaステートのクロックの立ち下がりで
DMARQ信号がインアクティブであれば、I/O装置
からのデータを確実にDMA転送するためにDMA転送
制御部204で強制的にデスティネーション側(図6で
はメモリ)へのDMA転送サイクルを駆動した後、バス
を解放する。
If the DMARQ signal is inactive at the falling edge of the Ta state clock in the bus cycle (1) for reading data from the I / O device, the data from the I / O device can be reliably transferred by DMA. The DMA transfer control unit 204 forcibly drives the DMA transfer cycle to the destination side (memory in FIG. 6) and then releases the bus.

【0029】図6では、DMARQ信号がインアクティ
ブになったバスサイスルから、さらに2バスサイクルが
強制的に駆動されるが、極端には32ビットのデータバ
ス幅をもつI/O装置から、8ビットのデータバス幅を
持つメモリへのデータアンパック転送時、I/O装置か
らのデータ読み込みバスサイクルでDMA転送要求が無
くなったことを認識しても、さらにメモリへ4バスサイ
クルを要してDMA転送を行なう可能性もある。
In FIG. 6, an additional 2 bus cycles are forcibly driven from the bus scythe in which the DMARQ signal becomes inactive, but extremely 8 bits from the I / O device having a data bus width of 32 bits. Even when recognizing that the DMA transfer request has disappeared in the data read bus cycle from the I / O device during the data unpack transfer to the memory having the data bus width of 4 bytes, the DMA transfer to the memory requires 4 bus cycles. There is also a possibility to do.

【0030】[0030]

【発明が解決しようとする課題】上述した従来のDMA
転送制御装置は、ソース側とデスティネーション側のバ
ス幅が異なるデータ転送をDMA転送で行なう場合、ソ
ース側およびデスティネーション側のデータ転送速度の
違いの緩衡の役目をするDMA内部データレジスタを使
用してデータパック方式やデータアンパック転送を行な
うので、DMA転送要求が無くなっても、DMA内部デ
ータレジスタ内のデータを全て外部にDMA転送させる
まで、DMAがバスを専有してしまうという欠点があ
る。
DISCLOSURE OF THE INVENTION Conventional DMA described above
The transfer control device uses a DMA internal data register which plays a role of balancing the difference in the data transfer rates of the source side and the destination side when the data transfer with different bus widths on the source side and the destination side is performed by the DMA transfer. Since the data pack method and the data unpack transfer are performed, there is a disadvantage that the DMA occupies the bus until all the data in the DMA internal data register is DMA transferred to the outside even if the DMA transfer request is lost.

【0031】また、DMA転送の転送バイト数が不明の
場合、データパックおよびデータアンパック転送の途中
で内部データレジスタにデータを保持して外部にDMA
転送されないまま、DMA転送要求が無くなった場合、
転送データを失うという致命的な事故を発生させる場合
もあった。
When the number of transfer bytes in the DMA transfer is unknown, the data is held in the internal data register during the data pack and data unpack transfer and is externally DMA-transferred.
If the DMA transfer request is lost without being transferred,
In some cases, a fatal accident of losing transfer data occurred.

【0032】また、あるチャンネルのデータパック転送
あるいはデータアンパック転送のDMA転送を実行中、
他の優先度の高いチャンネルのDMA転送要求があった
時、やはり、それまで使用していたDMA内部データレ
ジスタ内のデータを全て外部にDMA転送させるまで、
DMA転送チャンネルの切り替えが行なわれないという
問題も発生し、DMA転送装置のバス専有率が大きくな
ることによって、システム全体のスループットを低下さ
せ、さらには、転送データの損失によりシステムの信頼
性をも低下させる原因となるという欠点が明らかになっ
た。
During DMA transfer of data pack transfer or data unpack transfer of a certain channel,
When there is a DMA transfer request for another high priority channel, again, until all the data in the DMA internal data register that has been used until that time is DMA transferred to the outside,
There is also a problem that the DMA transfer channel is not switched, the bus occupation rate of the DMA transfer device increases, and the throughput of the entire system decreases, and further, the reliability of the system increases due to the loss of transfer data. It became clear that there was a drawback that caused the decrease.

【0033】本発明の目的は、データパック転送あるい
はデータアンパック転送時に制御権切替の応答性を高
め、かつ転送すべきデータを確実に転送することを可能
にし、システム性能を向上させるDMA転送制御装置の
提供である。
An object of the present invention is to improve the response of control right switching at the time of data pack transfer or data unpack transfer, and to surely transfer the data to be transferred, thereby improving the system performance. Is provided.

【0034】[0034]

【課題を解決するための手段】本発明のDMA転送制御
装置は、複数のチャネルを有し、チャネル内データの組
立が可能であり、組立前の入力データを配置替えする手
段と、チャネル情報およびチャネルモードを記憶する手
段と、チャネル内データを保持するレジスタと、レジス
タに保持されているデータの転送済みか未転送かを示す
情報を表示するレジスタと、出力データを最終配列する
手段を有するデータパック転送とデータアンパック転送
が可能な、直接メモリアクセス転送を制御するDMA転
送制御装置において、 組立前に配置替えされたデータ
をチャネル毎に転送データとしてラッチするレジスタ
と、チャネル毎にチャネル内データの転送状態を示すレ
ジスタと、DMA転送の転送要求の停止を検出すると、
直に該DMA転送を中断する手段と、前記転送データを
ラッチするレジスタに未転送のデータが残っていること
を検出する手段と、前記検出手段により検出された未転
送のデータをDMA転送の再開指示によりチャネル毎に
強制的にDMA転送する制御手段を有している。
A DMA transfer control device of the present invention has a plurality of channels, is capable of assembling intra-channel data, means for rearranging input data before assembling, channel information and Data having means for storing the channel mode, a register for holding data in the channel, a register for displaying information indicating whether the data held in the register has been transferred or not, and means for finally arranging output data In a DMA transfer control device that controls direct memory access transfer that can perform pack transfer and data unpack transfer, a register that latches the data rearranged before assembly as transfer data for each channel, and an intra-channel data transfer for each channel When the register indicating the transfer status and the stop of the transfer request of the DMA transfer are detected,
Means for directly interrupting the DMA transfer, means for detecting that untransferred data remains in the register for latching the transfer data, and restarting the DMA transfer for the untransferred data detected by the detection means. It has a control means for forcibly performing a DMA transfer for each channel according to an instruction.

【0035】また、前記未転送のデータが残っているこ
とを検出する手段が転送状態を示すレジスタから検出す
る手段であるものも本発明に含まれる。
Further, the present invention also includes means for detecting that the untransferred data remains, which is means for detecting from a register indicating a transfer state.

【0036】[0036]

【作用】チャネル内データを全てラッチできる内部レジ
スタを複数有しており、あるチャネルの転送において、
ラッチされたバイト毎のデータの前記内部レジスタ内に
おける保持状態が検出されているので、転送サイクルの
途中で転送要求が停止されても、該サイクルまでの転送
結果に引き続く転送サイクルを再開して転送を完了する
ことができる。
It has a plurality of internal registers that can latch all the data in the channel.
Since the holding state of the latched data of each byte in the internal register is detected, even if the transfer request is stopped in the middle of the transfer cycle, the transfer cycle following the transfer result up to the said cycle is restarted and transferred. Can be completed.

【0037】[0037]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0038】図1は本発明のDMA転送制御装置の一実
施例のブロック図である。
FIG. 1 is a block diagram of an embodiment of the DMA transfer control device of the present invention.

【0039】このDMA転送制御装置は、従来のDMA
制御装置のDMA内部レジスタ104が32ビット容量
の複数の領域を有しそれぞれの領域にチャネル毎のデー
タを保持する構成となっている。また、有効ビットレジ
スタ202はDMA内部レジスタ104の領域数に対応
する領域を有してそれぞれのバイト毎データの有効性を
表示する。さらに、掃き出しレジスタ115を有し、C
PUを介して行なわれるDMA転送の再開指示によりチ
ャネル毎に未転送のデータを検出し、ORゲート119
の出力情報信号により該当するチャネルのデータの転送
を起動する。
This DMA transfer control device uses the conventional DMA
The DMA internal register 104 of the control device has a plurality of areas having a capacity of 32 bits, and holds data for each channel in each area. Further, the valid bit register 202 has an area corresponding to the number of areas of the DMA internal register 104 and displays the effectiveness of each byte data. Further, it has a sweep register 115, and C
The untransferred data is detected for each channel by the DMA transfer restart instruction issued via the PU, and the OR gate 119 is detected.
The data transfer of the corresponding channel is started by the output information signal of.

【0040】また、このDMA転送制御装置は4チャネ
ルの DMA転送ができ、CPUでアクセスできるカウ
ントレジスタ108やモードレジスタ114は、選択チ
ャネル信号118により単一チャネルの転送バイト数や
モードが指定されている。
Further, this DMA transfer control device is capable of 4-channel DMA transfer, and the count register 108 and the mode register 114 accessible by the CPU specify the transfer byte number and mode of a single channel by the selected channel signal 118. There is.

【0041】DMA転送モードレジスタ114には、転
送方向(I/O装置からメモリへ、またはメモリからI
/O装置へ)やDMA転送要求の受付方法およびソース
側とデスティネーション側のバス幅の設定をする必要が
あるが、特にDMA転送の受付方法は、RSフリップフ
ロップでDMA転送要求パルスをラッチする方法(ブロ
ック転送)と、DMA転送要求のある限りDMA転送を
行う方法(ディマンド転送)などがある。
The DMA transfer mode register 114 has a transfer direction (I / O device to memory or memory to I).
/ O device) and a method of accepting a DMA transfer request and setting the bus width on the source side and the destination side. In particular, in the method of accepting a DMA transfer, a DMA transfer request pulse is latched by an RS flip-flop. There are a method (block transfer) and a method of performing DMA transfer (demand transfer) as long as there is a DMA transfer request.

【0042】以下に、DMA転送要求のある限りDMA
転送を継続するディマンド転送について述べる。
Below, as long as there is a DMA transfer request, the DMA
The demand transfer for continuing the transfer will be described.

【0043】DMA転送を行う前に、使用するチャネル
に対するモードレジスタ114や転送バイト数がカウン
トレジスタ108へCPUより設定される。I/O装置
よりDMA転送要求入力端子117へDMA転送要求が
入力されると、DMA転送要求処理部116で、各チャ
ネルのDMA転送要求をマスクするマスクレジスタ12
7内の信号の有無と、MSBをチャネル0、LSBをチ
ャネル3とする固定優先順位に合わせて単一の転送チャ
ネルを選択し、選択チャネル情報信号118として出力
される。
Before performing the DMA transfer, the mode register 114 and the number of transfer bytes for the channel to be used are set in the count register 108 by the CPU. When a DMA transfer request is input to the DMA transfer request input terminal 117 from the I / O device, the DMA transfer request processing unit 116 masks the DMA transfer request of each channel.
A single transfer channel is selected in accordance with the presence / absence of a signal in 7 and a fixed priority order in which MSB is channel 0 and LSB is channel 3, and the selected transfer channel information signal 118 is output.

【0044】また、DMA内部データ掃き出しレジスタ
115は、他のDMA内部レジスタと同様にチャネル単
位でCPUからの書込みのみを可能とし、CPUからこ
のレジスタへ書込み動作をすることにより、2入力論理
和119の出力情報信号129によりDNA内部データ
レジスタの内容を外部に転送するためのDMA転送を駆
動することができる。
The DMA internal data sweep-out register 115, like the other DMA internal registers, allows only writing from the CPU on a channel-by-channel basis, and the writing operation from the CPU to this register causes the 2-input logical sum 119. Output information signal 129 can drive a DMA transfer for transferring the contents of the DNA internal data register to the outside.

【0045】DMA転送制御部110はシーケンサー
で、現在の状況に対して入力されるDMA内部レジスタ
104のバイトごとの妥当性を示すDMA内部レジスタ
有効ビット121の状況や転送モード112、選択チャ
ネル情報129の入力情報により次のクロックに同期し
て状態遷移を行う。
The DMA transfer control unit 110 is a sequencer, and the status of the DMA internal register valid bit 121 indicating the validity of each byte of the DMA internal register 104 input for the current status, the transfer mode 112, and the selected channel information 129. The state transition is performed in synchronization with the next clock according to the input information.

【0046】DMA内部レジスタ104は各チャネル毎
に32ビットのレジスタを有しており、DMA転送中は
選択チャネル信号129でDMA転送チャネルに対応し
たレジスタのみを使用する。したがって、図2の従来例
のように動作中のDMA転送を途中で中断して、別のチ
ャネルの転送が発生する可能性があるということでデー
タパックの途中でDMA内部レジスタ201の内容を全
てDMA転送させる必要はない。
The DMA internal register 104 has a 32-bit register for each channel, and only the register corresponding to the DMA transfer channel is used by the selected channel signal 129 during the DMA transfer. Therefore, as in the conventional example of FIG. 2, there is a possibility that a DMA transfer during operation is interrupted midway and a transfer of another channel may occur, so that the entire contents of the DMA internal register 201 are lost during the data pack. It is not necessary to make a DMA transfer.

【0047】さらに、DMA内部レジスタ内にパッキン
グ途中のデータを保持したままDMA制御装置がバスを
解放することができるので、DMA転送装置のバス専有
率は益々小さくすることができるようになる。
Further, since the DMA controller can release the bus while holding the data in the middle of packing in the DMA internal register, the bus occupation rate of the DMA transfer device can be further reduced.

【0048】内部レジスタ有効ビット制御部122は、
DMA内部レジスタ104のバイト毎にデータの妥当性
を4ビットの信号で示し、データパック/アンパックの
バスサイクルが走る度に更新される。例えば、図3のデ
ータパック方式では、転送開始前は有効ビットレジスタ
124の値は”0000”だが、LSBが最下位バイト
に対応するものとして(1)のバスサイクルにより”0
001”、(2)のバスサイクルにより”0011”と
更新され、選択されているチャネルの転送途中のDMA
内部レジスタ104の使用状況を示している。
The internal register valid bit controller 122
The validity of data is indicated by a 4-bit signal for each byte of the DMA internal register 104, and is updated every time a data pack / unpack bus cycle runs. For example, in the data pack method of FIG. 3, the value of the valid bit register 124 is "0000" before the transfer is started, but it is assumed that the LSB corresponds to the least significant byte and "0" by the bus cycle of (1).
DMA being updated to “0011” by the bus cycle of 001 ”and (2) and during the transfer of the selected channel.
The usage status of the internal register 104 is shown.

【0049】有効ビットレジスタ124は、各チャネル
毎に4ビットのレジスタを有しており、DMA転送中は
選択チャネル信号129でDMA転送チャネルに対応し
たレジスタのみを使用する。
The effective bit register 124 has a 4-bit register for each channel, and uses only the register corresponding to the DMA transfer channel by the selected channel signal 129 during the DMA transfer.

【0050】また、有効ビットレジスタ124は、DM
A転送中、DMA転送の現況を示していると言える。つ
まり、デスティネーション側がバス幅が32ビットのデ
ータバスを有していれば、有効ビットレジスタ124の
値が”1111”になるまで、ソース側にデータを求め
るリードサイクルをDMA制御部110で駆動すればよ
く、16ビットのデータバス幅を有していれば、DMA
内部レジスタ104の下位バイトの方から順に使用する
ものとして、有効ビットレジスタ124の値が”001
1”になるまで、リードサイクルを駆動すればよいこと
になる。
Further, the effective bit register 124 is DM
It can be said that the current state of the DMA transfer is shown during the A transfer. That is, if the destination side has a data bus with a bus width of 32 bits, the DMA control unit 110 drives the read cycle for obtaining data on the source side until the value of the valid bit register 124 becomes “1111”. DMA with a 16-bit data bus width
As the lower byte of the internal register 104 is used in order, the value of the valid bit register 124 is "001."
It is sufficient to drive the read cycle until it becomes 1 ".

【0051】従って、各チャネル毎に、上記のDMAデ
ータレジスタ104に加えて、有効ビットレジスタ12
4を持つことによって、転送を途中で中断しても、再び
DMA転送要求が入力されてDMA転送が再開されたと
き、データパック/アンパックの途中から再開すること
が可能となる。
Therefore, in addition to the above DMA data register 104, the effective bit register 12 is provided for each channel.
By having 4, it becomes possible to restart the data pack / unpack halfway when the DMA transfer request is input again and the DMA transfer is restarted even if the transfer is interrupted midway.

【0052】また、CPUから読み込み専用のステータ
スレジスタ126は、上記のDMA転送がDMA内部デ
ータレジスタ104を使用するデータパック/アンパッ
ク転送の途中である場合、データ転送を確実にするため
に、各チャネルのDMA内部データレジスタ104に転
送データがまだ残されていることを示すビットを有す
る。これは、有効ビットレジスタ124内の値を各チャ
ネル毎の4ビットの論理和で実現することができ、1で
あれば転送すべきデータが残っていることを、0であれ
ば転送すべきデータがないことがわかる。
The status register 126, which is read only from the CPU, is provided for each channel to ensure data transfer when the above DMA transfer is in the middle of data pack / unpack transfer using the DMA internal data register 104. The DMA internal data register 104 has a bit indicating that transfer data still remains. This can be realized by a logical sum of 4 bits for each channel for the value in the valid bit register 124. If the value is 1, the data to be transferred remains, and if the value is 0, the data to be transferred. You can see that there is no.

【0053】従って、ステータスレジスタ126でしめ
されたビットのうち、1であるチャネルに対してDMA
内部データ掃き出しレジスタ115をアクセスすれば、
パック/アンパック途中の転送データを外部にDMA転
送することができる。これは、パック/アンパックDM
A転送途中にDMA転送サイクルが中断して、そのまま
転送チャネルのDMA内部レジスタに転送データが残っ
ている状況でもソフトウエア的に外部に転送できること
を意味する。
Therefore, the DMA for the channel which is 1 among the bits indicated by the status register 126
If you access the internal data sweep register 115,
Transfer data in the middle of packing / unpacking can be DMA-transferred to the outside. This is a pack / unpack DM
This means that even if the DMA transfer cycle is interrupted during the transfer of A and the transfer data remains in the DMA internal register of the transfer channel as it is, it can be transferred to the outside by software.

【0054】図7は本発明のDMA転送制御装置による
データのパック転送のタイミングチャート、図8はその
アンパック転送のタイミングチャートである。
FIG. 7 is a timing chart of pack transfer of data by the DMA transfer control device of the present invention, and FIG. 8 is a timing chart of its unpack transfer.

【0055】このパック転送は、ソース側が8ビットの
データバスを有するI/O装置からデスティネーション
側が32ビットのデータバスを有するメモリ装置へのパ
ック転送であり、アンパック転送はソース側が32ビッ
トのデータバスを有するI/O装置からデスティネーシ
ョン側が16ビットのデータバスを有するメモリ装置へ
のアンパック転送である。
This pack transfer is a pack transfer from an I / O device having a data bus of 8 bits on the source side to a memory device having a data bus of 32 bits on the destination side, and unpack transfer is data transfer of 32 bits on the source side. This is an unpack transfer from an I / O device having a bus to a memory device having a 16-bit data bus on the destination side.

【0056】DMA転送要求が入力されてDMA転送が
始まるまでのシーケンスは、DMA内部データレジスタ
104や有効ビットレジスタ124の値が選択チャネル
信号129で転送中常にDMA転送チャネルに選択され
ている以外は、従来のシーケンスと同じである。つま
り、DMA転送要求を認識すると、優先順位やマスク状
況に応じて転送要求が承認されると、CPUやバスアー
ビタに対してバスの解放を要求するHLDRQ(ー)信
号をアクチブにする。バスの解放がそれまでのバスマス
タに承認されると、HLDAK(−)信号の入力を待っ
て、DMA転送バスサイクルを開始する。DMAバスサ
イクル期間、DMA転送要求が承認されたことをソース
側に知らせるために、DMAAK信号をアクティブにす
る。
The sequence from the input of the DMA transfer request to the start of the DMA transfer is that the values of the DMA internal data register 104 and the valid bit register 124 are always selected as the DMA transfer channel during the transfer by the selected channel signal 129. , The same as the conventional sequence. In other words, when the DMA transfer request is recognized, when the transfer request is approved according to the priority order or the mask status, the HLRQ (-) signal requesting the CPU or the bus arbiter to release the bus is activated. When the release of the bus is approved by the previous bus master, the DMA transfer bus cycle is started after waiting for the input of the HLDAK (-) signal. During the DMA bus cycle, the DMAAK signal is activated in order to notify the source side that the DMA transfer request has been approved.

【0057】DMA転送バスサイクル中は、Taステー
トでソース側に対してリード信号を出力し、ウエイトで
バスサイクルが延長しても最後のTbステートと次のク
ロックの立ち上がりでデータをサンプリングし、入力ア
ライナ102へ入力する。入力アライナ102は、デー
タパック転送に対応し、図9のようなバイト単位の32
ビットデータの配置変えタイプを有する。入力アライナ
102のバイト配置変えタイプ制御はDMA転送制御部
110で行われる。
During a DMA transfer bus cycle, a read signal is output to the source side in the Ta state, and data is sampled at the last Tb state and the next rising edge of the clock even if the bus cycle is extended due to wait, and the data is input. Input to the aligner 102. The input aligner 102 is compatible with data pack transfer, and has 32 byte units as shown in FIG.
It has a relocation type of bit data. The byte transfer changing type control of the input aligner 102 is performed by the DMA transfer control unit 110.

【0058】転送モードにより、データのバイト単位の
配置変えが行われて入力用データバス103を経由し、
各チャネルに対応した内部データレジスタ104にラッ
チ後、有効ビットレジスタ124の値によりDMA転送
制御部110でライトサイクルへ遷移すると、出力用内
部データバス105にデータを乗せる。
Depending on the transfer mode, the arrangement of data in bytes is changed, and the data is transferred via the input data bus 103.
After latching in the internal data register 104 corresponding to each channel, when the DMA transfer control unit 110 makes a transition to a write cycle according to the value of the valid bit register 124, data is loaded on the output internal data bus 105.

【0059】また出力アライナ106でも、転送モード
によりバイト単位の配置変えが行われ、データを外部に
出力する。出力アライナ106は、データアンパック転
送に対応し、図10に示すようなバイト単位の32ビッ
トデータの配置変えのタイプを有する。
Also in the output aligner 106, the arrangement of bytes is changed according to the transfer mode, and the data is output to the outside. The output aligner 106 corresponds to the data unpack transfer and has a type of arrangement change of 32-bit data in byte units as shown in FIG.

【0060】本実施例の従来例と著しく異なるのは、D
MA転送制御装置がDMA転送を止めて、バスを解放し
ようとするときである。
What is remarkably different from the conventional example of this embodiment is that D
It is time for the MA transfer controller to stop the DMA transfer and release the bus.

【0061】図7に示すタイミングチャートでは、パッ
ク転送のI/O装置からのデータ読み込み途中で、各D
MAサイクルのTaサイクルのクロック立ち下がりでサ
ンプリングし、DMARQ信号がインアクティブであれ
ば、そのDMAバスサイクルでDMA転送制御装置がバ
スを解放する様子を示している。データパックのDMA
転送途中であっても、内部データレジスタ104と有効
ビットレジスタ124にその途中経過を保持させて、転
送を中断させることができる。これは、DMARQ信号
をサンプリングしたときに、DMA要求が無いと、直ち
にDMA転送を中断し、バスを解放することができ、再
びそのチャネルのDMA転送要求が発生したとき、その
転送を継続できることを意味する。また、あるチャネル
のDMA転送中に別の優先度の高いDMA転送要求があ
ると、その途中経過を保持させたままバスを解放し、よ
り優先度の高いチャネルのDMA転送サービスを従来よ
り早く開始できることを意味する。
In the timing chart shown in FIG. 7, each D is read while data is being read from the pack transfer I / O device.
The sampling is performed at the falling edge of the Ta cycle of the MA cycle, and if the DMARQ signal is inactive, the DMA transfer control device releases the bus in the DMA bus cycle. Data pack DMA
Even during the transfer, the internal data register 104 and the valid bit register 124 can hold the progress, and the transfer can be interrupted. This means that when the DMARQ signal is sampled, if there is no DMA request, the DMA transfer can be immediately interrupted, the bus can be released, and when the DMA transfer request for the channel is generated again, the transfer can be continued. means. If another high priority DMA transfer request is issued during a DMA transfer of a certain channel, the bus is released while holding the progress, and the DMA transfer service of the higher priority channel is started earlier than before. It means that you can do it.

【0062】図8は、アンパック転送のI/O装置から
のデータの読み込み途中(あるいはデータ読み込み後
の、データ書込みサイクルでも同じ)に、各DMAサイ
クルのTaサイクルのクロックの立ち下がりでサンプリ
ングし、DMARQ信号がインアクティブであれば、そ
のDMAバスサイクルでDMA転送制御装置がバスを解
放する様子を示す。
In FIG. 8, sampling is performed at the falling edge of the Ta cycle clock of each DMA cycle during the reading of data from the unpacked I / O device (or in the data writing cycle after reading the data). If the DMARQ signal is inactive, the DMA transfer controller releases the bus in the DMA bus cycle.

【0063】データアンパックのDMA転送途中であっ
ても、内部データレジスタ104と有効ビットレジスタ
124にその途中経過を保持させて、転送を中断させる
ことができる。これは、DMARQ信号をサンプリング
した時に、DMA転送要求が無いと、直ちにDMA転送
を中断し、バスを解放することができ、再びそのチャネ
ルのDMA転送要求が発生したとき、その転送を継続で
きることを意味する。また、あるチャネルのDMA転送
途中に別の優先度の高いDMA転送要求があってもその
途中経過を保持させたままバスを解放し、より優先度の
高いチャネルのDMA転送サービスを従来よりも早く開
始できることを意味する。
Even during the DMA transfer of the data unpack, the internal data register 104 and the valid bit register 124 can hold the progress, and the transfer can be interrupted. This means that when the DMARQ signal is sampled, if there is no DMA transfer request, the DMA transfer can be immediately interrupted, the bus can be released, and when the DMA transfer request for the channel is generated again, the transfer can be continued. means. Further, even if another high priority DMA transfer request is made during the DMA transfer of a certain channel, the bus is released while keeping the progress of the request, so that the DMA transfer service of the higher priority channel can be performed faster than before. Means you can start.

【0064】データのパック/アンパック転送において
は、転送終了時、転送終了検出部111よりTC信号を
出力することによって、これまで転送していたチャネル
の転送終了を外部にしらせることができる。
In the pack / unpack transfer of data, the TC signal is output from the transfer end detection unit 111 at the end of the transfer, so that the transfer end of the channel that has been transferred up to now can be externalized.

【0065】[0065]

【発明の効果】以上説明したように本発明は、チャネル
毎にチャネル内データを保持できる容量を有するDMA
内部データレジスタと、それらレジスタに保持されたチ
ャネル毎のデータの転送状況を保持する有効ビットレジ
スタを有し、データパック/アンパック転送の途中でD
MA転送要求が無くなったり、優先度の高いDMA転送
要求が発生した時点で、それまで転送していたデータの
転送状況を保持してバスを直ちに解放し、その後転送要
求が再発したときに継続してDMA転送を再開できるの
で、バス制御権の切り換えが極めて早くなり、割り込み
に対する対応が速やかに行われ、かつ、中断されたDM
A転送の再開も確実に行われてデータの消滅のおそれも
なくなるという効果がある。
As described above, according to the present invention, a DMA having a capacity capable of holding intra-channel data for each channel.
It has an internal data register and a valid bit register that holds the transfer status of the data for each channel held in these registers, and D during the data pack / unpack transfer
When the MA transfer request disappears or a high-priority DMA transfer request occurs, the transfer status of the data that has been transferred is held and the bus is immediately released. Since the DMA transfer can be restarted by this, the switching of the bus control right becomes extremely fast, the interrupt can be promptly dealt with, and the interrupted DM can be performed.
There is an effect that the A transfer is surely restarted and there is no fear of data disappearance.

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

【図1】本発明のDMA転送制御装置の一実施例のブロ
ック図である。
FIG. 1 is a block diagram of an embodiment of a DMA transfer control device of the present invention.

【図2】従来のDMA転送制御装置の一実施例のブロッ
ク図である。
FIG. 2 is a block diagram of an embodiment of a conventional DMA transfer control device.

【図3】データパック方式の概念図で、(a)〜(d)
は1バイトずつ読み込まれた状態を示し、(e)は4バ
イトがパックされてメモリに書込まれた状態を示す図あ
る。
FIG. 3 is a conceptual diagram of a data pack method, including (a) to (d).
Shows a state in which 1 byte is read in, and (e) shows a state in which 4 bytes are packed and written in the memory.

【図4】データアンパック方式の概念図で、(a)はメ
モリから32ビットのデータが読み取られ(b)、
(c)は2バイトずつ16ビット幅のI/Oに書き込ま
れた状態を示す図である。
FIG. 4 is a conceptual diagram of a data unpacking method, in which (a) reads 32-bit data from a memory (b),
(C) is a diagram showing a state in which 2 bytes are written in the 16-bit wide I / O.

【図5】図2に示すDMA転送制御装置によるデータパ
ック転送のタイミングチャートである。
5 is a timing chart of data pack transfer by the DMA transfer control device shown in FIG.

【図6】図2に示すDMA転送制御装置によるデータア
ンパック転送のタイミングチャートである。
6 is a timing chart of data unpack transfer by the DMA transfer control device shown in FIG.

【図7】図1に示すDMA転送制御装置によるデータパ
ック転送のタイミングチャートである。
7 is a timing chart of data pack transfer by the DMA transfer control device shown in FIG.

【図8】図1に示すDMA転送制御装置によるデータア
ンパック転送のタイミングチャートである。
8 is a timing chart of data unpack transfer by the DMA transfer control device shown in FIG.

【図9】図1および図2に示す入力アライナ101のバ
イト単位のデータアラインのタイプを示す図で(a)は
第4のバイトを4バイト配置し、(b)は第3と第4の
バイトをシリースに繰り返して配置し、(c)は入力順
に4バイト配列するタイプを示す図である。
FIG. 9 is a diagram showing a type of byte-aligned data alignment of the input aligner 101 shown in FIGS. 1 and 2, where (a) is a fourth byte arranged in 4 bytes, and (b) is a third and a fourth. FIG. 6 is a diagram showing a type in which bytes are repeatedly arranged in series, and 4 bytes are arranged in an input order.

【図10】図1および図2に示す出力アライナ106の
バイト単位のデータアラインのタイプで(a)は入力順
にバイト単位で配列し、(b)は第1から第3バイトま
でを入力順に、かつ、第3のバイトを第4の位置に配置
し、(c)は入力された4バイトデータの第1と第2の
データを繰り返してシリースに配列し、(d)は第1か
ら第3までのバイトを入力順に配列し、かつ、4番目に
第1のバイトを配置するタイプを示す図である。
10 is a type of byte-aligned data alignment of the output aligner 106 shown in FIGS. 1 and 2, where (a) is arranged in byte order in input order, and (b) is the first to third bytes in input order. And, the third byte is arranged at the fourth position, (c) repeats the first and second data of the input 4-byte data and arranges them in series, and (d) shows the first to third data. It is a figure which shows the type which arrange | positions the bytes until it is input order, and arrange | positions the 1st byte 4th.

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

101 データ入力端子 102 入力アライナ 103 入力データ用内部データバス 104 DMA内部データレジスタ 105 出力データ用内部データバス 106 出力アライナ 107 データ出力端子 108 カウントレジスタ 109 入力アライナ制御信号 110 DMA転送制御部 111 転送終了検出部 112 転送モード信号 113 転送終了検出信号 114 モードレジスタ 115 DMA内部データ掃き出しレジスタ 116 DMA転送要求処理部 117 DMARQ信号入力端子 118 選択チャネル情報信号 119 2入力ORゲート 120 DMA内部データレジスタ制御信号 121 DMA内部レジスタ有効ビット 122 DMA内部レジスタ有効ビット 123 転送選択内部有効ビット 124 有効ビットレジスタ 125 TC信号 126 ステータスレジスタ 127 マスクレジスタ 128 DMAAK信号出力端子 129 選択チャネル信号 130 バス譲渡制御信号端子 131 バス制御信号 132 出力アライナ制御信号 201 DMA内部レジスタ 202 有効ビットレジスタ 203 DMA内部データレジスタ制御信号 204 DMA転送制御部 101 data input terminal 102 input aligner 103 internal data bus for input data 104 DMA internal data register 105 internal data bus for output data 106 output aligner 107 data output terminal 108 count register 109 input aligner control signal 110 DMA transfer control unit 111 transfer end detection Part 112 Transfer mode signal 113 Transfer end detection signal 114 Mode register 115 DMA internal data sweep register 116 DMA transfer request processing part 117 DMARQ signal input terminal 118 Selected channel information signal 119 2 input OR gate 120 DMA internal data register control signal 121 DMA internal Register valid bit 122 DMA internal register valid bit 123 Transfer selection internal valid bit 124 Valid bit register 125 TC signal 126 Status Register 127 Mask Register 128 DMAAK Signal Output Terminal 129 Select Channel Signal 130 Bus Transfer Control Signal Terminal 131 Bus Control Signal 132 Output Aligner Control Signal 201 DMA Internal Register 202 Effective Bit Register 203 DMA Internal Data Register Control Signal 204 DMA Transfer Control Section

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数のチャネルを有し、チャネル内デー
タの組立が可能であり、組立前の入力データを配置替え
する手段と、チャネル情報およびチャネルモードを記憶
する手段と、チャネル内データを保持するレジスタと、
レジスタに保持されているデータの転送済みか未転送か
を示す情報を表示するレジスタと、出力データを最終配
列する手段を有するデータパック転送とデータアンパッ
ク転送が可能な、直接メモリアクセス転送を制御するD
MA転送制御装置において、 組立前に配置替えされたデータをチャネル毎に転送デー
タとしてラッチするレジスタと、 DMA転送の転送要求の停止を検出すると、直に該DM
A転送を中断する手段と、 チャネル毎にチャネル内データの転送状態を示すレジス
タと、 前記転送データをラッチするレジスタに未転送のデータ
が残っていることを検出する手段と、 前記検出手段により検出された未転送のデータをDMA
転送の再開指示によりチャネル毎に強制的にDMA転送
する制御手段を有することを特徴とするDMA転送制御
装置。
1. A plurality of channels, capable of assembling intra-channel data, means for rearranging input data before assembling, means for storing channel information and channel mode, and holding intra-channel data Register to
Controls a direct memory access transfer capable of data pack transfer and data unpack transfer having a register for displaying information indicating whether the data held in the register has been transferred or not and a means for finally arranging output data. D
In the MA transfer control device, a register for latching the data rearranged before assembly as transfer data for each channel, and a stop of a DMA transfer transfer request are detected, the DM transfer is immediately performed.
A means for interrupting transfer, a register for indicating the transfer state of in-channel data for each channel, a means for detecting that untransferred data remains in the register for latching the transfer data, and a detection means for detecting the untransferred data The untransferred data that has been transferred
A DMA transfer control device comprising control means for forcibly performing DMA transfer for each channel in response to a transfer restart instruction.
【請求項2】 前記未転送のデータが残っていることを
検出する手段が転送状態を示すレジスタから検出する手
段である請求項1記載のDMA転送制御装置。
2. The DMA transfer control device according to claim 1, wherein the means for detecting that the untransferred data remains is means for detecting from a register indicating a transfer state.
JP5182960A 1993-07-23 1993-07-23 DMA transfer control device Expired - Lifetime JP2536415B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5182960A JP2536415B2 (en) 1993-07-23 1993-07-23 DMA transfer control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5182960A JP2536415B2 (en) 1993-07-23 1993-07-23 DMA transfer control device

Publications (2)

Publication Number Publication Date
JPH0736821A true JPH0736821A (en) 1995-02-07
JP2536415B2 JP2536415B2 (en) 1996-09-18

Family

ID=16127351

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5182960A Expired - Lifetime JP2536415B2 (en) 1993-07-23 1993-07-23 DMA transfer control device

Country Status (1)

Country Link
JP (1) JP2536415B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991243A (en) * 1995-09-25 1997-04-04 Nec Corp Data transfer controller
US6615291B1 (en) 1999-03-08 2003-09-02 Minolta Co., Ltd. DMA controller with dynamically variable access priority
US6633926B1 (en) 1998-11-30 2003-10-14 Matsushita Electric Industrial Co., Ltd. DMA transfer device capable of high-speed consecutive access to pages in a memory
JP2005333481A (en) * 2004-05-20 2005-12-02 Nec Electronics Corp Data transferring device and communication data processing system
JP2007188357A (en) * 2006-01-13 2007-07-26 Fujitsu Ltd Data transfer device
CN100369023C (en) * 2004-02-25 2008-02-13 中国科学院计算技术研究所 Transmission unit of direct memory access and method
JP2012137844A (en) * 2010-12-24 2012-07-19 Fujitsu Semiconductor Ltd Semiconductor device and control method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991243A (en) * 1995-09-25 1997-04-04 Nec Corp Data transfer controller
US6633926B1 (en) 1998-11-30 2003-10-14 Matsushita Electric Industrial Co., Ltd. DMA transfer device capable of high-speed consecutive access to pages in a memory
US6615291B1 (en) 1999-03-08 2003-09-02 Minolta Co., Ltd. DMA controller with dynamically variable access priority
CN100369023C (en) * 2004-02-25 2008-02-13 中国科学院计算技术研究所 Transmission unit of direct memory access and method
JP2005333481A (en) * 2004-05-20 2005-12-02 Nec Electronics Corp Data transferring device and communication data processing system
JP4567373B2 (en) * 2004-05-20 2010-10-20 ルネサスエレクトロニクス株式会社 Data transfer device and communication data processing system
JP2007188357A (en) * 2006-01-13 2007-07-26 Fujitsu Ltd Data transfer device
JP2012137844A (en) * 2010-12-24 2012-07-19 Fujitsu Semiconductor Ltd Semiconductor device and control method

Also Published As

Publication number Publication date
JP2536415B2 (en) 1996-09-18

Similar Documents

Publication Publication Date Title
US6829660B2 (en) Supercharge message exchanger
KR920007905B1 (en) Direct memory access controller
JP4883824B2 (en) Method and apparatus for influencing subsequent instruction processing in a data processor
US6609163B1 (en) Multi-channel serial port with programmable features
JPH02227765A (en) Data transfer apparatus for digital computer
JPH11238028A (en) Input/output processor
JP2536415B2 (en) DMA transfer control device
US6115767A (en) Apparatus and method of partially transferring data through bus and bus master control device
JP3773574B2 (en) Apparatus and method for inserting an address into a data stream in a data processing system
KR920002830B1 (en) Direct memory access controller
US5708852A (en) Apparatus for serial port with pattern generation using state machine for controlling the removing of start and stop bits from serial bit data stream
JPH0991243A (en) Data transfer controller
JPH10106253A (en) I/o buffer memory circuit
JP2990800B2 (en) Interrupt processing device
JP3151832B2 (en) DMA controller
JPH0736806A (en) Dma system
JP3082384B2 (en) First in, first out storage
JPH10224410A (en) Data transfer system
SU1182534A1 (en) Interface for linking processor with peripheral subscribers
JP2531207B2 (en) Channel device
JP2004206241A (en) Data transfer control method and its circuit
JPH0283779A (en) Instruction execution control system for vector processor
JPH05197609A (en) Store buffer managing system
JPH04255056A (en) Dma controller
JPH06332839A (en) Data transfer processor