JPH10187202A - Microprocessor controller - Google Patents

Microprocessor controller

Info

Publication number
JPH10187202A
JPH10187202A JP34404296A JP34404296A JPH10187202A JP H10187202 A JPH10187202 A JP H10187202A JP 34404296 A JP34404296 A JP 34404296A JP 34404296 A JP34404296 A JP 34404296A JP H10187202 A JPH10187202 A JP H10187202A
Authority
JP
Japan
Prior art keywords
ram
microprocessor
signal
storage unit
control
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
Application number
JP34404296A
Other languages
Japanese (ja)
Inventor
Yoshio Ogawa
禅雄 小川
Akihiro Mimura
昭弘 三村
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP34404296A priority Critical patent/JPH10187202A/en
Publication of JPH10187202A publication Critical patent/JPH10187202A/en
Pending legal-status Critical Current

Links

Landscapes

  • Safety Devices In Control Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform the continuous control against occurrence of a fault and also to improve a working rate and the reliability by writing the new data obtained via the processing that is carried out by a microprocessor based on the contents of a selected storage means into plural storage means at a time. SOLUTION: The control programs and data are stored in the 1st and 2nd RAM 7 and 8, and a RAM write control circuit 30 simultaneously writes the new data into both RAM 7 and 8. Thus, the control programs and data can be stored in the normal one of both RAM 7 and 8 even if one of both RAM 7 and 8 has a fault. Therefore, the normal RAM 7 or 8 can be selected by a RAM read selection circuit 25 while a short break of execution of the control program is minimized. As a result, it is possible to restore the storage contents and to perform the continuous control without using a restart system applying a resetting operation against occurrence of a fault.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、鉄鋼の圧延プラン
ト用モータドライブ制御装置、原子力発電における冷却
水循環ポンプ用モータドライブ制御装置、鉄道車両用モ
ータドライブ制御装置、電力系統における保護継電器リ
レー制御装置、電力変換制御装置等のような高い信頼性
と連続制御が要求されるマイクロプロセッサ制御装置に
関する。
The present invention relates to a motor drive control device for a steel rolling plant, a motor drive control device for a cooling water circulating pump in nuclear power generation, a motor drive control device for a railway vehicle, a protection relay relay control device in a power system, The present invention relates to a microprocessor control device such as a power conversion control device that requires high reliability and continuous control.

【0002】[0002]

【従来の技術】鉄鋼の圧延プラント用モータドライブ制
御装置、原子力発電における冷却水循環ポンプ用モータ
ドライブ制御装置、鉄道車両用モータドライブ制御装
置、電力系統における保護継電器リレー制御装置、電力
変換制御装置等のマイクロプロセッサ制御装置で高い信
頼性と連続制御が要求されるため、マイクロプロセッサ
に異常が発生した場合の障害の回避が重要となってい
る。
2. Description of the Related Art Motor drive control devices for steel rolling plants, motor drive control devices for cooling water circulation pumps in nuclear power generation, motor drive control devices for railway vehicles, protection relay relay control devices in power systems, power conversion control devices, etc. Since high reliability and continuous control are required in a microprocessor control device, it is important to avoid a failure when an abnormality occurs in the microprocessor.

【0003】近年、マイクロプロセッサ制御装置のマイ
クロプロセッサは高速化され、この高速性を発揮するに
はRAMなどの記憶手段の高速化が不可欠となってい
る。この種の高速動作可能なRAMとしては、スタティ
ックRAM(以下、SRAMという)やダイナミックR
AM(以下、DRAMという)が利用される。
In recent years, the speed of microprocessors in microprocessor control devices has been increased, and it is essential to increase the speed of storage means such as a RAM in order to exhibit this high speed. This type of RAM that can operate at high speed includes a static RAM (hereinafter referred to as SRAM) and a dynamic RAM.
AM (hereinafter, referred to as DRAM) is used.

【0004】図8は、このようなマイクロプロセッサ制
御装置による処理の一例を示す概略図である。図8
(a)において、このマイクロプロセッサ制御装置に搭
載されたマイクロプロセッサ1は、ROM2から制御プ
ログラムを、RAM3からデータを読出し、このプログ
ラムとデータに基づいて処理を実行する。すなわち、マ
イクロプロセッサ制御装置は、制御プログラム格納領域
にROM2が、データ格納領域にRAM3が適用されて
いる。処理の過程又は結果として得られたデータはRA
M3に書込まれる。
FIG. 8 is a schematic diagram showing an example of processing by such a microprocessor control device. FIG.
1A, a microprocessor 1 mounted on the microprocessor control device reads a control program from a ROM 2 and data from a RAM 3, and executes a process based on the program and the data. That is, in the microprocessor control device, the ROM 2 is applied to the control program storage area, and the RAM 3 is applied to the data storage area. The process or resulting data is RA
Written to M3.

【0005】ここでRAM3にSRAMやDRAMが利
用されるが、SRAM及びDRAMには、いずれにもソ
フトウェアエラーと呼ばれる一過性のエラーが発生する
ことがある。このエラーはRAMデバイスのパッケージ
材に含有されるウラン、トリウムのα崩壊によるα線
と、RAMを駆動する信号線等から受けるノイズとに起
因するものである。
Here, an SRAM or a DRAM is used for the RAM 3, and a transient error called a software error may occur in each of the SRAM and the DRAM. This error is caused by α rays due to α decay of uranium and thorium contained in the package material of the RAM device, and noise received from signal lines for driving the RAM.

【0006】しかし、ソフトウェアエラーは、RAMの
劣化とは無関係であり、エラー発生後再度データが書込
まれると消去され、RAMは正常に復旧される。このよ
うなソフトウェアエラーの検出方法としては一般的にパ
リティビットチェック方式やECC(Error Checking &
Correction )方式がある。パリティビットチェック方
式は奇数ビットのエラーが検出可能である。ECCはエ
ラー修正、検出ビットの付加数にもよるが、一般的に1
ビットのエラー修正と2ビットのエラー検出が可能であ
る。
However, a software error has nothing to do with the deterioration of the RAM. When data is written again after the error occurs, the data is erased and the RAM is restored to normal. As a method for detecting such a software error, a parity bit check method and an ECC (Error Checking &
Correction) method. The parity bit check method can detect an odd bit error. The ECC depends on the number of error corrections and the number of added detection bits.
Bit error correction and 2-bit error detection are possible.

【0007】通常、マイクロプロセッサ制御装置では、
RAM3が小容量であり、かつ2ビットエラーの発生確
率が極めて低いことからパリティビットチェック方式が
採用されている。
Usually, in a microprocessor control device,
Since the RAM 3 has a small capacity and the probability of occurrence of a 2-bit error is extremely low, a parity bit check method is employed.

【0008】また一方、図8(b)に示すように、図8
(a)のROM2に代えて、高速なRAM4を制御プロ
グラム格納領域に適用し、マイクロプロセッサ1の高速
化に対処するものもある。
On the other hand, as shown in FIG.
In some cases, a high-speed RAM 4 is applied to the control program storage area instead of the ROM 2 in FIG.

【0009】以上のようなマイクロプロセッサ制御装置
は、前述した連続制御に適用された場合、RAM3、4
のエラー障害の回避が信頼性を向上させるための重要な
要因になる。
When the above-described microprocessor control apparatus is applied to the above-described continuous control, the RAM 3, 4
Avoiding error failures is an important factor in improving reliability.

【0010】従って、連続制御の分野では、マイクロプ
ロセッサ制御装置を多重化した構成により、一つのマイ
クロプロセッサ制御装置に障害が発生した場合の制御シ
ステム全体の故障を阻止し、信頼性の向上を図ってい
る。なお、多重化したマイクロプロセッサ制御装置で
は、RAM3、4のソフトウェアエラーを検出すると
き、パリティビットチェック方式や、データの総和を求
めてこの総和が正常な状態にあるか否かを判定するサム
チェックなどのような制御プログラム自身による種々の
健全性チェック方式が使用され、RAM3、4のエラー
が早期に検出される。
Therefore, in the field of continuous control, a configuration in which microprocessor controllers are multiplexed prevents failure of the entire control system when one microprocessor controller fails, thereby improving reliability. ing. In the multiplexed microprocessor controller, when detecting a software error in the RAMs 3 and 4, a parity bit check method or a sum check for determining the sum of data and determining whether the sum is in a normal state is performed. Various health check methods by the control program itself such as the above are used, and errors in the RAMs 3 and 4 are detected early.

【0011】また、RAM3、4のソフトウェアエラー
が検出されたとき、ソフトウェエラーからRAM3、4
を復旧させる方法として、リセットによる再起動方式が
用いられ、リセットにより、マイクロプロセッサ制御装
置の基本構成部であるマイクロプロセッサ1、RAM
3、4、周辺回路部等を初期化し、制御プログラムを再
起動させている。
When a software error in the RAM 3, 4 is detected, the RAM 3, 4
As a method of restoring, a restart method by reset is used, and by resetting, a microprocessor 1, which is a basic component of the microprocessor control device, a RAM,
3, 4, peripheral circuit sections and the like are initialized, and the control program is restarted.

【0012】ここで多重化のうち、例えば二重化した構
成のマイクロプロセッサ制御装置では、再起動までに、
プログラム容量やRAMのアクセス速度によって差はあ
るが、概ね数秒以上の時間が必要となる。
Here, in the multiplexing, for example, in a microprocessor control device having a duplicated configuration, the microprocessor controller must be operated before the restart.
Although there is a difference depending on the program capacity and the access speed of the RAM, a time of several seconds or more is generally required.

【0013】従って、再起動までの間に障害が発生した
場合、システム全体の故障に至る可能性がある。この確
率は極めて低いものの、全体の故障を回避するためには
マイクロプロセッサ制御装置を三重化する必要がある。
但し、このような三重化構成は、システムに投資するコ
ストを上昇させるため、一般に高いリスクを持つシステ
ムでも採用する例が少ない。
Therefore, if a failure occurs before the restart, there is a possibility that the whole system will fail. Although this probability is extremely low, it is necessary to triple the microprocessor controller to avoid total failure.
However, such a triple configuration increases the cost of investing in the system, and therefore, there are few examples of adopting it in a system generally having a high risk.

【0014】一方、多重化しない単一のマイクロプロセ
ッサ制御装置をモータドライブ装置等に使用した場合、
制御周期が1m 秒ほどに設定されるため、エラー発生の
際に再起動方式によってリセットしてもデータ格納領域
に異常なデータが書込まれることがある。
On the other hand, when a single non-multiplexed microprocessor control device is used for a motor drive device or the like,
Since the control cycle is set to about 1 ms, abnormal data may be written to the data storage area even if resetting is performed by the restart method when an error occurs.

【0015】このため、制御システム全体の故障、ある
いはシステムのダウンが引き起こされる可能性がある。
また、単一のマイクロプロセッサ制御装置ではRAM
3、4のデータ格納領域に障害が発生した場合、RAM
を復旧させる方法がないため、システム全体への障害の
拡大を阻止するために単一のマイクロプロセッサ制御装
置の動作を停止させる必要がある。
For this reason, there is a possibility that a failure of the entire control system or a down of the system is caused.
Also, in a single microprocessor controller, RAM
When a failure occurs in the data storage areas 3 and 4, the RAM
Since there is no way to recover the error, it is necessary to stop the operation of a single microprocessor controller in order to prevent the failure from spreading to the entire system.

【0016】通常、制御システム全体は、障害が検出さ
れた単一のマイクロプロセッサ制御装置の動作を停止し
ても、被害を最小に抑えるように構成されている。例え
ば、4つの車輪の格々に多重化しない単一のマイクロプ
ロセッサ制御装置1が搭載された車両では、いずれかの
マイクロプロセッサ制御装置1が障害によって動作を停
止しても、残りの正常なマイクロプロセッサ制御装置を
搭載した車輪により、車両全体の走行を可能としてい
る。しかしながら、多重化しない単一のマイクロプロセ
ッサ制御装置においても、RAMの障害による異常を回
避できれば連続制御が可能であり、稼働率及び信頼性の
向上を図り得る。
Normally, the entire control system is configured to minimize damage even if the operation of a single microprocessor controller in which a failure is detected is stopped. For example, in a vehicle equipped with a single microprocessor controller 1 of four wheels that is not extremely multiplexed, even if one of the microprocessor controllers 1 stops operating due to a failure, the remaining normal microprocessors 1 The whole vehicle can be run by wheels equipped with a processor control device. However, even in a single microprocessor control device that is not multiplexed, continuous control can be performed as long as an abnormality due to a failure in the RAM can be avoided, and the operation rate and reliability can be improved.

【0017】[0017]

【発明が解決しようとする課題】以上のように、従来の
マイクロプロセッサ制御装置では、短時間に連続して障
害を検出した場合に動作の停止に至る問題がある。ま
た、二重化以上に多重化した場合、コスト及びハードウ
ェアの実装スペースを増加させる問題がある。
As described above, the conventional microprocessor control apparatus has a problem that the operation is stopped when a fault is continuously detected in a short time. Further, when multiplexing is performed more than duplication, there is a problem that cost and hardware mounting space increase.

【0018】本発明は上記実情を考慮してなされたもの
で、単一のマイクロプロセッサによる構成であっても障
害が発生した場合に連続制御でき、稼働率及び信頼性を
向上し得るマイクロプロセッサ制御装置を提供すること
を目的とする。
The present invention has been made in view of the above circumstances, and has a microprocessor control that can continuously control a failure and improve the operation rate and reliability even with a single microprocessor configuration. It is intended to provide a device.

【0019】また、本発明の第2の目的は、単一のマイ
クロプロセッサを用いた構成により、コスト及びハード
ウェアの実装スペースを削減し得るマイクロプロセッサ
制御装置を提供することにある。
A second object of the present invention is to provide a microprocessor control device which can reduce the cost and the space for mounting hardware by using a single microprocessor.

【0020】[0020]

【課題を解決するための手段】上記目的を達成するため
に請求項1に対応する発明は、マイクロプロセッサによ
る処理に基づいて制御対象を制御するマイクロプロセッ
サ制御装置であって、マイクロプロセッサで処理を実行
するための制御プログラムが保存された第1の記憶手段
と、第1の記憶手段内の制御プログラムとマイクロプロ
セッサで処理を実行した結果得られるデータが記憶され
る第2の記憶手段と、第2の記憶手段の内容が記憶され
る第3の記憶手段と、マイクロプロセッサが処理を実行
するとき、第2の記憶手段又は第3の記憶手段を選択す
る選択手段と、選択手段により選択された記憶手段の内
容に基づいてマイクロプロセッサが処理を実行した結果
得られる新規のデータを第2の記憶手段及び第3の記憶
手段に同時に書込む書込制御手段とを備えたマイクロプ
ロセッサ制御装置である。
According to a first aspect of the present invention, there is provided a microprocessor control apparatus for controlling an object to be controlled based on processing by a microprocessor. A first storage unit in which a control program to be executed is stored, a second storage unit in which a control program in the first storage unit and data obtained as a result of executing processing by the microprocessor are stored; A third storage unit in which the contents of the second storage unit are stored, a selection unit that selects the second storage unit or the third storage unit when the microprocessor executes processing, and a selection unit that is selected by the selection unit. Writing new data obtained as a result of the processing performed by the microprocessor based on the contents of the storage means into the second storage means and the third storage means at the same time. A microprocessor controller having a write control unit.

【0021】従って、請求項1に対応する発明は、第2
の記憶手段と第3の記憶手段に制御プログラム及びデー
タを記憶し、さらに書込制御手段が新規のデータを第2
の記憶手段及び第3の記憶手段に同時に書込むので、第
2の記憶手段と第3の記憶手段のいずれか一方に障害が
発生しても正常な他方の記憶手段に制御プログラム及び
データを保存しておくことができるので、制御プログラ
ムの実行瞬断を最小にしつつ、選択手段によって正常な
他方の記憶手段を選択することができる。
Therefore, the invention corresponding to claim 1 is the second invention.
The control program and data are stored in the storage means and the third storage means, and the write control means stores new data in the second storage means.
The control program and data are stored in the normal storage unit even if a failure occurs in one of the second storage unit and the third storage unit because the data is simultaneously written into the storage unit and the third storage unit. Since the instantaneous interruption of the execution of the control program can be minimized, the other normal storage unit can be selected by the selection unit.

【0022】ゆえに、障害が発生したとき、リセットに
よる再起動方式を利用せずに記憶内容を復旧して連続制
御できるため、稼働率及び信頼性を向上させることがで
きる。
Therefore, when a failure occurs, the stored contents can be restored and continuous control can be performed without using the restarting method by resetting, so that the operation rate and reliability can be improved.

【0023】また、第2の記憶手段と第3の記憶手段を
備えたことにより全体を多重化せずに実現できるため、
コスト及びハードウェアの実装スペースを削減すること
ができる。
In addition, the provision of the second storage means and the third storage means enables the whole to be realized without multiplexing.
Cost and hardware mounting space can be reduced.

【0024】また、請求項2に対応する発明は、請求項
1に対応するマイクロプロセッサ制御装置において、書
込制御手段は、第1の記憶手段内の制御プログラムが読
出されたとき、当該制御プログラムを第2の記憶手段及
び第3の記憶手段に同時に書込むマイクロプロセッサ制
御装置である。
According to a second aspect of the present invention, in the microprocessor control apparatus according to the first aspect, when the control program in the first storage is read out, the writing control means executes the control program. Is simultaneously written into the second storage means and the third storage means.

【0025】従って、請求項2に対応する発明は、請求
項1に対応する作用効果に加え、第1の記憶手段内の制
御プログラムが読出されたとき当該制御プログラムを直
接第2の記憶手段及び第3の記憶手段の双方に同時に書
込むため、第2の及び第3の記憶手段に対しての再書込
み動作が不要である。
Therefore, the invention according to claim 2 has the same effects as those of claim 1, and furthermore, when the control program in the first storage means is read, the control program is directly stored in the second storage means. Since the data is written to both the third storage means at the same time, the rewrite operation to the second and third storage means is unnecessary.

【0026】ゆえに、リセットによる再起動方式を利用
して障害を復旧する場合においても高速に再起動できる
ため、稼働率及び信頼性を向上させることができる。さ
らに、請求項3に対応する発明は、請求項1又は請求項
2に対応するマイクロプロセッサ制御装置において、第
2の記憶手段又は第3の記憶手段に異常が検出されたと
き、当該異常の検出された記憶手段内の異常領域を第1
の記憶手段の内容に基づいて復旧するデータ復旧手段を
備えたマイクロプロセッサ制御装置である。
Therefore, even when the failure is recovered by using the restart method by resetting, the restart can be performed at high speed, so that the operation rate and the reliability can be improved. Further, the invention according to claim 3 is a microprocessor control device according to claim 1 or 2, wherein when an abnormality is detected in the second storage means or the third storage means, the abnormality is detected. The abnormal area in the storage means
Is a microprocessor control device provided with data recovery means for recovering based on the contents of the storage means.

【0027】従って、請求項3に対応する発明は、請求
項1又は請求項2に対応する作用効果に加え、異常の検
出された記憶手段の異常領域が小さい場合などに、第1
の記憶手段の記憶内容に基づいて当該異領域を復旧させ
るため、連続制御を実現でき、一層稼働率及び信頼性を
向上させることができる。
Therefore, the invention according to claim 3 provides the first effect when the abnormality area of the storage means in which the abnormality is detected is small, in addition to the operation and effect according to claim 1 or 2.
Since the different area is restored based on the contents stored in the storage means, continuous control can be realized, and the operation rate and reliability can be further improved.

【0028】さらにまた、請求項4に対応する発明は、
請求項1乃至請求項3のいずれか1項に対応するマイク
ロプロセッサ制御装置において、選択手段は、第2の記
憶手段に異常が検出されたとき、正常な第3の記憶手段
を選択するマイクロプロセッサ制御装置である。
Further, the invention corresponding to claim 4 is:
4. The microprocessor control device according to claim 1, wherein the selection unit selects a normal third storage unit when an abnormality is detected in the second storage unit. It is a control device.

【0029】従って、請求項4に対応する発明は、第2
の記憶手段に異常が検出されたとき、選択手段が異常な
第2の記憶手段の選択を止めて正常な第3の記憶手段を
選択するので、マイクロプロセッサが正常な制御プログ
ラム及びデータを参照して処理を実行することができ
る。
Therefore, the invention corresponding to claim 4 is the second invention.
When an abnormality is detected in the storage means, the selection means stops selecting the abnormal second storage means and selects the normal third storage means, so that the microprocessor refers to the normal control program and data. Process can be executed.

【0030】ゆえに、連続制御を実現でき、請求項1乃
至請求項3のいずれか1項に対応する作用効果と同様に
稼働率及び信頼性を向上させることができる。加えて、
請求項5に対応する発明は、請求項1乃至請求項4のい
ずれか1項に対応するマイクロプロセッサ制御装置にお
いて、データ復旧手段は、第2の記憶手段に異常が検出
されたとき、正常な第3の記憶手段による前記マイクロ
プロセッサの処理の空き時間中、第1及び第3の記憶手
段の内容に基づいて、第2の記憶手段の内容を周期的に
順次復旧するマイクロプロセッサ制御装置である。
Therefore, continuous control can be realized, and the operation rate and reliability can be improved in the same manner as the operation and effect according to any one of the first to third aspects. in addition,
According to a fifth aspect of the present invention, in the microprocessor control device according to any one of the first to fourth aspects, the data recovery unit operates normally when an abnormality is detected in the second storage unit. A microprocessor control device for periodically and sequentially restoring the contents of the second storage means based on the contents of the first and third storage means during the idle time of the processing of the microprocessor by the third storage means. .

【0031】従って、請求項5に対応する発明は、第2
の記憶手段に異常が検出されたとき、マイクロプロセッ
サの処理の空き時間を利用して正常な第3及び第1の記
憶手段の記憶内容に基づいて、第2の記憶手段の記憶内
容を周期的に順次復旧するため、請求項1乃至請求項3
のいずれか1項に対応する作用効果に加え、異常領域が
大きいときや異常領域が特定できないときであっても連
続制御が可能であり、同様に再度異常が検出されても連
続制御が可能である。ゆえに、稼働率及び信頼性を向上
させることができる。
Therefore, the invention corresponding to claim 5 is the second invention.
When an abnormality is detected in the storage unit, the storage contents of the second storage unit are periodically updated based on the normal storage contents of the third and first storage units using the idle time of the processing of the microprocessor. Claims 1 to 3 for sequentially recovering
In addition to the operation and effect corresponding to any one of the above, continuous control is possible even when the abnormal region is large or when the abnormal region cannot be specified. Similarly, continuous control is possible even if abnormality is detected again. is there. Therefore, the operation rate and the reliability can be improved.

【0032】[0032]

【発明の実施の形態】以下、本発明の実施形態について
図面を参照して詳細に説明する。図1は、本発明の一実
施形態に係るマイクロプロセッサ制御装置の構成を示す
回路ブロック図であり、図8と同一部分には同一符号を
付してその詳しい説明は省略し、ここでは異なる部分に
ついてのみ述べる。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a circuit block diagram showing a configuration of a microprocessor control device according to an embodiment of the present invention. The same parts as those in FIG. 8 are denoted by the same reference numerals, and detailed description thereof will be omitted. Is described only.

【0033】すなわち、本実施形態に係るマイクロプロ
セッサ制御装置は、図1に示すように、全体を多重化せ
ずにRAM7、8のみを二重化する構成により、障害発
生時にも連続制御を維持しつつ、コスト及び実装スペー
スの削減を図るものであって、単一のマイクロプロセッ
サ1を備えている。
That is, as shown in FIG. 1, the microprocessor control device according to the present embodiment has a configuration in which only the RAMs 7 and 8 are duplicated without multiplexing the entirety, thereby maintaining continuous control even when a failure occurs. In order to reduce cost and mounting space, a single microprocessor 1 is provided.

【0034】マイクロプロセッサ1は、外部データバス
5を介してROM6、第1のRAM7、第2のRAM
8、読出用IOレジスタ9、書込用IOレジスタ10と
接続されており、これらが格納している記憶内容をアク
セスし、プログラムを実行する。すなわち、マイクロプ
ロセッサ1は、外部データ空間としてメモリ空間とIO
空間とを有している。ここで、メモリ空間はROM6,
第1及び第2のRAM7、8からなり、図2に示すよう
に、マイクロプロセッサ1の動作に必要な情報を保持す
る。
The microprocessor 1 includes a ROM 6, a first RAM 7, and a second RAM via an external data bus 5.
8, the read IO register 9 and the write IO register 10 are connected to access the stored contents stored therein and execute a program. That is, the microprocessor 1 has a memory space and an IO as an external data space.
Space. Here, the memory space is ROM 6,
The first and second RAMs 7 and 8 hold information necessary for the operation of the microprocessor 1 as shown in FIG.

【0035】ROM6は図2(a)に示すように、初期
実行プログラム6aと、制御プログラム6bと、異常処
理プログラム6cとが格納されている。第1のRAM7
は図2(b)に示すように、制御プログラム格納領域7
aとデータ格納領域7bとが設けられている。同様に第
2のRAM8は図2(c)に示すようにプログラム格納
領域8aとデータ格納領域8bとが設けられている。
As shown in FIG. 2A, the ROM 6 stores an initial execution program 6a, a control program 6b, and an abnormality processing program 6c. First RAM 7
Is the control program storage area 7 as shown in FIG.
a and a data storage area 7b. Similarly, the second RAM 8 is provided with a program storage area 8a and a data storage area 8b as shown in FIG.

【0036】初期実行プログラム6aは、マイクロプロ
セッサ1の起動時に実行される。制御プログラム6b
は、マイクロプロセッサ1で実行するメインの制御処理
が記述されている。異常処理プログラム6cは、異常が
検出された場合に実行される。
The initial execution program 6a is executed when the microprocessor 1 is started. Control program 6b
Describes a main control process executed by the microprocessor 1. The abnormality processing program 6c is executed when an abnormality is detected.

【0037】また、IO空間は読出用及び書込用IOレ
ジスタ9、10とからなる。マイクロプロセッサ1は、
外部データバス5をアクセスするとき、バスアクセス信
号11及びメモリ/IO信号12をアドレスデコード回
路15に出力すると共に、ライト/リード信号13を読
出・書込用IOレジスタ9、10、RAM読出選択回路
25及びRAM書込制御回路30に出力し、且つアドレ
ス信号14をアドレスデコード回路15、ROM6、第
1及び第2のRAM7、8に出力する。なお、バスアク
セス信号11はアクセス開始を示す信号であり、メモリ
/IO信号12は、メモリ空間又はIO空間のうちアク
セスする方を判別するための信号である。ライト/リー
ド信号はアクセス内容の読出実行又は書込実行の別を示
す信号であり、アドレス信号14は、読出対象又は書込
対象のアドレスを示す信号である。
The IO space comprises read and write IO registers 9 and 10. The microprocessor 1
When the external data bus 5 is accessed, a bus access signal 11 and a memory / IO signal 12 are output to an address decode circuit 15, and a write / read signal 13 is output to a read / write IO register 9, 10, a RAM read selection circuit. 25, and outputs the address signal 14 to the address decode circuit 15, the ROM 6, and the first and second RAMs 7 and 8. The bus access signal 11 is a signal indicating the start of access, and the memory / IO signal 12 is a signal for determining which of memory space or IO space to access. The write / read signal is a signal indicating whether the access content is read or written, and the address signal 14 is a signal indicating the address of the read target or the write target.

【0038】また、マイクロプロセッサ1は、アドレス
デコード回路15から出力されるバスアクセス応答信号
16を入力することで、外部データバス5のアクセスを
終了する。
The microprocessor 1 terminates the access to the external data bus 5 by inputting the bus access response signal 16 output from the address decode circuit 15.

【0039】アドレスデコード回路15は、マイクロプ
ロセッサ1からバスアクセス信号11、メモリ/IO信
号12及びアドレス信号14を入力すると、アドレス信
号14をデコードし、デコードしたアドレスと予め保持
したアドレスマップとから操作対象の外部データ空間を
選択する。ROM6が選択されるとROM選択信号17
がROM6及びRAM書込制御回路30に出力され、第
1又は第2のRAM7、8が選択されるとRAM選択信
号18が第1及び第2のRAM7、8、RAM読出選択
回路25、RAM書込制御回路回路30に出力され、読
出用IOレジスタ9が選択されると読出用IOレジスタ
選択信号19が第1のAND回路21に出力され、書込
用IOレジスタ10が選択されると書込用IOレジスタ
選択信号20が第2のAND回路23に出力される。
When the bus access signal 11, the memory / IO signal 12, and the address signal 14 are input from the microprocessor 1, the address decode circuit 15 decodes the address signal 14, and operates from the decoded address and the address map stored in advance. Select the target external data space. When the ROM 6 is selected, the ROM selection signal 17
Is output to the ROM 6 and the RAM write control circuit 30, and when the first or second RAM 7, 8 is selected, the RAM selection signal 18 is output to the first and second RAM 7, 8, the RAM read selection circuit 25, the RAM write The read IO register selection signal 19 is output to the first AND circuit 21 when the read IO register 9 is selected, and is written when the write IO register 10 is selected. The IO register selection signal 20 is output to the second AND circuit 23.

【0040】読出用IOレジスタ9は、マイクロプロセ
ッサ1からのライト/リード信号13とアドレスデコー
ド回路15からの読出用IOレジスタ選択信号19とを
入力する第1のAND回路21の出力段に備えられ、こ
の第1のAND回路21の出力に基づいて第1のRAM
7と第2のRAM8のいずれから記憶内容を読出すかを
選択し、選択結果を示すRAM読出選択信号22をRA
M読出選択回路25に出力する。
The read IO register 9 is provided at an output stage of a first AND circuit 21 to which a write / read signal 13 from the microprocessor 1 and a read IO register selection signal 19 from the address decode circuit 15 are input. , A first RAM based on the output of the first AND circuit 21.
7 or the second RAM 8 to read the stored contents, and outputs a RAM read selection signal 22 indicating the selection result to the RA.
Output to the M read selection circuit 25.

【0041】書込用IOレジスタ10は、マイクロプロ
セッサ1からのライト/リード信号13とアドレスデコ
ード回路15からの書込用IOレジスタ選択信号20と
を入力する第2のAND回路23の出力段に備えられ、
ROM6の記憶内容を読出した時に、この記憶内容を第
1及び第2のRAM7、8に同時に書込む旨を指示する
同時書込指示信号24をRAM書込制御回路30及びア
ドレスデコード回路15に出力する。
The write IO register 10 is connected to an output stage of a second AND circuit 23 for inputting a write / read signal 13 from the microprocessor 1 and a write IO register selection signal 20 from the address decode circuit 15. Equipped,
When the storage contents of the ROM 6 are read, a simultaneous write instruction signal 24 for instructing the storage contents to be simultaneously written to the first and second RAMs 7 and 8 is output to the RAM write control circuit 30 and the address decode circuit 15. I do.

【0042】なお、アドレスデコード回路15は、RO
M6の読出時にROM選択信号17をROM6及びRA
M書込制御回路30に出力しているが、書込用IOレジ
スタ10から同時書込指示信号24を受けることによっ
てRAM選択信号18も出力している。これにより、R
OM6から読出された記憶内容は直接第1及び第2のR
AM7、8に記憶される。
It should be noted that the address decode circuit 15
When reading M6, the ROM selection signal 17
Although the signal is output to the M write control circuit 30, the RAM selection signal 18 is also output by receiving the simultaneous write instruction signal 24 from the write IO register 10. This gives R
The stored contents read from OM6 are directly stored in the first and second R
AM 7 and 8.

【0043】RAM読出選択回路25は、アドレスデコ
ード回路15からのRAM選択信号18と、マイクロプ
ロセッサ1からのライト/リード信号13と、読出用I
Oレジスタ9からのRAM読出選択信号22とを入力
し、これらの信号18、13、22に基づいて、第1R
AM出力許可信号26を第1のRAM7に出力するか、
あるいは第2RAM出力許可信号27を第2のRAM8
に出力する。
The RAM read selection circuit 25 includes a RAM selection signal 18 from the address decode circuit 15, a write / read signal 13 from the microprocessor 1, and a read I / O signal.
The RAM read selection signal 22 from the O register 9 is input, and based on these signals 18, 13, 22, the first R
Whether to output the AM output permission signal 26 to the first RAM 7,
Alternatively, the second RAM output permission signal 27 is transmitted to the second RAM 8
Output to

【0044】第1RAM出力許可信号26は第1のRA
M7の記憶内容の読出を許可し、第2RAM出力許可信
号27は第2のRAM8の記憶内容の読出を許可する。
第1及び第2RAM出力許可信号26、27は互いに同
一状態にはならず、一方が許可状態になると他方は不許
可状態になる。
The first RAM output enable signal 26 is the first RA
The reading of the storage content of M7 is permitted, and the second RAM output permission signal 27 permits the reading of the storage content of the second RAM 8.
The first and second RAM output permission signals 26 and 27 are not in the same state as each other, and when one is in the permission state, the other is in the non-permission state.

【0045】ここで、RAM読出選択回路25は、第3
及び第4のAND回路28、29を備え、第3のAND
回路28は、アドレスデコード回路15からのRAM選
択信号18とマイクロプロセッサ1からのライト/リー
ド信号13の論理否定と読出用IOレジスタ9からのR
AM読出選択信号22の論理否定との論理積を第1RA
M出力許可信号26として第1のRAM7に出力する。
第4のAND回路29は、このRAM選択信号18とラ
イト/リード信号13の論理否定とRAM読出選択信号
22との論理積を第2RAM出力許可信号27として第
2のRAM8に出力する。
Here, the RAM read selecting circuit 25
And fourth AND circuits 28 and 29, and a third AND circuit
The circuit 28 performs a logical negation of the RAM selection signal 18 from the address decode circuit 15 and the write / read signal 13 from the microprocessor 1 and an R signal from the read IO register 9.
The logical product of the AM read selection signal 22 and the logical negation is calculated by the first RA
The signal is output to the first RAM 7 as an M output permission signal 26.
The fourth AND circuit 29 outputs the logical product of the RAM selection signal 18, the logical negation of the write / read signal 13, and the RAM read selection signal 22 to the second RAM 8 as a second RAM output permission signal 27.

【0046】一方、RAM書込制御回路30は、アドレ
スデコード回路15からのROM選択信号17並びにR
AM選択信号18と、マイクロプロセッサ1からのライ
ト/リード信号13と、書込用IOレジスタ10からの
同時書込指示信号24とを入力し、これらの信号17、
18、13、24に基づいてRAM書込信号31をそれ
ぞれ第1及び第2のRAM7、8に出力する。
On the other hand, the RAM write control circuit 30 outputs the ROM selection signal 17 from the address decode circuit 15 and R
An AM selection signal 18, a write / read signal 13 from the microprocessor 1, and a simultaneous write instruction signal 24 from the write IO register 10 are input.
The RAM write signal 31 is output to the first and second RAMs 7 and 8 based on 18, 13 and 24, respectively.

【0047】具体的には、RAM書込制御回路30は、
第5及び第6のAND回路32、33、OR回路34を
備え、第5のAND回路32は、ROM選択信号17と
ライト/リード信号13の論理否定と同時書込選択信号
24との論理積を第5のAND回路出力信号35として
OR回路34に出力する。第6のAND回路33は、R
AM選択信号18とライト/リード信号13と同時書込
選択信号24の論理否定との論理積を第6のAND回路
出力信号36としてOR回路34に出力する。OR回路
34は、第5及び第6のAND回路出力信号35、36
の論理和をRAM書込信号31として第1及び第2のR
AM7、8に出力する。
Specifically, the RAM write control circuit 30
The fifth AND circuit 32 includes fifth and sixth AND circuits 32 and 33 and an OR circuit 34. The fifth AND circuit 32 performs a logical AND operation on the logical negation of the ROM selection signal 17 and the write / read signal 13 and the simultaneous write selection signal 24. As the fifth AND circuit output signal 35 to the OR circuit 34. The sixth AND circuit 33 outputs R
The logical product of the AM selection signal 18, the write / read signal 13, and the logical negation of the simultaneous write selection signal 24 is output to the OR circuit 34 as a sixth AND circuit output signal 36. The OR circuit 34 outputs fifth and sixth AND circuit output signals 35 and 36.
As the RAM write signal 31 for the first and second R
Output to AM7,8.

【0048】次に、このように構成されたマイクロプロ
セッサ制御装置の動作を図3乃至図7を参照して説明す
る。いま、マイクロプロセッサ1が動作を開始すると、
ROM6の初期実行プログラム6aが図3に示すように
実行される。
Next, the operation of the microprocessor control device configured as described above will be described with reference to FIGS. Now, when the microprocessor 1 starts operating,
The initial execution program 6a of the ROM 6 is executed as shown in FIG.

【0049】この初期実行プログラム6aは、まずRO
M6の制御プログラム6bを第1のRAM7の制御プロ
グラム格納領域7aと第2のRAM8の制御プログラム
格納領域8aに複写し(s1)、第1のRAM7のデー
タ格納領域7bと第2のRAM8のデータ格納領域8b
を初期化(クリア)する(s2)。ここで、読出したR
OM6の制御プログラム6bは、前述したように直接第
1及び第2のRAM7、8の制御プログラム格納領域7
a、8aに各々記憶される。
First, the initial execution program 6a
The control program 6b of M6 is copied to the control program storage area 7a of the first RAM 7 and the control program storage area 8a of the second RAM 8 (s1), and the data storage area 7b of the first RAM 7 and the data of the second RAM 8 are copied. Storage area 8b
Is initialized (cleared) (s2). Here, the read R
As described above, the control program 6b of the OM 6 is directly stored in the control program storage area 7 of the first and second RAMs 7, 8.
a and 8a.

【0050】次に、ROM6の制御プログラム6bを読
出し(s3)、続いて第1のRAM7の制御プログラム
格納領域7aに格納された制御プログラム6bを読出す
と共に(s4)、この制御プログラム6bのサムチェッ
クを実行する(s5)。
Next, the control program 6b of the ROM 6 is read (s3), the control program 6b stored in the control program storage area 7a of the first RAM 7 is read (s4), and the sum of the control program 6b is read. A check is performed (s5).

【0051】しかる後、このサムチェックの実行結果を
判定し(s6)、判定結果が正常を示すときには第1の
RAM7内の制御プログラム6bに処理を移し(s
7)、異常であれば異常処理を実行し(s8)、初期実
行プログラム6aは処理を終了する。
Thereafter, the execution result of this sum check is judged (s6), and when the judgment result indicates normal, the processing is shifted to the control program 6b in the first RAM 7 (s6).
7) If abnormal, an abnormal process is executed (s8), and the initial execution program 6a ends the process.

【0052】初期実行プログラム6aの終了後には、制
御プログラム6bが実行される。制御プログラム6bが
実行される最初の段階では、読出用IOレジスタ9の出
力するRAM読出選択信号22は第1のRAM7から読
出しを行なう旨を示しており、マイクロプロセッサ1は
第1のRAM7の制御プログラム格納領域7aに格納さ
れた制御プロクラム6bに基づいて処理を実行する。
After the end of the initial execution program 6a, the control program 6b is executed. At the first stage in which the control program 6b is executed, the RAM read selection signal 22 output from the read IO register 9 indicates that data is to be read from the first RAM 7, and the microprocessor 1 controls the first RAM 7 The processing is executed based on the control program 6b stored in the program storage area 7a.

【0053】制御プログラム6bの実行によって発生す
る可変データやサブルーチンの実行データは、第1のR
AM7及び第2のRAM8が共にRAM書込信号31を
受けることによって、第1のRAM7のデータ格納領域
7b及び第2のRAM8のデータ格納領域8bの両方に
同時に書込まれる。これにより、第1のRAM7のデー
タ格納領域7b及び第2のRAM8のデータ格納領域8
bには同一のデータが存在する。
Variable data and subroutine execution data generated by the execution of the control program 6b are stored in the first R
When both the AM 7 and the second RAM 8 receive the RAM write signal 31, the data is simultaneously written into both the data storage area 7b of the first RAM 7 and the data storage area 8b of the second RAM 8. Thereby, the data storage area 7b of the first RAM 7 and the data storage area 8 of the second RAM 8
The same data exists in b.

【0054】ここで、制御プログラム6bの実行時にマ
イクロプロセッサ1が異常を検出した場合には、ROM
6に格納されている異常処理プログラム6cに処理を移
す。表1はマイクロプロセッサ1により検出可能な異常
状態の一例を示している。
If the microprocessor 1 detects an abnormality during the execution of the control program 6b,
The processing is shifted to the abnormality processing program 6c stored in the program 6. Table 1 shows an example of an abnormal state that can be detected by the microprocessor 1.

【0055】[0055]

【表1】 [Table 1]

【0056】ROM6内の異常処理プログラム6cを実
行すると、実行速度は低下するがこの異常処理プログラ
ム6cは内容が破壊されないため確実性を持つ。図4は
異常処理プログラム6cによる処理の流れを示すフロー
図である。
When the abnormality processing program 6c in the ROM 6 is executed, its execution speed is reduced, but the abnormality processing program 6c has certainty because its contents are not destroyed. FIG. 4 is a flowchart showing the flow of processing by the abnormality processing program 6c.

【0057】異常処理プログラム6cは、まず異常情報
をトレースし(s11)、異常領域が第1のRAM7の
制御プログラム格納領域7aであれば(s12)、この
異常を示す領域7aの内容と、ROM6における制御プ
ログラム6bの同一アドレスの内容とを比較する(s1
3)。
The abnormality processing program 6c first traces the abnormality information (s11). If the abnormality area is the control program storage area 7a of the first RAM 7 (s12), the contents of the area 7a indicating this abnormality and the ROM 6 Is compared with the contents of the same address of the control program 6b in (s1).
3).

【0058】比較の結果、不一致領域が確認されその領
域が小さい場合には(s14)、その不一致領域をRO
M6の内容の複写によりで復旧する(s15)。異常が
第1のRAM7の制御プログラム格納領域7aではな
く、データ格納領域7bの場合、また、不一致領域が大
きい場合、あるいは、不一致領域が特定されない場合に
は、ただちに読出用IOレジスタ9は、RAM読出選択
信号22を第2のRAM8を示すように変更し、第2の
RAM8のプログラム格納領域8a内の制御プログラム
6bによって処理が実行されるように切り換える(s1
6)。
As a result of the comparison, a mismatch area is confirmed and if the area is small (s14), the mismatch area is set to RO
It is restored by copying the contents of M6 (s15). If the abnormality is not the control program storage area 7a of the first RAM 7 but the data storage area 7b, or if the mismatch area is large or the mismatch area is not specified, the read IO register 9 immediately stores the RAM in the RAM. The read selection signal 22 is changed so as to indicate the second RAM 8, and the processing is switched so that the processing is executed by the control program 6b in the program storage area 8a of the second RAM 8 (s1).
6).

【0059】しかる後に、異常を示したアドレスから再
び制御プログラム6bを実行する(s17)。異常が検
出された場合には、不一致領域が小さい場合を除いて、
第1のRAM7の復旧は制御プログラム6bの空き時間
中に実行される。具体的には、第1のRAM7の制御プ
ログラム格納領域7aからデータ格納領域7bまでを、
アドレス上位からアドレス下位に向かって順次複写する
ことでRAM7が復旧される。なお、第1のRAM7の
制御プログラム格納領域7aにはROM6内の制御プロ
グラム6bが複写され、第1のRAM7のデータ格納領
域7bには第2のRAM8のデータ格納領域8bの内容
が複写される。
Thereafter, the control program 6b is executed again from the address indicating the abnormality (s17). If an anomaly is detected, unless the mismatch area is small,
The restoration of the first RAM 7 is executed during the idle time of the control program 6b. Specifically, the area from the control program storage area 7a to the data storage area 7b of the first RAM 7 is
The RAM 7 is restored by sequentially copying from the upper address to the lower address. The control program 6b in the ROM 6 is copied to the control program storage area 7a of the first RAM 7, and the contents of the data storage area 8b of the second RAM 8 are copied to the data storage area 7b of the first RAM 7. .

【0060】そして、第2のRAM8の制御プログラム
格納領域8aに格納された制御プログラム6bが実行さ
れ、データが第2のRAM8のデータ格納領域8bに格
納される場合、このデータは同時に第1のRAM7のデ
ータ格納領域7bにも格納される。
When the control program 6b stored in the control program storage area 8a of the second RAM 8 is executed and the data is stored in the data storage area 8b of the second RAM 8, this data is simultaneously stored in the first program. It is also stored in the data storage area 7b of the RAM 7.

【0061】第2のRAM8による処理は、次に異常が
検出されるまで継続される。図5はROM6の制御プロ
グラム6bを第1のRAM7及び第2のRAM8に書込
む場合の信号の状態を示すタイミングチャートであり、
マイクロプロセッサ1によってROM6の制御プログラ
ム6bが読出されると直接第1のRAM7及び第2のR
AM8に書込まれる。
The processing by the second RAM 8 is continued until the next abnormality is detected. FIG. 5 is a timing chart showing signal states when the control program 6b of the ROM 6 is written into the first RAM 7 and the second RAM 8.
When the control program 6b of the ROM 6 is read by the microprocessor 1, the first RAM 7 and the second R
Written to AM8.

【0062】マイクロプロセッサ1にはクロック37が
入力されており、ROM6の制御プログラム6bを第1
のRAM7及び第2のRAM8に書込む際には外部デー
タバス5をアクセスするため、バスアクセス信号11
が”L(ロウ)”レベルになる(時刻t1)。
The clock 37 is input to the microprocessor 1 and the control program 6b of the ROM 6 is stored in the first
When writing to the RAM 7 and the second RAM 8, the external data bus 5 is accessed.
Becomes the “L (low)” level (time t1).

【0063】マイクロプロセッサ1から出力されたアド
レスを示すアドレス信号14はROM6、第1のRAM
7、第2のRAM8、アドレスデコード回路15に入力
される。
The address signal 14 indicating the address output from the microprocessor 1 is stored in the ROM 6 and the first RAM.
7, the second RAM 8 and the address decode circuit 15.

【0064】アドレスデコード回路15は、このアドレ
ス信号14に基づいてROM6を動作させて読出しを行
なう旨を示す”H(ハイ)”レベルのROM選択信号1
7を出力する。
The address decode circuit 15 operates the ROM 6 on the basis of the address signal 14 to perform the read operation by reading the ROM select signal 1 at the "H (high)" level.
7 is output.

【0065】ROM6は、”H”のROM選択信号17
を受けとるとアドレス信号14で指定されたアドレスの
記憶内容を外部データバス5に読出す。マイクロプロセ
ッサ1は、読出し動作を示す”L”のライト/リード信
号13を出力する。
The ROM 6 receives the "H" ROM selection signal 17
Upon receiving the data, the storage content of the address specified by the address signal 14 is read out to the external data bus 5. The microprocessor 1 outputs a "L" write / read signal 13 indicating a read operation.

【0066】また、書込用IOレジスタ10からは第1
及び第2のRAM7、8の双方に書込む旨を示す”H”
の同時書込制御信号24がアドレスデコード回路15及
びRAM書込制御回路30に出力される。
The write IO register 10 outputs the first
"H" indicating that data is written to both the second RAM 7 and the second RAM 8.
Is output to the address decode circuit 15 and the RAM write control circuit 30.

【0067】従って、RAM書込制御回路30内の第5
のAND回路32には、論理否定により”L”から”
H”となったライト/リード信号13と、”H”のRO
M選択信号17と、”H”の同時書込制御信号24が入
力されるため、第5のAND回路出力信号35は”H”
となり、これにより第6のAND回路出力信号36の状
態に関わらずRAM書込信号31は書込みを示す”H”
となる。
Therefore, the fifth in the RAM write control circuit 30
AND circuit 32 from "L" due to logical negation
H "write / read signal 13 and" H "RO
Since the M selection signal 17 and the simultaneous write control signal 24 of “H” are input, the fifth AND circuit output signal 35 becomes “H”.
Thus, regardless of the state of the sixth AND circuit output signal 36, the RAM write signal 31 indicates "H" indicating write.
Becomes

【0068】第1のRAM7と第2のRAM8では、”
H”のRAM書込信号31を受けると、外部データバス
5から読出されたROM6の記憶内容がアドレス信号1
4の示すアドレスに格納される(時刻t2)。
In the first RAM 7 and the second RAM 8, "
When the RAM write signal 31 of "H" is received, the contents stored in the ROM 6 read from the external data bus 5 are stored in the address signal 1
4 (time t2).

【0069】最後に、外部データバス5へのアクセス終
了を示す”L”のバスアクセス応答信号16がアドレス
デコード回路15からマイクロプロセッサ1に出力され
る(時刻t3)。
Finally, an "L" bus access response signal 16 indicating the end of access to the external data bus 5 is output from the address decode circuit 15 to the microprocessor 1 (time t3).

【0070】図6はマイクロプロセッサ1から出力され
るライト/リード信号13によって書込みを指示した場
合の信号の状態を示すタイミングチャートである。これ
は、例えばマイクロプロセッサ1で制御プログラム6b
が実行され、第1のRAM7及び第2のRAM8に対し
てデータを同時に書込む場合などの信号状態を示してい
る。
FIG. 6 is a timing chart showing the states of signals when writing is instructed by the write / read signal 13 output from the microprocessor 1. This is because, for example, the microprocessor 1 controls the control program 6b.
Is executed, and a signal state in a case where data is simultaneously written to the first RAM 7 and the second RAM 8 is shown.

【0071】マイクロプロセッサ1にはクロック37が
入力されており、バスアクセス信号11が”L”になる
(時刻t4)。外部データバス5には、第1のRAM7
及び第2のRAM8に書込むデータを示す信号が存在し
ている。
The clock 37 is input to the microprocessor 1, and the bus access signal 11 becomes "L" (time t4). The external data bus 5 has a first RAM 7
And a signal indicating data to be written to the second RAM 8.

【0072】マイクロプロセッサ1から出力されたアド
レス信号14はROM6、第1のRAM7、第2のRA
M8、アドレスデコード回路15に入力される。アドレ
スデコード回路15は、このアドレス信号14に基づい
てRAMを動作させる旨を示す”H”のRAM選択信号
18を出力する。
The address signal 14 output from the microprocessor 1 is stored in the ROM 6, the first RAM 7, and the second RA.
M8 is input to the address decode circuit 15. The address decode circuit 15 outputs an "H" RAM selection signal 18 indicating that the RAM is operated based on the address signal 14.

【0073】ここで、例えば書込用IOレジスタ10か
ら出力される同時書込指定信号24は第1のRAM7及
び第2のRAM8の両方への書込みを示す”H”ではな
く、第1のRAM7及び第2のRAM8の両方への書込
みを指定しない”L”であったとする。
Here, for example, the simultaneous write designation signal 24 output from the write IO register 10 is not “H” indicating writing to both the first RAM 7 and the second RAM 8, but the first RAM 7 And "L" which does not specify writing to both the second RAM 8 and the second RAM 8.

【0074】そして、マイクロプロセッサ1からは、”
H”のライト/リード信号13が出力される。この場合
においては、RAM書込制御回路30内の第6のAND
回路33には、”H”のRAM選択信号18と、”H”
のライト/リード信号13と、論理否定により”L”か
ら”H”となった同時書込制御信号24とが入力される
ため、第6のAND回路出力信号36は”H”となり、
これにより第5のAND回路出力信号35の状態に関わ
らずRAM書込信号31は書込みを示す”H”となる。
Then, from the microprocessor 1, "
The write / read signal 13 of H ″ is output. In this case, the sixth AND in the RAM write control circuit 30 is output.
The circuit 33 includes a RAM selection signal 18 of “H” and an “H”
And the simultaneous write control signal 24, which has been changed from "L" to "H" by logical negation, is input, so that the sixth AND circuit output signal 36 becomes "H".
As a result, the RAM write signal 31 becomes "H" indicating write regardless of the state of the fifth AND circuit output signal 35.

【0075】第1のRAM7と第2のRAM8では、”
H”のRAM書込信号31を受けると、外部データバス
5のデータ信号がアドレス信号14の示すアドレスに格
納される(時刻t5)。
In the first RAM 7 and the second RAM 8, "
Upon receiving the H "RAM write signal 31, the data signal on the external data bus 5 is stored at the address indicated by the address signal 14 (time t5).

【0076】最後に、外部データバス5へのアクセス終
了を示す”L”のバスアクセス応答信号16がアドレス
デコード回路15からマイクロプロセッサ1に出力され
る(時刻t6)。
Finally, an "L" bus access response signal 16 indicating the end of access to the external data bus 5 is output from the address decode circuit 15 to the microprocessor 1 (time t6).

【0077】図7は第1のRAM7又は第2のRAM8
のいずれか一方の記憶内容を外部データバス5に読出す
場合の信号の状態を示すタイミングチャートである。マ
イクロプロセッサ1にはクロック37が入力されてお
り、バスアクセス信号が”L”になる(時刻t7)。
FIG. 7 shows the first RAM 7 or the second RAM 8
5 is a timing chart showing signal states when any one of the stored contents is read out to the external data bus 5. The clock 37 is input to the microprocessor 1, and the bus access signal becomes "L" (time t7).

【0078】マイクロプロセッサ1から出力されたアド
レス信号14はROM6、第1のRAM7、第2のRA
M8、アドレスデコード回路15に入力される。アドレ
スデコード回路15は、このアドレス信号14に基づい
てRAMを動作させる旨を示す”H”のRAM選択信号
18を出力する。
The address signal 14 output from the microprocessor 1 is stored in the ROM 6, the first RAM 7, and the second RA.
M8 is input to the address decode circuit 15. The address decode circuit 15 outputs an "H" RAM selection signal 18 indicating that the RAM is operated based on the address signal 14.

【0079】マイクロプロセッサ1は、読出しを示す”
L”のライト/リード信号13を出力する。ここで、例
えば読出用IOレジスタ9から出力されるRAM読出選
択信号22は、第1のRAM7を選択している旨を示
す”L”であるとする。
The microprocessor 1 indicates a read operation.
It outputs a write / read signal 13 of "L". Here, for example, the RAM read selection signal 22 output from the read IO register 9 is "L" indicating that the first RAM 7 is selected. I do.

【0080】この場合においては、RAM読出選択回路
25内の第3のAND回路28には、”H”のRAM選
択信号18と、論理否定により”L”から”H”となっ
たライト/リード信号13と、論理否定により”L”か
ら”H”となったRAM読出選択信号22とが入力され
るため、第1RAM出力許可信号26は”H”となる。
In this case, the third AND circuit 28 in the RAM read / select circuit 25 supplies the RAM select signal 18 of “H” and the write / read that has changed from “L” to “H” due to logical negation. Since the signal 13 and the RAM read selection signal 22 that has been changed from “L” to “H” by logical negation are input, the first RAM output enable signal 26 becomes “H”.

【0081】また、第4のAND回路29には、”H”
のRAM選択信号18と、論理否定により”L”から”
H”となったライト/リード信号13と、”L”のRA
M読出選択信号22とが入力されるため、第2RAM出
力許可信号27は”L”となる。
The fourth AND circuit 29 has "H"
RAM selection signal 18 and "L" due to logical negation
H / write / read signal 13 and “L” RA
Since the M read selection signal 22 is input, the second RAM output permission signal 27 becomes “L”.

【0082】従って、”H”の第1RAM出力許可信号
26を受けとった第1のRAM7が、アドレス信号14
で示されているアドレスの記憶内容を外部データバス5
に出力する(時刻t8)。
Therefore, the first RAM 7 receiving the "H" first RAM output permission signal 26 stores the address signal 14
Is stored in the external data bus 5
(Time t8).

【0083】最後に、外部データバス5へのアクセスを
終了する旨を示す”L”のバスアクセス応答信号16が
アドレスデコード回路15からマイクロプロセッサ1に
出力される(時刻t9)。
Finally, an "L" bus access response signal 16 indicating that access to the external data bus 5 is terminated is output from the address decode circuit 15 to the microprocessor 1 (time t9).

【0084】しかし、例えば第1のRAM7に異常が発
生した場合などには、読出用IOレジスタ9から出力さ
れるRAM読出選択信号22は第2のRAM8を選択し
ている旨を示す”H”に変化する。
However, when an abnormality occurs in the first RAM 7, for example, the RAM read selection signal 22 output from the read IO register 9 is "H" indicating that the second RAM 8 is selected. Changes to

【0085】これにより、第3のAND回路28から
は”L”の第1RAM出力許可信号26が出力され、第
4のAND回路29からは”H”の第2RAM出力許可
信号27が出力され、”H”の第2RAM出力許可信号
27を受けとった第2のRAM8が、アドレス信号14
で示されているアドレスの記憶内容を外部データバス5
に出力する。
As a result, the third AND circuit 28 outputs the "L" first RAM output permission signal 26, and the fourth AND circuit 29 outputs the "H" second RAM output permission signal 27. The second RAM 8 receiving the “H” second RAM output enable signal 27 stores the address signal 14
Is stored in the external data bus 5
Output to

【0086】上述したように、本実施形態によれば,第
1及び第2のRAM7、8に制御プログラム6b及びデ
ータを記憶し、さらにRAM書込制御回路30が新規の
データを第1及び第2のRAM7、8に同時に書込むの
で、第1又は第2のRAM7、8のいずれか一方に障害
が発生しても正常な第1のRAM7又は第2のRAM8
に制御プログラム6b及びデータを保存しておくことが
できるので、制御プログラム6bの実行瞬断を最小にし
つつ、RAM読出選択回路25によって正常な第1のR
AM7又は第2のRAM8を選択することができる。
As described above, according to this embodiment, the control program 6b and data are stored in the first and second RAMs 7 and 8, and the RAM write control circuit 30 stores new data in the first and second RAMs. Since the data is simultaneously written into the second RAMs 7 and 8, even if a failure occurs in one of the first and second RAMs 7 and 8, the normal first RAM 7 or the second RAM 8
Since the control program 6b and the data can be stored in the RAM, the RAM read-selection circuit 25 minimizes the instantaneous interruption of the execution of the control program 6b, and the normal first R
AM 7 or the second RAM 8 can be selected.

【0087】ゆえに、障害が発生したとき、リセットに
よる再起動方式を利用せずに記憶内容を復旧して連続制
御できるため、稼働率及び信頼性を向上させることがで
きる。また、第1及び第2のRAM7、8を備えたこと
により全体を多重化せずに実現できるため、コスト及び
ハードウェアの実装スペースを削減することができる。
Therefore, when a failure occurs, the storage contents can be restored and continuous control can be performed without using the restarting method by resetting, so that the operation rate and reliability can be improved. In addition, since the first and second RAMs 7 and 8 are provided, the entirety can be realized without multiplexing, cost and hardware mounting space can be reduced.

【0088】また、ROM6内の制御プログラム6bが
読出されたとき当該制御プログラム6bを直接第1及び
第2のRAM7、8の双方に同時に書込むため、第1及
び第2のRAM7、8に対しての再書込み動作が不要で
ある。
When the control program 6b in the ROM 6 is read, the control program 6b is directly written into both the first and second RAMs 7 and 8 simultaneously. All the rewriting operations are unnecessary.

【0089】ゆえに、第1及び第2のRAM7、8の双
方に障害が検出された場合など、リセットによる再起動
方式を利用して障害を復旧する場合においても高速に再
起動できるため、稼働率及び信頼性を向上させることが
できる。
Therefore, even when a failure is detected in both the first and second RAMs 7 and 8 and the failure is recovered by using the restart method by resetting, the system can be restarted at high speed. And reliability can be improved.

【0090】さらに、異常の検出された第1又は第2の
RAM7、8の異常領域が小さい場合などに、ROM6
の記憶内容に基づいて当該異領域を復旧させるため、連
続制御を実現でき、一層稼働率及び信頼性を向上させる
ことができる。
Further, when the abnormal area of the first or second RAM 7, 8 in which an abnormality is detected is small, the ROM 6
Since the different area is restored based on the stored contents, continuous control can be realized, and the operation rate and reliability can be further improved.

【0091】またさらに、第1又は第2のRAM7、8
に異常が検出されたとき、RAM読出選択回路25が異
常な第1又は第2のRAM7、8の選択を止めて正常な
第1又は第2のRAM7、8を選択するので、マイクロ
プロセッサ1が正常な制御プログラム6b及びデータを
参照して処理を実行することができる。
Further, the first or second RAM 7, 8
Is detected, the RAM read selection circuit 25 stops selecting the abnormal first or second RAM 7, 8 and selects the normal first or second RAM 7, 8, so that the microprocessor 1 Processing can be executed with reference to the normal control program 6b and data.

【0092】加えて、第1又は第2のRAM7、8に異
常が検出されたとき、マイクロプロセッサ1の処理の空
き時間を利用して正常な第1又は第2のRAM7、8及
びROM6の記憶内容に基づいて、異常な第1又は第2
のRAM7、8の記憶内容を周期的に順次復旧するた
め、異常領域が大きいときや異常領域が特定できないと
きであっても連続制御が可能であり、同様に再度異常が
検出されても連続制御が可能である。その他、本発明
は、その趣旨を逸脱しない範囲で種々変形して実施でき
る。
In addition, when an abnormality is detected in the first or second RAM 7, 8, the normal first or second RAM 7, 8 and the storage in the ROM 6 are utilized by utilizing the idle time of the processing of the microprocessor 1. Abnormal first or second based on content
Since the storage contents of the RAMs 7 and 8 are periodically and sequentially restored, continuous control is possible even when the abnormal area is large or when the abnormal area cannot be specified. Is possible. In addition, the present invention can be variously modified and implemented without departing from the spirit thereof.

【0093】[0093]

【発明の効果】以上説明したように、本発明によれば、
単一のマイクロプロセッサによる構成であっても、障害
が発生した場合に連続制御でき、稼働率及び信頼性を向
上できると共に、コスト及びハードウェアの実装スペー
スを削減できるマイクロプロセッサ制御装置を提供でき
る。
As described above, according to the present invention,
Even with a single microprocessor configuration, it is possible to provide a microprocessor control device that can continuously control when a failure occurs, can improve the operation rate and reliability, and can reduce the cost and the hardware mounting space.

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

【図1】本発明の一実施形態に係るマイクロプロセッサ
制御装置の構成を示す回路ブロック図。
FIG. 1 is a circuit block diagram illustrating a configuration of a microprocessor control device according to an embodiment of the present invention.

【図2】同実施の形態におけるメモリ空間の状態を示す
概念図。
FIG. 2 is a conceptual diagram showing a state of a memory space in the embodiment.

【図3】同実施の形態における初期実行プログラムによ
る処理の流れを示すフロー図。
FIG. 3 is a flowchart showing a flow of processing by an initial execution program in the embodiment.

【図4】同実施の形態における異常処理プログラムによ
る処理の流れを示すフロー図。
FIG. 4 is an exemplary flowchart showing the flow of processing by the abnormality processing program according to the embodiment.

【図5】同実施の形態におけるROM内の制御プログラ
ムを第1及び第2のRAMに書込む場合の信号の状態を
示すタイミングチャート。
FIG. 5 is a timing chart showing states of signals when a control program in the ROM is written into first and second RAMs according to the embodiment;

【図6】同実施の形態におけるマイクロプロセッサから
出力されるライト/リード信号によって書込みを指示し
た場合の信号の状態を示すタイミングチャート。
FIG. 6 is a timing chart showing a state of a signal when writing is instructed by a write / read signal output from the microprocessor according to the embodiment;

【図7】同実施の形態における第1又は第2のRAMの
記憶内容を外部データバスに読出す場合の信号の状態を
示すタイミングチャート。
FIG. 7 is a timing chart showing a state of a signal when reading the storage content of the first or second RAM to the external data bus in the embodiment.

【図8】従来のマイクロプロセッサ制御装置による処理
の一例を示す概略図。
FIG. 8 is a schematic diagram showing an example of processing by a conventional microprocessor control device.

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

1…マイクロプロセッサ 6…ROM 7、8…RAM 5…外部データバス 9、10…IOレジスタ 11…バスアクセス信号 12…メモリ/IO信号 13…ライト/リード信号 14…アドレス信号 15…アドレスデコード回路 16…バスアクセス応答信号 17…ROM選択信号 18…RAM選択信号 19…読出用IOレジスタ選択信号 20…書込用IOレジスタ選択信号 21、23、28、29、32、33…AND回路 22…RAM読出選択信号 24…同時書込指示信号 25…RAM読出選択回路 26…第1RAM出力許可信号 27…第2RAM出力許可信号 30…RAM書込制御回路 31…RAM書込信号 34…OR回路 35…第5のAND回路出力信号 36…第6のAND回路出力信号 37…クロック DESCRIPTION OF SYMBOLS 1 ... Microprocessor 6 ... ROM 7, 8 ... RAM 5 ... External data bus 9, 10 ... IO register 11 ... Bus access signal 12 ... Memory / IO signal 13 ... Write / read signal 14 ... Address signal 15 ... Address decode circuit 16 ... Bus access response signal 17 ... ROM selection signal 18 ... RAM selection signal 19 ... IO register selection signal for reading 20 ... IO register selection signal for writing 21,23,28,29,32,33 ... AND circuit 22 ... RAM reading Select signal 24 Simultaneous write instruction signal 25 RAM read select circuit 26 First RAM output enable signal 27 Second RAM output enable signal 30 RAM write control circuit 31 RAM write signal 34 OR circuit 35 fifth AND circuit output signal 36 ... Sixth AND circuit output signal 37 ... Clock

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプロセッサによる処理に基づい
て制御対象を制御するマイクロプロセッサ制御装置であ
って、 前記マイクロプロセッサで処理を実行するための制御プ
ログラムが保存された第1の記憶手段と、 前記第1の記憶手段内の制御プログラムと前記マイクロ
プロセッサで処理を実行した結果得られるデータが記憶
される第2の記憶手段と、 前記第2の記憶手段の内容が記憶される第3の記憶手段
と、 前記マイクロプロセッサが処理を実行するとき、前記第
2の記憶手段又は前記第3の記憶手段を選択する選択手
段と、 前記選択手段により選択された記憶手段の内容に基づい
て前記マイクロプロセッサが処理を実行した結果得られ
る新規のデータを前記第2の記憶手段及び前記第3の記
憶手段に同時に書込む書込制御手段とを備えたことを特
徴とするマイクロプロセッサ制御装置。
1. A microprocessor control device for controlling a control target based on processing by a microprocessor, wherein the first storage means stores a control program for executing processing by the microprocessor; A second storage unit in which a control program in the first storage unit and data obtained as a result of executing processing by the microprocessor are stored; a third storage unit in which the contents of the second storage unit are stored; When the microprocessor executes a process, a selection unit that selects the second storage unit or the third storage unit; and the microprocessor performs a process based on the content of the storage unit selected by the selection unit. And writing control means for simultaneously writing new data obtained as a result of the execution into the second and third storage means. Microprocessor controller, characterized in that was e.
【請求項2】 請求項1に記載のマイクロプロセッサ制
御装置において、 前記書込制御手段は、前記第1の記憶手段内の制御プロ
グラムが読出されたとき、当該制御プログラムを前記第
2の記憶手段及び前記第3の記憶手段に同時に書込むこ
とを特徴とするマイクロプロセッサ制御装置。
2. The microprocessor control device according to claim 1, wherein said write control means, when a control program in said first storage means is read, stores said control program in said second storage means. And writing to the third storage means at the same time.
【請求項3】 請求項1又は請求項2に記載のマイクロ
プロセッサ制御装置において、 前記第2の記憶手段又は前記第3の記憶手段に異常が検
出されたとき、当該異常の検出された記憶手段内の異常
領域を前記第1の記憶手段の内容に基づいて復旧するデ
ータ復旧手段を備えたことを特徴とするマイクロプロセ
ッサ制御装置。
3. The microprocessor control device according to claim 1, wherein when an abnormality is detected in the second storage unit or the third storage unit, the storage unit in which the abnormality is detected. A data recovery unit for recovering an abnormal area in the storage unit based on the contents of the first storage unit.
【請求項4】 請求項1乃至請求項3のいずれか1項に
記載のマイクロプロセッサ制御装置において、 前記選択手段は、前記第2の記憶手段に異常が検出され
たとき、正常な第3の記憶手段を選択することを特徴と
するマイクロプロセッサ制御装置。
4. The microprocessor control device according to claim 1, wherein the selection unit is configured to determine whether the second storage unit is normal when an abnormality is detected in the second storage unit. A microprocessor control device for selecting a storage means.
【請求項5】 請求項1乃至請求項4のいずれか1項に
記載のマイクロプロセッサ制御装置において、 前記データ復旧手段は、前記第2の記憶手段に異常が検
出されたとき、正常な第3の記憶手段による前記マイク
ロプロセッサの処理の空き時間中、前記第1及び第3の
記憶手段の内容に基づいて、前記第2の記憶手段の内容
を周期的に順次復旧することを特徴とするマイクロプロ
セッサ制御装置。
5. The microprocessor control device according to claim 1, wherein the data recovery unit is configured to execute a third normal operation when an abnormality is detected in the second storage unit. Wherein the contents of the second storage means are periodically and sequentially restored based on the contents of the first and third storage means during the idle time of the processing of the microprocessor by the storage means. Processor control unit.
JP34404296A 1996-12-24 1996-12-24 Microprocessor controller Pending JPH10187202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34404296A JPH10187202A (en) 1996-12-24 1996-12-24 Microprocessor controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34404296A JPH10187202A (en) 1996-12-24 1996-12-24 Microprocessor controller

Publications (1)

Publication Number Publication Date
JPH10187202A true JPH10187202A (en) 1998-07-14

Family

ID=18366216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34404296A Pending JPH10187202A (en) 1996-12-24 1996-12-24 Microprocessor controller

Country Status (1)

Country Link
JP (1) JPH10187202A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8275128B2 (en) 2007-11-01 2012-09-25 Hitachi, Ltd. Arithmetic logical unit, computation method and computer system
JP2012524352A (en) * 2009-04-20 2012-10-11 ピルツ ゲーエムベーハー アンド コー.カーゲー Method and apparatus for generating application program for safety-related control unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8275128B2 (en) 2007-11-01 2012-09-25 Hitachi, Ltd. Arithmetic logical unit, computation method and computer system
JP2012524352A (en) * 2009-04-20 2012-10-11 ピルツ ゲーエムベーハー アンド コー.カーゲー Method and apparatus for generating application program for safety-related control unit

Similar Documents

Publication Publication Date Title
EP0173515B1 (en) Error recovery system in a data processor having a control storage
JP4523639B2 (en) Memory error address management by firmware
JPH0820965B2 (en) How to continue running the program
JP3068009B2 (en) Error correction mechanism for redundant memory
JPH10187202A (en) Microprocessor controller
JP2000059981A (en) Digital protective relay device
JP2000132462A (en) Self-repairing system for program
JPH07122087A (en) Eeprom error check system
JP2010061258A (en) Duplex processor system and processor duplex method
KR100922409B1 (en) Information processing device and memory anomaly monitoring method
JPH05225077A (en) Hard error detection system for memory control circuit holding ecc
KR830002883B1 (en) Micro programmable controller
JPH0519171B2 (en)
JPH0392950A (en) Microprogram controller
JPH0644145A (en) Memory error saving system
JP2924732B2 (en) Self-diagnosis method for information processing device
JPH07295807A (en) Microprogram controller
JPS6356751A (en) Memory patrol control system
JPS6132701B2 (en)
JPH0135369B2 (en)
JPS59231798A (en) Data processor
JPH0481953A (en) Memory device
JP2001273197A (en) Flash memory rewriting method
JPH05158811A (en) Fault detecting system for data processor
JPH07152659A (en) Storage data protection device of computer