JPH02181847A - Data breakdown checking device - Google Patents

Data breakdown checking device

Info

Publication number
JPH02181847A
JPH02181847A JP1001490A JP149089A JPH02181847A JP H02181847 A JPH02181847 A JP H02181847A JP 1001490 A JP1001490 A JP 1001490A JP 149089 A JP149089 A JP 149089A JP H02181847 A JPH02181847 A JP H02181847A
Authority
JP
Japan
Prior art keywords
power
check code
parity check
data
turned
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
JP1001490A
Other languages
Japanese (ja)
Inventor
Takashi Miyake
隆 三宅
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.)
Alpine Electronics Inc
Original Assignee
Alpine Electronics Inc
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 Alpine Electronics Inc filed Critical Alpine Electronics Inc
Priority to JP1001490A priority Critical patent/JPH02181847A/en
Publication of JPH02181847A publication Critical patent/JPH02181847A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To surely detect a data error by comparing a parity check code calculated immediately after the turning-OFF of power and the parity check code calculated immediately after the turning-ON of the power. CONSTITUTION:The power is supplied to the power input terminal 1a of a microcomputer 1 from a DC power source +B through a diode 4. The power input terminal 1a is connected to a holding capacitor 2 as well, and back-up power is supplied to it from a back-up power source 3 through the diode 5. The DC power +B is supplied to an electricity decrease detector 6 too, and its detected output is supplied to a back-up mode control terminal 1b. In this case, when the power is turned OFF, the parity check code is calculated so as to meet necessary data in a memory, and is recorded in the same memory, and a device is turned into a back-up mode. Afterward, when the power is turned ON, the parity check code is calculated again so as to meet the held necessary data, and is compared with the parity check code calculated at the time of the turning-OFF of the power. Thus, the breakdown of the data is surely detected.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はマイコンのバックアップ装置に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to a backup device for a microcomputer.

[発明の概要コ 本発明はマイコン制御のオーディオ機器等において、バ
ックアップ動作中の電源破壊を検出するためパリティチ
ェックコードを使用するものである。
[Summary of the Invention] The present invention uses a parity check code in microcomputer-controlled audio equipment or the like to detect power failure during backup operation.

[従来の技術] 従来カーオーディオその他オーディオ機器等においては
マイコンにより動作制御が行われることが多い。このよ
うなオーディオ機器を使用したあとその動作を停止させ
る場合、マイコンのRAM領域のデータは保持しておき
、次回の動作に支障がないようにする必要がある。この
ため上記マイコンにはメモリ用のバックアップ電源が設
けられており、オーディオ機器の動作を停止させるとき
にバックアップモードに切換えて、データを保持するよ
うになされている。
[Prior Art] Conventionally, operations of car audio and other audio equipment are often controlled by microcomputers. When stopping the operation of such audio equipment after using it, it is necessary to retain the data in the RAM area of the microcomputer so that it will not interfere with the next operation. For this reason, the microcomputer is provided with a backup power source for memory, and when the audio equipment stops operating, it switches to a backup mode and retains the data.

ところがこのデータ保持用バックアップ電源の電圧が低
下したり、インパルス性ノイズ等が発生すると、メモリ
内のデータが破壊されることがある。このように破壊さ
れたデータをもとにしてマイコンが動作すると、オーデ
ィオ機器が誤動作し正常な機能を行わせることができな
い。
However, if the voltage of this data retention backup power supply drops or impulsive noise occurs, data in the memory may be destroyed. If the microcomputer operates based on data that has been destroyed in this way, the audio equipment will malfunction and will not be able to function normally.

このため、従来はRAM等のメモリ内に特定パターンの
チエツクコードを記録しておき、第4図に示すフローチ
ャートに示すように、電源をオンにして上述のバンクア
ップモードから通常の使用状態に復帰させる時に、この
チエツクコードを検査し、このチエツクコードに変化が
なければ通常の処理を行い、このチエツクコードが上記
特定パターン以外のパターンになった場合には、、RA
Mデータが破壊されたとしてこのRAMデータをイニシ
ャライズし、誤動作を防止すると共に、次のバックアッ
プモードのためにチエツクコードを上記特定パターンに
直しておくようにしていた。
For this reason, conventionally, a check code of a specific pattern is recorded in a memory such as RAM, and as shown in the flowchart shown in Figure 4, the power is turned on to return from the above-mentioned bank-up mode to the normal usage state. When this check code is used, the check code is checked, and if there is no change in the check code, normal processing is performed.If the check code becomes a pattern other than the above specific pattern, the RA
This RAM data is initialized assuming that the M data has been destroyed to prevent malfunction, and the check code is corrected to the above-mentioned specific pattern for the next backup mode.

[発明が解決しようとする課題] ところで、このチエツクコードとして通常例えば8ビツ
トもしくは16ビツト程度のデータ量のコードが用いら
れるが、このデータ量はバックアンプされる必要データ
のデータ量に比べて極めて少ない。従って小さなデータ
破壊が発生しても、チエツクコードが破壊されない可能
性も高く、例えば1ピッl−2ビツトといった小規模な
データ破壊は検出できないことが多い。このためデータ
破壊があるにもかかわらずイニシャライズされず、使用
に際して誤動作となることがあった。
[Problems to be Solved by the Invention] By the way, a code with a data amount of about 8 bits or 16 bits, for example, is normally used as this check code, but this data amount is extremely small compared to the amount of data required to be back-amplified. few. Therefore, even if small data corruption occurs, there is a high possibility that the check code will not be destroyed, and small data corruption such as 1 bit - 2 bits, for example, often cannot be detected. For this reason, even though data was destroyed, it was not initialized, resulting in malfunctions during use.

[課題を解決するための手段] 本発明によるデータ破壊チエツク装置は、電源遮断後に
バックアップすべき記録データのパリティチェックコー
ドを算出して第1のパリティチェックコードを得る手段
と、電源投入後に上記記録データのパリティチェックコ
ードを再び算出して第2のパリティチェックコードを得
る手段と、上記第1及び第2のパリティチェックコード
の一致を検出する手段とを有することを特徴とするもの
である。
[Means for Solving the Problems] A data corruption check device according to the present invention includes means for calculating a parity check code of recorded data to be backed up after power is turned off to obtain a first parity check code, and means for calculating a parity check code of recorded data to be backed up after power is turned off, and The present invention is characterized by comprising means for recalculating the parity check code of the data to obtain a second parity check code, and means for detecting a match between the first and second parity check codes.

[作用] 本発明は以上のような構成を有するものであるから、電
源をオフするとメモリ内の必要データに合わせてパリテ
ィチェックコードが計算され、同じメモリ内に記録され
てバックアップモードとなる。その後電源をオンすると
保持されていた上記必要データに合わせて再度パリティ
チェックコードが計算され、上記電源オフ時に計算され
たパリティチェックコードと比較されるので、上記必要
データの破壊を正確に検出することができる。
[Operation] Since the present invention has the above-described configuration, when the power is turned off, a parity check code is calculated according to the necessary data in the memory, and is recorded in the same memory to enter the backup mode. After that, when the power is turned on, a parity check code is calculated again according to the above-mentioned necessary data that was held, and compared with the parity check code calculated when the power was turned off, so that destruction of the above-mentioned necessary data can be accurately detected. Can be done.

[実施例コ 以下、本発明を実施例に従って詳細に説明する。[Example code] Hereinafter, the present invention will be explained in detail according to examples.

第1図は本発明の一実施例を示すブロック図であり、第
2図はここで用いられるRAM領域の概略図、第3図は
フローチャートである。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a schematic diagram of a RAM area used here, and FIG. 3 is a flowchart.

第1図において、マイコン1は図示せぬオーディオ機器
の各回路を制御するものである。マイコン1の電源入力
端子1aには直流電源子Bからダイオード4を介して電
源が供給される。電源端子1aにはまた、保持用コンデ
ンサ2が接続されると共に、バックアップ用電源3から
ダイオード5を介してバックアップ用電源が供給される
。直流電源子Bは減電検出器6にも加えられ、その検出
出力はバックアップモード制御端子1bに加えられる。
In FIG. 1, a microcomputer 1 controls each circuit of an audio device (not shown). Power is supplied to the power input terminal 1a of the microcomputer 1 from a DC power source B via a diode 4. A holding capacitor 2 is also connected to the power supply terminal 1a, and a backup power supply is supplied from a backup power supply 3 via a diode 5. The DC power supply element B is also applied to the voltage reduction detector 6, and its detection output is applied to the backup mode control terminal 1b.

バックアップすべきデータが保持されたRAM領域は概
略第2図の如くなされ、メモリ10はアドレスナンバO
番地−255番地まであり、このうち0番地から254
番地までにそれぞれ8ビツトのバックアップすべきデー
タ10aが保持されており、アドレスナンバ255番地
は8ビツトの水平パリティチェックコード10bが記録
される領域である。このパリティチェックコード10b
は、上記O〜254番地までの各アドレスに記録された
データ10aの同位ビットに含まれるII I IIが
偶数の時そのビットを′○″とし、奇数の時そのビット
を′1″とする演算を各ビットについて行ったものであ
る。
The RAM area in which data to be backed up is held is roughly shown in FIG.
There are addresses up to 255, of which 0 to 254.
8-bit data 10a to be backed up is held up to each address, and address number 255 is an area where an 8-bit horizontal parity check code 10b is recorded. This parity check code 10b
is an operation that sets the bit to '○' when II II II included in the same bits of the data 10a recorded at each address from O to 254 is an even number, and sets that bit to '1' when it is an odd number. is performed for each bit.

このような演算は例えば、あるビットについて0番地と
1番地のデータの排他的論理和(以下EXORとする)
を演算し、この結果と2番地の同位ビットのデータとの
EXORを演算し、さらにこの結果と3番地の同位ビッ
トのデータとのEXORを演算し、この演算を以下4番
地から254番地について行い、最後に得られた結果を
255番地の対応するビットに入れる。このような演算
を全ビットについて各々行うことにより上記パリティチ
ェックコードを得ることができる。
Such an operation is, for example, an exclusive OR (hereinafter referred to as EXOR) of data at address 0 and address 1 for a certain bit.
, calculate EXOR between this result and the data of the same bit at address 2, then calculate EXOR between this result and the data of the same bit at address 3, and perform this operation for the following addresses 4 to 254. , the last obtained result is placed in the corresponding bit at address 255. The above parity check code can be obtained by performing such operations on all bits.

このような構成を有するバックアップ装置について第3
図のフローチャートを用いて説明する。
Regarding the backup device with such a configuration, the third
This will be explained using the flowchart shown in the figure.

電源が投入されると直流電源子Bの電圧が上昇し、減電
検出器6はこの電圧増加を検出してマイコンを起動する
(SO)。マイコン1は起動後直ちに上述のパリティチ
エツクコートを計算しくSl)、これと前回のバックア
ップモード時にすでに演算されRAMに記録されている
パリティチェックコードとを比較しくS2)、違ってい
ればデータ破壊があったと判断しRAMをイニシャライ
ズする(S3)。上記パリティチェックコードが一致し
た場合(S2)、及び上記イニシャライズが完了した場
合(S3)はマイコン1はオーディオ機器を動作させる
通常の処理を行う(S4)。
When the power is turned on, the voltage of the DC power supply element B increases, and the low voltage detector 6 detects this voltage increase and starts the microcomputer (SO). Immediately after startup, microcontroller 1 calculates the above parity check code (Sl) and compares this with the parity check code that has already been calculated and recorded in the RAM during the previous backup mode (S2). If it is different, data will be destroyed. It is determined that there is, and the RAM is initialized (S3). If the parity check codes match (S2) and if the initialization is completed (S3), the microcomputer 1 performs normal processing to operate the audio equipment (S4).

この状態で減電検出器6は直流電源子Bの監視を続け(
35)、直流電源子Bが正常な値である限り上記通常の
処理(S4)を行う。電源オフなどの理由により直流電
源子Bが所定レベル以下になったことを減電検出器6が
検出すると(S5)、マイコン1は再びパリティチェッ
クコードを計算し、上記RAMの255番地に書き込み
(S6)、バックアップモートに移行する(S7)。
In this state, the voltage reduction detector 6 continues to monitor the DC power supply element B (
35), as long as the DC power supply element B has a normal value, perform the above normal processing (S4). When the low voltage detector 6 detects that the DC power supply element B has fallen below a predetermined level due to power off or other reasons (S5), the microcomputer 1 calculates the parity check code again and writes it to address 255 of the RAM ( S6), and transition to backup mode (S7).

ここで従来のバックアップ装置で用いられるチエツクコ
ードと、本実施例において用いられる水平パリティチェ
ックコードの誤り見逃し率についての比較を行う。
Here, a comparison will be made regarding the missed error rate between the check code used in the conventional backup device and the horizontal parity check code used in this embodiment.

まずバックアップ電源が切れた時やイニシャライズの時
などのように、ビット誤りが多量に発生する場合につい
て説明する。従来のチエツクコードでは、このようなデ
ータ破壊によりチエツクコードが破壊された場合、この
破壊の結果たまたま真のチエツクコードに一致してしま
った場合に誤りが見逃される。従って誤り見逃し率Es
工はこのような場合の生ずる確率であるから、 となる。
First, we will explain the case where a large number of bit errors occur, such as when the backup power is turned off or during initialization. In conventional check codes, if the check code is destroyed due to such data destruction, an error will be overlooked if the check code happens to match the true check code as a result of this destruction. Therefore, the error rate Es
Since d is the probability of occurrence in such a case, it becomes .

これに対して本実施例による水平パリティチェックコー
ドを用いた場合の誤り見逃し率ES2ば。
On the other hand, when the horizontal parity check code according to the present embodiment is used, the missed error rate is ES2.

バックアップモード中に演算されたチエツクコードが破
壊されたにもかかわらず、このチエツクコードが電源投
入直後に算出された比較用チエツクコードにたまたま一
致する確率であるから、上述の場合と同じく となる。
Even though the check code calculated during the backup mode is destroyed, there is a probability that this check code coincidentally coincides with the comparison check code calculated immediately after the power is turned on, so the case is the same as the above case.

このようにビット誤りが多量に発生する場合は両者に差
異はない。
When a large number of bit errors occur like this, there is no difference between the two.

次にビット誤り発生率Eが極めて少ない場合について説
明する。
Next, a case where the bit error occurrence rate E is extremely small will be explained.

この場合従来のチエツクコードでは、チエツクコードに
誤りが発生すれば確実に検出できるが、他の必要データ
部分だけに誤りが発生した場合は見逃しとなる。従って
、従来の誤り見逃し率ES1は、バックアップメモリの
全ビット数に対するチエツクコードのビット数に、ビッ
ト誤り発生率Eを掛けたものとなり、 となる。
In this case, with conventional check codes, if an error occurs in the check code, it can be detected reliably, but if an error occurs only in other necessary data parts, it will be missed. Therefore, the conventional missed error rate ES1 is the product of the number of check code bits relative to the total number of bits in the backup memory multiplied by the bit error occurrence rate E, and becomes as follows.

これに対して本発明による誤り見逃し率hSzは1ビッ
ト誤りの場合、必ず上記比較用チエツクコードに反映す
るので完全に検出できES2=Oとなる。また2ビット
誤りの場合は、たまたま同位のビットに2つのエラーが
発生すると、この誤りは比較用チエツクコードには反映
されず見逃しとなる。従ってビット誤り率をEとすると
誤り見逃し率E S2は。
On the other hand, in the error oversight rate hSz according to the present invention, in the case of a 1-bit error, it is always reflected in the comparison check code, so that it can be completely detected and ES2=O. In the case of a 2-bit error, if two errors happen to occur in the same bit, this error will not be reflected in the comparison check code and will be overlooked. Therefore, if the bit error rate is E, the missed error rate E S2 is.

ES2=32X (32−1)E” となる。もともとEは極めて小さいのでE2は極めて小
さく無視できる。
ES2=32X (32-1)E''. Since E is originally extremely small, E2 is extremely small and can be ignored.

同位のビットに3つ以上の誤りが発生する場合は誤り発
生率ES2はますます小さくなり無視できる。
If three or more errors occur in the same bit, the error rate ES2 becomes smaller and can be ignored.

[発明の効果] 以上のように本発明によれば電源オフ直後に計算された
パリティチェックコードと、電源ON直後に計算された
比較用パリティチェックコードとを比較することにより
データ破壊を検出するようにしたので、ビット誤り率が
小さい場合でも確実にデータ誤りを検出することができ
る。
[Effects of the Invention] As described above, according to the present invention, data corruption can be detected by comparing the parity check code calculated immediately after the power is turned off and the comparison parity check code calculated immediately after the power is turned on. Therefore, data errors can be reliably detected even when the bit error rate is small.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示すブロック図。 第2図は第1図において用いることのできるRAM領域
の概略図、第3図は第1図の実施例の動作を示すフロー
チャート、第4図は従来のバックアップ装置の動作を示
すフローチャートである。 1・・・・・・・・・マイコン、2・・・・・・・・・
保持コンデンサ、3・・・・・・・・・バックアップ用
電極、4,5・・・・・・・・ダイオード、6・・・・
・・・・・減電検出器。 水平ハ0ソテ仁チェヅZコード +8 (9源)
FIG. 1 is a block diagram showing one embodiment of the present invention. FIG. 2 is a schematic diagram of a RAM area that can be used in FIG. 1, FIG. 3 is a flowchart showing the operation of the embodiment of FIG. 1, and FIG. 4 is a flowchart showing the operation of a conventional backup device. 1・・・・・・・・・Microcomputer, 2・・・・・・・・・
Holding capacitor, 3... Backup electrode, 4, 5... Diode, 6...
...Low voltage detector. Horizontal Ha 0 Sote Jin Chezu Z code +8 (9 sources)

Claims (1)

【特許請求の範囲】[Claims] 電源遮断後にバックアップすべき記録データのパリテイ
チェックコードを算出して第1のパリテイチェックコー
ドを得る手段と、電源投入後に上記記録データのパリテ
イチェックコードを再び算出して第2のパリテイチェッ
クコードを得る手段と、上記第1及び第2のパリテイチ
ェックコードの一致を検出する手段とを有することを特
徴とするデータ破壊チェック装置。
A means for calculating a parity check code of the recorded data to be backed up after the power is turned off to obtain a first parity check code, and a means for calculating the parity check code of the recorded data again after the power is turned on to obtain a second parity check code. A data corruption checking device comprising: means for obtaining a check code; and means for detecting coincidence of the first and second parity check codes.
JP1001490A 1989-01-07 1989-01-07 Data breakdown checking device Pending JPH02181847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1001490A JPH02181847A (en) 1989-01-07 1989-01-07 Data breakdown checking device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1001490A JPH02181847A (en) 1989-01-07 1989-01-07 Data breakdown checking device

Publications (1)

Publication Number Publication Date
JPH02181847A true JPH02181847A (en) 1990-07-16

Family

ID=11502892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1001490A Pending JPH02181847A (en) 1989-01-07 1989-01-07 Data breakdown checking device

Country Status (1)

Country Link
JP (1) JPH02181847A (en)

Similar Documents

Publication Publication Date Title
US7461303B2 (en) Monitoring VRM-induced memory errors
JPS59183437A (en) Self-inspection circuit for computer
JPH03248251A (en) Information processor
JPH02181847A (en) Data breakdown checking device
US6052816A (en) Programmable ROM and parity programmable ROM having a correction coding circuit
US11416332B2 (en) Protection for ethernet physical layer
EP1141830A1 (en) A method and apparatus for detecting errors in data output from memory and a device failure in the memory
US20210294691A1 (en) Data processing device and data processing method
US6798695B2 (en) Arrangement for storing a count
US6861769B1 (en) Apparatus and method for protection of an electronic circuit
JPS63279347A (en) Memory device
CN110389869A (en) A kind of method for detecting abnormality, device, electronic equipment and readable storage medium storing program for executing
KR0136864Y1 (en) Memory backup device
JPH05276560A (en) Data storage method at momentary interruption in remote controller for hot water supply equipment
JPH05225077A (en) Hard error detection system for memory control circuit holding ecc
JPH08153045A (en) Memory control circuit
JPS61278953A (en) Method for checking error in ram
JPH0219867Y2 (en)
JPS63310045A (en) Microcomputer
JPH0264835A (en) Prevention device of system down
JPH03228159A (en) Controller
JPS63311550A (en) Memory checking system
JPS6086628A (en) Detection for abnormality of computer
JPS63126041A (en) Signal input device
JPH06266628A (en) Detection device for backup data destruction