JPH0619757B2 - Microcomputer data transfer synchronization method - Google Patents

Microcomputer data transfer synchronization method

Info

Publication number
JPH0619757B2
JPH0619757B2 JP58089540A JP8954083A JPH0619757B2 JP H0619757 B2 JPH0619757 B2 JP H0619757B2 JP 58089540 A JP58089540 A JP 58089540A JP 8954083 A JP8954083 A JP 8954083A JP H0619757 B2 JPH0619757 B2 JP H0619757B2
Authority
JP
Japan
Prior art keywords
mode
signal
cpu
wait
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP58089540A
Other languages
Japanese (ja)
Other versions
JPS59214931A (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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP58089540A priority Critical patent/JPH0619757B2/en
Publication of JPS59214931A publication Critical patent/JPS59214931A/en
Publication of JPH0619757B2 publication Critical patent/JPH0619757B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)

Description

【発明の詳細な説明】 (a)技術分野 この発明は、CPU,DMAC(ダイレクトメモリアク
セスコントローラ),ダイナミックRAM(以下単にメ
モリと称する)およびI/O装置を備え、データ転送を
CPUモードあるいはDMAモードのいずれかで行うよ
うにしたマイクロコンピュータにおいて、そのCPUモ
ードおよびDMAモード実行時におけるデータ転送同期
方法に関する。
Description: (a) Technical Field The present invention includes a CPU, a DMAC (direct memory access controller), a dynamic RAM (hereinafter simply referred to as a memory), and an I / O device, and performs data transfer in a CPU mode or a DMA mode. The present invention relates to a data transfer synchronization method when executing a CPU mode or a DMA mode in a microcomputer configured to perform any of the modes.

(b)従来技術とその欠点 プロセッサーとしてCPUおよびDMACが共存し、そ
れぞれがアドレスバスを共用するマイクロコンピュータ
のデータ転送モードは、CPUとメモリ間またはI/O
装置間でデータ転送を行うCPUモードと、CPUを介
さずにメモリとI/O装置間でデータ転送を行うDMA
モードとに分けられる。このうちCPUモードにおいて
はアクセスするI/O装置またはメモリのアドレスが直
接CPUから指定されるため、指定されたI/O装置ま
たはメモリは自分自身のアクセス時間の長短に応じてC
PUをウエイト状態にするウエイト信号を発生し、それ
によってCPUとの間で同期を取ることができる。これ
に対してDMAモードにおいてはDMACからメモリア
ドレスは出力されるが、I/Oアドレスは出力されない
ため、アクセスするI/O装置の種類に応じて、すなわ
ちI/O装置のアクセス時間の長短に応じてそれぞれ異
なったウエイト時間を発生するようにしなければならな
い。またメモリにダイナミックRAMを使用した場合、
ウエイト時間に同期してメモリ制御も行わなければなら
ない。そこで従来は第1図に示すように、各I/O装置
に対してCPUモードを実行するときのウエイト制御回
路1とDMAモードを実行するときのウエイト制御回路
2とを別々に割り当て、CPUモード実行時にはウエイ
ト制御回路1で形成されるREADY信号(ウエイト信
号)をゲート3からCPUに対して与え、I/Oリー
ド、メモリライトのDMAモード実行時にはウエイト制
御回路2からREADY信号をDMACに対して与える
ようにしていた。
(b) Prior art and its drawbacks A data transfer mode of a microcomputer in which a CPU and a DMAC coexist as processors and each shares an address bus is either a CPU or a memory or an I / O.
CPU mode for data transfer between devices and DMA for data transfer between memory and I / O device without CPU
It is divided into mode and. Of these, in the CPU mode, the address of the I / O device or memory to be accessed is directly specified by the CPU, so the specified I / O device or memory is C-dependent according to the length of its own access time.
A wait signal is generated to put the PU into a wait state, whereby synchronization with the CPU can be achieved. On the other hand, in the DMA mode, the memory address is output from the DMAC, but the I / O address is not output, so that the access time of the I / O device is shortened depending on the type of the I / O device to be accessed. Therefore, different wait times must be generated accordingly. When using dynamic RAM as memory,
Memory control must be performed in synchronization with the wait time. Therefore, conventionally, as shown in FIG. 1, the weight control circuit 1 for executing the CPU mode and the weight control circuit 2 for executing the DMA mode are separately assigned to the respective I / O devices, and the CPU mode is set. At the time of execution, the READY signal (weight signal) formed by the wait control circuit 1 is given from the gate 3 to the CPU, and at the time of executing the DMA mode of I / O read and memory write, the wait control circuit 2 sends the READY signal to the DMAC. I was trying to give.

しかしながら、上記の方法では各I/O装置に対して二
種類のウエイト制御回路を割り当てる必要があるため、
回路が複雑化し、また新たにI/O装置を後付けしよう
とするときにはそれに応じて二種類のウエイト制御回路
と、さらに周辺ゲート回路を付加する必要があった。
However, in the above method, since it is necessary to assign two types of weight control circuits to each I / O device,
When the circuit becomes complicated and a new I / O device is to be retrofitted, it is necessary to add two types of weight control circuits and peripheral gate circuits accordingly.

(c)発明の目的 この発明の目的は、CPUモードにおけるCPUとメモ
リ間のウエイト制御回路をI/O装置側からメモリデー
タ転送を行うDMAモードで兼用することにより、該D
MAモードでのメモリ制御が簡単になり、かつ各I/O
装置に割り当てられるウエイト制御回路が簡単になり、
さらにアクセス速度の違ったI/O装置も容易に後付け
することのできるマイクロコンピュータのデータ転送同
期方法を提供することにある。
(c) Object of the Invention The object of the present invention is to use the wait control circuit between the CPU and the memory in the CPU mode in the DMA mode in which the memory data is transferred from the I / O device side.
Memory control in MA mode is simplified and each I / O
The weight control circuit assigned to the device is simplified,
Another object of the present invention is to provide a data transfer synchronization method for a microcomputer, which allows I / O devices having different access speeds to be easily retrofitted.

(d)発明の構成および効果 この発明は要約すれば、CPUモード実行時は従来と同
様にメモリまたはI/O装置に個別に割り当てられてい
るCPUモードウエイト時間によってウエイト信号を形
成するが、I/O装置側からメモリ転送を行うDMAモ
ード実行時はアクセスするI/O装置において入力デー
タのデータセットを完了するまでに要するデータセット
時間を発生させるとともに、この時間をメモリのCPU
モードウエイト時間に加算してウエイト信号を形成する
ようにしたものである。
(d) Structure and Effect of the Invention In summary, when executing the CPU mode, the wait signal is formed by the CPU mode wait time individually assigned to the memory or the I / O device as in the conventional case. When executing the DMA mode in which memory transfer is performed from the I / O device side, a data set time required to complete the data set of the input data is generated in the I / O device to be accessed.
The weight signal is added to the mode wait time to form a wait signal.

(e)実施例 第2図はこの発明のデータ転送同期方法を実施するマイ
クロコンピュータの概念ブロック図である。図において
ウエイト制御回路4はメモリ5のCPUモードウエイト
信号を形成するウエイト制御回路である。またウエイト
制御回路1は、第1図と同様にI/O装置6のCPUモ
ードウエイト信号を形成する回路である。構成において
第1図と相違する部分は、各I/O装置にDMAモード
ウエイト信号を形成するウエイト制御回路が割り当てら
れていないという点と、DMAモード実行時、I/O装
置6においてDISK等からの入力データのデータセッ
トが完了するとDSET信号がメモリ5のCPUモード
ウエイト信号を形成するウエイト制御回路4の起動端子
に出力されるようにした点である。I/O装置6におい
てDSET信号を形成するには、例えばシストレジスタ
などが使用される。このように構成することによってD
MAモード実行時においては、ウエイト制御回路4はI
/O装置6でのデータセットアップ時に起動されること
になるため、結局DMAC8に対しては、I/O装置6
で入力データのデータセットが完了するまでの時間とメ
モリ5のアクセス時間とを加算した時間のウエイト信号
すなわちREADY信号が供給されることになって、D
MAモード実行時の同期が取られることになる。
(e) Embodiment FIG. 2 is a conceptual block diagram of a microcomputer for carrying out the data transfer synchronization method of the present invention. In the figure, a weight control circuit 4 is a weight control circuit for forming a CPU mode weight signal of the memory 5. The weight control circuit 1 is a circuit for forming a CPU mode weight signal of the I / O device 6 as in the case of FIG. The configuration is different from that of FIG. 1 in that a weight control circuit for forming a DMA mode wait signal is not assigned to each I / O device, and that when the DMA mode is executed, the I / O device 6 is not affected by the DISK or the like. The point is that when the data set of the input data is completed, the DSET signal is output to the start terminal of the wait control circuit 4 which forms the CPU mode wait signal of the memory 5. To form the DSET signal in the I / O device 6, for example, a sist register or the like is used. With this configuration, D
When the MA mode is executed, the weight control circuit 4 is I
Since it will be activated at the time of data setup in the I / O device 6, the I / O device 6
Then, the wait signal, that is, the READY signal, of the time obtained by adding the time until the data set of the input data is completed and the access time of the memory 5 is supplied,
The synchronization will be taken when the MA mode is executed.

以上のようにこの発明は、I/Oリード、メモリライト
のDMAモード実行時のウエイト信号をメモリのCPU
モードウエイト時間とアクセスするI/O装置における
データセット時間とを加算して形成するようにしたた
め、各I/O装置に対してDMAモード用に割り当てて
いたウエイト制御回路が不要となり、さらにダイナミッ
クRAMを使用するにもかかわらずその制御と回路が簡
単化するとともにアクセス速度の異なったI/O装置も
簡単に後付けすることが可能となる。
As described above, according to the present invention, the wait signal during the DMA mode execution of I / O read and memory write is sent to the CPU of the memory.
Since the mode wait time is added to the data set time in the I / O device to be accessed, the wait control circuit assigned to each I / O device for the DMA mode is unnecessary, and the dynamic RAM is further added. Although the control and the circuit are simplified, the I / O devices having different access speeds can be easily retrofitted.

第3図はこの発明のデータ転送同期方法を実施するマイ
クロコンピュータのブロック図である。
FIG. 3 is a block diagram of a microcomputer for carrying out the data transfer synchronization method of the present invention.

A0〜A15の16ビットのアドレスバスABの上位3
ビットA13〜A15はアドレスデコーダADCに入力
し、アクセスするメモリMまたはI/O装置をセレクト
する。アドレスデコーダADCによってデコードされた
出力はメモリ制御回路MCおよびI/O制御回路I/O
Cに入力し、いずれかがセレクトされる。なお、第3図
においてはI/O装置およびメモリMをそれぞれ1個ず
つとしたが、これらが複数個ある場合にはそれぞれに対
応してメモリ制御回路MCおよびI/O制御回路I/O
Cが設けられ、アドレスデコーダADCのデコード出力
はそれらの制御回路のうちの一つだけをセレクトする。
メモリ制御回路MCがセレクトされたときには同制御回
路MCからダイナミックRAMを構成するメモリMに対
して書込み/読み出し用の制御信号,を出
力する。またI/O制御回路I/OCがセレクトされた
ときにはI/O装置に対し、制御信号を出力する。
Upper 3 of 16-bit address bus AB of A0 to A15
Bits A13 to A15 are input to the address decoder ADC and select the memory M or I / O device to be accessed. The output decoded by the address decoder ADC is the memory control circuit MC and the I / O control circuit I / O.
Input to C and one of them is selected. In FIG. 3, one I / O device and one memory M are provided, but when there are a plurality of these, the memory control circuit MC and the I / O control circuit I / O are correspondingly provided.
C is provided and the decode output of the address decoder ADC selects only one of those control circuits.
When the memory control circuit MC is selected, the control circuit MC outputs a write / read control signal to the memory M forming the dynamic RAM. When the I / O control circuit I / OC is selected, a control signal is output to the I / O device.

CPUモードおよびDMAモードにおいて、データ転送
の同期を取るためのREADY信号はゲートG1からC
PUおよびDMACに対して与えられる。ゲートG1の
入力側にはアドレスデコーダADCのREADY端子お
よびメモリ制御回路MCのREADY端子が接続されて
いる。後述するように、アドレスデコーダADCのRE
ADY端子はI/O装置のCPUモードウエイト時間に
ロー(真)となる。またメモリ制御回路MCのREAD
Y端子はメモリのCPUモードウエイト時間およびDM
Aモードウエイト時間にローとなる。
In the CPU mode and the DMA mode, the READY signal for synchronizing the data transfer is the gates G1 to C.
Given to PU and DMAC. The READY terminal of the address decoder ADC and the READY terminal of the memory control circuit MC are connected to the input side of the gate G1. As will be described later, the RE of the address decoder ADC
The ADY terminal becomes low (true) during the CPU mode wait time of the I / O device. READ of the memory control circuit MC
Y terminal is used for memory CPU mode wait time and DM
Goes low during A-mode wait time.

DMAモードに移るときには、まずI/O制御回路I/
OCからDMACに対し、DMAリクエストが発生す
る。DMACはこのDMA要求があると、CPUに対し
バスの開放を要求し、I/O制御回路I/OCに対しD
MAに移行できること示すDACK信号を出力する。ま
たI/O装置からメモリに対してデータ転送を行うとき
にはDMACは信号をI/O制御回路I/OCに
対して出力する。
When shifting to the DMA mode, first, the I / O control circuit I / O
A DMA request is issued from the OC to the DMAC. When the DMAC receives this DMA request, it requests the CPU to release the bus, and the I / O control circuit I / OC receives D
It outputs a DACK signal indicating that it can move to MA. Further, when data is transferred from the I / O device to the memory, the DMAC outputs a signal to the I / O control circuit I / OC.

第4図は上記アドレスデコーダADCの一部の詳細なブ
ロック図である。デコーダDCの入力端子A,B,Cに
はそれぞれアドレスバスA13,A14,A15のデー
タが入力する。ゲートG2およびゲートG3に入力する
セレクト信号M/はメモリMがセレクトされるとき
にはハイに、またI/O装置がセレクトされるときには
ローに制御される。デコード出力端子Y1〜Y7はそれ
ぞれゲートを介してメモリ制御回路MCまたはI/O制
御回路I/OCのセレクト端子に出力される。ここでは
デコード出力端子Y6またはY7がセレクトされたとき
にゲートG4およびゲートG3を介してメモリ制御回路
MCがセレクトされるものとしている。
FIG. 4 is a detailed block diagram of a part of the address decoder ADC. The data of the address buses A13, A14, A15 are input to the input terminals A, B, C of the decoder DC, respectively. The select signal M / input to the gate G2 and the gate G3 is controlled to be high when the memory M is selected, and to be low when the I / O device is selected. The decode output terminals Y1 to Y7 are output to the select terminals of the memory control circuit MC or the I / O control circuit I / OC via the respective gates. Here, it is assumed that the memory control circuit MC is selected via the gate G4 and the gate G3 when the decode output terminal Y6 or Y7 is selected.

デコーダDCとともにI/O装置の数だけ設けられてい
るシフトレジスタSR1の入力にはCPUモードのとき
にCPUから出力されるアドレスラッチ信号ALEの入
力端子が設けられ、このアドレスラッチ信号ALEの立
ち上がりで起動してCLOCK1をカウントする。この
シフトレジスタSR1の第2ステージ出力QBはゲート
G2の出力とともにゲートG5に入力する。この結果、
CPUモードでI/O装置がセレクトされ、かつゲート
G2出力がハイとなったときからシフトレジスタSR1
のステージQB出力がハイになるまでREADY信号が
ゲートG5から出力されることになる。上記第2図に示
したウエイト制御回路1はこのシフトレジスタSR1が
相当する。
An input terminal of the address latch signal ALE output from the CPU in the CPU mode is provided at the input of the shift register SR1 provided by the number of I / O devices together with the decoder DC, and at the rising edge of the address latch signal ALE. Start up and count CLOCK1. The second stage output QB of the shift register SR1 is input to the gate G5 together with the output of the gate G2. As a result,
Since the I / O device is selected in the CPU mode and the output of the gate G2 becomes high, the shift register SR1
The READY signal will be output from the gate G5 until the output of the stage QB becomes high. The shift register SR1 corresponds to the weight control circuit 1 shown in FIG.

第5図は上記I/O装置がCPUモードでセレクトされ
たときのタイムチャートである。同図におけるREAD
Y信号がローの期間T(I/O)はCPUモードウエイ
ト時間であり、このREADY信号自身がCPUに対す
るウエイト信号となる。第4図から明らかなように、こ
のCPUモードウエイト時間T(I/O)の長さは、ゲ
ートG5の入力端子をシフトレジスタSR1のどのステ
ージ出力に接続するかによって決まる。したがって、ア
クセス時間の長いI/O装置に対してはゲートG5の入
力端子をそのアクセス時間の長さに応じてQC,QDま
たはQE端子に接続すればよく、反対にアクセス時間の
非常に短いI/O装置に対してはゲートG5の入力端子
をQA端子に接続すればよい。このようにしてI/O装
置のCPUモードウエイト時間を形成することによりC
PUとI/O装置間での同期を取ることができる。
FIG. 5 is a time chart when the I / O device is selected in the CPU mode. READ in the figure
The period T (I / O) in which the Y signal is low is the CPU mode wait time, and this READY signal itself is the wait signal for the CPU. As is apparent from FIG. 4, the length of the CPU mode wait time T (I / O) depends on which stage output of the shift register SR1 the input terminal of the gate G5 is connected to. Therefore, for an I / O device with a long access time, the input terminal of the gate G5 may be connected to the QC, QD or QE terminal according to the length of the access time, and conversely with an I / O device with a very short access time. For the / O device, the input terminal of the gate G5 may be connected to the QA terminal. By forming the CPU mode wait time of the I / O device in this way, C
It is possible to synchronize the PU and the I / O device.

第6図はメモリ制御回路MCの一部の詳細なブロック図
である。アドレスデコーダADCからのメモリセレクト
信号はゲートG6に入力する。またメモリからの読み出
しを行うときに発生する信号およびメモリへの
書込みを行うときに発生する信号はゲートG7
に入力し、そのゲート出力が上記ゲートG6においてメ
モリセレクト信号と論理積される。シフトレジスタSR
2はCLOCK入力端子Tがハイであるとき、かつリフ
レッシュ信号RFSHがハイ、すなわちリフレッシュ期
間でないときゲートG6の出力がハイになると起動され
る。シフトレジスタSR2のステージ出力QAおよびQ
CはそれぞれゲートG8およびインバータIN1を介し
てメモリ制御信号,としてメモリMに与え
られる。また4番目のステージ出力QDはインバータI
N2を介して上記ゲートG6の出力とともにゲート9に
導かれ、READY信号として第3図に示すゲートG1
の入力側に出力される。
FIG. 6 is a detailed block diagram of a part of the memory control circuit MC. The memory select signal from the address decoder ADC is input to the gate G6. The signal generated when reading from the memory and the signal generated when writing to the memory are gate G7.
To the memory select signal at the gate G6. Shift register SR
2 is activated when the output of the gate G6 becomes high when the CLOCK input terminal T is high and the refresh signal RFSH is high, that is, when it is not in the refresh period. Stage outputs QA and Q of shift register SR2
C is given to the memory M as a memory control signal via the gate G8 and the inverter IN1. The fourth stage output QD is the inverter I
It is guided to the gate 9 together with the output of the gate G6 via N2, and the gate G1 shown in FIG.
Is output to the input side of.

シフトレジスタSR2のCLOCK入力端子Tには、C
LOCK2と、DMAモード実行時I/O装置において
データセットが完了したときに発生するデータセットア
ップ信号とを論理積するゲートG10の出力が
入力し、シフトレジスタSR2は上記信号がロ
ーからハイになったとき、すなわちDMAモード実行時
において、I/O装置におけるデータセット時間が経過
した時点で起動されるようになっている。通常の場合は
信号はハイにあるため、シフトレジスタSR2
はゲートG6の信号がハイになったときに起動する。し
たがってメモリのCPUモード実行時にはそのウエイト
時間はシフトレジスタSR2によって形成されることに
なる。すなわち、メモリのCPUモード実行時には、ゲ
ートG6の出力がハイになるとCLOCK2に同期して
ステージ出力QA〜QEが順にセットしていき、ステー
ジ出力QDがハイになったときにREADY信号がロー
からハイになる。上記第2図に示したウエイト制御回路
4はこのシフトレジスタSR2が相当する。
The CLOCK input terminal T of the shift register SR2 has a C
The output of the gate G10 which ANDs the LOCK2 and the data setup signal generated when the data set is completed in the DMA mode execution I / O device is input, and the shift register SR2 changes the signal from low to high. At this time, that is, when the DMA mode is executed, the I / O device is activated when the data set time has elapsed. Normally, the signal is high, so shift register SR2
Is activated when the signal on gate G6 goes high. Therefore, when the memory is executed in the CPU mode, the wait time is formed by the shift register SR2. That is, in the CPU mode execution of the memory, when the output of the gate G6 becomes high, the stage outputs QA to QE are sequentially set in synchronization with CLOCK2, and when the stage output QD becomes high, the READY signal goes from low to high. become. The shift control circuit 4 shown in FIG. 2 corresponds to the shift register SR2.

第7図はCPUモードでのメモリ制御回路MCの動作を
示すタイムチャートである。図において、READY信
号がローになる時間T(M)、すなわちCPUモードウ
エイト時間は、アドレスデコーダADCによってメモリ
セレクト信号が形成され、ゲートG6の出力がハイにな
ったときからシフトレジスタSR2のステージ出力QD
がハイになったときまでである。この時間T(M)は第
4図に示したシフトレジスタSR1と同様に、ゲートG
9に入力するステージ出力を変えることによって長くし
たり、あるいは短くしたりすることができる。なおこの
ときのメモリへの書き込みはの立下りに同期して
行われる。
FIG. 7 is a time chart showing the operation of the memory control circuit MC in the CPU mode. In the figure, the time T (M) when the READY signal becomes low, that is, the CPU mode wait time, is the stage output of the shift register SR2 from the time when the output of the gate G6 becomes high and the memory select signal is formed by the address decoder ADC. QD
Until when it goes high. This time T (M) is the same as the shift register SR1 shown in FIG.
It can be lengthened or shortened by changing the stage output input to 9. The writing to the memory at this time is performed in synchronization with the trailing edge of.

第8図はI/O制御回路I/OCの一部の詳細なブロッ
ク図である。
FIG. 8 is a detailed block diagram of a part of the I / O control circuit I / OC.

前述のようにI/O制御回路I/OCにはDMACから
DACK信号および信号が入力する。シフトレジ
スタSR3は上記信号がローであるとき、すなわ
ちI/O装置からデータリードしてメモリにライトする
場合に有効に駆動する。またシフトレジスタSR3のC
LOCK入力端子TにはCLOCK1が入力し、DAC
K信号がハイであるときにCLOCK1をカウントす
る。D型フリップフロップD−FFのT端子にはIOR
信号が入力し、リセット端子Rにはゲート11を介して
シフトレジスタSR3のステージ出力QCおよびDAC
K信号が入力する。フリップフロップD−FFのQ出力
および信号IORはゲート12に入力し、このゲート1
2によって信号を形成するようにしている。な
お、このシフトレジスタSR3およびフリップフロップ
D−FFはDMACから信号DACKおよび信号
が出力されたときに作動するので、DMAモードのとき
だけ信号を形成する。
As described above, the DACK signal and the signal are input from the DMAC to the I / O control circuit I / OC. The shift register SR3 is effectively driven when the signal is low, that is, when data is read from the I / O device and written to the memory. Also, C of the shift register SR3
CLOCK1 is input to the LOCK input terminal T, and the DAC
Count CLOCK1 when the K signal is high. The IOR is connected to the T terminal of the D-type flip-flop D-FF.
A signal is input to the reset terminal R via the gate 11 through the stage output QC and DAC of the shift register SR3.
K signal is input. The Q output of the flip-flop D-FF and the signal IOR are input to the gate 12, and the gate 1
2 is used to form a signal. Since the shift register SR3 and the flip-flop D-FF operate when the signal DACK and the signal are output from the DMAC, they form the signal only in the DMA mode.

DMAモードに移行し、I/O装置からデータリードし
てメモリにライトする場合、次のように動作する。
When shifting to the DMA mode and reading data from the I / O device and writing to the memory, the operation is as follows.

DACK信号がハイおよび信号がローになると、
シフトレジスタSR3のステージ出力QA〜QEがCL
OCK1に同期して順にセットされていく。フリップフ
ロップD−FFは信号の立ち下がりによってQ出
力をハイにし、シフトレジスSR3のステージ出力QC
の立ち下がりによってQ出力をローにする。この結果、
信号は信号の立ち下がり時点からフリッ
プフロップD−FFのQ出力の立ち下がり時点までロー
となる。ここで、第6図を参照して説明すると、シフト
レジスタSR2は上記データセットアップ信号
がローであるときには動作しないが、信号がロ
ーからハイに立ち上がったとき起動してステージ出力Q
A〜QEをCLOCK2に同期して順にセットしてい
く。一方、DMAモードにおいてはアドレスデコーダA
DCからメモリセレクト信号が発生し、またI/O装置
からデータリードしてメモリにライトする場合は
信号が発生しているため、シフトレジスタSR2が作
動していなくてもゲートG6の出力がハイとなってゲー
ト9を介してREADY信号を出力している。メモリセ
レクト信号が出力され、READY信号が出力されてか
らしばらくたってデータセットアップ信号がハ
イになると、シフトレジスタSR2が起動され、ステー
ジ出力QA〜QEが順にセットされていく。そして、ス
テージ出力QDがセットされたときにREADY信号が
リセットされる。すなわち、DMAモードにおいては、
データセットアップ信号がローからハイに立ち
上がるまでのデータセット時間にメモリのCPUモード
ウエイト時間T(M)が加算された時間をREADY信
号としてDMACに出力することになる。なおこの場
合、メモリに対してもの立下りを遅らせることに
よりメモリへの書き込みを制御している。
When the DACK signal goes high and the signal goes low,
The stage outputs QA to QE of the shift register SR3 are CL
They are sequentially set in synchronization with OCK1. The flip-flop D-FF makes the Q output high by the fall of the signal, and the stage output QC of the shift register SR3.
The Q output goes low at the falling edge of. As a result,
The signal is low from the time when the signal falls to the time when the Q output of the flip-flop D-FF falls. Referring to FIG. 6, the shift register SR2 does not operate when the data setup signal is low, but is activated when the signal rises from low to high and the stage output Q2 is output.
A to QE are sequentially set in synchronization with CLOCK2. On the other hand, in the DMA mode, the address decoder A
A memory select signal is generated from DC, and a signal is generated when data is read from the I / O device and written to the memory. Therefore, the output of the gate G6 is high even if the shift register SR2 is not operating. Then, the READY signal is output via the gate 9. When the data setup signal becomes high shortly after the memory select signal is output and the READY signal is output, the shift register SR2 is activated and the stage outputs QA to QE are sequentially set. Then, the READY signal is reset when the stage output QD is set. That is, in the DMA mode,
A time obtained by adding the CPU mode wait time T (M) of the memory to the data set time from when the data setup signal rises from low to high is output to the DMAC as a READY signal. In this case, writing to the memory is controlled by delaying the fall of the memory.

第9図はDMAモードにおけるメモリ制御回路MCおよ
びI/O制御回路I/OCの動作を示すタイムチャート
である。DMACからはDACK信号に続いて信
号を出力するため、シフトレジスタSR3は信号
がローになったときに起動される。そして、ステージ出
力QCがセットされたときにゲート11を介してフリッ
プフロップD−FFをリセットする。この結果、ゲート
12の出力には、信号が立ち下がったときからス
テージ出力QCがセットしたときまでの時間T′(I/
O)をローとするデータセットアップ信号が出
力され、ゲート10に導かれる。一方ゲートG6にはD
MAモードに移行したときからメモリセレクト信号が出
力されているため、ゲートG9からはシフトレジスタS
R2が起動される前からREADY信号が出力されてい
る。そして、ゲートG10の出力がハイとなり、シフト
レジスタSR2が起動してステージ出力QDがセットさ
れたときにREADY信号がリセットされる。したがっ
てこの期間、すなわちメモリセレクト信号が出力されて
からシフトレジスタSR2のステージ出力QDがリセッ
トされるまでの時間T(DMA)は、I/O装置のデー
タセット時間にメモリのCPUモードウエイト時間を加
算した値となる。このようにしてDMAモードにおいて
は、メモリのCPUモードウエイト時間にI/O装置で
のデータセット時間を加算することによってDMACと
の間で同期を取り、またメモリ制御を行う。なお、シフ
トレジスタSR3およびフリップフロップD−FFは、
I/O装置が複数個ある場合、各I/O装置に対応して
設けられる。そして、アクセス時間の長いI/O装置に
対してはゲート11に接続するシフトレジスタSR3の
ステージ出力をQDまたはQEに接続し、アクセス時間
の短いI/O装置に対してはゲート11に接続するステ
ージ出力をQAまたはQBに接続する。このようにする
ことによってデータセット時間T′(I/O)を長くし
たり、あるいは短くしたりすることが簡単にでき、各I
/O装置に対して最も効率のよい同期を取ることができ
る。
FIG. 9 is a time chart showing the operations of the memory control circuit MC and the I / O control circuit I / OC in the DMA mode. Since the DMAC outputs a signal following the DACK signal, the shift register SR3 is activated when the signal becomes low. Then, when the stage output QC is set, the flip-flop D-FF is reset via the gate 11. As a result, at the output of the gate 12, a time T '(I / I) from the time when the signal falls to the time when the stage output QC is set.
A data setup signal whose O) is low is output and led to the gate 10. On the other hand, the gate G6 has D
Since the memory select signal has been output since the time of shifting to the MA mode, the shift register S is output from the gate G9.
The READY signal has been output before R2 is activated. Then, when the output of the gate G10 becomes high and the shift register SR2 is activated and the stage output QD is set, the READY signal is reset. Therefore, during this period, that is, the time T (DMA) from the output of the memory select signal to the reset of the stage output QD of the shift register SR2, the CPU mode wait time of the memory is added to the data set time of the I / O device. It will be the value. In this way, in the DMA mode, the CPU mode wait time of the memory is added to the data set time of the I / O device to synchronize with the DMAC and control the memory. The shift register SR3 and the flip-flop D-FF are
When there are a plurality of I / O devices, they are provided corresponding to each I / O device. The stage output of the shift register SR3 connected to the gate 11 is connected to QD or QE for the I / O device having a long access time, and is connected to the gate 11 for the I / O device having a short access time. Connect the stage output to QA or QB. By doing so, it is easy to lengthen or shorten the data set time T '(I / O).
The most efficient synchronization can be achieved with the I / O device.

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

第1図は従来のデータ転送同期方法を説明するためのマ
イクロコンピュータの概念ブロック図である。また第2
図はこの発明の一実施例のデータ転送同期方法を説明す
るためのマイクロコンピュータの概念ブロック図であ
る。第3図はこの発明のデータ転送同期方法を実施する
マイクロコンピュータの概略ブロック図、第4図はアド
レスデコーダADCの一部の詳細なブロック図、第5図
はCPUモードにおけるアドレスデコーダADCの動作
を示すタイムチャート、第6図はメモリ制御回路MCの
一部の詳細なブロック図、第7図はCPUモードにおけ
るメモリ制御回路MCの動作を示すタイムチャート、第
8図はI/O制御回路I/OCの一部の詳細なブロック
図、第9図はDMAモードにおけるメモリ制御回路MC
およびI/O制御回路I/OCの動作を示すタイムチャ
ートである。 DC……デコーダ、SR1〜SR3……シフトレジス
タ。
FIG. 1 is a conceptual block diagram of a microcomputer for explaining a conventional data transfer synchronization method. The second
FIG. 1 is a conceptual block diagram of a microcomputer for explaining a data transfer synchronization method according to an embodiment of the present invention. FIG. 3 is a schematic block diagram of a microcomputer for implementing the data transfer synchronization method of the present invention, FIG. 4 is a detailed block diagram of a part of the address decoder ADC, and FIG. 5 shows the operation of the address decoder ADC in the CPU mode. FIG. 6 is a detailed block diagram of a part of the memory control circuit MC, FIG. 7 is a time chart showing the operation of the memory control circuit MC in the CPU mode, and FIG. 8 is an I / O control circuit I / O. FIG. 9 is a detailed block diagram of part of the OC, and FIG. 9 shows the memory control circuit MC in the DMA mode.
3 is a time chart showing the operation of the I / O control circuit I / OC. DC ... Decoder, SR1 to SR3 ... Shift register.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】CPU,DMAC(ダイレクトメモリアク
セスコントローラ),ダイナミックRAMおよびI/O
装置を備え、データ転送モードとしてCPUとダイナミ
ックRAM間またはI/O装置間でデータ伝送を行うC
PUモードと、CPUを介さずにダイナミックRAMと
I/O装置間でデータ転送を行うDMA(ダイレクトメ
モリアクセス)モードとを有し、前記CPUモードの実
行時または前記DMAモードの実行時にそれぞれCPU
またはDMACを所定の時間だけウエイト状態にするウ
エイト信号を形成してデータ転送時の同期を取るように
したマイクロコンピュータのデータ転送同期方法におい
て、 CPUモード実行時はダイナミックRAMまたは各I/
O装置に個別に割り当てられているCPUモードウエイ
ト時間によってウエイト信号を形成し、 入力データをダイナミックRAMに転送するDMAモー
ド実行時はアクセスするI/O装置において、入力デー
タのデータセットを完了するまでに要するデータセット
時間を発生させるとともに、この時間をダイナミックR
AMのCPUモードウエイト時間に加算してウエイト信
号を形成することを特徴とするマイクロコンピュータの
データ転送同期方法。
1. A CPU, a DMAC (Direct Memory Access Controller), a dynamic RAM and an I / O.
C which has a device and performs data transmission between a CPU and a dynamic RAM or between I / O devices as a data transfer mode.
It has a PU mode and a DMA (direct memory access) mode in which data is transferred between the dynamic RAM and the I / O device without going through the CPU, and the CPU is executed when the CPU mode is executed or when the DMA mode is executed.
Alternatively, in a data transfer synchronization method of a microcomputer for forming a wait signal for keeping the DMAC in a wait state for a predetermined time so as to synchronize data transfer, a dynamic RAM or each I / O is executed when the CPU mode is executed.
A wait signal is formed according to the CPU mode wait time individually assigned to the O device, and when the DMA mode is executed in which the input data is transferred to the dynamic RAM, the I / O device to be accessed until the data set of the input data is completed. The data set time required for
A method for synchronizing data transfer of a microcomputer, characterized in that a wait signal is formed by adding to a CPU mode wait time of AM.
【請求項2】入力データをダイナミックRAMに転送す
るDMAモード実行時において、前記データセット時間
経過時点でダイナミックRAMのCPUモードウエイト
時間を発生するウエイト制御回路を起動し、そのウエイ
ト制御回路の出力をウエイト信号としてDMACに与え
るようにした特許請求の範囲第1項記載のマイクロコン
ピュータのデータ転送同期方法。
2. When executing a DMA mode for transferring input data to a dynamic RAM, a wait control circuit for generating a CPU mode wait time of the dynamic RAM is started at the time when the data set time has elapsed, and the output of the wait control circuit is activated. The data transfer synchronization method for a microcomputer according to claim 1, wherein the weight signal is given to the DMAC.
JP58089540A 1983-05-20 1983-05-20 Microcomputer data transfer synchronization method Expired - Lifetime JPH0619757B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58089540A JPH0619757B2 (en) 1983-05-20 1983-05-20 Microcomputer data transfer synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58089540A JPH0619757B2 (en) 1983-05-20 1983-05-20 Microcomputer data transfer synchronization method

Publications (2)

Publication Number Publication Date
JPS59214931A JPS59214931A (en) 1984-12-04
JPH0619757B2 true JPH0619757B2 (en) 1994-03-16

Family

ID=13973644

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58089540A Expired - Lifetime JPH0619757B2 (en) 1983-05-20 1983-05-20 Microcomputer data transfer synchronization method

Country Status (1)

Country Link
JP (1) JPH0619757B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60189053A (en) * 1984-03-07 1985-09-26 Seiko Epson Corp Data transfer controller
JP4615137B2 (en) * 2001-03-26 2011-01-19 富士通セミコンダクター株式会社 DMA control system enabling flyby transfer to synchronous memory

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS573127A (en) * 1980-06-05 1982-01-08 Nec Corp Direct memory access controller

Also Published As

Publication number Publication date
JPS59214931A (en) 1984-12-04

Similar Documents

Publication Publication Date Title
JPH06139191A (en) Bus cycle timing control circuit
US8799699B2 (en) Data processing system
JP2749819B2 (en) Shared memory control method
JPH0619757B2 (en) Microcomputer data transfer synchronization method
US6292861B1 (en) Processor having interface with bus arbitration circuit
WO1985003372A1 (en) Data transmitting/receiving system for transmitting data to and from auxiliary memory device
JPS6214868B2 (en)
US20020069311A1 (en) Bus control device
JPS6389956A (en) Access control system for master/slave system
JP2634609B2 (en) Data transfer device
JPH05282246A (en) Microcomputer
JP3266610B2 (en) DMA transfer method
JPH04250553A (en) Programmable controller
JPH11273380A (en) Lsi operation mode setting signal fetching method and lsi with mode signal fetching function
JPS5825299B2 (en) Memory control method
JP2539030B2 (en) Direct memory access device
JPH05173936A (en) Data transfer processing device
JP2000148657A (en) Dma controller
JPS58149550A (en) Accessing system of memory
JPH0675902A (en) Dma transfer circuit
JPH0476152B2 (en)
JPH023852A (en) Access system for common memory
JPH01109425A (en) Fifo memory
JPS60112162A (en) Control system of dual port memory
JPS6083164A (en) Bus control system