JPH0568732B2 - - Google Patents
Info
- Publication number
- JPH0568732B2 JPH0568732B2 JP61307181A JP30718186A JPH0568732B2 JP H0568732 B2 JPH0568732 B2 JP H0568732B2 JP 61307181 A JP61307181 A JP 61307181A JP 30718186 A JP30718186 A JP 30718186A JP H0568732 B2 JPH0568732 B2 JP H0568732B2
- Authority
- JP
- Japan
- Prior art keywords
- transfer
- bytes
- data
- fifo
- remaining
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bus Control (AREA)
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はDMA転送制御方式に関し、特に高速
処理が可能なDMA転送制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a DMA transfer control method, and more particularly to a DMA transfer control method capable of high-speed processing.
DMAコントローラを用いてFIFO(フアースト
インフアーストアウトメモリ)からRAM等のメ
モリヘデータを転送する場合、従来は、先ず、主
制御部がFIFOに転送データを全て書込み、この
後、DMAコントローラにデータ転送先のメモリ
アドレス及び転送データのバイト数(転送バイト
数)を含む起動指示を加え、DMAコントローラ
を起動させるようにしている。また、FIFOが蓄
積することができるバイト数(蓄積可能バイト
数)以上のデータをメモリに転送する場合は、
FIFOに蓄積可能バイト数以下のデータを書込ん
だ後、DMAコントローラに転送先のメモリアド
レス及び転送バイト数を含む起動指示を加える処
理をデータの転送が終了するまで、繰返し行なう
ようにしている。
Conventionally, when using a DMA controller to transfer data from FIFO (first-in-first-out memory) to memory such as RAM, the main control unit first writes all the transfer data to the FIFO, and then transfers the data to the DMA controller. A startup instruction including the memory address of the transfer destination and the number of bytes of transfer data (transfer byte number) is added to start the DMA controller. Also, if you want to transfer more data to memory than the number of bytes that the FIFO can store (number of bytes that can be stored),
After writing data equal to or less than the number of bytes that can be stored in the FIFO, the process of adding a startup instruction including the transfer destination memory address and the number of transfer bytes to the DMA controller is repeated until the data transfer is completed.
上述した従来方式は、主制御部がFIFOに転送
データを書込んでからDMAコントローラに起動
指示を加えるようにしており、また、一般に、
DMAコントローラには起動指示が加えられてか
らデータの転送を開始するまでにハードウエア的
な待ち時間(転送バイト数の設定、転送先アドレ
スの設定等のために生じる待ち時間)が存在する
ため、起動指示を加えた後、データの転送が開始
されるまでの間、全く処理が行なわれないことと
なり、無駄時間が多くなる問題がある。また、蓄
積可能バイト数以上のデータを転送する場合は、
FIFOに蓄積可能バイト数以下のデータを書込ん
だ後、DMAコントローラに転送先のメモリアド
レス及び転送バイト数を含む起動指示を加える処
理をデータの転送が終了するまで、繰返し行なう
ものであるから、効率が悪い問題もある。
In the conventional method described above, the main control unit writes the transfer data to the FIFO and then issues a startup instruction to the DMA controller.
Since the DMA controller has a hardware waiting time (waiting time caused by setting the number of transfer bytes, setting the transfer destination address, etc.) from when a startup instruction is applied until it starts transferring data, There is a problem in that no processing is performed at all after the activation instruction is given until the data transfer starts, resulting in a large amount of wasted time. Also, when transferring data that exceeds the number of bytes that can be stored,
After writing data equal to or less than the number of bytes that can be stored in the FIFO, the process of adding a startup instruction including the transfer destination memory address and the number of transfer bytes to the DMA controller is repeated until the data transfer is completed. There are also problems with inefficiency.
本発明は前述の如き問題点を解決したものであ
り、その目的はDMA転送を効率良く行なえるよ
うにすることにある。 The present invention solves the above-mentioned problems, and its purpose is to enable efficient DMA transfer.
本発明は前述の如き問題点を解決するため、
主制御部がFIFOに書込んだデータをDMAコ
ントローラを用いてメモリに転送するDMA転送
制御方式に於いて、
前記FIFOに蓄積されているデータのバイト数
を示すバイトカウンタを設けると共に、
前記DMAコントローラに、
前記主制御部によつて予め設定されているブロ
ツク転送バイト数と前記バイトカウンタに示され
ているバイト数とを比較し、前記バイトカウンタ
が示すバイト数が前記ブロツク転送バイト数以上
となることにより前記ブロツク転送バイト数と同
数の読出し信号を前記FIFOに加える第1の比較
器と、
前記主制御部からの起動指示に応答して前記主
制御部が出力した転送バイト数を設定し、該設定
した転送バイト数と前記FIFOに対する読出し信
号とに基づいて残留転送バイト数を求める転送完
了検索回路と、
該転送完了検索回路で求めた残留転送バイト数
と前記ブロツク転送バイト数とを比較すると共に
前記転送完了検索回路で求めた残留転送バイト数
と前記バイトカウンタが示すバイト数とを比較
し、前記転送完了検索回路で求めた残留転送バイ
ト数と前記バイトカウンタが示すバイト数とが一
致し、且つ前記転送完了検索回路で求めた残留転
送バイト数が前記ブロツク転送バイト数未満とな
ることにより前記転送完了検索回路で求めた残留
転送バイト数と同数の読出し信号を前記FIFOに
加える第2の比較器と、
前記主制御部からの起動指示に応答して前記主
制御部が出力したデータの転送先のメモリアドレ
スを設定し、前記FIFOから読出されたデータを
前記設定したメモリアドレスから順次に前記メモ
リに書込む書込み手段とを設け、
前記主制御部は前記メモリにデータを転送する
際、前記DMAコントローラに対して転送データ
の転送バイト数及びデータの転送先のメモリアド
レスを出力すると共に起動指示を行ない、その
後、前記FIFOに対する転送データの書込みを開
始し、全ての転送データを順次前記FIFOに書込
む。
In order to solve the above-mentioned problems, the present invention provides a DMA transfer control method in which data written by a main control unit to a FIFO is transferred to a memory using a DMA controller. A byte counter indicating the number of bytes is provided, and the DMA controller compares the number of block transfer bytes preset by the main control unit with the number of bytes indicated in the byte counter, and a first comparator that applies a read signal of the same number as the number of block transfer bytes to the FIFO when the number of bytes indicated by is greater than or equal to the number of block transfer bytes; a transfer completion search circuit that sets the number of transfer bytes output by the main control unit and calculates the remaining number of transfer bytes based on the set number of transfer bytes and a read signal for the FIFO; The number of transferred bytes is compared with the number of block transferred bytes, and the number of remaining transferred bytes obtained by the transfer completion search circuit is compared with the number of bytes indicated by the byte counter, and the remaining transfer bytes obtained by the transfer completion search circuit are compared. The number of remaining transfer bytes determined by the transfer completion search circuit matches the number of bytes indicated by the byte counter, and the remaining transfer byte count obtained by the transfer completion search circuit is less than the block transfer byte number. a second comparator that applies the same number of read signals to the FIFO as writing means for sequentially writing read data into the memory starting from the set memory address, and the main control unit, when transferring data to the memory, tells the DMA controller the number of transfer bytes of transfer data. and a memory address to which the data is to be transferred, as well as issuing a startup instruction. Thereafter, writing of transfer data to the FIFO is started, and all transfer data is sequentially written to the FIFO.
主制御部は、メモリにデータを転送する際、
DMAコントローラに対して転送データの転送バ
イト数及び転送先のメモリアドレスを出力すると
共に起動指示を行ない、その後、FIFOに対する
データの書込みを開始するものであり、従来は全
く処理が行なわれていなかつたDMAコントロー
ラに起動指示を加えてから実際にデータ転送が開
始されるまでのハードウエア的な待ち時間中に
FIFOに対する転送データの書込みを行なうこと
ができるので、データの転送時間を短縮すること
が可能となる。
When the main control unit transfers data to memory,
It outputs the number of bytes of transfer data and the memory address of the transfer destination to the DMA controller, as well as instructs it to start, and then starts writing data to the FIFO, which was not done at all in the past. During the hardware waiting time from when a startup instruction is given to the DMA controller until data transfer actually starts.
Since transfer data can be written to the FIFO, data transfer time can be shortened.
主制御部はDMAコントローラに起動指示を加
えた後、FIFOに対する転送データの書込みを開
始し、全ての転送データを順次FIFOに書き込む。
第1の比較器はFIFOに蓄積された転送データの
バイト数がブロツク転送バイト数以上となる毎に
ブロツク転送バイト数と同数の読出し信号を
FIFOに加える。これにより、ブロツク転送バイ
ト数分のデータがブロツク転送される。第2の比
較器は転送データの残留転送バイト数がブロツク
転送バイト数未満となり、且つFIFOに残留転送
バイト数が全て格納されることにより、残留転送
バイト数と同数の読出し信号をFIFOに加える。
これにより、残留転送データが転送される。ここ
で、第1の比較器は主制御部により予め設定され
ているブロツク転送バイト数とバイトカウンタが
示すバイト数とに基づいて読出し信号を作成し、
第2の比較器は主制御部により予め設定されてい
るブロツク転送バイト数、バイトカウンタが示す
バイト数及び残留転送バイト数とに基づいて読出
し信号を作成し、残留転送バイト数はデータ転送
時に主制御部により設定された転送バイト数と読
出し信号とにより求められるものであるから、
FIFOの蓄積可能バイト数以上のデータを転送す
る場合であつても、起動にかかる処理を1回にす
ることが可能となる。 After giving a startup instruction to the DMA controller, the main control unit starts writing transfer data to the FIFO, and sequentially writes all transfer data to the FIFO.
The first comparator outputs the same number of read signals as the number of block transfer bytes each time the number of transfer data bytes accumulated in the FIFO exceeds the number of block transfer bytes.
Add to FIFO. As a result, data corresponding to the number of block transfer bytes is transferred in blocks. The second comparator applies the same number of read signals as the remaining number of transfer bytes to the FIFO when the number of remaining transfer bytes of the transfer data becomes less than the number of block transfer bytes and all the remaining transfer bytes are stored in the FIFO.
As a result, the remaining transfer data is transferred. Here, the first comparator creates a read signal based on the number of block transfer bytes preset by the main controller and the number of bytes indicated by the byte counter,
The second comparator creates a read signal based on the number of block transfer bytes preset by the main controller, the number of bytes indicated by the byte counter, and the number of remaining transfer bytes. Since it is determined by the number of transfer bytes set by the control unit and the read signal,
Even when transferring data that exceeds the number of bytes that can be stored in the FIFO, it is possible to perform startup processing only once.
次に本発明の実施例について図面を参照して説
明する。
Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明の実施例のブロツク図であり、
主制御部1と、DMAコントローラ2と、バイト
カウンタ4を有するFIFO3と、メモリ5とから
構成されている。 FIG. 1 is a block diagram of an embodiment of the present invention.
It is composed of a main control section 1, a DMA controller 2, a FIFO 3 having a byte counter 4, and a memory 5.
バイトカウンタ4を有するFIFO3は主制御部
1からデータ11が1バイト加えらる毎に加算信
号線12を活性化してバイトカウンタ4をカウン
トアツプさせ、データ16が1バイト読出される
毎に減算信号線13を活性化してバイトカウンタ
4をカウントダウンさせる。即ち、バイトカウン
タ4のカウント値14はFIFO3に蓄積されてい
るデータのバイト数を示すことになる。また、
FIFO3は内部に蓄積されているデータのバイト
数が蓄積可能バイト数と等しくなつた時、書込み
許可信号線28を不活性化する。 The FIFO 3 having a byte counter 4 activates the addition signal line 12 every time one byte of data 11 is added from the main control unit 1 to cause the byte counter 4 to count up, and activates the subtraction signal every time one byte of data 16 is read out. Line 13 is activated to cause byte counter 4 to count down. That is, the count value 14 of the byte counter 4 indicates the number of bytes of data stored in the FIFO 3. Also,
The FIFO 3 deactivates the write permission signal line 28 when the number of bytes of data stored therein becomes equal to the number of storable bytes.
DMAコントローラ2は第1、第2の比較器
6,7と、転送完了検索回路8と、バツフア9,
10と、オアゲート29とから構成されている。
比較器6は初期設定時に主制御部1により設定さ
れたブロツク転送バイト数17(1回のブロツク
転送により転送するデータのバイト数)とバイト
カウンタ4のカウント値14とを比較し、比較結
果がカウント値14≧ブロツク転送バイト数17
となつた時、ブロツク転送バイト数17と同数の
読出し信号22を出力する。転送完了検索回路8
はその内部に読出し信号15を入力クロツクとし
て実際に転送されたデータのバイト数をカウント
するカウンタ(図示せず)を有し、主制御部1に
よつて設定された転送バイト数18からこのカウ
ンタのカウント値を減算した値を残留転送バイト
数23として比較器7に加えると共に残留転送バ
イト数23が「0」になつた時、DMA完了信号
19を主制御部1に加える。尚、上記カウンタは
転送バイト数18の設定時にリセツトされるもの
である。比較器7はカウント値14と残留転送バ
イト数23を比較すると共にブロツク転送バイト
数17と残留転送バイト数23とを比較し、比較
結果がカウント値14=残留転送バイト数23で
あり、且つ残留転送バイト数23<ブロツク転送
バイト数17となつた時、残留転送バイト数23
と同数の読出し信号24を出力する。 The DMA controller 2 includes first and second comparators 6 and 7, a transfer completion search circuit 8, a buffer 9,
10 and an or gate 29.
The comparator 6 compares the number of block transfer bytes 17 (the number of bytes of data transferred in one block transfer) set by the main control unit 1 at the time of initial setting with the count value 14 of the byte counter 4, and the comparison result is Count value 14 ≧ Number of block transfer bytes 17
When this happens, the same number of read signals 22 as the number of block transfer bytes (17) are output. Transfer completion search circuit 8
has a counter (not shown) that counts the number of bytes of data actually transferred using the read signal 15 as an input clock. The value obtained by subtracting the count value of is added to the comparator 7 as the number of remaining transfer bytes 23, and when the number of remaining transfer bytes 23 becomes "0", a DMA completion signal 19 is applied to the main control unit 1. Note that the above counter is reset when the number of transferred bytes is set to 18. The comparator 7 compares the count value 14 and the number of remaining transfer bytes 23, and also compares the number of block transfer bytes 17 and the number of remaining transfer bytes 23, and the comparison result is that the count value 14 = the number of remaining transfer bytes 23, and the remaining When the number of transferred bytes is 23<the number of block transferred bytes is 17, the remaining number of transferred bytes is 23.
The same number of read signals 24 are output.
次に第1図の動作を説明する。 Next, the operation shown in FIG. 1 will be explained.
主制御部1は装置全体の初期設定時にDMAコ
ントローラ2内の比較器6にブロツク転送バイト
数17を設定する。そして、この後、DMAコン
トローラ2を使用してFIFO3からメモリ5へデ
ータ転送を行なう場合、主制御部1は先ず、
DMAコントローラ2に転送バイト数18及びデ
ータ転送先のメモリアドレス21を加えると共に
起動指示線20を活性化し、この後、転送データ
11をFIFO3の書込む。この時、DMAコント
ローラ2に加えた転送バイト数18がFIFO3の
蓄積可能バイト数よりも大きい場合は、主制御部
1はFIFO3からの書込み許可線28が活性化さ
れていること確認してからデータ11の書込みを
行なう。また、DMAコントローラ2は起動指示
線20が活性化されたことを確認すると、主制御
部1からのメモリアドレス21をバツフア10に
格納すると共に転送バイト数18を転送完了検索
回路8に設定する。 The main controller 1 sets the number of block transfer bytes, 17, in the comparator 6 in the DMA controller 2 at the time of initializing the entire device. After this, when data is transferred from the FIFO 3 to the memory 5 using the DMA controller 2, the main control unit 1 first performs the following steps.
The number of transfer bytes 18 and the memory address 21 of the data transfer destination are added to the DMA controller 2, the activation instruction line 20 is activated, and then the transfer data 11 is written into the FIFO 3. At this time, if the number of transfer bytes 18 added to the DMA controller 2 is larger than the number of bytes that can be stored in the FIFO 3, the main control unit 1 confirms that the write permission line 28 from the FIFO 3 is activated and then transfers the data. 11 is written. Further, when the DMA controller 2 confirms that the activation instruction line 20 has been activated, it stores the memory address 21 from the main control unit 1 in the buffer 10 and sets the number of transfer bytes 18 in the transfer completion search circuit 8.
FIFO3への転送データ11の書込みが開始さ
れると、バイトカウンタ4のカウント値14は次
第に増加する。そして、カウント値14がブロツ
ク転送バイト数17に達すると、即ちカウント値
14≧ブロツク転送バイト数17の関係が満たさ
れると比較器6は前述したようにブロツク転送バ
イト数17と同数の読出し信号22を出力する。
この読出し信号22はオアゲート29を介して
FIFO3に加えられ、FIFO3はオアゲート29か
ら出力される読出し信号15に従つて1ブロツク
分の転送データ16を出力する。DMAコントロ
ーラ2は、FIFO3から出力されたデータ16を
バツフア9に順次格納し、従来と同様にこのバツ
フア9に格納されたデータ27を書込み信号26
のタイミングに従つてバツフア10に格納されて
いるアドレス25から順にメモリ5に書込む。
尚、このとき、バツフア10に格納されているメ
モリアドレスは従来と同様にして書込み信号26
に従つて順次変更されるものである。 When writing of the transfer data 11 to the FIFO 3 is started, the count value 14 of the byte counter 4 gradually increases. Then, when the count value 14 reaches the number of block transfer bytes 17, that is, when the relationship of count value 14≧number of block transfer bytes 17 is satisfied, the comparator 6 outputs the same number of read signals 22 as the number of block transfer bytes 17, as described above. Output.
This read signal 22 is passed through an OR gate 29.
The FIFO 3 outputs one block worth of transfer data 16 in accordance with the read signal 15 output from the OR gate 29. The DMA controller 2 sequentially stores the data 16 output from the FIFO 3 in the buffer 9, and sends the data 27 stored in the buffer 9 to the write signal 26 as in the past.
The data is sequentially written into the memory 5 starting from the address 25 stored in the buffer 10 according to the timing.
At this time, the memory address stored in the buffer 10 is set to the write signal 26 in the same way as before.
It will be changed sequentially according to the following.
メモリ5へのデータの書込みが行なわれている
間に於いても、FIFO3への転送データの書込み
は行なわれており、カウント値14≧ブロツク転
送バイト数17となると上記したと同様の動作が
行なわれ、またカウント値14=残留転送バイト
数23であり、且つ残留転送バイト数23<ブロ
ツク転送バイト数17となると、下記の動作が行
なわれる。 Even while data is being written to memory 5, transfer data is being written to FIFO 3, and when the count value 14≧block transfer byte number 17, the same operation as described above is performed. When the count value 14=the number of remaining transfer bytes is 23, and the number of remaining transfer bytes 23<the number of block transfer bytes 17, the following operation is performed.
上記した条件が成立すると、即ち、転送データ
の残留転送バイト数23がブロツク転送バイト数
17以下となり、且つFIFO3に残留データが全
て書込まれると、比較器7は前述したように残留
転送バイト数23と同数の読出し信号24を出力
する。この読出し信号24はオアゲート29を介
してFIFO3に加えられ、FIFO3はオアゲート2
9から出力される読出し信号15に従つて転送デ
ータを1バイトずつ順次出力する。FIFO3から
出力されたデータはバツフア9に一時格納され、
バツフア9に格納されたデータ27は書込み信号
26のタイミングに従つてメモリ5のバツフア1
0に格納されているアドレス25から順に書込ま
れる。即ち、残留データのバイト数がブロツクバ
イト数17以上ある場合は、ブロツク転送バイト
数単位でデータの転送が行なわれ、ブロツク転送
バイト数17以下である場合は、そのバイト数単
位でデータの転送が行なわれる。そして、データ
の転送が完了し、残留転送データ数23が「0」
となると、DMAコントローラ2はDMA完了信
号19により主制御部1にDMA転送の終了を通
知する。 When the above conditions are satisfied, that is, when the number of remaining transfer bytes 23 of the transfer data becomes less than or equal to the number of block transfer bytes 17, and when all the remaining data is written to FIFO 3, the comparator 7 detects the number of remaining transfer bytes as described above. 23 and the same number of read signals 24 are output. This read signal 24 is applied to FIFO 3 via OR gate 29, and FIFO 3 is applied to OR gate 2.
Transfer data is sequentially output one byte at a time in accordance with a read signal 15 output from 9. The data output from FIFO 3 is temporarily stored in buffer 9,
The data 27 stored in the buffer 9 is transferred to the buffer 1 of the memory 5 according to the timing of the write signal 26.
They are written in order starting from address 25, which is stored in address 0. In other words, if the number of bytes of residual data is 17 or more block bytes, data is transferred in units of block transfer bytes, and if the number of block transfer bytes is 17 or less, data is transferred in units of that number of bytes. It is done. Then, the data transfer is completed and the remaining transfer data count 23 becomes “0”.
Then, the DMA controller 2 notifies the main control unit 1 of the end of the DMA transfer using the DMA completion signal 19.
尚、第1図の一点鎖線で囲んだ部分を集積化す
ることも可能である。 Note that it is also possible to integrate the portion surrounded by the dashed line in FIG.
以上説明したように、本発明は、先ず、DMA
コントローラに対して転送バイト数、転送先のメ
モリアドレスを出力すると共に起動指示を行な
い、その後、FIFOに対する転送データの書込み
を開始するものであり、従来は全く処理が行なわ
れていなかつたDMAコントローラに起動指示を
加えてから実際にデータ転送が開始されるまでの
ハードウエア的な待ち時間中にFIFOに対する転
送データの書込みを行なうことができるので、デ
ータの転送時間の短縮を図ることができる効果が
ある。
As explained above, the present invention first provides DMA
It outputs the number of bytes to be transferred and the memory address of the transfer destination to the controller, as well as instructing the controller to start, and then starts writing the transfer data to the FIFO, which is an improvement to the DMA controller, which previously did not perform any processing at all. Transfer data can be written to the FIFO during the hardware waiting time from when a startup instruction is given until data transfer actually starts, which has the effect of shortening data transfer time. be.
また、メモリへの1回のデータ転送は予め定め
られたブロツク転送バイト数毎に行なわれるが、
ブロツク転送バイト数に満たない余りのデータに
ついては第2の比較器が自動的に検出してデータ
転送するので、転送できるデータ量を任意長とす
ることができる。 Also, one data transfer to memory is performed every predetermined number of block transfer bytes;
Since the second comparator automatically detects and transfers the remaining data less than the number of block transfer bytes, the amount of data that can be transferred can be set to any length.
更に、本発明は、FIFOに蓄積された転送デー
タのバイト数がブロツク転送バイト数以上となる
毎にブロツク転送バイト数と同数の読出し信号を
FIFOに加える第1の比較回路と、転送データの
残留転送バイト数がブロツク転送バイト数未満と
なり、且つFIFOに残留転送バイト数が全て格納
されることにより、残留転送バイト数と同数の読
出し信号をFIFOに加える第2の比較回路とを備
え、また、主制御部はDMAコントローラに対し
て起動指示を出力した後、FIFOに対する転送デ
ータの書込みを開始して、全て転送データの順次
FIFOに書込むものであるので、FIFOの蓄積可能
バイト数以上のデータを転送する場合であつても
DMAコントローラの起動にかかる処理を1回に
することができ、従つて、データの転送効率を向
上させることができる効果がある。 Furthermore, the present invention provides the same number of read signals as the number of block transfer bytes each time the number of transfer data bytes accumulated in the FIFO exceeds the number of block transfer bytes.
The first comparator circuit added to the FIFO, the number of remaining transfer bytes of the transfer data is less than the number of block transfer bytes, and all remaining transfer bytes are stored in the FIFO, so that read signals equal to the number of remaining transfer bytes are generated. After outputting a start instruction to the DMA controller, the main control unit starts writing the transfer data to the FIFO, and writes all the transfer data sequentially.
Since it is written to the FIFO, even when transferring data that exceeds the number of bytes that can be stored in the FIFO,
The processing required to start up the DMA controller can be reduced to one time, which has the effect of improving data transfer efficiency.
第1図は本発明の実施例のブロツク図である。
図に於いて、1……主制御部、2……DMAコ
ントローラ、3……FIFO、4……バイトカウン
タ、5……メモリ、6,7……比較器、8……転
送完了検索回路、9,10……バツフア。
FIG. 1 is a block diagram of an embodiment of the invention. In the figure, 1... Main control unit, 2... DMA controller, 3... FIFO, 4... Byte counter, 5... Memory, 6, 7... Comparator, 8... Transfer completion search circuit, 9,10...Batsuhua.
Claims (1)
コントローラを用いてメモリに転送するDMA転
送制御方式に於いて、 前記FIFOに蓄積されているデータのバイト数
を示すバイトカウンタを設けると共に、 前記DMAコントローラに、 前記主制御部によつて予め設定されているブロ
ツク転送バイト数と前記バイトカウンタに示され
ているバイト数とを比較し、前記バイトカウンタ
が示すバイト数が前記ブロツク転送バイト数以上
となることにより前記ブロツク転送バイト数と同
数の読出し信号を前記FIFOに加える第1の比較
器と、 前記主制御部からの起動指示に応答して前記主
制御部が出力した転送バイト数を設定して、該設
定した転送バイト数と前記FIFOに対する読出し
信号とに基づいて残留転送バイト数を求める転送
完了検索回路と、 該転送完了検索回路で求めた残留転送バイト数
と前記ブロツク転送バイト数とを比較すると共に
前記転送完了検索回路で求めた残留転送バイト数
と前記バイトカウンタが示すバイト数とを比較
し、前記転送完了検索回路で求めた残留転送バイ
ト数と前記バイトカウンタが示すバイト数とが一
致し、且つ前記転送完了検索回路で求めた残留転
送バイト数が前記ブロツク転送バイト数未満とな
ることにより前記転送完了検索回路で求めた残留
転送バイト数と同数の読出し信号を前記FIFOに
加える第2の比較器と、 前記主制御部からの起動指示に応答して前記主
制御部が出力したデータの転送先のメモリアドレ
スを設定し、前記FIFOから読出されたデータを
前記設定したメモリアドレスから順次に前記メモ
リに書込む書込み手段とを設け、 前記主制御部は前記メモリにデータを転送する
際、前記DMAコントローラに対して転送データ
の転送バイト数及びデータの転送先のメモリアド
レスを出力すると共に起動指示を行ない、その
後、前記FIFOに対する転送データの書込みを開
始し、全ての転送データを順次前記FIFOに書込
むことを特徴とするDMA転送制御方式。[Claims] 1. The data written by the main control unit to the FIFO is
In a DMA transfer control method in which a controller is used to transfer data to memory, a byte counter is provided that indicates the number of bytes of data stored in the FIFO, and the DMA controller is provided with a byte counter that indicates the number of bytes of data stored in the FIFO. The number of block transfer bytes currently being transferred is compared with the number of bytes indicated by the byte counter, and if the number of bytes indicated by the byte counter is greater than or equal to the number of block transfer bytes, a read signal equal to the number of block transfer bytes is generated. a first comparator that adds the number of transferred bytes to the FIFO; a transfer completion search circuit that calculates the number of remaining transfer bytes based on the transfer completion search circuit; and a transfer completion search circuit that compares the remaining transfer byte number obtained by the transfer completion search circuit with the block transfer byte count, and also compares the remaining transfer byte count obtained by the transfer completion search circuit. The number of bytes is compared with the number of bytes indicated by the byte counter, and if the number of remaining transferred bytes determined by the transfer completion search circuit matches the number of bytes indicated by the byte counter, and the number of remaining transfer bytes determined by the transfer completion search circuit is a second comparator that applies read signals to the FIFO equal to the number of remaining transfer bytes determined by the transfer completion search circuit when the number of transfer bytes becomes less than the number of block transfer bytes; writing means for setting a memory address to which data outputted by the main control unit is to be transferred in response to an instruction, and sequentially writing data read from the FIFO to the memory from the set memory address; When transferring data to the memory, the main control unit outputs the number of transfer bytes of transfer data and the memory address of the data transfer destination to the DMA controller, and also issues a start instruction, and then transfers the transfer data to the FIFO. A DMA transfer control method characterized by starting writing of the FIFO and sequentially writing all transfer data to the FIFO.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30718186A JPS63158653A (en) | 1986-12-23 | 1986-12-23 | Dma transfer control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30718186A JPS63158653A (en) | 1986-12-23 | 1986-12-23 | Dma transfer control system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63158653A JPS63158653A (en) | 1988-07-01 |
| JPH0568732B2 true JPH0568732B2 (en) | 1993-09-29 |
Family
ID=17966009
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30718186A Granted JPS63158653A (en) | 1986-12-23 | 1986-12-23 | Dma transfer control system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63158653A (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5293243A (en) * | 1976-01-31 | 1977-08-05 | Nec Corp | Data processing unit performing preceding control |
| JPS6059432A (en) * | 1983-09-10 | 1985-04-05 | Fujitsu Ltd | Data buffer control method of input and output device |
-
1986
- 1986-12-23 JP JP30718186A patent/JPS63158653A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63158653A (en) | 1988-07-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6728797B2 (en) | DMA controller | |
| US4747038A (en) | Disk controller memory address register | |
| JPH0568732B2 (en) | ||
| JPH0696007A (en) | DMA transfer method | |
| JPH0221619B2 (en) | ||
| JPH06103225A (en) | Chain type DMA system and DMA controller therefor | |
| JPS6040064B2 (en) | Data transfer control method | |
| JPH04323755A (en) | Dma device | |
| JP2599184B2 (en) | DMAC read transfer controller | |
| JPS61150055A (en) | Dma data transfer system | |
| JPH0567035A (en) | Data alignment method in DMA transfer | |
| JPH06348644A (en) | DMA circuit | |
| JPS62182919A (en) | Data transfer controller | |
| JPH0241549A (en) | Data transfer system | |
| JPS61264465A (en) | Data transfer control method | |
| JPS59189433A (en) | Data erasing system by direct memory access | |
| JP2747154B2 (en) | Input/Output Processor | |
| JPS6294042A (en) | Communication control equipment | |
| JPH05143524A (en) | Counter control method | |
| JPH03294951A (en) | High speed data transfer system in personal computer system | |
| JPS6220041A (en) | Asynchronous data transfer circuit for data processor | |
| JPH0713698A (en) | Data transfer control method | |
| JPS61288252A (en) | Data transfer system | |
| JPH06348645A (en) | DMA circuit | |
| JPH01121924A (en) | Data transfer device |