JP2625573B2 - Direct memory access controller - Google Patents

Direct memory access controller

Info

Publication number
JP2625573B2
JP2625573B2 JP2316164A JP31616490A JP2625573B2 JP 2625573 B2 JP2625573 B2 JP 2625573B2 JP 2316164 A JP2316164 A JP 2316164A JP 31616490 A JP31616490 A JP 31616490A JP 2625573 B2 JP2625573 B2 JP 2625573B2
Authority
JP
Japan
Prior art keywords
address
signal
circuit
dma
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2316164A
Other languages
Japanese (ja)
Other versions
JPH04188355A (en
Inventor
正敏 中村
文勝 佐藤
寿行 和田
隆雄 内田
二郎 田沼
直司 阿久津
忠 笠井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2316164A priority Critical patent/JP2625573B2/en
Publication of JPH04188355A publication Critical patent/JPH04188355A/en
Application granted granted Critical
Publication of JP2625573B2 publication Critical patent/JP2625573B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、例えばシリアルプリンタにおいて、データ
の転送をダイレクトメモリアクセス(DMA)によって行
う場合に、DMA動作を停止することなくDMA動作中の任意
のタイミングでCPUメモリダイレクトアクセス動作を可
能とするダイレクトメモリアクセス制御装置に関するも
のである。
DETAILED DESCRIPTION OF THE INVENTION (Industrial application field) The present invention relates to a method for transferring data by direct memory access (DMA) in a serial printer without stopping the DMA operation. The present invention relates to a direct memory access control device which enables a CPU memory direct access operation at the timing of (1).

(従来の技術) 従来、シリアルプリンタにおいては、外部装置から送
られてくる情報をCPUのプログラムによって処理し、文
字情報に変換して印刷するようになっている。
(Prior Art) Conventionally, in a serial printer, information sent from an external device is processed by a program of a CPU, converted into character information, and printed.

第2図は従来のシリアルプリンタのブロック図であ
る。
FIG. 2 is a block diagram of a conventional serial printer.

図において、1は外部装置から送られてくる情報を受
信するとともに、必要に応じてシリアルプリンタから外
部装置へ情報を返信するインタフェース回路、2は上記
インタフェース回路1が受信した情報に基づいて、予め
記憶された処理手順、(例えば、CPU2aのプログラム)
によって情報を処理する制御回路であり、一般にCPU2
a、DMA制御回路2b等を備えている。
In the figure, reference numeral 1 denotes an interface circuit for receiving information sent from an external device and returning information from the serial printer to the external device as necessary. Stored processing procedure (for example, CPU2a program)
Is a control circuit that processes information according to
a, a DMA control circuit 2b and the like.

3はシリアルプリンタによって印刷すべき図形情報を
記憶する記憶回路(A)であり、一般に文字発生回路と
言われる。該記憶回路(A)3は、ROM、RAM、外部記憶
装置等で構成される。
Reference numeral 3 denotes a storage circuit (A) for storing graphic information to be printed by a serial printer, which is generally called a character generation circuit. The storage circuit (A) 3 includes a ROM, a RAM, an external storage device, and the like.

4は上記インタフェース回路1を介して受信した情報
に基づいて、上記制御回路2が編集した情報を一旦記憶
する記憶回路(B)であり、RAMで構成される。
Reference numeral 4 denotes a storage circuit (B) for temporarily storing information edited by the control circuit 2 based on information received via the interface circuit 1, and is configured by a RAM.

5はシリアルプリンタ機構部6を駆動する機構部制御
回路である。
Reference numeral 5 denotes a mechanism control circuit for driving the serial printer mechanism 6.

第3図は第2図の制御回路及び記憶回路のブロック図
である。
FIG. 3 is a block diagram of the control circuit and the storage circuit of FIG.

図において2aはCPU、7はCPU2aを駆動するためのプロ
グラムを格納したプログラムROM、8は命令解読・情報
編集回路部であり、命令解読・情報編集回路8aのほかDM
A制御回路2bを含む。そして、記憶回路(A)3から記
憶回路(B)4への情報の読出し及び書込み、又は記憶
回路(B)4内のエリア間の情報の転送はデータ転送な
どの単純作業が多いため、CPU2aを介さずDMA動作によっ
て行い、処理の高速化を図っている。
In the figure, 2a is a CPU, 7 is a program ROM storing a program for driving the CPU 2a, 8 is an instruction decoding / information editing circuit section, and in addition to the instruction decoding / information editing circuit 8a, DM
A control circuit 2b is included. Since reading and writing of information from the storage circuit (A) 3 to the storage circuit (B) 4 or transfer of information between areas in the storage circuit (B) 4 involves many simple operations such as data transfer, the CPU 2a The processing is performed by DMA operation without intervening to speed up the processing.

すなわち、記憶回路(A)3から読み出すべき情報の
記憶箇所(アドレス)、情報量(サイズ)、及び記憶回
路(B)4へ書き込むべき情報の記憶箇所(アドレス)
の指示だけをCPU2aから受け、それ以降はDMA制御回路2b
が独自に記憶回路(A)3から情報を読み出し、DMA転
送により記憶回路(B)4に情報を書き込む。また、記
憶回路(B)4内のエリア間での情報の転送も同様に行
う。
That is, the storage location (address) and information amount (size) of information to be read from the storage circuit (A) 3 and the storage location (address) of information to be written to the storage circuit (B) 4
From the CPU 2a, and after that, the DMA control circuit 2b
Independently reads information from the storage circuit (A) 3 and writes the information to the storage circuit (B) 4 by DMA transfer. The transfer of information between areas in the storage circuit (B) 4 is performed in the same manner.

(発明が解決しようとする課題) しかしながら、上記従来のダイレクトメモリアクセス
制御装置においては、DMA制御回路2bが一旦動作を開始
するとCPU2aの制御から離れるため、CPU2aの制御が必要
な場合、例えばインタフェース回路1においてCPU2aで
処理すべき情報が発生した場合には、DMA動作停止手段
によってDMA動作を一時中断させなければならない。
(Problems to be Solved by the Invention) However, in the above-described conventional direct memory access control device, once the DMA control circuit 2b starts operating, it is separated from the control of the CPU 2a. If the information to be processed by the CPU 2a occurs in 1, the DMA operation must be temporarily suspended by the DMA operation stopping means.

そして、処理を終了した後、CPU2aによりDMA制御回路
2bを再起動させるが、この再起動に必要な処理が複雑で
あり高速性を損なってしまう。
Then, after the processing is completed, the CPU 2a controls the DMA control circuit.
2b is restarted, but the processing required for this restart is complicated, and the speed is impaired.

本発明は、上記従来のダイレクトメモリアクセス制御
装置の問題点を解決して、CPUによる特別な処理を必要
とすることなく、DMA動作を停止させ、再起動すること
ができるダイレクトメモリアクセス制御装置を提供する
ことを目的とする。
The present invention solves the above-mentioned problems of the conventional direct memory access control device, and provides a direct memory access control device capable of stopping and restarting the DMA operation without requiring special processing by the CPU. The purpose is to provide.

(課題を解決するための手段) そのために、本発明のダイレクトメモリアクセス制御
装置において、CPUと、命令解読・情報編集回路と、印
刷するための図形情報を記憶する第1の記憶回路と、上
記命令解読・情報編集回路が編集した情報を一旦記憶す
る第2の記憶回路と、上記第1の記憶回路から第2の記
憶回路への情報の転送、及び第2の記憶回路内のエリア
間での情報の転送を行うDMA制御回路とを有する。
(Means for Solving the Problems) For this purpose, in the direct memory access control device of the present invention, a CPU, an instruction decoding / information editing circuit, a first storage circuit for storing graphic information for printing, A second storage circuit for temporarily storing information edited by the instruction decoding / information editing circuit, transfer of information from the first storage circuit to the second storage circuit, and between areas in the second storage circuit; And a DMA control circuit for transferring the information.

そして、上記DMA制御回路は、上記CPUによるメモリア
クセスの開始及び終了に伴って発生させられる制御信号
を検出して切換え信号を発生させ、かつ、アドレス更新
信号を選択的に発生させるタイミング発生回路、上記ア
ドレス更新信号を受けてDMAアドレスを更新するアドレ
ス発生回路、及び上記切換え信号を受けてCPUアドレス
とDMAアドレスとを切り換えるアドレスコントロール回
路を備える。
The DMA control circuit detects a control signal generated along with the start and end of the memory access by the CPU, generates a switching signal, and selectively generates an address update signal. An address generation circuit that updates the DMA address in response to the address update signal, and an address control circuit that switches between the CPU address and the DMA address in response to the switching signal.

(作用) 本発明によれば、上記のようにダイレクトメモリアク
セス制御装置においては、CPUと、命令解読・情報編集
回路と、印刷するための図形情報を記憶する第1の記憶
回路と、上記命令解読・情報編集回路が編集した情報を
一旦記憶する第2の記憶回路と、上記第1の記憶回路か
ら第2の記憶回路への情報の転送、及び第2の記憶回路
内のエリア間での情報の転送を行うDMA制御回路とを有
する。
(Operation) According to the present invention, in the direct memory access control device as described above, the CPU, the instruction decoding / information editing circuit, the first storage circuit for storing graphic information for printing, and the instruction A second storage circuit for temporarily storing the information edited by the decoding / information editing circuit, transfer of the information from the first storage circuit to the second storage circuit, and transfer between areas in the second storage circuit; A DMA control circuit for transferring information.

そして、上記DMA制御回路は、上記CPUによるメモリア
クセスの開始及び終了に伴って発生させられる制御信号
を検出して切換え信号を発生させ、かつ、アドレス更新
信号を選択的に発生させるタイミング発生回路、上記ア
ドレス更新信号を受けてDMAアドレスを更新するアドレ
ス発生回路、及び上記切換え信号を受けてCPUアドレス
とDMAアドレスとを切り換えるアドレスコントロール回
路を備える。
The DMA control circuit detects a control signal generated along with the start and end of the memory access by the CPU, generates a switching signal, and selectively generates an address update signal. An address generation circuit that updates the DMA address in response to the address update signal, and an address control circuit that switches between the CPU address and the DMA address in response to the switching signal.

この場合、第1、第2の記憶回路はDMA制御回路に接
続され、該DMA制御回路によって、第1の記憶回路から
第2の記憶回路への情報の転送、及び第2の記憶回路内
のエリア間での情報の転送が行われる。
In this case, the first and second storage circuits are connected to a DMA control circuit, and the DMA control circuit transfers information from the first storage circuit to the second storage circuit and stores information in the second storage circuit. Information is transferred between the areas.

また、上記DMA制御回路は、CPUがメモリアクセスを行
うために制御信号を出力すると、該制御信号を検出し、
DMA動作とCPU動作とを切り換える。
Further, the DMA control circuit, when the CPU outputs a control signal for performing memory access, detects the control signal,
Switches between DMA operation and CPU operation.

そして、DMA動作時に、タイミング発生回路は、アド
レス更新信号を発生させてアドレス発生回路に送り、該
アドレス発生回路は、アドレス更新信号を受けてDMAア
ドレスを更新する。
Then, at the time of DMA operation, the timing generation circuit generates an address update signal and sends it to the address generation circuit, and the address generation circuit receives the address update signal and updates the DMA address.

また、上記タイミング発生回路は、切換え信号を発生
させてアドレスコントロール回路に送り、該アドレスコ
ントロール回路は、切換え信号を受けてDMAアドレスを
選択し、第1の記憶回路から第2の記憶回路への情報の
転送、又は第2の記憶回路内のエリア間での情報の転送
を行う。
Further, the timing generation circuit generates a switching signal and sends it to an address control circuit. The address control circuit receives the switching signal, selects a DMA address, and transfers a DMA address from the first storage circuit to the second storage circuit. Transfer of information or transfer of information between areas in the second storage circuit is performed.

一方、CPU動作時に、タイミング発生回路がアドレス
更新信号を停止させると、アドレス発生回路はDMAアド
レスの更新を停止する。
On the other hand, when the timing generation circuit stops the address update signal during the operation of the CPU, the address generation circuit stops updating the DMA address.

また、上記タイミング発生回路は、切換え信号を発生
させてアドレスコントロール回路に送り、該アドレスコ
ントロール回路は、切換え信号を受けてCPUアドレスを
選択する。その結果、CPUによるメモリアクセスが行わ
れる。
Further, the timing generation circuit generates a switching signal and sends it to the address control circuit. The address control circuit receives the switching signal and selects a CPU address. As a result, memory access by the CPU is performed.

(実施例) 以下、本発明の実施例について図面を参照しながら詳
細に説明する。
(Example) Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

第1図は本発明の実施例を示すダイレクトメモリアク
セス制御装置のブロック図である。
FIG. 1 is a block diagram of a direct memory access control device showing an embodiment of the present invention.

図において、2aはCPU、7はプログラムROM、9は命令
解読・情報編集回路部、9aは命令解読・情報編集回路、
9bはDMA制御回路である。3は記憶回路(A)(以下「R
OM」と言う。)、4は記憶回路(B)(以下「RAM」と
言う。)、10はCPU2aと命令解読・情報編集回路部9間
のアドレス/データバス、11は命令解読・情報編集回路
部9とROM3とRAM4間のアドレス/データバスである。
In the figure, 2a is a CPU, 7 is a program ROM, 9 is an instruction decoding and information editing circuit, 9a is an instruction decoding and information editing circuit,
9b is a DMA control circuit. 3 is a memory circuit (A) (hereinafter referred to as “R
OM ". ), 4 is a storage circuit (B) (hereinafter referred to as "RAM"), 10 is an address / data bus between the CPU 2a and the instruction decoding / information editing circuit section 9, and 11 is the instruction decoding / information editing circuit section 9 and ROM3. Address / data bus between the RAM and the RAM4.

第4図は本発明のダイレクトメモリアクセス制御装置
のDMA制御回路ブロック図である。
FIG. 4 is a block diagram of a DMA control circuit of the direct memory access control device of the present invention.

図において、12は転送先アドレスカウンタ、13は転送
先アドレスカウンタ、14は転送バイト数カウンタ、15は
タイミング発生回路、16はアドレスコントロール回路で
ある。なお、転送元アドレスカウンタ12及び転送先アド
レスカウンタ13によってアドレス発生回路が構成され
る。
In the figure, 12 is a transfer destination address counter, 13 is a transfer destination address counter, 14 is a transfer byte number counter, 15 is a timing generation circuit, and 16 is an address control circuit. The source address counter 12 and the destination address counter 13 constitute an address generation circuit.

DMA動作及びCPU動作の切換え信号は、タイミング発生
回路15から出力され、ROM3,RAM4のアドレスコントロー
ルは、転送元アドレスカウンタ12、転送先アドレスカウ
ンタ13、転送バイト数カウンタ14及びアドレスコントロ
ール回路16において行われる。
The switching signal between the DMA operation and the CPU operation is output from the timing generation circuit 15, and the address control of the ROM 3 and the RAM 4 is performed by the transfer source address counter 12, the transfer destination address counter 13, the transfer byte number counter 14, and the address control circuit 16. Will be

第5図は本発明のダイレクトメモリアクセス制御装置
のアドレスコントロール回路ブロック図である。
FIG. 5 is a block diagram of an address control circuit of the direct memory access control device of the present invention.

図において、20はROMアドレスセレクタ、21はRAMアド
レスセレクタである。アドレスコントロール回路16に
は、CPUアドレス22、及び上記転送元アドレスカウンタ1
2から出力されるDMAアドレスとしての転送元アドレス2
3、並びに転送先アドレスカウンタ13から出力されるDMA
アドレスとしての転送先アドレス24がそれぞれ入力さ
れ、タイミング発生回路15から出力されるDMA制御信号
(DMASEL信号19,TRCH信号18)によって、ROM3,RAM4への
出力アドレスを選択する。
In the figure, reference numeral 20 denotes a ROM address selector, and reference numeral 21 denotes a RAM address selector. The address control circuit 16 has a CPU address 22 and the transfer source address counter 1 described above.
Transfer source address 2 as DMA address output from 2
3, and DMA output from the transfer destination address counter 13
A transfer destination address 24 is input as an address, and an output address to the ROM 3 and the RAM 4 is selected by a DMA control signal (DMASEL signal 19 and TRCH signal 18) output from the timing generation circuit 15.

また、第6図はタイミング発生回路内のDMA制御信号
発生回路のブロック図である。
FIG. 6 is a block diagram of a DMA control signal generation circuit in the timing generation circuit.

図において、CPU2aの回路から出力されるPSEN信号及
びALE信号のタイミングがフリップフロップFF1〜FF5の
入力条件となり、CLK信号に同期させた遅延タイミング
を各フリップフロップFF1〜FF5で発生させることによっ
て、各種DMA制御信号が出力される。
In the figure, the timing of the PSEN signal and the ALE signal output from the circuit of the CPU 2a is the input condition of the flip-flops FF1 to FF5, and the delay timing synchronized with the CLK signal is generated in each of the flip-flops FF1 to FF5. A DMA control signal is output.

次にダイレクトメモリアクセス制御装置の上記各回路
の動作をタイムチャートに基づいて説明する。
Next, the operation of each circuit of the direct memory access control device will be described based on a time chart.

第7図はタイミング発生回路のタイムチャートであ
る。
FIG. 7 is a time chart of the timing generation circuit.

CPU2aは、プログラムROM7に書かれた手順に従って、
インタフェース回路1(第2図参照)を介して外部装置
から入力された情報の処理を行う。DMA動作が要求され
ると、CPU2aは、RAM4内に割り当てられた転送先アドレ
ス24、ROM3(例えば、文字パターン発生ROM)内の転送
される文字の転送元アドレス23、及び転送量(転送バイ
ト数)を算出し、各セット値をDMA制御回路9b内の第4
図に示す転送元アドレスカウンタ12、転送先アドレスカ
ウンタ13、及び転送バイト数カウンタ14にそれぞれセッ
トする。
CPU 2a follows the procedure written in program ROM 7
It processes information input from an external device via the interface circuit 1 (see FIG. 2). When the DMA operation is requested, the CPU 2a determines the transfer destination address 24 allocated in the RAM 4, the transfer source address 23 of the character to be transferred in the ROM 3 (for example, a character pattern generation ROM), and the transfer amount (the number of transfer bytes). ) Is calculated, and each set value is set to the fourth value in the DMA control circuit 9b.
These are set in the transfer source address counter 12, the transfer destination address counter 13, and the transfer byte number counter 14 shown in FIG.

その後、CPU2aが制御信号としてのPSEN信号及びALE信
号を発生させると、DMA制御回路9bは、PSEN信号及びALE
信号を検出し、命令解読・情報編集回路部9とROM3及び
RAM4との間でアドレス/データバス11を介してDMA動作
を開始する。このとき、CPU2aは、CPUアドレス/データ
バス10を介して独自にプログラムROM7へのアクセスを行
う。
Thereafter, when the CPU 2a generates a PSEN signal and an ALE signal as control signals, the DMA control circuit 9b transmits the PSEN signal and the ALE signal.
The signal is detected, the instruction decoding / information editing circuit unit 9 and the ROM 3 and
A DMA operation is started with the RAM 4 via the address / data bus 11. At this time, the CPU 2a independently accesses the program ROM 7 via the CPU address / data bus 10.

DMA動作には、ROM3からRAM4に情報の転送を行う場合
(以下「ROM→RAM転送」という。)と、RAM4内のエリア
間で情報の転送を行う場合(以下「RAM→RAM転送」とい
う。)とがある。DMA動作時において、ROM3及びRAM4はC
PU2aを介することなく制御され、DMA制御回路9bのタイ
ミング発生回路15(第4図)によってDMA制御信号が出
力される。
In the DMA operation, information is transferred from the ROM 3 to the RAM 4 (hereinafter referred to as “ROM → RAM transfer”), and information is transferred between areas in the RAM 4 (hereinafter referred to as “RAM → RAM transfer”). ). During DMA operation, ROM3 and RAM4
The control is performed without passing through the PU 2a, and the DMA control signal is output by the timing generation circuit 15 (FIG. 4) of the DMA control circuit 9b.

上記タイミング発生回路15は、CPU2aの図示しない回
路から出力されるPSEN信号,ALE信号,WR信号,RD信号、及
びCPU2aの基本クロックであるCLK信号が入力されると、
第7図に示すようなタイミングを発生する。
The timing generation circuit 15 receives a PSEN signal, an ALE signal, a WR signal, an RD signal output from a circuit (not shown) of the CPU 2a, and a CLK signal that is a basic clock of the CPU 2a.
The timing shown in FIG. 7 is generated.

ここで、第7図のタイムチャートの(5)〜(10)に
示すFF信号〜FF信号及びDMASEL信号は、タイミング
発生回路15内のDMA制御信号発生回路(第6図)から出
力される。
Here, the FF signal to FF signal and the DMASEL signal shown in (5) to (10) of the time chart of FIG. 7 are output from the DMA control signal generation circuit (FIG. 6) in the timing generation circuit 15.

第6図のDMA制御信号発生回路において、CPU2aの出力
信号であるALE信号,PSEN信号はアンドゲートAG1に入力
され、該アンドゲートAG1の出力信号は、CPU2aの図示
しない出力信号CLK信号に同期して5段のフリップフロ
ップFF1〜FF5によって時間遅延を行う。そして、フリッ
プフロップFF1の出力信号であるFF信号と、フリップ
フロップFF3の出力であるFF信号を入力信号とするア
ンドゲートAG3の出力信号と、図示しない回路から出
力されるPSEN信号がアンドゲートAG2に入力される。該
アンドゲートAG2の出力信号は、フリップフロップFF6
に入力され、その出力信号が第7図の(10)に示すDMAS
EL信号19(DMA動作とCPU動作の切換え信号)となる。
「ROM→RAM転送」又は、「RAM→RAM転送」時のROM3,RAM
4の各種制御信号は、第7図のタイムチャートの(11)
〜(16)に示される。
In the DMA control signal generation circuit of FIG. 6, the ALE signal and the PSEN signal, which are the output signals of the CPU 2a, are input to the AND gate AG1, and the output signal of the AND gate AG1 is synchronized with the output signal CLK signal (not shown) of the CPU 2a. Then, time delay is performed by five stages of flip-flops FF1 to FF5. Then, the FF signal that is the output signal of the flip-flop FF1, the output signal of the AND gate AG3 that receives the FF signal that is the output of the flip-flop FF3, and the PSEN signal output from a circuit (not shown) are supplied to the AND gate AG2. Is entered. The output signal of the AND gate AG2 is a flip-flop FF6
And its output signal is the DMAS shown in (10) of FIG.
This becomes the EL signal 19 (a signal for switching between DMA operation and CPU operation).
ROM3, RAM at "ROM → RAM transfer" or "RAM → RAM transfer"
The various control signals of 4 are shown in (11) of the time chart of FIG.
To (16).

次に第5図において、アドレスコントロール回路16
は、CPUモード時又はDMAモード時に、ROM3又はRAM4のア
ドレスを選択する回路である。すなわち、ROMアドレス
セレクタ20には、CPUアドレス22、転送元アドレスカウ
ンタ12(第4図)から出力される転送元アドレス23及び
そのセレクト信号としてのDMASEL信号19が入力される。
また、RAMアドレスセレクタ21には、CPUアドレス22、転
送元アドレスカウンタ12(第4図)から出力される転送
元アドレス23、転送先アドレスカウンタ13から出力され
る転送先アドレス24、及びそのセレクト信号としてのDM
ASEL信号19と図示しない回路から出力されるTRCH信号18
(タイミング発生回路15から出力され、DMA転送動作時
のROM3及び、RAM4の転送元、転送先の切換え信号)が入
力される。
Next, referring to FIG.
Is a circuit for selecting an address of the ROM 3 or the RAM 4 in the CPU mode or the DMA mode. That is, the CPU address 22, the source address 23 output from the source address counter 12 (FIG. 4), and the DMASEL signal 19 as its select signal are input to the ROM address selector 20.
The RAM address selector 21 has a CPU address 22, a transfer source address 23 output from the transfer source address counter 12 (FIG. 4), a transfer destination address 24 output from the transfer destination address counter 13, and its select signal. DM as
ASEL signal 19 and TRCH signal 18 output from a circuit not shown
(Output signal from the timing generation circuit 15 for switching the transfer source and transfer destination of the ROM 3 and the RAM 4 during the DMA transfer operation).

続いてDMA動作について説明する。 Next, the DMA operation will be described.

CPU2aからDMA動作の開始が指示されると、CPU2aの第
7図のM1サイクル(A)の間(第7図の(2),(3)
で示すCPU2aから出力されるALE信号,PSEN信号が同期出
力される時)において、(10)のDMASEL信号は“0"レベ
ル(オン状態)となる。そして、ALE信号、PSEN信号を
入力信号とするアンドゲートAG1(第6図)の出力信号
が基本タイミングとなって、「ROM→RAM転送」又は
「RAM→RAM転送」が行われる。ROM3,RAM4の制御信号
は、第7図の(5)〜(9)で示すFF信号〜FF信号
と他の条件により個々に出力される。
When the start of the DMA operation is instructed by the CPU 2a, the M2 cycle (A) of FIG. 7 of the CPU 2a ((2), (3) of FIG. 7)
(When the ALE signal and the PSEN signal output from the CPU 2a are output synchronously), the DMASEL signal of (10) goes to the “0” level (ON state). Then, the output signal of the AND gate AG1 (FIG. 6) having the ALE signal and the PSEN signal as input signals is the basic timing, and “ROM → RAM transfer” or “RAM → RAM transfer” is performed. The control signals for the ROM3 and RAM4 are individually output according to the FF signals to FF signals shown in (5) to (9) of FIG. 7 and other conditions.

ここでCPU2aのM1サイクル(A)が続き、CPU2aによる
外部データメモリアクセスを行わない限り、アンドゲー
トAG1の出力信号の基本サイクルでDMA動作が継続され
る。DMA動作中にROM3,RAM4のアドレス設定を行う場合、
DMA起動前にセットされたアドレス値に対し、タイミン
グ発生回路15(第4図)からアドレス更新信号としての
カウントアップ用クロック17が出力され、転送元アドレ
スカウンタ12、転送先アドレスカウンタ13、及び転送バ
イト数カウンタ14においてカウントアップが行われ、ア
ドレスコントロール回路16にアドレス値が出力される。
Here, the M1 cycle (A) of the CPU 2a continues, and the DMA operation is continued in the basic cycle of the output signal of the AND gate AG1 unless the CPU 2a accesses the external data memory. When setting the address of ROM3 and RAM4 during DMA operation,
A count-up clock 17 is output from the timing generation circuit 15 (FIG. 4) as an address update signal to the address value set before the DMA is started, and the transfer source address counter 12, the transfer destination address counter 13, and the transfer are performed. The byte number counter 14 counts up and outputs an address value to the address control circuit 16.

ここで、DMA動作中においてDMA停止要求が出された時
(CPU2aによるメモリダイレクトアクセスを行う時)
は、CPU2aはM2サイクル(B)(CPU2aから出力されるAL
E信号、PSEN信号が非同期出力される時)となる。すな
わち、CPU2aがM2サイクル(B)時は、PSEN信号,ALE信
号が非同期となり、かつPSEN信号が“1"レベルを維持す
るため、DMASEL信号が第7図の(a)のように“1"レベ
ル(オフ状態)となる。このDMASEL信号により、ROM3,R
AM4の(11)〜(16)で示す各種制御信号の出力は停止
するとともに、ROMアドレスセレクタ20,RAMアドレスセ
レクタ21でCPUアドレス22が選択され、ROM3,RAM4の制御
がCPU2aに依存することになる。この時、カウントアッ
プ用クロック17(第4図)の出力も停止するため、DMA
動作停止時のアドレス値が保持される。このようにCPU2
aによる外部データメモリアクセス時には、CPU2aが介在
することなくDMA制御回路9b(第1図)内でDMA動作が停
止する。
Here, when a DMA stop request is issued during DMA operation (when CPU 2a performs memory direct access)
Indicates that the CPU 2a has M2 cycles (B) (AL output from the CPU 2a)
E signal and PSEN signal are output asynchronously). That is, when the CPU 2a is in the M2 cycle (B), the PSEN signal and the ALE signal become asynchronous and the PSEN signal maintains the "1" level, so that the DMASEL signal becomes "1" as shown in FIG. Level (off state). By this DMASEL signal, ROM3, R
The output of various control signals indicated by (11) to (16) of AM4 is stopped, and the CPU address 22 is selected by the ROM address selector 20 and the RAM address selector 21, and the control of the ROM3 and RAM4 depends on the CPU 2a. Become. At this time, since the output of the count-up clock 17 (FIG. 4) also stops, the DMA
The address value at the time of operation stop is retained. Thus CPU2
When the external data memory is accessed by a, the DMA operation is stopped in the DMA control circuit 9b (FIG. 1) without the intervention of the CPU 2a.

CPU2aによる外部データメモリアクセスが終了すると
(M2サイクル(B)後)、CPU2aはM1サイクル(A)と
なるため、再度ALE信号、PSEN信号が同期出力される。
これにより、第7図の(b)のようにDMASEL信号が“0"
レベル(オン状態)になるとともに、FF信号〜FF信
号が出力され、かつ、第7図の(11)〜(16)で示すRO
M3,RAM4の制御信号もタイミング発生回路15から出力が
開始し、DMA動作停止時のアドレス値からDMA動作が開始
される。
When the external data memory access by the CPU 2a is completed (after the M2 cycle (B)), the CPU 2a enters the M1 cycle (A), so that the ALE signal and the PSEN signal are synchronously output again.
As a result, the DMASEL signal becomes “0” as shown in FIG.
Level (on state), the FF signal to the FF signal are output, and the RO indicated by (11) to (16) in FIG.
The output of the control signals of M3 and RAM4 also starts from the timing generation circuit 15, and the DMA operation starts from the address value when the DMA operation is stopped.

上記DMA動作を終了する場合、タイミング発生回路15
からカウントアップ用クロック17が出力され、転送バイ
ト数カウンタ14においてカウントアップされる。その値
が予めセットされた値になった時、タイミング発生回路
15、転送元アドレスカウンタ12、転送先アドレスカウン
タ13がリセットされるとともに、DMAモードが解除され
てDMA動作が終了する。
When ending the above DMA operation, the timing generation circuit 15
, A count-up clock 17 is output, and the transfer byte number counter 14 counts up. When the value becomes a preset value, the timing generation circuit
15, the transfer source address counter 12 and the transfer destination address counter 13 are reset, the DMA mode is released, and the DMA operation ends.

なお、第7図において、(11)のRAS信号、(12)のC
AS信号、(15)のRAMRD信号、(14),(16)のRAMWR信
号、(18)〜(20)のRAMAD信号は、RAM4にダイナミッ
クRAMを使用した時のタイムチャートであり、RAMAD信号
のR及びCはダイナミックRAMのローアドレス及びコラ
ムアドレスである。
In FIG. 7, the RAS signal in (11) and the C signal in (12)
The AS signal, the RAMRD signal of (15), the RAMWR signal of (14) and (16), and the RAMAD signal of (18) to (20) are time charts when a dynamic RAM is used for RAM4. R and C are the row address and column address of the dynamic RAM.

なお、本発明は上記実施例に限定されるものではな
く、本発明の趣旨に基づき種々の変形が可能であり、そ
れらを本発明の範囲から排除するものではない。
It should be noted that the present invention is not limited to the above embodiments, and various modifications are possible based on the gist of the present invention, and they are not excluded from the scope of the present invention.

(発明の効果) 以上詳細に説明したように、本発明によれば、ダイレ
クトメモリアクセス制御装置においては、CPUと、命令
解読・情報編集回路と、印刷するための図形情報を記憶
する第1の記憶回路と、上記命令解読・情報編集回路が
編集した情報を一旦記憶する第2の記憶回路と、上記第
1の記憶回路から第2の記憶回路への情報の転送、及び
第2の記憶回路内のエリア間での情報の転送を行うDMA
制御回路とを有する。
(Effects of the Invention) As described in detail above, according to the present invention, in a direct memory access control device, a CPU, an instruction decoding / information editing circuit, and a first memory for storing graphic information for printing. A storage circuit, a second storage circuit for temporarily storing information edited by the instruction decoding / information editing circuit, a transfer of information from the first storage circuit to the second storage circuit, and a second storage circuit DMA for transferring information between areas within
A control circuit.

そして、上記DMA制御回路は、上記CPUによるメモリア
クセスの開始及び終了に伴って発生させられる制御信号
を検出して切換え信号を発生させ、かつ、アドレス更新
信号を選択的に発生させるタイミング発生回路、上記ア
ドレス更新信号を受けてDMAアドレスを更新するアドレ
ス発生回路、及び上記切換え信号を受けてCPUアドレス
とDMAアドレスとを切り換えるアドレスコントロール回
路を備える。
The DMA control circuit detects a control signal generated along with the start and end of the memory access by the CPU, generates a switching signal, and selectively generates an address update signal. An address generation circuit that updates the DMA address in response to the address update signal, and an address control circuit that switches between the CPU address and the DMA address in response to the switching signal.

この場合、DMA動作中に、CPUによる直接のメモリアク
セスが必要になり、CPUが制御信号を発生させると、上
記DMA制御回路は制御信号を検出してCPU動作を開始し、
タイミング発生回路はアドレス更新信号を停止させ、ア
ドレス発生回路はDMAアドレスの更新を停止させ、DMAア
ドレスを保持する。
In this case, direct memory access by the CPU is required during the DMA operation, and when the CPU generates a control signal, the DMA control circuit detects the control signal and starts the CPU operation,
The timing generation circuit stops the address update signal, and the address generation circuit stops updating the DMA address and holds the DMA address.

また、上記タイミング発生回路は、切換え信号を発生
させてアドレスコントロール回路に送り、該アドレスコ
ントロール回路は、切換え信号を受けてCPUアドレスを
選択する。
Further, the timing generation circuit generates a switching signal and sends it to the address control circuit. The address control circuit receives the switching signal and selects a CPU address.

続いて、CPUによる直接のメモリアクセスが終了し、C
PUが制御信号を発生させると、上記DMA制御回路は制御
信号を検出してDMA動作を再起動し、タイミング発生回
路はアドレス更新信号を発生させ、アドレス発生回路は
保持されていたDMAアドレスからDMAアドレスの更新を開
始する。
Subsequently, the direct memory access by the CPU ends and C
When the PU generates a control signal, the DMA control circuit detects the control signal and restarts the DMA operation, the timing generation circuit generates an address update signal, and the address generation circuit performs DMA from the held DMA address. Start updating the address.

また、上記タイミング発生回路は、切換え信号を発生
させてアドレスコントロール回路に送り、該アドレスコ
ントロール回路は、切換え信号を受けてDMAアドレスを
選択する。
Further, the timing generation circuit generates a switching signal and sends it to an address control circuit. The address control circuit receives the switching signal and selects a DMA address.

このように、上記CPUがメモリアクセスの開始及び終
了に伴って制御信号を発生させると、DMA制御回路は、C
PUによる特別な処理を受けることなく、前記制御信号を
検出してDMA動作を停止したり、再起動したりする。
As described above, when the CPU generates a control signal at the start and end of the memory access, the DMA control circuit
The control signal is detected and the DMA operation is stopped or restarted without receiving special processing by the PU.

したがって、CPUは、メモリアクセスを開始しようと
したときに、DMA動作の停止に伴う制約を受けることが
なくなり、直ちにメモリアクセスを開始し、所定の処理
を実行することができる。
Therefore, when trying to start memory access, the CPU is not subject to restrictions due to the stop of the DMA operation, and can immediately start memory access and execute predetermined processing.

また、DMA動作の停止及び再起動は、CPUによる特別な
処理を受けることなくDMA制御回路によって行われる。
したがって、CPUの処理効率をその分向上させることが
できる。
Further, the DMA operation is stopped and restarted by the DMA control circuit without receiving any special processing by the CPU.
Therefore, the processing efficiency of the CPU can be improved accordingly.

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

第1図は本発明の実施例を示すダイレクトメモリアクセ
ス制御装置のブロック図、第2図は従来のシリアルプリ
ンタのブロック図、第3図は第2図の制御回路及び記憶
回路のブロック図、第4図は本発明のダイレクトメモリ
アクセス制御装置のDMA制御回路ブロック図、第5図は
本発明のダイレクトメモリアクセス制御装置のアドレス
コントロール回路ブロック図、第6図はタイミング発生
回路内のDMA制御信号発生回路のブロック図、第7図は
タイミング発生回路のタイムチャートである。 2a……CPU、3……記憶回路(A)、4……記憶回路
(B)、7……プログラムROM、9……命令解読・情報
編集回路部、9a……命令解読・情報編集回路、9b……DM
A制御回路、10,11……アドレス/データバス。
FIG. 1 is a block diagram of a direct memory access control device showing an embodiment of the present invention, FIG. 2 is a block diagram of a conventional serial printer, FIG. 3 is a block diagram of a control circuit and a storage circuit of FIG. FIG. 4 is a block diagram of a DMA control circuit of the direct memory access control device of the present invention, FIG. 5 is a block diagram of an address control circuit of the direct memory access control device of the present invention, and FIG. FIG. 7 is a block diagram of the circuit, and FIG. 7 is a time chart of the timing generation circuit. 2a CPU, 3 storage circuit (A), 4 storage circuit (B), 7 program ROM, 9 instruction decoding / information editing circuit section, 9a instruction decoding / information editing circuit, 9b …… DM
A control circuit, 10, 11 ... Address / data bus.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 和田 寿行 福島県福島市庄野字立田1番地1 株式 会社沖データシステムズ内 (72)発明者 内田 隆雄 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (72)発明者 田沼 二郎 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (72)発明者 阿久津 直司 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (72)発明者 笠井 忠 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (56)参考文献 特開 平1−283659(JP,A) ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Toshiyuki Wada 1-1-1 Tatsuda, Shono, Fukushima-shi, Fukushima Prefecture Inside Oki Data Systems Co., Ltd. (72) Inventor Takao Uchida 1-7-112 Toranomon, Minato-ku, Tokyo Okiden (72) Inventor Jiro Tanuma 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Inside (72) Inventor Naoji Akutsu 1-7-12 Toranomon, Minato-ku, Tokyo Okiden (72) Inventor Tadashi Kasai 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. (56) References JP-A-1-283659 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】(a)CPUと、 (b)命令解読・情報編集回路と、 (c)印刷するための図形情報を記憶する第1の記憶回
路と、 (d)上記命令解読・情報編集回路が編集した情報を一
旦記憶する第2の記憶回路と、 (e)上記第1の記憶回路から第2の記憶回路への情報
の転送、及び第2の記憶回路内のエリア間での情報の転
送を行うDMA制御回路とを有するとともに、 (f)上記DMA制御回路は、上記CPUによるメモリアクセ
スの開始及び終了に伴って発生させられる制御信号を検
出して切換え信号を発生させ、かつ、アドレス更新信号
を選択的に発生させるタイミング発生回路、上記アドレ
ス更新信号を受けてDMAアドレスを更新するアドレス発
生回路、及び上記切換え信号を受けてCPUアドレスとDMA
アドレスとを切り換えるアドレスコントロール回路を備
えることを特徴とするダイレクトメモリアクセス制御装
置。
(A) a CPU; (b) an instruction decoding / information editing circuit; (c) a first storage circuit for storing graphic information for printing; and (d) the instruction decoding / information editing. A second storage circuit for temporarily storing the information edited by the circuit; (e) transfer of information from the first storage circuit to the second storage circuit, and information between areas in the second storage circuit. And (f) the DMA control circuit detects a control signal generated at the start and end of the memory access by the CPU, generates a switching signal, and A timing generation circuit for selectively generating an address update signal, an address generation circuit for receiving the address update signal and updating a DMA address, and a CPU address and a DMA for receiving the switch signal.
A direct memory access control device comprising an address control circuit for switching between an address and an address.
JP2316164A 1990-11-22 1990-11-22 Direct memory access controller Expired - Fee Related JP2625573B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2316164A JP2625573B2 (en) 1990-11-22 1990-11-22 Direct memory access controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2316164A JP2625573B2 (en) 1990-11-22 1990-11-22 Direct memory access controller

Publications (2)

Publication Number Publication Date
JPH04188355A JPH04188355A (en) 1992-07-06
JP2625573B2 true JP2625573B2 (en) 1997-07-02

Family

ID=18073999

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2316164A Expired - Fee Related JP2625573B2 (en) 1990-11-22 1990-11-22 Direct memory access controller

Country Status (1)

Country Link
JP (1) JP2625573B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01283659A (en) * 1988-05-11 1989-11-15 Victor Co Of Japan Ltd Data transfer control method

Also Published As

Publication number Publication date
JPH04188355A (en) 1992-07-06

Similar Documents

Publication Publication Date Title
JP2625573B2 (en) Direct memory access controller
JP2000020451A (en) Device and method for processing information and provision method
JP2755039B2 (en) Register access control method
JPH0877143A (en) Vector data processor
JPS6142293B2 (en)
JP2909126B2 (en) Memory controller
JP2552366B2 (en) Bit block transfer controller
JPH10222460A (en) Data transfer controller
JP3266610B2 (en) DMA transfer method
JPH0133862B2 (en)
JPH05173936A (en) Data transfer processing device
JP2000285013A (en) Interface device
JPS60134334A (en) Printing controlling system
KR100690597B1 (en) Single mode direct memory access application method using cpu applying dual mode direct memory access
JPH05210616A (en) Computer device
JP2000029508A (en) Programmable controller
JPH07319840A (en) Multi-cpu device
JP2570900B2 (en) Access control device and access control method
JPH0259551B2 (en)
JPH0567035A (en) Data alignment system for dma transfer
JPH09288639A (en) Information processor
JPS59189433A (en) Data erasing system by direct memory access
JPH11167519A (en) Memory refresh control circuit, memory, memory module, and digital device
JP2001282718A (en) System bus cycle controller
JPH05197612A (en) Data access circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees