JPH0635841A - Bus controller - Google Patents

Bus controller

Info

Publication number
JPH0635841A
JPH0635841A JP20960092A JP20960092A JPH0635841A JP H0635841 A JPH0635841 A JP H0635841A JP 20960092 A JP20960092 A JP 20960092A JP 20960092 A JP20960092 A JP 20960092A JP H0635841 A JPH0635841 A JP H0635841A
Authority
JP
Japan
Prior art keywords
data
transfer
width
data storage
changed
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
JP20960092A
Other languages
Japanese (ja)
Inventor
Masashi Sone
雅士 曽根
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP20960092A priority Critical patent/JPH0635841A/en
Publication of JPH0635841A publication Critical patent/JPH0635841A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To surely perform the DMA transfer operation of the long word data and to shorten the processing time of the DMA transfer by changing the transfer width of the transfer data shifted from the data storage width of a transferring destination device in response to the data storage width in the DMA transfer operation. CONSTITUTION:A byte position converter circuit 22 detects the boundary of the data storage areas decided by the storing destination addresses of a RAM serving as a transferring destination device and an I/O. Then, the circuit 22 changes the byte position of the long word data transferred between the RAM and the I/O in order to correct the byte position error of the transferred data against the detected boundary. The changed byte position is outputted to the latch circuits 23 and 24. Both latch circuits 23 and 24 latch alternately the long word data which are changed between the precedent and present DMA transfer operations. A selector 25 selects the long word data latched alternately and reconstructs these data for DMA transfer to output them to a data buffer 21 and the I/O.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、バス制御装置に係り、
詳細には、等間隔の所定データ幅に区切ってデータを授
受するI/Oバスを介してデバイス間でDMA転送する
データの転送幅を制御するバス制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bus controller,
More specifically, the present invention relates to a bus control device that controls a transfer width of data that is DMA-transferred between devices via an I / O bus that transfers data by dividing the data into predetermined data widths at equal intervals.

【0002】[0002]

【従来の技術】近時、マイクロコンピュータシステムを
構成するには、CPU(Central Pro-cessing Unit)の
他に各種の周辺LSI(Large Scale Integrated Circu
it)が必要になっており、その周辺LSIの代表的なデ
バイスの一つにDMAC(Dir-ect Memory Access Cont
roller)がある。DMACは、システムの主記憶部と周
辺機器との間の高速データ転送を制御するものであり、
CPUの処理性能の向上とともに、そのCPUの処理性
能に応じた機能を備えたDMACが要求されている。
2. Description of the Related Art Recently, in order to configure a microcomputer system, various peripheral LSIs (Large Scale Integrated Circu) in addition to a CPU (Central Procession Unit).
It is required, and one of the typical devices of the peripheral LSI is the DMAC (Dir-ect Memory Access Controller).
roller). The DMAC controls high-speed data transfer between the main memory unit of the system and peripheral devices.
Along with the improvement of the processing performance of the CPU, there is a demand for a DMAC having a function according to the processing performance of the CPU.

【0003】また、マイクロコンピュータシステムで利
用される主要なCPUのデータ処理性能は、16ビット
から32ビットに移行してきており、32ビットのCP
Uの処理性能をフルに活用するためには、その処理性能
に応じた機能を備えた周辺デバイスとしてのDMACが
要求されている。
Further, the data processing performance of major CPUs used in microcomputer systems is shifting from 16 bits to 32 bits, and a CP of 32 bits is used.
In order to make full use of the processing performance of U, a DMAC as a peripheral device having a function according to the processing performance is required.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、市場で
は、16ビットと32ビットのCPUを利用した機器が
混在している状況であり、周辺デバイスも16ビットと
32ビットの処理性能に対応したものが混在しているた
め、例えば、32ビット幅のデータ処理性能を有するC
PUに対応するDMACとI/Oバスに対して32ビッ
ト幅のデータ処理が考慮されていない周辺デバイスが接
続される場合があり、この周辺デバイスとの間ではDM
A転送処理が実行できない状況が発生するという問題点
があった。そのDMA転送処理が実行できない状況の具
体例を図7に示すメモリとI/O間のDMA転送動作を
参照して説明する。
However, in the market, there are mixed devices using 16-bit and 32-bit CPUs, and peripheral devices that support 16-bit and 32-bit processing performance are also available. Since they are mixed, for example, C having a 32-bit width data processing performance
A peripheral device that does not consider 32-bit data processing may be connected to the DMAC corresponding to the PU and the I / O bus, and DM may be connected to this peripheral device.
There is a problem that the A transfer process cannot be executed. A specific example of the situation in which the DMA transfer process cannot be executed will be described with reference to the DMA transfer operation between the memory and the I / O shown in FIG.

【0005】図7(a)、(b)では、メモリ1とI/
O2との間で32ビットのロングワードバス幅でDMA
転送動作が行われる様子を示しており、I/O2からメ
モリ1に転送されるデータは、I/O2により4バイト
(32ビット)づつ等間隔のロングワード毎に区切られ
て転送される。
In FIGS. 7A and 7B, memory 1 and I /
32-bit longword bus width DMA with O2
The figure shows how the transfer operation is performed, and the data transferred from the I / O2 to the memory 1 is divided by the I / O2 into 4-byte (32-bit) long words at equal intervals.

【0006】図7(a)は、I/O2から転送されるデ
ータのバイト位置とメモリ1の転送データを格納するバ
イト位置が一致してDMA転送が成立する場合を示し、
図7(b)は、I/O2から転送されるデータのバイト
位置とメモリ1の転送データを格納するバイト位置が一
致せず、DMA転送が成立しない場合を示している。す
なわち、図7(a)では、メモリ1の転送データを格納
するスタートアドレスとエンドアドレスがロングワード
バウンダリと一致しているため、DMA転送が可能であ
る。しかし、図7(b)では、メモリ1の転送データを
格納するスタートアドレスとエンドアドレスがロングワ
ードバウンダリと一致せずにずれているため、I/O2
から転送されるデータがロングワードバウンダリからず
れてDMA転送ができなかった。この図7(b)のよう
な事態が発生した場合は、DMA転送を行わず、CPU
により制御される通常のデータ転送動作が行われていた
ため、データ転送時間を長引かせるという問題点があっ
た。
FIG. 7A shows a case where the byte position of the data transferred from the I / O 2 and the byte position of the memory 1 for storing the transfer data coincide with each other to establish the DMA transfer.
FIG. 7B shows a case where the byte position of the data transferred from the I / O 2 does not match the byte position of the transfer data of the memory 1 and the DMA transfer is not established. That is, in FIG. 7A, since the start address and end address for storing the transfer data in the memory 1 match the longword boundary, DMA transfer is possible. However, in FIG. 7B, since the start address and the end address for storing the transfer data of the memory 1 do not coincide with the longword boundary and are shifted, the I / O 2
The data transferred from the device was out of the longword boundary, and DMA transfer was not possible. If a situation like that shown in FIG. 7B occurs, the DMA transfer is not performed and the CPU
Since there is a normal data transfer operation controlled by, there is a problem that the data transfer time is prolonged.

【0007】本発明の課題は、DMA転送動作において
転送先デバイスのデータ格納幅からずれる転送データの
転送幅を該データ格納幅に合わせて変更することによ
り、ロングワードデータのDMA転送動作を確実に実行
可能とするるとともに、DMA転送の処理時間を短縮す
るようにすることである。
An object of the present invention is to ensure the DMA transfer operation of longword data by changing the transfer width of the transfer data deviated from the data storage width of the transfer destination device in the DMA transfer operation according to the data storage width. This is to be executable and to shorten the processing time of DMA transfer.

【0008】[0008]

【課題を解決するための手段】本発明の手段は次の通り
である。
The means of the present invention are as follows.

【0009】格納幅検出手段は、データ転送先デバイス
の格納先アドレスにより区切られるデータ格納幅を検出
するバイト位置変換回路等である。
The storage width detecting means is a byte position conversion circuit or the like for detecting the data storage width delimited by the storage destination address of the data transfer destination device.

【0010】転送幅変更手段は、I/Oバスにより区切
られるデータの転送幅を格納幅検出手段により検出され
るデータ格納幅に基づいて変更するバイト位置変換回路
等である。
The transfer width changing means is a byte position conversion circuit or the like that changes the transfer width of the data delimited by the I / O bus based on the data storage width detected by the storage width detecting means.

【0011】第1、第2の変更データ格納手段は、転送
幅変更手段により転送幅が変更されたデータのうち前回
と今回の転送で転送幅を変更したデータを交互に格納す
るをラッチ回路等である。
The first and second changed data storing means alternately store the data whose transfer width has been changed by the previous transfer and the current transfer among the data whose transfer width has been changed by the transfer width changing means. Is.

【0012】再構成手段は、格納幅検出手段により検出
されるデータ格納幅に合わせて該第1、第2の変更デー
タ格納手段に格納された前回と今回の転送幅変更データ
を選択して再構成し、転送先デバイスに転送するセレク
タ等である。
The reconstructing means selects and reconstructs the transfer width change data of the previous time and this time stored in the first and second change data storage means in accordance with the data storage width detected by the storage width detecting means. It is a selector or the like configured and transferred to the transfer destination device.

【0013】[0013]

【作用】本発明の手段の作用は次の通りである。The operation of the means of the present invention is as follows.

【0014】データ転送先デバイスの格納先アドレスに
より区切られるデータ格納幅が格納幅検出手段により検
出され、該検出されたデータ格納幅に基づいて転送幅変
更手段でI/Oバスにより区切られるデータ転送幅が変
更され、該変更されたデータのうち前回と今回の転送で
転送幅が変更されたデータが第1、第2の変更データ格
納手段に交互に格納され、再構成手段により検出された
データ格納幅に合わせて第1、第2の変更データ格納手
段に格納された前回と今回の転送幅変更データが選択さ
れて再構成され、転送先デバイスに転送される。
The data storage width delimited by the storage destination address of the data transfer destination device is detected by the storage width detecting means, and the data transfer is divided by the transfer width changing means by the I / O bus based on the detected data storage width. The data whose width has been changed, and among the changed data, the data whose transfer width has been changed by the previous transfer and the current transfer are alternately stored in the first and second changed data storage means, and the data detected by the reconstruction means The previous and present transfer width change data stored in the first and second change data storage means are selected and reconfigured according to the storage width and transferred to the transfer destination device.

【0015】したがって、転送先デバイスのデータ格納
幅に合わせてロングワードデータの転送幅を変更して転
送することができ、DMA転送において転送先デバイス
のデータ格納幅からオーバーするデータ転送幅分を再構
成してDMA転送を確実に実行することができ、DMA
転送の処理時間を短縮することができる。
Therefore, the transfer width of the longword data can be changed and transferred in accordance with the data storage width of the transfer destination device, and the data transfer width that exceeds the data storage width of the transfer destination device can be re-reproduced in the DMA transfer. DMA transfer can be performed reliably by configuring
The transfer processing time can be shortened.

【0016】[0016]

【実施例】以下、図1〜図6を参照して実施例を説明す
る。
Embodiments Embodiments will be described below with reference to FIGS.

【0017】図1〜図6は、バス制御装置の一実施例を
示す図であり、DMAユニット10に接続した例であ
る。
FIGS. 1 to 6 are views showing an embodiment of the bus control device, which is an example connected to the DMA unit 10.

【0018】まず、構成を説明する。図1は、DMAユ
ニット10のブロック構成図である。この図において、
DMAユニット10は、DMA転送動作を制御するDM
AC11と、DMAC11により制御されるDMA転送
処理によりI/Oバス制御回路13、15を通してI/
O14、16から転送されるデータが書き込まれるとと
もに、I/Oバス制御回路13、15を通してI/O1
4、16に転送するデータが読み出されるRAM(Rand
om Access Memory)と、RAM12とI/O14、16
との間で授受される転送データの転送幅を制御するI/
Oバス制御回路13、15と、DMAC11により制御
されるDMA転送処理によりI/Oバス制御回路13、
15を通してRAM12との間で転送データを授受する
I/O14、16とにより構成される。
First, the structure will be described. FIG. 1 is a block diagram of the DMA unit 10. In this figure,
The DMA unit 10 is a DM for controlling the DMA transfer operation.
The I / O bus control circuits 13 and 15 perform I / O processing by the AC 11 and the DMA transfer process controlled by the DMAC 11.
The data transferred from the O14 and O16 is written and the I / O1 is passed through the I / O bus control circuits 13 and 15.
RAM (Rand
om Access Memory), RAM 12 and I / O 14, 16
I / that controls the transfer width of the transfer data transferred between
The O bus control circuits 13 and 15 and the I / O bus control circuit 13 by the DMA transfer processing controlled by the DMAC 11.
It is composed of I / Os 14 and 16 which transfer data to and from the RAM 12 through 15.

【0019】上記DMAC11は、図外のCPU等から
入力されるDMA転送要求に応じてRAM12とI/O
14、16との間のDMA転送動作を制御する。
The DMAC 11 is connected to the RAM 12 and I / O in response to a DMA transfer request input from a CPU (not shown) or the like.
It controls the DMA transfer operation between 14 and 16.

【0020】上記RAM12は、アドレスバス17及び
データバス18を通してDMAC11とI/Oバス制御
回路13、15に接続され、DMAC11からアドレス
バス17を通して指示入力されるアドレス領域にI/O
バス制御回路13、15を通してI/O14、16から
転送される32ビット幅のロングワードデータを書き込
むとともに、I/Oバス制御回路13、15を通してI
/O14、16に転送されるロングワードデータを指示
入力されるアドレス領域から読み出す。
The RAM 12 is connected to the DMAC 11 and the I / O bus control circuits 13 and 15 through the address bus 17 and the data bus 18, and the I / O is provided in the address area instructed and input from the DMAC 11 through the address bus 17.
The 32-bit width longword data transferred from the I / Os 14 and 16 is written through the bus control circuits 13 and 15 and the I / O bus control circuits 13 and 15
The longword data transferred to the / O 14, 16 are read out from the address area designated and input.

【0021】上記I/Oバス制御回路13、15は、I
/O14、16数分設けられており、図2にI/Oバス
制御回路13、15のブロック構成図を示す。図2にお
いて、I/Oバス制御回路13、15は、シーケンサ2
6により制御され、データバス18を通してRAM12
に転送するデータ及びI/O14、16に転送するデー
タを一時的に格納するデータバッファ21と、シーケン
サ26により制御され、転送先デバイスとしてのRAM
12あるいはI/O14、16の格納先アドレスにより
決定されるデータ格納領域のバウンダリを検出し、この
バウンダリからの転送データのバイト位置ずれを判断
し、このバイト位置ずれを直すようにRAM12とI/
O14、16との間で転送されるロングワードデータの
バイト位置を変換してラッチ回路23、24に出力する
バイト位置変換回路22と、シーケンサ26により制御
され、バイト位置変換回路22でバイト位置が変換され
たロングワードデータのうち前回のDMA転送に際して
変換されるロングワードデータと今回のDMA転送に際
して変換されるロングワードデータを交互にラッチする
ラッチ回路23、24と、シーケンサ26により制御さ
れ、ラッチ回路23、24に前回と今回のDMA転送に
際してラッチされるバイト位置変換後のロングワードデ
ータを選択してDMA転送用のロングワードデータを再
構成し、データバッファ21あるいはI/O14、16
に出力するセレクタ25と、データバス18を通してD
MAC21と授受するDMA制御信号により上記I/O
バス制御回路13、15内の各部を制御してバイト位置
変換処理シーケンスを実行するシーケンサ26とにより
構成される。
The I / O bus control circuits 13 and 15 are
The number of I / O bus control circuits 13 and 15 is shown in FIG. In FIG. 2, the I / O bus control circuits 13 and 15 are the sequencer 2
6 controlled by RAM 6 through data bus 18
Data buffer 21 for temporarily storing the data to be transferred to the I / O 14 and 16 and the RAM as a transfer destination device controlled by the sequencer 26.
12 or I / O 14, 16 detects the boundary of the data storage area determined by the storage destination address, determines the byte position deviation of the transfer data from this boundary, and determines the RAM 12 and I / O to correct the byte position deviation.
The byte position conversion circuit 22 that converts the byte position of the longword data transferred between the O14 and O16 and outputs it to the latch circuits 23 and 24 and the sequencer 26 are controlled by the byte position conversion circuit 22. Of the converted longword data, the latch circuits 23 and 24 alternately latching the longword data converted in the previous DMA transfer and the longword data converted in the current DMA transfer, and controlled by the sequencer 26, are latched. The circuits 23 and 24 select the longword data after byte position conversion that is latched during the previous and current DMA transfers to reconstruct the longword data for DMA transfer, and then the data buffer 21 or I / O 14, 16 are selected.
Output to the selector 25 and the data bus 18 to D
The above-mentioned I / O is executed by the DMA control signal transmitted / received to / from the MAC 21.
The sequencer 26 controls each part in the bus control circuits 13 and 15 to execute a byte position conversion processing sequence.

【0022】なお、図2において、シーケンサ26とそ
の他のブロックとは制御バス27で接続され、データバ
ッファ21、バイト位置変換回路22、ラッチ回路2
3、24及びセレクタ25は、転送バス28a〜28c
によって接続されている。
In FIG. 2, the sequencer 26 and other blocks are connected by the control bus 27, and the data buffer 21, the byte position conversion circuit 22, and the latch circuit 2 are connected.
3, 24 and the selector 25 are transfer buses 28a to 28c.
Connected by.

【0023】上記I/O14、16は、データバス18
を通してI/Oバス制御回路13、15に接続され、D
MAC11により制御されるDMA転送処理によりI/
Oバス制御回路13、15を通してRAM22との間で
ロングワードデータを授受する。
The I / Os 14 and 16 are data buses 18
Connected to the I / O bus control circuits 13 and 15 through
I / O by the DMA transfer process controlled by the MAC 11
Longword data is exchanged with the RAM 22 through the O-bus control circuits 13 and 15.

【0024】次に、本実施例の動作を説明する。Next, the operation of this embodiment will be described.

【0025】まず、I/O14、16からRAM22へ
のDMAデータ転送処理について、図3に示すI/Oバ
ス制御回路13、15のブロック構成図及び図4に示す
I/Oバス制御回路13、15内の各部信号のタイミン
グチャートを参照して説明する。
First, regarding the DMA data transfer processing from the I / Os 14 and 16 to the RAM 22, a block diagram of the I / O bus control circuits 13 and 15 shown in FIG. 3 and the I / O bus control circuit 13 shown in FIG. This will be described with reference to the timing charts of the signals of the respective parts in 15.

【0026】図3は、I/O14、16からRAM22
へのDMAデータ転送処理を実行する場合のI/Oバス
制御回路13、15内のデータの流れに応じて上記図2
に示した各ブロックの配置を変更した図である。この図
では、I/Oバス制御回路13、15内で、I/O1
4、16から読み出されるロングワードデータD′31
〜0が、バイト位置変換回路22、ラッチ回路23、2
4、セレクタ25及びデータバッファ21の順にバイト
位置変換処理とともに転送されてロングワードデータD
31〜0としてRAM22へDMA転送されることを示
している。
FIG. 3 shows the I / Os 14 and 16 to the RAM 22.
2 according to the data flow in the I / O bus control circuits 13 and 15 when executing the DMA data transfer process to
It is the figure which changed the arrangement | positioning of each block shown in FIG. In this figure, in the I / O bus control circuits 13 and 15, I / O 1
Longword data D'31 read from 4 and 16
0 indicates the byte position conversion circuit 22, the latch circuits 23, 2
4, the selector 25, and the data buffer 21 are transferred in this order together with the byte position conversion processing to transfer the longword data D.
31 to 0 indicates that the data is DMA-transferred to the RAM 22.

【0027】図3において、シーケンサ26では、上記
DMAC11から入力される図4(j)に示すDMAリ
クエスト信号DMARQ′がサンプリングされ、DMA
リクエスト信号DMARQ′が入力されると、図4
(c)に示すアクノリッジ信号*DMAACK′(*:
負論理を示す、以下、同様に記述する)がDMAC11
に出力される。次いで、シーケンサ26から図4(d)
に示すIOリード信号*IORDがI/O14、16に
出力され、I/O14、16に対して図4(e)に示す
ロングワードデータD′31〜0の読み出し動作が行わ
れる。このデータ読み出し動作が終了すると、それぞれ
の制御信号はネゲート(negate)される。次いで、I/
O14、16から読み出されたロングワードデータD′
31〜0は、バイト位置変換回路22によりRAM12
内の格納先アドレス(上記図7に示したスタートアドレ
ス、エンドアドレス)により検出されるデータ格納領域
からの転送データのバイト位置ずれが判断され、このバ
イト位置ずれを直すようにロングワードデータD′31
〜0のバイト位置変換が行われてラッチ回路23、24
に転送される。
In FIG. 3, the sequencer 26 samples the DMA request signal DMARQ 'shown in FIG.
When the request signal DMARQ 'is input,
The acknowledge signal * DMAACK '(*:
DMAC11 indicates negative logic, which will be described below in the same manner)
Is output to. Then, from the sequencer 26, FIG.
The IO read signal * IORD shown in FIG. 4 is output to the I / Os 14 and 16, and the I / Os 14 and 16 are read out from the longword data D'31 to 0 shown in FIG. When this data read operation is completed, each control signal is negated. Then I /
Longword data D ′ read from O14 and O16
31 to 0 are stored in the RAM 12 by the byte position conversion circuit 22.
Of the transfer data from the data storage area, which is detected by the storage destination address (start address and end address shown in FIG. 7), is determined, and the longword data D ′ is corrected to correct the byte position deviation. 31
The byte position conversion from 0 to 0 is performed and the latch circuits 23 and 24 are executed.
Transferred to.

【0028】上記図7(b)に示したようなメモリ1内
のバイト位置ずれの場合は、ロングワードデータD′3
1〜0のバイト位置0〜3は、バイト位置0→1,1→
2,2→3,3→0にそれぞれ変換されることにより、
一回目の転送では、バイト位置の並びが、4,1,2,
3の順となるロングワードデータに変換されることにな
る。
In the case of a byte position shift in the memory 1 as shown in FIG. 7B, the long word data D'3
Byte positions 0 to 3 of 1 to 0 are byte positions 0 → 1, 1 →
By converting to 2, 2 → 3, 3 → 0 respectively,
In the first transfer, the sequence of byte positions is 4, 1, 2,
3 will be converted into longword data.

【0029】次いで、シーケンサ26からラッチ回路2
3、24に図4(f)、(g)に示すラッチ信号LAT
CH3、LATCH4が交互に出力され、一回目の転送
と二回目の転送でバイト位置変換回路22によりバイト
位置が変換されたロングワードデータをラッチ回路2
3、24に交互にラッチさせると同時に、シーケンサ2
6からセレクタ25に対して図4(m)に示す4本のセ
レクト信号SEL0〜3が出力される。セレクタ25で
は、入力されたセレクト信号SEL0〜3によりラッチ
回路23、24に交互にラッチされたバイト位置変換後
のロングワードデータがバイト単位で選択され、前回と
今回にロングワードデータが転送先RAM12のデータ
格納領域に合わせて組み合わされる。
Next, from the sequencer 26 to the latch circuit 2
3 and 24, the latch signal LAT shown in FIGS.
CH3 and LATCH4 are alternately output, and the latch circuit 2 outputs the longword data whose byte position has been converted by the byte position conversion circuit 22 in the first transfer and the second transfer.
3 and 24 are alternately latched, and at the same time the sequencer 2
4 to the selector 25, the four select signals SEL0 to SEL3 shown in FIG. In the selector 25, the longword data after byte position conversion latched in the latch circuits 23 and 24 alternately by the input select signals SEL0 to 3 is selected in byte units, and the longword data in the previous time and this time is transferred to the transfer destination RAM 12 Are combined according to the data storage area of.

【0030】図7(b)に示したようなDMA転送の場
合、バイト位置変換回路22でバイト位置が変換された
ロングワードデータをラッチ回路23からラッチを開始
させるとすると、2回目の転送動作ではラッチ回路24
にロングワードデータ(バイト位置8,5,6,7)が
ラッチされるが、一回目の転送動作でラッチ回路23に
ラッチされたロングワードデータ(バイト位置4,1,
2,3)とともにバイト単位でセレクタ25により選択
され、その選択された結果、セレクタ25からは図4
(i)に示すロングワードデータ(バイト位置4,5,
6,7)が出力されることになる。
In the case of the DMA transfer as shown in FIG. 7B, assuming that the latch circuit 23 starts latching the longword data whose byte position is converted by the byte position conversion circuit 22, the second transfer operation is performed. Then the latch circuit 24
The longword data (byte positions 8, 5, 6, and 7) is latched in, but the longword data (byte positions 4, 1, and 1) latched by the latch circuit 23 in the first transfer operation.
2 and 3) are selected in byte units by the selector 25. As a result of the selection, the selector 25 displays
Longword data shown in (i) (byte positions 4, 5,
6, 7) will be output.

【0031】この選択処理が終了すると、シーケンサ2
6からデータバッファ21に対して図4(h)に示すラ
ッチ信号LATCH1が出力され、バイト位置を並び替
え再構成されたロングワードデータのバッファリングを
行わせる。このバッファリング終了後、I/O14、1
6に代わってシーケンサ26からDMAC11に対して
図4(j)に示すDMAリクエスト信号DMARQが出
力され、I/O14、16からRAM12へのDMA転
送が要求される。このDMA要求によりデータバッファ
21にバッファリングされたロングワードデータD31
〜0は、図4(i)に示すバイト位置でRAM12にD
MA転送される。
When this selection process is completed, the sequencer 2
The latch signal LATCH1 shown in FIG. 4 (h) is output from 6 to the data buffer 21 to rearrange the byte positions and buffer the reconstructed longword data. After this buffering is completed, I / O14, 1
In place of 6, the sequencer 26 outputs the DMA request signal DMARQ shown in FIG. 4 (j) to the DMAC 11, requesting the DMA transfer from the I / O 14, 16 to the RAM 12. The longword data D31 buffered in the data buffer 21 by this DMA request
~ 0 is the byte position shown in FIG.
MA is transferred.

【0032】シーケンサ26では、DMAC11から入
力される図4(k)に示すアクノリッジ信号*DMAA
CKを監視することにより、DMAサイクルによるRA
M12への書き込み動作の終了を待って、一連の転送サ
イクルが終了される。
In the sequencer 26, the acknowledge signal * DMAA shown in FIG.
RA by DMA cycle by monitoring CK
A series of transfer cycles are ended after waiting for the end of the write operation to M12.

【0033】以上のように、バイト位置変換処理を伴う
一連のDMA転送処理を繰り返し行うことにより、転送
先デバイスのスタートアドレスにより区切られるデータ
格納幅に関係なく、ロングワードデータのDMA転送を
行うことができる。
As described above, by repeating a series of DMA transfer processing involving byte position conversion processing, longword data is DMA transferred regardless of the data storage width delimited by the start address of the transfer destination device. You can

【0034】なお、図4(i)において、点線部分のロ
ングワードデータは、最初の1バイト分の無効データが
含まれてRAM12にDMA転送されることを示してお
り、所定の転送モード設定等により無効データを転送し
ないように制御することも可能なことを示したものであ
る。この処理は、仮に無効データを転送した場合、転送
先RAM12に既に格納されているバイト位置のデータ
が破壊されることを回避するためである。また、無効デ
ータを転送しない場合は、I/Oバス制御回路13、1
5内にスタートデータ用のラッチ回路を別に設ける必要
があり、最終データについても同様の処理が必要とな
る。
In FIG. 4 (i), the long-word data indicated by the dotted line indicates that the first 1-byte invalid data is included and transferred to the RAM 12 by DMA transfer. It is shown that it is possible to control not to transfer invalid data. This process is for avoiding the destruction of the data at the byte position already stored in the transfer destination RAM 12 if the invalid data is transferred. When invalid data is not transferred, the I / O bus control circuits 13 and 1
It is necessary to separately provide a latch circuit for start data in 5, and the same processing is required for the final data.

【0035】次に、RAM22からI/O14、16へ
のDMAデータ転送処理について、図5に示すI/Oバ
ス制御回路13、15のブロック構成図及び図6に示す
I/Oバス制御回路13、15内の各部信号のタイミン
グチャートを参照して説明する。
Next, regarding the DMA data transfer processing from the RAM 22 to the I / Os 14 and 16, a block diagram of the I / O bus control circuits 13 and 15 shown in FIG. 5 and the I / O bus control circuit 13 shown in FIG. , 15 will be described with reference to the timing charts of the signals in each part.

【0036】図5は、RAM22からI/O14、16
へのDMAデータ転送処理を実行する場合のI/Oバス
制御回路13、15内のデータの流れに応じて上記図2
に示した各ブロックの配置を変更した図である。この図
では、I/Oバス制御回路13、15内で、RAM22
から読み出されるロングワードデータD31〜0が、デ
ータバッファ21、バイト位置変換回路22、ラッチ回
路23、24及びセレクタ25の順にバイト位置変換処
理とともに転送されてロングワードデータD′31〜0
としてI/O14、16へDMA転送されることを示し
ている。
FIG. 5 shows the I / Os 14 and 16 from the RAM 22.
2 according to the data flow in the I / O bus control circuits 13 and 15 when executing the DMA data transfer process to
It is the figure which changed the arrangement | positioning of each block shown in FIG. In this figure, the RAM 22 is provided in the I / O bus control circuits 13 and 15.
The longword data D31 to 0 read from the data buffer 21, the byte position conversion circuit 22, the latch circuits 23 and 24, and the selector 25 are transferred in this order together with the byte position conversion processing, and the longword data D'31 to 0.
Indicates that DMA transfer is performed to the I / Os 14 and 16.

【0037】図5において、シーケンサ26では、上記
DMAC11から入力される図6(i)に示すDMAリ
クエスト信号DMARQ′がサンプリングされ、DMA
リクエスト信号DMARQ′が入力されると、図6
(b)に示すDMAリクエスト信号DMARQがDMA
C11に出力され、RAM12からI/O14、16へ
のDMA転送が要求される。次いで、シーケンサ26か
ら図6(d)に示すIOライト信号*IOWR′がRA
M12に出力され、RAM12に対して図6(e)に示
すロングワードデータD31〜0の読み出し動作が行わ
れる。このデータ読み出し動作が終了すると、それぞれ
の制御信号はネゲートされる。次いで、シーケンサ26
からデータバッファ21にラッチ信号LATCH1が出
力され、I/O14、16に代ってRAM12から読み
出されたロングワードデータD31〜0のバッファリン
グが行われる。
In FIG. 5, the sequencer 26 samples the DMA request signal DMARQ ′ shown in FIG.
When the request signal DMARQ 'is input,
The DMA request signal DMARQ shown in (b) is DMA
It is output to C11, and DMA transfer from the RAM 12 to the I / Os 14 and 16 is requested. Next, from the sequencer 26, the IO write signal * IOWR 'shown in FIG.
The data is output to M12 and the read operation of the longword data D31 to 0 shown in FIG. When this data read operation is completed, each control signal is negated. Then, the sequencer 26
Outputs the latch signal LATCH1 to the data buffer 21, and buffers the longword data D31 to 0 read from the RAM 12 in place of the I / Os 14 and 16.

【0038】次いで、データバッファ21にバッファリ
ングされたロングワードデータD31〜0は、バイト位
置変換回路22によりI/O14、16内の格納先アド
レスにより検出されるデータ格納領域からの転送データ
のバイト位置ずれが判断され、このバイト位置ずれを直
すようにロングワードデータD31〜0のバイト位置変
換が行われてラッチ回路23、24に転送される。
Next, the longword data D31 to 0 buffered in the data buffer 21 is transferred by the byte position conversion circuit 22 to the byte of the transfer data from the data storage area detected by the storage destination address in the I / O 14 and 16. The position shift is determined, the byte position conversion of the long word data D31 to 0 is performed so as to correct the byte position shift, and the long word data D31 to 0 are transferred to the latch circuits 23 and 24.

【0039】上記図7(b)に示したようなメモリ1内
のバイト位置ずれの場合は、上記I/O14、16から
RAM12への転送のときのバイト位置変換とは逆の変
換処理が行われる。すなわち、ロングワードデータD3
1〜0のスタート位置の無効データ×(0)を除くバイ
ト位置1〜3は、バイト位置1→0,2→1,3→2に
それぞれ変換されることにより、一回目の転送では、バ
イト位置の並びが、1,2,3の順となるロングワード
データに変換されることになる。
In the case of a byte position shift in the memory 1 as shown in FIG. 7B, a conversion process reverse to the byte position conversion at the time of transfer from the I / O 14, 16 to the RAM 12 is performed. Be seen. That is, the long word data D3
Byte positions 1 to 3 excluding invalid data x (0) at the start position of 1 to 0 are converted into byte positions 1 → 0, 2 → 1, 3 → 2 respectively, so that in the first transfer, bytes The position sequence is converted into longword data in the order of 1, 2, 3.

【0040】次いで、シーケンサ26からラッチ回路2
3、24に図6(f)、(g)に示すラッチ信号LAT
CH3、LATCH4のうちどちらかが出力され、一回
目の転送と二回目の転送でバイト位置変換回路22によ
りバイト位置が変換されたロングワードデータをラッチ
回路23、24に交互にラッチさせると同時に、シーケ
ンサ26からセレクタ25に対して図6(l)に示す4
本のセレクト信号SEL0〜3が出力される。セレクタ
25では、入力されたセレクト信号SEL0〜3により
ラッチ回路23、24に交互にラッチされたバイト位置
変換後のロングワードデータがバイト単位で選択され、
前回と今回にロングワードデータが転送先のI/O1
4、16のデータ格納領域に合わせて組み合わされる。
Next, from the sequencer 26 to the latch circuit 2
3 and 24, the latch signal LAT shown in FIGS.
One of CH3 and LATCH4 is output, and at the same time, the latch circuits 23 and 24 alternately latch the longword data whose byte positions have been converted by the byte position conversion circuit 22 in the first transfer and the second transfer. 4 from the sequencer 26 to the selector 25 shown in FIG.
Book select signals SEL0-3 are output. In the selector 25, the longword data after byte position conversion latched in the latch circuits 23 and 24 alternately by the input select signals SEL0 to 3 is selected in byte units,
I / O1 of the transfer destination of the longword data in the previous time and this time
It is combined according to the data storage areas of 4 and 16.

【0041】バイト位置変換回路22でバイト位置が変
換されたロングワードデータをラッチ回路23からラッ
チを開始させるとすると、2回目の転送動作ではラッチ
回路24にロングワードデータ(バイト位置4,5,
6,7)がラッチされるが、一回目の転送動作でラッチ
回路23にラッチされたロングワードデータ(バイト位
置1,2,3)とともにバイト単位でセレクタ25によ
り選択され、その選択された結果、セレクタ25からは
図6(h)に示すロングワードデータD′31〜0(バ
イト位置1,2,3,4)が、I/O14、16に出力
されることになる。
Assuming that the latch circuit 23 starts latching the longword data whose byte positions have been converted by the byte position conversion circuit 22, in the second transfer operation, the latch circuit 24 stores the longword data (byte positions 4, 5, and 5).
6, 7) are latched, but are selected by the selector 25 in byte units together with the longword data (byte positions 1, 2, 3) latched by the latch circuit 23 in the first transfer operation, and the selected result The long word data D'31 to 0 (byte positions 1, 2, 3, 4) shown in FIG. 6 (h) are output from the selector 25 to the I / Os 14, 16.

【0042】この選択処理が終了すると、DMAC11
に代わってシーケンサ26からI/O14、16に対し
て図6(j)に示すアクノリッジ信号*DMAACK′
が出力され、さらに、図6(k)に示すIOライト信号
*IOWR′がI/O14、16に出力されて、データ
のライト動作が行われる。
When this selection process is completed, the DMAC 11
6J to the I / Os 14 and 16 in place of the acknowledge signal * DMAACK 'shown in FIG.
Is output, and the IO write signal * IOWR 'shown in FIG. 6 (k) is output to the I / Os 14 and 16 to perform the data write operation.

【0043】以上のように、RAM12からI/O1
4、16へのDMA転送の場合にもバイト位置変換処理
を伴う一連のDMA転送処理を繰り返し行うことによ
り、転送先デバイスのスタートアドレスにより区切られ
るデータ格納幅に関係なく、ロングワードデータのDM
A転送を行うことができる。
As described above, I / O1 is read from RAM 12
In the case of DMA transfer to 4 and 16 as well, by repeating a series of DMA transfer processing involving byte position conversion processing, regardless of the data storage width delimited by the start address of the transfer destination device, longword data DM
A transfer can be performed.

【0044】なお、RAM12からI/O14、16へ
のDMA転送の場合は、一回目のDMA転送ではI/O
14、16に転送すべきロングワードデータが再構成さ
れていないため、I/O14、16に対するライト動作
は行われず、二回目のDMA転送からI/O14、16
に対するライト動作が開始される。
In the case of the DMA transfer from the RAM 12 to the I / Os 14 and 16, the I / O is executed in the first DMA transfer.
Since the longword data to be transferred to 14 and 16 has not been reconstructed, the write operation to I / O 14 and 16 is not performed, and I / O 14 and 16 from the second DMA transfer.
The write operation for is started.

【0045】以上説明したように、I/Oバス制御回路
13、15では、RAM12とI/O14、16との間
でDMA転送されるロングワードデータが、転送先デバ
イスのデータ格納幅からオーバーすることにより発生す
るバイト位置ずれをバイト位置変換回路22によりデー
タ格納幅に合わせて転送幅を変更し、ラッチ回路23、
24にラッチしてセレクタ25で選択、再構成してDM
A転送を実行しているので、転送先デバイスのスタート
アドレスにより区切られるデータ格納幅に関係なく、ロ
ングワードデータのDMA転送を確実に実行することが
でき、DMA転送の処理時間を短縮することができる。
As described above, in the I / O bus control circuits 13 and 15, longword data DMA-transferred between the RAM 12 and the I / Os 14 and 16 exceeds the data storage width of the transfer destination device. The byte position shift circuit 22 changes the transfer width according to the data storage width by the byte position conversion circuit 22.
24, select by selector 25, reconfigure and DM
Since the A transfer is executed, regardless of the data storage width delimited by the start address of the transfer destination device, the DMA transfer of the longword data can be surely executed, and the processing time of the DMA transfer can be shortened. it can.

【0046】[0046]

【発明の効果】本発明によれば、データ転送先デバイス
の格納先アドレスにより区切られるデータ格納幅を検出
し、該検出したデータ格納幅に基づいてI/Oバスによ
り区切られるデータの転送幅を変更し、該変更したデー
タのうち前回と今回の転送で転送幅を変更したデータを
交互に格納し、検出したデータ格納幅に合わせて格納し
た前回と今回の転送幅変更データを選択、再構成して転
送先デバイスに転送しているので、転送先デバイスのデ
ータ格納幅に合わせてロングワードデータの転送幅を変
更して転送することができ、DMA転送において転送先
デバイスのデータ格納幅からオーバーするデータ転送幅
分を再構成してDMA転送を確実に実行することがで
き、DMA転送の処理時間を短縮することができる。
According to the present invention, the data storage width delimited by the storage destination address of the data transfer destination device is detected, and the transfer width of the data delimited by the I / O bus is detected based on the detected data storage width. Change and store the data whose transfer width has been changed in the previous and current transfers alternately among the changed data, and select and reconfigure the previous and present transfer width change data stored according to the detected data storage width Since the data is transferred to the transfer destination device, the transfer width of the longword data can be changed to match the data storage width of the transfer destination device, and the data storage width of the transfer destination device is exceeded during DMA transfer. The DMA transfer can be reliably executed by reconfiguring the data transfer width to be performed, and the processing time of the DMA transfer can be shortened.

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

【図1】DMACユニットのブロック構成図である。FIG. 1 is a block configuration diagram of a DMAC unit.

【図2】図1のI/Oバス制御回路のブロック構成図で
ある。
FIG. 2 is a block diagram of the I / O bus control circuit of FIG.

【図3】図2のI/Oバス制御回路の各ブロックの配置
をI/OからRAMへのDMA転送に対応して変更した
図である。
FIG. 3 is a diagram in which the arrangement of each block of the I / O bus control circuit of FIG. 2 is changed corresponding to DMA transfer from I / O to RAM.

【図4】図3のI/Oバス制御回路内の各制御信号及び
データのタイミングチャートを示す図である。
4 is a diagram showing a timing chart of each control signal and data in the I / O bus control circuit of FIG.

【図5】図2のI/Oバス制御回路の各ブロックの配置
をRAMからI/OへのDMA転送に対応して変更した
図である。
5 is a diagram in which the arrangement of each block of the I / O bus control circuit of FIG. 2 is changed corresponding to the DMA transfer from RAM to I / O.

【図6】図5のI/Oバス制御回路内の各制御信号及び
データのタイミングチャートを示す図である。
6 is a diagram showing a timing chart of each control signal and data in the I / O bus control circuit of FIG.

【図7】従来のI/Oとメモリとの間のロングワードデ
ータのDMA転送を説明するための図である。
FIG. 7 is a diagram for explaining DMA transfer of longword data between a conventional I / O and a memory.

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

10 DMAユニット 11 DMAC 12 RAM 13、15 I/Oバス制御回路 14、16 I/O 17 アドレスバス 18 データバス 21 データバッファ 22 バイト位置変換回路 23、24 ラッチ回路 25 セレクタ 26 シーケンサ 27 制御バス 28a〜28c データバス 10 DMA unit 11 DMAC 12 RAM 13, 15 I / O bus control circuit 14, 16 I / O 17 address bus 18 data bus 21 data buffer 22 byte position conversion circuit 23, 24 latch circuit 25 selector 26 sequencer 27 control bus 28a- 28c data bus

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 等間隔の所定データ幅に区切ってデータ
を授受するI/Oバスと各種デバイスとの間で転送され
るデータの転送幅を制御するバス制御装置において、 前記データ転送先デバイスのデータ格納先アドレスによ
り区切られるデータ格納幅を検出する格納幅検出手段
と、 前記I/Oバスにより区切られるデータ転送幅を格納幅
検出手段により検出されるデータ格納幅に基づいて変更
して転送先デバイスに転送する転送幅変更手段と、 を具備したことを特徴とするバス制御装置。
1. A bus control device for controlling a transfer width of data transferred between an I / O bus that transfers data by dividing it into predetermined data widths at equal intervals, and a data transfer destination device A storage width detecting means for detecting a data storage width delimited by a data storage destination address, and a transfer destination by changing the data transfer width delimited by the I / O bus based on the data storage width detected by the storage width detecting means. A bus control device comprising: a transfer width changing unit for transferring to a device.
【請求項2】 等間隔の所定データ幅に区切ってデータ
を授受するI/Oバスと各種デバイスとの間で転送され
るデータの転送幅を制御するバス制御装置において、 前記データ転送先デバイスのデータ格納先アドレスによ
り区切られるデータ格納幅を検出する格納幅検出手段
と、 前記I/Oバスにより区切られるデータ転送幅を格納幅
検出手段により検出されるデータ格納幅に基づいて変更
する転送幅変更手段と、 転送幅変更手段により転送幅が変更されるデータを格納
する変更データ格納手段と、 変更データ格納手段に格納されるデータを検出されたデ
ータ格納幅に合わせて選択して再構成して転送先デバイ
スに転送する再構成手段と、 を具備したことを特徴とするバス制御装置。
2. A bus control device for controlling a transfer width of data transferred between an I / O bus for transmitting and receiving data divided into predetermined data widths at equal intervals, and a data transfer destination device Storage width detection means for detecting a data storage width delimited by a data storage destination address, and transfer width change for changing a data transfer width delimited by the I / O bus based on the data storage width detected by the storage width detection means Means, a change data storage means for storing the data whose transfer width is changed by the transfer width changing means, and the data stored in the change data storage means are selected and reconfigured according to the detected data storage width. A bus control device comprising: a reconfiguring unit that transfers to a transfer destination device.
【請求項3】 前記変更データ格納手段は、 前記転送幅変更手段により転送幅が変更されるデータの
うち前回の転送で転送幅が変更されたデータを格納する
第1の変更データ格納手段と、 該転送幅変更手段により転送幅が変更されるデータのう
ち今回の転送で転送幅が変更されたデータを格納する第
2の変更データ格納手段と、 により構成し、該第1、第2の変更データ格納手段に前
回と今回の転送で転送幅を変更したデータを交互に格納
し、前記再構成手段が、前記格納幅検出手段により検出
されたデータ格納幅に合わせて該第1、第2の変更デー
タ格納手段に格納された前回と今回の転送幅変更データ
を選択して再構成し、前記転送先デバイスに転送するこ
とを特徴とする請求項2記載のバス制御装置。
3. The change data storage means includes a first change data storage means for storing data whose transfer width has been changed by a previous transfer among data whose transfer width has been changed by the transfer width changing means, Second change data storage means for storing the data whose transfer width has been changed in the current transfer among the data whose transfer width has been changed by the transfer width changing means, and the first and second changes The data having the transfer width changed by the previous transfer and the current transfer is alternately stored in the data storage means, and the reconfiguration means matches the data storage width detected by the storage width detection means with the first and second data. 3. The bus control device according to claim 2, wherein the transfer width change data of the previous time and the transfer width change data of this time stored in the change data storage means are selected, reconfigured, and transferred to the transfer destination device.
JP20960092A 1992-07-13 1992-07-13 Bus controller Pending JPH0635841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20960092A JPH0635841A (en) 1992-07-13 1992-07-13 Bus controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20960092A JPH0635841A (en) 1992-07-13 1992-07-13 Bus controller

Publications (1)

Publication Number Publication Date
JPH0635841A true JPH0635841A (en) 1994-02-10

Family

ID=16575501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20960092A Pending JPH0635841A (en) 1992-07-13 1992-07-13 Bus controller

Country Status (1)

Country Link
JP (1) JPH0635841A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000038686A (en) * 1998-12-08 2000-07-05 구자홍 Direct memory access controller
US6633926B1 (en) 1998-11-30 2003-10-14 Matsushita Electric Industrial Co., Ltd. DMA transfer device capable of high-speed consecutive access to pages in a memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633926B1 (en) 1998-11-30 2003-10-14 Matsushita Electric Industrial Co., Ltd. DMA transfer device capable of high-speed consecutive access to pages in a memory
KR20000038686A (en) * 1998-12-08 2000-07-05 구자홍 Direct memory access controller

Similar Documents

Publication Publication Date Title
US4467447A (en) Information transferring apparatus
US4514808A (en) Data transfer system for a data processing system provided with direct memory access units
EP1730643A2 (en) Pvdm (packet voice data module) generic bus protocol
JP2005293596A (en) Arbitration of data request
US7254667B2 (en) Data transfer between an external data source and a memory associated with a data processor
JPH0635841A (en) Bus controller
JP2003281074A (en) Direct access memory device
KR960001023B1 (en) Bus sharing method and the apparatus between different bus
JP3150005B2 (en) Serial interface circuit
JPH0227696B2 (en) JOHOSHORISOCHI
JP2000099452A (en) Dma control device
JPH1063617A (en) Serial communication device
JP2563807B2 (en) Direct memory access control circuit
JPS6368957A (en) Data transfer system in information processor
JP3293838B2 (en) Data transfer method
JP2533886B2 (en) Data transfer method
JP4114900B2 (en) System LSI and semiconductor integrated circuit
JP2000285087A (en) Method for data communication between nodes
JP2001014270A (en) Data transfer method and device and their application system
JP2002073533A (en) Data processor
JPH0540728A (en) Bus control method
JPH0465419B2 (en)
JPH08161253A (en) Dma control method and dma controller
JPH1097411A (en) Data processor
JPH0195350A (en) System for controlling data transferring