[go: up one dir, main page]

JPH06266612A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPH06266612A
JPH06266612A JP5712193A JP5712193A JPH06266612A JP H06266612 A JPH06266612 A JP H06266612A JP 5712193 A JP5712193 A JP 5712193A JP 5712193 A JP5712193 A JP 5712193A JP H06266612 A JPH06266612 A JP H06266612A
Authority
JP
Japan
Prior art keywords
data
memory
byte
transfer
speed bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5712193A
Other languages
Japanese (ja)
Inventor
Tsuyoshi Igarashi
強 五十嵐
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5712193A priority Critical patent/JPH06266612A/en
Publication of JPH06266612A publication Critical patent/JPH06266612A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To transfer data in high speed bus width even if a fraction byte occurs at the start side and the end side of DMA transfer. CONSTITUTION:One byte data transferred from a DMA unit whenever a transfer permission signal 32 is outputted from a control circuit 25 is latched at a byte position in a register 21, which a counter 253 shows. The counter 253 is counted up. When a counter value is changed to '0', the content of the register 21 is copied on a buffer 22. When transfer is judged to that of the fraction byte of the start side by a start address, word data on a memory, which corresponds to the address, is read into a register 23 through a high speed bus 3 with eight byte width. Then, data part subsequent to a position which lower three bits in the start address shows in the content of the register 23 is exchanged with the part of the buffer 22 by a merging circuit 24, and it is DMA-transferred through the high speed bus 3 so as to write it into an original word position.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は高速バスに接続されたメ
モリと低速バスに接続されたDMA機器(入出力機器)
との間のDMA転送制御を行うDMAコントローラに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory connected to a high speed bus and a DMA device (input / output device) connected to a low speed bus.
The present invention relates to a DMA controller that controls the DMA transfer between and.

【0002】[0002]

【従来の技術】この種のDMAコントローラは、例えば
CPUからの指定により、低速バスに接続されたディス
ク装置などのDMA機器(入出力機器)から転送された
データを高速バスに接続されたメモリにライトするの
に、高速バスを有効に利用するために、高速バスのバス
幅に一致したバイト数を単位のデータ転送(DMA転
送)を行うのを基本としている。したがって、例えば高
速バスのバス幅が8バイト(64ビット)、低速バスの
バス幅が1バイト(8ビット)のシステムでは、DMA
機器からのデータをメモリにライトするのに、基本的に
は、高速バスのバス幅である8バイト全てを利用してデ
ータ転送が行われる。
2. Description of the Related Art A DMA controller of this type transfers data transferred from a DMA device (input / output device) such as a disk device connected to a low-speed bus to a memory connected to a high-speed bus according to a designation from a CPU, for example. In order to effectively use the high-speed bus for writing, data transfer (DMA transfer) is basically performed in units of the number of bytes matching the bus width of the high-speed bus. Therefore, for example, in a system in which the bus width of the high-speed bus is 8 bytes (64 bits) and the bus width of the low-speed bus is 1 byte (8 bits), the DMA
In order to write the data from the device to the memory, basically, the data transfer is performed by using all 8 bytes which is the bus width of the high speed bus.

【0003】しかし、このようなデータ転送が可能であ
るのは、CPUにより指定されたメモリアクセス(DM
A転送)のスタート位置とエンド位置とが8バイト単位
のワード境界に一致して、図5(a)に示すように、端
数バイトが存在しない特別な場合に限られる。
However, such data transfer is possible only in the memory access (DM) specified by the CPU.
This is limited to a special case where the start position and the end position of (A transfer) coincide with the word boundary in units of 8 bytes and there is no fractional byte as shown in FIG.

【0004】そして、図5(b)に示すようにスタート
側とエンド側に端数バイトが存在する通常の状態では、
このスタート側とエンド側の端数バイトについては、D
MAコントローラは1バイト単位でデータ転送を行うの
が一般的であった。この場合、データ転送に必要な高速
バス(の使用権)を取得する動作も、端数バイトにいつ
ては1バイト単位で行っていた。
Then, as shown in FIG. 5B, in a normal state in which there are fractional bytes on the start side and the end side,
D for the fractional bytes on the start and end sides
The MA controller generally transfers data in 1-byte units. In this case, the operation of acquiring (the right to use) the high-speed bus necessary for data transfer has also been performed for each fractional byte in units of 1 byte.

【0005】[0005]

【発明が解決しようとする課題】上記したように従来の
DMAコントローラは、低速バスに接続されたDMA機
器からのデータを高速バスに接続されたメモリにライト
するメモリアクセスでは、スタート側とエンド側の端数
バイトについては、1バイト単位でデータ転送を行う必
要があったため、高速バスの使用効率が低下して、DM
A全体の転送速度が低下するという問題があった。
As described above, in the conventional DMA controller, in the memory access for writing the data from the DMA device connected to the low speed bus to the memory connected to the high speed bus, the start side and the end side are accessed. Since it was necessary to transfer data in units of 1 byte for the fractional bytes of, the usage efficiency of the high-speed bus decreased and DM
There is a problem that the transfer rate of the entire A decreases.

【0006】この発明は上記事情を考慮してなされたも
のでその目的は、DMA機器からのデータを高速バスに
接続されたメモリにライトするメモリアクセス要求に対
して、スタート側とエンド側で端数バイトが生じても、
高速バス幅でのデータ転送が行え、もって高速バスの使
用効率向上、更にはDMA全体の転送速度の向上が図れ
るDMAコントローラを提供することにある。
The present invention has been made in consideration of the above circumstances, and an object thereof is a fraction on the start side and the end side in response to a memory access request for writing data from a DMA device to a memory connected to a high speed bus. Even if a bite occurs,
It is an object of the present invention to provide a DMA controller capable of performing data transfer with a high-speed bus width, thereby improving the use efficiency of the high-speed bus and further improving the transfer rate of the entire DMA.

【0007】[0007]

【課題を解決するための手段】この発明は、DMA機器
(入出力機器)から転送されるデータを高速バスに接続
されたメモリにライトするメモリアクセス要求に対し
て、DMA転送のスタート側またはエンド側に高速バス
のバス幅に満たない端数バイトが存在する場合に、転送
先アドレスに対応する高速バス幅のワードデータを上記
メモリからリードする制御手段と、この制御手段により
リードされたデータに対して端数バイトによりその該当
部分の書き換えを行って高速バス幅のライトデータを生
成するマージ手段とを設け、このマージ手段により生成
されたライトデータを高速バスを介してDMA転送して
上記メモリの元のワード位置にライトするようにしたこ
とを特徴とする。
According to the present invention, a start or end of a DMA transfer is responded to a memory access request for writing data transferred from a DMA device (input / output device) to a memory connected to a high speed bus. When there is a fractional byte less than the bus width of the high-speed bus on the side, the control means for reading word data of the high-speed bus width corresponding to the transfer destination address from the memory, and the data read by this control means And a merge means for generating a write data having a high-speed bus width by rewriting the corresponding portion with a fractional byte, and the write data generated by the merge means is DMA-transferred through the high-speed bus to transfer the original data of the memory. It is characterized in that writing is performed at the word position of.

【0008】[0008]

【作用】上記の構成において、制御手段は、低速バスに
接続されたDMA機器からのデータを例えば2n バイト
のバス幅の高速バスに接続されたメモリにライトするメ
モリアクセス(メモリライトアクセス)が要求された場
合、DMA機器とDMAコントローラ(に設けたデータ
レジスタ)との間で一定長のデータ、例えば1バイトデ
ータを単位にデータ転送を行う。また制御手段は、この
データ転送の開始時に、メモリスタートアドレス(の下
位nビット)が高速バス幅の開始バイト位置(バイト
0)に対応しているか否かを調べ、対応していないなら
ば、DMA転送のスタート側に端数バイトが存在するる
ものと判断する。この場合、制御手段は、メモリスター
トアドレス(の下位nビットを除く上位アドレス)で指
定されるメモリ上のワード位置のデータ、即ちライト先
に対応する高速バス幅のワードデータを、メモリからリ
ードしておく。
In the above structure, the control means receives data from the DMA device connected to the low speed bus, for example, 2 n. When a memory access (memory write access) for writing to a memory connected to a high-speed bus having a bus width of bytes is requested, a fixed length of data, for example, between the DMA device and the DMA controller (a data register provided therein), for example, Data transfer is performed in units of 1-byte data. At the start of this data transfer, the control means checks whether the memory start address (lower n bits of the memory start address) corresponds to the start byte position (byte 0) of the high speed bus width. It is determined that there are fractional bytes on the start side of the DMA transfer. In this case, the control means reads from the memory the data at the word position on the memory designated by the memory start address (the higher address excluding the lower n bits of the data), that is, the word data having the high-speed bus width corresponding to the write destination. Keep it.

【0009】制御手段は、DMA転送のスタート側で端
数バイトが存在するものと判断した場合には、メモリス
タートアドレスに対応したバイト位置から、高速バスの
バス幅(2n バイト)の最終バイト位置までの端数バイ
トがDMA機器から転送された時点で、マージ手段を制
御して、先にリードしておいたワードデータと当該端数
バイトとをマージさせる。これにより、リードデータ中
の端数バイト該当部分が端数バイトに置き換えられた、
高速バス幅のライトデータが生成される。制御手段は、
このライトデータをDMA転送して上記メモリ内の先に
リードしたのと同じワード位置にライトする。
When it is determined that there are fractional bytes on the start side of the DMA transfer, the control means starts from the byte position corresponding to the memory start address to the bus width (2 n When the fractional bytes up to the final byte position of (byte) are transferred from the DMA device, the merging unit is controlled to merge the previously read word data with the fractional byte. As a result, the part corresponding to the fractional bytes in the read data was replaced with the fractional bytes.
Write data with a high-speed bus width is generated. The control means is
This write data is DMA-transferred and written in the same word position as previously read in the memory.

【0010】これ以後、制御手段は、DMA機器から1
バイト単位で順次転送されるデータが2n バイトになる
毎に、その2n バイトのデータをそのまま高速バスを介
してDMA転送してメモリにライトする。そして、この
DMA転送により残りの転送バイト数が1バイト以上、
高速バス幅(2n バイト)未満になると、制御手段は、
次がDMA転送のエンド側であり、且つ端数バイトが存
在するものと判断する。この場合、制御手段は、ライト
先に対応する高速バス幅のワードデータをメモリからリ
ードししておく。
After that, the control means is controlled by the DMA device.
Data that is transferred sequentially in byte units is 2 n 2 n each time it becomes a byte The byte data is directly DMA-transferred via the high-speed bus and written to the memory. Then, the number of remaining transfer bytes is 1 byte or more by this DMA transfer,
Express bus width (2 n Less than a byte), the control means
Next, it is judged that the end side of the DMA transfer is present and there are fractional bytes. In this case, the control means reads the word data of the high speed bus width corresponding to the write destination from the memory.

【0011】制御手段は、DMA転送のエンド側で端数
バイトが存在するものと判断した場合には、最後の1バ
イトデータがDMA機器から転送された時点で、マージ
手段を制御して、先にリードしておいたワードデータと
高速バス幅の開始バイト位置から最後の転送バイトのバ
イト位置までの端数バイトとをマージさせる。これによ
り、リードデータ中の端数バイト該当部分が端数バイト
に置き換えられた、高速バス幅のライトデータが生成さ
れる。制御手段は、このライトデータをDMA転送して
上記メモリ内の先にリードしたのと同じワード位置にラ
イトする。
When it is determined that there are fractional bytes on the end side of the DMA transfer, the control means controls the merging means at the time when the last 1-byte data is transferred from the DMA device, and first. The read word data is merged with the fractional bytes from the start byte position of the high speed bus width to the byte position of the last transfer byte. As a result, write data having a high-speed bus width is generated, in which a portion corresponding to a fractional byte in the read data is replaced with a fractional byte. The control means DMA-transfers this write data and writes it in the same word position as previously read in the memory.

【0012】[0012]

【実施例】図1はこの発明の一実施例に係るDMAコン
トローラを備えた情報処理システムのシステム構成図で
ある。
1 is a system configuration diagram of an information processing system including a DMA controller according to an embodiment of the present invention.

【0013】図1において、1はシステムの中枢をなす
CPU、2はプログラム、データ等が格納される1ワー
ドが例えば8バイトのメモリ(主メモリ)、3は例えば
8バイトのバス幅(データ幅)の高速バスである。CP
U1およびメモリ2は高速バス3に接続されている。4
はディスク装置などのDMA機器(入出力機器)、5は
例えば1バイトのバス幅の低速バスである。DMA機器
4は低速バス5に接続されている。
In FIG. 1, 1 is a CPU which is the center of the system, 2 is a memory (main memory) in which one word for storing programs, data, etc. is 8 bytes (main memory), 3 is a bus width (data width) of 8 bytes, for example. ) Is a highway bus. CP
U1 and the memory 2 are connected to the high speed bus 3. Four
Is a DMA device (input / output device) such as a disk device, and 5 is a low speed bus having a bus width of 1 byte, for example. The DMA device 4 is connected to the low speed bus 5.

【0014】6は高速バス3および低速バス5に接続さ
れたDMAコントローラである。DMAコントローラ6
は、メモリ2とDMA機器4との間のデータ転送を制御
する。本実施例におけるDMAコントローラ6は、DM
A機器4からのデータをメモリ2にライトするメモリア
クセス要求に対して、要求されたサイズのデータのスタ
ート側とエンド側に端数バイトが存在する場合でも、高
速バス3を介してのメモリ2との間のデータ転送(DM
A転送)を常に高速バス3のバス幅(8バイト)で行う
新規な構成を有している。図2はDMAコントローラ6
の構成を示すブロック図である。
Reference numeral 6 is a DMA controller connected to the high speed bus 3 and the low speed bus 5. DMA controller 6
Controls data transfer between the memory 2 and the DMA device 4. The DMA controller 6 in this embodiment is a DM
In response to a memory access request for writing data from the device A 4 to the memory 2, even if there are fractional bytes on the start side and end side of the requested size of data, the memory 2 via the high-speed bus 3 Data transfer between
It has a new configuration in which A transfer) is always performed with the bus width (8 bytes) of the high-speed bus 3. FIG. 2 shows the DMA controller 6
3 is a block diagram showing the configuration of FIG.

【0015】図2において、21は低速バス5を介して
転送されるDMA機器4からの1バイトデータをラッチ
するための8バイトのデータレジスタである。このDM
A機器4からの1バイトデータのデータレジスタ21内
ラッチ位置(バイト位置)は、後述するコントロール回
路25内のバイト位置カウンタ253の値(0〜7のい
ずれか)によって決定される。
In FIG. 2, reference numeral 21 is an 8-byte data register for latching 1-byte data transferred from the DMA device 4 via the low-speed bus 5. This DM
The latch position (byte position) in the data register 21 of the 1-byte data from the A device 4 is determined by the value (any one of 0 to 7) of the byte position counter 253 in the control circuit 25 described later.

【0016】22はデータレジスタ21の内容をラッチ
するための8バイトのデータバッファである。このデー
タバッファ22のラッチタイミングは、データレジスタ
21のバイト7(8バイト目)にデータがラッチされた
直後、または転送データの最終バイトがデータレジスタ
21のいずれかのバイト位置にラッチされた直後であ
る。
Reference numeral 22 is an 8-byte data buffer for latching the contents of the data register 21. The latch timing of the data buffer 22 is immediately after data is latched in the byte 7 (8th byte) of the data register 21 or immediately after the last byte of the transfer data is latched in any byte position of the data register 21. is there.

【0017】23はメモリ2から高速バス3を介してリ
ードした8バイトメモリデータを保持する8バイトのメ
モリデータレジスタ、24はデータバッファ22のデー
タとメモリデータレジスタ23のデータとをマージする
マージ回路である。
Reference numeral 23 is an 8-byte memory data register for holding 8-byte memory data read from the memory 2 via the high-speed bus 3. Reference numeral 24 is a merge circuit for merging the data in the data buffer 22 and the data in the memory data register 23. Is.

【0018】25はDMAコントローラ6の中枢をなす
コントロール回路である。コントロール回路25は、低
速バス5を介して与えられるDMA機器4からの転送要
求信号31に応じて、データ転送を制御するための各種
コントロール信号を生成する。
Reference numeral 25 is a control circuit which is the center of the DMA controller 6. The control circuit 25 generates various control signals for controlling data transfer according to the transfer request signal 31 from the DMA device 4 given via the low-speed bus 5.

【0019】コントロール回路25により生成されるコ
ントロール信号には、DMA機器4への転送許可信号3
2、およびデータラッチ信号33-0〜33-7がある。デ
ータラッチ信号33-i(i=0〜7)は、DMA機器4
からの1バイトデータをデータレジスタ21のバイトi
の位置にラッチさせるのに用いられる。コントロール回
路25により生成されるコントロール信号には更に、デ
ータバッファ22へのデータラッチ信号34、マージ回
路24のマージ動作を制御するためのマージコントロー
ル情報35、および高速バス3への転送要求信号36等
がある。またコントロール回路25には、転送要求信号
36に対する高速バス3からの転送終了信号37が入力
されるようになっている。コントロール回路25は、メ
モリアドレスレジスタ251と、転送バイトカウンタ2
52と、バイト位置カウンタ253とを内蔵する。
The control signal generated by the control circuit 25 includes a transfer permission signal 3 for the DMA device 4.
2 and data latch signals 33-0 to 33-7. The data latch signal 33-i (i = 0 to 7) is sent to the DMA device 4
1 byte data from byte i of data register 21
Used to latch in the position. The control signal generated by the control circuit 25 further includes a data latch signal 34 to the data buffer 22, merge control information 35 for controlling the merge operation of the merge circuit 24, and a transfer request signal 36 to the high-speed bus 3. There is. A transfer end signal 37 from the high speed bus 3 for the transfer request signal 36 is input to the control circuit 25. The control circuit 25 includes a memory address register 251 and a transfer byte counter 2
52 and a byte position counter 253 are incorporated.

【0020】メモリアドレスレジスタ251には、CP
U1により要求されたメモリアクセス(ここでは、メモ
リライトアクセス)の開始アドレス(メモリスタートア
ドレス)が初期設定される。メモリアドレスレジスタ2
51の内容は、高速バス幅のDMA転送が行われる毎に
「8」加算され、その下位3ビットを除く上位ビットに
より、メモリ2上の転送先ワードアドレスを指定する。
The memory address register 251 has a CP
The start address (memory start address) of the memory access (here, memory write access) requested by U1 is initialized. Memory address register 2
The content of 51 is incremented by "8" every time a high-speed bus width DMA transfer is performed, and the higher-order bits except the lower-order 3 bits specify the transfer destination word address on the memory 2.

【0021】転送バイトカウンタ252には、CPU1
により要求されたメモリアクセスのサイズ(転送バイト
数)が初期設定される。転送バイトカウンタ252は、
DMA機器4から低速バス5を介して1バイトデータが
転送される毎にカウントダウンして、残り転送バイト数
を示す。
The transfer byte counter 252 has a CPU 1
The memory access size (number of transfer bytes) requested by is initialized. The transfer byte counter 252 is
Each time 1-byte data is transferred from the DMA device 4 via the low-speed bus 5, it counts down to show the number of remaining transfer bytes.

【0022】バイト位置カウンタ253には、上記のメ
モリスタートアドレスの下位3ビットが初期設定され
る。このバイト位置カウンタ253は、DMA機器4か
ら低速バス5を介して1バイトデータが転送される毎に
カウントアップして、次に転送される1バイトデータの
データレジスタ21内ラッチ位置(バイト位置)を指定
する。
In the byte position counter 253, the lower 3 bits of the above memory start address are initialized. The byte position counter 253 counts up each time 1-byte data is transferred from the DMA device 4 via the low-speed bus 5, and the latch position (byte position) in the data register 21 of the 1-byte data to be transferred next. Is specified.

【0023】次に、この発明の一実施例の動作を、CP
U1からの要求に従い、DMA機器4から転送されるデ
ータを、DMAコントローラ6の制御により高速バス3
を介してメモリ2にDMA転送する場合を例に説明す
る。
Next, the operation of one embodiment of the present invention will be described with reference to CP.
According to the request from U1, the data transferred from the DMA device 4 is transferred to the high-speed bus 3 under the control of the DMA controller 6.
An example will be described in which a DMA transfer is performed to the memory 2 via.

【0024】まず、CPU1からDMAコントローラ6
に対し、DMA機器4から転送されるデータをメモリ2
にライトするメモリアクセス(メモリライトアクセス)
が要求されたものとする。この要求では、メモリスター
トアドレス(データ転送開始メモリアドレス)と、転送
サイズ(転送バイト数)が指定される。またCPU1か
らDMA機器4に対して、データリードが要求され、リ
ード開始位置(DMA機器4がディスク装置であれば、
リード開始ディスクアドレス)と転送サイズが指定され
る。
First, the CPU 1 to the DMA controller 6
Data transferred from the DMA device 4 to the memory 2
Access to write to memory (memory write access)
Shall be requested. In this request, the memory start address (data transfer start memory address) and the transfer size (number of transfer bytes) are specified. Further, the CPU 1 requests the DMA device 4 to read the data, and the read start position (if the DMA device 4 is a disk device,
Read start disk address) and transfer size are specified.

【0025】DMAコントローラ6内のコントロール回
路25は、CPU1からの上記要求により、メモリスタ
ートアドレスをメモリアドレスレジスタ251に、転送
サイズ(転送バイト数)を転送バイトカウンタ252
に、そして上記メモリスタートアドレスの下位3ビット
をバイト位置カウンタ253に、それぞれセットする。
In response to the above request from the CPU 1, the control circuit 25 in the DMA controller 6 stores the memory start address in the memory address register 251, and the transfer size (the number of transfer bytes) in the transfer byte counter 252.
And the lower 3 bits of the memory start address are set in the byte position counter 253, respectively.

【0026】次にコントロール回路25は、メモリアド
レスレジスタ251の下位3ビットの値(メモリアドレ
スレジスタ251に初期設定されたメモリスタートアド
レスの下位3ビットの値)が「0」であるか否かによ
り、DMA転送のスタート側に端数バイトが存在するか
否かを判断する。この判断は、バイト位置カウンタ25
3の3ビット値に従って行うことも可能である。
Next, the control circuit 25 determines whether the value of the lower 3 bits of the memory address register 251 (the value of the lower 3 bits of the memory start address initialized in the memory address register 251) is "0". , Whether or not there is a fractional byte on the start side of DMA transfer is determined. This judgment is made by the byte position counter 25.
It is also possible to do according to a 3-bit value of 3.

【0027】もし、図5(b)に示すデータの転送(メ
モリライト)の例であるならば、メモリスタートアドレ
スの下位3ビットの値は「4」であり、「0」ではな
い。この場合、コントロール回路25は、DMA転送の
スタート側に端数バイトが存在すると判断し、高速バス
3に対して、図4のタイミングチャートに示すようにリ
ードの転送要求信号36を出力する。同時にコントロー
ル回路25は、メモリアドレスレジスタ251の示すメ
モリアドレスのうちの下位3ビットをオール“0”の3
ビットデータに置き換えたメモリアドレスを、高速バス
3に出力する。
If it is an example of data transfer (memory write) shown in FIG. 5B, the value of the lower 3 bits of the memory start address is "4", not "0". In this case, the control circuit 25 determines that there is a fractional byte on the start side of the DMA transfer, and outputs the read transfer request signal 36 to the high-speed bus 3 as shown in the timing chart of FIG. At the same time, the control circuit 25 sets the lower 3 bits of the memory address indicated by the memory address register 251 to 3 of all “0”.
The memory address replaced with the bit data is output to the high speed bus 3.

【0028】これにより、メモリ2から、上記メモリア
ドレスの下位3ビットを除く上位アドレス、即ちメモリ
スタートアドレスの下位3ビットを除く上位アドレス
(ワードアドレス)で指定される8バイト(64ビッ
ト)のワードデータがリードされ、図4に示すように、
転送終了信号37と共に高速バス3を介してDMAコン
トローラ6に転送される。
As a result, an 8-byte (64-bit) word specified from the memory 2 by an upper address excluding the lower 3 bits of the memory address, that is, an upper address (word address) excluding the lower 3 bits of the memory start address. The data is read, and as shown in Figure 4,
It is transferred to the DMA controller 6 via the high speed bus 3 together with the transfer end signal 37.

【0029】そして、DMAコントローラ6に転送され
たメモリ2からの8バイト(1ワード)のリードデータ
は、同コントローラ6内の8バイトメモリデータレジス
タ23に格納される。このときのメモリデータレジスタ
23の内容は、図3(c)に示すように、“00”〜
“77”であるものとする。
The 8-byte (1 word) read data from the memory 2 transferred to the DMA controller 6 is stored in the 8-byte memory data register 23 in the controller 6. The contents of the memory data register 23 at this time are, as shown in FIG.
It shall be "77".

【0030】このように、DMA転送のスタート側で端
数バイトが存在することを判断した場合、コントロール
回路25は、メモリスタートアドレスの下位3ビットを
除く上位アドレス(ワードアドレス)で指定されるメモ
リ2上の8バイト(64ビット)ワードデータを、メモ
リデータレジスタ23にリードしておく。
In this way, when it is determined that there are fractional bytes on the start side of the DMA transfer, the control circuit 25 causes the memory 2 designated by the upper address (word address) excluding the lower 3 bits of the memory start address. The upper 8-byte (64-bit) word data is read in the memory data register 23.

【0031】一方、DMA機器4は、CPU1からの上
記要求に応じて、データリードを行い、DMAコントロ
ーラ6内のコントロール回路25に対して低速バス5を
介して転送要求信号31を送る。
On the other hand, the DMA device 4 performs a data read in response to the request from the CPU 1 and sends a transfer request signal 31 to the control circuit 25 in the DMA controller 6 via the low speed bus 5.

【0032】コントロール回路25は、DMA機器4か
ら転送要求信号31が送られると、データ入力可能であ
るならば、DMA機器4に対して転送許可信号32を返
す。DMA機器4は、この転送許可信号32に応じてD
MAコントローラ6に対して低速バス5を介して1バイ
トデータを転送する。このように、DMA機器4からD
MAコントローラ6へのデータ転送は、転送要求信号3
1と転送許可信号32に応じて行われる。
When the transfer request signal 31 is sent from the DMA device 4, the control circuit 25 returns a transfer permission signal 32 to the DMA device 4 if data can be input. The DMA device 4 responds to the transfer permission signal 32 by D
1-byte data is transferred to the MA controller 6 via the low-speed bus 5. Thus, from the DMA device 4 to D
Data transfer to the MA controller 6 requires transfer request signal 3
1 and the transfer permission signal 32.

【0033】DMA機器4からの1バイトデータはDM
Aコントローラ6内の8バイトデータレジスタ21に導
かれる。このときコントロール回路25は、バイト位置
カウンタ253の3ビット値i(0〜7のいずれか)に
応じて、データラッチ信号33-0〜33-nのうちのデー
タラッチ信号33-iだけをアクティブにする。
1 byte data from the DMA device 4 is DM
It is guided to the 8-byte data register 21 in the A controller 6. At this time, the control circuit 25 activates only the data latch signal 33-i of the data latch signals 33-0 to 33-n according to the 3-bit value i (one of 0 to 7) of the byte position counter 253. To

【0034】これにより、DMA機器4からの1バイト
データは、データレジスタ21内のバイトiの位置(第
iバイト位置)にラッチされる。図5(b)の例であれ
ば、先頭の1バイトデータの転送時のバイト位置カウン
タ253の値(初期値)は「4」であることから、デー
タラッチ信号33-4がアクティブとなり、同バイトデー
タはデータレジスタ21内のバイト4の位置にラッチさ
れる。
As a result, the 1-byte data from the DMA device 4 is latched at the position of the byte i in the data register 21 (the i-th byte position). In the example of FIG. 5B, since the value (initial value) of the byte position counter 253 at the time of transferring the leading 1-byte data is “4”, the data latch signal 33-4 becomes active and The byte data is latched at the position of byte 4 in the data register 21.

【0035】コントロール回路25は、データレジスタ
21に対するラッチ制御を行うと、転送バイトカウンタ
252を1だけカウントダウンすると共に、バイト位置
カウンタ253を1だけカウントアップする。
When the control circuit 25 performs the latch control on the data register 21, the control byte 25 counts down the transfer byte counter 252 by 1 and the byte position counter 253 by 1.

【0036】以下同様にして、DMA機器4からDMA
コントローラ6に対する1バイトデータ転送が、転送要
求信号31と転送許可信号32の授受により、繰返し行
われることにより、データレジスタ21のバイト5の位
置に2番目の転送データ(1バイトデータ)が、バイト
6の位置に3番目の転送データが、バイト7の位置に4
番目の転送データが、順にラッチされたものとする。
Similarly, the DMA device 4 to the DMA
The 1-byte data transfer to the controller 6 is repeatedly performed by the transfer of the transfer request signal 31 and the transfer permission signal 32, so that the second transfer data (1 byte data) is transferred to the byte 5 position of the data register 21. 3rd transfer data at position 6 and 4 at byte 7
It is assumed that the second transfer data is latched in order.

【0037】このときのデータレジスタ21の内容を図
3(a)に示す。なお、図中の“xx”はデータが不定
の状態であることを示しており、この例では、バイト0
〜3の各データが不定となっている。また、バイト4〜
7の“aa”〜“dd”は、メモリ2にDMA転送すべ
きデータの1番目〜4番目の各バイトデータである。
The contents of the data register 21 at this time are shown in FIG. Note that "xx" in the figure indicates that the data is in an indefinite state, and in this example, byte 0
Each data of 3 is indefinite. Also, byte 4
"Aa" to "dd" of 7 are the first to fourth byte data of the data to be DMA-transferred to the memory 2.

【0038】さてコントロール回路25は、データレジ
スタ21のバイト7に4番目の転送データをラッチさせ
ると、転送バイトカウンタ252を1だけカウントダウ
ンすると共に、バイト位置カウンタ253を1だけカウ
ントアップする。このとき、バイト位置カウンタ253
の値は、「7」から「0」に変化する。
When the control circuit 25 latches the fourth transfer data in the byte 7 of the data register 21, the control byte 25 counts down the transfer byte counter 252 by 1 and the byte position counter 253 by 1. At this time, the byte position counter 253
The value of changes from "7" to "0".

【0039】コントロール回路25は、バイト位置カウ
ンタ253の値が「7」から「0」に変化したことを検
出すると、データレジスタ21のバイト7の位置にデー
タがラッチされ、高速バス3へ転送すべきメモリアドレ
スに達したものと判断する。
When the control circuit 25 detects that the value of the byte position counter 253 has changed from "7" to "0", the data is latched at the position of byte 7 of the data register 21 and transferred to the high speed bus 3. It is determined that the memory address is reached.

【0040】するとコントロール回路25は、データバ
ッファ22に対するデータラッチ信号34をアクティブ
にして、データレジスタ21の内容をデータバッファ2
2にラッチさせる。即ちコントロール回路25は、バイ
ト位置カウンタ253の値の「7」から「0」への変化
に応じて、データレジスタ21の内容をデータバッファ
22にコピーする。
Then, the control circuit 25 activates the data latch signal 34 for the data buffer 22 to change the contents of the data register 21 to the data buffer 2.
Latch to 2. That is, the control circuit 25 copies the contents of the data register 21 to the data buffer 22 according to the change of the value of the byte position counter 253 from “7” to “0”.

【0041】この結果、データバッファ22の内容は、
図3(b)に示すように、図3(a)に示すデータレジ
スタ21の内容と同じものとなる。このときのデータバ
ッファ22のバイト4〜7の“aa”〜“dd”が今回
高速バス3へ転送するデータとなる。また、データレジ
スタ21の内容をデータバッファ22にコピーすること
により、DMA機器4からの後続のデータをデータレジ
スタ21にラッチすることが可能となる。
As a result, the contents of the data buffer 22 are
As shown in FIG. 3B, the contents are the same as the contents of the data register 21 shown in FIG. At this time, "aa" to "dd" of bytes 4 to 7 of the data buffer 22 become the data to be transferred to the high speed bus 3 this time. Further, by copying the contents of the data register 21 to the data buffer 22, it becomes possible to latch subsequent data from the DMA device 4 in the data register 21.

【0042】さて、コントロール回路25は、上記した
ようにバイト位置カウンタ253の値が「7」から
「0」に変化したことを検出すると、マージ回路24に
対してマージコントロール情報35を出力する。このマ
ージコントロール情報35は、スタート側端数バイトの
転送であるかエンド側端数バイトの転送であるかを示す
端数バイト転送タイプ信号と、マージ境界を示す3ビッ
トの境界情報からなる。この境界情報には、スタート側
端数バイトの転送の場合には、その際のメモリアドレス
レジスタ251の下位3ビットの内容、即ちメモリスタ
ートアドレスの下位3ビット(ここでは、値「4」を示
す“100”)が用いられ、エンド側端数バイトの転送
の場合には、バイト位置カウンタ253の内容が用いら
れる。
When the control circuit 25 detects that the value of the byte position counter 253 has changed from "7" to "0" as described above, it outputs the merge control information 35 to the merge circuit 24. The merge control information 35 includes a fractional byte transfer type signal indicating whether the fractional bytes on the start side or the fractional bytes on the end side are transferred, and 3-bit boundary information indicating a merge boundary. In the case of transfer of fractional bytes on the start side, this boundary information includes the contents of the lower 3 bits of the memory address register 251 at that time, that is, the lower 3 bits of the memory start address (here, "4" indicating the value "4"). 100 ") is used, and in the case of transferring a few bytes on the end side, the contents of the byte position counter 253 are used.

【0043】マージ回路24は、コントロール回路25
からのマージコントロール情報35中の端数バイト転送
タイプ信号がスタート側端数バイトの転送であることを
示している場合、同コントロール情報35中の3ビット
境界情報の値i(=メモリスタートアドレスの下位3ビ
ットの値)に従い、メモリデータレジスタ23のバイト
0〜i−1のデータと、データバッファ22のバイトi
〜7のデータをマージする。
The merge circuit 24 includes a control circuit 25.
When the fractional byte transfer type signal in the merge control information 35 from the above indicates transfer of fractional bytes on the start side, the value i of the 3-bit boundary information in the control information 35 (= lower 3 of the memory start address Data of bytes 0 to i−1 of the memory data register 23 and byte i of the data buffer 22 according to the bit value).
Merge the data of ~ 7.

【0044】また、マージコントロール情報35中の端
数バイト転送タイプ信号がエンド側端数バイトの転送で
あることを示している場合には、マージ回路24は、同
コントロール情報35中の3ビット境界情報の値i(=
バイト位置カウンタ253の値)に従い、データバッフ
ァ22のバイト0〜(i−1)と、メモリデータレジス
タ23のバイトi〜7のデータをマージする。
When the fractional byte transfer type signal in the merge control information 35 indicates that the fractional byte transfer on the end side is to be performed, the merge circuit 24 determines that the 3-bit boundary information in the control information 35 is included in the merge control information 35. Value i (=
According to the value of the byte position counter 253), bytes 0 to (i-1) of the data buffer 22 and the data of bytes i to 7 of the memory data register 23 are merged.

【0045】したがって、この例のようにスタート側端
数バイトの転送の場合には、メモリアドレスレジスタ2
51に初期設定されているメモリスタートアドレスの下
位3ビットの値が「4」であることから(図5(b)参
照)、マージ回路24は、メモリデータレジスタ23の
バイト0〜3のデータ、即ち“00”〜“33”(図3
(c)参照)と、データバッファ22のバイト4〜7の
データ、即ち“aa”〜“dd”(図3(b)参照)と
をマージして、図3(d)に示す8バイト(1ワード)
データ(マージ後のデータ)を得る。
Therefore, in the case of transferring the fractional bytes on the start side as in this example, the memory address register 2
Since the value of the lower 3 bits of the memory start address initially set to 51 is “4” (see FIG. 5B), the merge circuit 24 determines that the data of bytes 0 to 3 of the memory data register 23, That is, "00" to "33" (Fig. 3
(See (c)) and the data in bytes 4 to 7 of the data buffer 22, that is, "aa" to "dd" (see FIG. 3B), are merged to form 8 bytes (see FIG. 3D). (1 word)
Get the data (the data after the merge).

【0046】コントロール回路25は、以上のマージ回
路24によるマージが終了すると、高速バス3上に、再
び転送要求信号36(但し今回は、ライトのデータ転送
要求を示す転送要求信号36)を出力する(図4参照)
と共に、メモリアドレスレジスタ251の示すメモリア
ドレスのうちの下位3ビットをオール“0”の3ビット
データに置き換えたメモリアドレスをライトメモリアド
レスとして出力する。同時にマージ回路24から高速バ
ス3上に、上記マージ後の8バイトデータ(図3(d)
参照)がライトデータとして出力される。
When the above merging by the merging circuit 24 is completed, the control circuit 25 outputs the transfer request signal 36 (here, the transfer request signal 36 indicating the write data transfer request) to the high-speed bus 3 again. (See Figure 4)
At the same time, the memory address obtained by replacing the lower 3 bits of the memory address indicated by the memory address register 251 with the 3-bit data of all “0” is output as the write memory address. At the same time, the merge circuit 24 transfers the 8-byte data (FIG. 3 (d)) onto the high-speed bus 3 after the merge.
(See) is output as write data.

【0047】これにより、高速バス3上に出力されたラ
イトメモリアドレス(メモリスタートアドレス)の下位
3ビットを除く上位アドレス(ワードアドレス)で指定
されるメモリ2のワード位置に、高速バス3上に出力さ
れた8バイトのライトデータ(図3(d)に示すマージ
後のデータ)が書込まれ(書き戻され)、転送終了信号
37が高速バス3を介してDMAコントローラ6内のコ
ントロール回路25に転送される。
As a result, the write memory address (memory start address) output on the high-speed bus 3 is placed on the high-speed bus 3 at the word position of the memory 2 designated by the upper address (word address) excluding the lower 3 bits. The output 8-byte write data (merged data shown in FIG. 3D) is written (rewritten), and the transfer end signal 37 is transmitted via the high-speed bus 3 to the control circuit 25 in the DMA controller 6. Transferred to.

【0048】以上のデータ転送により、メモリスタート
アドレスの下位3ビットの値が「4」のスタート側端数
バイトの転送では、従来であればバイト4〜7の各バイ
ト毎の高速バス転送、即ち4回の高速バス転送が必要で
あったのに対し、2回の転送(1回のリード転送と1回
のライト転送)で終了するため、高速バス転送回数を2
回減らすことができる。
By the above data transfer, in the transfer of the fractional bytes on the start side in which the value of the lower 3 bits of the memory start address is "4", conventionally, high-speed bus transfer for each byte of bytes 4 to 7, that is, 4 The number of high-speed bus transfers is 2 because the high-speed bus transfer is required twice, but the transfer is completed by two transfers (one read transfer and one write transfer).
You can reduce the number of times.

【0049】なお、従来に比べて高速バス転送回数を最
も減らすことができるのは、メモリスタートアドレスの
下位3ビットの値が「1」の場合である。このケースで
は、従来であれば7回の転送が必要であったのに対し、
2回の転送で終了するため、高速バス転送回数を5回減
らすことができる。また、上記3ビット値が「7」の場
合には、従来と同様に1バイトの高速バス転送を行っ
て、1回の転送で済ますようにすることも可能である。
但し、高速バス幅の転送と1バイト転送の両転送方式を
導入すると、制御並びにハードウェア構成の複雑化を招
くことになる。
Note that the number of high-speed bus transfers can be reduced most compared to the conventional case when the value of the lower 3 bits of the memory start address is "1". In this case, in the past, seven transfers were required, whereas
Since the transfer is completed in two times, the number of high-speed bus transfers can be reduced by five. When the 3-bit value is "7", it is also possible to perform 1-byte high-speed bus transfer as in the conventional case so that one transfer is sufficient.
However, if both the high-speed bus width transfer and the 1-byte transfer are introduced, control and hardware configuration will be complicated.

【0050】コントロール回路25は、ライト要求に対
する高速バス3からの転送終了信号37により、1回の
DMA転送(ここではスタート側端数バイトの転送)の
終了を判断する。この場合、コントロール回路25は、
メモリアドレスレジスタ251の内容Aを、A+8に更
新する。即ちコントロール回路25は、メモリアドレス
レジスタ251に保持されているメモリアドレスの下位
3ビットを除く上位アドレスを、次のワード位置を指す
ように更新する。なお、メモリアドレスレジスタ251
に代えて、メモリスタートアドレスの下位3ビットを除
く上位アドレスが初期設定されて、1回のDMA転送毎
に1カウントアップするカウンタ(ワードアドレスカウ
ンタ)と、メモリスタートアドレスの下位3ビットを保
持する3ビットレジスタを用いることも可能である。
The control circuit 25 determines the end of one DMA transfer (here, transfer of fractional bytes on the start side) by the transfer end signal 37 from the high speed bus 3 in response to the write request. In this case, the control circuit 25
The content A of the memory address register 251 is updated to A + 8. That is, the control circuit 25 updates the upper address except the lower 3 bits of the memory address held in the memory address register 251, so as to point to the next word position. The memory address register 251
Instead of, the upper address excluding the lower 3 bits of the memory start address is initialized, and a counter (word address counter) that counts up by 1 for each DMA transfer and the lower 3 bits of the memory start address are held. It is also possible to use a 3-bit register.

【0051】以後、コントロール回路25は、DMA機
器4との間の転送要求信号31と転送許可信号32の授
受により、DMA機器4からDMAコントローラ6内の
データレジスタ21への後続の1バイトデータ転送を繰
り返し行わせ、その都度、転送バイトカウンタ252を
1だけカウントダウンすると共に、バイト位置カウンタ
253を1だけカウントアップする。
Thereafter, the control circuit 25 transfers the subsequent 1-byte data from the DMA device 4 to the data register 21 in the DMA controller 6 by exchanging the transfer request signal 31 and the transfer permission signal 32 with the DMA device 4. The transfer byte counter 252 is counted down by 1 and the byte position counter 253 is counted up by 1 each time.

【0052】そしてコントロール回路25は、バイト位
置カウンタ253の値が「7」から「0」に変化する
と、データレジスタ21のバイト7の位置にデータがラ
ッチされて、バイト0〜7に有効なデータ(8バイトデ
ータ)が揃ったものと判断し、同レジスタ21の内容を
データバッファ22にコピーする。次にコントロール回
路25は、高速バス3に対して、このデータバッファ2
2の内容をそのまま出力する。同時にコントロール回路
25は、ライトの転送要求信号36、およびメモリアド
レスレジスタ251の示すメモリアドレスの下位3ビッ
トをオール“0”に置き換えたメモリアドレスも、高速
バス3に出力する。
Then, when the value of the byte position counter 253 changes from "7" to "0", the control circuit 25 latches the data at the position of byte 7 of the data register 21, and the valid data in bytes 0-7. It is determined that (8-byte data) is complete, and the contents of the register 21 are copied to the data buffer 22. Next, the control circuit 25 sends the data buffer 2 to the high-speed bus 3.
The contents of 2 are output as they are. At the same time, the control circuit 25 also outputs to the high-speed bus 3 the write transfer request signal 36 and the memory address in which the lower 3 bits of the memory address indicated by the memory address register 251 are all replaced with “0”.

【0053】なお、データバッファ22の内容をそのま
ま出力するには、コントロール回路25からマージ回路
24に対して、スタート側端数バイトの転送であること
を示す端数バイト転送信号と、値が「0」の3ビット境
界情報からなるコントロール情報35を与えればよい。
最後に、エンド側端数バイトの転送について説明する。
To output the content of the data buffer 22 as it is, the control circuit 25 sends to the merge circuit 24 a fractional byte transfer signal indicating that the fractional bytes on the start side are transferred and the value is "0". It is sufficient to give the control information 35 consisting of the 3-bit boundary information.
Finally, the transfer of a few bytes on the end side will be described.

【0054】DMA機器4からDMAコントローラ6内
のデータレジスタ21への後続の1バイトデータ転送が
繰り返された結果、最後の1バイトデータがデータレジ
スタ21にラッチされたものとする。この1バイトデー
タは、図5(b)に示すDMA転送要求データの例で
は、データレジスタ21のバイト5の位置にラッチされ
る。このとき転送バイトカウンタ252は1だけカウン
トダウンされて、その値は「0」となり、バイト位置カ
ウンタ253は1だけカウントアップされて、その値は
(図5(b)から明らかなように)「6」となる。
It is assumed that the last 1-byte data is latched in the data register 21 as a result of repeating the subsequent 1-byte data transfer from the DMA device 4 to the data register 21 in the DMA controller 6. This 1-byte data is latched at the position of byte 5 of the data register 21 in the example of the DMA transfer request data shown in FIG. At this time, the transfer byte counter 252 is counted down by 1 and its value becomes "0", and the byte position counter 253 is counted up by 1 and its value is "6" (as is apparent from FIG. 5B). It will be.

【0055】コントロール回路25は、転送バイトカウ
ンタ252の値が「0」になると、DMA転送要求デー
タの最終バイトがデータレジスタ21にラッチされたも
のとして、同レジスタ21の内容をデータバッファ22
にコピーする。
When the value of the transfer byte counter 252 becomes "0", the control circuit 25 determines that the last byte of the DMA transfer request data has been latched in the data register 21 and sets the contents of the register 21 to the data buffer 22.
To copy.

【0056】さて、転送バイトカウンタ252の値が
「0」になった際のバイト位置カウンタ253の値が、
この例のように「0」でない場合、コントロール回路2
5は、エンド側端数バイトの転送となることを判断す
る。
Now, the value of the byte position counter 253 when the value of the transfer byte counter 252 becomes "0",
If it is not "0" as in this example, the control circuit 2
5 judges that the transfer of a few bytes is made on the end side.

【0057】この場合、コントロール回路25は、前記
したスタート側端数バイトの転送の場合と同様にして、
メモリアドレスレジスタ251の示す8バイトのワード
データのリードを行い、メモリデータレジスタ23に格
納する。そしてコントロール回路25は、マージ回路2
4に対して、エンド側端数バイトの転送であることを示
す端数バイト転送タイプ信号と3ビット境界情報からな
るマージコントロール情報35を出力する。エンド側端
数バイトの転送の場合、3ビット境界情報には、バイト
位置カウンタ253の値(ここでは「6」)が用いられ
る。
In this case, the control circuit 25 performs the same operation as in the case of transferring the fractional bytes on the start side.
The 8-byte word data indicated by the memory address register 251 is read and stored in the memory data register 23. Then, the control circuit 25 uses the merge circuit 2
4, the merge control information 35 consisting of a fractional byte transfer type signal indicating that the fractional byte transfer on the end side and 3-bit boundary information is output. In the case of transferring a few bytes on the end side, the value of the byte position counter 253 (here, “6”) is used as the 3-bit boundary information.

【0058】マージ回路24は、マージコントロール情
報35中の端数バイト転送タイプ信号がエンド側端数バ
イトの転送であることを示している場合、同コントロー
ル情報35中の3ビット境界情報の値i(ここでは
「6」)に従い、データバッファ22のバイト0〜i−
1と、メモリデータレジスタ23のバイトi〜7のデー
タをマージする。これにより、図5(b)の例では、デ
ータバッファ22のバイト0〜5の6バイトと、メモリ
データレジスタ23のバイト6,7の2バイトがマージ
される。そして、このマージ後の8バイト(1ワード)
データが高速バス3を介してメモリ2に転送され、同メ
モリ2に書き戻される。
When the fractional byte transfer type signal in the merge control information 35 indicates that the fractional byte transfer on the end side is performed, the merge circuit 24 determines the value i of the 3-bit boundary information in the control information 35 (here Then, according to “6”), bytes 0 to i− of the data buffer 22
1 and the data in bytes i to 7 of the memory data register 23 are merged. As a result, in the example of FIG. 5B, 6 bytes of bytes 0 to 5 of the data buffer 22 and 2 bytes of bytes 6 and 7 of the memory data register 23 are merged. And 8 bytes (1 word) after this merge
Data is transferred to the memory 2 via the high-speed bus 3 and written back to the memory 2.

【0059】以上のデータ転送により、最終の1バイト
データのバイト位置が「5」のエンド側端数バイトの転
送では、従来であればバイト0〜5の各バイト毎の高速
バス転送、即ち6回の高速バス転送が必要であったのに
対し、2回の転送(1回のリード転送と1回のライト転
送)で終了するため、高速バス転送回数を4回減らすこ
とができる。ここで、上記最終の1バイトデータのバイ
ト位置が「0」の場合には、従来と同様に1バイトの高
速バス転送を行って、1回の転送で済ますようにするこ
とも可能である。
With the above data transfer, in the transfer of the fractional bytes on the end side where the byte position of the final 1-byte data is "5", conventionally, high-speed bus transfer for each byte of bytes 0 to 5, ie, 6 times. However, the number of high-speed bus transfers can be reduced by four because the high-speed bus transfer is required in two transfers (one read transfer and one write transfer). Here, when the byte position of the final 1-byte data is "0", it is possible to perform high-speed bus transfer of 1 byte as in the conventional case so that one transfer is sufficient.

【0060】なお、前記実施例では、転送バイトカウン
タ252の値が「0」になった際のバイト位置カウンタ
253の値が「0」でない場合に、エンド側端数バイト
の転送であると判断するものとして説明したが、これに
限るものではない。例えば、1回のDMA転送の終了毎
に、転送バイトカウンタ252を参照し、その値(即ち
残り転送バイト数)が「1」〜「7」のいずれかである
場合に、エンド側端数バイトの転送であると判断するよ
うにしてもよい。この場合、DMA機器4からDMAコ
ントローラ6への残りのバイトデータの転送と並行し
て、メモリ2からのデータリードを行うことが可能とな
る。
In the above embodiment, when the value of the byte position counter 253 when the value of the transfer byte counter 252 becomes "0" is not "0", it is determined that the fractional bytes on the end side are transferred. However, the present invention is not limited to this. For example, every time one DMA transfer ends, the transfer byte counter 252 is referenced, and when the value (that is, the remaining transfer byte number) is any of “1” to “7”, the end-side fractional byte The transfer may be determined. In this case, it becomes possible to read data from the memory 2 in parallel with the transfer of the remaining byte data from the DMA device 4 to the DMA controller 6.

【0061】また、前記実施例では、バス幅(データ
幅)が8バイト(64ビット)の高速バスに接続された
DMAコントローラによるDMA転送ついて説明した
が、この発明は、他のバス幅の高速バスに接続されたD
MAコントローラによるDMA転送にも適用できる。こ
の場合、高速バスのバス幅が例えば2n バイトであるな
らば、バイト位置カウンタにはnビットのカウンタを用
いればよい。
In the above embodiment, the DMA transfer by the DMA controller connected to the high-speed bus having a bus width (data width) of 8 bytes (64 bits) has been described, but the present invention has a high speed of other bus widths. D connected to the bus
It can also be applied to DMA transfer by the MA controller. In this case, the bus width of the high-speed bus is 2 n, for example. If it is a byte, an n-bit counter may be used as the byte position counter.

【0062】[0062]

【発明の効果】以上詳述したようにこの発明によれば、
DMA機器から要求されたメモリに対するDMA転送の
スタート側またはエンド側に高速バスのバス幅に満たな
い端数バイトが存在する場合には、転送先アドレスに対
応する高速バス幅のワードデータをメモリからリードし
て、このリードデータと端数バイトとをマージして高速
バス幅のライトデータを生成し、このライトデータを高
速バスを介してDMA転送してメモリの元のワード位置
にライトする構成としたので、DMA転送のメモリスタ
ート側とエンド側で端数バイトが生じても、高速バス幅
でのデータ転送が行えるようになり、高速バスの使用効
率、更にはDMA全体の転送速度が向上する。
As described above in detail, according to the present invention,
If there are fractional bytes less than the bus width of the high-speed bus on the start side or end side of the DMA transfer to the memory requested by the DMA device, the word data of the high-speed bus width corresponding to the transfer destination address is read from the memory. Then, the read data and the fractional bytes are merged to generate write data having a high-speed bus width, and the write data is DMA-transferred via the high-speed bus and written to the original word position of the memory. Even if fractional bytes are generated on the memory start side and the end side of the DMA transfer, the data transfer can be performed with the high speed bus width, and the use efficiency of the high speed bus and the transfer speed of the entire DMA are improved.

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

【図1】この発明の一実施例に係るDMAコントローラ
を備えた情報処理システムのシステム構成図。
FIG. 1 is a system configuration diagram of an information processing system including a DMA controller according to an embodiment of the present invention.

【図2】図1中のDMAコントローラ6の構成を示すブ
ロック図。
FIG. 2 is a block diagram showing the configuration of a DMA controller 6 in FIG.

【図3】スタート側端数バイトの転送時のデータレジス
タ21、データバッファ22、およびメモリデータレジ
スタ23の各内容と、マージ回路24のマージ結果の一
例を対比して示す図。
FIG. 3 is a diagram showing the contents of a data register 21, a data buffer 22, and a memory data register 23 during transfer of fractional bytes on the start side, and an example of a merged result of a merge circuit 24 in comparison with each other.

【図4】スタート側端数バイトの転送時の動作を説明す
るためのタイミングチャート。
FIG. 4 is a timing chart for explaining an operation during transfer of fractional bytes on the start side.

【図5】端数バイトが存在しないDMA転送要求データ
と、端数バイトが存在するDMA転送要求データの一例
を示す図。
FIG. 5 is a diagram showing an example of DMA transfer request data having no fractional bytes and DMA transfer request data having fractional bytes.

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

1…CPU、2…メモリ、3…高速バス、4…DMA機
器、5…低速バス、6…DMAコントローラ、21…デ
ータレジスタ、22…データバッファ、23…メモリデ
ータレジスタ、24…マージ回路、25…コントロール
回路、251…メモリアドレスレジスタ、252…転送
バイトカウンタ、253…バイト位置カウンタ。
1 ... CPU, 2 ... Memory, 3 ... High-speed bus, 4 ... DMA device, 5 ... Low-speed bus, 6 ... DMA controller, 21 ... Data register, 22 ... Data buffer, 23 ... Memory data register, 24 ... Merge circuit, 25 ... control circuit, 251 ... memory address register, 252 ... transfer byte counter, 253 ... byte position counter.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】高速バスに接続されたメモリと低速バスに
接続されたDMA機器との間のデータ転送を制御するD
MAコントローラにおいて、 前記DMA機器から転送される前記メモリに対するライ
トデータを前記高速バスを介して前記メモリにDMA転
送するための制御手段であって、DMA転送のスタート
側またはエンド側に前記高速バスのバス幅に満たない端
数バイトが存在する場合に、転送先アドレスに対応する
前記高速バス幅のワードデータを前記メモリからリード
する制御手段と、 この制御手段によりリードされたデータに対して前記端
数バイトによりその該当部分の書き換えを行って前記高
速バス幅のライトデータを生成するマージ手段とを具備
し、前記制御手段は、前記マージ手段により生成された
ライトデータを前記高速バスを介してDMA転送して前
記メモリの元のワード位置にライトすることを特徴とす
るDMAコントローラ。
1. A D for controlling data transfer between a memory connected to a high speed bus and a DMA device connected to a low speed bus.
In the MA controller, which is a control means for DMA-writing write data to the memory transferred from the DMA device to the memory via the high-speed bus, the control means of the high-speed bus is provided at a start side or an end side of the DMA transfer. When there is a fractional byte less than the bus width, there is a control means for reading word data of the high-speed bus width corresponding to the transfer destination address from the memory, and the fractional byte for the data read by this control means. And a merging unit that rewrites the corresponding portion to generate write data having the high-speed bus width by means of the above-mentioned. The control unit DMA-transfers the write data generated by the merging unit via the high-speed bus. Write to the original word position of the memory.
【請求項2】前記メモリに対するDMA転送のメモリス
タートアドレスの下位nビット(但し、高速バス幅は2
n バイト)が初期設定され、前記DMA機器からのデー
タ転送毎にカウントアップするカウンタ手段と、前記制
御手段によりリードされた前記高速バス幅のデータを格
納するためのメモリデータレジスタとを更に備え、 前記マージ手段は、前記スタート側端数バイトの転送時
には、前記メモリデータレジスタの内容のうち前記メモ
リスタートアドレスの下位nビットの示す位置以降のデ
ータ部分を前記端数バイトで置き換え、前記エンド側端
数バイトの転送時には、前記メモリデータレジスタの内
容のうち前記カウンタ手段のカウント値の示す位置より
前のデータ部分を前記端数バイトで置き換えて、それぞ
れ前記高速バス幅のライトデータを生成することを特徴
とする請求項1記載のDMAコントローラ。
2. The lower n bits of the memory start address of the DMA transfer to the memory (however, the high-speed bus width is 2
n Byte) is initialized and further comprises counter means for counting up each time data is transferred from the DMA device, and a memory data register for storing data of the high-speed bus width read by the control means. When transferring the fractional bytes on the start side, the merging unit replaces the data part after the position indicated by the lower n bits of the memory start address in the contents of the memory data register with the fractional bytes, and transfers the fractional bytes on the end side At times, the data portion of the contents of the memory data register before the position indicated by the count value of the counter means is replaced with the fractional bytes to generate write data of the high-speed bus width. 1. The DMA controller according to 1.
JP5712193A 1993-03-17 1993-03-17 Dma controller Pending JPH06266612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5712193A JPH06266612A (en) 1993-03-17 1993-03-17 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5712193A JPH06266612A (en) 1993-03-17 1993-03-17 Dma controller

Publications (1)

Publication Number Publication Date
JPH06266612A true JPH06266612A (en) 1994-09-22

Family

ID=13046727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5712193A Pending JPH06266612A (en) 1993-03-17 1993-03-17 Dma controller

Country Status (1)

Country Link
JP (1) JPH06266612A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014035617A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Image processing interface circuit
JP2014035619A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Image processing apparatus
US9552619B2 (en) 2012-08-08 2017-01-24 Megachips Corporation Image processing apparatus and image processing interface circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014035617A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Image processing interface circuit
JP2014035619A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Image processing apparatus
US9552619B2 (en) 2012-08-08 2017-01-24 Megachips Corporation Image processing apparatus and image processing interface circuit

Similar Documents

Publication Publication Date Title
JP3637054B2 (en) Apparatus and method for maintaining cache / main memory consistency
KR100337056B1 (en) Buffering data that flows between buses operating at different frequencies
US4914575A (en) System for transferring data between an interleaved main memory and an I/O device at high speed
EP0509722B1 (en) Data transfer system
JPH046980B2 (en)
JPH06266612A (en) Dma controller
JP2828643B2 (en) Straight line drawing device
JPH03108182A (en) Memory control system and method
CN110825658A (en) Flash memory controller and method
JPS619766A (en) Data transfer device
JPH09185882A (en) First-in first-out memory device having different input / output data size and method thereof
JPH0831076B2 (en) Input/Output Processor
JP3520570B2 (en) Memory access control device
JP2581144B2 (en) Bus control device
JPH113274A (en) Memory access control system
JPS6362083A (en) Projection data generation system
JPH06266587A (en) File management system for flash memory
JP3285240B2 (en) Arbitration circuit for 2-port data guarantee
JPH09274599A (en) Buffer memory device
JPH09282231A (en) Write-back type cache device
JP3076199B2 (en) Buffer access control circuit
JP2002050172A (en) Fifo control circuit
JP2735400B2 (en) Asynchronous I/O control method
GB2368157A (en) Byte-swapping for efficient use of memory
JPH1063569A (en) Main memory data writing device