JPH0784835A - Microcomputer system - Google Patents

Microcomputer system

Info

Publication number
JPH0784835A
JPH0784835A JP5233085A JP23308593A JPH0784835A JP H0784835 A JPH0784835 A JP H0784835A JP 5233085 A JP5233085 A JP 5233085A JP 23308593 A JP23308593 A JP 23308593A JP H0784835 A JPH0784835 A JP H0784835A
Authority
JP
Japan
Prior art keywords
microcomputer
processing unit
central processing
terminal
bus
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.)
Withdrawn
Application number
JP5233085A
Other languages
Japanese (ja)
Inventor
Masanori Yamada
正則 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP5233085A priority Critical patent/JPH0784835A/en
Publication of JPH0784835A publication Critical patent/JPH0784835A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Logic Circuits (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To prevent the microcomputer system from stopping operation unless 'H' is sent out of the ready terminal RDY of an external circuit consisting of a memory and an I/O device connected to the microcomputer. CONSTITUTION:When the microcomputer accesses the memory and I/O device, a counter 34 counts a system clock CLK unless 'H' is sent out of the ready terminal RDY of the memory and I/O device, and a system reset RST is generated by a D-FF 36 a certain time later in synchronism with the system clock CLK.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ワンチップ(以下、1
チップという)等で形成されたマイクロコンピュータ
(以下、マイコンという)と、それに接続される外部メ
モリ及び入出力(Input/Output、以下、I/Oという)
デバイス等の外部回路とを備えたマイコンシステム、特
にその外部回路に対するアクセスを行うためのバスイン
ターフェイスに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention
A microcomputer (hereinafter referred to as a microcomputer) formed by a chip or the like, an external memory connected to the microcomputer and input / output (hereinafter referred to as I / O)
The present invention relates to a microcomputer system including an external circuit such as a device, and particularly to a bus interface for accessing the external circuit.

【0002】[0002]

【従来の技術】例えば、1チップマイコンには、アクセ
ス時間の大きいメモリ或いはI/Oデバイスを使用した
場合に、アクセスサイクルを延長する目的でレディ(R
EADY、以下、RDYという)端子が設けられてい
る。図2は、従来のマイコンシステムの一構成例を示す
概略のブロック図である。このマイコン1は、1チップ
で構成され、プログラムに従って演算処理を行う中央処
理装置(Central Processing Unit 、以下、CPUとい
う)、プログラムを記憶するプログラムメモリ、CPU
からのデータの書き込みと読み出しを行うデータメモ
リ、及び外部機器との間でデータのやり取りを行うI/
O部等を有している。マイコン1は、アドレス出力用の
アドレス端子A0〜A15、データ入出力用のデータ端
子D0〜D7、メモリ読み出し信号を出力する逆相リー
ドストローブ端子RD/、及びメモリ書き込み信号を出
力する逆相ライトストローブ端子WR/、I/Oデバイ
ス読み出し信号を出力する逆相IOリードストローブ端
子IORD/、I/Oデバイス書き込み信号を出力する
逆相IOライトストローブ端子IOWR/、及び外部回
路の動作準備の完了信号を入力するレディ端子RDYを
備えている。
2. Description of the Related Art For example, in a one-chip microcomputer, when a memory or an I / O device having a long access time is used, a ready (R) is provided for the purpose of extending the access cycle.
EADY (hereinafter, referred to as RDY) terminals are provided. FIG. 2 is a schematic block diagram showing a configuration example of a conventional microcomputer system. The microcomputer 1 is composed of one chip, and a central processing unit (hereinafter referred to as CPU) that performs arithmetic processing according to a program, a program memory that stores the program, and a CPU.
Data memory for writing and reading data from and to I / O for exchanging data with external devices
It has an O section and the like. The microcomputer 1 has address terminals A0 to A15 for address output, data terminals D0 to D7 for data input / output, a negative phase read strobe terminal RD / for outputting a memory read signal, and a negative phase write strobe for outputting a memory write signal. The terminal WR /, the anti-phase IO read strobe terminal IORD / that outputs the I / O device read signal, the anti-phase IO write strobe terminal IOWR / that outputs the I / O device write signal, and the completion signal of the operation preparation of the external circuit It has a ready terminal RDY for input.

【0003】アドレス端子A0〜A15及びデータ端子
D0〜D7は、アドレスバス2及びデータバス3を介し
て、データを記憶するメモリ4のアドレス端子A0〜A
15、及びデータ端子D0〜D7に接続されると共に、
外部機器とデータの授受を行うI/Oデバイス5のアド
レス端子A0〜A15、及びデータ端子D0〜D7に接
続されている。逆相リードストローブ端子RD/及び逆
相ライトストローブ端子WR/は、メモリ4の逆相出力
イネーブル端子OE/及び逆相ライトイネーブル端子W
E/にそれぞれ接続されている。逆相IOリードストロ
ーブ端子IORD/及び逆相IOライトストローブ端子
IOWR/は、がI/Oデバイス5の逆相出力イネーブ
ル端子OE/及び逆相ライトイネーブル端子WE/にそ
れぞれ接続されている。又、メモリ4及びI/Oデバイ
ス5のレディ端子RDYは、マイコン1のレディ端子R
DYに接続されている。これらのアドレスバス2、デー
タバス3、逆相リードストローブ端子RD/、逆相ライ
トストローブ端子WR/、逆相IOリードストローブ端
子IORD/、逆相IOライトストローブ端子IOWR
/、及びレディ端子RDYは、マイコン1とメモリ4及
びI/Oデバイス5とのインターフェイスとして機能し
ている。図3は、図2の動作を説明するためのタイムチ
ャートであり、横軸に時間、及び縦軸に電圧がとられて
いる。この図を参照しつつ、図2のI/Oデバイス5か
らデータを読み出す動作を説明する。先ず、アドレス端
子A0〜A15からアドレスバス2へマイコン1内部の
アドレスレジスタに保持されていたアドレスが出力さ
れ、それと同時に、マイコン1の逆相IOリードストロ
ーブ端子IORD/からI/Oデバイス5の逆相出力イ
ネーブル端子OE/へ低レベル(以下、“L”という)
が送出される。I/Oデバイス5は、逆相IOリードス
トローブ端子IORD/からの“L”に応答する準備が
完了した時点で、マイコン1のレディ端子RDYに高レ
ベル(以下、“H”という)を送出する。その結果、ア
ドレスバス2を介して伝搬されてきたアドレスによって
指定されるデータが、I/Oデバイス5のデータ端子D
0〜D7から読み出され、データバス3を介してマイコ
ン1へ送り込まれる。
The address terminals A0 to A15 and the data terminals D0 to D7 are, via the address bus 2 and the data bus 3, address terminals A0 to A of the memory 4 for storing data.
15 and data terminals D0 to D7,
It is connected to the address terminals A0 to A15 and the data terminals D0 to D7 of the I / O device 5 for exchanging data with an external device. The anti-phase read strobe terminal RD / and the anti-phase write strobe terminal WR / are the anti-phase output enable terminal OE / and the anti-phase write enable terminal W of the memory 4.
It is connected to E / respectively. The negative-phase IO read strobe terminal IORD / and the negative-phase IO write strobe terminal IOWR / are connected to the negative-phase output enable terminal OE / and the negative-phase write enable terminal WE / of the I / O device 5, respectively. The ready terminal RDY of the memory 4 and the I / O device 5 is the ready terminal R of the microcomputer 1.
It is connected to DY. These address bus 2, data bus 3, anti-phase read strobe terminal RD /, anti-phase write strobe terminal WR /, anti-phase IO read strobe terminal IORD /, anti-phase IO write strobe terminal IOWR
The / and the ready terminal RDY function as an interface between the microcomputer 1 and the memory 4 and the I / O device 5. FIG. 3 is a time chart for explaining the operation of FIG. 2, in which the horizontal axis represents time and the vertical axis represents voltage. The operation of reading data from the I / O device 5 of FIG. 2 will be described with reference to this figure. First, the address held in the address register inside the microcomputer 1 is output from the address terminals A0 to A15 to the address bus 2, and at the same time, the reverse-phase IO read strobe terminal IORD / of the microcomputer 1 is reversed to the reverse of the I / O device 5. Low level to phase output enable terminal OE / (hereinafter referred to as "L")
Is sent. The I / O device 5 sends a high level (hereinafter referred to as “H”) to the ready terminal RDY of the microcomputer 1 when it is ready to respond to “L” from the negative-phase IO read strobe terminal IORD /. . As a result, the data designated by the address propagated through the address bus 2 becomes the data terminal D of the I / O device 5.
It is read from 0 to D7 and sent to the microcomputer 1 via the data bus 3.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、従来の
マイコン1では、次のような課題があった。例えば、I
/Oデバイス5はマイコン1の逆相IOリードストロー
ブ端子IORD/からの“L”に応答する準備が完了し
た時点で、次のバスサイクルに移るため、マイコン1の
レディ端子RDYに“H”を送出する。ところが、ノイ
ズ等の影響により、I/Oデバイス5のレディ端子RD
Yから“H”が送出されない場合、バスサイクルが終了
せず、次の動作に移ることができない。図4は、I/O
デバイス5のレディ端子RDYより“H”が送出されな
い場合の図2のタイムチャートである。図4では、マイ
コン1がレディ端子RDYから“H”が入力されるのを
待っており、動作が止まった状態になっている。このよ
うに、マイコン1にはレディ端子RDYに“H”が入力
されないと動作が停止してしまうという問題があった。
本発明は、前記従来技術が持っていた課題として、マイ
コンがメモリ及びI/Oデバイスとアクセスするときに
メモリ及びI/Oデバイスのレディ端子RDYから
“H”が送出されない場合、動作が停止してしまうとい
う点について解決し、一定時間の経過後に動作が復帰す
るマイコンを提供するものである。
However, the conventional microcomputer 1 has the following problems. For example, I
When the / O device 5 is ready to respond to "L" from the negative-phase IO read strobe terminal IORD / of the microcomputer 1, it shifts to the next bus cycle, so "H" is set to the ready terminal RDY of the microcomputer 1. Send out. However, the ready terminal RD of the I / O device 5 is affected by noise or the like.
If "H" is not sent from Y, the bus cycle is not completed and the next operation cannot be started. Figure 4 shows I / O
3 is a time chart of FIG. 2 when “H” is not sent from the ready terminal RDY of the device 5. In FIG. 4, the microcomputer 1 is waiting for "H" to be input from the ready terminal RDY, and is in a state in which the operation is stopped. As described above, the microcomputer 1 has a problem that the operation is stopped unless "H" is input to the ready terminal RDY.
The present invention has the problem that the conventional technique has a problem that when the microcomputer accesses the memory and the I / O device, if "H" is not sent from the ready terminal RDY of the memory and the I / O device, the operation is stopped. The present invention provides a microcomputer that solves the problem of being lost and returns to operation after a certain period of time.

【0005】[0005]

【課題を解決するための手段】第1の発明は、前記課題
を解決するために、マイコン内に設けられシステムクロ
ックに同期してマイコンシステムをプログラム制御する
CPUと、前記マイコンに外部バスを介して接続され、
前記CPUの命令に対する応答の準備が終了すると完了
信号を活性化する外部回路と、前記マイコン内に設けら
れて前記CPUで制御され、前記完了信号が活性化され
ると前記外部回路と該CPUとの間でデータの授受を行
なわせるための外部バスサイクルを制御するバスコント
ローラとを備えたマイコンシステムにおいて、次のよう
な手段を講じている。即ち、前記マイコンには、前記バ
スコントローラで制御される前記外部バスサイクルの開
始後、前記完了信号が非活性の間前記システムクロック
を計数する計数手段と、前記計数手段の計数値が所定の
値に達した時に前記CPUを初期化するシステムリセッ
ト信号を発生するリセット手段とを、前記マイコン内に
設けている。第2の発明では、第1の発明と同様のマイ
コンにおいて、前記バスコントローラで制御される前記
外部バスサイクルの開始後、前記完了信号が非活性の間
前記システムクロックを計数する計数手段と、設定値を
保持する保持手段と、前記計数手段の出力と前記保持手
段の出力との一致/不一致を比較する比較手段と、前記
比較手段の比較結果が一致のときに前記中央処理装置を
初期化するシステムリセット信号を発生するリセット手
段とを、前記マイコン内に設けている。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, a first invention provides a CPU provided in a microcomputer for program-controlling a microcomputer system in synchronization with a system clock, and an external bus to the microcomputer. Connected,
An external circuit that activates a completion signal when preparation of a response to the instruction of the CPU is completed, and an external circuit provided in the microcomputer and controlled by the CPU, and the external circuit and the CPU when the completion signal is activated. The following measures are taken in a microcomputer system including a bus controller that controls an external bus cycle for transmitting and receiving data between the two. That is, the microcomputer includes counting means for counting the system clock while the completion signal is inactive after the start of the external bus cycle controlled by the bus controller, and a count value of the counting means is a predetermined value. And a reset means for generating a system reset signal for initializing the CPU when it reaches 0. In a second invention, in the same microcomputer as in the first invention, counting means for counting the system clock while the completion signal is inactive after the start of the external bus cycle controlled by the bus controller, A holding means for holding a value, a comparing means for comparing a match / mismatch between the output of the counting means and the output of the holding means, and the central processing unit is initialized when the comparison result of the comparing means is a match. Reset means for generating a system reset signal is provided in the microcomputer.

【0006】[0006]

【作用】第1の発明によれば、以上のようにマイコンシ
ステムを構成したので、外部バスサイクルの開始後、外
部回路がCPUの命令に対する応答の準備を終了し、該
外部回路からの完了信号が活性化するまで、計数手段が
システムクロックを計数する。この計数値が所定の値に
達する一定時間経過後に、リセット手段からシステムリ
セット信号が発生し、CPUが初期化される。第2の発
明によれば、外部バスサイクルの開始後、外部回路がC
PUの命令に対する応答の準備を終了して完了信号を活
性化するまでの間、比較手段では、計数手段の出力と設
定値を保持する保持手段の出力とを比較する。この比較
結果が一致したときにリセット手段からシステムリセッ
ト信号が発生し、CPUが初期化される。従って、前記
課題を解決できるのである。
According to the first aspect of the invention, since the microcomputer system is configured as described above, after the start of the external bus cycle, the external circuit completes the preparation for the response to the instruction of the CPU, and the completion signal from the external circuit. The counting means counts the system clock until is activated. After a certain period of time when the count value reaches a predetermined value, a system reset signal is generated from the reset means and the CPU is initialized. According to the second aspect of the invention, after the external bus cycle is started, the external circuit is
Until the completion of the response to the PU instruction and the activation of the completion signal, the comparison means compares the output of the counting means with the output of the holding means that holds the set value. When the comparison results match, the reset means generates a system reset signal, and the CPU is initialized. Therefore, the above problem can be solved.

【0007】[0007]

【実施例】第1の実施例 図5は、本発明の第1の実施例を示すマイコンの要部の
構成ブロック図である。マイコン10は、1チップで構
成され、CPU20、I/O部の一つであるバスインタ
ーフェイス30、プログラムを記憶する図示しないプロ
グラムメモリ、及び該CPU20からのデータの書き込
みと読み出しを行う図示しないデータメモリ等を備えて
いる。マイコンシステムの動作をプログラム制御するC
PU20は内部データバス21を有し、その内部データ
バス21には、プログラムメモリに格納されている命令
を逐次指定するアドレスを記憶するプログラムカウンタ
22、スタック中のレジスタのアドレスを保持する機能
を有するスタックポインタ23、命令のオペランドを指
定する実行アドレスが格納されるアドレスレジスタ2
4、及び該プログラムメモリから読み出された命令を取
り込むインストラクションレジスタ25が接続されてい
る。インストラクションレジスタ25には、該インスト
ラクションレジスタ25に保持されている命令に基づ
き、マイコン内部の各回路を制御する信号を出力する機
能を有するプログラマブル・ロジック・アレイ(Progra
mmableLogic Array、以下、PLAという)26が接続
されている。又、内部データバス21には、演算結果を
一時記憶するアキュムレータ27、データを取り込み、
データの一時格納に用いられるレジスタ28が接続され
ている。アキュムレータ27とレジスタ28には、該ア
キュムレータ27と該レジスタ28に保持されているデ
ータの演算を行い、その演算結果を内部データバス21
に出力するALU29等が接続されている。バスインタ
ーフェイス30の入力側は、内部データバス21、プロ
グラムカウンタ22、及びアドレスレジスタ24に接続
され、その出力側のアドレス端子A0〜A15及びデー
タ端子D0〜D7が、アドレスバス41及びデータバス
42に接続されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment FIG. 5 is a block diagram of the essential parts of a microcomputer showing a first embodiment of the present invention. The microcomputer 10 is composed of one chip, and includes a CPU 20, a bus interface 30 which is one of I / O units, a program memory (not shown) for storing programs, and a data memory (not shown) for writing and reading data from the CPU 20. And so on. C for program control of the operation of the microcomputer system
The PU 20 has an internal data bus 21. The internal data bus 21 has a function of storing a program counter 22 for storing addresses for sequentially designating instructions stored in a program memory and a function of holding addresses of registers in a stack. Stack pointer 23, address register 2 that stores the execution address that specifies the operand of the instruction
4 and an instruction register 25 for fetching an instruction read from the program memory are connected. The instruction register 25 has a programmable logic array (Progra) having a function of outputting a signal for controlling each circuit in the microcomputer based on an instruction held in the instruction register 25.
A mmableLogic Array (hereinafter referred to as PLA) 26 is connected. In addition, the internal data bus 21 stores an accumulator 27 for temporarily storing a calculation result, data,
A register 28 used for temporary storage of data is connected. The accumulator 27 and the register 28 perform an operation on the data held in the accumulator 27 and the register 28, and the operation result is stored in the internal data bus 21.
The ALU 29 and the like for outputting to are connected. The input side of the bus interface 30 is connected to the internal data bus 21, the program counter 22, and the address register 24, and the output side address terminals A0 to A15 and the data terminals D0 to D7 are connected to the address bus 41 and the data bus 42, respectively. It is connected.

【0008】更に、バスインターフェイス30は、メモ
リ用逆相リードストローブ端子RD/、メモリ用逆相ラ
イトストローブ端子WR/、I/Oデバイス用逆相リー
ドストローブ端子IORD/、及びI/Oデバイス用逆
相ライトストローブ端子IOWR/を備えている。アド
レスバス41及びデータバス42には、データを記憶す
る外部回路であるメモリ43及び外部機器とのデータの
やり取りを行う外部回路であるI/Oデバイス44にそ
れぞれ接続されている。メモリ用逆相リードストローブ
端子RD/及びメモリ用逆相ライトストローブ端子WR
/は、メモリ43の逆相出力イネーブル端子OE/及び
逆相ライトイネーブル端子WE/にそれぞれ接続されて
いる。I/Oデバイス用逆相リードストローブ端子IO
RD/及びI/Oデバイス用逆相ライトストローブ端子
IOWR/は、I/Oデバイス44の逆相出力イネーブ
ル端子OE/及び逆相ライトイネーブル端子WE/にそ
れぞれ接続されている。メモリ43及びI/Oデバイス
44の完了信号を出力するレディ端子RDYは、バスイ
ンターフェイス30のレディ端子RDYに接続されてい
る。
The bus interface 30 further includes a memory anti-phase read strobe terminal RD /, a memory anti-phase write strobe terminal WR /, an I / O device anti-phase read strobe terminal IORD /, and an I / O device anti-phase. The phase write strobe terminal IOWR / is provided. The address bus 41 and the data bus 42 are connected to a memory 43, which is an external circuit for storing data, and an I / O device 44, which is an external circuit for exchanging data with external devices. Anti-phase read strobe terminal RD / for memory and anti-phase write strobe terminal WR for memory
/ Is connected to the negative phase output enable terminal OE / and the negative phase write enable terminal WE / of the memory 43, respectively. Reverse phase read strobe terminal IO for I / O device
The reverse phase write strobe terminal IOWR / for RD / and I / O device is connected to the reverse phase output enable terminal OE / and the reverse phase write enable terminal WE / of the I / O device 44, respectively. The ready terminal RDY that outputs a completion signal of the memory 43 and the I / O device 44 is connected to the ready terminal RDY of the bus interface 30.

【0009】図1は、本発明の第1の実施例を示す図5
中のバスインターフェイス30の回路図である。このバ
スインターフェイス30は、バスコントローラ31を備
え、そのバスコントローラ31がアドレスバス41及び
データバス42を介して図5のメモリ43及びI/Oデ
バイス44に接続されている。バスコントローラ31
は、図5のプログラムカウンタ22のアドレス或いはア
ドレスレジスタ24に格納されている命令のオペランド
を指定する実効アドレスを受け取り、それらのアドレス
をアドレスバス41を介してメモリ43及びI/Oデバ
イス44に与える機能を有している。又、バスインター
フェイス30には、計数手段であるカウンタ34、及び
リセット手段である遅延フリップフロップ(以下、D−
FFという)36が設けられている。バスコントローラ
31のレディ端子RDYは、メモリ43及びI/Oデバ
イス44のレディ端子RDYに接続されると共に、イン
バータ32を介して2入力NANDゲート33の一方の
入力側に接続されている。バスコントローラ31のバス
サイクル開始信号S31を出力する信号線は、NAND
ゲート33の他方の入力側に接続されている。更に、N
ANDゲート33の出力側がカウンタ34のリセット端
子Rに接続されている。カウンタ34の出力端子Q1,
Q2,及びQ3は3入力ANDゲート35の入力側にそ
れぞれ接続され、ANDゲート35の出力側がD−FF
36の入力端子Dに接続されている。カウンタ34及び
D−FF36のクロック入力端子には、システムクロッ
クCLKを生成する図示しないクロック発生回路が接続
されている。。D−FF36の出力端子Qからシステム
クロックCLKに同期してシステムリセット信号RST
が送出される。
FIG. 1 shows a first embodiment of the present invention, which is shown in FIG.
It is a circuit diagram of the inside bus interface 30. The bus interface 30 includes a bus controller 31, and the bus controller 31 is connected to the memory 43 and the I / O device 44 of FIG. 5 via the address bus 41 and the data bus 42. Bus controller 31
Receives an address of the program counter 22 of FIG. 5 or an effective address designating an operand of an instruction stored in the address register 24, and supplies those addresses to the memory 43 and the I / O device 44 via the address bus 41. It has a function. Further, the bus interface 30 includes a counter 34, which is a counting unit, and a delay flip-flop (hereinafter, D−), which is a reset unit.
FF) 36 is provided. The ready terminal RDY of the bus controller 31 is connected to the ready terminal RDY of the memory 43 and the I / O device 44, and is also connected to one input side of the 2-input NAND gate 33 via the inverter 32. The signal line that outputs the bus cycle start signal S31 of the bus controller 31 is a NAND
It is connected to the other input side of the gate 33. Furthermore, N
The output side of the AND gate 33 is connected to the reset terminal R of the counter 34. The output terminal Q1, of the counter 34
Q2 and Q3 are respectively connected to the input side of a 3-input AND gate 35, and the output side of the AND gate 35 is a D-FF.
It is connected to the input terminal D of 36. A clock generation circuit (not shown) that generates the system clock CLK is connected to the clock input terminals of the counter 34 and the D-FF 36. . The system reset signal RST is output from the output terminal Q of the D-FF 36 in synchronization with the system clock CLK.
Is sent.

【0010】図6はレディ端子RDYに“H”が入力さ
れる場合の図1及び図5のタイムチャートであり、図7
はレディ端子RDYに“H”が入力されない場合の図1
及び図5のタイムチャートである。この図6及び図7
は、横軸に時間、縦軸に電圧がとられている。これらの
図を参照しつつ、図5のI/Oデバイス44からデータ
を読み出す動作を説明する。 (1)レディ端子RDYに“H”が入力される場合 図5のCPU20からの命令により、アドレスレジスタ
24に所定のデータが内部データバス21を介して書き
込まれる。図6において、図5のアドレスレジスタ24
のアドレスがI/Oデバイス44を指定する番地となっ
て命令の読み出しサイクルが開始される。そしてI/O
デバイス44がアクセスされ、同時にバスサイクル開始
信号S31が“H”になる。この時、I/Oデバイス4
4のレディ端子RDYからはまだ“H”が出力されてい
ないので、インバータ32の出力は“H”である。つま
り、NANDゲート33の出力信号S33はバスサイク
ル開始信号S31により“L”になるので、カウンタ3
4はリセットが解除され、カウントを開始する。又、ア
ドレスレジスタ24に保持されているアドレスがバスコ
ントローラ31からアドレスバス41を介してI/Oデ
バイス44へ送出される。それと同時にバスコントロー
ラ31の逆相リードストローブ端子IORD/から
“L”が送出される。I/Oデバイス44の逆相出力イ
ネーブル端子OE/は、逆相リードストローブ端子IO
RD/から“L”を受け取り、その信号に対する応答の
準備が終了するとレディ端子RDYから“H”を送出す
る。バスコントローラ31のレディ端子RDYが“H”
を受け取ると、データバス42を介してI/Oデバイス
44よりデータを受け取る。その後読み出されたデータ
は内部データバス21を介してアキュムレータ27に送
られる。又、I/Oデバイス44のレディ端子RDYよ
り送出された“H”はインバータ32を介してNAND
ゲート33にも入力される。そしてNANDゲート33
の出力信号S33は“H”となりカウンタ34がリセッ
トされる。
FIG. 6 is a time chart of FIGS. 1 and 5 when “H” is input to the ready terminal RDY.
Shows the case when "H" is not input to the ready terminal RDY.
6 is a time chart of FIG. 6 and 7
Indicates time on the horizontal axis and voltage on the vertical axis. The operation of reading data from the I / O device 44 of FIG. 5 will be described with reference to these drawings. (1) When "H" is input to the ready terminal RDY: Predetermined data is written in the address register 24 via the internal data bus 21 by an instruction from the CPU 20 of FIG. 6, the address register 24 of FIG.
Becomes the address designating the I / O device 44, and the instruction read cycle is started. And I / O
The device 44 is accessed, and at the same time, the bus cycle start signal S31 becomes "H". At this time, I / O device 4
Since "H" is not yet output from the ready terminal RDY of No. 4, the output of the inverter 32 is "H". That is, since the output signal S33 of the NAND gate 33 becomes "L" by the bus cycle start signal S31, the counter 3
4, the reset is released and the counting is started. Further, the address held in the address register 24 is sent from the bus controller 31 to the I / O device 44 via the address bus 41. At the same time, "L" is transmitted from the reverse phase read strobe terminal IORD / of the bus controller 31. The negative-phase output enable terminal OE / of the I / O device 44 is the negative-phase read strobe terminal IO.
When "L" is received from RD / and preparation for response to the signal is completed, "H" is sent from the ready terminal RDY. Ready terminal RDY of bus controller 31 is "H"
Data is received from the I / O device 44 via the data bus 42. The data read thereafter is sent to the accumulator 27 via the internal data bus 21. In addition, “H” sent from the ready terminal RDY of the I / O device 44 is NANDed by the inverter 32.
It is also input to the gate 33. And the NAND gate 33
Output signal S33 becomes "H" and the counter 34 is reset.

【0011】 (2)レディ信号RDYが入力されない場合 図7において、(1)レディ端子RDYに“H”が入力
される場合と同様にバスサイクルが開始され、カウンタ
34がカウントを開始する。しかし、I/Oデバイス4
4のレディ端子RDYは“H”を送出しないので、バス
コントローラ31のレディ端子RDYは“H”が来るま
で待機する。一方、カウンタ34はカウントを続けカウ
ンタ34の出力端子Q1,Q2及びQ3の出力がすべて
“H”となった時、ANDゲート33を介してD−FF
36の入力端子Dが“H”となり、システムクロックC
LKに同期してD−FF36の出力端子Qよりシステム
リセット信号RSTが送出される。以上のように、この
第1の実施例では、バスサイクル開始後にレディ端子R
DYに“H”が入力されない場合、カウンタ34の計数
値が所定の値に達したとき、ANDゲート33を介して
D−FF36の入力端子Dが“H”となり、システムク
ロックCLKに同期してD−FF36の出力端子Qより
システムリセット信号RSTが送出され、マイコンがリ
セットされる。そのため、ノイズ等の影響でメモリ43
やI/Oデバイス44が誤動作してレディ信号を送出で
きないときにはマイコンがリセットされ、再びCPUが
初期化プログラムを実行することにより、マイコン1
0、メモリ43、及びI/Oデバイス44を正常動作状
態に戻すことが可能となる。
(2) When the ready signal RDY is not input In FIG. 7, the bus cycle is started and the counter 34 starts counting similarly to (1) when “H” is input to the ready terminal RDY. However, I / O device 4
Since the ready terminal RDY of No. 4 does not send "H", the ready terminal RDY of the bus controller 31 waits until "H" arrives. On the other hand, the counter 34 continues counting, and when all the outputs of the output terminals Q1, Q2 and Q3 of the counter 34 become "H", the D-FF is passed through the AND gate 33.
The input terminal D of 36 becomes "H", and the system clock C
The system reset signal RST is sent from the output terminal Q of the D-FF 36 in synchronization with LK. As described above, in the first embodiment, the ready terminal R is set after the start of the bus cycle.
When “H” is not input to DY, when the count value of the counter 34 reaches a predetermined value, the input terminal D of the D-FF 36 becomes “H” via the AND gate 33, synchronizing with the system clock CLK. The system reset signal RST is sent from the output terminal Q of the D-FF 36 to reset the microcomputer. Therefore, the memory 43 may be affected by noise or the like.
If the I / O device 44 or the I / O device 44 malfunctions and cannot send the ready signal, the microcomputer is reset, and the CPU executes the initialization program again, so that the microcomputer 1
0, the memory 43, and the I / O device 44 can be returned to the normal operation state.

【0012】第2の実施例 図8は、本発明の第2の実施例を示すバスインターフェ
イス30Aの回路図であり、第1の実施例を示す図1及
び図5中の要素と共通の要素には共通の符号が付されて
いる。第1の実施例では、カウンタ34の出力端子Q
1,Q2及びQ3がANDゲート35の入力側に接続さ
れているが、この第2の本実施例では、比較手段である
比較回路38の第1の入力側に接続され、保持手段であ
るレジスタ37が追加されている。比較回路38の第2
の入力側には内部データバス21のデータを保持するレ
ジスタ37が接続されている。比較回路38の出力端子
compはD−FF36の入力端子Dに接続されている。カ
ウンタ34及びD−FF36のクロック入力端子には、
それぞれシステムクロックCLKが入力される。D−F
F36の出力端子QからシステムクロックCLKに同期
してシステムリセット信号RSTが送出されるようにな
っている。。次に、図5のI/Oデバイス44からデー
タを読み出す動作を説明する。CPU20からの命令に
より、レジスタ37に所定のデータが内部データバス2
1を介して書き込まれる。その後、バスサイクルが発生
する場合、アドレスレジスタ24中のアドレスがI/O
デバイス44を指定する番地となって命令の読み出しサ
イクルが開始される。I/Oデバイス44がアクセスさ
れると、バスサイクル開始信号S31が“H”になる。
この時、レディ端子RDYは“L”であり、カウンタ3
4はリセットが解除されてカウントを開始する。カウン
タ34の出力端子Q1,Q2及びQ3は比較回路38へ
入力され、レジスタ37の出力端子D1〜D3に保持さ
れているデータと比較される。通常動作時は、CPU2
0が指定したアクセスタイム内に、レディ端子RDYに
“H”が入力されることにより、カウンタ34の出力端
子Q1,Q2及びQ3とレジスタ37の出力端子D1〜
D3に保持されているデータが一致する前にカウンタ3
4がリセットされる。
Second Embodiment FIG. 8 is a circuit diagram of a bus interface 30A showing a second embodiment of the present invention, which is common to the elements shown in FIGS. 1 and 5 showing the first embodiment. Are assigned common reference numerals. In the first embodiment, the output terminal Q of the counter 34
1, Q2 and Q3 are connected to the input side of the AND gate 35, but in the second embodiment, they are connected to the first input side of the comparison circuit 38 which is the comparison means, and the register which is the holding means. 37 have been added. Second comparator circuit 38
A register 37 for holding the data of the internal data bus 21 is connected to the input side of. Output terminal of the comparison circuit 38
comp is connected to the input terminal D of the D-FF 36. The clock input terminals of the counter 34 and the D-FF 36 are
The system clock CLK is input to each. DF
The system reset signal RST is transmitted from the output terminal Q of F36 in synchronization with the system clock CLK. . Next, the operation of reading data from the I / O device 44 of FIG. 5 will be described. According to an instruction from the CPU 20, predetermined data is stored in the register 37 in the internal data bus 2
Written through 1. After that, when a bus cycle occurs, the address in the address register 24 becomes I / O.
The address for designating the device 44 is set to start the instruction read cycle. When the I / O device 44 is accessed, the bus cycle start signal S31 becomes "H".
At this time, the ready terminal RDY is "L", and the counter 3
4 is released from reset and starts counting. The output terminals Q1, Q2, and Q3 of the counter 34 are input to the comparison circuit 38 and compared with the data held in the output terminals D1 to D3 of the register 37. CPU2 during normal operation
By inputting “H” to the ready terminal RDY within the access time designated by 0, the output terminals Q1, Q2 and Q3 of the counter 34 and the output terminals D1 to D1 of the register 37 are input.
Before the data held in D3 matches, the counter 3
4 is reset.

【0013】以上のように、この第2の実施例では、第
1の実施例と同様の利点がある。更に、レジスタ37の
出力端子D1〜D3に保持されるデータは、メモリに記
憶されるプログラムにより設定できるので、システムを
調整する段階でシステムリセットRSTが発生するタイ
ミングもプログラムにより設定できる。なお、本発明は
上記実施例に限定されず、種々の変形が可能である。そ
の変形例としては、例えば次のようなものがある。 (a)第1及び第2の実施例のカウンタ34は、シフト
レジスタ等の他の計数手段で構成してもよい。 (b)図7のシステムリセットRSTが発生するタイミ
ングは、第1の実施例より早くても遅くてもよい。 (c)D−FF36は、JK−FF等の他のFFで置き
換えてもよい。 (d)レジスタ37は、D−FF等の他の保持手段で置
き換えてもよい。 (e)比較回路38は、カウンタ34とレジスタ37と
の出力の一致を検出する機能を有していればよく、EX
−OR回路、EX−NOR回路、AND回路等で置き換
えてもよい。 (f)本発明は、CPUとメモリが分離された複数チッ
プマイコンにおいても、リセット回路を外部に追加する
ことにより、適用できる。
As described above, the second embodiment has the same advantages as the first embodiment. Further, since the data held in the output terminals D1 to D3 of the register 37 can be set by the program stored in the memory, the timing at which the system reset RST occurs at the stage of adjusting the system can also be set by the program. The present invention is not limited to the above embodiment, and various modifications can be made. The following are examples of such modifications. (A) The counter 34 of the first and second embodiments may be composed of other counting means such as a shift register. (B) The timing at which the system reset RST in FIG. 7 occurs may be earlier or later than in the first embodiment. (C) The D-FF 36 may be replaced with another FF such as JK-FF. (D) The register 37 may be replaced with other holding means such as a D-FF. (E) The comparison circuit 38 only needs to have a function of detecting the coincidence of the outputs of the counter 34 and the register 37.
It may be replaced with an -OR circuit, an EX-NOR circuit, an AND circuit, or the like. (F) The present invention can be applied to a multi-chip microcomputer in which a CPU and a memory are separated by adding a reset circuit to the outside.

【0014】[0014]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、バスサイクル開始後にレディ信号が入力され
ない場合、システムクロックを計数して所定の計数値に
達したときリセット信号を発生し、マイコンがシステム
リセットされる回路を設けたので、ノイズ等の影響によ
るメモリやI/Oデバイスの誤動作のためレディ信号を
送出できないときにはマイコンがリセットされる。その
後、再び初期化プログラムを実行することにより、シス
テムを正常動作状態に戻すことが可能となる。第2の発
明によれば、バスサイクル開始後にレディ信号が入力さ
れない場合、システムクロックを計数して所定の計数値
に達したときリセット信号を発生し、マイコンがシステ
ムリセットされる回路を設けたので、ノイズ等の影響に
よるメモリやI/Oデバイスの誤動作のためレディ信号
を送出できないときにはマイコンがリセットされる。更
に、このマイコンがリセットされるタイミングをプログ
ラムで設定できるので,システムを正常動作状態に戻す
タイミングを最適値に設定することが可能となる。
As described in detail above, according to the first aspect of the invention, when the ready signal is not input after the start of the bus cycle, the system clock is counted and the reset signal is generated when the count value reaches a predetermined count value. However, since the circuit for resetting the system of the microcomputer is provided, the microcomputer is reset when the ready signal cannot be transmitted due to the malfunction of the memory or the I / O device due to the influence of noise or the like. After that, the system can be returned to the normal operating state by executing the initialization program again. According to the second aspect of the invention, when the ready signal is not input after the start of the bus cycle, the system clock is counted, a reset signal is generated when a predetermined count value is reached, and a circuit for resetting the system of the microcomputer is provided. The microcomputer is reset when the ready signal cannot be transmitted due to the malfunction of the memory or the I / O device due to the influence of noise or the like. Further, since the timing for resetting this microcomputer can be set by a program, the timing for returning the system to the normal operating state can be set to an optimum value.

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

【図1】本発明の第1の実施例を示すマイコン内のバス
インターフェイスの回路図である。
FIG. 1 is a circuit diagram of a bus interface in a microcomputer showing a first embodiment of the present invention.

【図2】従来のマイコンシステムの概略の構成ブロック
図である。
FIG. 2 is a schematic block diagram of a conventional microcomputer system.

【図3】図2のタイムチャートである。FIG. 3 is a time chart of FIG.

【図4】図2のRDY入力がない場合のタイムチャート
である。
FIG. 4 is a time chart when there is no RDY input in FIG.

【図5】本発明の第1の実施例を示すマイコンシステム
の要部の構成ブロック図である。
FIG. 5 is a configuration block diagram of a main part of a microcomputer system showing a first embodiment of the present invention.

【図6】図1及び図5のタイムチャートである。6 is a time chart of FIGS. 1 and 5. FIG.

【図7】図1及び図5のRDY入力がない場合のタイム
チャートである。
FIG. 7 is a time chart when there is no RDY input in FIGS. 1 and 5.

【図8】本発明の第2の実施例を示すマイコン内のバス
インターフェイスの回路図である。
FIG. 8 is a circuit diagram of a bus interface in a microcomputer showing a second embodiment of the present invention.

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

10 マイコン 20 CPU 30,30A バスインターフェイス 31 バスコントローラ 32 インバータ 33 2入力NANDゲート 34 カウンタ 35 3入力ANDゲート 36 D−FF 37 レジスタ 38 比較回路 43 メモリ 44 I/Oデバイス 10 Microcomputer 20 CPU 30, 30A Bus Interface 31 Bus Controller 32 Inverter 33 2 Input NAND Gate 34 Counter 35 3 Input AND Gate 36 D-FF 37 Register 38 Comparison Circuit 43 Memory 44 I / O Device

フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H03K 19/018 Continuation of the front page (51) Int.Cl. 6 Identification number Office reference number FI technical display location H03K 19/018

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータ内に設けられシス
テムクロックに同期してマイクロコンピュータシステム
をプログラム制御する中央処理装置と、 前記マイクロコンピュータに外部バスを介して接続さ
れ、前記中央処理装置の命令に対する応答の準備が終了
すると完了信号を活性化する外部回路と、 前記マイクロコンピュータ内に設けられて前記中央処理
装置で制御され、前記完了信号が活性化されると前記外
部回路と該中央処理装置との間でデータの授受を行なわ
せるための外部バスサイクルを制御するバスコントロー
ラとを、 備えたマイクロコンピュータシステムにおいて、 前記バスコントローラで制御される前記外部バスサイク
ルの開始後、前記完了信号が非活性の間前記システムク
ロックを計数する計数手段と、 前記計数手段の計数値が所定の値に達した時に前記中央
処理装置を初期化するシステムリセット信号を発生する
リセット手段とを、 前記マイクロコンピュータ内に設けたことを特徴とする
マイクロコンピュータシステム。
1. A central processing unit provided in a microcomputer for controlling a microcomputer system program in synchronization with a system clock; and a central processing unit connected to the microcomputer via an external bus for responding to a command from the central processing unit. An external circuit for activating a completion signal when preparation is completed, and a circuit provided in the microcomputer and controlled by the central processing unit, and between the external circuit and the central processing unit when the completion signal is activated. And a bus controller for controlling an external bus cycle for transmitting and receiving data in the microcomputer system, wherein the completion signal is inactive after the start of the external bus cycle controlled by the bus controller. Counting means for counting the system clock, and the counting means Microcomputer system count value, characterized in that the reset means for generating a system reset signal for initializing said central processing unit upon reaching a predetermined value, is provided in the microcomputer.
【請求項2】 マイクロコンピュータ内に設けられシス
テムクロックに同期してマイクロコンピュータシステム
をプログラム制御する中央処理装置と、 前記マイクロコンピュータに外部バスを介して接続さ
れ、前記中央処理装置の命令に対する応答の準備が終了
すると完了信号を活性化する外部回路と、 前記マイクロコンピュータ内に設けられて前記中央処理
装置で制御され、前記完了信号が活性化されると前記外
部回路と該中央処理装置との間でデータの授受を行なわ
せるための外部バスサイクルを制御するバスコントロー
ラとを、 備えたマイクロコンピュータシステムにおいて、 前記バスコントローラで制御される前記外部バスサイク
ルの開始後、前記完了信号が非活性の間前記システムク
ロックを計数する計数手段と、 設定値を保持する保持手段と、 前記計数手段の出力と前記保持手段の出力との一致/不
一致を比較する比較手段と、 前記比較手段の比較結果が一致のときに前記中央処理装
置を初期化するシステムリセット信号を発生するリセッ
ト手段とを、 前記マイクロコンピュータ内に設けたことを特徴とする
マイクロコンピュータシステム。
2. A central processing unit, which is provided in the microcomputer and program-controls the microcomputer system in synchronization with a system clock, and a central processing unit which is connected to the microcomputer via an external bus and which responds to a command of the central processing unit. An external circuit for activating a completion signal when preparation is completed, and a circuit provided in the microcomputer and controlled by the central processing unit, and between the external circuit and the central processing unit when the completion signal is activated. And a bus controller for controlling an external bus cycle for transmitting and receiving data in the microcomputer system, wherein the completion signal is inactive after the start of the external bus cycle controlled by the bus controller. Counting means for counting the system clock and holding set value Holding means, comparing means for comparing the output of the counting means with the output of the holding means for a match / mismatch, and a system reset signal for initializing the central processing unit when the comparison result of the comparing means is a match. And a resetting means for generating the above, provided in the microcomputer.
JP5233085A 1993-09-20 1993-09-20 Microcomputer system Withdrawn JPH0784835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5233085A JPH0784835A (en) 1993-09-20 1993-09-20 Microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5233085A JPH0784835A (en) 1993-09-20 1993-09-20 Microcomputer system

Publications (1)

Publication Number Publication Date
JPH0784835A true JPH0784835A (en) 1995-03-31

Family

ID=16949564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5233085A Withdrawn JPH0784835A (en) 1993-09-20 1993-09-20 Microcomputer system

Country Status (1)

Country Link
JP (1) JPH0784835A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209533A (en) * 2005-01-28 2006-08-10 Fujitsu Ltd Device recovery method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209533A (en) * 2005-01-28 2006-08-10 Fujitsu Ltd Device recovery method

Similar Documents

Publication Publication Date Title
US4112490A (en) Data transfer control apparatus and method
US5263168A (en) Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal
US4924427A (en) Direct memory access controller with direct memory to memory transfers
EP0569969A1 (en) Microcomputer having instruction memory storing instructions for reading out internal conditions
JPH048874B2 (en)
JPH10177563A (en) Microcomputer with built-in flash memory
US4348722A (en) Bus error recognition for microprogrammed data processor
JP2661222B2 (en) Pulse output device
JPH05204709A (en) Processor
EP0348240A2 (en) Microprocessor equipped with parity control unit on same chip
US4947478A (en) Switching control system for multipersonality computer system
US6006288A (en) Method and apparatus for adaptable burst chip select in a data processing system
KR960003065B1 (en) Information processing apparatus
KR100321745B1 (en) A micro controller unit for external memory access
JPH0784835A (en) Microcomputer system
US5555559A (en) Microprocessor capable of ensuring flexible recovery time for I/O device by inserting idle states
JPH0159610B2 (en)
KR930003443B1 (en) Computer system and method for setting recovery time
JPH0143392B2 (en)
CN1187687C (en) Method and device for reducing computer initial setting element
JP2569534B2 (en) Microcomputer
JPS6346460B2 (en)
JP2539064B2 (en) Microprocessor
JPH0542525Y2 (en)
JPH01240945A (en) Extension memory interface circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001128