JPH04324550A - Memory content protective device - Google Patents
Memory content protective deviceInfo
- Publication number
- JPH04324550A JPH04324550A JP3095400A JP9540091A JPH04324550A JP H04324550 A JPH04324550 A JP H04324550A JP 3095400 A JP3095400 A JP 3095400A JP 9540091 A JP9540091 A JP 9540091A JP H04324550 A JPH04324550 A JP H04324550A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- error
- copy
- check code
- power
- 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
- 230000015654 memory Effects 0.000 title claims abstract description 113
- 230000001681 protective effect Effects 0.000 title 1
- 238000000034 method Methods 0.000 description 17
- 230000000694 effects Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 1
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、音響機器を含む情報機
器などに利用するメモリ内容保護装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory content protection device used in information equipment including audio equipment.
【0002】0002
【従来の技術】図3は、従来のメモリ内容保護装置の構
成を示している。図3において、32はメモリであり、
中央演算処理装置(以下、CPUという)31から制御
信号が入力されるようになっている。33はメモリ32
とバッテリ34および機器内電源35間に接続された電
源切換手段である。2. Description of the Related Art FIG. 3 shows the configuration of a conventional memory content protection device. In FIG. 3, 32 is a memory;
Control signals are input from a central processing unit (hereinafter referred to as CPU) 31. 33 is memory 32
This is a power supply switching means connected between the battery 34 and the internal power supply 35.
【0003】次に上記従来例の動作について説明する。
図3において、機器の電源がオンのとき、電源切換手段
33により機器内電源35がメモリ33に供給され、機
器の電源がオフされた場合、機器の電源の電圧低下を電
源切換手段33が検出し、メモリ32の電源をバッテリ
電源34に切り換える。Next, the operation of the above conventional example will be explained. In FIG. 3, when the device is powered on, the power source 35 in the device is supplied to the memory 33 by the power source switching means 33, and when the device is powered off, the power source switching device 33 detects a voltage drop in the device's power source. Then, the power source of the memory 32 is switched to the battery power source 34.
【0004】このように、上記従来のメモリ内容保護装
置でも機器の電源がオフしている状態でもメモリ内容を
保護できる。[0004] In this way, even with the conventional memory content protection device described above, the memory content can be protected even when the power of the device is turned off.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上記従
来のメモリ内容保護装置では、CPU31がメモリ32
にデータを書き込んでいる途中に電源をオフすると、そ
のデータが複数で有効となる場合、データの一部しか書
き変わらず、次回電源投入時エラーを生ずるという問題
があった。However, in the conventional memory content protection device described above, the CPU 31
If the power is turned off while data is being written to the device, only part of the data will be rewritten and an error will occur the next time the power is turned on, if the data is valid for multiple sources.
【0006】本発明はこのような従来の問題を解決する
ものであり、中央演算処理装置がデータを書き込んでい
る途中で電源がオフされてもメモリ内容が保護できる優
れたメモリ内容保護装置を提供することである。The present invention solves these conventional problems and provides an excellent memory content protection device that can protect memory contents even if the power is turned off while the central processing unit is writing data. It is to be.
【0007】[0007]
【課題を解決するための手段】本発明は上記目的を達成
するために、バッテリ電源によりバックアップされたメ
モリ内にメインメモリとコピーメモリを設け、データ書
き込み時には、メインメモリとコピーメモリの双方にデ
ータ本体とエラーチェックコードを書き込み、電源立ち
上げ時にまずメインメモリのエラーチェックコードをチ
ェックし、エラーであれば、次にコピーメモリのエラー
チェックコードをチェックし、エラーであれば、メモリ
を初期化し、エラーでなければメインメモリにコピーメ
モリの内容をコピーし、またメインメモリがエラーでな
い場合はコピーメモリのエラーチェックコードをチェッ
クし、エラーであればメインメモリの内容をコピーメモ
リにコピーするようにしたものである。[Means for Solving the Problems] In order to achieve the above object, the present invention provides a main memory and a copy memory in a memory backed up by a battery power supply, and when writing data, data is stored in both the main memory and the copy memory. Write the error check code to the main unit, and when turning on the power, first check the error check code in the main memory, if there is an error, then check the error check code in the copy memory, and if there is an error, initialize the memory, If there is no error, the contents of the copy memory are copied to the main memory, and if there is no error in the main memory, the error check code of the copy memory is checked, and if there is an error, the contents of the main memory are copied to the copy memory. It is something.
【0008】[0008]
【作用】したがって、本発明によれば、データを書き込
んでいる途中で機器の電源をオフしても、次回電源立上
げ時にメモリ内容をコピーメモリで修復するため、デー
タが複数で有効となる場合でも、次回電源投入時エラー
を生じないという効果を有する。[Operation] Therefore, according to the present invention, even if the power of the device is turned off while data is being written, the memory contents will be restored by the copy memory the next time the power is turned on, so the data will be valid for multiple copies. However, it has the effect of not causing an error the next time the power is turned on.
【0009】[0009]
【実施例】図1は、本発明の第1の実施例の構成を示す
ものである。図1において、2はスタティックRAMな
どによるメモリであり、CPU1から制御信号が入力さ
れるようになっている。このメモリ2内には、メインメ
モリ2aとコピーメモリ2bを有し、それぞれデータ本
体とエラーチェックコードが書き込まれるようになって
いる。DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows the structure of a first embodiment of the present invention. In FIG. 1, 2 is a memory such as a static RAM, and a control signal is input from the CPU 1. This memory 2 has a main memory 2a and a copy memory 2b, into which data bodies and error check codes are written respectively.
【0010】また、3はメモリ2とバッテリ電源4と機
器内電源5間に接続され、機器内電源5とバッテリ電源
4との接続換えを行う電源切換手段である。Further, reference numeral 3 denotes a power supply switching means connected between the memory 2, the battery power source 4, and the internal power source 5 for switching the connection between the internal power source 5 and the battery power source 4.
【0011】次に、上記第1の実施例の動作について説
明する。図1において、機器の電源がオンのとき電源切
換手段3により機器内電源5がメモリ3に供給され、機
器の電源がオフされた場合、機器の電源の電圧低下を電
源切換手段3が検出し、メモリ2の電源をバッテリ電源
4に切り換える。Next, the operation of the first embodiment will be explained. In FIG. 1, when the device is powered on, the power source 5 in the device is supplied to the memory 3 by the power source switching means 3, and when the device is powered off, the power source switching device 3 detects a voltage drop in the device's power source. , the power source of the memory 2 is switched to the battery power source 4.
【0012】電源がすでに投入された状態でメモリ2に
データを書き込む場合、まずCPU1はステップ6で該
当データをメインメモリ2aに書き込み、処理を行い、
ステップ7でその加算データなどにより構成されるエラ
ーコードを算出し、この算出したエラーコードをステッ
プ8でメインメモリ2a内のエラーコード領域に書き込
む。When writing data to the memory 2 with the power already turned on, the CPU 1 first writes the corresponding data to the main memory 2a in step 6, processes it, and
In step 7, an error code composed of the added data and the like is calculated, and in step 8, the calculated error code is written into the error code area in the main memory 2a.
【0013】さらに、ステップ9で該当データをコピー
メモリ2bに書き込み、最後にステップ10ですでに算
出してあるエラーコードをコピーエラーコード領域に書
き込む。以上メモリ2にデータ書き込み処理を終わった
ら通常処理に復帰する。Furthermore, in step 9, the corresponding data is written in the copy memory 2b, and finally in step 10, the already calculated error code is written in the copy error code area. After completing the data writing process to the memory 2, the process returns to normal processing.
【0014】電源投入時処理のフローチャートを図2に
示す。図2において、電源投入時処理が開始されると、
まず、ステップ21でメインメモリ2aのエラーチェッ
クコードをチェックし、そのチェックの結果エラーであ
れば、ステップ21のNG側からステップ22に移り、
次にコピーメモリ2bのエラーチェックコードをチェッ
クする。FIG. 2 shows a flowchart of the power-on processing. In FIG. 2, when the power-on process is started,
First, in step 21, the error check code in the main memory 2a is checked, and if the result of the check is an error, the process moves from the NG side in step 21 to step 22.
Next, the error check code in the copy memory 2b is checked.
【0015】このチェックの結果、エラーであれば、ス
テップ22のNG側からステップ23に進み、このステ
ップ23でエラー表示を発生し、ステップ24でメモリ
を初期化し、電源投入時処理を離脱して、ステップ28
で運転状態となる。If the result of this check is an error, the process proceeds from the NG side of step 22 to step 23, in which an error display is generated, the memory is initialized in step 24, and the process is exited from the power-on process. , step 28
It becomes operational.
【0016】また、上記ステップ22の処理において、
コピーメモリ2bがエラーでなければ、ステップ22の
OK側からステップ27に処理が移り、このステップ2
7でメインメモリ2aにコピーメモリ2bの内容をコピ
ーし、電源投入時処理を離脱して、ステップ28でメモ
リ2の運用状態に入る。[0016] Furthermore, in the process of step 22,
If there is no error in the copy memory 2b, the process moves from the OK side of step 22 to step 27, and this step 2
At step 7, the contents of the copy memory 2b are copied to the main memory 2a, the process exits from the power-on process, and at step 28, the memory 2 enters an operational state.
【0017】また、ステップ21の処理において、メイ
ンメモリ2aがエラーでない場合はステップ21のOK
側からステップ25に移り、コピーメモリ2aのエラー
チェックコードをチェックし、このチェックの結果、エ
ラーであれば、ステップ25からステップ26に処理が
移り、メインメモリ2aの内容をコピーメモリ2bにコ
ピーした後、電源投入時処理を離脱してステップ28で
上記運用状態に入るようにしたものである。Further, in the process of step 21, if there is no error in the main memory 2a, the process of step 21 is OK.
The process moves to step 25 from the side, and the error check code of the copy memory 2a is checked. If the result of this check is an error, the process moves from step 25 to step 26, and the contents of the main memory 2a are copied to the copy memory 2b. After that, the system leaves the power-on process and enters the operating state in step 28.
【0018】このように、上記第1の実施例によれば、
データを書き込んでいる途中で機器の電源をオフしても
、次回電源立上げ時にメモリ2の内容をコピーメモリ2
bあるいはコピーメモリで修復するため、データが複数
で有効となる場合でも、次回電源投入時、エラーを生じ
ないという効果を有する。As described above, according to the first embodiment,
Even if you turn off the power to the device while data is being written, the contents of memory 2 will be copied to memory 2 the next time the power is turned on.
Since the restoration is performed using the copy memory or the copy memory, there is an advantage that even if a plurality of pieces of data are valid, an error will not occur the next time the power is turned on.
【0019】[0019]
【発明の効果】本発明は上記実施例より明らかなように
、メモリ内にメインメモリとコピーメモリを設け、デー
タの書き込み時にはメインメモリとコピーメモリの双方
にデータ本体とエラーチェックコードを書き込み、電源
立ち上げ時にメインメモリのエラーチェックコードにエ
ラーがあれば、次にコピーメモリのエラーチェックコー
ドをチエックし、エラーがあれば、メモリを初期化し、
エラーがなければ、メインメモリにコピーメモリの内容
をコピーし、かつメインメモリがエラーでない場合でコ
ピーメモリのエラーチェックコードがエラーであれば、
メインメモリの内容をコピーメモリにコピーするように
しているため、データを書き込んでいる途中で機器の電
源をオフしても、次回電源立ち上げ時にメモリ内容をコ
ピーメモリあるいはコピーメモリで修復するため、デー
タが複数で有効となる場合でも、次回電源投入時エラー
を生じないという効果を有する。Effects of the Invention As is clear from the above embodiments, the present invention provides a main memory and a copy memory in the memory, writes the data main body and an error check code in both the main memory and the copy memory when writing data, and If there is an error in the main memory error check code at startup, then check the copy memory error check code, and if there is an error, initialize the memory,
If there is no error, copy the contents of the copy memory to the main memory, and if there is no error in the main memory and the error check code of the copy memory is an error,
Since the contents of the main memory are copied to the copy memory, even if the device is turned off while data is being written, the memory contents will be restored to the copy memory or copy memory the next time the power is turned on. Even if a plurality of pieces of data are valid, there is an effect that an error will not occur when the power is turned on next time.
【図1】本発明の第1の実施例におけるメモリ保護装置
の概略ブロック図FIG. 1 is a schematic block diagram of a memory protection device in a first embodiment of the present invention.
【図2】同装置の電源投入時処理の流れを示すフローチ
ャート[Figure 2] Flowchart showing the flow of processing when the device is powered on
【図3】従来のメモリ内容保護装置の概略ブロック図[Figure 3] Schematic block diagram of a conventional memory content protection device
1 CPU 2 メモリ 3 電源切換手段 4 バッテリ電源 5 機器内電源 1 CPU 2 Memory 3 Power switching means 4 Battery power supply 5 Device internal power supply
Claims (1)
メインメモリとコピーメモリを有するメモリと、機器内
電源のオン時には上記メモリにこの機器内電源を供給し
、かつ上記機器内電源のオフ時には上記バッテリ電源を
上記メモリに接続してバックアップさせる電源切換手段
と、上記メインメモリとコピーメモリの双方にデータ本
体とエラーチェックコードを書き込み、電源立ち上げ時
にまず上記メインメモリのエラーチェックコードをチェ
ックしてエラーであれば、次に上記コピーメモリのエラ
ーチェックコードをチェックし、エラーであればメモリ
を初期化し、かつエラーでなければ上記メインメモリに
コピーメモリの内容をコピーするとともに上記メインメ
モリがエラーでない場合は上記コピーメモリのエラーチ
ェックコードのチェックの結果エラーであれば、上記メ
インメモリの内容を上記コピーメモリにコピーする中央
演算処理装置とを備えたメモリ内容保護装置。1. A memory that is backed up by a battery power source and has a main memory and a copy memory; when the device internal power is turned on, the device internal power is supplied to the memory; and when the device internal power is turned off, the battery power is supplied to the memory. A power supply switching means that is connected to the memory for backup, and a data body and an error check code are written in both the main memory and copy memory, and when the power is turned on, the error check code in the main memory is checked first, and if there is an error, the error check code is checked. , Next, check the error check code of the above copy memory, and if there is an error, initialize the memory, and if there is no error, copy the contents of the copy memory to the above main memory, and if there is no error in the above main memory, execute the above copy. A memory content protection device comprising: a central processing unit that copies the contents of the main memory to the copy memory if an error is found as a result of checking a memory error check code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3095400A JPH04324550A (en) | 1991-04-25 | 1991-04-25 | Memory content protective device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3095400A JPH04324550A (en) | 1991-04-25 | 1991-04-25 | Memory content protective device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04324550A true JPH04324550A (en) | 1992-11-13 |
Family
ID=14136615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3095400A Pending JPH04324550A (en) | 1991-04-25 | 1991-04-25 | Memory content protective device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04324550A (en) |
-
1991
- 1991-04-25 JP JP3095400A patent/JPH04324550A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR970062904A (en) | Database recovery method using double-sided nonvolatile memory and method thereof | |
KR960029997A (en) | Hibernation system of option card | |
JPH04324550A (en) | Memory content protective device | |
JPS6011950A (en) | Memory system of double structure | |
JPH02294723A (en) | Duplex control method for auxiliary memory device | |
JPH06250939A (en) | Data processor | |
JPH02128266A (en) | Register with protective function | |
JPH06259274A (en) | Duplex system | |
JPS608962A (en) | Temporary fault detecting system of storage information | |
JPH01102658A (en) | File write back-up system | |
JPH033051A (en) | Information processor | |
JPH02122350A (en) | Memory write protection system | |
JPS63280357A (en) | Data save/restore system | |
JPH02293950A (en) | Memory backup system | |
JPH04256006A (en) | File restoring system | |
JPS6381537A (en) | Computer system | |
JPH0413346A (en) | Electronic automatic exchange | |
JPH02118745A (en) | Memory back-up device | |
JPH039449A (en) | Electronic disk subsystem | |
JPH0749801A (en) | Error analysis assisting circuit | |
JPS60150287A (en) | Data writing method | |
JPS5994160A (en) | Data equalizing system of composite electronic computer system | |
JPH05314017A (en) | Data recovering system | |
JPS6352252A (en) | Memory control method | |
JPH07287694A (en) | Multiplex processing system and memory synchronous control method |