JPH09305530A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPH09305530A
JPH09305530A JP12203296A JP12203296A JPH09305530A JP H09305530 A JPH09305530 A JP H09305530A JP 12203296 A JP12203296 A JP 12203296A JP 12203296 A JP12203296 A JP 12203296A JP H09305530 A JPH09305530 A JP H09305530A
Authority
JP
Japan
Prior art keywords
data
cpu
input
address
array
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
JP12203296A
Other languages
Japanese (ja)
Inventor
Hisanori Okamoto
久範 岡本
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP12203296A priority Critical patent/JPH09305530A/en
Publication of JPH09305530A publication Critical patent/JPH09305530A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a direct memory access(DMA) controller with which data to be processed by an input/output device designed based on the CPU of difference data arrangement can be properly processed by the other kind of CPU different from that CPU. SOLUTION: A DMA controller 6 has an arrangement change circuit 9 for changing the arrangement of data to be supplied from the input/output device (reader 7 or personal computer 13) designed corresponding to the Motorola system CPU of a system different from an INTEL system CPU 1 of the present system or data to be supplied from a memory to the relevant input/output device when transferring data with the relevant input/output device. The arrangement change circuit 9 exchanges the high-order byte and low-order byte of the relevant data in the case of word transfer. Besides, in the case of byte transfer, data are transferred by exchanging the odd-numbered address and the even-numbered address on the memory for writing or reading the data by designating any address through an EXOR circuit 15.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、DMA(ダイレク
トメモリアクセス)コントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA (Direct Memory Access) controller.

【0002】[0002]

【従来の技術】CPUを含む制御ユニットとこれに接続
された入出力装置との間で高速にデータ転送を行う方式
としてDMA方式が知られている。通常の入出力制御
(いわゆるプログラム制御)では、入出力プログラムに
従ってCPUと入出力装置との間でデータの転送を行
う。従って、例えば磁気ディスクのように高速に大量の
データを転送する能力のある装置との間で入出力を行う
場合には、転送に時間を要するとともにデータの転送中
はCPUが転送処理にかかりきりになり、CPUの利用
効率が悪い。DMA方式では、CPUによる制御は入出
力の開始と終了のときのみとし、一度データの転送が開
始されればその後はCPUに関係なく、メモリと入出力
装置との間で直接データ転送を行う。
2. Description of the Related Art A DMA system is known as a system for performing high-speed data transfer between a control unit including a CPU and an input / output device connected thereto. In normal input / output control (so-called program control), data is transferred between the CPU and the input / output device according to an input / output program. Therefore, when inputting / outputting to / from a device capable of transferring a large amount of data at high speed such as a magnetic disk, it takes a long time to transfer the data and the CPU does not finish the transfer process during the data transfer. Therefore, the utilization efficiency of the CPU is poor. In the DMA method, the control by the CPU is performed only at the start and end of input / output, and once the data transfer is started, the data is directly transferred between the memory and the input / output device after that regardless of the CPU.

【0003】DMA方式においてはDMAコントローラ
が使用される。DMAコントローラはCPUに代わって
入出力のデータ転送を制御する回路である。DMAコン
トローラは通常複数のチャンネルを有しており、各チャ
ンネル毎に入出力装置と接続される。DMAコントロー
ラとCPUとはバスを共有しており、DMAコントロー
ラが起動された状態にて入出力装置の制御回路からDM
Aコントローラを介してDMA処理のためのバス開放要
求が出されると、CPUは実行中の処理が終了した時点
でバスを開放し、バスの使用権をDMAコントローラに
与える。これに応答して、DMAコントローラがバスを
使用して入出力装置との間でデータの転送を行う。一回
のDMA要求により実行されるデータ転送の時間(以
下、「DMAサイクル」という。)は決まっており、入
出力装置は、目的のバイト数のデータ転送処理が完了す
るまで、繰り返しDMA処理のためのバス開放要求を出
力する。DMAコントローラにより単位DMAサイクル
のデータ転送処理が終了すると、DMAコントローラは
バスの使用権をCPUに戻し、CPUはバスを使用して
処理を再開する。DMA処理のためのバス開放要求があ
る周期で連続的に出力されている場合には、それらに対
するDMA処理を継続的に行うことになる。
A DMA controller is used in the DMA system. The DMA controller is a circuit that controls input / output data transfer instead of the CPU. The DMA controller usually has a plurality of channels, and each channel is connected to an input / output device. The DMA controller and the CPU share a bus, and when the DMA controller is activated, the DM is transferred from the control circuit of the input / output device.
When a bus release request for DMA processing is issued via the A controller, the CPU releases the bus at the time when the processing being executed is completed, and gives the DMA controller the right to use the bus. In response, the DMA controller uses the bus to transfer data to and from the I / O device. The data transfer time (hereinafter, referred to as “DMA cycle”) executed by one DMA request is fixed, and the input / output device repeats the DMA processing until the data transfer processing of the target number of bytes is completed. A bus release request for output. When the DMA controller completes the data transfer process of the unit DMA cycle, the DMA controller returns the right to use the bus to the CPU, and the CPU restarts the process by using the bus. When the bus release request for the DMA processing is continuously output at a certain cycle, the DMA processing for them is continuously performed.

【0004】[0004]

【発明が解決しようとする課題】DMA処理によりメモ
リに書き込まれたデータは、CPUによる演算、データ
の加工等に供される。この場合、CPUは、メモリ内の
データをCPU内部のレジスタに読み込み、所定の演算
等を施し、その結果を再びメモリに出力する。このよう
にして得られたデータは、メモリから読み出され、入出
力装置等の他の構成部分へ供給される。現在、16ビッ
トのプロセッサとしては開発メーカー等に依存する複数
のタイプのものが汎用されているが、タイプの違うCP
Uではデータの処理動作等に相違がある。例えば、イン
テル系のプロセッサとモトローラ系のプロセッサでは、
メモリに記憶されたデータに演算を施すために内部レジ
スタにデータを読み込む場合、データの配列が異なって
しまうという問題がある。16ビットプロセッサでは、
ワード(即ち、2バイト)単位でデータを扱う場合とバ
イト単位で扱う場合があるが、インテル系のプロセッサ
とモトローラ系のプロセッサでは上位1バイトと下位1
バイトの配列が逆になってしまう。
The data written in the memory by the DMA processing is used by the CPU for processing, processing the data, and the like. In this case, the CPU reads the data in the memory into a register in the CPU, performs a predetermined operation, etc., and outputs the result to the memory again. The data thus obtained is read from the memory and supplied to other components such as the input / output device. Currently, multiple types of 16-bit processors are widely used depending on the manufacturer, but different types of CP
In U, there are differences in data processing operations and the like. For example, on Intel-based processors and Motorola-based processors,
When data is read into the internal register in order to perform an operation on the data stored in the memory, there is a problem that the array of data is different. On a 16-bit processor,
There are cases where data is handled in word (that is, 2 bytes) units and cases where data is handled in bytes, but in the Intel type processor and the Motorola type processor, the upper 1 byte and the lower 1
The byte array is reversed.

【0005】これをより具体的に説明する。例えば、図
3に示すような16ビットの信号がシステムに入力され
たとする。この信号はシリアル/パラレル変換され、メ
モリ(RAM)内に図4(A)のような配列で記憶され
る。なお、図4(A)に示す「n番地」、「n+2番
地」「n+4番地」、...の表示は、ワード(16ビ
ット)単位でデータを取り扱う場合に、プログラム上で
指定するためのデータ格納アドレスを示すものであっ
て、通常、下位バイト(偶数アドレス、A0=0)の番
地を指定することにより、上位バイト(奇数アドレス、
A0=1)のデータとともに、ワード単位でデータの書
き込み或いは読み出しが実行される。例えば、プログラ
ム上で「n番地」を指定したワード単位の命令が実行さ
れる場合には、「n番地(偶数番地)」と「n+1番地
(奇数番地)」とを対象として、計16ビットのデータ
の書き込み或いは読み出しが同時に実行される。従っ
て、データの書き込み或いは読み出しをワード単位で連
続的に行う場合には、「n番地」、「n+2番地」とい
うように、指定アドレスが2番地ずつ加算されていくこ
とになる。ここで、例えば、モトローラ系のCPUによ
りRAM内のデータを処理する場合、データはそのまま
の配列でCPU内のレジスタに取り込まれる。しかし、
インテル系のCPUによりRAM内のデータを演算する
場合、RAM内のデータの上位バイトと下位バイトが入
れ替えられた形でCPU内のレジスタに取り込みが行わ
れる(図4(B)参照)。従って、図3のような配列で
供給されたデータをインテル系のCPUで演算する場合
には、上位バイトと下位バイトが入れ替わったデータを
演算することになり、正しい演算が行えない。
This will be described more specifically. For example, assume that a 16-bit signal as shown in FIG. 3 is input to the system. This signal is serial / parallel converted and stored in a memory (RAM) in an array as shown in FIG. In addition, "n address", "n + 2 address", "n + 4 address" ,. . . Indicates the data storage address to be specified on the program when handling data in units of words (16 bits), and normally specifies the address of the lower byte (even address, A0 = 0). The upper byte (odd address,
Data is written or read in word units together with the data of A0 = 1). For example, when a word unit instruction in which "n address" is designated is executed on a program, a total of 16 bits are targeted for "n address (even address)" and "n + 1 address (odd address)". Data writing or reading is simultaneously executed. Therefore, when data writing or reading is continuously performed in word units, two designated addresses are added, such as "n address" and "n + 2 address". Here, for example, when the data in the RAM is processed by the CPU of the Motorola system, the data is taken into the register in the CPU in the same arrangement. But,
When the data in the RAM is calculated by the CPU of the Intel system, the upper byte and the lower byte of the data in the RAM are loaded into the register in the CPU (see FIG. 4B). Therefore, when the data supplied in the array as shown in FIG. 3 is operated by the CPU of the Intel system, the data in which the upper byte and the lower byte are exchanged is operated, and the correct operation cannot be performed.

【0006】このような観点から、通常、システムは使
用するCPUの方式に応じたデータ配列でデータを取り
扱うように設計される。実際には、モトローラ系のCP
Uを使用する場合にはデータは図4(A)のような配列
でRAM内に供給されるようにシステムが設計され、イ
ンテル系のCPUを使用する場合にはデータは図4
(A)と上位、下位バイトが逆になるような配列でRA
Mに供給されるようにシステムが設計される。
From this point of view, the system is usually designed to handle data in a data array according to the method of the CPU used. Actually, Motorola CP
When the U is used, the system is designed so that the data is supplied in the RAM in the arrangement as shown in FIG. 4A, and when the Intel CPU is used, the data is shown in FIG.
RA with an array in which the upper and lower bytes are opposite to those in (A)
The system is designed to feed M.

【0007】しかし、場合によっては、異なるCPUを
使用するように設計されていた複数のシステムを一体化
して、1つのCPUの管理下で両方のシステムの機能を
実現できるようにしたいという要求がある。このような
場合、一方の方式のCPUの動作に適合するように他方
のシステムを設計し直し、ソフトウェアを作り直すこと
は時間とコストを要する。従って、可能な限り既存のシ
ステムの根本的な設計変更をせずに、複数のシステムを
一体化できることが望まれる。具体的には、インテル系
のCPUについて設計されたシステムとモトローラ系の
CPUについて設計されたシステムを一体化し、インテ
ル系のCPU1つで全体を制御したいという場合があ
る。この場合、モトローラ系のCPUについて設計され
ているシステムで処理されるデータをそのままインテル
系のCPUで処理しようとすると、前述のようにCPU
内へのデータの読み込みの際などにデータの配列が相違
するため、目的の演算、処理等を行うことができないと
いう不具合が生じる。
However, in some cases, there is a demand for integrating a plurality of systems designed to use different CPUs so that the functions of both systems can be realized under the control of one CPU. . In such a case, it is time consuming and costly to redesign the other system and rewrite the software so as to match the operation of the CPU of one system. Therefore, it is desired to be able to integrate a plurality of systems without making a fundamental design change of the existing system as much as possible. Specifically, there is a case where a system designed for an Intel CPU and a system designed for a Motorola CPU are integrated, and it is desired to control the whole by one Intel CPU. In this case, if the data to be processed by the system designed for the Motorola CPU is to be directly processed by the Intel CPU, as described above, the CPU
Since the arrangement of the data is different when the data is read in, there is a problem in that the intended calculation and processing cannot be performed.

【0008】本発明は、以上の点に鑑みてなされたもの
であり、データ配列の異なるCPUに基づいて設計され
たシステムで処理されるデータを、それとは異なる種類
のCPUによって正しく処理することが可能なDMAコ
ントローラを提供することを課題とする。
The present invention has been made in view of the above points, and it is possible to correctly process data processed by a system designed based on CPUs having different data arrays by a CPU of a different type. It is an object to provide a possible DMA controller.

【0009】[0009]

【課題を解決するための手段】上記の課題を解決するた
め、請求項1記載の発明は、CPU及びメモリを含む制
御部と入出力部との間でデータ転送を行うDMAコント
ローラにおいて、前記入出力部から出力されるデータを
前記メモリに転送し、前記メモリから読み出されたデー
タを前記入出力部へ転送する転送回路を有し、前記転送
回路は、前記入出力部又は前記メモリから出力されたデ
ータの配列を変更する配列変更回路を有するように構成
する。
In order to solve the above-mentioned problems, the invention according to claim 1 is a DMA controller which transfers data between a control unit including a CPU and a memory and an input / output unit. A transfer circuit that transfers data output from the output unit to the memory and transfers data read from the memory to the input / output unit, wherein the transfer circuit outputs from the input / output unit or the memory It is configured to have an array changing circuit that changes the array of the generated data.

【0010】上記のように構成されたDMAコントロー
ラによれば、配列変更回路は転送すべきデータの配列を
変更して転送する。また、請求項2記載の発明によれ
ば、請求項1記載のDMAコントローラにおいて、前記
配列変更回路は、前記入出力部又は前記メモリから出力
されたデータの上位数ビットと下位数ビットを入れ換え
るように構成する。
According to the DMA controller configured as described above, the arrangement changing circuit changes the arrangement of the data to be transferred and transfers the data. According to a second aspect of the present invention, in the DMA controller according to the first aspect, the arrangement changing circuit replaces the high-order few bits and the low-order few bits of the data output from the input / output unit or the memory. To configure.

【0011】上記のように構成された配列変更回路によ
れば、入出力部又はメモリから出力されたデータは、配
列変更回路により、上位数ビットと下位数ビットが入れ
替えられて転送される。
According to the arrangement changing circuit configured as described above, the data outputted from the input / output unit or the memory is transferred by the arrangement changing circuit with the high-order several bits and the low-order several bits exchanged.

【0012】また、請求項3記載の発明は、請求項2記
載のDMAコントローラにおいて、前記配列変更回路
は、前記CPUから出力される指定信号に基づいて、入
力されるデータ又は前記入力されるデータの上位数ビッ
トと下位数ビットを入れ換えたデータのいずれか一方を
選択的に出力する選択回路であるように構成する。
According to a third aspect of the present invention, in the DMA controller according to the second aspect, the arrangement change circuit is configured to input data or the input data based on a designation signal output from the CPU. The selection circuit is configured to selectively output either one of the data in which the high-order several bits and the low-order few bits are replaced.

【0013】上記のように構成されたDMAコントロー
ラによれば、選択回路はCPUからの指定信号に基づい
て、配列変換回路に入力されるデータのそのままのデー
タと上位数ビットと下位数ビットを入れ換えたデータの
いずれか一方を選択的に出力する。
According to the DMA controller configured as described above, the selection circuit swaps the raw data of the data input to the array conversion circuit with the high-order number bits and the low-order number bits based on the designation signal from the CPU. Selectively outputs one of the data.

【0014】また、請求項4記載の発明は、請求項1記
載のDMAコントローラにおいて、前記配列変更回路
は、前記データをメモリに書き込むアドレス又は前記メ
モリから前記データを読み出すアドレスを変更するよう
に構成する。
According to a fourth aspect of the present invention, in the DMA controller according to the first aspect, the arrangement changing circuit is configured to change an address for writing the data in the memory or an address for reading the data from the memory. To do.

【0015】上記のように構成されたDMAコントロー
ラによれば、データの転送の際、前記データをメモリに
書き込むアドレス又は前記メモリから前記データを読み
出すアドレスが変更される。
According to the DMA controller configured as described above, the address for writing the data in the memory or the address for reading the data from the memory is changed when the data is transferred.

【0016】また、請求項5記載の発明は、請求項4記
載のDMAコントローラにおいて、前記配列変更回路
は、前記CPUから出力される指定信号に基づいて、前
記メモリに供給されるアドレス信号の最下位ビットを反
転させる回路であるように構成する。
According to a fifth aspect of the present invention, in the DMA controller according to the fourth aspect, the array changing circuit determines the maximum number of address signals supplied to the memory based on a designation signal output from the CPU. It is configured to be a circuit that inverts the lower bits.

【0017】上記のように構成されたDMAコントロー
ラによれば、データ転送の際、CPUから出力される指
定信号に基づいて、前記メモリに供給されるアドレス信
号の最下位ビットが反転される。
According to the DMA controller configured as described above, at the time of data transfer, the least significant bit of the address signal supplied to the memory is inverted based on the designation signal output from the CPU.

【0018】また、請求項6記載の発明は、請求項1乃
至5のいずれかに記載のDMAコントローラにおいて、
前記CPUは、メモリからCPU内部のレジスタにワー
ド単位でデータを取り込む場合に、上位バイトと下位バ
イトの配列が入れ替わって取り込まれる方式のものであ
るように構成する。
The invention according to claim 6 is the DMA controller according to any one of claims 1 to 5,
The CPU is configured so that, when data is fetched from a memory into a register inside the CPU on a word-by-word basis, the upper byte array and the lower byte array are swapped and loaded.

【0019】上記のように構成されたDMAコントロー
ラによれば、メモリからCPU内部のレジスタにワード
単位でデータを取り込む場合に、上位バイトと下位バイ
トの配列が入れ替わって取り込まれる場合であっても、
配列変更回路により上位バイトと下位バイトのデータ配
列が変更される。
According to the DMA controller configured as described above, when the data is fetched from the memory into the register inside the CPU in word units, even when the arrangement of the upper byte and the lower byte is exchanged,
The data arrangement of the upper byte and the lower byte is changed by the arrangement changing circuit.

【0020】[0020]

【発明の実施の形態】以下、図面を参照して本発明の好
適な実施の形態について説明する。図1は、本発明の実
施形態にかかるDMAコントローラを適用したファクシ
ミリ装置の制御部の構成、及び、その入出力装置との関
係の構成を示すブロック図である。なお、図1におい
て、CPU1は、インテル系のプロセッサとし、記録装
置8の制御系はインテル系のCPUのデータ処理方式に
対応して設計されているものとする。また、読取装置7
及びパソコン13の制御系はモトローラ系のCPUのデ
ータ処理方式に対応して設計されているものとする。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing a configuration of a control unit of a facsimile apparatus to which a DMA controller according to an embodiment of the present invention is applied and a configuration of a relationship with an input / output device thereof. In FIG. 1, the CPU 1 is assumed to be an Intel type processor, and the control system of the recording device 8 is designed corresponding to the data processing method of the Intel type CPU. In addition, the reading device 7
The control system of the personal computer 13 is designed to correspond to the data processing system of the CPU of the Motorola system.

【0021】図1に示すように、ファクシミリ装置の制
御部100は、バス4に接続されたCPU1、ROM
2、RAM3、モデム5及びDMAコントローラ6を備
える。DMAコントローラ6が起動状態にあるとき、R
AM3はアドレスカウンタ14を始めとしてEXOR
(排他的論理和)回路15及びラッチ回路16からなる
アドレス制御部によって番地が指定される。DMAコン
トローラ6は、アドレスカウンタ14等からなるアドレ
ス制御部の他に、転送サイクルを設定し、且つカウント
するためのサイクルカウンタ制御部、或いは、DMA起
動状態にあるとき、I/O(入出力)制御部18からの
データ転送要求に基づいてDMA処理を実行するべく、
CPU1に対してバスの開放要求(BUS REQUEST )を出
したりするタイミング制御部が設けられるとともに、本
実施形態においては、図2に示される配列変更回路9が
設けられている。DMAコントローラ6の配列変更回路
9は、I/O制御部18に設けられたレジスタ10、シ
リアル/パラレル変換器11を介して読取装置7と接続
され、また、レジスタ12、パラレル/シリアル変換器
19を介してパソコン13と接続されるとともに、レジ
スタ20を介して記録装置8に接続されている。なお、
I/O制御部18は、この他の入力装置のためのレジス
タが備えられているが、ここではその説明は省略する。
配列変更回路9は、CPU1から出力される配列変更指
示データD2 をラッチするラッチ回路17と接続されて
いる。なお、上記アドレス制御部におけるEXOR回路
15及びラッチ回路16は配列変更回路として機能す
る。
As shown in FIG. 1, the control unit 100 of the facsimile apparatus includes a CPU 1 and a ROM connected to the bus 4.
2, RAM 3, modem 5, and DMA controller 6. When the DMA controller 6 is in the activated state, R
AM3 EXOR including the address counter 14
An address is designated by an address control unit including an (exclusive OR) circuit 15 and a latch circuit 16. The DMA controller 6 is a cycle counter control unit for setting and counting transfer cycles in addition to the address control unit including the address counter 14 or I / O (input / output) when in the DMA activated state. In order to execute the DMA processing based on the data transfer request from the control unit 18,
A timing control unit for issuing a bus release request (BUS REQUEST) to the CPU 1 is provided, and in the present embodiment, the arrangement changing circuit 9 shown in FIG. 2 is provided. The array changing circuit 9 of the DMA controller 6 is connected to the reading device 7 via a register 10 and a serial / parallel converter 11 provided in the I / O control unit 18, and also has a register 12 and a parallel / serial converter 19. It is connected to the personal computer 13 via the register and to the recording device 8 via the register 20. In addition,
The I / O control unit 18 includes registers for other input devices, but the description thereof is omitted here.
The array changing circuit 9 is connected to a latch circuit 17 that latches the array changing instruction data D2 output from the CPU 1. The EXOR circuit 15 and the latch circuit 16 in the address control unit function as an arrangement changing circuit.

【0022】RAM3は、種々の演算、制御などを実行
する際のデータの一時的な記憶装置として機能する。R
OM2は、種々のプログラムを記憶し、CPU1はそれ
らのプログラムを実行することにより種々の処理を実行
する。DMAコントローラ6におけるアドレスカウンタ
14は、DMA起動時にCPU1から与えられたスター
トアドレスを始点に、アドレス値をカウントしてRAM
3のアドレスを指定するアドレス信号A0−A23 を出力す
る。CPU1は、DMA起動信号Sd を送出することに
より、DMAコントローラ6を起動するに先立って、バ
イト転送用の配列変更指示データD1 をラッチ回路16
へ供給する。配列変更指示データD1 は、配列変更を伴
うバイト転送を行う場合には「1」となり、ワード転送
を行う場合、若しくは、配列変更を伴わないバイト転送
を行う場合には「0」となる。ラッチ回路16は、この
配列変更指示データD1 をラッチし、EXOR回路15
へ供給する。EXOR回路15は、ラッチ回路16の出
力及びアドレス信号の最下位バイトであるA0の排他的論
理和を演算し、RAM3へアドレス信号A0として供給す
る。なお、アドレス信号A1−A23 は、アドレスカウンタ
14から直接RAM3へ供給される。
The RAM 3 functions as a temporary storage device for data when executing various calculations and controls. R
The OM 2 stores various programs, and the CPU 1 executes various programs by executing these programs. The address counter 14 in the DMA controller 6 counts the address value starting from the start address given by the CPU 1 at the time of starting the DMA, and RAM
The address signals A0-A23 designating the address 3 are output. The CPU 1 sends the DMA activation signal Sd to activate the array change instruction data D1 for byte transfer before the DMA controller 6 is activated.
Supply to The array change instruction data D1 becomes "1" when byte transfer is performed with array change, and is "0" when word transfer is performed or byte transfer without array change is performed. The latch circuit 16 latches the arrangement change instruction data D1 and the EXOR circuit 15
Supply to The EXOR circuit 15 calculates the exclusive OR of the output of the latch circuit 16 and A0 which is the least significant byte of the address signal, and supplies it to the RAM 3 as the address signal A0. The address signals A1-A23 are directly supplied from the address counter 14 to the RAM 3.

【0023】また、CPU1は、DMAコントローラ6
を起動するに先立ってワード転送用の配列変更指示デー
タD2 をラッチ回路17に供給する。配列変更指示データ
D2は、配列変更を伴うワード転送を行う場合には
「1」となり、バイト転送を行う場合、若しくは、配列
変更を伴わないワード転送を行う場合には「0」とな
る。ラッチ回路17は、この配列変更データD2 をラッ
チし、選択信号Ss として配列変更回路9へ供給する。
The CPU 1 also includes a DMA controller 6
Prior to activating, the array change instruction data D2 for word transfer is supplied to the latch circuit 17. The array change instruction data D2 is "1" when word transfer is performed with array change, and is "0" when byte transfer is performed or word transfer without array change is performed. The latch circuit 17 latches the arrangement change data D2 and supplies it to the arrangement change circuit 9 as a selection signal Ss.

【0024】記録装置8は、ファクシミリに設けられた
プリンタ部であり、モデム20により受信したデータ、
或いは読取装置7から出力されたデータ等をDMAコン
トローラ6、I/O制御部18のレジスタ部20を介し
て受け取り、記録紙に記録する。なお、記録装置8は、
前述のようにインテル系のCPUに対応して設計されて
いるので、DMA転送を行う際にデータ配列の変更は必
要としない。
The recording device 8 is a printer unit provided in the facsimile, and receives data received by the modem 20.
Alternatively, the data output from the reading device 7 is received via the DMA controller 6 and the register unit 20 of the I / O control unit 18, and recorded on a recording sheet. The recording device 8 is
Since it is designed for the Intel CPU as described above, it is not necessary to change the data array when performing the DMA transfer.

【0025】一方、読取装置7は、送信原稿を読み取る
装置であり、読み取られたデータはI/O制御部18の
シリアル/パラレル変換器11によりパラレルデータに
変換され、レジスタ10に一時的に記憶された後、配列
変更回路9へ入力される。また、パソコン13は、モデ
ム20により受信されたデータを内部のメモリに記憶す
るために使用される。なお、パソコンに記憶されたデー
タは必要に応じて記録装置により印刷を行う等の処理を
行うために読み出すことができるが、本実施形態では説
明の便宜上パソコンへ13へのデータ転送のみについて
説明する。パソコン13と配列変更回路9との間には、
データを一時的に記憶するためのレジスタ12及びパラ
レル/シリアル変換器19が設けられている。なお、前
述のように、読取装置7及びパソコン13の入出力制御
はともにモトローラ系のCPUに対応して設計されてお
り、CPU1はそのままのデータ配列で処理をすること
ができないため、配列変更回路9を介してデータの入出
力を行う際に配列変更を行う必要がある。
On the other hand, the reading device 7 is a device for reading a transmission original, and the read data is converted into parallel data by the serial / parallel converter 11 of the I / O control unit 18 and temporarily stored in the register 10. Then, it is input to the array changing circuit 9. The personal computer 13 is also used to store the data received by the modem 20 in the internal memory. Note that the data stored in the personal computer can be read out to perform processing such as printing by the recording device as necessary, but in the present embodiment, only data transfer to the personal computer 13 will be described for convenience of explanation. . Between the personal computer 13 and the array changing circuit 9,
A register 12 for temporarily storing data and a parallel / serial converter 19 are provided. As described above, the input / output control of the reading device 7 and the personal computer 13 are both designed to correspond to the CPU of the Motorola system, and the CPU 1 cannot process the data array as it is. When inputting / outputting data via 9, it is necessary to change the array.

【0026】配列変更回路9の具体的な構成を図2 に示
す。図示のように、配列変更回路9は、レジスタ10に
接続されたセレクタ21と、レジスタ12、20に接続
されたセレクタ22と、バス4に接続されたバッファ部
23とを備える。セレクタ21の入力端子X0−X15 に
は、読取装置7からの16ビットのデータがそのまま入
力されており、入力端子Y0−Y15 には読取装置7からの
16ビットのデータの上位8 ビットと下位8ビットが入
れ換えられて入力されている。セレクタ21は、ラッチ
回路17から供給される選択信号Ss が「1」の場合に
は入力端子Y0−Y15 の入力を出力し、選択信号が「0」
の場合には入力端子X0−X15 の入力を出力する。また、
セレクタ22の入力端子X0−X15 には、バス4からの1
6ビットのデータがそのまま入力されており、入力端子
Y0−Y15 にはバス4からの16ビットのデータの上位8
ビットと下位8ビットが入れ換えられて入力されてい
る。セレクタ22は、選択信号Ss が「1」の場合には
入力端子Y0−Y15 の入力を出力し、選択信号が「0」の
場合には入力端子X0−X15 の入力を出力する。
A concrete configuration of the array changing circuit 9 is shown in FIG. As illustrated, the array changing circuit 9 includes a selector 21 connected to the register 10, a selector 22 connected to the registers 12 and 20, and a buffer unit 23 connected to the bus 4. The 16-bit data from the reader 7 is directly input to the input terminals X0-X15 of the selector 21, and the upper 8 bits and the lower 8 bits of the 16-bit data from the reader 7 are input to the input terminals Y0-Y15. Bits are swapped and input. When the selection signal Ss supplied from the latch circuit 17 is "1", the selector 21 outputs the input of the input terminals Y0-Y15, and the selection signal is "0".
In case of, the input of the input terminals X0-X15 is output. Also,
1 from the bus 4 is connected to the input terminals X0-X15 of the selector 22.
6-bit data is input as is, input terminal
Y0-Y15 have the upper 8 bits of 16-bit data from bus 4.
Bits and lower 8 bits are exchanged and input. The selector 22 outputs the input of the input terminals Y0-Y15 when the selection signal Ss is "1", and outputs the input of the input terminals X0-X15 when the selection signal is "0".

【0027】次に、具体的な動作について説明する。ま
ず、I/O制御部18は、各種の入出力装置(読取装置
7、パソコン13、記録装置8など)が所定の動作を開
始するに伴って、データをDMA転送によりRAM3に
転送したり、或いは、その逆にRAM3からデータを受
け取ったりする場合、CPU1に対して割込み信号を出
力することによりDMAの起動を要求する。すると、C
PU1は、予めプログラムされている所定の割り込み処
理を実行することによって、DMA転送を開始すべきR
AM3のスタートアドレス(先頭番地)、転送サイクル
数、さらには転送モード等をDMAコントローラ6に送
り、アドレスカウンタ14及びサイクルカウンタを所定
値に設定したりして、DMA転送のための準備動作を行
う。その後、CPU1は、DMAコントローラ6に対し
てDMA起動信号Sd を出力する。なお、このDMA起
動信号Sd を始めとして、CPU1からDMAコントロ
ーラ6に対して出力される各信号は、バス4を介して供
給されるものであるが、図1では信号の流れを容易に理
解できるようにするためバス4と区別して表示してい
る。
Next, a specific operation will be described. First, the I / O controller 18 transfers data to the RAM 3 by DMA transfer as various input / output devices (reading device 7, personal computer 13, recording device 8, etc.) start predetermined operations. Alternatively, on the contrary, when receiving data from the RAM 3, the CPU 1 is requested to start the DMA by outputting an interrupt signal. Then C
PU1 should start DMA transfer by executing a predetermined interrupt process programmed in advance.
The start address (start address) of AM3, the number of transfer cycles, the transfer mode, etc. are sent to the DMA controller 6, and the address counter 14 and the cycle counter are set to predetermined values to perform a preparatory operation for DMA transfer. . After that, the CPU 1 outputs the DMA activation signal Sd to the DMA controller 6. It should be noted that each signal output from the CPU 1 to the DMA controller 6 including the DMA start signal Sd is supplied via the bus 4, but the signal flow can be easily understood in FIG. In order to do so, it is displayed separately from the bus 4.

【0028】DMA起動信号Sd に基づいて起動状態と
なったDMAコントローラ6は、その後、I/O制御部
18からデータ転送のリクエストがある都度、CPU1
に対してバス4の開放要求(BUS REQUEST )を出し、C
PU1からバスを開放した旨の応答信号(BUS ACKNOWLE
DGE )があるのに基づいて、DMA処理を1サイクルず
つ順次実行する。具体的には、アドレスカウンタ14に
よって指定されるRAM3のアドレス部分に格納されて
いるデータをI/O制御部18の所定のレジスタに転送
し、或いは、I/O制御部18の所定のレジスタに格納
されているデータをアドレスカウンタ14によって指定
されるRAM3のアドレス部分に書き込む。そして、一
回のデータ転送が終了する毎にアドレスカウンタ14の
カウント値を進めるとともに、サイクルカウンタをデク
リメントする。以下、同様の動作を繰り返し、サイクル
カウンタの値が「0」になった時点でDMAの処理を終
了する。
The DMA controller 6, which has been activated based on the DMA activation signal Sd, then receives a data transfer request from the I / O controller 18 and then the CPU 1
Issue a bus 4 release request (BUS REQUEST) to C
Response signal (BUS ACKNOWLE) indicating that the bus was released from PU1.
DGE), DMA processing is sequentially executed one cycle at a time. Specifically, the data stored in the address portion of the RAM 3 designated by the address counter 14 is transferred to a predetermined register of the I / O control unit 18, or is transferred to a predetermined register of the I / O control unit 18. The stored data is written in the address portion of the RAM 3 designated by the address counter 14. Then, every time one data transfer is completed, the count value of the address counter 14 is advanced and the cycle counter is decremented. Thereafter, the same operation is repeated, and when the value of the cycle counter becomes “0”, the DMA processing is ended.

【0029】ところで、制御装置100が行うDMAに
よるデータ転送としては、ワード転送とバイト転送があ
る。ワード転送とは目的のデータを1ワード(2バイ
ト)毎に転送する方法であり、バイト転送とは目的のデ
ータを1バイト毎に転送する方法である。制御装置10
0は、いずれの転送方法を行うかによって動作が異な
る。
By the way, as the data transfer by the DMA performed by the control device 100, there are word transfer and byte transfer. Word transfer is a method of transferring target data for each word (2 bytes), and byte transfer is a method of transferring target data for each byte. Control device 10
The operation of 0 differs depending on which transfer method is used.

【0030】まず、ワード転送時の動作について説明す
る。配列変更を伴うワード転送時には、CPU1はDM
Aコントローラ6を起動する(起動信号Sd を送る)前
に、配列変更指示データD1 を「0」とし、配列変更指
示データD2 を「1」とする。これにより、ラッチ回路
16は「0」をラッチし、ラッチ回路17は「1」をラ
ッチする。この場合、配列変更指示データD1 は「0」
であるので、EXOR回路15はアドレスカウンタ14が出
力するアドレス信号A0をそのままRAMに供給する。よ
って、後述するRAM3のアドレスの変換は行われな
い。
First, the operation during word transfer will be described. During word transfer with array change, CPU1 DM
Before activating the A controller 6 (sending the activation signal Sd), the array change instruction data D1 is set to "0" and the array change instruction data D2 is set to "1". As a result, the latch circuit 16 latches "0" and the latch circuit 17 latches "1". In this case, the array change instruction data D1 is "0".
Therefore, the EXOR circuit 15 supplies the address signal A0 output from the address counter 14 to the RAM as it is. Therefore, the conversion of the address of RAM3 described later is not performed.

【0031】まず、この状態で、例えば読取装置7によ
って読み取ったデータをDMAによりRAM3に転送す
る場合を考える。この場合、ラッチ回路17は「1」を
ラッチしているので、同ラッチ回路17は「1」の選択
信号Ss を配列変更回路9のセレクタ21及び22に供
給する。読取装置7は、送信原稿をラインイメージセン
サにより読み取り、所定のしきい値を用いて2値化して
例えば図3に示すような読み取りデータを生成して出力
する。シリアル/パラレル変換器11は、この読み取り
データを16ビット単位のパラレルデータに変換する。
レジスタ10はこれを一時的に記憶し、DMA実行時に
配列変更回路9へ供給する。配列変更回路9では、選択
信号Ss が「1」であることから、セレクタ21が入力
端子Y0−Y15 の入力データを出力する。入力端子Y0−Y1
5 には、読み取りデータXD0 −XD15が、上位バイトと下
位バイトが入れ換えられた形で入力されているので、配
列変更回路9は、上位バイトと下位バイトが入れ換えら
れた読み取りデータをDMAコントローラ6を介してバ
ス4へ供給する。コントローラ6は、開放されたバス4
を利用して該読み取りデータをRAM3へ転送する。こ
のようにしてRAM3内に記憶された読取データは上位
バイトと下位バイトが入れ換えられているので、CPU
1はワード単位で内部レジスタにデータを取り込み、演
算とうの処理を行う場合に正しい演算を行うことができ
る。
First, in this state, consider a case where the data read by the reading device 7 is transferred to the RAM 3 by DMA. In this case, since the latch circuit 17 latches "1", the latch circuit 17 supplies the selection signal Ss of "1" to the selectors 21 and 22 of the arrangement changing circuit 9. The reading device 7 reads the transmission document with a line image sensor, binarizes it using a predetermined threshold value, and generates and outputs read data as shown in FIG. 3, for example. The serial / parallel converter 11 converts this read data into parallel data in 16-bit units.
The register 10 temporarily stores this and supplies it to the array changing circuit 9 during DMA execution. In the array changing circuit 9, since the selection signal Ss is "1", the selector 21 outputs the input data of the input terminals Y0-Y15. Input terminal Y0-Y1
Since the read data XD0 to XD15 are input to 5 in a form in which the upper byte and the lower byte are exchanged, the array changing circuit 9 transfers the read data in which the upper byte and the lower byte are exchanged to the DMA controller 6. Supply to the bus 4 via. The controller 6 uses the opened bus 4
Is used to transfer the read data to the RAM 3. Since the upper byte and the lower byte of the read data stored in the RAM 3 in this way are exchanged,
In the case of 1, the data can be fetched in the internal register in units of words, and the correct operation can be performed when performing the operation.

【0032】次に、CPU1により何らかの処理が施さ
れたRAM3内のデータをDMAによりパソコン13へ
転送する処理について説明する。この場合は、CPU1
による処理後のデータであるので、CPU1に対応した
データ配列でRAM3内に記憶されていることになる。
この場合も、配列を変更する必要があるのでCPU1は
配列変更指示データD1 を「0」、配列変更指示データ
D2 を「1」として、DMA起動信号Sd を出力する。
従って、配列変更回路9内のセレクタ21には、「1」
の選択信号Ss が供給されることになる。DMAコント
ローラ6は、開放されたバス4を利用してDMAにより
RAM3内のデータを読み出し、そのデータを配列変更
回路9に供給する。配列変更回路9内のセレクタ22
は、選択信号「1」を入力されているので、入力端子Y0
−Y15 の入力信号、即ち、RAM3からの出力データの
上位バイトと下位バイトが入れ替えられたデータをレジ
スタ12へ出力する。レジスタ12は、このデータを一
時的に保持し、パラレル/シリアル変換器19によりシ
リアルデータに変換してパソコンへ供給する。なお、こ
の場合、パソコン13へはシリアルインターフェースを
介してデータが供給される。このように、CPU1の処
理が施されたRAM3内のデータはインテル系のCPU
1に対応したデータ配列を有しているが、モトローラ系
のCPUに対応して制御系が設計されたパソコン13へ
入力される前に、配列変更回路により上位バイトと下位
バイトの入れ換えが行われる。従って、パソコン13で
は、自己のシステム設計に適合した配列のデータを受け
取ることになり、正しい処理を行うことが可能となる。
Next, the process of transferring the data in the RAM 3 which has been processed by the CPU 1 to the personal computer 13 by DMA will be described. In this case, CPU1
Since it is the data after the processing by, the data array corresponding to the CPU 1 is stored in the RAM 3.
In this case as well, since it is necessary to change the arrangement, the CPU 1 sets the arrangement change instruction data D1 to "0" and the arrangement change instruction data D2 to "1" and outputs the DMA start signal Sd.
Therefore, the selector 21 in the array changing circuit 9 is set to "1".
Will be supplied. The DMA controller 6 reads the data in the RAM 3 by DMA using the released bus 4 and supplies the data to the arrangement changing circuit 9. Selector 22 in array changing circuit 9
Input the selection signal "1", input terminal Y0
The input signal of -Y15, that is, the data in which the upper byte and the lower byte of the output data from the RAM 3 are exchanged, is output to the register 12. The register 12 temporarily holds this data, converts it into serial data by the parallel / serial converter 19 and supplies it to the personal computer. In this case, the data is supplied to the personal computer 13 via the serial interface. In this way, the data in the RAM 3 processed by the CPU 1 is the CPU of the Intel system.
Although it has a data array corresponding to 1, the upper order byte and the lower order byte are exchanged by the array changing circuit before being input to the personal computer 13 in which the control system is designed corresponding to the Motorola CPU. . Therefore, the personal computer 13 receives the data of the array suitable for its own system design, and the correct processing can be performed.

【0033】一方、RAM3内のデータをDMAにより
記録装置8へ転送する場合には、CPU1は配列変更指
示データD1 、D2 をいずれも「0」として、DMAコ
ントローラ6にDMA起動信号Sd を出力する。従っ
て、配列変更回路9内のセレクタ22には、「0」の選
択信号Ss が供給されるので、入力端子X0−X15 の入力
信号、即ち、RAM3からの出力データがそのままの配
列でレジスタ20に格納されることになり、データの上
位バイトと下位バイトの入れ換えは行われない。これ
は、前述のように、記録装置の制御系は、CPU1と同
じインテル系のCPUに対応して設計されているため、
データの配列変更が不要だからである。従って、バス4
を利用してDMAコントローラ6により転送されたデー
タは、RAM3に格納されていた配列のままで記録装置
8へ供給される。以上のようにして、DMAによるRA
M3と読取り装置7、パソコン13又は記録装置8との
間のデータ転送が行われる。
On the other hand, when the data in the RAM 3 is transferred to the recording device 8 by DMA, the CPU 1 sets the arrangement change instruction data D1 and D2 to "0" and outputs the DMA start signal Sd to the DMA controller 6. . Therefore, since the selector 22 in the array changing circuit 9 is supplied with the selection signal Ss of "0", the input signals of the input terminals X0-X15, that is, the output data from the RAM 3 are stored in the register 20 in the same array. It will be stored, and the upper byte and the lower byte of the data are not exchanged. This is because the control system of the recording apparatus is designed to correspond to the same Intel CPU as the CPU 1, as described above.
This is because it is unnecessary to change the data arrangement. Therefore, bus 4
The data transferred by the DMA controller 6 by utilizing the above is supplied to the recording device 8 with the arrangement stored in the RAM 3 as it is. As described above, RA by DMA
Data transfer between the M3 and the reading device 7, the personal computer 13 or the recording device 8 is performed.

【0034】続いて、バイト転送時の動作を説明する。
バイト転送時には、16ビット(2バイト)のデータの
うち、上位又は下位の1バイトを単位としてデータが転
送される。よって、配列変更回路9を利用して上位バイ
トと下位バイトのデータを入れ換えるのではなく、1バ
イトのデータはそのままのビット配列で転送することと
し、RAM3内の書き込み又は読み出しアドレスの入れ
替え、具体的には奇数アドレスと偶数アドレスとの入れ
替えを行ってやる。このアドレスの入れ替えを行うのが
EXOR回路15である。即ち、アドレスの配列変更を
伴うバイト転送時には、CPU1は、DMAコントロー
ラ6を起動する前に配列変更指示データD1 を「1」と
し、配列変更指示データD2 を「0」とする。これによ
り、ラッチ回路16は「1」をラッチし、ラッチ回路1
7は「0」をラッチする。よって、ラッチ回路17は、
「0」の選択信号Ss を配列変更回路9に供給するの
で、配列変更回路9は転送データの上位バイトと下位バ
イトの入れ換えを行わず、そのままデータを出力する。
一方、ラッチ回路16の出力は「1」であるので、EXO
R回路15はアドレスカウンタ14が出力するアドレス
信号A0を反転させてRAM3へ供給する。図4(A)か
ら分かるように、アドレス信号の最下位ビットA0を反転
させると、アドレスカウンタ14によって指定するアド
レスは奇数アドレスが偶数アドレスに、偶数アドレスが
奇数アドレスに入れ替わることになる。よって、RAM
3はアドレスカウンタ14により指定されたDMA転送
のスタートアドレスが、例えば「n番地」であるとする
と、「n+1番地」、「n番地」、「n+3番地」、
「n+2番地」の順で、データの書き込み又は読み出し
が行われることになる。
Next, the operation during byte transfer will be described.
At the time of byte transfer, of 16-bit (2-byte) data, the data is transferred in units of the upper or lower 1 byte. Therefore, the data of the upper byte and the data of the lower byte are not exchanged by using the arrangement changing circuit 9, but the data of 1 byte is transferred with the bit arrangement as it is, and the write or read address in the RAM 3 is exchanged. Will replace the odd address with the even address. The EXOR circuit 15 exchanges the addresses. That is, at the time of byte transfer accompanied by address array change, the CPU 1 sets the array change instruction data D1 to "1" and the array change instruction data D2 to "0" before activating the DMA controller 6. As a result, the latch circuit 16 latches “1” and the latch circuit 1
7 latches "0". Therefore, the latch circuit 17
Since the selection signal Ss of "0" is supplied to the array changing circuit 9, the array changing circuit 9 outputs the data as it is without exchanging the upper byte and the lower byte of the transfer data.
On the other hand, since the output of the latch circuit 16 is "1", the EXO
The R circuit 15 inverts the address signal A0 output from the address counter 14 and supplies it to the RAM 3. As can be seen from FIG. 4A, when the least significant bit A0 of the address signal is inverted, the addresses designated by the address counter 14 are replaced with odd addresses by even addresses and even addresses by odd addresses. Therefore, RAM
3, the start address of the DMA transfer designated by the address counter 14 is, for example, "address n", "n + 1 address", "n address", "n + 3 address",
Data is written or read in the order of "n + 2 address".

【0035】I/O制御部18に接続された読取装置7
以外の読取装置から1バイト毎に入力されるデータは、
配列変更回路9に入力され、DMAコントローラ6は開
放されたバス4を利用してRAM3へデータの転送を行
う。ここで、アドレス信号A0が反転されているので、該
データは奇数アドレスと偶数アドレスへの書き込み順序
が入れ替わって書き込まれる。従って、CPU1がその
データをワード単位で内部レジスタに取り込み、演算等
の処理を行う場合に、モトローラ系CPUに対して設計
された入力装置からのデータをもとに、正しいデータ処
理を行うことができる。一方、CPU1が演算等を行っ
た結果のデータをワード、バイト単位で所定の出力装置
へDMA転送する場合には、DMAコントローラ6は奇
数アドレスと偶数アドレスとが入れ替わった順序でRA
M3からデータを読み出し、所定の出力装置へ出力す
る。従って、読み出されたデータは、モトローラ系CP
Uに対応して設計された出力装置の制御系のデータ配列
と適合する。なお、インテル系CPUに設計されたその
他の出力装置に対してDMA転送を行う転送の場合は、
CPU1は並列変更指示データD1 、D2 いずれもを
「0」とするので、EXOR回路15によるアドレスの
入れ替えは行われず、CPU1がRAM3に書き込んだ
データ配列のまま一バイト単位で出力装置へ転送され
る。例えば、図4(A)の例では、「n番地」、「n+
1番地」、「n+2番地」、「n+3番地」の順にデー
タ転送される。
Reader 7 connected to I / O controller 18
The data input from every other reading device is 1 byte.
The data is input to the array changing circuit 9, and the DMA controller 6 uses the released bus 4 to transfer data to the RAM 3. Here, since the address signal A0 is inverted, the data is written by changing the writing order to the odd address and the even address. Therefore, when the CPU 1 fetches the data in word units into the internal register and performs processing such as calculation, correct data processing can be performed based on the data from the input device designed for the Motorola CPU. it can. On the other hand, when the data resulting from the operation of the CPU 1 is DMA-transferred in units of words or bytes to a predetermined output device, the DMA controller 6 RAs in the order in which odd addresses and even addresses are exchanged.
The data is read from M3 and output to a predetermined output device. Therefore, the read data is the Motorola CP
It is compatible with the data array of the control system of the output device designed corresponding to U. In the case of transfer that performs DMA transfer to other output devices designed for Intel CPUs,
Since the CPU 1 sets both the parallel change instruction data D1 and D2 to "0", the EXOR circuit 15 does not exchange the addresses, and the data array written in the RAM 3 by the CPU 1 is transferred to the output device in byte units. . For example, in the example of FIG. 4A, "n address", "n +"
Data is transferred in the order of "1st address", "n + 2th address", and "n + 3th address".

【0036】以上説明したように、本発明によれば、D
MAによるワード転送時には配列変更回路9によってデ
ータの上位バイトと下位バイトを入れ換えることができ
るので、読取装置7及びパソコン13等の入出力装置の
制御系がCPU1と異なるタイプのCPUに対応するデ
ータ配列でデータを扱うように設計されている場合で
も、CPU1によりそのような配列のデータを処理する
ことが可能となる。また、DMAによるバイト転送の場
合には、EXOR回路15によってRAM3のアドレス
を入れ替えることができるので、1バイト単位のデータ
を奇数アドレスと偶数アドレスとに書き込む或いは読み
出す順序が入れ替わってデータ転送が行われることにな
り、同様に異なるCPUに対応した配列のデータの処理
が可能となる。従って、すでに設計されたシステムを部
分的に組合せて使用して新たなシステムを構成する際
に、異なるタイプのCPUを使用する場合でも、新たに
システム全体の設計やソフトウェアの開発を行う必要が
なくなる。その結果、既存のシステムを利用して効率的
に新たなシステムを構成することが可能となる。
As described above, according to the present invention, D
Since the upper byte and the lower byte of the data can be exchanged by the array changing circuit 9 during the word transfer by the MA, the control system of the input / output device such as the reading device 7 and the personal computer 13 corresponds to the CPU of the type different from the CPU 1. Even if it is designed to handle data in, the CPU 1 can process the data in such an array. Further, in the case of byte transfer by DMA, since the addresses of the RAM 3 can be exchanged by the EXOR circuit 15, the data transfer is performed by exchanging the order of writing or reading 1-byte unit data to the odd address and the even address. As a result, similarly, it becomes possible to process the data of the array corresponding to different CPUs. Therefore, when a new system is configured by partially combining already designed systems, it is not necessary to newly design the entire system or develop software even when using different types of CPUs. . As a result, it becomes possible to efficiently construct a new system using the existing system.

【0037】なお、上述の実施形態では、CPUのタイ
プが一致する記録装置8等の入出力装置についても配列
変更回路9介してDMA転送を行うようにしているが、
これに限定されることなく、例えば、CPUのタイプが
一致する入出力装置に対しては配列変更回路9を介在さ
せることなくDMA転送を行う回路構成としてもよい。
In the above-mentioned embodiment, the DMA transfer is also performed through the arrangement changing circuit 9 for the input / output devices such as the recording device 8 having the same CPU type.
Without being limited to this, for example, a circuit configuration may be adopted in which DMA transfer is performed for the input / output device having the same CPU type without interposing the arrangement changing circuit 9.

【0038】[0038]

【発明の効果】請求項1記載の発明によれば、例えば、
入出力部が制御部のCPUと異なるCPUに対応して設
計されている場合に、配列変更回路がデータ配列の変更
をするので、異なるCPUに対応して設計されたシステ
ムを一体化して新たなシステムを容易に構成することが
可能となる。
According to the invention of claim 1, for example,
When the input / output unit is designed to correspond to a CPU different from the CPU of the control unit, the arrangement changing circuit changes the data arrangement. Therefore, a system designed to correspond to a different CPU is integrated into a new one. The system can be easily configured.

【0039】また、請求項2及び3記載の発明によれ
ば、配列変更回路はデータの上位数ビットと下位数ビッ
トを入れ換えるのみであるので、簡易な回路でデータ配
列の変更が可能となる。
According to the second and third aspects of the present invention, the arrangement change circuit only changes the high-order several bits and the low-order few bits of the data, so that the data arrangement can be changed with a simple circuit.

【0040】また、請求項4及び5記載の発明によれ
ば、配列変更回路はデータが書き込まれ又は読み出され
るメモリ上のアドレスを変更するのみであるので、単純
な構成で、しかも実際のデータに処理を施すことなくデ
ータ配列の変更が可能となる。
Further, according to the inventions of claims 4 and 5, the arrangement changing circuit only changes the address on the memory where the data is written or read, so that the arrangement is simple and the actual data is changed. The data array can be changed without any processing.

【0041】また、請求項6記載の発明によれば、メモ
リからCPU内部のレジスタにワード単位でデータを取
り込む場合に、上位バイトと下位バイトの配列が入れ替
わって取り込まれる場合であっても、上位バイトと下位
バイトのデータ配列が変更されるので、CPU内で正し
い演算を行うことが可能となる。
According to the sixth aspect of the present invention, when the data is fetched from the memory into the register inside the CPU in word units, even if the arrangement of the upper byte and the lower byte is interchanged, the higher order bytes are fetched. Since the data arrangement of the byte and the lower byte is changed, it becomes possible to perform a correct operation in the CPU.

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

【図1】本発明の実施形態にかかるファクシミリ装置の
制御部の構成及び入出力装置との関係を示すブロック図
である。
FIG. 1 is a block diagram showing a configuration of a control unit of a facsimile apparatus according to an embodiment of the present invention and a relationship with an input / output device.

【図2】図1に示す配列変更回路の回路構成を示す図で
ある。
FIG. 2 is a diagram showing a circuit configuration of an array changing circuit shown in FIG.

【図3】RAMに転送されるデータの例を示す図であ
る。
FIG. 3 is a diagram showing an example of data transferred to a RAM.

【図4】RAMに転送されるデータの配置を示す図であ
る。
FIG. 4 is a diagram showing an arrangement of data transferred to a RAM.

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

1…CPU 3…RAM 5…モデム 6…DMAコントローラ 7…読取装置 8…記録装置 9…配列変更回路 13…パソコン 14…アドレスカウンタ 15…EXOR回路 21、22…セレクタ 1 ... CPU 3 ... RAM 5 ... Modem 6 ... DMA controller 7 ... Reading device 8 ... Recording device 9 ... Array changing circuit 13 ... Personal computer 14 ... Address counter 15 ... EXOR circuit 21, 22 ... Selector

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 CPU及びメモリを含む制御部と入出力
部との間でデータ転送を行うDMAコントローラにおい
て、 前記入出力部から出力されるデータを前記メモリに転送
し、前記メモリから読み出されたデータを前記入出力部
へ転送する転送回路を有し、 前記転送回路は、前記入出力部又は前記メモリから出力
されたデータの配列を変更する配列変更回路を有するこ
とを特徴とするDMAコントローラ。
1. A DMA controller for transferring data between a control unit including a CPU and a memory and an input / output unit, wherein data output from the input / output unit is transferred to the memory and read from the memory. A DMA controller that transfers the selected data to the input / output unit, and the transfer circuit includes an array changing circuit that changes an array of the data output from the input / output unit or the memory. .
【請求項2】 前記配列変更回路は、前記入出力部又は
前記メモリから出力されたデータの上位数ビットと下位
数ビットを入れ換えることを特徴とする前記請求項1記
載のDMAコントローラ。
2. The DMA controller according to claim 1, wherein the array changing circuit replaces the high-order few bits and the low-order few bits of the data output from the input / output unit or the memory.
【請求項3】 前記配列変更回路は、前記CPUから出
力される指定信号に基づいて、入力されるデータ又は前
記入力されるデータの上位数ビットと下位数ビットを入
れ換えたデータのいずれか一方を選択的に出力する選択
回路であることを特徴とする請求項2記載のDMAコン
トローラ。
3. The array changing circuit, based on a designation signal output from the CPU, either the input data or the data obtained by exchanging the high-order few bits and the low-order few bits of the input data. 3. The DMA controller according to claim 2, which is a selection circuit that selectively outputs.
【請求項4】 前記配列変更回路は、前記データをメモ
リに書き込むアドレス又は前記メモリから前記データを
読み出すアドレスを変更することを特徴とする請求項1
記載のDMAコントローラ。
4. The array changing circuit changes an address for writing the data in a memory or an address for reading the data from the memory.
The DMA controller described.
【請求項5】 前記配列変更回路は、前記CPUから出
力される指定信号に基づいて、前記メモリに供給される
アドレス信号の最下位ビットを反転させる回路であるこ
とを特徴とする請求項4記載のDMAコントローラ。
5. The arrangement changing circuit is a circuit for inverting a least significant bit of an address signal supplied to the memory based on a designation signal output from the CPU. DMA controller.
【請求項6】 前記CPUは、メモリからCPU内部の
レジスタにワード単位でデータを取り込む場合に、上位
バイトと下位バイトの配列が入れ替わって取り込まれる
方式のものであることを特徴とする請求項1乃至5のい
ずれかに記載のDMAコントローラ。
6. The CPU is of a system in which, when data is fetched from a memory into a register in the CPU in word units, the upper byte array and the lower byte array are interchanged and are fetched. 6. The DMA controller according to any one of 5 to 5.
JP12203296A 1996-05-16 1996-05-16 Dma controller Pending JPH09305530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12203296A JPH09305530A (en) 1996-05-16 1996-05-16 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12203296A JPH09305530A (en) 1996-05-16 1996-05-16 Dma controller

Publications (1)

Publication Number Publication Date
JPH09305530A true JPH09305530A (en) 1997-11-28

Family

ID=14825913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12203296A Pending JPH09305530A (en) 1996-05-16 1996-05-16 Dma controller

Country Status (1)

Country Link
JP (1) JPH09305530A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010287128A (en) * 2009-06-12 2010-12-24 Toshiba Corp Controller, storage medium and information control method
JP2011516978A (en) * 2008-04-01 2011-05-26 アップル インコーポレイテッド Central DMA with arbitrary processing function
US8566485B2 (en) 2005-09-29 2013-10-22 Apple Inc. Data transformation during direct memory access

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8566485B2 (en) 2005-09-29 2013-10-22 Apple Inc. Data transformation during direct memory access
JP2011516978A (en) * 2008-04-01 2011-05-26 アップル インコーポレイテッド Central DMA with arbitrary processing function
JP2010287128A (en) * 2009-06-12 2010-12-24 Toshiba Corp Controller, storage medium and information control method

Similar Documents

Publication Publication Date Title
US5423009A (en) Dynamic sizing bus controller that allows unrestricted byte enable patterns
CA1241766A (en) Communication controller using multiported random access memory
JP2001142842A (en) Dma handshake protocol
JPH0778773B2 (en) Communication device and method of using the communication device
JPH06175918A (en) Data processor
US4835684A (en) Microcomputer capable of transferring data from one location to another within a memory without an intermediary data bus
JP6602579B2 (en) Semiconductor device and system
US5845145A (en) System for generating and sending a critical-world-first data response packet by creating response packet having data ordered in the order best matching the desired order
JP2001092772A (en) Data bus to use synchronizing fixed latency loop
JP2001084229A (en) Simd-type processor
US20040068590A1 (en) Data processor
US6738837B1 (en) Digital system with split transaction memory access
JPH09305530A (en) Dma controller
US6681273B1 (en) High performance, variable data width FIFO buffer
KR960001023B1 (en) Bus sharing method and the apparatus between different bus
WO2001025941A1 (en) Multiprocessor computer systems with command fifo buffer at each target device
JPH0227696B2 (en) JOHOSHORISOCHI
CN115328832B (en) Data scheduling system and method based on PCIE DMA
JPH07271654A (en) Controller
JP2000099452A (en) Dma control device
JPH05282242A (en) Bus control system
JP2741514B2 (en) Multi CPU system
JPH1185673A (en) Method and device for controlling shared bus
EP1193606B1 (en) Apparatus and method for a host port interface unit in a digital signal processing unit
JP2687716B2 (en) Information processing device

Legal Events

Date Code Title Description
A977 Report on retrieval

Effective date: 20060208

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060214

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060711