JPS63163943A - Control method for writing into memory - Google Patents

Control method for writing into memory

Info

Publication number
JPS63163943A
JPS63163943A JP61313305A JP31330586A JPS63163943A JP S63163943 A JPS63163943 A JP S63163943A JP 61313305 A JP61313305 A JP 61313305A JP 31330586 A JP31330586 A JP 31330586A JP S63163943 A JPS63163943 A JP S63163943A
Authority
JP
Japan
Prior art keywords
memory
write
code
data
signal
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
JP61313305A
Other languages
Japanese (ja)
Inventor
Masumi Kinokuniya
紀伊国屋 真澄
Takeo Mogami
最上 丈夫
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.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP61313305A priority Critical patent/JPS63163943A/en
Publication of JPS63163943A publication Critical patent/JPS63163943A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To prevent errorneous data from being written into a memory by generating a prescribed write permission code every time before a writing access to the memory, comparing it with a decision code which has been stored, and prohibiting the writing of data if they disagree. CONSTITUTION:The write permission code is outputted from the output port 5 of a CPU1 just before the writing into the memory 3 starts, and a latch circuit 6 is set to hold the output as parallel data through a shift register 4. The code which has been latched and the initial code 8 which has previously been stored are compared in a digital comparator 7. The compared signals 7a are inputted to an AND circuit 9 and an illegal access detection circuit 11, and an address AD from the CPU1 is read in a decoder 10 and area signals beta are outputted to the circuit 9 and the circuit 11. If the signals 7a show disagreement, the circuit 11 outputs an interruption signal INT to the CPU1, and prohibits the writing of data.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、中央処理装置(CPU)とメモリとから構
成されるマイクロコンピュータシステムに係り、特にC
PUから送出されるデータのメモリへの+rs j!J
き込みを防止するメモリ書き込み制御方法に関するもの
である。
Detailed Description of the Invention (Field of Industrial Application) The present invention relates to a microcomputer system comprising a central processing unit (CPU) and a memory, and particularly relates to a microcomputer system comprising a central processing unit (CPU) and a memory.
+rs j! of data sent from PU to memory. J
The present invention relates to a memory write control method that prevents writing.

(従来の技術) マイクロコンピュータシステムを構成するCPU、マイ
クロプロセッサ(MPU)が正常な処理を実行していた
場合に、何らかの外的な要因により入出力信号にノイズ
か発生すると、CPU。
(Prior Art) When a CPU or a microprocessor (MPU) constituting a microcomputer system is executing normal processing, when noise occurs in input/output signals due to some external factor, the CPU.

MPUが暴走して本来処理すべきブロクラムを実行せず
に、他のプログラムを実行して、メモリに構築された重
要なデータが消失し、誤ったデータか書き込まれてしま
う状態か発生ずる場合かある。このため、暴走直前にメ
モリ上に記憶された重要なデータの消失を防止、保護す
る何らかの手段を講するのが通例である。
Is there a situation where the MPU goes out of control and executes other programs instead of executing the blocks that should be processed, resulting in important data built in memory being lost or incorrect data being written? be. For this reason, it is customary to take some measure to prevent and protect important data stored in the memory immediately before the runaway from being lost.

例えば、MPUの暴走を検出すべくウオッチドックタイ
マ等の検出手段を設け、これらの検出手段か暴走を検出
したときはMPUをリセットして、メモリへのかかる誤
書き込みを防止するように制御するか、あるいは、いわ
ゆるメモリ管理、すなわち書き込みを行うアドレス範囲
をソフトウェアて指定し、指定されたアドレス範囲外の
アクセスであるときには書き込みを実行しないように制
御していた。
For example, a detection means such as a watchdog timer is provided to detect runaway of the MPU, and when these detection means detect runaway, the MPU is reset to prevent such erroneous writing to memory. Alternatively, so-called memory management, ie, the address range for writing is specified by software, and the writing is controlled not to be executed when access is outside the specified address range.

(発明か解決しようとする問題点) ところが、前者においては、ウオッチドックタイマ等の
検出手段か暴走を検知してから、MPUにリセットをか
けるまでに多少の時間を要するのて、検知するまでの間
にMPUか誤ったデータをメモリに書き込んでしまい、
重要なデータか消失してしまう危険性か高いという問題
点かあった。
(Problem to be solved by the invention) However, in the former case, it takes some time to reset the MPU after the detection means such as a watchdog timer detects the runaway. In the meantime, MPU or wrong data was written to memory,
The problem was that there was a high risk of losing important data.

また、後者においては、書き込みアドレス範囲を規定す
る少なくとも2個以上のレジスタを必要とするとともに
、指定されたアドレスの範囲にあるのか否かを判定する
ための判断手段となる、2個以上の比較器を必要とする
ことになり、小型のマイクロコンピュータシステムのハ
ード構成が複雑になるとともに、回路自体が大がかりな
ものとなってしまう問題点かあった。
In addition, the latter requires at least two or more registers that define the write address range, as well as two or more comparisons that serve as a means of determining whether or not the address is within the specified address range. The problem was that the hardware configuration of the small microcomputer system became complicated, and the circuit itself became large-scale.

この発明は、上記の問題点を解消するためになされたも
ので、マイクロコンピュータのメモリへのデータ書き込
み直前にデータ書き込みを許可する許可コードデータを
発生させ、あらかじめ書き込まれている判定コードとの
一致状態に基づいてメモリへのデータ書き込みを制御す
ることにより、マイクロコンピュータの暴走による、誤
データのメモリ書き込みを未然に防止できるとともに、
マイクロコンピュータが暴走を検知して自己復帰できる
メモリ書き込み制御方法を提供することを目的とする。
This invention was made in order to solve the above problems. Immediately before data is written to the memory of a microcomputer, permission code data is generated to permit data writing, and the permission code data is generated to match a judgment code written in advance. By controlling data writing to memory based on the state, it is possible to prevent incorrect data from being written to memory due to a runaway microcomputer, and
The purpose of the present invention is to provide a memory write control method that allows a microcomputer to detect runaway and self-recovery.

(問題点を解決するための手段) この発明に係るメモリ書き込み制御方法は、マイクロコ
ンピュータか一定のプログラム実行中に、メモリへの書
き込みアクセス直前毎に、所定の書き込み許可コードを
発生させるコード発生処理と、このコード発生処理によ
り発生した書き込み許可コードとあうかしめ記憶された
判定コードとを比較照合してメモリへのデータ書き込み
要求の真偽性を判定する書き込み判定処理と、この書き
込み判定処理の結果、書き込み許可コードと判定コード
とが不一致の場合に、マイクロコンピュータにメモリへ
のデータ書き込み禁止を割り込み報知する信号報知処理
とからなっている。
(Means for Solving the Problems) A memory write control method according to the present invention is a code generation process that generates a predetermined write permission code every time a write access to memory is made while a microcomputer is executing a certain program. and a write determination process that compares the write permission code generated by this code generation process with a caulked and stored determination code to determine the authenticity of the data write request to the memory, and the result of this write determination process. , a signal notification process that interrupts and notifies the microcomputer that data writing to the memory is prohibited when the write permission code and the determination code do not match.

また、この発明の他の発明に係るメモリ書き込み制御方
法は、マイクロコンピュータか一定のプログラム実行中
に、メモリへの各書き込みアクセス開始直前に、所定の
書き込み許可コードを発生させるコード発生処理と、こ
のコード発生処理により発生した書き込み許可コードと
あらかしめ記憶された判定コードとを比較照合する信号
照合処理と、この信号照合処理に並行して、入力される
アドレス信号を解析して分割されたメモリの各特定のメ
モリ空間の書き込み領域を判定する領域判定処理と、こ
の領域判定処理により得られる領域アドレス信号と信号
照合処理により得られる照合状態信号およびプロテクト
スイッチの設定状態信号を参照しながらメモリの各特定
のメモリ空間へのデータ書き込み要求の真偽性を判定す
る書き込み判定処理と、この書き込み判定処理の結果に
基づいてマイクロコンピュータにメモリへのデータ書き
込み禁止を割り込み報知し、マイクロコンピュータのプ
ログラム実行をリセットさせるリセット処理とからなっ
ている。
Further, a memory write control method according to another aspect of the present invention includes a code generation process of generating a predetermined write permission code immediately before starting each write access to the memory while a microcomputer is executing a certain program; A signal matching process compares and matches the write permission code generated by the code generation process with the preliminarily stored judgment code, and in parallel with this signal matching process, the input address signal is analyzed and the divided memory is The area determination process determines the write area of each specific memory space, and each area of the memory is Write judgment processing that determines the authenticity of a data write request to a specific memory space, and an interrupt notification to the microcomputer that data writing to memory is prohibited based on the result of this write judgment processing, and the program execution of the microcomputer is executed. It consists of a reset process.

(作用) この発明におけるメモリ書き込み制御方法においては、
マイクロコンピュータが一定のプログラム実行中に、メ
モリへの各書き込み一アクセス開始直前に、所定の書き
込み許可コードを発生させるコード発生処理を実行し、
このコード発生処理により発生した書き込み許可コード
とあらかじめ記憶された判定コードとを比較照合して、
メモリへのデータ書き込み許可の真偽性を判定し、書き
込み許可コードと判定コードとが不一致の場合に、メモ
リへのデータ書き込みを禁止する割込み信号をマイクロ
コンピュータに報知する。
(Operation) In the memory write control method of the present invention,
While the microcomputer is executing a certain program, a code generation process is executed to generate a predetermined write permission code immediately before the start of each write access to the memory;
The write permission code generated by this code generation process is compared with the pre-stored judgment code,
The authenticity of permission to write data to the memory is determined, and if the write permission code and the determination code do not match, an interrupt signal for prohibiting data writing to the memory is notified to the microcomputer.

また、この発明の他の発明におけるメモリ書き込み制御
方法においては、マイクロコンピュータか一定のプログ
ラム実行中に、メモリへの各書き込みアクセス開始直前
に、所定の書き込み許可コードを発生させるコード発生
処理を実行し、このコード発生処理により発生した書き
込み許可コードとあらかじめ記憶された判定コードとを
比較照合し、この信号照合処理に並行して、入力される
アドレス信号を解析して分割されたメモリの各特定のメ
モリ空間の書き込み領域を判定する領域判定処理を行い
、この領域判定処理により得られる領域アドレス信号と
信号照合処理により得られる照合状態信号およびプロテ
クトスイッチの設定状態信号に基づいてメモリの各特定
のメモリ空間へのデータ書き込み許可の真偽性を判定し
、この真偽性に基づいてマイクロコンピュータに割り込
みを報知し、マイクロコンピュータのプログラム実行を
リセットさせる。
Further, in the memory write control method according to another aspect of the present invention, a code generation process is executed to generate a predetermined write permission code immediately before each write access to the memory is started while the microcomputer is executing a certain program. , the write permission code generated by this code generation process is compared and verified with a pre-stored judgment code, and in parallel with this signal verification process, the input address signal is analyzed and each specific address signal of the divided memory is An area determination process is performed to determine the writing area of the memory space, and each specific memory of the memory is The authenticity of permission to write data into the space is determined, and based on the authenticity, an interrupt is notified to the microcomputer to reset the program execution of the microcomputer.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すメモリ書き込み制御
方法のハード構成を説明するブロック図てあり、lはC
PUで、所定の書き込み許可コード(一定でOでない)
をメモリ3への各書き込みアクセス開始直前に発生させ
、出力ボート5に出力する。またCPUIは演算処理さ
れたデータをパスライン2を介してメモリ3に書き込む
とともに、既に書き込まれたデータを読み出す。CPU
1は図示しない外部機器とインタフェースを介してvi
続され、ROM等の記憶素子に格納された一定のプログ
ラムを実行する。4はシフトレジスタで、出力ボート5
を介して出力される、例えば8ビツトのシリアルデータ
な順次シフトして、8ビツトのパラレルデータな保持す
る。6はラッチ回路で、シフトレジスタ4に保持された
8ビツトのパラレルデータをクロック端子Cにに入力さ
れるクロック信号に同期して読み出してう・ンチする。
FIG. 1 is a block diagram illustrating the hardware configuration of a memory write control method showing an embodiment of the present invention, where l is C
In PU, predetermined write permission code (fixed and not O)
is generated immediately before the start of each write access to the memory 3 and output to the output port 5. Further, the CPU writes the processed data to the memory 3 via the pass line 2, and reads the already written data. CPU
1 is connected to vi via an interface with an external device (not shown).
The computer is connected to the computer and executes a certain program stored in a storage device such as a ROM. 4 is a shift register, output port 5
For example, 8-bit serial data output via the 8-bit serial data is sequentially shifted and 8-bit parallel data is held. A latch circuit 6 reads out the 8-bit parallel data held in the shift register 4 in synchronization with a clock signal input to a clock terminal C.

7はディジタルコンパレータで、ラッチ回路6にラッチ
された所定の書き込み許可コードと初期コード8との全
ビットを一度に比較照合し、両コードが一致した場合は
一定レベルの信号7aを次にラッチされるまでAND回
路9の一方端に出力する。なお、初期コード8は所定の
書き込み許可コードと一致するようにあらかじめ設定さ
れるているもので、ノイズ等の外的′#響か発生しない
限り、両コードが一致するように構成されている。
7 is a digital comparator that compares all bits of the predetermined write permission code latched in the latch circuit 6 and the initial code 8 at once, and when both codes match, a signal 7a of a certain level is latched next. The signal is output to one end of the AND circuit 9 until the signal is reached. Note that the initial code 8 is set in advance to match a predetermined write permission code, and the two codes are configured to match unless an external noise such as noise occurs.

10はアドレス領域デコーダで、CPU lから出力さ
れるアドレスADを解読して、メモリ3の領域を指定す
る領域信号βをアント回路9の他方端に出力するととも
に、イリーガルアクセス検出回路11に領域信号βを出
力する。イリーガルアクセス検出回路11にはディジタ
ルコンパレータ7から出力される信号7aが入力され、
信号7aがLO状態、すなわち初期コード8と書き込み
許可コードとが不一致の場合(ノイズ発生状態)、CP
U 1にその旨を報知するための割り込み信号INTを
CPUIの−13つ込みボートに出力する。
Reference numeral 10 denotes an address area decoder which decodes the address AD output from the CPU l, outputs an area signal β specifying an area of the memory 3 to the other end of the ant circuit 9, and also outputs an area signal β to the illegal access detection circuit 11. Output β. A signal 7a output from the digital comparator 7 is input to the illegal access detection circuit 11,
When the signal 7a is in the LO state, that is, the initial code 8 and the write permission code do not match (noise generation state), the CP
An interrupt signal INT for notifying U1 of this is output to the -13 interrupt port of the CPUI.

次に動作について説明する。Next, the operation will be explained.

CPU 1か一定のプログラム実行中に、メモリ3への
各書き込みアクセス開始を行う場合には、後述するフロ
ーチャートに従って書き込み許可コードを発生させる。
When starting each write access to the memory 3 while the CPU 1 is executing a certain program, a write permission code is generated according to a flowchart described later.

発生されたシリアルな許可コードは出力ボート5を介し
てシフトレジスタ4に出力され、ラッチ回路6にパラレ
ルなデータとしてう・ンチされる。このとき、ディジタ
ルコンパレータ7はラッチ回路6にラッチされた書き込
み詐りコードを一ヒ位または下位ビットと判定コードと
なる初期コード8の各ヒツトデータと比較照合し、両コ
ードデータか全て一致した場合には、アンド回路9にH
Iレベル(書き込み許可)の信号7aを出力する。この
動作に並行して、CPUIはアドレス領域デコーダ10
にアドレスADを出力しているため、アドレス領域デコ
ーダ10からはアドレスADを解析した領域信号βをア
ンド回路9の他方端に出力するとともに、イリーガルア
クセス検出回路11に領域信号βを出力する。このため
、アンド回路9が成立し、メモリ3を選択する信号をメ
モリ3のチップセレク1〜端子C8に出力する。次いて
、CPU1から出力される書き込み信!7WRに同期し
てハスライン2からデータをメモリ3の所定の領域に書
き込む。
The generated serial permission code is output to the shift register 4 via the output port 5, and is then latched into the latch circuit 6 as parallel data. At this time, the digital comparator 7 compares the write fraud code latched in the latch circuit 6 with each hit data of the first or lower bit and the initial code 8 which is the judgment code, and if both code data match, is H to the AND circuit 9.
A signal 7a of I level (write permission) is output. In parallel with this operation, the CPUI uses the address area decoder 10
Since address AD is outputted to address AD, address area decoder 10 outputs area signal β obtained by analyzing address AD to the other end of AND circuit 9, and also outputs area signal β to illegal access detection circuit 11. Therefore, the AND circuit 9 is established and a signal for selecting the memory 3 is output to the chip select 1 to terminal C8 of the memory 3. Next, the write signal output from CPU1! Data is written from the lotus line 2 to a predetermined area of the memory 3 in synchronization with 7WR.

一方、ディジタルコンパレータ7の比較照合の結果、両
コードデータが不一致の場合には、アント回路9にLO
レベル(書き込み禁出)の信号7aを出力する。これに
従っ、て、イリーガルアクセス検出回路11から、CP
U1に対してコードデータの不一致を報知する割り込み
信号INTをCPUIに出力する。
On the other hand, as a result of the comparison by the digital comparator 7, if the two code data do not match, the ant circuit 9 receives the LO
A level (write prohibited) signal 7a is output. Accordingly, from the illegal access detection circuit 11, the CP
An interrupt signal INT notifying U1 of the mismatch of code data is output to the CPUI.

次に第2図を参照しながらこの発明によるメモリへのデ
ータ書き込み制御動作について説明する。
Next, the data write control operation to the memory according to the present invention will be explained with reference to FIG.

第2図はこの発明の一実施例を示すメモリ書き込み制御
動作手順を説明するフローチャートである。なお、5T
(1)〜5T(11)は各ステップを示す。
FIG. 2 is a flowchart illustrating a memory write control operation procedure showing an embodiment of the present invention. In addition, 5T
(1) to 5T(11) indicate each step.

CPUIはデータ書き込み要求がなされているかどうか
を判断しくステップ5T(1) ) 、 Noならば他
の処理を実行しくステップ5T(2) ) 、 YES
ならば、所定の書き込み許可コードを発生させ(ステッ
プ5T(3) ) 、出力ボート5よりシフトレジスタ
4にシリアルな書き込み許可コードデータを転送する(
ステップ5T(4) )。次いで、転送されたシリアル
な書き込み許可コードデータをラッチしくステップ5T
(5) ) 、ラッチされたら、ディジタルコンパレー
タ7かラッチ回路6にラッチされている書き込み許可コ
ードデータと初期コード8の各ビットか全て一致するか
どうか、すなわちデータ書き込み許可の真偽性を判断し
くステップ5T(6) ) 、 YESならばCPUI
からメモリ3の、舛き込みアドレス領域を示す領域信号
βと信号7aとのアンド処理を実行しくステップ5T(
7) )、メモリ3を選択する選択指令9aをメモリ3
のチ・ンブセレクト端子C8に出力する(ステップ5T
(8))。次いで、CPUIから出力される書き込み信
号WRに同期してメモリ3にパスライン2を介して所定
のデータか書き込まれ(ステップ5T(9) ) 、制
御を終了する。
The CPU determines whether a data write request has been made (step 5T(1)), and if no, executes other processing (step 5T(2)), YES.
If so, a predetermined write permission code is generated (step 5T(3)), and serial write permission code data is transferred from the output port 5 to the shift register 4 (
Step 5T(4)). Next, the transferred serial write permission code data is latched in step 5T.
(5)) Once latched, it is necessary to judge whether the write permission code data latched in the digital comparator 7 or the latch circuit 6 and each bit of the initial code 8 all match, that is, the authenticity of the data write permission. Step 5T (6) ), if YES, CPU
Then, in step 5T (
7) ), send selection command 9a to select memory 3 to memory 3.
(Step 5T)
(8)). Next, predetermined data is written into the memory 3 via the pass line 2 in synchronization with the write signal WR output from the CPUI (step 5T(9)), and the control is ended.

一方、ステップ5T(6)の判断て、NOの場合、すな
わちCPUIか暴走したとイリーガルアクセス検出回路
11か判定しくステップ5T(10))、CPU 1に
その旨を報知するため、CPU lに割り込み信号IN
Tを出力し、CPUIのプロクラム実行を中断させ(ス
テップ5T(II)) 、制御を終了する。なお、ステ
ップ5T(6)からステップ゛5T(8)はハード処理
を行ってもよい。
On the other hand, if the determination in step 5T(6) is NO, that is, the illegal access detection circuit 11 determines that the CPU has gone out of control.In step 5T(10)), the CPU 1 is interrupted in order to notify the CPU 1 of this fact. Signal IN
T is output to interrupt the CPU program execution (step 5T(II)), and the control is terminated. Note that steps 5T(6) to 5T(8) may be performed by hardware.

次に第3図〜第5図を参照しながら他の発明によるメモ
リ書き込み制御処理について説明する。
Next, memory write control processing according to another invention will be described with reference to FIGS. 3 to 5.

第3図は第1図に示したメモリ3のメモリ空間を説明す
る模式図であり、E、は通常データ領域で、アドレス領
域デコーダ10から領域信号γにより規定される。E2
はa塁データ領域で、アドレス領域デコーダ10から領
域信号βにより規定される。E:lはユーザデータ領域
で、領域信号αにより規定される。
FIG. 3 is a schematic diagram illustrating the memory space of the memory 3 shown in FIG. 1, where E is a normal data area defined by the area signal γ from the address area decoder 10. E2
is the a-base data area, which is defined by the area signal β from the address area decoder 10. E:l is a user data area defined by an area signal α.

この図かられかるように、メモリ3のメモリ空間か、例
えば3つの領域に分割された状態を示してあり、各領域
毎に重要度に比例したデータか格納されることになる。
As can be seen from this figure, the memory space of the memory 3 is divided into, for example, three areas, and each area stores data proportional to its importance.

第4図は他の発明の一実施例を説明するメモリー)き込
み制御方法のハード構成を説明するブロック図であり、
第1図と同一のものには回じ符号を付しである。
FIG. 4 is a block diagram illustrating the hardware configuration of a memory writing control method illustrating an embodiment of another invention;
Components that are the same as those in FIG. 1 are designated by reference numbers.

この図において、21はプロテクトスイッチで、このプ
ロテクトスイッチ21がオンされ、かつCPU lから
領域信号αが出力され、さらに書き込み許可コードと初
期コード8が一致した場合のみ、メモリ3のユーザデー
タ領域E3にデータ書き込み可俺状態に設定できる。2
2はアンド回路で、ディジタルコンパレータ7の信号7
a、領域信号α、プロテクトスイッチ21がオンの場合
にオア回路24にメモリ3を選択する選択指令24aを
メモリ3のチップセレクト端子C8に出力する。23は
アンド回路て、ディジタルコンパレータ7の信号7a、
領域信号αとのアンド処理を実行し、メモリ3の機器デ
ータ領域E2にデータを書き込み回部状態に設定できる
In this figure, 21 is a protect switch, and only when this protect switch 21 is turned on, the area signal α is output from the CPU 1, and the write permission code and the initial code 8 match, the user data area E3 of the memory 3 is Data can be written to the state. 2
2 is an AND circuit, which outputs the signal 7 of the digital comparator 7.
When the area signal α and the protect switch 21 are on, a selection command 24a for selecting the memory 3 is output to the chip select terminal C8 of the memory 3 to the OR circuit 24. 23 is an AND circuit which outputs the signal 7a of the digital comparator 7;
By performing AND processing with the area signal α, it is possible to write data into the device data area E2 of the memory 3 and set it in the circuit state.

次に動作について説明する。Next, the operation will be explained.

まず、CPUIから出力されるアドレスADがアドレス
領域デコーダ10に出力されると、そのアドレスADを
解析する。その結果、通常データ領域E、を示す領域信
号γか出力されると、無条件に領域信号γがオア回路2
4からHlレベルのパルス出力がメモリ3のチップセレ
クト端子C8に人力される。このため、メモリ3か選択
され、CPUIからの書き込み信号WRに同期して、パ
スライン2上のデータがメモリ3の通常データ領域E、
に書き込まれる。このように、通常データ領域E1は何
らCPU1の異常性を判断することなく、常にデータが
書き込まれる。
First, when the address AD output from the CPUI is output to the address area decoder 10, the address AD is analyzed. As a result, when the area signal γ indicating the normal data area E is output, the area signal γ is unconditionally transmitted to the OR circuit 2.
4 to H1 level pulse output is manually inputted to the chip select terminal C8 of the memory 3. Therefore, the memory 3 is selected, and in synchronization with the write signal WR from the CPUI, the data on the pass line 2 is transferred to the normal data area E of the memory 3.
will be written to. In this way, data is always written to the normal data area E1 without any determination of the abnormality of the CPU 1.

一方、CPUIから出力されるアドレスADがアドレス
領域デコーダIOに出力され、そのアドレスADの解析
の結果、機器データ領域E2を示す領域信号βかアンド
回路23に出力された場合には、CPUIは、例えばシ
リアルな8ビウトの書き込み許可コードを発生させ、出
力ボート5より1ビツトずつシフトレジスタ4に転送す
る。シフトレジスタ4は転送されてくるシリアルなJF
き込み許可信号を1ビツトずつシフトしなからパラレル
な書き込み許可コードを保持し、CPU1が書き込み許
可コードの送出を終了した段階で出力されるクロックに
同期してシフトレジスタ4に保持されている書き込み許
可コードをラッチ回路6かラッチする。このラッチ動作
が終了すると、ディジタルコンパレータ7が初期コード
8とラッチ回路6にラッチされた書き込み許可コードを
同時並列比較し、全ビットか一致した場合にはCPU1
は非暴走状態である旨を示す信号7a(Hlレベル)を
アンド回路23に出力するため、アンド回路23が成立
し、オア回路24がHIレベルとなってメモリ3を選択
する選択指令をチップセレクト端子CSに入力される。
On the other hand, if the address AD output from the CPUI is output to the address area decoder IO, and as a result of the analysis of the address AD, the area signal β indicating the device data area E2 is output to the AND circuit 23, the CPU For example, a serial 8-bit write permission code is generated and transferred from the output port 5 to the shift register 4 bit by bit. Shift register 4 is the serial JF that is transferred.
The write permission signal is shifted bit by bit and the parallel write permission code is held, and the write data held in the shift register 4 is synchronized with the clock output when the CPU 1 finishes sending the write permission code. The permission code is latched by the latch circuit 6. When this latch operation is completed, the digital comparator 7 compares the initial code 8 and the write permission code latched in the latch circuit 6 simultaneously in parallel, and if all bits match, the CPU 1
outputs a signal 7a (Hl level) indicating that it is in a non-runaway state to the AND circuit 23, so the AND circuit 23 is established, the OR circuit 24 becomes HI level, and the selection command to select the memory 3 is issued as a chip select. It is input to terminal CS.

このため、メモリ3が選択され、CPU1からの書き込
み信号WRに同期して、ハスライン2上のデータ(a器
として使用するffi要なデータ)がメモリ3の通常機
器データ領域E2に書き込まれる。
Therefore, the memory 3 is selected, and the data on the lotus line 2 (data necessary for the ffi used as the A device) is written into the normal equipment data area E2 of the memory 3 in synchronization with the write signal WR from the CPU 1.

しかしながら、ディジタルコンパレータ7か初期コード
8とラッチ回路6にラッチされた書き込み許可コードを
比較照合した場合に、1ビツトても不一致となった場合
には、CPUIが暴走したものとみなし、データの書き
込みを禁止する旨の信号7a  (LOレベル)をアン
ド回路23に出力する。このため、アドレス領域デコー
ダ10から機器データ領域E2を示す領域信号βか出力
されても、アンド回路23が成立せずメモリ3を選択す
る選択指令24aはチップセレクト端子C8に出力され
ず、パスライン2上のデータはメモリ3の機器データ領
域E2への書き込みが阻止され、重要な機器データの改
変を防lヒできる。なお、このとき、イリーガルアクセ
ス検出回路11にはアドレス領域デコーダlOより領域
信号βが出力されるとともに、データの書き込みを禁W
する旨の信号7a  (LOレベル)が出力されている
ので、この両者の信号状態からCPUIにCPUIの暴
走状態を報知する割り込み信号INTをCPUIの割り
込みボートに出力するので、即座にプログラム実行を中
断し、CPUIを再初期化する所定の割り込み処理を実
行させ、正常状態に自己復帰させる。
However, if the digital comparator 7 or the initial code 8 and the write permission code latched in the latch circuit 6 are compared and matched, and even 1 bit does not match, it is assumed that the CPU has gone out of control and the data is not written. A signal 7a (LO level) is output to the AND circuit 23 to indicate that this is prohibited. Therefore, even if the address area decoder 10 outputs the area signal β indicating the device data area E2, the AND circuit 23 is not established and the selection command 24a for selecting the memory 3 is not output to the chip select terminal C8, and the pass line The data on the device data area E2 of the memory 3 is prevented from being written to the device data area E2, and alteration of important device data can be prevented. At this time, the address area decoder lO outputs the area signal β to the illegal access detection circuit 11, and the data write is prohibited W.
Since the signal 7a (LO level) indicating that the CPU is running is output, the interrupt signal INT, which notifies the CPU of the runaway state of the CPU, is output to the CPU interrupt port based on the state of both signals, so the program execution is immediately interrupted. Then, a predetermined interrupt process is executed to reinitialize the CPUI, and the CPU self-returns to a normal state.

さらに、CPUIから出力されるアドレスADかアドレ
ス領域デコーダ10に出力され、そのアドレスADの解
析の結果、ユーザデータ領域E3を示す領域信号αがア
ント回路22に出力された場合には、CPUIは、例え
ばシリアルな8ビツトの書き込み許可コードを発生させ
、出力ボート5より1ビツトずつシフトレジスタ4に転
送する。シフトレジスタ4は転送されてくるシリアルな
書き込み許可信号を1ビツトずつシフトしながらパラレ
ルな書き込み許可コードを保持し、CPU1か書き込み
許可コードの送出を終了した段階で出力されるクロック
に同期してシフトレジスタ4に保持されている書き込み
許可コードをラッチ回路6かラッチする。このラッチ動
作が終了すると、ディジタルコンパレータ7が初期コー
ド8とラッチ回路6にラッチされた書き込み許可コード
を比較照合し、全ビットが一致した場合にはCPU1は
非暴走状態である旨を示す出カフa(HIレベル)をア
ンド回路23に出力し、さらにプロテクトスイッチ21
がオン状態を示すHIレベルの電位かアンド回路22に
出力されている場合に限り(CPUIが正常状態)アン
ド回路22か成立し、オア回路24かHlレベルとなっ
てメモリ3を選択する選択指令24aかチップセレクト
端子C8に入力される。このため、メモリ3か選択され
、CPUIからの書き込み信号WRに同期して、ハスラ
イン2上のデータ(ユーザの使用する屯要なデータ)が
メモリ3のユーザデータ領域E3にμき込まれる。
Furthermore, if the address AD output from the CPUI is output to the address area decoder 10, and as a result of analysis of the address AD, an area signal α indicating the user data area E3 is output to the ant circuit 22, the CPU For example, a serial 8-bit write permission code is generated and transferred from the output port 5 to the shift register 4 bit by bit. The shift register 4 holds the parallel write permission code while shifting the transferred serial write permission signal one bit at a time, and shifts it in synchronization with the clock output from the CPU 1 when it finishes sending the write permission code. The write permission code held in the register 4 is latched by the latch circuit 6. When this latch operation is completed, the digital comparator 7 compares the initial code 8 with the write permission code latched in the latch circuit 6, and if all bits match, outputs an output signal indicating that the CPU 1 is in a non-runaway state. a (HI level) is output to the AND circuit 23, and the protect switch 21
Only when a HI level potential indicating an ON state is output to the AND circuit 22 (the CPU is in a normal state), the AND circuit 22 is established, the OR circuit 24 becomes HI level, and a selection command is issued to select the memory 3. 24a is input to the chip select terminal C8. Therefore, the memory 3 is selected, and the data on the lotus line 2 (the most important data used by the user) is written into the user data area E3 of the memory 3 in synchronization with the write signal WR from the CPUI.

しかしなから、ディジタルコンパレータ7か初期コード
8とう・ソチ回路6にラッチされた潟き込み許可コード
を比較照合した場合に、Lビットでも不一致となった場
合には、CPU1が暴走したものとみなし、データの書
き込みを禁止する旨の信号7a  (LOレベル)をア
ンド回路22に出力する。このため、アドレス領域デコ
ーダlOからユーザデータ領域E3を示す領域信号αか
出力されても、アンド回路22は成立せず、メモリ3を
選択する選択指令24aはチップセレクト端子C8に出
力されないし、また、ディジタルコンパレータ7か初期
コード8とラッチ回路6にラッチされた書き込み許可コ
ードを比較照合し、全ビットか一致した場合てあっても
、プロテクトスイッチ21がオフ状態であった場合には
、アンド回路22は成立せず、メモリ3を選択する選択
指令24aはチップセレクト端子C8に出力されない。
However, if the lag permission code latched in the digital comparator 7 or the initial code 8 and the Sochi circuit 6 is compared and matched, and even the L bit does not match, it is assumed that the CPU 1 has gone out of control. , outputs a signal 7a (LO level) to the AND circuit 22 indicating that writing of data is prohibited. Therefore, even if the area signal α indicating the user data area E3 is output from the address area decoder lO, the AND circuit 22 is not established, and the selection command 24a for selecting the memory 3 is not output to the chip select terminal C8. , the digital comparator 7 or the initial code 8 and the write permission code latched in the latch circuit 6 are compared and verified, and even if all bits match, if the protect switch 21 is in the off state, the AND circuit 22 is not established, and the selection command 24a for selecting the memory 3 is not output to the chip select terminal C8.

従って、ハスライン2上のデータはメモリ3のユーザデ
ータ領域E3への書き込みが阻止され、屯黄な機器デー
タの改変を防止てきる。なお、このとき、イリーガルア
クセス検出回路11にはアドレス領域デコーダ10より
領域信号αが出力されるとともに、データのどき込みを
禁止する旨の信号7a  (LOレベル)か出力されて
いるのて、この両者の信号状態からCPU1にCPU1
の暴走状態を報知する割り込み信号INTをCPU l
の割り込みボートに出力するので、即座にプログラム実
行を中断し、CPU1を再初期化する所定の割り込み処
理を実行させ、正常状態に自己復帰させる。
Therefore, data on the lotus line 2 is prevented from being written to the user data area E3 of the memory 3, thereby preventing unnecessary alterations to the device data. At this time, the address area decoder 10 outputs the area signal α to the illegal access detection circuit 11, and also outputs a signal 7a (LO level) indicating that data loading is prohibited. CPU1 to CPU1 based on the signal status of both
The interrupt signal INT that notifies the runaway state of the CPU l
Therefore, the program execution is immediately interrupted, a predetermined interrupt process is executed to reinitialize the CPU 1, and the CPU 1 is returned to the normal state by itself.

なお、上記実施例ては、CPUIが割り込みボートにイ
リーガルアクセス検出回路11より割り込み信号INT
が入力された場合に、CPU lの暴走を阻止するエラ
ー回復処理を実行する場合について説明したが、人力ボ
ート12を介してイリーガルアクセス検出回路11より
出力される割り込み信号INTと直接CPU1に出力さ
れた割り込み信号INTとのアント条件が成立した場合
に限ってエラー回復処理を実行するように制御すれば、
信頼性を大幅に改善できる。
In the above embodiment, the CPUI receives the interrupt signal INT from the illegal access detection circuit 11 to the interrupt port.
We have described the case where error recovery processing is executed to prevent runaway of the CPU 1 when the CPU 1 is input. If the error recovery processing is controlled to be executed only when the ant condition with the interrupt signal INT is satisfied,
Reliability can be significantly improved.

次に第5図に示すフローチャートを参照しながら他の発
明によるメモリどき込み制御動作について説明する。
Next, a memory access control operation according to another invention will be described with reference to the flowchart shown in FIG.

第5図は他の発明の一実施例を示すメモリ書き込み制御
動作手順を説明するフローチャートである。なお、5T
(1)〜5T(18)は各ステップを示す。
FIG. 5 is a flowchart illustrating a memory write control operation procedure showing another embodiment of the invention. In addition, 5T
(1) to 5T(18) indicate each step.

まず、CPUIから出力されるアドレスADをアドレス
領域デコーダlOが解析しくステップ5T(1) ) 
、解析の結果出力された領域信号か領域信号αかどうか
を判定しくステップ5T(2) ) 、 N Oならば
、さらに解析の結果出力された領域信号が領域信号βか
どうかを判定しくステップ5T(3))、NOならばさ
らに解析の結果出力された領域信号を領域信号γと認定
しくステップ5T(4) ) 、メモリ3を選択する選
択指令24aをチップセレクト端子C8に出力する(ス
テップ5T(S) )。次いて、cpuiから出力され
る書き込み信号WRに同期して、パスライン2上の書き
込みデータをメモリ3の通常データ領域E1に書き込み
(ステップ5T(6) ) 、メモリアクセスを終了す
る。
First, the address area decoder IO analyzes the address AD output from the CPUI (step 5T(1)).
, to determine whether the area signal output as a result of the analysis is the area signal α (Step 5T(2)); If NO, further determine whether the area signal output as the result of the analysis is the area signal β (Step 5T) (3)), if NO, the area signal output as a result of further analysis is recognized as the area signal γ (step 5T (4)), and a selection command 24a for selecting the memory 3 is output to the chip select terminal C8 (step 5T). (S) ). Next, in synchronization with the write signal WR output from the CPUI, the write data on the pass line 2 is written into the normal data area E1 of the memory 3 (step 5T(6)), and the memory access is ended.

一方、ステップ5T(3)の判断で、YESの場合は、
ディジタルコンパレータ7が初期コード8とラッチ回路
6にラッチされた書き込み許可コードを比較照合し、全
ビットか一致したかどうかを判定しくステップ5T(7
) ) 、 Noならばステップ5T(lO)以降に進
み、YESの場合はメモリ3を選択する選択指令24a
をチップセレクト端子C8に出力する(ステップ5T(
8) )。次いで、CPUIから出力される書き込み信
号WRに同期して、パスライン2上の書き込みデータを
メモリ3の機器データ領域E2に書き込み(ステップ5
T(9) )、メモリアクセスを終Yする。
On the other hand, if the judgment in step 5T(3) is YES,
The digital comparator 7 compares the initial code 8 and the write permission code latched in the latch circuit 6, and determines whether all bits match. Step 5T (7)
)), if No, proceed to step 5T(lO) and onward; if YES, select memory 3. Selection command 24a
is output to the chip select terminal C8 (step 5T (
8) ). Next, the write data on the pass line 2 is written into the device data area E2 of the memory 3 in synchronization with the write signal WR output from the CPUI (step 5).
T(9)), terminates the memory access.

−・方、ステップ5T(7)の判断で、NOの場合は、
領域信号βがHlレベルて、かつディジタルコンパレー
タ7の信号7aがLOレベルになるのを待機しくステッ
プ5T(to)) 、領域信号βがIIlレベル、かつ
ディジタルコンバレータフの出力がLOレベルになった
時点で、割り込み信号INTをCPU 1の割り込みボ
ートに出力しくステップ5T(If)) 、 CP U
 lのプログラム実行を中断させ(ステップ5T(12
)) 、 CP U lを再初期化しくステップ5T(
13)) 、プログラムを再起動させる(ステップ5T
(14))。
- If the judgment in step 5T (7) is NO,
Step 5T(to)) waits until the area signal β reaches the Hl level and the signal 7a of the digital comparator 7 becomes the LO level (step 5T(to)). Then, the area signal β reaches the IIl level and the output of the digital comparator Tough reaches the LO level. At this point, output the interrupt signal INT to the interrupt port of CPU 1 (Step 5T (If)), CPU
1 program execution is interrupted (step 5T (12
)), reinitialize the CPU in step 5T (
13)), restart the program (step 5T)
(14)).

一方、ステップ5T(2)の判断で、YESの場合は、
ディジタルコンパレータ7か初期コード8とラッチ回路
6にう・ンチされた書き込、;5I許可コードを比較照
合し、全ビットが一致したかどうかを判定しくステップ
5T(Is)) 、 Noならばステップ5T(10)
に戻り、YESならばさらにプロテクトスイッチ21が
オン状態であるかどうかを判断しステップ5T(15)
、 Noならばステップ5T(10)に戻り。
On the other hand, if the judgment in step 5T(2) is YES,
Compare and check the digital comparator 7 or the initial code 8 and the write to the latch circuit 6; 5I permission code to determine whether all bits match (step 5T (Is)); if no, step 5T (10)
Returning to step 5T (15), if YES, it is further determined whether the protect switch 21 is in the on state.
, If No, return to step 5T (10).

YESならばメモリ3を選択する選択指令24aをチッ
プセレクト端子C8に出力する(ステップ5T(17)
)。次いで、CPUIから出力される書き込み信号WR
に同期して、パスライン2上の書き込みデータをメモリ
3のユーザデータ領域E:Iに書キ込み(ステップ5T
(18)) 、メモリアクセスを終了する。
If YES, a selection command 24a for selecting memory 3 is output to the chip select terminal C8 (step 5T (17)
). Next, the write signal WR output from the CPUI
The write data on the pass line 2 is written to the user data area E:I of the memory 3 in synchronization with the
(18)) Ends the memory access.

〔発明の効果〕〔Effect of the invention〕

以E説Ill L/たように、この発明によればマイク
ロコンピュータが一定のプログラム実行中に、メモリへ
の8き込みアクセス直前毎に、所定の書き込み許ti(
コードを発生させるコード発生処理と、このコード発生
処理により発生した書き込み許可コードとあらかじめ記
憶された判定コードとを比較照合してメモリへのデータ
書き込み要求の真偽性を判定する書き込み判定処理と、
この書き込み判定処理の結果、書き込み許可コードと判
定コードとが不一致の場合に、マイクロコンピュータに
メモリへのデータ書き込み禁止を割り込み報知、する信
号報知処理とからなっているので、あらかしめ設定され
たメモリ上の特定の空間へのデータ書き込み開始時に、
そのデータ書き込みが有効であるかどうかが真偽された
後、CPUが本来のデータを書き込むため、CPUが暴
走して、その暴走を検知するまてに実行される誤データ
のメモリへの書き込みを未然に防止でき、メモリ上のデ
ータの改変を阻止できる。
According to the present invention, while a microcomputer is executing a certain program, a predetermined write permission ti(
a code generation process that generates a code; a write determination process that compares the write permission code generated by the code generation process with a pre-stored determination code to determine the authenticity of the data write request to the memory;
As a result of this write judgment process, if the write permission code and the judgment code do not match, the process includes a signal notification process that interrupts the microcomputer to prohibit data writing to the memory. When starting to write data to a specific space above,
After checking whether the data write is valid or not, the CPU writes the original data, which causes the CPU to run out of control, causing incorrect data to be written to the memory until the runaway is detected. This can be prevented in advance, and alteration of data on memory can be prevented.

また、他の発明によれば、マイクロコンピュータが一定
のプログラム実行中に、メモリへの6書き込みアクセス
開始直前に、所定の書き込み許tTfコードを発生させ
るコード発生処理と、このコード発生処理により発生し
た書き込み許可コードとあらかじめ記憶された判定コー
ドとを比較照合する信号照合処理と、この信号照合処理
に並行して、入力されるアドレス信号を解析して分割さ
れたメモリの各特定のメモリ空間の書き込み領域を判定
する領域判定処理と、この領域判定処理により得られる
領域アドレス信号と信号照合処理により得られる照合状
態信号およびプロテクトスイッチの設定状態信号を参照
しながらメモリの各特定のメモリ空間へのデータ書き込
み要求の真偽性を判定する書き込み判定処理と、この書
き込み判定処理の結果に基づいてマイクロコンピュータ
にメモリ・\のデータ書き込み禁止を割り込み報知し、
マイクロコンピュータのプログラム実行をリセットさせ
るリセット処理とからなっているので、メモリ上に書き
込まれるデータの重要度に応じて、データ:とき込み許
可の真偽性を各特定エリア毎に判断てき、CPUの暴走
による誤データ書き込みによる、特定エリアのデータ改
変を防止して、メモリに記憶された重要度の高いデータ
の破壊を厳しく管理てきるようになるため、例えばメモ
リの固定アドレス空間に一連の重要データを常駐させる
ことか可能となり、ハード構成および読み出し制御が大
幅に簡略化てきる等の優れた効果を奏する。
Further, according to another invention, a code generation process that generates a predetermined write permission tTf code immediately before the start of 6 write access to memory while a microcomputer is executing a certain program, and a code generation process that generates a predetermined write permission tTf code by this code generation process A signal matching process that compares and matches the write permission code with a pre-stored judgment code, and in parallel with this signal matching process, the input address signal is analyzed and each specific memory space of the divided memory is written. Data is transferred to each specific memory space of the memory while referring to the area determination process that determines the area, the area address signal obtained by this area determination process, the collation status signal obtained by the signal comparison process, and the protection switch setting status signal. A write determination process for determining the authenticity of a write request, and an interrupt notification to the microcomputer to prohibit data writing in the memory \ based on the result of this write determination process;
Since it consists of a reset process that resets the program execution of the microcomputer, the authenticity of the data read permission is judged for each specific area according to the importance of the data written on the memory, and the CPU This will prevent data modification in a specific area due to incorrect data writing due to runaway, and will strictly control the destruction of highly important data stored in memory. For example, if a series of important data is stored in a fixed address space of memory This makes it possible to make the computer resident permanently, and has excellent effects such as greatly simplifying the hardware configuration and read control.

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

第1図はこの発明の一実施例を示すメモリ書き込み制御
方法のハート構成を説明するプロ・ンク図、第2図はこ
の発明の一実施例を示すメモリ書き込み制御動作手順を
説明するフローチャート、第3図は第1図に示したメモ
リのメモリ空間を説明する模式図、第4図は他の発明の
一実施例を説明するメモリ書き込み制御方法のハード構
成を説明するブロック図、第5図は他の発明の一実施例
を示すメモリ書き込み制御動作f−順を説明するフロー
チャートである。 図中、lはCPU、2はパスライン、3はメモリ、4は
シフl−レジスタ、6はラッチ回路、7はディジタルコ
ンパレータ、lOはアドレス領域デコーダ、11はイリ
ーガルアクセス検出回路、9.22.23はアンド回路
、21はプロテクトスイッチである。 (外2名) 第2図 第3図
FIG. 1 is a block diagram illustrating the heart structure of a memory write control method according to an embodiment of the present invention, and FIG. 2 is a flowchart illustrating a memory write control operation procedure according to an embodiment of the present invention. 3 is a schematic diagram illustrating the memory space of the memory shown in FIG. 1, FIG. 4 is a block diagram illustrating the hardware configuration of a memory write control method illustrating an embodiment of another invention, and FIG. 7 is a flowchart illustrating a memory write control operation f-order showing another embodiment of the invention. In the figure, l is a CPU, 2 is a pass line, 3 is a memory, 4 is a shift l-register, 6 is a latch circuit, 7 is a digital comparator, IO is an address area decoder, 11 is an illegal access detection circuit, 9.22. 23 is an AND circuit, and 21 is a protect switch. (2 others) Figure 2 Figure 3

Claims (2)

【特許請求の範囲】[Claims] (1)マイクロコンピュータがメモリをアクセスしなが
ら一定のプログラムを実行するマイクロコンピュータシ
ステムにおいて、前記マイクロコンピュータは前記一定
のプログラム実行中に、前記メモリへの書き込みアクセ
ス直前毎に、所定の書き込み許可コードを発生させるコ
ード発生処理と、このコード発生処理により発生した書
き込み許可コードとあらかじめ記憶された判定コードと
を比較照合して前記メモリへのデータ書き込み要求の真
偽性を判定する書き込み判定処理と、この書き込み判定
処理の結果、前記書き込み許可コードと前記判定コード
とが不一致の場合に、前記マイクロコンピュータに前記
メモリへのデータ書き込み禁止を割り込み報知する信号
報知処理とからなることを特徴とするメモリ書き込み制
御方法。
(1) In a microcomputer system in which a microcomputer executes a certain program while accessing memory, the microcomputer executes a predetermined write permission code every time it accesses the memory for writing while executing the certain program. a code generation process to generate a code; a write determination process to compare and match the write permission code generated by the code generation process with a pre-stored determination code to determine the authenticity of the data write request to the memory; Memory write control comprising a signal notification process for interrupting and notifying the microcomputer that data writing to the memory is prohibited when the write permission code and the judgment code do not match as a result of the write judgment process. Method.
(2)メモリを複数のエリアに分割し、分割された所定
のメモリ空間のみのアクセスを許可するプロテクトスイ
ッチを有し、このプロテクトスッチの状態に応じて指定
されるメモリ空間に特定のプログラムまたはデータを格
納して、一定のプログラムを実行するマイクロコンピュ
ーシステムにおいて、マイクロコンピュータが一定のプ
ログラム実行中に、メモリへの各書き込みアクセス開始
直前に、所定の書き込み許可コードを発生させるコード
発生処理と、このコード発生処理により発生した書き込
み許可コードとあらかじめ記憶された判定コードとを比
較照合する信号照合処理と、この信号照合処理に並行し
て、入力されるアドレス信号を解析して分割された前記
メモリの各特定のメモリ空間の書き込み領域を判定する
領域判定処理と、この領域判定処理により得られる領域
アドレス信号と前記信号照合処理により得られる照合状
態信号および前記プロテクトスイッチの設定状態信号を
参照しながら前記メモリの各特定のメモリ空間へのデー
タ書き込み要求の真偽性を判定する書き込み判定処理と
、この書き込み判定処理の結果に基づいて前記マイクロ
コンピュータに前記メモリへのデータ書き込み禁止を割
り込み報知し、前記マイクロコンピュータのプログラム
実行をリセットさせるリセット処理とからなることを特
徴とするメモリ書き込み制御方法。
(2) It has a protect switch that divides the memory into multiple areas and allows access only to a predetermined divided memory space, and a specific program or data is stored in the memory space specified according to the state of this protect switch. in a microcomputer system that stores a program and executes a certain program, a code generation process that generates a predetermined write permission code immediately before starting each write access to memory while the microcomputer is executing a certain program; A signal matching process compares and matches the write permission code generated by this code generation process with a pre-stored judgment code, and in parallel with this signal matching process, an input address signal is analyzed and the memory is divided. while referring to the area determination process for determining the write area of each specific memory space, the area address signal obtained by this area determination process, the collation status signal obtained from the signal collation process, and the setting status signal of the protect switch. Write determination processing for determining the authenticity of a data write request to each specific memory space of the memory, and interrupt notification to the microcomputer to prohibit data writing to the memory based on the result of the write determination processing; A memory write control method comprising a reset process for resetting program execution of the microcomputer.
JP61313305A 1986-12-26 1986-12-26 Control method for writing into memory Pending JPS63163943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61313305A JPS63163943A (en) 1986-12-26 1986-12-26 Control method for writing into memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61313305A JPS63163943A (en) 1986-12-26 1986-12-26 Control method for writing into memory

Publications (1)

Publication Number Publication Date
JPS63163943A true JPS63163943A (en) 1988-07-07

Family

ID=18039618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61313305A Pending JPS63163943A (en) 1986-12-26 1986-12-26 Control method for writing into memory

Country Status (1)

Country Link
JP (1) JPS63163943A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04304535A (en) * 1991-04-01 1992-10-27 Nec Yamagata Ltd Safety device in microcomputer control
JP2006277012A (en) * 2005-03-28 2006-10-12 Denso Corp Semiconductor integrated circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04304535A (en) * 1991-04-01 1992-10-27 Nec Yamagata Ltd Safety device in microcomputer control
JP2006277012A (en) * 2005-03-28 2006-10-12 Denso Corp Semiconductor integrated circuit

Similar Documents

Publication Publication Date Title
EP1150300B1 (en) Semiconductor storage device, control device, and electronic apparatus
US4763296A (en) Watchdog timer
US7793347B2 (en) Method and system for validating a computer system
US5155829A (en) Memory system and method for protecting the contents of a ROM type memory
US4716586A (en) State sequence dependent read only memory
US6591352B2 (en) Method and apparatus for executing firmware from a valid startup block
JPH09134308A (en) Protection system for important memory information
RU2249247C2 (en) Method for protection of computer core from unsanctioned outside changes
JPH06324914A (en) Runaway detecting method for computer
JPS63163943A (en) Control method for writing into memory
JP2003015958A (en) Write-protect method
US5687354A (en) Memory system and method for protecting the contents of a ROM type memory
US6578132B1 (en) Semiconductor storage device and program authenticity determining system
US5428767A (en) Data retention circuit
US5475755A (en) Password processing whereby a foreign password is referred to after fail of several attempts
JPH09106690A (en) Rom with copy preventing function
US20230205655A1 (en) Early Boot Debugging of Hardware Issues in a Computing System
KR102153048B1 (en) Method and apparatus for detection alteration of smram
JP2752929B2 (en) Program runaway detection device and runaway detection method
JP2007064762A (en) Semiconductor device and test mode control circuit
JPH0822419A (en) Miswriting prevention system
JP3169879B2 (en) Microprocessor runaway detection method
JPS63250753A (en) Memory access checking system
JPH11194975A (en) Memory system
JPH04109340A (en) False fault generating circuit