JPS6140652A - Method and circuit for write protection of memory - Google Patents
Method and circuit for write protection of memoryInfo
- Publication number
- JPS6140652A JPS6140652A JP16327484A JP16327484A JPS6140652A JP S6140652 A JPS6140652 A JP S6140652A JP 16327484 A JP16327484 A JP 16327484A JP 16327484 A JP16327484 A JP 16327484A JP S6140652 A JPS6140652 A JP S6140652A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- data
- write
- signal
- comparator
- 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
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、CPUシステムに供されるメモリの書込み方
法及び回路に関し、特にCPUの異常によ勺メモリ内容
が破壊されることを防止できる方法及び回路に関するも
のである。[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a memory writing method and circuit provided for a CPU system, and in particular to a method that can prevent memory contents from being destroyed due to CPU abnormality. and circuits.
〔従来の技術」
CPUシステムにおいては、その信頼性を維持するため
、CPUの暴走によってメモリに格納されてへるデータ
の破壊を防ぐこと、すなわち異常な書込みを防止するこ
とが必要になっている。[Prior art] In order to maintain the reliability of a CPU system, it is necessary to prevent the destruction of data stored in memory due to CPU runaway, that is, to prevent abnormal writing. .
そのため、従来では、書込み信号がメモリに入力されな
いようにするため、書込み信号線を遮断するスイッチを
設ける手段や、CPUのプログラムの中に書込みチェッ
ク用のサブルーチンを設ける手段が知られていた。Therefore, in order to prevent the write signal from being input to the memory, conventionally known methods include providing a switch to cut off the write signal line and providing a write check subroutine in the CPU program.
なお、この分野に関しては特開昭55−98594、特
開昭57−86195、特開昭58−23898などの
提案がある。In this field, there are proposals such as JP-A-55-98594, JP-A-57-86195, and JP-A-58-23898.
ところが、前述したスイッチを設ける手段では、スイッ
チが必要となり、しかも、そのスイッチを必要な時に切
替るという手間も要するという問題点がある。However, the above-mentioned means for providing a switch has the problem that a switch is required, and it also requires time and effort to switch the switch when necessary.
サーブルーチンを設ける手段ではプログラムが複雑化し
、しかも処理時間が侵くなるという問題点がある。The method of providing subroutines has the problem that the program becomes complicated and the processing time increases.
本発明は、上記問題点を解決するため、CPUがメモリ
に書込みを行う場合は、同一内容の書込み命令を2度繰
り返すようにするとともに、はじめの命令で書込まれる
べきデータを一時保持するDフリップフロップを設け、
さらに2JJt目の命令で書込まれるべきデータと、前
記Dフリップフロップの内容を比較するコンパレータを
設け、このコンパレータで比較した結果同一であったと
きのみ、データがメモリに書込まれるようにする。In order to solve the above-mentioned problems, the present invention makes it possible to repeat a write command with the same content twice when the CPU writes to memory, and to temporarily hold the data to be written by the first command. Install flip-flops,
Furthermore, a comparator is provided to compare the data to be written by the 2JJt-th instruction with the contents of the D flip-flop, and the data is written to the memory only when the comparison result by this comparator shows that they are the same.
〔実施例」
以下、本発明の具体的実施例を第1図に示して・ 説
明する。[Example] A specific example of the present invention will be described below with reference to FIG.
第1図において、■はデータバス、2はアドレスバス、
3はメモリセレクト(チップイネーブル)信f (CB
)、4及び6it書込=Ml(WR)、5は読出し信
号(■下)、7はコンパレータ、8はDフリップフロッ
プ、9はメモIJ(RAM)である。In Figure 1, ■ is a data bus, 2 is an address bus,
3 is the memory select (chip enable) signal f (CB
), 4 and 6it write=Ml (WR), 5 is a read signal (lower ■), 7 is a comparator, 8 is a D flip-flop, and 9 is a memory IJ (RAM).
さて、図示しないCPUが書込み信号4を発すると、D
フリップフロップ8は、その信号の立ち上がシをとらえ
てメモリ9に書込まれようとしてデータバス1上にある
データを記憶する。Now, when the CPU (not shown) issues write signal 4, D
Flip-flop 8 captures the rising edge of the signal and stores the data on data bus 1 to be written into memory 9.
このとき、書込み信号4はコンパレータ7のゲートGに
信号10として入力されておシ、コンパレータ7のP端
子に入力されるデータとコンパレータ7のQ端子に入力
されるデータとが一致したときしか、メモリ9へ書込み
信号6として出力されないようになっている。At this time, the write signal 4 is input as a signal 10 to the gate G of the comparator 7, and only when the data input to the P terminal of the comparator 7 and the data input to the Q terminal of the comparator 7 match, The write signal 6 is not output to the memory 9 as the write signal 6.
この時点では、コンパレータ7のP端子にはデータが入
力されているが、コンパレータ7のQ端子には、まだデ
ータが入力されていない。At this point, data has been input to the P terminal of the comparator 7, but no data has yet been input to the Q terminal of the comparator 7.
次にCPUは、再度、書込み信号4を発する。Next, the CPU issues write signal 4 again.
つまり、具体的には、あらかじめ
LD MEMORY、、 A
LD MEMORY、 A
というように、書込み命令を2度繰〕返してプログラム
しておくのである。Specifically, the program is programmed in advance by repeating the write command twice, such as LD MEMORY, A LD MEMORY, A.
これによって、2度目の書込み信号4を発すると、Dフ
リップフロップ8は、それを受けて、前回記憶した内容
をバス11に出力する。As a result, when the second write signal 4 is issued, the D flip-flop 8 receives it and outputs the previously stored contents to the bus 11.
このとき、はじめてコンパレータ7のP端子に入力され
るデータとコンパレータ7のQ端子に入力されるデータ
とが一致して、メモリ9へ書込み信号6が発され、デー
タバス1上のデータがメモリ9へ書込まれる。At this time, the data input to the P terminal of the comparator 7 and the data input to the Q terminal of the comparator 7 match for the first time, a write signal 6 is issued to the memory 9, and the data on the data bus 1 is transferred to the memory 9. written to.
このようすをタイムチャートとして第2図に示す。This situation is shown in FIG. 2 as a time chart.
第2図において、XとAはデータの値であり、前回デー
タX(コンパレータ7のQ端子のデータ)と今回データ
A(コンパレータ7のP端子のデータ)をコンパレータ
で比較し、不一致であれば書・今回データが同一のとき
のみ(ここでは、ともにAである)書込み信96が発さ
れる様子((ロ)参照)を示している。In Figure 2, X and A are data values, and the previous data The figure shows how a write signal 96 is issued only when the write and current data are the same (in this case, both are A) (see (b)).
すなわち、このようにCPUが書込み信号を繰り返して
発しないかぎり、メモリーにはデータが書込まれないか
ら、CPUが異常をきたして2度目の書込み信号が発さ
れないときは、書込みは行なわれず、従前のメモリ内容
は保護される。In other words, unless the CPU repeatedly issues the write signal in this way, data will not be written to the memory, so if the CPU malfunctions and the second write signal is not issued, no writing will be performed and the data will not be written to the memory as before. The memory contents of are protected.
〔他の実施例J
前述の例での比較では、メモリ保護に君子の不安が残る
場合は、Dフリップフロップ8を反転出力タイプの素子
を用9て、プログラムを’CMA(アキームレータの内
容を反転せよ)LD MEMORY、 A
MA
LD MEMORY、 A
とすれば、信頼性がさらに向上する。[Other Embodiment J] In the comparison with the above example, if you are concerned about memory protection, use an inverting output type element 9 for the D flip-flop 8, and run the program by 'CMA' (the contents of the achievator). Reversing) LD MEMORY, AMA LD MEMORY, A will further improve reliability.
以上述べたように、本発明によれば、書込み命メモリに
コンパレータとDフリップフロップからなるきわめて簡
単で安価な回路を付加するだけで、メモリの書込み保護
が可能になるというすぐれた効果がある。As described above, the present invention has the excellent effect of making it possible to write protect the memory by simply adding an extremely simple and inexpensive circuit consisting of a comparator and a D flip-flop to the write-instruction memory.
第1図は本発明の具体的実施例、第2図は本発明のタイ
ムチャートである。
7:コンパレータ
8:Dフリップフロップ
9:メモリ
第 1 図
データバス1上のデータ [II3m==ア==]コ
ンバレー97のP端子のデータFJ=【1713m八=
]コンパY六”A71’に簿5て−9「区=1=Nへ「
=71.工73.。FIG. 1 is a specific embodiment of the present invention, and FIG. 2 is a time chart of the present invention. 7: Comparator 8: D flip-flop 9: Memory Figure 1 Data on data bus 1 [II3m==a==] Data at P terminal of combo barre 97 FJ=[1713m8=
] Comparator Y6"A71' to register 5 -9 "ku=1=N"
=71. Engineering 73. .
Claims (2)
いて、CPUが実行するプログラムにあらかじめ同一の
書込み命令を2回連続してプログラムしておくとともに
、そのはじめの命令で書込まれるべきデータを外部回路
でいったん保持し、2度目の命令でそのいったん保持し
たデータと、書込まれるべきデータとを外部回路で比較
し、一致したときのみそのデータをメモリに書込むよう
にしたことを特徴とするメモリの書込み保護方法。(1) When the CPU writes data to memory, the same write command is programmed twice in a row in advance in the program executed by the CPU, and the data to be written by the first command is externally written. The feature is that the data is once held in the circuit, and the second instruction compares the once held data with the data to be written in the external circuit, and only when they match, the data is written to the memory. How to write protect memory.
て、書込まれるべきデータをいったん保持するDフリッ
プフロップと、 このDフリップフロップの出力と書込まれるべきデータ
とを比較して一致したときのみメモリへ書込み信号を発
するコンパレータとを備えたことを特徴とするメモリの
書込み保護回路。(2) When the CPU inputs the write signal to be issued to the memory and the D flip-flop temporarily holds the data to be written, and when the output of this D flip-flop and the data to be written are compared and match. A write protection circuit for a memory, comprising: a comparator that issues a write signal to the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP16327484A JPS6140652A (en) | 1984-08-01 | 1984-08-01 | Method and circuit for write protection of memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP16327484A JPS6140652A (en) | 1984-08-01 | 1984-08-01 | Method and circuit for write protection of memory |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6140652A true JPS6140652A (en) | 1986-02-26 |
Family
ID=15770691
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP16327484A Pending JPS6140652A (en) | 1984-08-01 | 1984-08-01 | Method and circuit for write protection of memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6140652A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5610574A (en) * | 1995-02-17 | 1997-03-11 | Honda Giken Kogyo Kabushiki Kaisha | Data processing apparatus for vehicle |
DE10319585B4 (en) * | 2002-04-29 | 2005-08-04 | Samsung Electronics Co., Ltd., Suwon | Tamper-evident data processing system and associated method for manipulation protection |
JP2008077571A (en) * | 2006-09-25 | 2008-04-03 | Pioneer Electronic Corp | Nonvolatile memory controller, nonvolatile memory control method, nonvolatile memory control program and recording medium |
-
1984
- 1984-08-01 JP JP16327484A patent/JPS6140652A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5610574A (en) * | 1995-02-17 | 1997-03-11 | Honda Giken Kogyo Kabushiki Kaisha | Data processing apparatus for vehicle |
DE10319585B4 (en) * | 2002-04-29 | 2005-08-04 | Samsung Electronics Co., Ltd., Suwon | Tamper-evident data processing system and associated method for manipulation protection |
US6965977B2 (en) | 2002-04-29 | 2005-11-15 | Samsung Electronics Co., Ltd. | Tamper-resistant method and data processing system using the same |
JP2008077571A (en) * | 2006-09-25 | 2008-04-03 | Pioneer Electronic Corp | Nonvolatile memory controller, nonvolatile memory control method, nonvolatile memory control program and recording medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS62214599A (en) | Semiconductor memory device | |
JPS6140652A (en) | Method and circuit for write protection of memory | |
JPH0227596A (en) | Semiconductor memory | |
JPS58211254A (en) | Accumulated program controlling system | |
JPS595496A (en) | Memory protect system | |
JPS62286143A (en) | Semiconductor memory device | |
JPH01123342A (en) | Writing protecting circuit for memory | |
JPH0325230Y2 (en) | ||
JPS6226738B2 (en) | ||
JPH0695975A (en) | Ram accessing circuit | |
JPS6280744A (en) | Control circuit for ram | |
JPH0332823B2 (en) | ||
JPH064469A (en) | Input/output device control system | |
JPS6195464A (en) | Data protecting system | |
JPH01116854A (en) | Memory read error preventing system | |
JPS62184554A (en) | Memory protection circuit | |
JPH0269844A (en) | System for switching page of memory | |
JPS5914316A (en) | Protecting controller | |
JPS6125260A (en) | Double storage processing system using incorporated program | |
JPS63144496A (en) | Write control system for storage device | |
JPH0336650A (en) | Memory protecting system | |
JPH0480860A (en) | Program loading system | |
JPS63282532A (en) | Memory control system | |
JPS60218146A (en) | Storage device address control system | |
JPS63111548A (en) | Address comparator |