JP2985496B2 - DMA transfer method - Google Patents

DMA transfer method

Info

Publication number
JP2985496B2
JP2985496B2 JP4105918A JP10591892A JP2985496B2 JP 2985496 B2 JP2985496 B2 JP 2985496B2 JP 4105918 A JP4105918 A JP 4105918A JP 10591892 A JP10591892 A JP 10591892A JP 2985496 B2 JP2985496 B2 JP 2985496B2
Authority
JP
Japan
Prior art keywords
bus
main
dma
data
transfer
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.)
Expired - Lifetime
Application number
JP4105918A
Other languages
Japanese (ja)
Other versions
JPH05282239A (en
Inventor
純子 廣部
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
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP4105918A priority Critical patent/JP2985496B2/en
Publication of JPH05282239A publication Critical patent/JPH05282239A/en
Application granted granted Critical
Publication of JP2985496B2 publication Critical patent/JP2985496B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明はDMA転送方式に関し、
特にメインメモリと複数の周辺装置間のDMA転送方式
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA transfer system,
In particular, it relates to a DMA transfer method between a main memory and a plurality of peripheral devices.

【0002】[0002]

【従来の技術】ダイレクト・メモリ・アクセス転送方式
(以下、DMA転送方式という)では、周辺装置などが
メインバスに接続されたセントラル・プロセッシング・
ユニット(以下、CPUという)を介さずに直接メイン
メモリとデータの転送処理を行なうことができる。従来
のDMA転送方式では、図2に示すようにメインバス2
7に、メインメモリ22、複数の周辺装置25,26、
メインバス使用権を調停する調停回路23、周辺装置2
5,26とメインメモリ22との間のDMA転送を制御
するDMAコントローラ24およびCPU21が接続さ
れている。周辺装置25,26とメインメモリ22間で
DMA転送を行なうには、まず周辺装置25,26内の
マイクロプロセッサ28が周辺装置内のローカルバス調
停回路31に対してリクエストS14を出す。このリク
エストS14を受けて調停回路31がローカルバス32
の使用権を獲得すると、メインバス調停回路23にリク
エストS10を出す。調停回路23がメインバス27の
使用権を獲得すると、調停回路31に対してアクノリッ
ジS11を返す。調停回路31はこれを受けてマイクロ
プロセッサ28にアクノリッジS15を返す。マイクロ
プロセッサ28はアクノリッジS15が返ると、DMA
コントローラ24に起動S12をかけて、DMAコント
ローラ24に接続されているレジスタEに内部メモリ2
9のアドレスを書き込むとともに、レジスタFにメイン
メモリ22のアドレスを書き込み、レジスタGにデータ
長を書き込んで、ゲート30を開き、DMA転送を開始
する。これにより内部メモリ29からメインメモリ22
に対して直接データS13が転送される。DMA転送が
終了すると、ローカルバス32およびメインバス27の
使用権のリクエストS14,S10が解除され、ゲート
30が閉じられてバス27,32がリリースされる。
2. Description of the Related Art In a direct memory access transfer system (hereinafter, referred to as a DMA transfer system), a central processing system in which peripheral devices and the like are connected to a main bus.
Data can be directly transferred to and from the main memory without a unit (hereinafter, referred to as a CPU). In the conventional DMA transfer system, as shown in FIG.
7, a main memory 22, a plurality of peripheral devices 25 and 26,
Arbitration circuit 23 for arbitrating the right to use the main bus, peripheral device 2
A DMA controller 24 for controlling the DMA transfer between the main memory 22 and the main memory 22 and the CPU 21 are connected. To perform the DMA transfer between the peripheral devices 25 and 26 and the main memory 22, first, the microprocessor 28 in the peripheral devices 25 and 26 issues a request S14 to the local bus arbitration circuit 31 in the peripheral device. In response to the request S14, the arbitration circuit 31 sets the local bus 32
, The request S10 is issued to the main bus arbitration circuit 23. When the arbitration circuit 23 acquires the right to use the main bus 27, the arbitration circuit returns an acknowledge S11 to the arbitration circuit 31. The arbitration circuit 31 receives this and returns an acknowledgment S15 to the microprocessor 28. When the acknowledge S15 is returned, the microprocessor 28
The startup S12 is applied to the controller 24, and the internal memory 2 is stored in the register E connected to the DMA controller 24.
In addition to writing the address 9, the address of the main memory 22 is written into the register F, the data length is written into the register G, the gate 30 is opened, and the DMA transfer is started. As a result, the internal memory 29 is moved from the main memory 22
Is directly transferred to the memory. When the DMA transfer is completed, the requests S14 and S10 for the right to use the local bus 32 and the main bus 27 are released, the gate 30 is closed, and the buses 27 and 32 are released.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のDMA
転送方式では、ローカルバス32の使用権を得てもメイ
ンバス27の使用権が得られなければ、ローカルバス3
2をホールドしたまま何も行なえないため、ローカルバ
ス32の効率が悪いという問題点があった。また、レジ
スタGに書き込んだデータ長分の転送が終わるまで、メ
インバス27をホールドし続けるため、このデータ長が
長い場合、途中で他の周辺装置からデータを転送しよう
としても、前のデータが転送し終わるまで待たなければ
ならず、その間処理が停止してしまい、処理効率が悪い
という問題点があった。さらに、メインバス27のバス
幅とローカルバス32のバス幅が異なる場合、1回のD
MA転送により送れるデータ量はバス幅が狭いローカル
バス32のバス幅に制限されてしまうという問題があっ
た。
SUMMARY OF THE INVENTION The above-described conventional DMA
In the transfer method, if the right to use the local bus 32 is not obtained even if the right to use the main bus 27 is obtained,
Since nothing can be performed while holding the number 2, the efficiency of the local bus 32 is low. Further, since the main bus 27 is held until the transfer of the data length written in the register G is completed, if the data length is long, even if the data is transferred from another peripheral device on the way, the previous data is not transferred. It is necessary to wait until the transfer is completed, during which the processing is stopped, and there is a problem that the processing efficiency is poor. Further, when the bus width of the main bus 27 and the bus width of the local bus 32 are different, one D bus
There is a problem that the amount of data that can be sent by MA transfer is limited to the bus width of the local bus 32 having a narrow bus width.

【0004】本発明は、このような従来の技術が有する
課題を解決するために提案されたものであり、周辺装置
とメインバス間のDMA転送の際にローカルバスの効率
を上げられるとともに、複数の周辺装置の並列処理を可
能とし、さらにメインバスとローカルバスのバス幅が異
なっていて各バス幅を十分に活用できるDMA転送方式
を提供することを目的とする。
The present invention has been proposed to solve the problems of the prior art, and can improve the efficiency of a local bus at the time of DMA transfer between a peripheral device and a main bus. It is an object of the present invention to provide a DMA transfer system which enables parallel processing of peripheral devices of the above, and furthermore, the bus widths of the main bus and the local bus are different and each bus width can be fully utilized.

【0005】[0005]

【課題を解決するための手段】この目的を達成するため
に本発明によるDMA転送方式は、メインバスにメイン
メモリと、メインバスの使用権を調停する調停回路と、
このメインメモリとDMA転送を行なう複数の周辺装置
が接続され、この複数の周辺装置内には、装置の内部動
作を制御するマイクロプロセッサと、転送データが記憶
される内部メモリと、上記メインメモリにDMA転送す
るデータを一時的に蓄えるデータ蓄積手段と、上記内部
メモリとこのデータ蓄積手段との間のDMA転送を制御
する第1のDMAコントローラと、上記メインメモリと
上記データ蓄積手段との間のDMA転送を制御する第2
のDMAコントローラとがローカルバスによって接続さ
れて設けられており、かつ、上記データ蓄積手段からメ
インメモリへのDMA転送を、第2のDMAコントロー
ラが、転送データの1ワード分ごとに上記調停回路に対
してメインバスのリクエストを出して行なうことによ
り、前記複数の周辺装置の並列処理を行なう構成として
ある。
In order to achieve this object, a DMA transfer system according to the present invention comprises: a main memory on a main bus; an arbitration circuit for arbitrating the right to use the main bus;
A plurality of peripheral devices for performing DMA transfer are connected to the main memory. The plurality of peripheral devices include a microprocessor for controlling the internal operation of the device, an internal memory for storing transfer data, and the main memory. Data storage means for temporarily storing data to be DMA-transferred; a first DMA controller for controlling DMA transfer between the internal memory and the data storage means; and a first DMA controller for controlling the DMA transfer between the main memory and the data storage means. Second to control DMA transfer
DMA controller is connected by a local bus and provided from the data storage means.
The DMA transfer to the in-memory is performed by the second DMA controller.
The arbitration circuit sends the data to the arbitration circuit every word of the transfer data.
By issuing a main bus request
A configuration for performing parallel processing of the plurality of peripheral devices.
is there.

【0006】[0006]

【作用】このような構成からなる本発明によれば、メイ
ンメモリと周辺装置内の内部メモリの間でDMA転送を
行なう際に、内部メモリとデータ蓄積手段との間のDM
A転送と、データ蓄積手段とメインメモリとの間のDM
A転送とに別けて行なうことができるので、同時にメイ
ンバスとローカルバスの使用権を得る必要がなく、ロー
カルバス内におけるデータ転送の効率を上げられる。ま
た、転送データの1ワードごとにメインバスの使用権を
調停回路に返しながらDMA転送を行なうようにしたこ
とで、一つの周辺装置だけがメインバスを専 有しなくな
り、別の周辺装置がメインバスのリクエストを出してい
れば、その周辺装置にメインバスの使用権を移すことが
できる。これにより、複数の周辺装置による並列処理が
可能となる。
According to the present invention having the above construction, the main
DMA transfer between external memory and internal memory in peripheral devices
When performing, the DM between the internal memory and the data storage means is performed.
A transfer and DM between data storage means and main memory
A transfer can be performed separately from the
There is no need to obtain the right to use the local bus and local bus.
The efficiency of data transfer in Calvas can be increased. Ma
The right to use the main bus is set for each word of transfer data.
DMA transfer is performed while returning to the arbitration circuit.
And in, only one of the peripheral device I not dedicated have a main bus
Another peripheral device is requesting the main bus.
Transfer the right to use the main bus to that peripheral device.
it can. This allows parallel processing by multiple peripheral devices
It becomes possible.

【0007】[0007]

【実施例】以下、本発明によるDMA転送方式の具体的
な実施例を図面に基づき詳細に説明する。図1のブロッ
ク図に、このDMA転送方式の一実施例を示す。この図
で、メインバス6には、CPU1、メインメモリ2、メ
インバス調停回路3および複数の周辺装置4,5が接続
されている。これら周辺装置4,5は同様な内部構成と
なっている。また、周辺装置4,5内はローカルバス1
3により、マイクロプロセッサ7、内部メモリ8が接続
され、さらに周辺装置とメインメモリ2との間のDMA
転送データを一時的に蓄えるデータ蓄積手段となるフリ
ップフロップ9、内部メモリ8とフリップフロップ9の
間のDMA転送を制御する第1のDMAコントローラ1
1、フリップフロップ9とメインメモリ2の間のDMA
転送を制御する第2のDMAコントローラ12およびロ
ーカルバス使用権調停回路18がローカルバス12によ
り接続されている。ここで、フリップフロップ9はゲー
ト10を介してメインバス2に接続されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A specific embodiment of the DMA transfer system according to the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing one embodiment of the DMA transfer system. In this figure, a CPU 1, a main memory 2, a main bus arbitration circuit 3, and a plurality of peripheral devices 4 and 5 are connected to a main bus 6. These peripheral devices 4 and 5 have a similar internal configuration. The peripheral devices 4 and 5 have a local bus 1
3, a microprocessor 7 and an internal memory 8 are connected, and a DMA between the peripheral device and the main memory 2 is connected.
Flip-flop 9 serving as data storage means for temporarily storing transfer data; first DMA controller 1 controlling DMA transfer between internal memory 8 and flip-flop 9
1. DMA between flip-flop 9 and main memory 2
A second DMA controller 12 for controlling transfer and a local bus use right arbitration circuit 18 are connected by the local bus 12. Here, the flip-flop 9 is connected to the main bus 2 via the gate 10.

【0008】 つぎに、このような構成のDMA転送方式
において周辺装置4,5とメインメモリ2間でDMA転
送を行なう場合の動作手順を説明する。まず、周辺装置
からメインメモリ2にDMA転送を行なうには、マイク
ロプロセッサ7がDMAコントローラ11に対して起動
S1をかけ、レジスタAに内部メモリアドレスを書き込
むとともに、レジスタBにデータ長を書き込む。続い
て、DMAコントローラ11がローカルバス使用権調停
回路18にリクエストS2を出し、バス13の使用権が
得られると調停回路18はDMAコントローラ11にア
クノリッジS3を返し、内部メモリ8からフリップフロ
ップ9にデータS4が転送される。このときマイクロプ
ロセッサ7がメインメモリ2に送信したいデータの全デ
ータ長をフリップフロップ9に転送する。続いて、マイ
クロプロセッサ7はDMAコントローラ12に起動をか
け、レジスタCにメインメモリアドレスを書き込むとと
もに、レジスタDにデータ長を書き込む。すると、DM
Aコントローラ12はメインバス使用権調停回路3にリ
クエストS5を出し、バス6の使用権が得られると調停
回路3はDMAコントローラ12にアクノリッジS6を
返す。これによりゲート10が開き、フリップフロップ
9からメインメモリ2にデータS7が転送される。
[0008] Next, an operation procedure for performing the DMA transfer between the peripheral device 4, 5 and the main memory 2 in the DMA transfer method thus constructed. First, to perform DMA transfer from the peripheral device to the main memory 2, the microprocessor 7 activates the DMA controller 11 to start S1, writes an internal memory address to the register A, and writes a data length to the register B. Subsequently, the DMA controller 11 issues a request S2 to the local bus use right arbitration circuit 18, and when the right to use the bus 13 is obtained, the arbitration circuit 18 returns an acknowledgment S3 to the DMA controller 11 and sends the request from the internal memory 8 to the flip-flop 9. Data S4 is transferred. At this time, the microprocessor 7 transfers the entire data length of the data to be transmitted to the main memory 2 to the flip-flop 9. Subsequently, the microprocessor 7 starts the DMA controller 12, writes the main memory address in the register C, and writes the data length in the register D. Then DM
The A controller 12 issues a request S5 to the main bus use right arbitration circuit 3, and when the right to use the bus 6 is obtained, the arbitration circuit 3 returns an acknowledge S6 to the DMA controller 12. As a result, the gate 10 opens, and the data S7 is transferred from the flip-flop 9 to the main memory 2.

【0009】 フリップフロップ9からメインメモリ2間
の転送においては、1ワード分の転送が終了すると、一
度メインバス使用権のリクエストを解除し、バス6をリ
リースする。転送すべきデータが残っていれば、再びバ
ス6のリクエストを出し、データがなくなるまでこれを
繰り返す。メインバス6上でDMA転送中であるとき
は、マイクロプロセッサ7とローカルバス13は独自の
処理を実行できる。
In the transfer between the flip-flop 9 and the main memory 2, when the transfer of one word is completed, the request for the right to use the main bus is once released, and the bus 6 is released. If data to be transferred remains, a request for the bus 6 is issued again, and this is repeated until there is no more data. When the DMA transfer is being performed on the main bus 6, the microprocessor 7 and the local bus 13 can execute their own processing.

【0010】 一方、メインメモリ2から周辺装置4,5
にDMA転送を行なう場合は、上述した手順とは逆に、
まずメインメモリ2からフリップフロップ9にデータを
転送し、つぎにフリップフロップ9から内部メモリ8に
データを転送する。
[0010] On the other hand, a peripheral device from the main memory 2 4,5
When performing a DMA transfer, the procedure described above is reversed.
First, data is transferred from the main memory 2 to the flip-flop 9, and then data is transferred from the flip-flop 9 to the internal memory 8.

【0011】 メインバス6とローカルバス13のバス幅
が異なる場合は、たとえばメインバス6が32ビット
で、ローカルバス13が16ビットであるような場合、
フリップフロップ9を2面設けることで、内部メモリ8
とフリップフロップ間は16ビットずつ、フリップフロ
ップ第1面と第2面で交互に転送し、メインメモリ2と
フリップフロップ間はフリップフロップ第1面と第2面
に一度に32ビットのデータを転送することができる。
When the main bus 6 and the local bus 13 have different bus widths, for example, when the main bus 6 has 32 bits and the local bus 13 has 16 bits,
By providing two flip-flops 9, the internal memory 8
16 bits between the flip-flops 1 and 2 are alternately transferred between the main memory 2 and the flip-flops, and 32-bit data is transferred between the main memory 2 and the flip-flops to the flip-flops 1 and 2 at a time. can do.

【0012】 なお、本発明は上述した実施例に限定され
ず、要旨の範囲内で種々の変更実施が可能である。
The present invention is not limited to the above-described embodiment, and various modifications can be made within the scope of the gist.

【0013】[0013]

【発明の効果】以上説明したように本発明によれば、メ
インメモリと周辺装置内の内部メモリとの間でDMA転
送を行なうにあたって、ローカルバスとメインバスとの
間に設けたデータ蓄積手段を介してデータの転送を行な
えるので、ローカルバスとメインバスの使用権を同時に
獲得する必要がなく、ローカルバスの効率を上げること
ができる。また、メインバスの使用権は1ワード分の転
送が終了するごとにリリースされるので、他の周辺装置
がリクエストを出していれば使用権を移すことができ、
複数の周辺装置の並列処理が可能になるという利点があ
る。さらに、メインバスとローカルバスのバス幅が異な
る場合は、一時的なデータ蓄積手段となるフリップフロ
ップを複数面設けることにより、各バスのバス幅を十分
に活用した転送を行なえるという利点がある。
As described above, according to the present invention, when performing DMA transfer between the main memory and the internal memory in the peripheral device, the data storage means provided between the local bus and the main bus is provided. Since data can be transferred via the local bus, it is not necessary to simultaneously acquire the right to use the local bus and the main bus, and the efficiency of the local bus can be improved. Also, the right to use the main bus is released each time one word transfer is completed, so that the right to use can be transferred if another peripheral device issues a request.
There is an advantage that a plurality of peripheral devices can be processed in parallel. Further, when the bus width of the main bus is different from that of the local bus, there is an advantage that transfer utilizing the bus width of each bus can be performed by providing a plurality of flip-flops serving as temporary data storage means. .

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

【図1】本発明によるDMA転送方式の一実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing one embodiment of a DMA transfer system according to the present invention.

【図2】従来のDMA転送方式を示すブロック図であ
る。
FIG. 2 is a block diagram showing a conventional DMA transfer system.

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

1 CPU 2 メインメモリ 3 メインバス調停回路 4,5 周辺装置 6 メインバス 7 マイクロプロセッサ 8 内部メモリ 9 フリップフロップ 10 ゲート 11 第1のDMAコントローラ 12 第2のDMAコントローラ 13 ローカルバス DESCRIPTION OF SYMBOLS 1 CPU 2 Main memory 3 Main bus arbitration circuit 4, 5 Peripheral device 6 Main bus 7 Microprocessor 8 Internal memory 9 Flip-flop 10 Gate 11 First DMA controller 12 Second DMA controller 13 Local bus

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 メインバスにメインメモリと、メインバ
スの使用権を調停する調停回路と、このメインメモリと
DMA転送を行なう複数の周辺装置が接続され、 この複数の周辺装置内には、装置の内部動作を制御する
マイクロプロセッサと、転送データが記憶される内部メ
モリと、上記メインメモリにDMA転送するデータを一
時的に蓄えるデータ蓄積手段と、上記内部メモリとこの
データ蓄積手段との間のDMA転送を制御する第1のD
MAコントローラと、上記メインメモリと上記データ蓄
積手段との間のDMA転送を制御する第2のDMAコン
トローラとがローカルバスによって接続されて設けられ
おり、かつ、上記データ蓄積手段からメインメモリへ
のDMA転送を、第2のDMAコントローラが、転送デ
ータの1ワード分ごとに上記調停回路に対してメインバ
スのリクエストを出して行なうことにより、前記複数の
周辺装置の並列処理を行なうDMA転送方式。
And 1. A main to the main bus memory, an arbitration circuit that arbitrates the right to use the main bus, the main memory and performs a DMA transfer multiple peripheral devices are connected, within the plurality of peripheral devices, apparatus , An internal memory in which transfer data is stored, data storage means for temporarily storing data to be DMA-transferred to the main memory, and a data storage means for storing data between the internal memory and the data storage means. First D for controlling DMA transfer
An MA controller and a second DMA controller for controlling DMA transfer between the main memory and the data storage means are provided by being connected by a local bus, and are provided from the data storage means to the main memory.
Is transferred by the second DMA controller.
Data for each word of the
By issuing a request for
A DMA transfer system that performs parallel processing of peripheral devices .
JP4105918A 1992-03-31 1992-03-31 DMA transfer method Expired - Lifetime JP2985496B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4105918A JP2985496B2 (en) 1992-03-31 1992-03-31 DMA transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4105918A JP2985496B2 (en) 1992-03-31 1992-03-31 DMA transfer method

Publications (2)

Publication Number Publication Date
JPH05282239A JPH05282239A (en) 1993-10-29
JP2985496B2 true JP2985496B2 (en) 1999-11-29

Family

ID=14420249

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4105918A Expired - Lifetime JP2985496B2 (en) 1992-03-31 1992-03-31 DMA transfer method

Country Status (1)

Country Link
JP (1) JP2985496B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4864331A (en) * 1986-10-22 1989-09-05 Markem Corporation Offset electrostatic imaging process
US7287115B2 (en) * 2003-10-30 2007-10-23 Kabushiki Kaisha Toshiba Multi-chip package type memory system

Also Published As

Publication number Publication date
JPH05282239A (en) 1993-10-29

Similar Documents

Publication Publication Date Title
US20070174506A1 (en) Data processing apparatus
JPH0354375B2 (en)
JPH08255124A (en) System and method for data processing
JP2985496B2 (en) DMA transfer method
JP2004227049A (en) Data transfer device, semiconductor integrated circuit and microcomputer
US6195721B1 (en) Inter-processor data transfer management
GB2181578A (en) Clock delay for microprocessor
US5341508A (en) Processing unit having multiple synchronous bus for sharing access and regulating system bus access to synchronous bus
JPH051504B2 (en)
JPH04323755A (en) Dma device
JPS6217780B2 (en)
JP2687716B2 (en) Information processing device
JPH05173936A (en) Data transfer processing device
JPH0193855A (en) Memory control system in information processor
JPH04225458A (en) Computer
JP3797517B2 (en) Bus expansion system
JPH04280344A (en) Memory device
JPH0473181B2 (en)
JPH01142962A (en) Data transfer control system
JPH04116751A (en) Data transfer system
JP2000322377A (en) Data transfer controller
JPH04209059A (en) Semiconductor integrated circuit
JPS62145345A (en) Control system for direct memory access interval
JPS60136853A (en) Data transfer system
JPH01250163A (en) Bus controller