JP2004348719A - Microcomputer - Google Patents
Microcomputer Download PDFInfo
- Publication number
- JP2004348719A JP2004348719A JP2004131765A JP2004131765A JP2004348719A JP 2004348719 A JP2004348719 A JP 2004348719A JP 2004131765 A JP2004131765 A JP 2004131765A JP 2004131765 A JP2004131765 A JP 2004131765A JP 2004348719 A JP2004348719 A JP 2004348719A
- Authority
- JP
- Japan
- Prior art keywords
- processing unit
- memory access
- runaway
- signal
- central processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、マイクロコンピュータに関し、特に、中央演算処理装置からメモリ機能を有する外部処理部にハンドシェークモードでメモリアクセスするときに、中央演算処理装置と外部処理部との通信の暴走状態を検出して、中央演算処理装置の暴走を回避するマイクロコンピュータに関する。 The present invention relates to a microcomputer, and particularly detects a runaway state of communication between a central processing unit and an external processing unit when a memory is accessed from a central processing unit to an external processing unit having a memory function in a handshake mode. And a microcomputer for avoiding runaway of the central processing unit.
以下、従来のマイクロコンピュータについて、図13を用いて説明する(例えば、特許文献1)。図13は従来のマイクロコンピュータの主要部の模式図である。図13において、マイクロコンピュータ1は、中央演算処理装置(以下CPU)10とメモリアクセス制御装置11とを備えている。そして、マイクロコンピュータ1の外部には、メモリ機能を有する処理部A13、処理部B14、処理部C15、及び処理部D16が設けられている。
CPU10とメモリアクセス制御装置11とは、アドレス信号AD、データ信号DT、アクノリッジ信号DK、処理部A用チップセレクト信号CS0、処理部B用チップセレクト信号CS1、処理部C用チップセレクト信号CS2、及び処理部D用チップセレクト信号CS3を介して接続されている。
Hereinafter, a conventional microcomputer will be described with reference to FIG. 13 (for example, Patent Document 1). FIG. 13 is a schematic diagram of a main part of a conventional microcomputer. In FIG. 13, the
The
また、メモリアクセス制御装置11と処理部A13とは、処理部A用アドレス信号A0、処理部A用データ信号D0、処理部A用チップセレクト信号CS0、及び処理部A用アクノリッジ信号DK0を介して接続されており、メモリアクセス制御装置11と処理部B14とは、処理部B用アドレス信号A1、処理部B用データ信号D1、処理部B用チップセレクト信号CS1、及び処理部B用アクノリッジ信号DK1を介して接続されている。
また、メモリアクセス制御装置11と処理部C15とは、処理部C用アドレス信号A2、処理部C用データ信号D2、及び処理部C用チップセレクト信号CS2を介して接続されており、メモリアクセス制御装置11と処理部D16とは、処理部D用アドレス信号A3、処理部D用データ信号D3、及び処理部D用チップセレクト信号CS3を介して接続されている。
Further, the memory
The memory
図13において、CPU10から処理部A13及び処理部B14へのメモリアクセス方式はハンドシェークモードである。ハンドシェークモードは、メモリアクセスを開始後、処理部からCPU10にメモリアクセス制御装置11を介してアクノリッジ信号が返されることでメモリアクセスが終了するモードである。一方、CPU10から処理部C15及び処理部D16へのメモリアクセス方式は、メモリアクセスが開始してから終了まで、設定されたウエイトサイクルでメモリアクセスが行われる固定ウエイトモードである。
In FIG. 13, a memory access method from the
また、図13において、CPU10から処理部A13、処理部B14、処理部C15及び処理部D16へのメモリアクセスは、CPU10により排他的に制御されている。すなわち、CPU10は、1つの処理部へのメモリアクセスが終了しない限り、次の処理部へメモリアクセスすることはできない。
In FIG. 13, memory access from the
以上のように構成された従来のマイクロコンピュータ1の動作について説明する。まず、CPU10から処理部A13へのメモリアクセスについて説明する。CPU10は、ハンドシェークモードで処理部A13にメモリアクセスして処理部A13に格納された情報を取り出すとき、処理部A用チップセレクト信号CS0と、アクセスしたいアドレス値を示すアドレス信号ADとをメモリアクセス制御装置11に出力して処理部A13へのメモリアクセスを要求する。メモリアクセス制御装置11は、これらの信号を受け取ると、処理部A用チップセレクト信号CS0及び処理部A用アドレス信号A0を処理部A13に出力する。この時点で処理部A13へのメモリアクセスが開始される。そして、処理部A13への一連の処理が終わると、処理部A13はメモリアクセス制御装置11を介してアクノリッジ信号DKをCPU10に返す。そして、メモリアクセス制御装置11が処理部A用チップセレクト信号CS0をネゲートし、これによりメモリアクセスが終了する。
同様にして、CPU10は処理部B14にハンドシェークモードでメモリアクセスして、処理部B14に格納されている情報を読み出す。
The operation of the
Similarly, the
次に、CPU10から処理部15Cへのメモリアクセスについて説明する。CPU10は、固定ウエイトモードで処理部C15にメモリアクセスして処理部C15に格納されている情報を取り出すとき、処理部C用チップセレクト信号CS2と、アクセスしたいアドレス値を示すアドレス信号ADとをメモリアクセス制御装置11に出力して、処理部C15へのメモリアクセスを要求する。メモリアクセス制御装置11は、これらの信号を受け取ると、処理部C用チップセレクト信号CS2及び処理部C用アドレス信号A2を処理部C15に出力する。この時点で処理部C15へのメモリアクセスが開始される。そして、設定されたウエイトサイクルで処理部C15への一連の処理が終わると、メモリアクセス制御装置11が処理部C用チップセレクト信号CS2をネゲートし、これによりメモリアクセスが終了する。
同様にして、CPU10は固定ウエイトモードで処理部D16にもメモリアクセスして、処理部D16に格納された情報を取り出す。
Similarly, the
以上のような従来のマイクロコンピュータでは、CPUがハンドシェークモードでメモリ機能を有する外部の処理部にメモリアクセスするとき、処理量の多いメモリアクセスを行うと、外部処理部がそのメモリアクセスの処理で占有され、処理部からCPUにアクノリッジ信号が返されないことがある。このアクノリッジ信号がCPUに返されないと、メモリアクセスが終了せず、処理部はCPUからのメモリアクセス中断命令をも受け付け不能となる。その結果、メモリアクセスの処理が滞り、最終的にCPUが暴走してしまうという問題点があった。 In the conventional microcomputer as described above, when the CPU accesses the external processing unit having the memory function in the handshake mode, when the memory access with a large amount of processing is performed, the external processing unit occupies the memory access processing. In some cases, the acknowledge signal is not returned from the processing unit to the CPU. If this acknowledgment signal is not returned to the CPU, the memory access does not end, and the processing unit cannot accept a memory access interruption instruction from the CPU. As a result, there is a problem that the memory access processing is delayed and the CPU eventually runs away.
本発明は、以上のような問題点を解消するためになされたもので、CPUがメモリ機能を有する外部処理部に処理量の多いメモリアクセスを行うときに、CPUと外部処理部との通信の暴走状態を検出して、CPUの暴走を回避するマイクロコンピュータを提供することを目的とする。 SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems. When the CPU accesses a large amount of memory to an external processing unit having a memory function, communication between the CPU and the external processing unit is performed. An object of the present invention is to provide a microcomputer that detects a runaway state and avoids runaway of the CPU.
本発明の請求項1に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に上記中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路と、上記暴走検出信号に基づいて、上記中央演算処理装置から上記外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成し、上記中央演算処理装置に出力する信号発生手段とを有する暴走検出制御装置を備え、上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を出力することを特徴とする。
A microcomputer according to
本発明の請求項2に係るマイクロコンピュータは、請求項1記載のマイクロコンピュータにおいて、上記中央演算処理装置は複数の上記外部処理部に排他的にメモリアクセスし、上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部を検知することを特徴とする。 A microcomputer according to a second aspect of the present invention is the microcomputer according to the first aspect, wherein the central processing unit exclusively accesses memory to the plurality of external processing units, and the runaway detection control device includes the central processing unit. In the memory access from the arithmetic processing unit to the external processing unit, an external processing unit in which the memory access with the central processing unit did not end normally is detected.
本発明の請求項3に係るマイクロコンピュータは、請求項1記載のマイクロコンピュータにおいて、上記暴走検出制御装置が、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した場合、上記中央演算処理装置は上記外部処理部へのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替えることを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、メモリアクセスを終了状態にして、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to a third aspect of the present invention is the microcomputer according to the first aspect, wherein the runaway detection control device does not normally end a memory access from the central processing unit to the external processing unit. Is detected, the central processing unit switches the memory access method for the external processing unit from the handshake mode to the fixed wait mode.
Thus, even if the communication between the central processing unit and the external processing unit goes out of control, the memory access is ended, and the central processing unit goes out of control and the system can be prevented from being stopped.
本発明の請求項4に係るマイクロコンピュータは、請求項2記載のマイクロコンピュータにおいて、上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した上記暴走検出回路を初期化し、かつ、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部のメモリ空間を開放するリセット回路を備えることを特徴とする。
これにより、中央演算処理装置との通信が暴走状態となった外部処理部のメモリ空間を開放して、次のメモリアクセスの受け待ち状態とすることができる。
A microcomputer according to a fourth aspect of the present invention is the microcomputer according to the second aspect, wherein the runaway detection control device does not normally end memory access from the central processing unit to the external processing unit. A reset circuit that initializes the runaway detection circuit that has detected the error, and releases the memory space of the external processing unit where the memory access with the central processing unit did not end normally.
As a result, the memory space of the external processing unit in which the communication with the central processing unit has gone out of control can be released to be in a state of waiting for the next memory access.
本発明の請求項5に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に上記中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路とを有する暴走検出制御装置を備え、上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を上記中央演算処理装置の割込み処理部に出力し、上記割込み処理部は、上記暴走検出信号を入力すると上記外部処理部へのメモリアクセスを制限することを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to a fifth aspect of the present invention, comprising: a central processing unit; and a memory access control unit for controlling when the central processing unit accesses a memory to an external processing unit having a memory function. , A counter is built in, a time is counted using the counter, a watchdog timer that generates a pulse signal when a predetermined time is counted, and a memory access from the central processing unit to the external processing unit. And a runaway detection control circuit that outputs a runaway detection signal by detecting that runaway has not been completed normally. The runaway detection circuit includes a memory from the central processing unit to the external processing unit. The watchdog timer generates a pulse signal between the start of access and the end of the memory access. Output the runaway detection signal to the interrupt processing unit of the central processing unit when the runaway detection signal is input, the interrupt processing unit limits memory access to the external processing unit. .
Thus, even if the communication between the central processing unit and the external processing unit is in a runaway state, it is possible to prevent the central processing unit from going out of control and stopping the system.
本発明の請求項6に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する複数の外部処理部に上記中央演算処理装置が排他的にメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了せずに暴走状態になった外部処理部から暴走通知を受け取り、上記暴走状態になった外部処理部とは別の外部処理部と上記メモリアクセス制御装置とを介して、上記暴走状態となった外部処理部の情報を上記中央演算処理装置に通知する暴走通知装置を備えることを特徴とする。
A microcomputer according to
本発明の請求項7に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に該中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記パルス信号に基づいて、上記中央演算処理装置から外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成する信号発生手段とを有する暴走回避制御装置を備え、上記信号発生手段は、上記メモリアクセス開始後、上記ウォッチドッグタイマが予め設定された所定の時間を計数したときに上記擬似アクノリッジ信号を上記中央演算処理装置に出力することを特徴とする。 8. A microcomputer according to claim 7, comprising: a central processing unit; and a memory access control unit for controlling when the central processing unit accesses a memory to an external processing unit having a memory function. , A counter is built-in, a time is counted using the counter, and when a predetermined time is counted, a watchdog timer that generates a pulse signal, and the central processing unit is connected to an external device based on the pulse signal. A runaway avoidance control device having signal generation means for generating a pseudo acknowledgment signal indicating that the memory access to the processing unit has been completed, wherein the signal generation means sets the watchdog timer in advance after the memory access is started. The pseudo-acknowledge signal is counted by the central processing unit when the counted predetermined time is counted. And outputs.
本発明の請求項1に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に上記中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路と、上記暴走検出信号に基づいて、上記中央演算処理装置から上記外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成し、上記中央演算処理装置に出力する信号発生手段とを有する暴走検出制御装置を備え、上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を出力することを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to
Thus, even if the communication between the central processing unit and the external processing unit goes out of control, the central processing unit goes out of control and the system can be prevented from stopping.
本発明の請求項2に係るマイクロコンピュータは、請求項1記載のマイクロコンピュータにおいて、上記中央演算処理装置は複数の上記外部処理部に排他的にメモリアクセスし、上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部を検知することを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、暴走状態にある外部処理部とのメモリアクセスを中止して、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to a second aspect of the present invention is the microcomputer according to the first aspect, wherein the central processing unit exclusively accesses memory to the plurality of external processing units, and the runaway detection control device includes the central processing unit. In the memory access from the arithmetic processing unit to the external processing unit, an external processing unit in which the memory access with the central processing unit did not end normally is detected.
As a result, even when the communication between the central processing unit and the external processing unit goes out of control, the memory access to the external processing unit in the runaway state is stopped, the central processing unit goes out of control, and the system stops. Can be avoided.
本発明の請求項3に係るマイクロコンピュータは、請求項1記載のマイクロコンピュータにおいて、上記暴走検出制御装置が、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した場合、上記中央演算処理装置は上記外部処理部へのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替えることを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、メモリアクセスを終了状態にして、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to a third aspect of the present invention is the microcomputer according to the first aspect, wherein the runaway detection control device does not normally end a memory access from the central processing unit to the external processing unit. Is detected, the central processing unit switches the memory access method for the external processing unit from the handshake mode to the fixed wait mode.
Thus, even if the communication between the central processing unit and the external processing unit goes out of control, the memory access is ended, and the central processing unit goes out of control and the system can be prevented from being stopped.
本発明の請求項4に係るマイクロコンピュータは、請求項2記載のマイクロコンピュータにおいて、上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した上記暴走検出回路を初期化し、かつ、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部のメモリ空間を開放するリセット回路を備えることを特徴とする。
これにより、中央演算処理装置との通信が暴走状態となった外部処理部のメモリ空間を開放して、次のメモリアクセスの受け待ち状態とすることができる。
A microcomputer according to a fourth aspect of the present invention is the microcomputer according to the second aspect, wherein the runaway detection control device does not normally end memory access from the central processing unit to the external processing unit. A reset circuit that initializes the runaway detection circuit that has detected the error, and releases the memory space of the external processing unit where the memory access with the central processing unit did not end normally.
As a result, the memory space of the external processing unit in which the communication with the central processing unit has gone out of control can be released to be in a state of waiting for the next memory access.
本発明の請求項5に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に上記中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路とを有する暴走検出制御装置を備え、上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を上記中央演算処理装置の割込み処理部に出力し、上記割込み処理部は、上記暴走検出信号を入力すると上記外部処理部へのメモリアクセスを制限することを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to a fifth aspect of the present invention, comprising: a central processing unit; and a memory access control unit for controlling when the central processing unit accesses a memory to an external processing unit having a memory function. , A counter is built in, a time is counted using the counter, a watchdog timer that generates a pulse signal when a predetermined time is counted, and a memory access from the central processing unit to the external processing unit. And a runaway detection control circuit that outputs a runaway detection signal by detecting that runaway has not been completed normally. The runaway detection circuit includes a memory from the central processing unit to the external processing unit. The watchdog timer generates a pulse signal between the start of access and the end of the memory access. Output the runaway detection signal to the interrupt processing unit of the central processing unit when the runaway detection signal is input, the interrupt processing unit limits memory access to the external processing unit. .
Thus, even if the communication between the central processing unit and the external processing unit is in a runaway state, it is possible to prevent the central processing unit from going out of control and stopping the system.
本発明の請求項6に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する複数の外部処理部に上記中央演算処理装置が排他的にメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了せずに暴走状態になった外部処理部から暴走通知を受け取り、上記暴走状態になった外部処理部とは別の外部処理部と上記メモリアクセス制御装置とを介して、上記暴走状態となった外部処理部の情報を上記中央演算処理装置に通知する暴走通知装置を備えることを特徴とする。
これにより、中央演算処理装置と外部処理部との通信が暴走状態となっても、暴走状態にある外部処理部とのメモリアクセスを中止して、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができる。
A microcomputer according to
As a result, even when the communication between the central processing unit and the external processing unit goes out of control, the memory access to the external processing unit in the runaway state is stopped, the central processing unit goes out of control, and the system stops. Can be avoided.
本発明の請求項7に係るマイクロコンピュータは、中央演算処理装置と、メモリ機能を有する外部処理部に該中央演算処理装置がメモリアクセスするときの制御を行うメモリアクセス制御装置とを備えたマイクロコンピュータにおいて、カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、上記パルス信号に基づいて、上記中央演算処理装置から外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成する信号発生手段とを有する暴走回避制御装置を備え、上記信号発生手段は、上記メモリアクセス開始後、上記ウォッチドッグタイマが予め設定された所定の時間を計数したときに上記擬似アクノリッジ信号を上記中央演算処理装置に出力することを特徴とする。
これにより、中央演算処理装置と外部メモリとの通信が暴走状態となっても、暴走状態にある外部処理部とのアクセスを中止して、中央演算処理装置が暴走状態となりシステムが停止するのを回避することができるという効果がある。
8. A microcomputer according to claim 7, comprising: a central processing unit; and a memory access control unit for controlling when the central processing unit accesses a memory to an external processing unit having a memory function. , A counter is built-in, a time is counted using the counter, and when a predetermined time is counted, a watchdog timer that generates a pulse signal, and the central processing unit is connected to an external device based on the pulse signal. A runaway avoidance control device having signal generation means for generating a pseudo acknowledgment signal indicating that the memory access to the processing unit has been completed, wherein the signal generation means sets the watchdog timer in advance after the memory access is started. The pseudo-acknowledge signal is counted by the central processing unit when the counted predetermined time is counted. And outputs.
As a result, even if the communication between the central processing unit and the external memory goes out of control, access to the external processing unit in the runaway state is stopped, and the central processing unit goes out of control and the system stops. There is an effect that it can be avoided.
以下、本発明の実施の形態にかかるマイクロコンピュータについて図を参照しながら説明する。 Hereinafter, a microcomputer according to an embodiment of the present invention will be described with reference to the drawings.
(実施の形態1)
図1は、実施の形態1に係るマイクロコンピュータの構成を示すブロック図である。図1において、図13と同一符号は同一、又は相当部分を示す。実施の形態1に係るマイクロコンピュータは、暴走検出制御装置12を備えることを特徴とする。暴走検出制御装置12は、CPU10と処理部A13又は処理部B14との通信の暴走状態を検出する。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of the microcomputer according to the first embodiment. 1, the same reference numerals as those in FIG. 13 denote the same or corresponding parts. The microcomputer according to the first embodiment includes a runaway
図1において、暴走検出制御装置12とメモリアクセス制御装置11とは、処理部A用アドレス信号A0、処理部A用データ信号D0、処理部A用チップセレクト信号CS0、処理部A及び処理部B用アクノリッジ信号DK23、アクノリッジ信号DK、処理部B用アドレス信号A1、処理部B用データ信号D1、及び処理部B用チップセレクト信号CS1を介して接続されている。
In FIG. 1, the runaway
また、暴走検出制御装置12と処理部A13とは、処理部A用アドレス信号A0、処理部A用データ信号D0、及び処理部A用チップセレクト信号CS0を介して接続されており、暴走検出制御装置12と処理部B14とは、処理部B用アドレス信号A1、処理部B用データ信号D1、及び処理部B用チップセレクト信号CS1を介して接続されている。
The runaway
また、処理部A13とメモリアクセス制御装置11とは処理部A用アクノリッジ信号DK0を介して、処理部B14とメモリアクセス制御装置11とは処理部B用アクノリッジ信号DK1を介して接続されている。
Further, the processing unit A13 and the memory
以下、暴走検出制御装置12について図2を用いて詳細に説明する。図2は、暴走検出制御装置12の構成を示すブロック図である。図2において、図1、図13と同一符号は同一、又は相当部分を示す。暴走検出制御装置12は、セレクタ121と、NOR回路122と、AND回路123と、処理部A用暴走検出回路124と、処理部B用暴走検出回路125と、ウォッチドッグタイマ(Watching Dog Timer:WDT)126と、汎用入出力ポート(GIO)127とを備える。
Hereinafter, runaway
WDT126は、カウンタを内蔵し、このカウンタのカウント結果が設定値になったときに、オーバーフロー信号aをアサートして出力する。GIO127は、暴走検出制御装置12をオンにするか否かを示す信号bを出力する。処理部A暴走検出回路124は、処理部A13が暴走したか否かを検出して処理部A用暴走信号cを出力する。処理部B暴走検出回路125は、処理部B14が暴走したか否かを検出して処理部B用暴走検出信号dを出力する。NOR回路122は処理部A用暴走信号cと処理部B用暴走信号dとから処理部A13又は処理部B14が暴走したことを示す暴走検出信号eを生成する。AND回路123は正規アクノリッジ信号DK23と暴走検出信号eとから擬似アクノリッジ信号fを生成する。セレクタ121はメモリアクセス制御装置11からの正規アクノリッジ信号DK23と擬似アクノリッジ信号fとのうちのいずれかを選択して、アクノリッジ信号DKとしてメモリアクセス制御装置11に出力する。
The
以上のように構成される実施の形態1に係るマイクロコンピュータは、従来のマイクロコンピュータと同様に、CPU10から処理部A13及び処理部B14へのメモリアクセス方式はハンドシェークモードであり、CPU10から処理部C15及び処理部D16へのメモリアクセス方式は固定ウエイトモードである。また、CPU10から処理部A13、処理部B14、処理部C15及び処理部D16へのそれぞれのメモリアクセスは、CPU10により排他的に制御されている。
In the microcomputer according to the first embodiment configured as described above, the memory access method from the
以下、実施の形態1に係るマイクロコンピュータの動作について説明する。なお、CPU10から処理部C15、処理部D16へのメモリアクセスは従来例と同様であるのでその説明を省略し、CPU10から処理部A13、処理部B14へのメモリアクセスについてのみ、図3を用いて説明する。
図3は実施の形態1に係るマイクロコンピュータの動作を説明するためのタイミングチャート図で、CPU10が処理部A13にメモリアクセスするときのタイミングチャートを示す。図3において、t0はCPU10から処理部A13へのメモリアクセス開始時刻、すなわち、処理部A用チップセレクト信号CS0がアサートされる時刻、t1はオーバーフロー信号aがアサートされる時刻、t2は擬似アクノリッジ信号fがアサートされる時刻、t3はCPU10から処理部A13へのメモリアクセスの終了時刻を示す。
Hereinafter, the operation of the microcomputer according to the first embodiment will be described. Since the memory access from the
FIG. 3 is a timing chart for explaining the operation of the microcomputer according to the first embodiment, and shows a timing chart when
まず、CPU10が処理部A13にメモリアクセスするときの動作について説明する。CPU10は、処理部A13にメモリアクセスするとき、時刻t0において、処理部A用チップセレクト信号CS0とアクセスしたいアドレス値を示すアドレス信号ADとをメモリアクセス制御装置11に出力して処理部A13へのアクセスを要求する。なお、メモリアクセス時には、暴走検出制御装置12がGIO127の出力信号bにより常にオンの状態であることとする。メモリアクセス制御装置11は、処理部A用チップセレクト信号CS0とアドレス信号ADとを受け取ると、処理部A用チップセレクト信号CS0と処理部A用アドレス信号A0とを、暴走検出制御装置12を介して処理部A13に渡す。この時点で処理部A13へのメモリアクセスが開始する。
First, an operation when the
メモリアクセスが開始されると、処理部A暴走検出回路124は、チップセレクト信号CS0とWDT126からのオーバーフロー信号aとを監視し、処理部A13が暴走状態であるか否か検出する。WDT126は、システムの電源投入時にカウントを開始し、通常のメモリアクセス時間に比べて十分長い時間経過後、すなわち、図3に示すt1のタイミングで、オーバーフロー信号aをアサートする。処理部A暴走検出回路124は、メモリアクセスが終了する前、すなわち、処理部A用チップセレクト信号CS0がネゲートされる前に、オーバフロー信号aがアサートされたことを検出すると、処理部A13が暴走したとして、t1の次サイクルt2で暴走検出信号cをアサートする。なお、1サイクルはシステムクロックの1周期に相当する。
When the memory access is started, the processing unit A
次に、NOR回路122は、処理部A13の暴走状態を示す暴走検出信号cを入力し、t2のタイミングでアサートした暴走検出信号eを出力する。そして、AND回路123も、暴走検出信号eに基づいて、t2のタイミングで疑似アクノリッジ信号fをアサートしてセレクタ121に出力する。セレクタ121は、信号bをセレクタ信号とし、暴走検出制御装置12がオン状態を示している間は、疑似アクノリッジ信号fを選択してメモリアクセス制御装置11に出力する。メモリアクセス制御装置11は、この疑似アクノリッジ信号fをCPU10に出力し、次サイクルt3で処理部A用チップセレクト信号CS0をネゲートする。これにより、CPU10から処理部A13へのメモリアクセスが終了する。CPU10は、処理部A13へのメモリアクセスが終了したことを認識すると、ハンドシェークモードである処理部A13へのメモリアクセス方式を自動的に固定ウエイトモードに切り替える。
Next, the NOR
また、CPU10が処理部B14にメモリアクセスするときは、処理部B用チップセレクト信号CS1とオーバーフロー信号aとから、上述のように、処理部B暴走検出回路125が処理部B14の暴走を検出する。そして、処理部B用暴走検出回路125が暴走検出信号dをアサートして出力すると、NOR回路122が暴走検出信号dと同じタイミングでアサートした暴走検出信号eを出力し、AND回路123が暴走検出信号eと同じタイミングでアサートした疑似アクノリッジ信号fを出力する。以降の動作は、CPU10から処理部A13へのメモリアクセス時と同様であるので説明を省略する。
Further, when the
このように、暴走検出制御装置12は、CPU10と処理部A13との通信の暴走状態を処理部A暴走検出回路124で検出し、CPU10と処理部B14との通信の暴走状態を処理部B暴走検出回路125で検出することで、処理部A13と処理部B14とのいずれで暴走が起きたかを特定できる。
As described above, runaway
以上のように、本実施の形態1に係るマイクロコンピュータは、マイクロコンピュータ1の外部にある、メモリ機能を有する外部処理部(処理部A13,処理部B14)と、メモリアクセス制御装置11との通信を監視する暴走検出制御装置12を備えるようにした。そして、暴走検出制御装置12は、CPU10が外部処理部とハンドシェーク方式でメモリアクセスを行っているとき、CPU10と外部処理部との通信が暴走状態であることを検出した場合、正規アクノリッジ信号DK23に代えて擬似アクノリッジ信号DKを、メモリアクセス制御装置11を介してCPU10に返すようにした。そして、CPU10は、この疑似アクノリッジ信号DKによりメモリアクセスが終了したことを認識して、外部処理部とのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替えるようにした。これにより、処理量の多いメモリアクセスを行って、CPU10と外部処理部との通信が暴走状態になったとしても、このメモリアクセスを強制的に終了させて、CPU10が暴走状態となりシステムが停止するのを回避することができる。
As described above, the microcomputer according to the first embodiment communicates between the external processing units (the processing units A13 and B14) having a memory function and the memory
(実施の形態2)
次に本発明の実施の形態2に係るマイクロコンピュータについて図4,5を用いて説明する。
図4は実施の形態2に係るマイクロコンピュータ1の暴走検出制御装置12aの構成を示す図である。図4において図1、図2、図13と同一符号は、同一、又は相当部分を示す。暴走検出制御装置12aはリセット回路128を備えることを特徴とする。リセット回路128は、WDT126からのオーバーフロー信号aに基づいて、リセット信号gを処理部A暴走検出回路124及び処理部B暴走検出回路125に出力してこれらの回路を初期化するとともに、リセット信号gを処理部A13及び処理部B14に出力して、これらの処理部のメモリ空間を開放する。
(Embodiment 2)
Next, a microcomputer according to a second embodiment of the present invention will be described with reference to FIGS.
FIG. 4 is a diagram showing a configuration of a runaway
以上のように構成されるマイクロコンピュータの動作について、図5を用いて説明する。図5は、実施の形態2に係るマイクロコンピュータの動作を説明するためのタイミングチャート図であり、CPU10が処理部A13にメモリアクセスするときのタイミングチャートを示す。図5において、t4はWDT126のオーバーフロー信号aがネゲートされる時刻、t5はリセット回路128から処理部A13、処理部B14、処理部A暴走検出回路124及び処理部B暴走検出回路125へ出力されるリセット信号gがアサートされる時刻、t6は処理部A暴走検出回路124及び処理部B暴走検出回路125が初期化される時刻であり、かつ、処理部A13及び処理部B14のメモリ空間が開放される時刻である。
The operation of the microcomputer configured as described above will be described with reference to FIG. FIG. 5 is a timing chart for explaining the operation of the microcomputer according to the second embodiment, and shows a timing chart when
以下、CPU10が処理部A13にメモリアクセスするときの動作について説明する。なお、暴走検出制御装置12aはGIO127の出力信号bによりオンの状態であることとして説明する。時刻t0〜t3までの動作は、実施の形態1と同様であるので説明を省略する。
Hereinafter, an operation when the
時刻t4において、WDT126は、オーバーフロー信号aをアサート後、内蔵のカウンタのカウンタ結果が設定値に達したとき、オーバーフロー信号aをネゲートする。リセット回路128aは、オーバフロー信号aがネゲートされると、次サイクルt5で、リセット信号gをアサートして、処理部A13、処理部B14、処理部A暴走検出回路124、及び処理部B暴走検出回路125に出力する。
At time t4, after asserting the overflow signal a, the
そして、次サイクルt6で、処理部A暴走検出回路124及び処理部B暴走検出回路125が初期化され、処理部A13及び処理部B14のメモリ空間が開放される。
Then, in the next cycle t6, the processing unit A
このように本実施の形態2に係るマイクロコンピュータは、CPU10と外部処理部(処理部13,処理部14)との通信が暴走状態になると、メモリアクセス制御装置11がCPU10に対して擬似アクノリッジ信号fを出力することで、CPU10と外部処理部とのメモリアクセスを終了させる。そして、メモリアクセス終了後、WDT126の内蔵カウンタのカウンタ結果が設定値に達すると、リセット回路128が外部処理部(処理部A13、処理部B14)と、暴走検出回路(処理部A暴走検出回路124、処理部B暴走検出回路125)とにリセット信号gを出力して、外部処理部のメモリ空間を開放し、暴走検出回路を初期化する。これにより、CPU10と外部処理部との通信が暴走状態となったとしても、メモリアクセスを強制的に終了させて、CPU10が暴走状態となりシステムが停止するのを回避できる。また、リセット信号gにより、暴走検出回路を初期化し、かつ、CPU10との通信が暴走状態となった外部処理部のメモリ空間を開放して、次のメモリアクセスの受け待ち状態とすることができる。
As described above, in the microcomputer according to the second embodiment, when the communication between the
(実施の形態3)
次に本発明の実施の形態3に係るマイクロコンピュータについて、図6,7を用いて説明する。
図6は実施の形態3に係るマイクロコンピュータ1の暴走検出制御装置12bの構成を示す図である。図6において、図1、図2、図13と同一符号は同一、又は相当部分を示す。暴走検出制御装置12bはリセット回路128aを備えることを特徴とする。リセット回路128aは、リセット信号hを処理部A13と処理部A暴走検出回路124とに出力して、処理部A13のメモリ空間を開放し、かつ、処理部A用暴走検出回路124を初期化する。また、リセット信号iを処理部B14と処理部B用暴走検出回路125とに出力して、処理部B14のメモリ空間を開放し、かつ、処理部B用暴走検出回路125を初期化する。
(Embodiment 3)
Next, a microcomputer according to a third embodiment of the present invention will be described with reference to FIGS.
FIG. 6 is a diagram showing a configuration of a runaway
図7は、実施の形態3に係るマイクロコンピュータの動作を説明するためのタイミングチャート図で、CPU10が処理部A13にメモリアクセスするときのタイミングチャートを示す。図7において、t4はWDT126がオーバーフロー信号aをネゲートする時刻、t5はリセット回路128aから処理部A13及び処理部A暴走検出回路124へのリセット信号hがアサートされる時刻、t6は処理部A13のメモリ空間が開放され、処理部A暴走検出回路124が初期化される時刻である。
FIG. 7 is a timing chart for explaining the operation of the microcomputer according to the third embodiment, and shows a timing chart when
以上のように構成されたマイクロコンピュータ1の暴走検出制御装置12bの動作について説明する。なお、暴走検出制御装置12bはGIO127の出力信号bによりオンの状態であることとして説明する。
The operation of the runaway
まず、CPU10が 処理部A13にメモリアクセスするときの動作について説明する。時刻t0〜t3までの動作は、実施の形態1と同様であるので説明を省略する。
First, an operation when the
時刻t4において、WDT126は、オーバーフロー信号aをアサート後、内蔵カウンタのカウンタ結果が設定値に達したとき、オーバーフロー信号aをネゲートする。リセット回路128aは、オーバーフロー信号aがネゲートされると、次サイクルt5でリセット信号hをアサートして、処理部A13と処理部A暴走検出回路124とに出力する。これにより、次サイクルt6で処理部A13のメモリ空間が開放され、処理部A暴走検出回路124が初期化される。
At time t4, the
また、CPU10から処理部B14にメモリアクセスするとき、処理部B暴走検出回路125がCPU10と処理部B14との通信の暴走状態を検出した場合、時刻t4でWDT126がオーバーフロー信号aをネゲートし、時刻t5でリセット回路128aがリセット信号iをアサートして処理部B14と処理部B暴走検出回路125とに出力する。これにより、時刻t6で処理部B14のメモリ空間が開放され、処理部B暴走検出回路125が初期化される。
When the CPU B accesses the processing section B14 in memory, when the processing section B
このように実施の形態3に係るマイクロコンピュータは、CPU10と外部処理部(処理部A13,処理部B14)との通信が暴走状態になると、メモリアクセス制御装置11が擬似アクノリッジ信号fをCPUに出力することでメモリアクセスを終了させる。そして、メモリアクセス終了後、WDT126の内蔵カウンタのカウント結果が設定値に達すると、リセット回路128aがCPU10との通信が暴走状態となった外部処理部とその暴走状態を検出した暴走検出回路にリセット信号を出力し、該外部処理部のメモリ空間を開放し、かつ、該暴走検出回路を初期化するようにした。これにより、CPU10と外部処理部との通信が暴走状態となったとしても、このメモリアクセスを強制的に終了させて、CPU10が暴走状態となりシステムが停止するのを回避できる。また、リセット信号h又はリセット信号iにより、暴走を検出した暴走検出回路を初期化でき、さらに、暴走した処理部のメモリ空間を開放して次のメモリアクセスの待ち受け状態とすることができる。
As described above, in the microcomputer according to the third embodiment, when the communication between the
(実施の形態4)
次に本発明の実施の形態4に係るマイクロコンピュータについて図8を用いて説明する。
図8は、実施の形態4に係るマイクロコンピュータの暴走検出制御装置12cの構成を示す図である。図8において、図1、図2、図13と同一符号は同一、又は相当部分を示す。実施の形態4に係るマイクロコンピュータ1は、CPU10と暴走検出制御装置12cとが、処理部A用暴走検出信号INT1と処理部B用暴走検出信号INT2とを介して接続されることを特徴とする。
(Embodiment 4)
Next, a microcomputer according to
FIG. 8 is a diagram showing a configuration of a microcomputer runaway
以上のように構成されたマイクロコンピュータ1の動作ついて説明する。
まず、CPU10が処理部A13にメモリアクセスするときの動作について説明する。CPU10は、メモリアクセス制御装置11に処理部A用チップセレクト信号CS0とアクセスしたいアドレス値を示すアドレス信号ADとを出力して処理部A13へのアクセスを要求する。メモリアクセス制御装置11は、処理部A用チップセレクト信号CS0とアドレス信号ADとを受け取ると、処理部A用チップセレクト信号CS0と処理部A用アドレス信号を処理部A13に出力する。この時点で、処理部A13へのメモリアクセスが開始する。
The operation of the
First, an operation when the
処理部A暴走検出回路124は、CPU10から処理部A13へのメモリアクセスが終了する前に、アサートされたオーバーフロー信号aをWDT126から入力すると、次サイクルで、処理部A用暴走検出信号INT1をCPU10の割込み処理部の割込み端子1に直接出力する。割込み処理部は処理部A用暴走検出信号INT1を入力すると、処理部A13へのメモリアクセスを制限する。
同様にして、CPU10から処理部B14へメモリアクセスにおいて、処理部B暴走検出回路125がCPU10と処理部B14との通信の暴走状態を検出すると、処理部B用暴走検出回路125は、処理部B用暴走検出信号INT2をCPU10の割込み処理部の割込み端子2に直接出力する。
When the asserted overflow signal a is input from the
Similarly, when the processing unit B
CPU10は、処理部A用暴走検出信号INT1を入力した場合は、処理部A13とのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替え、処理部B用暴走検出信号INT2を入力した場合は、処理部B14とのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替える。これにより、CPU10と処理部A13又は処理部B14との通信が暴走状態となっても、CPU10が暴走状態となるのを回避できる。
When the runaway detection signal INT1 for the processing unit A is input, the
このように本実施の形態4に係るマイクロコンピュータは、CPU10と外部処理部(処理部A13,処理部B14)とがハンドシェーク方式でアクセスを行っているときに、暴走検出回路(処理部A暴走検出回路124,処理部B暴走検出回路125)がCPU10と外部処理部との通信に暴走状態を検出した場合、暴走検出回路から暴走検出信号(処理部A用暴走検出信号INT1,処理部B用暴走検出信号INT2)がCPU10の割込み処理部の割込み端子(割込み端子1,2)に直接入力されるようにした。そして、CPU10が暴走検出信号に基づいて、外部処理部とのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替えるようにした。これにより、CPU10と外部処理部との通信が暴走状態となっても、メモリアクセスを終了させて、CPU10が暴走状態となりシステムが停止するのを迅速に回避して、暴走状態からの復帰の早期化を図ることができる。
As described above, the microcomputer according to the fourth embodiment provides a runaway detection circuit (processing unit A runaway detection) when
(実施の形態5)
次に本発明の実施の形態5に係るマイクロコンピュータについて図9,10を用いて説明する。
図9は、実施の形態5に係るマイクロコンピュータの構成を示すブロック図である。図9において、図13と同一符号は、同一、又は相当部分を示す。実施の形態5に係るマイクロコンピュータ1は暴走通知装置17を備えること特徴とする。図9において、処理部A13が暴走した場合、暴走通知装置17は処理部A13から暴走通知信号INF1を入力する。例えば、処理部A13は、内部にカウントを備え、通常のメモリアクセス時間に比べて十分に長い時間が経過しても、メモリアクセスが終了しない場合、暴走通知装置17に暴走通知信号INF1を出力する。暴走通知装置17は、処理部A13から暴走通知信号INF1を入力すると、処理部B14とメモリアクセス制御装置11とを介して、CPU10に処理部A13が暴走したことを通知する。また、暴走通知装置17は、処理部B14が暴走した場合、処理部B14から暴走通知信号INF2を入力し、処理部A13とメモリアクセス制御装置11とを介して、CPU10に処理部B14が暴走したことを通知する。
(Embodiment 5)
Next, a microcomputer according to a fifth embodiment of the present invention will be described with reference to FIGS.
FIG. 9 is a block diagram showing a configuration of a microcomputer according to the fifth embodiment. 9, the same reference numerals as those in FIG. 13 indicate the same or corresponding parts. The
以上のように構成されたマイクロコンピュータ1の動作について説明する。まず、CPU10から処理部A13にメモリアクセスするときの動作について説明する。CPU10は、処理部A13にメモリアクセスするとき、メモリアクセス制御装置11に処理部A用チップセレクト信号CS0とアクセスしたいアドレス値を示すアドレス信号ADとを出力して処理部A13へのアクセスを要求する。メモリアクセス制御装置11は、これらの信号を受け取ると、処理部A用チップセレクト信号CS0と処理部A用アドレス信号A0とを処理部A13に出力する。この時点で処理部A13へのメモリアクセスが開始する。
The operation of the
CPU10から処理部A13へのメモリアクセス開始後、通常のメモリアクセス時間が経過しても、メモリアクセスが終了しない場合、暴走通知装置17は処理部A13からの暴走通知信号INF1を入力する。暴走通知信号INF1を入力すると暴走通知装置17は、正常動作を行っている他方の処理部B14とメモリアクセス制御装置11とを介して、CPU10へ処理部A13が暴走状態であることを通知する。すなわち、暴走通知装置17が処理部B14に暴走通知信号INF2を出力し、この暴走通知信号INF2が処理部B14とメモリアクセス制御装置11とを介して、CPU10に入力される。以上のようにして、暴走通知装置17はメモリアクセスの制限を要求する。処理部A13が暴走状態であることを通知されたCPU10は、暴走状態である処理部A13へのメモリアクセスを停止させることで、システムの暴走状態からの復帰を図る。
また、CPU10と処理部B14との通信が暴走状態になった場合、暴走通知装置17は処理部B14から暴走通知信号INF2を入力し、処理部A13とメモリアクセス制御装置11とを介して、CPU10に処理部B14が暴走状態であることを通知する。すなわち、暴走通知装置17が処理部A13に暴走通知信号INF1を出力し、この暴走通知信号INF1が処理部A13とメモリアクセス制御装置11と介して、CPU10に入力される。
After the start of the memory access from the
When the communication between the
このように本実施の形態5に係るマイクロコンピュータは、暴走通知装置17を備え、ある外部処理部(例えば処理部A13)が暴走した場合には、暴走通知装置17が別の外部処理部(例えば処理部B14)とメモリアクセス制御装置11とを介してCPU10に処理部が暴走状態であることを通知するようにした。これにより、CPU10と、外部処理部(処理部A13、処理部B14)との通信が暴走状態となっても、CPU10が暴走状態となりシステムが停止するのを回避することができる。
As described above, the microcomputer according to the fifth embodiment includes runaway notifying
(実施の形態6)
次に本発明の実施の形態6に係るマイクロコンピュータについて図10,11を用いて説明する。
図10は、実施の形態6に係るマイクロコンピュータの構成を示すブロック図であり、図13と同一符号は同一、又は相当部分を示す。実施の形態6に係るマイクロコンピュータは暴走回避制御装置18を備えることを特徴とする。暴走回避制御装置18は、メモリアクセス制御装置11を介して、CPU10と処理部A13及び処理部B14との通信の暴走状態を監視し、暴走回避を行う。
(Embodiment 6)
Next, a microcomputer according to
FIG. 10 is a block diagram showing a configuration of a microcomputer according to the sixth embodiment. The same reference numerals as those in FIG. 13 denote the same or corresponding parts. The microcomputer according to the sixth embodiment includes a runaway
図11は、暴走回避制御装置18の詳細な構成を示す図である。図11において、暴走回避制御装置18は、WDT180と、NOR回路181と、AND回路182とを備える。WDT180は、内蔵カウンタのカウント結果が設定値に達したとき、パルス信号を発生する。CPU10が処理部A13にメモリアクセスするときは、処理部A用パルス信号j発生し、CPU10が処理部B14にメモリアクセスするときは、処理部B用パルス信号kを発生する。NOR回路181は、処理部A用パルス信号j又は処理部B用パルス信号kを入力し、疑似アクノリッジ信号lを出力する。AND回路182は擬似アクノリッジ信号lと正規アクノリッジ信号DK23とを入力し、CPU10へ出力するためのアクノリッジ信号DKを生成する。
FIG. 11 is a diagram showing a detailed configuration of the runaway
以上のように構成される実施の形態6に係るマイクロコンピュータの動作について図12を用いて説明する。図12は、実施の形態6に係るマイクロコンピュータの動作を説明するためのタイミングチャート図で、CPU10から処理部A13へのメモリアクセス時のタイミングチャートを示している。図12において、t0は処理部A用チップセレクト信号CS0がアサートされる時刻、t7はWDT180がパルス信号を発生する時刻であり、かつ、擬似アクノリッジ信号lがアサートされる時刻、t8はCPU10から処理部A13へのメモリアクセスが終了する時刻である。
The operation of the microcomputer thus configured according to the sixth embodiment will be described with reference to FIG. FIG. 12 is a timing chart for explaining the operation of the microcomputer according to the sixth embodiment, and shows a timing chart at the time of memory access from
CPU10は、処理部A13にメモリアクセスするとき、時刻t0において、メモリアクセス制御装置11に処理部A用チップセレクト信号CS0と、アクセスしたいアドレス値を示すアドレス信号ADを出力して、処理部A13へのメモリアクセスを要求する。メモリアクセス制御装置11は、これらの信号を受け取ると、処理部A13に処理部A用チップセレクト信号CS0と、処理部A用アドレス信号A0とを出力する。
When a memory is accessed to the processing unit A13, the
この時点で処理部A13へのメモリアクセスが開始される。そして、WDT180は、内蔵の非同期カウンタにより処理部A用チップセレクト信号CS0がアサートされてからの時間をカウントアップし、カウント結果が設定値を超えたとき、t7のタイミングで処理部A用パルス信号jを発生する。そして、NOR回路181がt7のタイミングで擬似アクノリッジ信号lを生成し、AND回路182が擬似アクノリッジ信号lをアクノリッジ信号DKとしてCPU10へ出力することで、t8のタイミングで強制的にメモリアクセスが終了する。
At this point, memory access to the processing unit A13 is started. The
同様に、CPU10が処理部B14にメモリアクセスするとき、WDT180は、内蔵の非同期カウンタにより処理部B用チップセレクト信号CS1がアサートされてからの時間をカウントアップし、カウント結果が設定値を超えたとき、t7のタイミングで処理部B用パルス信号kを発生する。そして、NOR回路181が擬似アクノリッジ信号lを生成し、AND回路182が擬似アクノリッジ信号lをアクノリッジ信号DKとしてCPU10へ出力することで、t8のタイミングで強制的にメモリアクセスが終了する。
Similarly, when the
このように本実施の形態6に係るマイクロコンピュータは、メモリアクセス制御装置11と外部処理部(処理部A13、処理部B14)とを接続する暴走回避制御装置18を備えるようにした。そして、暴走回避制御装置18がメモリアクセス開始されてから所定時間が経過したとき、擬似アクノリッジ信号lを生成し、この疑似アクノリッジ信号がメモリアクセス制御装置11を介してアクノリッジ信号DKとしてCPU10に入力する。そして、CPU10は、この疑似アクノリッジ信号DKによりメモリアクセスが終了したとを認識してメモリアクセスを終了させる。これにより、CPU10と外部処理部とのメモリアクセスを、メモリアクセス開始時から所定時間経過後に強制的に終了させて、システムの暴走を回避することができる。
As described above, the microcomputer according to the sixth embodiment includes the runaway
マイクロコンピュータから外部メモリに処理量の多いメモリアクセスを行うシステムに好適である。 The present invention is suitable for a system in which a microcomputer accesses a large amount of memory from an external memory.
1 マイクロコンピュータ
10 中央演算処理装置(CPU)
11 メモリアクセス制御装置
12,12a,12b,12c 暴走検出制御装置
13 処理部A
14 処理部B
15 処理部C
16 処理部D
17 暴走通知装置
18 暴走回避制御装置
AD,A0〜A3 アドレス信号
DT データ信号
CS0〜CS3 チップセレクト信号
DK,DK2,DK3,DK23 アクノリッジ信号
D0〜D3 データ信号
A1,A2 アドレス信号
INT1,INT2 暴走検出割込み信号
INF1,INF2 暴走通知信号
a オーバーフロー信号
b 暴走検出制御装置オン信号
c 処理部A用暴走検出信号
d 処理部B用暴走検出信号
e 処理部A及び処理部B用暴走検出信号
f 擬似アクノリッジ信号
g リセット信号
h 処理部A用リセット信号
i 処理部B用リセット信号
j 処理部A用パルス信号
k 処理部B用パルス信号
l 擬似アクノリッジ信号(パルス信号)
121 セレクタ
122 NOR回路
123 AND回路
124 処理部Aの暴走検出回路
125 処理部Bの暴走検出回路
126,180 ウォッチドッグタイマ(WDT)
127 汎用ポート(GIO)
128,128a リセット生成装置
181 NOR回路
182 AND回路
1
11 Memory
14 Processing part B
15 Processing unit C
16 Processing unit D
17
INT1, INT2 Runaway detection interrupt signal INF1, INF2 Runaway notification signal a Overflow signal b Runaway detection controller ON signal c Runaway detection signal for processing unit A d Runaway detection signal for processing unit B e Runaway detection for processing unit A and processing unit B Signal f Pseudo acknowledge signal g Reset signal h Reset signal for processing unit A i Reset signal for processing unit B j Pulse signal for processing unit k Pulse signal for processing unit l Pseudo acknowledgment signal (pulse signal)
121
127 General-purpose port (GIO)
128, 128a
Claims (7)
カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、
上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路と、
上記暴走検出信号に基づいて、上記中央演算処理装置から上記外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成し、上記中央演算処理装置に出力する信号発生手段と、
を有する暴走検出制御装置を備え、
上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を出力する、
ことを特徴とするマイクロコンピュータ。 A microcomputer including a central processing unit and a memory access control unit that performs control when the central processing unit accesses a memory to an external processing unit having a memory function;
A watchdog timer incorporating a counter, counting time using the counter, and generating a pulse signal when counting a predetermined time;
A runaway detection circuit that detects that the memory access from the central processing unit to the external processing unit has not been normally completed and outputs a runaway detection signal;
A signal generation unit that generates a pseudo acknowledge signal indicating that the memory access from the central processing unit to the external processing unit has been completed based on the runaway detection signal, and outputs the pseudo acknowledgment signal to the central processing unit;
A runaway detection control device having
The runaway detection circuit performs the runaway when the watchdog timer generates a pulse signal during a period from the start of memory access from the central processing unit to the external processing unit to the end of the memory access. Output detection signal,
A microcomputer characterized by the above-mentioned.
上記中央演算処理装置は複数の上記外部処理部に排他的にメモリアクセスし、
上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部を検知する、
ことを特徴とするマイクロコンピュータ。 The microcomputer according to claim 1,
The central processing unit exclusively accesses the plurality of external processing units with a memory,
The runaway detection control device detects, in the memory access from the central processing unit to the external processing unit, an external processing unit in which the memory access with the central processing unit did not end normally.
A microcomputer characterized by the above-mentioned.
上記暴走検出制御装置が、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した場合、上記中央演算処理装置は上記外部処理部へのメモリアクセス方式をハンドシェークモードから固定ウエイトモードに切り替える、
ことを特徴とするマイクロコンピュータ。 The microcomputer according to claim 1,
If the runaway detection control device detects that the memory access from the central processing unit to the external processing unit has not been normally completed, the central processing unit determines a memory access method to the external processing unit. Switch from handshake mode to fixed weight mode,
A microcomputer characterized by the above-mentioned.
上記暴走検出制御装置は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出した上記暴走検出回路を初期化し、かつ、上記中央演算処理装置とのメモリアクセスが正常に終了しなかった外部処理部のメモリ空間を開放するリセット回路を備える、
ことを特徴とするマイクロコンピュータ。 The microcomputer according to claim 2,
The runaway detection control device initializes the runaway detection circuit which has detected that the memory access from the central processing unit to the external processing unit has not been normally completed, and stores the memory with the central processing unit. A reset circuit for releasing the memory space of the external processing unit in which the access has not been normally completed;
A microcomputer characterized by the above-mentioned.
カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、
上記中央演算処理装置から上記外部処理部へのメモリアクセスが正常に終了しなかったことを検出して暴走検出信号を出力する暴走検出回路と、
を有する暴走検出制御装置を備え、
上記暴走検出回路は、上記中央演算処理装置から上記外部処理部へのメモリアクセスが開始してから該メモリアクセスが終了するまでの間に、上記ウォッチドッグタイマがパルス信号を発生した場合に上記暴走検出信号を上記中央演算処理装置の割込み処理部に出力し、
上記割込み処理部は、上記暴走検出信号を入力すると上記外部処理部へのメモリアクセスを制限すること、
を特徴とするマイクロコンピュータ。 A microcomputer including a central processing unit and a memory access control unit that performs control when the central processing unit accesses a memory to an external processing unit having a memory function;
A watchdog timer incorporating a counter, counting time using the counter, and generating a pulse signal when counting a predetermined time;
A runaway detection circuit that detects that the memory access from the central processing unit to the external processing unit has not been normally completed and outputs a runaway detection signal;
A runaway detection control device having
The runaway detection circuit performs the runaway when the watchdog timer generates a pulse signal during a period from the start of memory access from the central processing unit to the external processing unit to the end of the memory access. Outputting the detection signal to the interrupt processing unit of the central processing unit,
The interrupt processing unit, when the runaway detection signal is input, restricts memory access to the external processing unit;
A microcomputer.
上記中央演算処理装置から上記外部処理部へのメモリアクセスにおいて、上記中央演算処理装置とのメモリアクセスが正常に終了せずに暴走状態になった外部処理部から暴走通知を受け取り、上記暴走状態になった外部処理部とは別の外部処理部と上記メモリアクセス制御装置とを介して、上記暴走状態となった外部処理部の情報を上記中央演算処理装置に通知する暴走通知装置を備える、
ことを特徴とするマイクロコンピュータ。 A microcomputer including a central processing unit and a memory access control device that performs control when the central processing unit exclusively accesses a plurality of external processing units having a memory function;
In the memory access from the central processing unit to the external processing unit, a runaway notification is received from the external processing unit in which the memory access with the central processing unit did not end normally and went into a runaway state. A runaway notifying device that notifies the central processing unit of information on the runaway state of the external processing unit via the external processing unit and the memory access control device different from the external processing unit.
A microcomputer characterized by the above-mentioned.
カウンタを内蔵し、該カウンタを用いて時間を計数し、所定の時間を計数したときに、パルス信号を発生するウォッチドッグタイマと、
上記パルス信号に基づいて、上記中央演算処理装置から外部処理部へのメモリアクセスが終了したことを示す擬似アクノリッジ信号を生成する信号発生手段と、
を有する暴走回避制御装置を備え、
上記信号発生手段は、上記メモリアクセス開始後、上記ウォッチドッグタイマが予め設定された所定の時間を計数したときに上記擬似アクノリッジ信号を上記中央演算処理装置に出力する、
ことを特徴とするマイクロコンピュータ。 A microcomputer including a central processing unit and a memory access control unit that performs control when the central processing unit accesses a memory to an external processing unit having a memory function;
A watchdog timer incorporating a counter, counting time using the counter, and generating a pulse signal when counting a predetermined time;
Signal generation means for generating a pseudo acknowledge signal indicating that the memory access from the central processing unit to the external processing unit has been completed based on the pulse signal,
A runaway avoidance control device having
The signal generating means outputs the pseudo acknowledgment signal to the central processing unit when the watchdog timer has counted a predetermined time after the start of the memory access,
A microcomputer characterized by the above-mentioned.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004131765A JP2004348719A (en) | 2003-04-30 | 2004-04-27 | Microcomputer |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003125739 | 2003-04-30 | ||
JP2004131765A JP2004348719A (en) | 2003-04-30 | 2004-04-27 | Microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004348719A true JP2004348719A (en) | 2004-12-09 |
Family
ID=33543413
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004131765A Pending JP2004348719A (en) | 2003-04-30 | 2004-04-27 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004348719A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010140361A (en) * | 2008-12-12 | 2010-06-24 | Fujitsu Microelectronics Ltd | Computer system and abnormality detection circuit |
-
2004
- 2004-04-27 JP JP2004131765A patent/JP2004348719A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010140361A (en) * | 2008-12-12 | 2010-06-24 | Fujitsu Microelectronics Ltd | Computer system and abnormality detection circuit |
US8700835B2 (en) | 2008-12-12 | 2014-04-15 | Fujitsu Semiconductor Limited | Computer system and abnormality detection circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR940001273B1 (en) | Micro-system and method controlling bus-cycle | |
TWI447650B (en) | Interrupt distribution scheme | |
TWI421770B (en) | System and method for placing a processor into a gradual slow mode of operation | |
US5138709A (en) | Spurious interrupt monitor | |
JP2007058716A (en) | Data transfer bus system | |
US10318466B2 (en) | Method and apparatus for handling outstanding interconnect transactions | |
US5813041A (en) | Method for accessing memory by activating a programmable chip select signal | |
JP2006344087A (en) | Task management device for controller and task management method for controller | |
JP2004348719A (en) | Microcomputer | |
EP3945427A1 (en) | Deadlock condition avoidance in a data processing system with a shared slave | |
US20040255207A1 (en) | Microcomputer | |
JP2008262557A (en) | Task management device for controller and task management method for controller | |
JP2007052685A (en) | Microcontroller | |
US20220415405A1 (en) | Memory-control circuit and method for controlling erasing operation of flash memory | |
JP2015014962A (en) | Arithmetic device, arithmetic method, and program | |
JP2002049580A (en) | Bus managing device, bus use request transmitter, method of bus managing, and bus use request transmission method | |
JP2008217419A (en) | Interruption controller for automatically changing interruption level | |
JP2018005490A (en) | Electronic controller | |
JP2004220309A (en) | Multiprocessor system | |
JP4587000B2 (en) | Chip select circuit | |
JPH10307737A (en) | Device and method for detecting runaway of cpu | |
JP3977694B2 (en) | Reset device | |
JP2002278753A (en) | Data processing system | |
JP2802091B2 (en) | Interrupt vector control method | |
KR20230104625A (en) | System and Method for Modem Stabilization When Waiting for AP Powered Link Recovery |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040827 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070705 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070717 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20071204 |