JP3267110B2 - Microcomputer data transfer device - Google Patents

Microcomputer data transfer device

Info

Publication number
JP3267110B2
JP3267110B2 JP19050395A JP19050395A JP3267110B2 JP 3267110 B2 JP3267110 B2 JP 3267110B2 JP 19050395 A JP19050395 A JP 19050395A JP 19050395 A JP19050395 A JP 19050395A JP 3267110 B2 JP3267110 B2 JP 3267110B2
Authority
JP
Japan
Prior art keywords
transfer
address
data
bus
signal
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
JP19050395A
Other languages
Japanese (ja)
Other versions
JPH0944442A (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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP19050395A priority Critical patent/JP3267110B2/en
Publication of JPH0944442A publication Critical patent/JPH0944442A/en
Application granted granted Critical
Publication of JP3267110B2 publication Critical patent/JP3267110B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータにおいて記憶装置と入出力装置との間のデータ転送
を行うマイクロコンピュータのデータ転送装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer data transfer device for transferring data between a storage device and an input / output device in a microcomputer.

【0002】[0002]

【従来の技術】従来より、CPU,ROM,RAM,及
び各種周辺回路を内蔵したマイクロコンピュータユニッ
ト(MCU)を用いて構成されたシステムにおいて、プ
ログラム等をデバッグする際には、プログラムに従って
実際にCPUを動作させると共に、CPUの動作に応じ
て一時的にRAMに格納されるデータ(以下、単にRA
M値という)を確認することにより、動作を確認するこ
とが行われている。
2. Description of the Related Art Conventionally, in a system configured using a microcomputer unit (MCU) having a built-in CPU, ROM, RAM, and various peripheral circuits, when a program or the like is debugged, the CPU is actually executed in accordance with the program. And data temporarily stored in the RAM according to the operation of the CPU (hereinafter simply referred to as RA).
The operation is confirmed by confirming the M value).

【0003】このようにRAM値の確認するためには、
何等かの方法でRAM値を読み出して外部に出力する必
要があるが、その方法の一つとして、MCU内にシリア
ル通信回路を設け、このシリアル通信回路を介してRA
M値をパーソナルコンピュータ等の外部装置に出力する
方法が知られている。この方法を用いた場合、RAMか
らシリアル通信回路へのデータ転送は、通常、CPUの
負担を軽減するために、転送元及び転送先アドレスや転
送数を所定のレジスタに設定すると、後はCPUを介す
ることなくハードウェアにて高速にデータ転送を行う所
謂DMA転送により行われている。
[0003] In order to confirm the RAM value as described above,
It is necessary to read out the RAM value by some method and output it to the outside. As one of the methods, a serial communication circuit is provided in the MCU, and the RA value is transmitted through the serial communication circuit.
A method for outputting an M value to an external device such as a personal computer is known. In the case of using this method, data transfer from the RAM to the serial communication circuit is usually performed by setting the source and destination addresses and the number of transfers in predetermined registers in order to reduce the load on the CPU. This is performed by a so-called DMA transfer in which data is transferred at high speed by hardware without intervention.

【0004】そしてこのようなDMA転送を制御するた
めのDMA制御回路として、例えば特開平5−5396
9号公報には、図10に示すように、転送すべきデータ
が格納された転送元アドレスを設定するための転送元ア
ドレスカウンタ202、転送先アドレスを設定するため
の転送先アドレスカウンタ204、転送すべきデータ数
を設定するための転送語数カウンタ206、転送元アド
レスカウンタにより指定されたアドレスから読み出され
た転送データを一時的に記憶するデータレジスタ20
8、各種制御信号を発生させる制御回路200を備え、
各カウンタ202,204,206が設定され転送準備
が整うとCPUにバス要求信号BRを送出し、これに応
じてCPUからバス使用許可信号BAを受信すると上記
各カウンタ202,204,206に基づきDMA転送
を行い、転送が終了するとCPUに割込信号IRを通知
するように構成されたものが開示されている。
A DMA control circuit for controlling such DMA transfer is disclosed in, for example, Japanese Patent Laid-Open No. 5-5396.
No. 9 discloses a transfer source address counter 202 for setting a transfer source address in which data to be transferred is stored, a transfer destination address counter 204 for setting a transfer destination address, as shown in FIG. Transfer word number counter 206 for setting the number of data to be transferred, and data register 20 for temporarily storing transfer data read from the address specified by the transfer source address counter
8. A control circuit 200 for generating various control signals is provided.
When each of the counters 202, 204, and 206 is set and the transfer is ready, the bus request signal BR is sent to the CPU. When the bus use permission signal BA is received from the CPU in response to this, the DMA is determined based on the counters 202, 204, and 206. A configuration is disclosed in which a transfer is performed, and when the transfer is completed, an interrupt signal IR is notified to a CPU.

【0005】[0005]

【発明が解決しようとする課題】しかし、このようなD
MA制御回路を用いた場合、バス要求信号BRを受信し
たCPUは、現在実行中のバスサイクルを完了後に、D
MA制御回路によるバスの使用が可能となるようにバス
を解放し、DMA制御回路へバス使用許可信号BAを送
出した後、DMA制御回路から割込信号IRを受信する
までの間処理を中断する。このため、CPUにおいて
は、例えばタイマ割込に応じてリアルタイムで実行すべ
き処理があったとしても、DMA転送中にタイマ割込が
発生した場合は、DMA転送が終了するまで処理が待た
されることになる。
However, such a D
In the case of using the MA control circuit, the CPU that has received the bus request signal BR, after completing the currently executed bus cycle,
The bus is released so that the bus can be used by the MA control circuit, and after transmitting the bus use permission signal BA to the DMA control circuit, the processing is interrupted until the interrupt signal IR is received from the DMA control circuit. . Therefore, even if there is a process to be executed in real time in response to a timer interrupt, for example, if a timer interrupt occurs during a DMA transfer, the CPU waits until the DMA transfer is completed. become.

【0006】つまり、デバッグのために、このようなD
MA制御回路を用いてRAM値のモニタをすると、CP
Uの動作状態が、RAM値のモニタを行わない実際の使
用時とは全く異なってしまうため、信頼性の高いデバッ
グを行うことができないという問題があった。
That is, for debugging, such a D
When the RAM value is monitored using the MA control circuit, CP
Since the operation state of U is completely different from the actual use state where the RAM value is not monitored, there is a problem that highly reliable debugging cannot be performed.

【0007】なお、図10に記載のDMA制御回路で
は、バス使用許可信号BAを監視し、DMA制御回路が
バスを獲得している平均時間を求めることによりCPU
の処理状態を検出する演算回路210を設け、CPUの
処理が忙しい時には、1回のDMA転送により転送する
データ数または時間を減少させることにより、CPUの
処理が待たされる等の、DMA転送によるCPUの処理
への影響を低減するようにされているが、DMA転送時
にCPUがバスを解放してDMA制御回路にバスを占有
させる以上、DMA転送によるCPUへの影響を完全に
無くすことはできなかった。
The DMA control circuit shown in FIG. 10 monitors the bus use permission signal BA and obtains the average time during which the DMA control circuit has acquired the bus, thereby obtaining the CPU.
An arithmetic circuit 210 for detecting the processing state of the CPU is provided, and when the processing of the CPU is busy, the number of data to be transferred by one DMA transfer or the time is reduced, so that the processing of the CPU is waited. However, the influence of the DMA transfer on the CPU cannot be completely eliminated as long as the CPU releases the bus and causes the DMA control circuit to occupy the bus during the DMA transfer. Was.

【0008】本発明は、上記問題点を解決するために、
中央処理装置(CPU)の動作状態に影響を与えること
なく、記憶装置と入出力装置との間のデータ転送が可能
なマイクロコンピュータのデータ転送装置を提供するこ
とを目的とする。
The present invention has been made in order to solve the above problems.
An object of the present invention is to provide a data transfer device of a microcomputer capable of transferring data between a storage device and an input / output device without affecting an operation state of a central processing unit (CPU).

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
の発明である請求項1に記載のマイクロコンピュータの
データ転送装置においては、システムバスが、メインバ
スとローカルバスとに電気的に切り離されており、中央
処理装置が第2の記憶装置をアクセスしていない時に、
バス切換制御手段がバス切換手段にバス切換指令を出力
し、バス切換指令を受けたバス切換手段が第2の記憶装
置をローカルバスに接続する。なお、メインバスとロー
カルバスとは、電気的に切り離されているため、ローカ
ルバス上では、中央処理装置による制御とは独立した制
御を実行することが可能である。
[MEANS FOR SOLVING THE PROBLEMS] To achieve the above object
In the data transfer device for a microcomputer according to the first aspect of the present invention , the system bus is electrically separated from the main bus and the local bus, and the central processing unit accesses the second storage device. When not
The bus switching control unit outputs a bus switching command to the bus switching unit, and the bus switching unit that receives the bus switching command connects the second storage device to the local bus. Since the main bus and the local bus are electrically separated from each other, it is possible to execute control on the local bus independent of control by the central processing unit.

【0010】そしてこのように第2の記憶装置がローカ
ルバスに接続されている時に、転送制御手段が、DMA
制御回路を動作させることにより、このDMA制御回路
により、第2の記憶装置及び入出力装置の間のDMA転
送が実行される。このDMA制御回路では、開始制御部
が、初期設定部を動作させたあと転送制御部を起動す
る。これにより起動された転送制御部は、バス切替手段
により第2の記憶装置がローカルバスに接続されている
時に、転送元アドレス設定部及び転送実行部を交互に動
作させてデータ転送の手順を制御する。
When the second storage device is thus connected to the local bus, the transfer control means sets
By operating the control circuit, the DMA control circuit executes the DMA transfer between the second storage device and the input / output device. In this DMA control circuit, a start control unit
Starts the transfer control unit after operating the initialization unit.
You. The transfer control unit activated by this is a bus switching unit.
Connects the second storage device to the local bus
Sometimes, the transfer source address setting unit and the transfer execution unit operate alternately.
To control the data transfer procedure.

【0011】なお、初期設定部が生成する制御信号によ
り、転送数カウンタのカウント値の零クリア及び転送元
間接アドレスカウンタへの転送元先頭アドレス設定レジ
スタの設定値のロードが行われ、転送元アドレス設定部
が生成する制御信号により、転送元間接アドレスカウン
タの設定値に基づき第2の記憶装置から読み出された転
送元アドレスの転送元アドレスレジスタへの設定及び転
送元間接アドレスカウ ンタのインクリメントが行われ、
転送実行部が生成する制御信号により、転送元アドレス
レジスタに設定された転送元アドレスに基づき第2の記
憶装置から読み出された転送データの出力装置の送信バ
ッファへの書込及び転送数カウンタのインクリメントが
行われる。そして、このインクリメントにより、転送数
設定レジスタの設定値と転送数カウンタのカウント値と
が一致して比較器からの一致信号が開始制御部に入力さ
れると、同様の動作が繰り返されることになる。
Note that the control signal generated by the initial setting unit is
Clears the count value of the transfer number counter to zero and
Transfer source start address setting register to the indirect address counter
Is loaded, the transfer source address setting section
Is generated by the control signal generated by
Data read from the second storage device based on the
Set and transfer the source address to the source address register
Increment of Okumoto indirect address counter is performed,
The transfer source address is determined by the control signal generated by the transfer execution unit.
Based on the transfer source address set in the register, the second
The transmission buffer of the output device for the transfer data read from the storage device
Buffer writing and transfer counter increment
Done. And, by this increment, the number of transfers
The setting value of the setting register and the count value of the transfer number counter
Match and the match signal from the comparator is input to the start controller.
Then, the same operation is repeated.

【0012】従って、本発明のマイクロコンピュータの
データ転送装置によれば、中央処理装置の動作に何等影
響を与えることなく、ローカルバス上にて第2の記憶装
置と入出力装置との間のDMA転送を行うことができ、
その結果、プログラム等のデバッグ時に、このDMA転
送機能を用いれば、中央処理装置を実際の使用時と全く
同じ動作状態にしたままRAM値をモニタできるので、
信頼性の高いデバッグを行うことができる。
[0012] Therefore, according to the data transfer apparatus of the microcomputer of the present invention, without giving any way affect the operation of Chuo processor, between the second storage device in the local bus and input-output device DMA transfer can be performed,
As a result, when this DMA transfer function is used at the time of debugging a program or the like, the RAM value can be monitored while the central processing unit is kept in the same operating state as when actually used.
Highly reliable debugging can be performed.

【0013】また、本発明によれば、元々メインバスと
ローカルバスとは電気的に切り離されており、DMA転
送を開始する際に、従来装置のように中央処理装置によ
るバスの解放を待つ必要がないので、効率よくDMA転
送を実行できる。更に、本発明によれば、ローカルバス
での転送の形態を、第2の記憶装置から出力装置の送信
バッファへの転送のみに限定したことにより、転送先ア
ドレス設定のための制御を省略することができる。
Further, according to the present invention, the main bus and the local bus are originally electrically separated from each other, and when starting the DMA transfer, it is necessary to wait for the release of the bus by the central processing unit as in the conventional device. Therefore, the DMA transfer can be executed efficiently. Furthermore, according to the invention, the local bus
Transmission form from the second storage device to the output device
By limiting the transfer to the buffer only,
The control for dress setting can be omitted.

【0014】次に、請求項2に記載のマイクロコンピュ
ータのデータ転送装置においては、バス切換手段は、中
央処理装置からのアドレスをデコードすることにより、
第2の記憶装置がアクセスされているか否かを判断する
判定手段を備えている。なお、第2の記憶装置がアクセ
スされない時というのは、フェッチサイクル以外にも、
例えば、メインバス上に接続された第1の記憶装置以外
の装置をアクセスする期間等が含まれる。
Next, in the data transfer apparatus for a microcomputer according to the second aspect , the bus switching means decodes an address from the central processing unit,
A determination unit is provided for determining whether the second storage device is being accessed. Note that the time when the second storage device is not accessed means that, other than the fetch cycle,
For example, a period during which a device other than the first storage device connected to the main bus is accessed is included.

【0015】従って、本発明によれば、第2の記憶装置
及び入出力装置間のDMA転送を、フェッチサイクルだ
けでなく第2の記憶装置がアクセスされない全ての期間
にて行うことができるので、請求項2に記載の装置に比
べ、より効率よくDMA転送を行うことができる。
Therefore, according to the present invention, the DMA transfer between the second storage device and the input / output device can be performed not only in the fetch cycle but also in all periods during which the second storage device is not accessed. The DMA transfer can be performed more efficiently than the device according to the second aspect.

【0016】また次に、請求項3に記載のマイクロコン
ピュータのデータ転送装置においては、入出力装置が、
第2の記憶装置からの転送データをシリアルデータに変
換して外部に送出するシリアル通信装置からなる。従っ
て、特に、本発明のデータ転送装置を含んだマイクロコ
ンピュータにて、各種装置を制御するためのコントロー
ラ等を1チップの素子に構成し、しかも素子を小型化す
るために、データバスやアドレスバスを外部に出さない
ように構成した場合であっても、シリアル通信装置のシ
リアル端子を外部に出しておけば、RAM値のモニタす
ることができ、プログラム等のデバッグを容易にでき
る。
Next, in a data transfer device for a microcomputer according to a third aspect , the input / output device includes:
It is composed of a serial communication device that converts transfer data from the second storage device into serial data and sends it out. Therefore, in particular, in a microcomputer including the data transfer device of the present invention, a controller or the like for controlling various devices is configured as a one-chip device, and furthermore, a data bus or an address bus is used to reduce the size of the device. Even if it is configured not to output to the outside, if the serial terminal of the serial communication device is output to the outside, the RAM value can be monitored and debugging of programs and the like can be facilitated.

【0017】[0017]

【発明の実施の形態】以下に本発明の参考例及び実施例
を図面と共に説明する。図1は、参考例のマイクロコン
ピュータユニット(MCU)の全体構成を表すブロック
図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, reference examples and embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating an overall configuration of a microcomputer unit (MCU) of a reference example .

【0018】図1に示すように参考例のMCUは、予め
設定されたプログラムに従って処理を実行する中央処理
装置(CPU)10と、CPU10が処理を実行するた
めのプログラムを格納する読出専用メモリ(ROM)1
2と、CPU10の処理に応じてデータが読み書きされ
るランダムアクセスメモリ(RAM)14と、CPU1
0により制御される各種周辺回路16と、外部装置との
間でシリアルデータ通信を行うためのシリアル通信回路
18と、RAM14及びシリアル通信回路18,周辺回
路16間の16ビット単位のDMA転送を制御するDM
A制御回路20と、これら各部を接続するシステムバス
を、CPU10,ROM12が接続されたコア側システ
ムバス(アドレスバスA,データバスD)、及びRAM
14,周辺回路16,シリアル通信回路18,DMA制
御回路20が接続されたペリ側システムバス(アドレス
バスAp,データバスDp)とに区分し、DMA制御回
路20からのゲート信号GTに応じて、両ステムバスを
電気的に接続或は切断するゲート22とにより構成され
ている。
As shown in FIG. 1, the MCU of the reference example includes a central processing unit (CPU) 10 for executing a process according to a preset program, and a read-only memory (CPU) for storing a program for the CPU 10 to execute the process. ROM) 1
2, a random access memory (RAM) 14 for reading and writing data according to the processing of the CPU 10, and a CPU 1
0, a serial communication circuit 18 for performing serial data communication with an external device, and a 16-bit DMA transfer between the RAM 14, the serial communication circuit 18, and the peripheral circuit 16 are controlled. DM
An A control circuit 20 and a system bus connecting these components include a CPU-side system bus (address bus A, data bus D) to which the ROM 12 is connected, and a RAM.
14, a peripheral system bus, a serial communication circuit 18, and a peri-side system bus (address bus Ap, data bus Dp) to which the DMA control circuit 20 is connected, and according to a gate signal GT from the DMA control circuit 20, A gate 22 electrically connects or disconnects both stem buses.

【0019】なお、ゲート22は、トライステートバッ
ファからなり、ゲート信号GTがLow レベルの時には、
信号を通過させることにより両システムバスを接続し、
ゲート信号GTがHighレベルの時には、出力をハイイン
ピーダンスにすることにより、両システムバスを電気的
に切り離すように構成されている。
The gate 22 is composed of a tri-state buffer, and when the gate signal GT is at the low level,
Connect both system buses by passing signals,
When the gate signal GT is at a high level, the output is set to a high impedance so that both system buses are electrically disconnected.

【0020】またCPU10からの制御信号は、図示し
ないが、アドレスバスA,Ap、システムバスD,Dp
と同様に、ゲート信号GTがHighレベルの時には、ペリ
側システムバスに接続された各装置には伝達されないよ
うにされている。またCPU10は、メモリのリード/
ライト等の1命令の実行に要する時間、即ちバスサイク
ルが、全て後述する内部クロックCK1,CK2の2ク
ロック分で終了するように構成されている。
Although not shown, control signals from the CPU 10 include address buses A and Ap and system buses D and Dp.
Similarly, when the gate signal GT is at the high level, the signal is not transmitted to the devices connected to the peri-side system bus. Further, the CPU 10 reads the memory /
The configuration is such that the time required to execute one instruction such as write, that is, the bus cycle, is completed by two clocks of internal clocks CK1 and CK2, which will be described later.

【0021】次に、シリアル通信回路18は、DMA制
御回路20の制御により転送されてくる送信データを書
き込むための16ビットの送信バッファと、この送信バ
ッファに書き込まれた送信データを8ビットづつ取り込
んで所定フォーマットのシリアルデータに加工し外部に
送出するための送信レジスタとを備えている。そして、
送信データ書込許可信号EMは、送信バッファに送信デ
ータが書き込まれた時にLow レベルに設定され、また送
信バッファから送信レジスタに最初上位8ビットの送信
データが取り込まれ、その後下位8ビットが取り込まれ
た時にHighレベルに設定されるように構成されている。
Next, the serial communication circuit 18 fetches a 16-bit transmission buffer for writing the transmission data transferred under the control of the DMA control circuit 20, and fetches 8 bits of the transmission data written in the transmission buffer. And a transmission register for processing the serial data into a predetermined format and sending the serial data to the outside. And
The transmission data write enable signal EM is set to low level when the transmission data is written to the transmission buffer, and the upper 8 bits of transmission data are first captured from the transmission buffer into the transmission register, and then the lower 8 bits are captured. It is configured to be set to the high level when

【0022】ここで、シリアル通信回路18から出力さ
れるシリアルデータのフォーマットを図4に示す。図に
示すように、送信バッファに書き込まれた送信データ
は、8ビットずつ上位ビットUDn,下位ビットLDn
の順に送信され、各8ビットの先頭と末尾には、スター
トビットS,及びストップビットPが付加される。な
お、ポストアンブルPAは、送信データ(16ビット)
を複数個連続して繰り返し送信する場合に、一通りの転
送が終了すると区切りのために挿入されるものである。
FIG. 4 shows the format of the serial data output from the serial communication circuit 18. As shown in the figure, the transmission data written in the transmission buffer includes upper bits UDn and lower bits LDn in units of 8 bits.
, And a start bit S and a stop bit P are added to the beginning and end of each 8 bits. The postamble PA is the transmission data (16 bits)
When a plurality of are continuously and repeatedly transmitted, they are inserted as a delimiter when one transfer is completed.

【0023】次に、DMA制御回路20について説明す
る。図1に示すように、DMA制御回路20は、転送デ
ータのデータ数を設定するための転送数設定レジスタ2
4と、カウント値をインクリメント信号CIにより1イ
ンクリメントし、クリア信号CRにより零クリアする転
送数カウンタ26と、転送数設定レジスタ24の設定値
と転送数カウンタ26のカウント値とを比較し、両者の
値が一致すると一致信号CPを出力する比較器28と、
転送データが格納された領域のアドレス(転送元アドレ
ス)を順番に並べてなる転送元アドレス格納領域の先頭
アドレスを設定するための転送元先頭アドレス設定レジ
スタ30と、ロード信号LDSにより転送元先頭アドレ
ス設定レジスタ30の設定値をロードしてカウント値と
し、このカウント値(転送元間接アドレス)をインクリ
メント信号AISにより2インクリメントし、出力許可
信号OE1に従ってアドレスバスApに出力する転送元
間接アドレスカウンタ32と、ライト信号WE1により
データを取り込み、出力許可信号OE2に従ってデータ
を出力する転送元アドレスを一時的に格納するための転
送元アドレスレジスタ34と、データバスDpからのデ
ータを転送元アドレスレジスタ34に供給し、転送元ア
ドレスレジスタ34からのデータをアドレスバスApへ
供給するバス変換回路36と、ライト信号WE2により
データバスDpからデータを取り込み、出力許可信号O
E4dに従ってデータバスDpにデータを出力する転送
データを一時的に格納するための転送データレジスタ3
8と、転送データの転送先アドレスを順番に並べてなる
転送先アドレス格納領域の先頭アドレスを設定するため
の転送先先頭アドレス設定レジスタ40と、ロード信号
LDRにより転送先先頭アドレス設定レジスタ40の設
定値をロードしてカウント値とし、このカウント値(転
送先間接アドレス)をインクリメント信号により2イン
クリメントし、出力許可信号OE3に従ってアドレスバ
スApに出力する転送先間接アドレスカウンタ42と、
ライト信号WE3によりデータを取り込み、出力許可信
号OE4aに従ってデータを出力する転送先アドレスを
一時的に格納するための転送先アドレスレジスタ44
と、データバスDpからのデータを転送先アドレスレジ
スタ44に供給し、転送先アドレスレジスタ44からの
データをアドレスバスApに供給するバス変換回路36
と、データ転送の許可/禁止、及び転送モード(1回転
送/連続転送)を設定するためのコントロールレジスタ
48と、CPU10からそのバスサイクルがフェッチサ
イクルにあることを表すフェッチ信号FT,シリアル通
信回路18から送信データの書込が可能であるか否かを
表す送信データ書込許可信号EM,コントロールレジス
タ48から設定値に応じて出力されるスタート信号T
S,モード信号TM,比較器28から一致信号CPを入
力し、ゲート22を制御するためのゲート信号GT,及
びRAM14からデータを読み出すためのリード信号R
E,シリアル通信回路18に送信データを書込むための
ライト信号WE4,その他DMA制御回路20内部の各
部を動作させるための各種制御信号を生成する制御回路
50と、を備えている。
Next , the DMA control circuit 20 will be described. As shown in FIG. 1, the DMA control circuit 20 includes a transfer number setting register 2 for setting the number of transfer data.
4, the transfer number counter 26, which increments the count value by one with an increment signal CI and clears the count value to zero by a clear signal CR, compares the set value of the transfer number setting register 24 with the count value of the transfer number counter 26, and compares them. A comparator 28 that outputs a match signal CP when the values match,
A transfer source start address setting register 30 for setting a start address of a transfer source address storage area in which addresses of transfer areas (transfer source addresses) are sequentially arranged, and a transfer source start address setting by a load signal LDS A transfer source indirect address counter 32 which loads the set value of the register 30 to obtain a count value, increments the count value (transfer source indirect address) by 2 with an increment signal AIS, and outputs the count value to an address bus Ap according to an output enable signal OE1; The transfer source address register 34 for temporarily storing a transfer source address for fetching data according to the write signal WE1 and outputting the data according to the output enable signal OE2, and the data from the data bus Dp are supplied to the transfer source address register 34. , Transfer source address register 3 A data bus conversion circuit 36 supplies to the address bus Ap from, takes data from the data bus Dp by the write signal WE2, output enable signal O
Transfer data register 3 for temporarily storing transfer data for outputting data to data bus Dp in accordance with E4d
8, a transfer destination start address setting register 40 for setting a start address of a transfer destination address storage area in which transfer destination addresses of transfer data are sequentially arranged, and a setting value of the transfer destination start address setting register 40 by a load signal LDR. Is loaded as a count value, the count value (transfer destination indirect address) is incremented by 2 with an increment signal, and is output to the address bus Ap in accordance with the output enable signal OE3;
A transfer destination address register 44 for temporarily storing a transfer destination address for fetching data by the write signal WE3 and outputting data in accordance with the output enable signal OE4a.
And a bus conversion circuit 36 that supplies data from the data bus Dp to the transfer destination address register 44 and supplies data from the transfer destination address register 44 to the address bus Ap.
A control register 48 for setting permission / inhibition of data transfer and a transfer mode (single transfer / continuous transfer); a fetch signal FT indicating that the bus cycle is in a fetch cycle; 18, a transmission data write enable signal EM indicating whether transmission data can be written, and a start signal T output from the control register 48 according to the set value.
S, a mode signal TM, a coincidence signal CP from the comparator 28, a gate signal GT for controlling the gate 22, and a read signal R for reading data from the RAM 14.
E, a write signal WE4 for writing transmission data to the serial communication circuit 18, and a control circuit 50 for generating various control signals for operating other parts inside the DMA control circuit 20.

【0024】なお、転送数設定レジスタ24、転送元先
頭アドレス設定レジスタ30、転送先先頭アドレス設定
レジスタ40、コントロールレジスタ48については、
CPU10の制御により値が設定される。また、転送元
間接アドレスカウンタ32及び転送先間接アドレスカウ
ンタ42が2インクリメントされるのは、RAM14に
おいて転送元アドレス及び転送先アドレスが、ワード
(16ビット)単位で格納されているからである。
The transfer number setting register 24, transfer source start address setting register 30, transfer destination start address setting register 40, and control register 48 are as follows.
The value is set under the control of the CPU 10. The source indirect address counter 32 and the destination indirect address counter 42 are incremented by two because the source and destination addresses are stored in the RAM 14 in word (16 bit) units.

【0025】次に図2は、制御回路50の概略構成を表
す説明図である。図2に示すように、制御回路50は、
転送数カウンタ26のカウント値を零クリアし、転送元
間接アドレスカウンタ32及び転送先間接アドレスカウ
ンタ42に、夫々転送元先頭アドレス設定レジスタ30
及び転送先先頭アドレス設定レジスタ40の設定値をロ
ードして、DMA制御回路20を初期設定するためのク
リア信号CR,ロード信号LDS,LDRを生成する初
期設定部52と、転送元間接アドレスカウンタ32に設
定された転送元間接アドレスに基づき、RAM14から
転送元アドレスを読み出して転送元アドレスレジスタ3
4に設定するための出力許可信号OE1,リード信号R
E,ライト信号WE1を生成する転送元アドレス設定部
54と、転送元アドレスレジスタ34に設定された転送
元アドレスに基づき、RAM14から転送データを読み
出して転送データレジスタ38に設定するための出力許
可信号OE2,リード信号RE,ライト信号WE2を生
成すると共に、次の転送に備えるため転送元間接アドレ
スカウンタ32のカウント値をインクリメントするため
インクリメント信号AISを生成する転送データ設定部
56と、転送先間接アドレスカウンタ42に設定された
転送先間接アドレスに基づき、RAM14から転送先ア
ドレスを読み出して転送先アドレスレジスタ44に設定
するための出力許可信号OE3,リード信号RE,ライ
ト信号WE3を生成する転送先アドレス設定部58と、
転送データレジスタ38に設定された転送データを読み
出して、転送先アドレスレジスタ44に設定された転送
先アドレスに書き込むための出力許可信号OE4a,O
E4d,ライト信号WE4を生成すると共に、次のデー
タ転送に備えるため転送先間接アドレスカウンタ42及
び転送数カウンタ26のカウント値を夫々インクリメン
トするためのインクリメント信号AIR,CIを生成す
る転送実行部60と、フェッチ信号FT,送信データ書
込許可信号EMに基づき、転送元アドレス設定部54,
転送データ設定部56,転送先アドレス設定部58,転
送実行部60の動作を許可する許可信号EN1〜EN4
を生成し、データ転送の手順を制御する転送制御部64
と、スタート信号TS,モード信号TM,一致信号CP
に基づき、初期設定部52及び転送制御部64の動作を
許可する許可信号EI,ETを生成する開始制御部62
とを備えている。なお、フェッチ信号FTは、ゲート2
2を駆動するためのゲート信号GTとして、そのまま出
力される。また上記各部においては、互いに半周期だけ
位相のずれた2相の内部クロックCK1,CK2に同期
して各制御が実行され、これに同期した制御信号が生成
される。
FIG. 2 is an explanatory diagram showing a schematic configuration of the control circuit 50. As shown in FIG. 2, the control circuit 50
The count value of the transfer number counter 26 is cleared to zero, and the transfer source indirect address counter 32 and the transfer destination indirect address counter 42 store the transfer source start address setting register 30 respectively.
And an initial setting unit 52 that loads a set value of the transfer destination head address setting register 40 and generates a clear signal CR and load signals LDS and LDR for initial setting of the DMA control circuit 20, and a transfer source indirect address counter 32 Is read from the RAM 14 based on the transfer source indirect address set in the transfer source address register 3
Output enable signal OE1 for setting to 4 and read signal R
E, a transfer source address setting unit 54 for generating the write signal WE 1, and an output enable signal for reading transfer data from the RAM 14 and setting the transfer data in the transfer data register 38 based on the transfer source address set in the transfer source address register 34. A transfer data setting unit 56 that generates OE2, a read signal RE, and a write signal WE2, and generates an increment signal AIS to increment the count value of the source indirect address counter 32 in preparation for the next transfer; A destination address setting for generating an output enable signal OE3, a read signal RE, and a write signal WE3 for reading the destination address from the RAM 14 and setting the destination address register 44 based on the destination indirect address set in the counter 42. Part 58,
Output permission signals OE4a and OE4a for reading the transfer data set in the transfer data register 38 and writing the data in the transfer destination address set in the transfer destination address register 44.
E4d, a transfer execution unit 60 that generates the write signal WE4 and generates increment signals AIR and CI for incrementing the count values of the transfer destination indirect address counter 42 and the transfer number counter 26, respectively, in preparation for the next data transfer. , Based on the fetch signal FT and the transmission data write enable signal EM,
Permission signals EN1 to EN4 for permitting the operations of the transfer data setting unit 56, the transfer destination address setting unit 58, and the transfer execution unit 60
And a transfer control unit 64 for controlling the data transfer procedure.
And a start signal TS, a mode signal TM, and a coincidence signal CP.
Start control unit 62 that generates permission signals EI and ET for permitting the operations of the initial setting unit 52 and the transfer control unit 64 based on
And The fetch signal FT is supplied to the gate 2
2 is output as it is as a gate signal GT for driving the second signal. Further, in each of the above sections, each control is executed in synchronization with the two-phase internal clocks CK1 and CK2 whose phases are shifted from each other by a half cycle, and a control signal synchronized with this is generated.

【0026】ここで、上記制御回路50の各部は、簡単
な論理回路により構成されるものであるため、具体的な
回路構成についての説明は省略するが、開始制御部62
及び転送制御部64の概略動作について説明する。ま
ず、開始制御部62は、スタート信号TSが入力される
と、先ず初期設定部52の動作させる許可信号EIを出
力し、初期設定部52が生成する信号による初期設定に
充分な時間が経過後、許可信号ETをセットして転送制
御部64を起動する。そして、モード設定信号TMによ
り1回転送が指定されている場合には、一致信号CPが
入力された時点で、動作許可信号ETをリセットして転
送制御部64の動作を禁止し、一方、モード設定信号T
Mにより連続転送が指定されている場合には、一致信号
CPをそのまま動作許可信号EIとして初期設定部52
に入力するように構成されている。
Here, since each section of the control circuit 50 is constituted by a simple logic circuit, a description of a specific circuit configuration is omitted, but the start control section 62.
The general operation of the transfer control unit 64 will be described. First, when the start signal TS is input, the start control unit 62 first outputs a permission signal EI for operating the initial setting unit 52, and after a lapse of a sufficient time for the initial setting by the signal generated by the initial setting unit 52, , The permission signal ET is set and the transfer control unit 64 is activated. When the transfer is designated once by the mode setting signal TM, the operation permission signal ET is reset and the operation of the transfer control unit 64 is prohibited when the coincidence signal CP is input. Setting signal T
When continuous transfer is designated by M, the coincidence signal CP is directly used as the operation permission signal EI in the initial setting unit 52.
Is configured to be input.

【0027】一方、転送制御部64は、開始制御部62
からの許可信号ETがセットされている場合にのみ動作
し、フェッチ信号FTがHighレベルの時に、CPU10
の1バスサイクル毎に、許可信号EN1〜EN4のいず
れか1つを順番に出力する。但し、送信データ書込許可
信号EMがLow レベルの時には、許可信号EN1〜EN
3のみ出力可能であり、許可信号EN3を出力後は待機
状態となる。そして、送信データ書込許可信号EMがHi
ghレベルに戻ると、次のバスサイクルにて許可信号EN
4を出力して動作を再開する。また、フェッチ信号FT
がLow レベルの時は、直ちに待機状態となり、許可信号
EN1〜EN4のいずれも出力しない。
On the other hand, the transfer control unit 64
Operates only when the permission signal ET from the CPU 10 is set, and when the fetch signal FT is at the high level, the CPU 10
, One of the enable signals EN1 to EN4 is sequentially output. However, when the transmission data write enable signal EM is at the low level, the enable signals EN1 to EN
3 can be output, and after outputting the permission signal EN3, the apparatus enters a standby state. Then, the transmission data write enable signal EM becomes Hi.
When the signal returns to the gh level, the enable signal EN is output in the next bus cycle.
4 is output to restart the operation. Also, the fetch signal FT
Is at the low level, it immediately enters the standby state and does not output any of the enable signals EN1 to EN4.

【0028】以上のように構成されたDMA制御回路2
0によるDMA転送の動作を具体的に説明する。なお、
図3は、参考例のMCUのメモリマップ、図5は、DM
A転送時のタイミング図である。図3に示すように、ア
ドレスの0000h〜05fffh番地がI/O領域,
0600h〜3fffh番地がRAM14の領域,40
00h〜ffffh番地がプログラムを格納するための
ROM12の領域に割り当てられている。
The DMA control circuit 2 configured as described above
The operation of the DMA transfer by 0 will be specifically described. In addition,
FIG. 3 is a memory map of the MCU of the reference example , and FIG.
FIG. 6 is a timing chart at the time of A transfer. As shown in FIG. 3, addresses 0000h to 05ffhh are I / O areas,
Addresses 0600h to 3ffhh are the areas of the RAM 14, 40
Addresses 00h to ffffh are allocated to an area of the ROM 12 for storing programs.

【0029】そして、I/O領域において、0070h
番地がシリアル通信回路18にデータを読み書きするた
めのアドレスとして割り当てられている。なお、この領
域には、周辺回路16や転送数設定レジスタ24,転送
元先頭アドレス設定レジスタ30,転送先先頭アドレス
設定レジスタ40,コントロールレジスタ48を指定す
るためのアドレスも割り振られている。
Then, in the I / O area,
The address is assigned to the serial communication circuit 18 as an address for reading and writing data. In this area, addresses for specifying the peripheral circuit 16, the transfer number setting register 24, the transfer source start address setting register 30, the transfer destination start address setting register 40, and the control register 48 are also allocated.

【0030】また、RAM14の領域には、転送元アド
レス格納領域(0600h〜),転送先アドレス格納領
域(0800h〜)が確保されている。次に、図5に示
すタイミング図に沿って動作を説明する。ここでは、0
a00h番地及び0b10番地に夫々格納された各1ワ
ードのデータ(合計2ワード)を、繰り返し転送する場
合を例にとり説明する。
In the area of the RAM 14, a transfer source address storage area (0600h-) and a transfer destination address storage area (0800h-) are secured. Next, the operation will be described with reference to the timing chart shown in FIG. Here, 0
An example will be described in which data of one word (two words in total) stored at addresses a00h and 0b10 are repeatedly transferred.

【0031】まず、初期化時等に、CPU10が、転送
元アドレス格納領域(0600h番地,0602h番
地)に転送元アドレス(0a00h,0b10h)を、
転送先アドレス格納領域(0800h番地,0802h
番地)に、転送元アドレス(0070h,0070h)
を設定し、これと共に、転送数設定レジスタ24に転送
数(2)、転送元先頭アドレス設定レジスタ30に転送
元アドレス格納領域の先頭アドレス(0600h)、転
送先先頭アドレス設定レジスタ40に転送先アドレス格
納領域の先頭アドレス(0800h)を夫々設定する。
First, at the time of initialization or the like, the CPU 10 stores the transfer source address (0a00h, 0b10h) in the transfer source address storage area (addresses 0600h, 0602h).
Transfer destination address storage area (address 0800h, 0802h
Address), the transfer source address (0070h, 0070h)
The transfer number (2) is set in the transfer number setting register 24, the start address (0600h) of the transfer source address storage area is set in the transfer start address setting register 30, and the transfer destination address is set in the transfer destination start address setting register 40. The start address (0800h) of the storage area is set respectively.

【0032】その後、CPU10が、コントロールレジ
スタ48を、データ転送許可,連続転送を指定してセッ
トすることにより、コントロールレジスタ48から制御
回路50にスタート信号TS,モード設定信号TMが入
力され、DMA制御回路20によるDMA転送制御が開
始される。
Thereafter, the CPU 10 sets the control register 48 by designating data transfer permission and continuous transfer, so that the start signal TS and the mode setting signal TM are input from the control register 48 to the control circuit 50, and the DMA control is performed. The DMA transfer control by the circuit 20 is started.

【0033】このようにして、スタート信号TSが入力
された制御回路50では、まず開始制御部62により許
可信号EIが出力され、初期設定部52が起動されるこ
とにより、転送数カウンタ26が零クリアされ、転送元
間接アドレスカウンタ32及び転送先間接アドレスカウ
ンタ42には、転送元先頭アドレス設定レジスタ30の
設定値(0600h)及び転送先先頭アドレス設定レジ
スタ40の設定値(0800h)が夫々ロードされる。
As described above, in the control circuit 50 to which the start signal TS has been input, the permission signal EI is first output by the start control unit 62 and the initial setting unit 52 is activated, so that the transfer number counter 26 becomes zero. The setting value (0600h) of the transfer source start address setting register 30 and the set value (0800h) of the transfer destination start address setting register 40 are loaded into the transfer source indirect address counter 32 and the transfer destination indirect address counter 42, respectively. You.

【0034】その後、開始制御部62により許可信号E
Tがセットされ、転送制御部64が起動される。ここで
は、図5に示すように、最初のバスサイクルB1は、C
PU10はROM12(C000h番地)をアクセスし
命令フェッチするため、CPU10から出力されるフェ
ッチ信号FTはHighレベルとなり、これにより、ペリ側
システムバスがコア側システムバスから切り離されると
共に、制御回路50では、転送制御部64により許可信
号EN1が出力され、転送元アドレス設定部54が起動
される。
Thereafter, the start control unit 62 controls the permission signal E
T is set, and the transfer control unit 64 is activated. Here, as shown in FIG. 5, the first bus cycle B1 is C
Since the PU 10 accesses the ROM 12 (address C000h) and fetches an instruction, the fetch signal FT output from the CPU 10 goes to a high level, whereby the peri-side system bus is disconnected from the core-side system bus, and the control circuit 50 The permission signal EN1 is output by the transfer control unit 64, and the transfer source address setting unit 54 is activated.

【0035】その結果、出力許可信号OE1に従って転
送元間接アドレスカウンタ32の設定値(0600h)
がアドレスバスApに供給され、リード信号REにより
RAM14の該当番地から転送元アドレス(0a00
h)がデータバスDpに読み出され、更にこの転送元ア
ドレスは、ライト信号WE1により内部クロックCK1
の立上がりタイミングにて、転送元アドレスレジスタ3
4に格納される。
As a result, the set value (0600h) of the transfer source indirect address counter 32 according to the output permission signal OE1
Is supplied to the address bus Ap, and the source address (0a00) is read from the corresponding address of the RAM 14 by the read signal RE.
h) is read out to the data bus Dp, and the transfer source address is changed to the internal clock CK1 by the write signal WE1.
Source address register 3
4 is stored.

【0036】続くバスサイクルB2も、CPU10はR
OM12(C002h番地)をアクセスし、フェッチ信
号FTがHighレベルに維持されるため、制御回路50で
は、転送制御部64により許可信号EN2が出力され、
転送データ設定部56が起動される。
In the following bus cycle B2, the CPU 10
Since the OM 12 (address C002h) is accessed and the fetch signal FT is maintained at the high level, the control circuit 50 outputs the enable signal EN2 from the transfer control unit 64,
The transfer data setting unit 56 is activated.

【0037】その結果、出力許可信号OE2に従って転
送元アドレスレジスタ34に格納された転送元アドレス
(0a00h)がアドレスバスApに供給され、リード
信号REによりRAM14の該当番地から転送データ
(3355h)がデータバスDpに読み出され、更にこ
の転送データは、ライト信号WE2により内部クロック
CK1の立上がりタイミングにて、転送データレジスタ
38に格納される。これと共に、所定のタイミングにて
転送元間接アドレスカウンタ32の設定値がインクリメ
ントされ、次の間接アドレス(0602h)に更新され
る。
As a result, the transfer source address (0a00h) stored in the transfer source address register 34 is supplied to the address bus Ap according to the output permission signal OE2, and the transfer data (3355h) is transferred from the corresponding address of the RAM 14 by the read signal RE. The data is read onto the bus Dp, and the transfer data is stored in the transfer data register 38 at the rising timing of the internal clock CK1 by the write signal WE2. At the same time, the set value of the transfer source indirect address counter 32 is incremented at a predetermined timing, and is updated to the next indirect address (0602h).

【0038】バスサイクルB3では、CPU10はRA
M14(0e00h番地)をアクセスするため、フェッ
チ信号FTはLow レベルとなる。このため両システムバ
スは接続され、ペリ側システムバス上には、図中斜線に
て示すように、コア側システムバスの信号が表れる。こ
の時、制御回路50では、転送制御部64が待機状態と
なるため、DMA制御回路20による転送制御は中断さ
れる。
In the bus cycle B3, the CPU 10
To access M14 (address 0e00h), the fetch signal FT goes low. For this reason, both system buses are connected, and the signal of the core side system bus appears on the peri side system bus as shown by oblique lines in the figure. At this time, in the control circuit 50, the transfer control by the DMA control circuit 20 is interrupted because the transfer control unit 64 is in the standby state.

【0039】バスサイクルB4では、CPU10がRO
M12(C004h番地)をアクセスし、フェッチ信号
FTが再びHighレベルとなるため、ペリ側システムバス
がコア側システムバスから切り離されると共に、制御回
路50では、転送制御部64により許可信号EN3が出
力され、転送先アドレス設定部58が起動される。
In the bus cycle B4, the CPU 10
Since M12 (address C004h) is accessed and the fetch signal FT goes high again, the peri-side system bus is disconnected from the core-side system bus, and in the control circuit 50, the transfer controller 64 outputs the enable signal EN3. , The transfer destination address setting unit 58 is activated.

【0040】その結果、出力許可信号OE3に従って転
送先間接アドレスカウンタ42の設定値(0800h)
がアドレスバスApに供給され、リード信号REにより
RAM14の該当番地から転送先アドレス(0070
h)がデータバスDpに読み出され、更にこの転送先ア
ドレスは、ライト信号WE3により内部クロックCK1
の立上がりタイミングにて、転送先アドレスレジスタ4
4に格納される。
As a result, the set value (0800h) of the transfer destination indirect address counter 42 according to the output permission signal OE3
Is supplied to the address bus Ap, and the transfer destination address (0070) is read from the corresponding address of the RAM 14 by the read signal RE.
h) is read out to the data bus Dp, and the transfer destination address is changed to the internal clock CK1 by the write signal WE3.
Destination address register 4
4 is stored.

【0041】バスサイクルB5では、CPU10はRO
M12(C006h番地)をアクセスし、フェッチ信号
FTがHighレベルに維持されるため、制御回路50では
転送制御部64により許可信号EN4が出力され、転送
実行部60が起動されるその結果、出力許可信号OE4
aに従って転送先アドレスレジスタ44に格納された転
送先アドレス(0070h)、即ちシリアル通信回路1
8を指定するアドレスがアドレスバスApに、また、出
力許可信号OE4dに従って転送データレジスタ38に
格納された転送データ(3355h)がデータバスDp
に出力され、この転送データが、ライト信号WE4によ
り内部クロックCK1の立上がりタイミングにて、シリ
アル通信回路18に内蔵された送信バッファに書き込ま
れる。この時、シリアル通信回路18からの送信データ
書込許可信号EMが書込禁止を意味するLow レベルに変
化する。
In the bus cycle B5, the CPU 10
Since M12 (address C006h) is accessed and the fetch signal FT is maintained at the High level, in the control circuit 50, the transfer control unit 64 outputs the permission signal EN4, and the transfer execution unit 60 is activated. Signal OE4
a, the transfer destination address (0070h) stored in the transfer destination address register 44, ie, the serial communication circuit 1
8 on the address bus Ap, and the transfer data (3355h) stored in the transfer data register 38 according to the output enable signal OE4d.
The transfer data is written to the transmission buffer built in the serial communication circuit 18 at the rising timing of the internal clock CK1 by the write signal WE4. At this time, the transmission data write enable signal EM from the serial communication circuit 18 changes to the low level meaning write inhibit.

【0042】また、このバスサイクルB5では、転送先
間接アドレスカウンタがインクリメントされ、次の間接
アドレス(0802h)が設定されると共に、転送数カ
ウンタも1インクリメントされ1に設定される。続く、
バスサイクルB6,B7,B9では、バスサイクルB
1,B2,B4と同様に、転送元アドレス設定部54,
転送データ設定部56,転送先アドレス設定部58が順
次起動されることにより、転送データレジスタ38に転
送データ(4466h)、転送先アドレスレジスタ44
に転送先アドレス(0070h)が格納された状態とな
る。なお、バスサイクルB8では、バスサイクルB3と
同様に、フェッチ信号FTがLow レベルとなることによ
り転送制御が中断される。
In this bus cycle B5, the transfer destination indirect address counter is incremented, the next indirect address (0802h) is set, and the transfer number counter is also incremented by one and set to one. Continue,
In bus cycles B6, B7, and B9, bus cycle B
1, B2, B4, the transfer source address setting unit 54,
When the transfer data setting unit 56 and the transfer destination address setting unit 58 are sequentially activated, the transfer data (4466h) and the transfer destination address register 44 are stored in the transfer data register 38.
In which the transfer destination address (0070h) is stored. In the bus cycle B8, similarly to the bus cycle B3, the transfer control is interrupted when the fetch signal FT goes low.

【0043】そしてバスサイクルB10では、フェッチ
信号FTがHighレベルであるが、送信データ書込許可信
号EMがLow レベルであるため、転送制御部64が待機
状態となり、転送実行部60が起動されることなく転送
制御が中断される。その後、シリアル通信回路18にお
いて送信バッファに書き込まれたデータが処理され、バ
スサイクルBnにて送信バッファが空き状態となり、送
信データ書込許可信号EMがHighレベルになると、制御
回路50では転送制御部64が動作を再開し、次のバス
サイクルBn+1 にて転送実行部60を起動する。
In the bus cycle B10, the fetch signal FT is at the high level, but the transmission data write enable signal EM is at the low level. Therefore, the transfer control unit 64 is in a standby state, and the transfer execution unit 60 is started. Without interrupting the transfer control. Thereafter, the data written in the transmission buffer is processed in the serial communication circuit 18, and the transmission buffer becomes empty in the bus cycle Bn, and when the transmission data write enable signal EM goes high, the transfer control unit 50 64 resumes operation, and starts the transfer execution unit 60 in the next bus cycle Bn + 1.

【0044】その結果、バスサイクルB5と同様の動作
にて、転送データレジスタ38に格納された転送データ
(4466h)がシリアル通信回路18に書き込まれ、
送信データ書込許可信号EMは再度Low レベルとなる。
この時、転送先間接アドレスカウンタ42及び転送数カ
ウンタ26が夫々インクリメントされるが、これにより
転送数カウンタ26のカウント値は、転送数設定レジス
タ24の設定値と同じ2になり、比較器28から一致信
号CPが出力される。ここでは、モード信号TMにより
連続転送が指定されているので、開始制御部62により
許可信号EIが出力され、初期設定部52が起動され
る。
As a result, the transfer data (4466h) stored in the transfer data register 38 is written into the serial communication circuit 18 by the same operation as in the bus cycle B5.
The transmission data write enable signal EM goes low again.
At this time, the transfer destination indirect address counter 42 and the transfer number counter 26 are respectively incremented. As a result, the count value of the transfer number counter 26 becomes 2 which is the same as the set value of the transfer number setting register 24. A coincidence signal CP is output. Here, since the continuous transfer is designated by the mode signal TM, the start control unit 62 outputs the permission signal EI, and the initial setting unit 52 is activated.

【0045】その結果、転送数カウンタ26,転送元間
接アドレスカウンタ32,転送先間接アドレスカウンタ
42は初期設定され、以後、上述の動作が繰り返される
ことにより、RAM14の0a00h番地及び0b10
h番地に格納された値が順番に繰り返しシリアル通信回
路18に転送され、シリアル通信回路18にてシリアル
データに変換されて外部に出力される。
As a result, the transfer number counter 26, the transfer source indirect address counter 32, and the transfer destination indirect address counter 42 are initialized, and thereafter the above operations are repeated, so that the addresses 0a00h and 0b10
The value stored at the address h is repeatedly transferred to the serial communication circuit 18 in order, converted into serial data by the serial communication circuit 18, and output to the outside.

【0046】なお、モード信号TMにより1回転送が指
定されている場合は、一致信号CPを受けた開始制御部
62により許可信号ETがリセットされ、転送制御部6
4の動作が禁止されるため、以後、再度コントロールレ
ジスタにより転送開始が設定されない限り、転送制御は
行われない。
When the transfer is designated once by the mode signal TM, the permission signal ET is reset by the start control unit 62 which has received the coincidence signal CP, and the transfer control unit 6
Since the operation of No. 4 is prohibited, the transfer control is not performed unless transfer start is set again by the control register.

【0047】ところで、シリアル通信回路18におい
て、複数ワードの送信データを連続送信する場合、先の
送信データの下位8ビットが送信レジスタに取り込まれ
送信バッファが空になった後、スタートビットS,下位
データLDn,ストップビットSの送出が終了するまで
の間に、次の送信データを送信バッファに書き込んでお
く必要がある。
When the serial communication circuit 18 continuously transmits transmission data of a plurality of words, the lower 8 bits of the previous transmission data are taken into the transmission register and the transmission buffer becomes empty. Until the transmission of the data LDn and the stop bit S is completed, the next transmission data must be written in the transmission buffer.

【0048】ここで、内部クロックCK1,CK2の周
波数を32MHz、シリアル通信回路18におけるシリ
アルデータの送信速度を9600bpsとすると、1バ
スサイクルの周期は62.5(2/32)nsecであ
り、一方、シリアルデータ1ビットの送信に要する時間
は、約104.166(1/9600)μsecであ
る。つまり、シリアルデータの1ビットを送信する間
に、約1667(104.166/0.0625)回の
バスサイクルが実行されることになる。
Here, when the frequency of the internal clocks CK1 and CK2 is 32 MHz and the transmission speed of serial data in the serial communication circuit 18 is 9600 bps, the cycle of one bus cycle is 62.5 (2/32) nsec. The time required for transmitting one bit of serial data is about 104.166 (1/9600) μsec. In other words, about 1667 (104.166 / 0.0625) bus cycles are executed while transmitting one bit of serial data.

【0049】従って、シリアル通信回路18の送信バッ
ファが空になり、送信データ書込許可信号EMがLow レ
ベルからHighレベルに変化し、DMA制御回路20によ
る転送制御が可能にされた後、次のデータを書き込むま
でに少なくともシリアルデータ9ビット分、即ち、16
67×9回分のバスサイクルを実行する時間があり、そ
の間1回も命令フェッチが実行されないことは考えられ
ないので、この間に確実に次の送信データを送信バッフ
ァに書き込むことができ、シリアルデータの連続送信が
損なわれることがない。なおここでは、内部クロックC
K1,CK2の周波数を32MHzとしているが、これ
を例えば4MHz程度(更に低速でも可)にしても、連
続送信が損なわれることがないのは明かである。
Therefore, after the transmission buffer of the serial communication circuit 18 becomes empty, the transmission data write enable signal EM changes from the low level to the high level, and the transfer control by the DMA control circuit 20 is enabled, Before writing data, at least 9 bits of serial data, that is, 16 bits
There is a time to execute 67 × 9 bus cycles, and it is unlikely that no instruction fetch is executed during that time. Therefore, during this time, the next transmission data can be reliably written to the transmission buffer, and the serial data Continuous transmission is not impaired. Here, the internal clock C
Although the frequencies of K1 and CK2 are set to 32 MHz, it is apparent that continuous transmission is not impaired even if the frequency is set to, for example, about 4 MHz (even at a lower speed).

【0050】以上説明したように、参考例のMCUにお
いては、CPU10が命令フェッチしている時に、RA
M14及びシリアル通信回路18が接続されたペリ側シ
ステムバスを、CPU10及びROM12が接続された
コア側システムバスから電気的に切り離し、この切り離
されたペリ側システムバス上にてRAM14とシリアル
通信回路18との間のDMA転送を実行するようにされ
ている。
As described above, in the MCU of the reference example , when the CPU 10 is
The peripheral system bus to which the M14 and the serial communication circuit 18 are connected is electrically disconnected from the core system bus to which the CPU 10 and the ROM 12 are connected, and the RAM 14 and the serial communication circuit 18 are connected on the disconnected system bus. And a DMA transfer between them.

【0051】従って、参考例によれば、CPU10の動
作に何等影響を与えることなく、RAM14とシリアル
通信回路18との間のDMA転送を行うことができる。
即ち、命令フェッチ期間中は、CPU10,ROM12
以外の装置は空状態となっているので、この期間を利用
して、CPU10,ROM12が接続されたコア側シス
テムバスから他の部分(ペリ側システムバス)を切り離
しても、CPU10の動作に何等影響を与えることがな
く、この切り離されたペリ側システムバス上では、コア
側システムバスとは全く独立に制御を実行できるのであ
る。
Therefore, according to the reference example , DMA transfer between the RAM 14 and the serial communication circuit 18 can be performed without affecting the operation of the CPU 10 at all.
That is, during the instruction fetch period, the CPU 10 and the ROM 12
Since the other devices are in an empty state, even if other parts (peri-side system bus) are disconnected from the core-side system bus to which the CPU 10 and the ROM 12 are connected during this period, the operation of the CPU 10 is not affected. With no influence, control can be executed completely independently of the core system bus on the separated peri system bus.

【0052】そして、例えばプログラム等のデバッグ時
において、このRAM14及びシリアル通信回路18間
のDMA転送機能を用いれば、CPU10を実際の使用
時と全く同じ動作状態にしたままRAM値をモニタでき
るので、信頼性の高いデバッグを行うことができる。
When the DMA transfer function between the RAM 14 and the serial communication circuit 18 is used, for example, at the time of debugging a program or the like, the RAM value can be monitored while the CPU 10 is kept in the same operating state as in actual use. Highly reliable debugging can be performed.

【0053】また、参考例によれば、CPU10がフェ
ッチサイクルにあることを表すフェッチ信号FTに基づ
き、CPU10が命令フェッチ中である時には、いつで
もコア側及びペリ側のシステムバスが切り離されるよう
にされており、DMA転送を開始する際に、従来装置の
ようにDMA制御装置がCPU10にバスの解放を要求
したり、CPU10によるバスの解放を待つ必要がない
ので、効率よくDMA転送を実行できる。
Further, according to the reference example , the system buses on the core side and the peri side are always disconnected when the CPU 10 is fetching an instruction based on the fetch signal FT indicating that the CPU 10 is in the fetch cycle. When starting the DMA transfer, there is no need for the DMA control device to request the CPU 10 to release the bus or wait for the CPU 10 to release the bus as in the conventional device, so that the DMA transfer can be executed efficiently.

【0054】また、参考例においては、DMA制御回路
20に設けられたアドレスカウンタ32,42が、転送
元アドレス,転送先アドレスを直接指定するのではな
く、転送元アドレス,転送先アドレスを転送順に並べて
なる転送元アドレス格納領域、転送先アドレス格納領域
を指定することにより、間接的に転送元アドレス,転送
先アドレスを指定するようにされている。
In the reference example , the address counters 32 and 42 provided in the DMA control circuit 20 do not directly specify the source address and the destination address, but instead specify the source address and the destination address in the transfer order. By designating a transfer source address storage area and a transfer destination address storage area arranged side by side, a transfer source address and a transfer destination address are indirectly specified.

【0055】従って、参考例によれば、転送元,転送先
のアドレスが連続している必要がなく、転送単位である
1ワード毎に、転送元,転送先のアドレスを自由に設定
できる。その結果、転送元アドレス格納領域,転送先ア
ドレス格納領域に設定する転送元アドレス,送信先アド
レスとして、RAM14,周辺回路16,シリアル通信
回路18を指定するアドレスを任意に設定することによ
り、上述のようなRAM14とシリアル通信回路18と
の間の転送だけでなく、RAM14と周辺回路16との
間の転送、シリアル通信回路18と周辺回路16との間
の転送、周辺回路16どうしの転送、RAM14内での
転送等も容易に実現できる。
Therefore, according to the reference example , the addresses of the transfer source and the transfer destination do not need to be consecutive, and the addresses of the transfer source and the transfer destination can be freely set for each word as a transfer unit. As a result, as the transfer source address and the destination address set in the transfer source address storage area and the transfer destination address storage area, the addresses specifying the RAM 14, the peripheral circuit 16, and the serial communication circuit 18 are arbitrarily set. Not only the transfer between the RAM 14 and the serial communication circuit 18, but also the transfer between the RAM 14 and the peripheral circuit 16, the transfer between the serial communication circuit 18 and the peripheral circuit 16, the transfer between the peripheral circuits 16, the RAM 14 It is also possible to easily realize the transfer within the device.

【0056】なお、参考例のようなMCUを用い、周辺
回路16としてセンサや各種アクチュエータ等の駆動回
路を備えてなるコントローラを構成し、これを1チップ
化した場合、素子の小型化のためには、センサやアクチ
ュエータに接続する信号線や電源線以外は、外部に出す
端子をできるだけ少なくしたいのであるが、アドレスや
データバスが外部に出されていない場合、オシロスコー
プやロジックアナライザ等の計測器を用いてプログラム
のデバッグを行うことは困難になる。ところが、本実施
例では、シリアル通信回路18のシリアル端子を1本出
しておけば、これを用いてRAM値をモニタでき、従っ
て、MCUの素子サイズを大きくすることなく低コスト
でデバッグを容易にするための手段を付加できる。
A controller comprising a driving circuit such as a sensor or various actuators as the peripheral circuit 16 using the MCU as in the reference example , and forming this into a single chip, requires a miniaturization of the element. We want to minimize the number of external terminals except for signal lines and power lines connected to sensors and actuators.However, if the address and data buses are not external, use measuring instruments such as oscilloscopes and logic analyzers. It will be difficult to debug the program using it. However, in this embodiment, if a single serial terminal of the serial communication circuit 18 is provided, the RAM value can be monitored using the serial terminal, and therefore, debugging can be easily performed at low cost without increasing the element size of the MCU. Means can be added.

【0057】次に、本発明の実施例について説明する。
図6に示すように本実施例のMCUは、参考例と同様の
中央処理装置としてのCPU110,第1の記憶装置と
してのROM112,第2の記憶装置としてのRAM1
14,周辺回路116と、RAM114に格納された値
を読み出して所定のシリアルデータに変換し、ドライバ
118を介して外部に出力するRAM値モニタ回路12
0と、CPU110からのアドレスをデコードすること
により、CPU110がRAM114をアクセスするか
否かを表すバス選択信号BSを生成するバス切替制御手
段としてのデコーダ117と、バス選択信号BSに従い
RAM114を、CPU110,ROM112,周辺回
路116が接続されたメインバス(アドレスバスA,デ
ータバスD)、或はRAM値モニタ回路120が接続さ
れたローカルバス(アドレスバスLA,データバスL
D)のいずれかに接続するバス切替手段としての選択器
122,123とにより構成されている。
Next, an embodiment of the present invention will be described.
As shown in FIG. 6, the MCU of this embodiment has the same configuration as the reference example .
CPU 110 as a central processing unit, a first storage device,
ROM112 of to, RAM 1 as a second storage device
14, a peripheral circuit 116, and a RAM value monitor circuit 12 which reads a value stored in the RAM 114, converts the value into predetermined serial data, and outputs the serial data to the outside via a driver 118.
0 and a bus switching control method for generating a bus selection signal BS indicating whether the CPU 110 accesses the RAM 114 by decoding an address from the CPU 110.
In accordance with the decoder 117 as a stage and the bus selection signal BS, the RAM 114 is replaced with a main bus (address bus A, data bus D) to which the CPU 110, ROM 112 and peripheral circuit 116 are connected, or a local bus to which the RAM value monitor circuit 120 is connected. Bus (address bus LA, data bus L
D) and selectors 122 and 123 as bus switching means connected to either of them.

【0058】ここで、RAM値モニタ回路120は、転
送データのデータ数を設定するための転送数設定レジス
タ124と、カウント値をインクリメント信号CIによ
り1インクリメントし、クリア信号CRにより零クリア
する転送数カウンタ126と、転送数設定レジスタ12
4の設定値と転送数カウンタ126のカウント値とを比
較し、両者の値が一致すると一致信号CPを出力する比
較器128と、転送データが格納された領域のアドレス
(転送元アドレス)を順番に並べてなる転送元アドレス
格納領域の先頭アドレスを設定するための転送元先頭ア
ドレス設定レジスタ130と、ロード信号LDにより転
送元先頭アドレス設定レジスタ130の設定値をロード
してカウント値とし、このカウント値(転送元間接アド
レス)をインクリメント信号AIにより2インクリメン
トし、出力許可信号OEAに従ってローカルアドレスバ
スLAに出力する転送元間接アドレスカウンタ32と、
ライト信号WEAによってローカルデータバスLDから
データを取り込み、出力許可信号OEBに従ってローカ
ルアドレスバスLAにデータを出力する転送元アドレス
を格納するための転送元アドレスレジスタ134と、ラ
イト信号WEBによりローカルデータバスLDからデー
タを取り込み、データが空の時に送信バッファ空信号E
Mを出力する送信バッファ136と、データ転送の許可
/禁止、及び転送モード(1回転送/連続転送)を指定
するためのコントロールレジスタ138と、RAM値モ
ニタ回路120が出力するシリアルデータのフォーマッ
ト(パリティの有無,パリティの偶奇種別、ストップビ
ット長等)を指定するための通信フォーマット設定レジ
スタ140と、シリアルデータの通信速度(ボーレー
ト)を指定するための通信速度設定レジスタ142と、
通信速度設定レジスタ142に設定された通信速度に従
って所定の送信クロックを生成する送信クロック生成回
路144と、送信バッファ136からデータを取り込
み、送信クロック生成回路144が生成する送信クロッ
クにて、通信フォーマット設定レジスタ140にて指定
されたフォーマットのシリアルデータを作成して外部に
送出する送信レジスタ146と、により構成されてい
る。
Here, the RAM value monitor circuit 120 includes a transfer number setting register 124 for setting the number of data to be transferred, and a transfer number for incrementing the count value by one with an increment signal CI and clearing the count value to zero with a clear signal CR. Counter 126 and transfer number setting register 12
4 is compared with the count value of the number-of-transfers counter 126, and when the two values match, the comparator 128 that outputs the coincidence signal CP and the address (transfer source address) of the area where the transfer data is stored are sequentially ordered. The source start address setting register 130 for setting the start address of the source address storage area arranged in a row, and the set value of the source start address setting register 130 in response to the load signal LD are set as a count value. A transfer source indirect address counter 32 that increments (transfer source indirect address) by 2 with an increment signal AI and outputs the result to the local address bus LA in accordance with an output enable signal OEA;
A source address register 134 for storing a source address for fetching data from the local data bus LD by the write signal WEA and outputting the data to the local address bus LA in accordance with the output permission signal OEB, and a local data bus LD by the write signal WEB. Data from the transmission buffer empty signal E when the data is empty.
A transmission buffer 136 for outputting M, a control register 138 for designating permission / prohibition of data transfer and a transfer mode (single transfer / continuous transfer), and a format of serial data output from the RAM value monitor circuit 120 ( A communication format setting register 140 for specifying the presence / absence of parity, an even / odd type of parity, a stop bit length, a communication speed setting register 142 for specifying a communication speed (baud rate) of serial data;
Communication format setting is performed by a transmission clock generation circuit 144 that generates a predetermined transmission clock according to the communication speed set in the communication speed setting register 142 and a transmission clock generated by the transmission clock generation circuit 144 by taking in data from the transmission buffer 136. And a transmission register 146 that creates serial data in the format specified by the register 140 and sends it out.

【0059】なお、転送数設定レジスタ124、転送元
先頭アドレス設定レジスタ130、コントロールレジス
タ138、通信フォーマット設定レジスタ140、通信
速度設定レジスタ142については、CPU110の制
御により値が設定される。次に、図7は、制御回路15
0の概略構成を表す説明図である。
Values of the transfer number setting register 124, the transfer source head address setting register 130, the control register 138, the communication format setting register 140, and the communication speed setting register 142 are set under the control of the CPU 110. Next, FIG.
FIG. 4 is an explanatory diagram illustrating a schematic configuration of a zero.

【0060】図7に示すように、制御回路150は、転
送数カウンタ126のカウント値を零クリアし、転送元
間接アドレスカウンタ132に、転送元先頭アドレス設
定レジスタ30の設定値をロードして、RAM値モニタ
回路120を初期設定するためのクリア信号CR,ロー
ド信号LDを生成する初期設定部152と、転送元間接
アドレスカウンタ132に設定された転送元間接アドレ
スに基づき、RAM114から転送元アドレスを読み出
して転送元アドレスレジスタ134に設定するためリー
ド信号RE,ライト信号WEAを生成すると共に、次の
転送に備えるため転送元間接アドレスカウンタ132の
インクリメントするためのインクリメント信号AIを生
成する転送元アドレス設定部54と、転送元アドレスレ
ジスタ134に設定された転送元アドレスに基づき、
AM114から転送データを読み出し、送信バッファ1
36に書き込むためのリード信号RE,ライト信号WE
Bを生成すると共に、転送数カウンタ26のカウント値
をインクリメントするためのインクリメント信号CIを
生成する転送実行部160と、フェッチ信号FT,送信
データ書込許可信号EMに基づき、転送元アドレス設定
部154,転送実行部160の動作を許可する許可信号
ENA,ENBを生成し、データ転送の手順を制御する
転送制御部164と、スタート信号TS,モード信号T
M,一致信号CPに基づき、初期設定部152及び転送
制御部164の動作を許可する許可信号EI,ETを生
成する開始制御部162とを備えている。なお、上記各
部においては、互いに半周期だけ位相のずれた2相の内
部クロックCK1,CK2に同期して各制御が実行さ
れ、これに同期した制御信号が生成される。
As shown in FIG. 7, the control circuit 150 clears the count value of the transfer number counter 126 to zero, loads the transfer source indirect address counter 132 with the set value of the transfer source start address setting register 30, and Based on the initial setting unit 152 for generating the clear signal CR and the load signal LD for initial setting the RAM value monitor circuit 120 and the source indirect address set in the source indirect address counter 132, the transfer source address is read from the RAM 114. A transfer source address setting for generating a read signal RE and a write signal WEA for reading and setting in the transfer source address register 134, and for generating an increment signal AI for incrementing the transfer source indirect address counter 132 in preparation for the next transfer Unit 54 and the transfer source address register 134. Based on the specified source address, R
The transfer data is read from the AM 114 and the transmission buffer 1 is read.
36, a read signal RE and a write signal WE for writing to
B, a transfer execution unit 160 that generates an increment signal CI for incrementing the count value of the transfer number counter 26, and a transfer source address setting unit 154 based on a fetch signal FT and a transmission data write enable signal EM. , A transfer control unit 164 for generating permission signals ENA and ENB for permitting the operation of the transfer execution unit 160 and controlling the data transfer procedure, a start signal TS and a mode signal T
M and a start control unit 162 for generating permission signals EI and ET for permitting the operations of the initial setting unit 152 and the transfer control unit 164 based on the coincidence signal CP. In each of the above sections, each control is executed in synchronization with the two-phase internal clocks CK1 and CK2 whose phases are shifted from each other by a half cycle, and a control signal synchronized with this is generated.

【0061】なお、転送数設定レジスタ124,転送数
カウンタ126,比較器128,転送元先頭アドレス設
定レジスタ130,転送元間接アドレスカウンタ13
2,転送元アドレスレジスタ134,コントロールレジ
スタ138,制御回路150が本発明におけるDMA制
御回路に相当し、送信バッファ136,通信フォーマッ
ト設定レジスタ140,通信速度設定レジスタ142,
送信クロック生成回路144,送信レジスタ146が本
発明における出力装置に相当する。
The transfer number setting register 124, the transfer number
A counter 126, a comparator 128, and a transfer source start address are set.
Register 130, transfer source indirect address counter 13
2, transfer source address register 134, control register
138 and the control circuit 150 are DMA controllers according to the present invention.
Transmission buffer 136, communication format
Register 140, communication speed setting register 142,
The transmission clock generation circuit 144 and the transmission register 146
It corresponds to the output device in the invention.

【0062】ここで、開始制御部162については、
考例の開始制御部62と全く同様に動作するので説明を
省略する。一方、転送制御部164は、開始制御部16
2からの許可信号ETがセットされている場合にのみ動
作し、バス選択信号BSがLow レベルの時に、許可信号
ENA,ENBを、CPU110の1バスサイクル毎に
交互に出力する。但し、送信バッファ空信号EMがLow
レベルの時には、許可信号ENAのみ出力が可能であ
り、許可信号ENAを出力後は待機状態となる。そし
て、送信データ書込許可信号EMがHighレベルに戻る
と、次のバスサイクルにて許可信号ENBを出力して動
作を再開する。また、バス選択信号BSがHighレベルの
時は、直ちに待機状態となり、いずれの許可信号EN
A,ENBも出力しない。
[0062] In this case, for the start control section 162, participation
Since the operation is exactly the same as that of the start control unit 62 of the example, the description is omitted. On the other hand, the transfer control unit 164
It operates only when the permission signal ET is set from 2 and the permission signals ENA and ENB are alternately output every one bus cycle of the CPU 110 when the bus selection signal BS is at the low level. However, the transmission buffer empty signal EM is Low.
When the level is at the level, only the enable signal ENA can be output, and after outputting the enable signal ENA, the apparatus enters a standby state. Then, when the transmission data write enable signal EM returns to the high level, the enable signal ENB is output in the next bus cycle to resume the operation. When the bus selection signal BS is at the high level, the standby state is immediately set, and any of the permission signals EN is set.
Neither A nor ENB is output.

【0063】また、転送制御部164は、転送元間接ア
ドレスカウンタ132からデータをローカルアドレスバ
スLAに出力させるため出力許可信号OEAを生成す
る。なお、この出力許可信号OEAを反転させたものが
転送元アドレスレジスタ134の出力許可信号OEBと
され、常に、転送元間接アドレスカウンタ132或は転
送元アドレスレジスタ134のいずれか一方のデータが
ローカルアドレスバスLAに出力されるようにされてい
る。この出力許可信号OEAは、許可信号ENAが出力
される時には転送元間接アドレスカウンタ132からデ
ータが出力され、許可信号ENBが出力される時には転
送元アドレスレジスタ134からデータが出力されるよ
うに、許可信号ENA,ENBの終端にて信号レベルが
切り換えられる。
The transfer control section 164 generates an output permission signal OEA for causing the transfer source indirect address counter 132 to output data to the local address bus LA. The inverted output permission signal OEA is used as the output permission signal OEB of the transfer source address register 134, and the data of either the transfer source indirect address counter 132 or the transfer source address register 134 is always the local address. The signal is output to the bus LA. The output permission signal OEA is set so that data is output from the transfer source indirect address counter 132 when the enable signal ENA is output, and data is output from the transfer source address register 134 when the enable signal ENB is output. The signal level is switched at the end of the signals ENA and ENB.

【0064】以上のように構成されたRAM値モニタ回
路120によるDMA転送の動作を具体的に説明する。
なお、図8は、RAM114のメモリマップ、図9は、
DMA転送時のタイミング図である。図8に示すよう
に、アドレスの0000h〜3fffh番地がRAM1
14に割当られており、転送元アドレス格納領域(15
00h〜)が確保されている。
The DMA transfer operation by the RAM value monitor circuit 120 configured as described above will be specifically described.
8 is a memory map of the RAM 114, and FIG.
FIG. 4 is a timing chart at the time of DMA transfer. As shown in FIG. 8, addresses 0000h to 3ffffh are stored in RAM1.
14 and the transfer source address storage area (15
00h).

【0065】次に、図9に示すタイミング図に沿って動
作を説明する。ここでは、1200h番地,1000番
地,1050番地に夫々格納された各1ワードのデータ
(合計3ワード)を、繰り返し読み出してシリアルデー
タに変換し外部に送信する場合を例にとり説明する。
Next, the operation will be described with reference to the timing chart shown in FIG. Here, an example will be described in which data of one word (a total of three words) stored at addresses 1200h, 1000, and 1050 is read repeatedly, converted to serial data, and transmitted to the outside.

【0066】まず、初期化時等に、CPU110が、転
送元アドレス格納領域(1500h番地,1502h番
地,1504番地)に転送元アドレス(1200h,1
000h,1050h)を設定し、また、転送数設定レ
ジスタ124に転送数(3)、転送元先頭アドレス設定
レジスタ130に転送元アドレス格納領域の先頭アドレ
ス(1500h)を設定し、これと共に、通信フォーマ
ット設定レジスタ140,及び通信速度設定レジスタ1
42を設定する。
First, at the time of initialization or the like, the CPU 110 stores the transfer source address (1200h, 1h) in the transfer source address storage area (addresses 1500h, 1502h, and 1504).
000h, 1050h), the transfer number (3) is set in the transfer number setting register 124, and the start address (1500h) of the transfer source address storage area is set in the transfer source start address setting register 130. Setting register 140 and communication speed setting register 1
42 is set.

【0067】ここでは、通信フォーマット設定レジスタ
140は、パリティビットを付加せず、ストップビット
を1ビットに指定する。これにより、送信レジスタ14
6からは、図4に示す、参考例と同一フォーマットのシ
リアルデータが出力されることになる。
Here, the communication format setting register 140 designates one stop bit without adding a parity bit. Thereby, the transmission register 14
6 outputs serial data of the same format as that of the reference example shown in FIG.

【0068】その後、CPU110が、コントロールレ
ジスタ148を、データ転送許可,連続転送を指定して
セットすることにより、コントロールレジスタ148か
ら制御回路150にスタート信号TS,モード設定信号
TMが入力され、RAM値モニタ回路120によるDM
A転送制御が開始される。
Thereafter, the CPU 110 sets the control register 148 by designating data transfer permission and continuous transfer, whereby the start signal TS and the mode setting signal TM are input from the control register 148 to the control circuit 150, and the RAM value is set. DM by monitor circuit 120
A transfer control is started.

【0069】このようにして、スタート信号TSが入力
された制御回路150では、まず開始制御部162によ
り許可信号EIが出力され、初期設定部152が起動さ
れることにより、転送数カウンタ126が零クリアさ
れ、転送元間接アドレスカウンタ132に、転送元先頭
アドレス設定レジスタ130の設定値(1500h)が
ロードされ、この値がローカルアドレスバスLAに出力
される。
As described above, in the control circuit 150 to which the start signal TS is inputted, the permission signal EI is first outputted by the start control section 162 and the initial setting section 152 is activated, so that the transfer number counter 126 becomes zero. Cleared, the set value (1500h) of the transfer source start address setting register 130 is loaded into the transfer source indirect address counter 132, and this value is output to the local address bus LA.

【0070】その後、開始制御部162により許可信号
ETがセットされ、転送制御部164が起動される。こ
こでは、図9に示すように、最初のバスサイクルB1で
は、CPU110はRAM114をアクセスしていない
ため、デコーダ117から出力されるバス選択信号BS
はLow レベルとなり、RAM114は選択器122,1
23により、ローカルバスLA,LDに接続されると共
に、制御回路150では、転送制御部164により許可
信号ENAが出力され、転送元アドレス設定部154が
起動される。
Thereafter, the permission signal ET is set by the start control unit 162, and the transfer control unit 164 is activated. Here, as shown in FIG. 9, in the first bus cycle B1, since the CPU 110 does not access the RAM 114, the bus selection signal BS output from the decoder 117
Is at the low level, and the RAM 114 is provided with the selectors 122, 1
In the control circuit 150, the permission signal ENA is output by the transfer control unit 164, and the transfer source address setting unit 154 is activated.

【0071】その結果、ローカルアドレスバスLAには
転送元間接アドレスカウンタ32の設定値(1500
h)が供給されているので、リード信号REによりRA
M114の該当番地から転送元アドレス(1200h)
がローカルデータバスLDに読み出され、更にこの転送
元アドレスは、ライト信号WEAにより内部クロックC
K1の立上がりタイミングにて、転送元アドレスレジス
タ134に格納される。
As a result, the set value (1500) of the transfer source indirect address counter 32 is stored in the local address bus LA.
h) is supplied, the read signal RE causes RA
From the corresponding address of M114 to the transfer source address (1200h)
Is read to the local data bus LD, and the transfer source address is further changed by the write signal WEA to the internal clock C.
It is stored in the transfer source address register 134 at the rising timing of K1.

【0072】なお、このバスサイクルB1では、インク
リメント信号AIにより転送元間接アドレスカウンタ1
32がインクリメントされ、次の間接アドレス(150
2h)が設定されると共に、このバスサイクルB1の終
了時には、出力許可信号OEAが反転し、ローカルアド
レスバスLAには、転送元アドレスレジスタ134に設
定された転送元アドレスが出力される。
In this bus cycle B1, the transfer source indirect address counter 1 is controlled by the increment signal AI.
32 is incremented, and the next indirect address (150
2h) is set, and at the end of the bus cycle B1, the output permission signal OEA is inverted, and the transfer source address set in the transfer source address register 134 is output to the local address bus LA.

【0073】続くバスサイクルB2では、CPU110
はRAM114(0900h番地)をアクセスするた
め、バス選択信号BSはHighレベルとなり、RAM11
4は選択器122,123によりメインバスA,Dに接
続される。このためRAM入力アドレスバスRA,RA
M入出力データバスRD上には、図中斜線にて示すよう
に、メインバスA,Dの信号が表れる。この時、制御回
路150では転送制御部164が待機状態となるため、
RAM値モニタ回路120による転送制御は中断され
る。
In the following bus cycle B2, the CPU 110
Accesses the RAM 114 (address 0900h), the bus selection signal BS goes high, and the RAM 11
4 is connected to main buses A and D by selectors 122 and 123. Therefore, the RAM input address buses RA, RA
Signals of the main buses A and D appear on the M input / output data bus RD as shown by hatching in the figure. At this time, in the control circuit 150, since the transfer control unit 164 is in a standby state,
The transfer control by the RAM value monitor circuit 120 is interrupted.

【0074】バスサイクルB3では、CPU110がR
AM114をアクセスせず、バス選択信号BSが再びLo
w レベルとなるため、RAM114がローカルバスL
A,LDに接続されると共に、制御回路150では、転
送制御部164により許可信号ENBが出力され、転送
実行部160が起動される。
In bus cycle B3, CPU 110
The AM 114 is not accessed, and the bus selection signal BS changes to Lo again.
w level, the RAM 114
In the control circuit 150, the permission signal ENB is output by the transfer control unit 164, and the transfer execution unit 160 is activated.

【0075】その結果、ローカルアドレスバスLAに
は、転送元アドレスレジスタ134に格納された転送先
アドレス(1200h)が供給されているので、リード
信号REによりRAM114の該当番地から転送データ
(9abch)がローカルデータバスLDに読み出さ
れ、この転送データが、ライト信号WEBにより内部ク
ロックCK1の立上がりタイミングにて、送信バッファ
136に書き込まれる。この時、送信バッファ空信号E
Mは書込禁止を意味するLow レベルに変化する。
As a result, since the transfer destination address (1200h) stored in the transfer source address register 134 is supplied to the local address bus LA, the transfer data (9abch) is transferred from the corresponding address of the RAM 114 by the read signal RE. The data is read to the local data bus LD, and the transfer data is written to the transmission buffer 136 by the write signal WEB at the rising timing of the internal clock CK1. At this time, the transmission buffer empty signal E
M changes to a low level meaning write-protection.

【0076】また、このバスサイクルB3では、転送数
カウンタがインクリメントされ1に設定されると共に、
バスサイクルB3の終了時には、出力許可信号OEAが
反転し、ローカルアドレスバスLAには、転送元間接ア
ドレスカウンタ132の設定値(1502h)が出力さ
れる。
In the bus cycle B3, the transfer number counter is incremented and set to 1, and
At the end of the bus cycle B3, the output permission signal OEA is inverted, and the set value (1502h) of the transfer source indirect address counter 132 is output to the local address bus LA.

【0077】なお、送信バッファ136に書き込まれた
データは、送信レジスタ146に8ビットずつ取り込ま
れ、通信フォーマット設定レジスタ140にて指定され
たフォーマットに変換され、通信速度設定レジスタ14
2にて指定された通信速度に基づき送信クロック生成回
路144にて生成された送信クロックにてドライバ11
8を介して外部に出力される。
The data written in the transmission buffer 136 is fetched into the transmission register 146 by 8 bits, converted into the format designated by the communication format setting register 140, and converted into the format specified by the communication speed setting register 140.
The driver 11 uses the transmission clock generated by the transmission clock generation circuit 144 based on the communication speed specified in Step 2.
8 to the outside.

【0078】続く、バスサイクルB4では、バスサイク
ルB1と同様に、転送元アドレス設定部154が起動さ
れることにより、転送元アドレスレジスタ134に転送
元アドレス(1000h)が設定され、この転送元アド
レスがローカルアドレスバスLAに出力された状態とな
る。
In the following bus cycle B4, the transfer source address (1000h) is set in the transfer source address register 134 by activating the transfer source address setting unit 154, similarly to the bus cycle B1. Is output to the local address bus LA.

【0079】そしてバスサイクルB5では、バス選択信
号BSがLow レベルであるが、送信バッファ空信号EM
がLow レベルであるため、転送制御部164が待機状態
となり、転送実行部160が起動されることなく転送制
御が中断される。以後、図示していないが、参考例と同
様に、送信バッファ136に書き込まれたデータが送信
レジスタ146に取り込まれ、送信バッファが空き状態
となり、送信バッファ空信号EMがHighレベルになる
と、制御回路150では転送制御部164が動作を再開
して転送実行部160を起動し、その結果、バスサイク
ルB3と同様の動作にて、転送元アドレスレジスタ13
4に設定された転送元アドレス(1000h)に基づ
き、RAM114の該当番地から読み出された転送デー
タ(1234h)が送信バッファ136に書き込まれ、
送信バッファ空信号EMは再度Low レベルとなる。この
時、転送数カウンタ126のカウント値がインクリメン
トされる。以後同様の制御が繰り返され、3番目のデー
タが送信バッファに書き込まれた時に、転送数カウンタ
126のカウント値がインクリメントされて転送数設定
レジスタ124の設定値と同じ3になると、比較器12
8から一致信号CPが出力される。すると、参考例と同
様に、モード信号TMにより連続転送が指定されていれ
るのであれば、転送数カウンタ126,転送元間接アド
レスカウンタ132が初期設定され、同様の転送を繰り
返し、モード信号TMにより一回転送が指定されていれ
ば、転送制御部164の動作が禁止され、転送制御は終
了する。
In the bus cycle B5, although the bus selection signal BS is at the low level, the transmission buffer empty signal EM
Is at a low level, the transfer control unit 164 enters a standby state, and the transfer control is interrupted without activating the transfer execution unit 160. Thereafter, although not shown, similarly to the reference example , the data written in the transmission buffer 136 is taken into the transmission register 146, the transmission buffer becomes empty, and when the transmission buffer empty signal EM becomes high level, the control circuit In 150, the transfer control unit 164 resumes the operation and starts the transfer execution unit 160. As a result, the transfer source address register 13 is operated in the same operation as the bus cycle B3.
4, the transfer data (1234h) read from the corresponding address in the RAM 114 is written into the transmission buffer 136 based on the transfer source address (1000h) set to 4,
The transmission buffer empty signal EM goes low again. At this time, the count value of the transfer number counter 126 is incremented. Thereafter, the same control is repeated. When the third data is written into the transmission buffer, when the count value of the transfer number counter 126 is incremented to 3 which is the same as the set value of the transfer number setting register 124, the comparator 12
8 outputs a coincidence signal CP. Then, as in the reference example , if continuous transfer is designated by the mode signal TM, the transfer number counter 126 and the transfer source indirect address counter 132 are initialized, and the same transfer is repeated. If the retransmission is specified, the operation of the transfer control unit 164 is prohibited, and the transfer control ends.

【0080】以上、説明したように、本実施例のMCU
においては、CPU110がRAM114にアクセスし
ていない時に、RAM114を、CPU110,ROM
112,周辺回路116が接続されたメインバスA,D
から電気的に切り離して、RAM値モニタ回路120が
接続されたローカルバスLA,LDに接続することによ
り、メインバス上の制御とは独立に、ローカルバス上に
て、RAM114及びRAM値モニタ回路120による
RAM値のDMA転送を行うようにされている。
As described above, the MCU of this embodiment is
, When the CPU 110 is not accessing the RAM 114, the RAM 114 is
112 and main buses A and D to which the peripheral circuit 116 is connected.
The RAM 114 and the RAM value monitor circuit 120 are connected to the local buses LA and LD to which the RAM value monitor circuit 120 is connected, independently of the control on the main bus. DMA transfer of the RAM value is performed.

【0081】従って、本実施例によれば、参考例と同様
に、CPU110の動作に何等影響を与えることなく、
RAM114とRAM値モニタ回路120の送信バッフ
ァ136との間のDMA転送を行うことができ、その結
果、プログラム等のデバッグ時に、このDMA転送機能
を用いれば、CPU110を実際の使用時と全く同じ動
作状態にしたままRAM値をモニタでき、信頼性の高い
デバッグを行うことができる。
Therefore, according to the present embodiment, similar to the reference example , without affecting the operation of the CPU 110 at all.
DMA transfer between the RAM 114 and the transmission buffer 136 of the RAM value monitor circuit 120 can be performed. As a result, when this DMA transfer function is used when debugging a program or the like, the CPU 110 operates in exactly the same way as when actually used. The RAM value can be monitored in the state, and highly reliable debugging can be performed.

【0082】また、本実施例によれば、CPU110か
らのアドレスをデコードすることでRAM114へのア
クセスの有無を判断し、バスを切り換えるようにされて
いる。従って、CPU110の命令フェッチ時だけでな
く、周辺回路16へのアクセス時にも、RAM114は
ローカルバスに接続され、DMA転送が可能となるた
め、参考例に比べて、DMA転送に使用できる時間が多
く、より効率よくDMA転送を実行できる。
Further, according to the present embodiment, the presence or absence of access to the RAM 114 is determined by decoding the address from the CPU 110, and the bus is switched. Therefore, not only when the CPU 110 fetches an instruction, but also when the peripheral circuit 16 is accessed, the RAM 114 is connected to the local bus and can perform DMA transfer, so that a longer time can be used for DMA transfer than in the reference example. DMA transfer can be performed more efficiently.

【0083】更に、本実施例によれば、ローカルバスに
は、RAM114以外はRAM値モニタ回路120のみ
を接続し、転送の形態をRAM114から送信バッファ
136への転送のみに限定したことにより、参考例に比
べて、転送先アドレス設定のための制御が省略されてい
るので、より高速なデータ転送を行うことができる。
[0083] Further, according to this embodiment, by a local bus, which connects only the RAM value monitoring circuit 120 except RAM 114, is limited only to the transfer of the form of the transfer from RAM 114 to the transmission buffer 136, reference Since the control for setting the transfer destination address is omitted as compared with the example , higher-speed data transfer can be performed.

【0084】以上、本発明の実施例について説明した
が、本発明は上記実施例に限定されるものではなく、本
発明の要旨を逸脱しない範囲で様々な態様にて実施でき
る。例えば、上記実施例では、シリアル通信回路18や
RAM値モニタ回路120により、RAM14,114
から読み出したデータをシリアルデータに変換して外部
に出力するように構成されているが、パラレルデータの
まま外部に出力してもよい。
Although the embodiments of the present invention have been described above, the present invention is not limited to the above embodiments, and can be implemented in various modes without departing from the gist of the present invention. For example, in the above embodiment, the serial communication circuit 18 and the RAM value monitor circuit 120 use the RAMs 14 and 114
Although the data read from the device is configured to be converted into serial data and output to the outside, the data may be output to the outside as parallel data.

【0085】また、上記実施例において、アドレスカウ
ンタ32,42,132は、転送元アドレス及び転送先
アドレスを直接指定するのではなく、これら転送元アド
レス及び転送先アドレスが転送順に並べられたアドレス
格納格納領域を指定することにより、間接的に転送元ア
ドレス及び転送先アドレスを指定するように構成されて
いるが、アドレスカウンタにて、転送元アドレス及び転
送先アドレスを直接に指定するように構成してもよい。
この場合、転送元アドレス、転送先アドレスを設定する
ための制御を省略できるので、回路構成を単純にできる
と共に、制御の高速化も実現できる。
In the above embodiment, the address counters 32, 42, and 132 do not directly specify the source address and the destination address, but store an address in which the source address and the destination address are arranged in the transfer order. Although the transfer source address and the transfer destination address are indirectly specified by specifying the storage area, the transfer counter and the transfer destination address are directly specified by the address counter. You may.
In this case, control for setting the transfer source address and the transfer destination address can be omitted, so that the circuit configuration can be simplified and the control can be speeded up.

【0086】更に、参考例では、CPU10が出力する
フェッチ信号FTによりゲート22を制御し、本実施例
では、アドレスをデコードして得られるバス選択信号B
SによりRAM114の接続を制御するように構成され
ているが、本実施例にてフェッチ信号FTを用いて夫々
の制御を行ってもよい。
Further, in the reference example , the gate 22 is controlled by the fetch signal FT output from the CPU 10, and in the present embodiment , the bus selection signal B obtained by decoding the address is used.
Although the connection of the RAM 114 is controlled by S, each control may be performed using the fetch signal FT in the present embodiment .

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

【図1】 参考例のMCUの全体構成を表すブロック図
である。
FIG. 1 is a block diagram illustrating an overall configuration of an MCU according to a reference example .

【図2】 制御回路50の概略構成を表す説明図であ
る。
FIG. 2 is an explanatory diagram illustrating a schematic configuration of a control circuit 50.

【図3】 参考例のMCUにおけるメモリマップであ
る。
FIG. 3 is a memory map in an MCU of a reference example .

【図4】 シリアル通信回路18から出力されるシリア
ルデータのフォーマットを表す説明図である。
4 is an explanatory diagram showing a format of serial data output from a serial communication circuit 18. FIG.

【図5】 参考例のMCU全体の動作を表すタイミング
図である。
FIG. 5 is a timing chart illustrating the operation of the entire MCU of the reference example .

【図6】 実施例のMCUの全体構成を表すブロック図
である。
FIG. 6 is a block diagram illustrating an entire configuration of an MCU according to the embodiment .

【図7】 制御回路150の概略構成を表す説明図であ
る。
FIG. 7 is an explanatory diagram illustrating a schematic configuration of a control circuit 150.

【図8】 RAM114のメモリマップである。FIG. 8 is a memory map of a RAM 114.

【図9】 実施例のMCU全体の動作を表すタイミング
図である。
FIG. 9 is a timing chart illustrating an operation of the entire MCU according to the embodiment .

【図10】 従来装置の構成を表すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a conventional device.

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

10,110…CPU 12,112…ROM 1
4,114…RAM 16,116…周辺回路 18…シリアル通信回路 2
0…DMA制御回路 22…ゲート 24,124…転送数設定レジスタ 26,126…転送数カウンタ 28,128…比較
器 30,130…転送元先頭アドレス設定レジスタ 32,132…転送元間接アドレスカウンタ 34,134…転送元アドレスレジスタ 36,46
…バス変換回路 38,138…転送データレジスタ 40…転送先先頭
アドレス設定レジスタ 42…転送先間接アドレスカウンタ 44…転送先アド
レスレジスタ 48,148…コントロールレジスタ 50,150
…制御回路 117…デコーダ 118…ドライバ 120…R
AM値モニタ回路 122,123…選択器 136…送信バッファ 140…通信フォーマット設定レジスタ 142…通
信速度設定レジスタ 144…送信クロック生成回路 146…送信レジス
10, 110 ... CPU 12, 112 ... ROM 1
4,114 RAM 16,116 peripheral circuit 18 serial communication circuit 2
0 ... DMA control circuit 22 ... Gate 24,124 ... Transfer number setting register 26,126 ... Transfer number counter 28,128 ... Comparator 30,130 ... Transfer source start address setting register 32,132 ... Transfer source indirect address counter 34, 134: transfer source address register 36, 46
... bus conversion circuits 38,138 transfer data register 40 transfer destination start address setting register 42 transfer destination indirect address counter 44 transfer destination address register 48,148 control register 50,150
... Control circuit 117 ... Decoder 118 ... Driver 120 ... R
AM value monitor circuits 122, 123 ... selector 136 ... transmission buffer 140 ... communication format setting register 142 ... communication speed setting register 144 ... transmission clock generation circuit 146 ... transmission register

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平4−267455(JP,A) 特開 昭61−6754(JP,A) 特開 昭54−40040(JP,A) 特開 平5−53972(JP,A) 特開 昭61−259358(JP,A) 特開 平3−253960(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 13/28,13/36,13/38 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-4-267455 (JP, A) JP-A-61-6754 (JP, A) JP-A-54-40040 (JP, A) JP-A-5-405 53972 (JP, A) JP-A-61-259358 (JP, A) JP-A-3-253960 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 13/28, 13 / 36,13 / 38

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 予め設定されたプログラムに従って処理
を実行する中央処理装置,該中央処理装置が実行するプ
ログラムが格納された第1の記憶装置,上記中央処理装
置の処理に応じてデータが読み書きされる第2の記憶装
置,上記中央処理装置により制御される各種周辺回路,
外部装置に対してデータを出力するための出力装置,及
び上記各装置が接続されるシステムバスを備えたマイク
ロコンピュータにおいて上記第2の記憶装置と上記出力
装置との間のデータ転送を制御するためのデータ転送装
置であって、 上記システムバスが、上記中央処理装置,上記第1の記
憶装置,及び上記周辺回路が接続されたメインバスと、
上記出力装置が接続され上記メインバスとは電気的に切
り離されたローカルバスとからなり、 外部からのバス切換指令に従い、上記第2の記憶装置を
上記メインバス或は上記ローカルバスのいずれかに択一
的に接続するバス切換手段と、 上記ローカルバスに接続され、上記第2の記憶装置及び
上記出力装置の間のDMA転送を制御するDMA制御回
路と、 上記中央処理装置が上記第2の記憶装置をアクセスして
いない時に、上記第2の記憶装置を上記ローカルバスに
接続させるバス切換指令を上記バス切換手段に出力する
バス切換制御手段と、 上記バス切換手段により、上記第2の記憶装置が上記ロ
ーカルバスに接続されている時に、上記DMA制御回路
を動作させる転送制御手段と、 を備え、更に、 前記第2の記憶装置に、転送データが格納された領域の
アドレスである転送元アドレスを順番に並べてなる転送
元アドレス格納領域を設けると共に、 上記DMA制御回路は、 転送データのデータ数を設定するための転送数設定レジ
スタと、 転送数をカウントする転送数カウンタと、 転送数設定レジスタの設定値と転送数カウンタのカウン
ト値とを比較し、両者 が一致すると一致信号を出力する
比較器と、 上記転送元アドレス格納領域の先頭アドレスを設定する
ための転送元先頭アドレス設定レジスタと、 該転送元先頭アドレス設定レジスタの設定値がカウント
値としてロードされ、該カウント値のインクリメント及
びローカルアドレスバスへの出力をする転送元間接アド
レスカウンタと、 ローカルデータバスからの転送元アドレスの取込、及び
該転送元アドレスのローカルアドレスバスへの出力を行
う転送元アドレスレジスタと、 上記転送数カウンタのカウント値の零クリア及び上記転
送元間接アドレスカウンタへの上記転送元先頭アドレス
設定レジスタの設定値のロードを行うための制御信号を
生成する初期設定部、該転送元間接アドレスカウンタの
設定値に基づき上記第2の記憶装置から読み出された転
送元アドレスの上記転送元アドレスレジスタへの設定及
び上記転送元間接アドレスカウンタのインクリメントを
行うための制御信号を生成する転送元アドレス設定部、
上記転送元アドレスレジスタに設定された転送元アドレ
スに基づき上記第2の記憶装置から読み出された転送デ
ータの上記出力装置の送信バッファへの書込及び上記転
送数カウンタのインクリメントを行うための制御信号を
生成する転送実行部、上記バス切替手段により上記第2
の記憶装置が上記ローカルバスに接続されている時に、
上記転送元アドレス設定部及び上記転送実行部を交互に
動作させてデータ転送の手順を制御する転送制御部、上
記初期設定部を動作させたあと上記転送制御部を起動
し、上記比較器からの一致信号が入力されると同様の動
作を繰り返す開始制御部を備えた制御回路と、 を備える ことを特徴とするマイクロコンピュータのデー
タ転送装置。
1. A central processing unit for executing processing according to a preset program, a first storage device storing a program to be executed by the central processing unit, and data being read and written according to the processing of the central processing unit. A second storage device, various peripheral circuits controlled by the central processing unit,
An output device for outputting data to an external device, and a microcomputer having a system bus to which the above devices are connected, the second storage device and the output device
A data transfer device for controlling data transfer between devices, said system bus, a main bus the central processing unit, the upper Symbol first storage device, and that the peripheral circuit is connected,
A local bus electrically connected to the output device and separated from the main bus, and the second storage device is connected to either the main bus or the local bus in accordance with a bus switching command from outside. Bus switching means for alternatively connecting, the second storage device connected to the local bus, and
A DMA control circuit for controlling DMA transfer between the output devices ; and a bus switching command for connecting the second storage device to the local bus when the central processing unit is not accessing the second storage device. Bus transfer control means for outputting to the bus switch means, and transfer control means for operating the DMA control circuit when the second storage device is connected to the local bus by the bus switch means. provided, further, in the second storage device, the area of the transfer data is stored
Transfers in which source addresses, which are addresses, are arranged in order
In addition to providing an original address storage area, the DMA control circuit includes a transfer number setting register for setting the number of transfer data.
The transfer number counter that counts the number of transfers , the transfer value setting register, and the count of the transfer number counter.
Value and outputs a match signal if they match.
Set the comparator and the start address of the transfer source address storage area
Source start address setting register and the set value of the source start address setting register
Is loaded as a value, and the count value is incremented and
Source indirect address that outputs to the local address bus
Address counter, capture of the transfer source address from the local data bus, and
Outputs the transfer source address to the local address bus.
The transfer source address register, clear the count value of the transfer number counter to zero, and
The above transfer source start address to the source indirect address counter
Control signal for loading the setting value of the setting register
The initial setting unit to generate the transfer source indirect address counter
The data read from the second storage device based on the set value
Set the source address in the transfer source address register and
And increment the transfer source indirect address counter
Transfer source address setting unit for generating a control signal for performing
The transfer source address set in the transfer source address register above
Transfer data read from the second storage device based on the
Data to the transmission buffer of the output device and the
Control signal for incrementing the transmission counter
A transfer execution unit for generating the second data;
When the storage device is connected to the local bus,
The transfer source address setting section and the transfer execution section are alternately performed.
Transfer control unit that operates to control the data transfer procedure
Activate the transfer control section after operating the initial setting section
When the match signal is input from the comparator, the same operation is performed.
A data transfer device for a microcomputer , comprising: a control circuit including a start control unit that repeats operations .
【請求項2】 請求項1に 記載のマイクロコンピュータ
のデータ転送装置において、 上記バス切換手段は、上記中央処理装置からのアドレス
をデコードすることにより、上記第2の記憶装置がアク
セスされているか否かを判断する判定手段を備えること
を特徴とするマイクロコンピュータのデータ転送装置。
2. A data transfer device for a microcomputer according to claim 1, wherein said bus switching means decodes an address from said central processing unit to determine whether said second storage device is being accessed. A data transfer device for a microcomputer, comprising: a determination unit for determining whether the data transfer is performed.
【請求項3】 請求項1又は請求項2 に記載のマイクロ
コンピュータのデータ転送装置において、 上記入出力装置が、上記第2の記憶装置からの転送デー
タをシリアルデータに変換して外部に送出するシリアル
通信装置であることを特徴とするマイクロコンピュータ
のデータ転送装置。
3. The data transfer device for a microcomputer according to claim 1 , wherein the input / output device converts transfer data from the second storage device into serial data and sends the serial data to the outside. A data transfer device for a microcomputer, which is a serial communication device.
JP19050395A 1995-07-26 1995-07-26 Microcomputer data transfer device Expired - Fee Related JP3267110B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19050395A JP3267110B2 (en) 1995-07-26 1995-07-26 Microcomputer data transfer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19050395A JP3267110B2 (en) 1995-07-26 1995-07-26 Microcomputer data transfer device

Publications (2)

Publication Number Publication Date
JPH0944442A JPH0944442A (en) 1997-02-14
JP3267110B2 true JP3267110B2 (en) 2002-03-18

Family

ID=16259180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19050395A Expired - Fee Related JP3267110B2 (en) 1995-07-26 1995-07-26 Microcomputer data transfer device

Country Status (1)

Country Link
JP (1) JP3267110B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11184804A (en) 1997-12-22 1999-07-09 Nec Corp Information processor and information processing method
JP2011175537A (en) * 2010-02-25 2011-09-08 Toshiba Corp Apparatus and method for processing information

Also Published As

Publication number Publication date
JPH0944442A (en) 1997-02-14

Similar Documents

Publication Publication Date Title
US5574848A (en) Can interface selecting one of two distinct fault recovery method after counting a predetermined number of recessive bits or good can frames
JP2678283B2 (en) Data communication controller
US6370596B1 (en) Logic flag registers for monitoring processing system events
US20060155907A1 (en) Multiprocessor system
US6581119B1 (en) Interrupt controller and a microcomputer incorporating this controller
JP3267110B2 (en) Microcomputer data transfer device
US5430853A (en) Update of control parameters of a direct memory access system without use of associated processor
KR100949168B1 (en) Controller
JP2508038B2 (en) Programmable controller
US5125079A (en) Method for controlling the data transmission of a central unit interfacing control circuit and circuit arrangement for the implementation of the method
JP3615306B2 (en) Storage device access system
JPH06161891A (en) Computer system and cache control method for cache control means
JP3367949B2 (en) Image data processing device
JPH10116245A (en) Dma controller
JP2739783B2 (en) Data transfer method between packages
JP2638505B2 (en) Bus interface device
JPH0546529A (en) Direct memory access system
JPH11288401A (en) Programmable controller
KR100962306B1 (en) Bidirectional data transmission apparatus and the method thereof for embedded system
JP3146864B2 (en) Unidirectional loop transmission circuit
JPH10312360A (en) Method for reception processing and reception device
JP2000172307A (en) Method for updating process data collection device
JPH1153131A (en) Printing device
JPH0311848A (en) Communication controller
JPH03138752A (en) Information processor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140111

Year of fee payment: 12

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees