JP2008217268A - Write-protection device - Google Patents
Write-protection device Download PDFInfo
- Publication number
- JP2008217268A JP2008217268A JP2007051999A JP2007051999A JP2008217268A JP 2008217268 A JP2008217268 A JP 2008217268A JP 2007051999 A JP2007051999 A JP 2007051999A JP 2007051999 A JP2007051999 A JP 2007051999A JP 2008217268 A JP2008217268 A JP 2008217268A
- Authority
- JP
- Japan
- Prior art keywords
- data
- register
- write
- cpu
- address
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、プロセッサからのデータを記憶する装置に関し、特にプロセッサの制御によりデータの書き込みが制御される書き込み保護装置に関する。 The present invention relates to an apparatus for storing data from a processor, and more particularly to a write protection apparatus in which data writing is controlled by control of the processor.
従来、プロセッサ(以下CPU)が処理したデータが記憶装置に確実に記憶されるかどうかを事前にチェックする方法として、CPUが記憶装置の全アドレスに異なった試験データを書き込み、その試験データを順次読み出したデータと、書き込んだデータとを比較することにより、記憶装置が正しく動作するかどうかを診断する方法があった。 Conventionally, as a method for checking in advance whether data processed by a processor (hereinafter referred to as a CPU) is reliably stored in a storage device, the CPU writes different test data to all addresses of the storage device, and sequentially writes the test data. There has been a method of diagnosing whether the storage device operates correctly by comparing the read data and the written data.
この診断方法において、記憶装置の診断に用いる試験データの種類と試験回数を減少させるため、CPUは、記憶装置の特定アドレスとそれ以外のアドレスに互いに符号が反転したデータを書き込み、書き込んだデータと読み出したデータが一致したときは記憶領域は正常と判断して書き込みを行い、不一致の場合はアドレス指定経路の故障または記憶領域の故障ありと診断し書き込みを中止する方法があった(特許文献1参照)。 In this diagnosis method, in order to reduce the type of test data used for diagnosis of the storage device and the number of tests, the CPU writes the data whose sign is inverted to the specific address of the storage device and the other address, and the written data When the read data matches, there is a method in which the storage area is judged to be normal and writing is performed. reference).
また、CPUから特定の記憶部(鍵データレジスタと呼ばれる)へ固定値(鍵データ)を書込み、別の記憶部に予め記憶された鍵データと前記書き込まれたデータとが一致した直後は、CPUから記憶装置への書込みが正常であると判断して記憶装置への書き込みを行い、不一致の場合は書き込みを中止してデータの記憶を保護する方法があった(特許文献2参照)。
CPUが処理したデータを誤って記憶した場合、記憶装置において重要な役割を担う電源制御データによる正しい電源制御が行われなくなり、記憶装置が正常に動作しなくなる。 If the data processed by the CPU is mistakenly stored, correct power control using power control data that plays an important role in the storage device is not performed, and the storage device does not operate normally.
また、記憶装置を制御するCPUが誤動作した場合、記憶装置のリセット制御レジスタ等への異常アクセスが発生し、記憶装置を使用した全体システムの運用に多大な障害を及ぼす可能性がある。 In addition, if the CPU that controls the storage device malfunctions, abnormal access to the reset control register of the storage device may occur, which may cause a great obstacle to the operation of the entire system using the storage device.
そのため、記憶装置への書込みにおいては保護機能を設け、CPU誤動作時の障害発生を最小限に抑える必要がある。 For this reason, it is necessary to provide a protection function in writing to the storage device and to minimize the occurrence of a failure when the CPU malfunctions.
先に説明した従来の解決方法において、書き込みデータと、記憶装置に記憶したデータとの比較による方法は、特定の記憶部へのデータ書込みにより記憶部への書込みが可能となるため、CPUの誤動作状態によっては、書込み保護解除機能をすり抜け、記憶部への異常アクセスが行われる可能性もあるので保護機能として十分ではなく、その強化が課題とされている。 In the conventional solution described above, the method based on the comparison between the write data and the data stored in the storage device enables writing to the storage unit by writing data to a specific storage unit. Depending on the state, there is a possibility that the write protection cancellation function may be bypassed and an abnormal access to the storage unit may be performed. Therefore, the protection function is not sufficient, and its enhancement is a problem.
従って本発明の目的の1つは、プロセッサ(CPU)からのデータを記憶する記憶装置の動作を診断し、プロセッサからのデータが確実に記憶装置に記憶される装置を提供することである。 Accordingly, one object of the present invention is to diagnose the operation of a storage device that stores data from a processor (CPU), and to provide a device in which data from the processor is reliably stored in the storage device.
尚、上記目的に限らず後述する発明を実施するための最良の形態に示す各構成により導かれる結果であって、従来の技術によっては得られない効果も本発明の他の目的の1つとして位置付けることが出来る。 In addition, it is a result derived | led-out by each structure shown in the best form for implementing invention mentioned later not only the said objective, Comprising: The effect which is not acquired by the prior art is also one of the other objectives of this invention. Can be positioned.
(1)本発明では、試験データを第1のレジスタに記憶し、プロセッサが第1のレジスタから読み出した試験データを第2のレジスタに書き込み、データ判断手段が第1のレジスタの試験データと第2のレジスタのデータとを比較して一致した時に、プロセッサのデータが第3のレジスタへ書き込み許可される書き込み保護装置を用いる。 (1) In the present invention, the test data is stored in the first register, the test data read from the first register by the processor is written in the second register, and the data judging means and the test data in the first register A write protection device is used in which the processor data is permitted to be written to the third register when the two register data match.
好ましくは、第1のレジスタと第2のレジスタが備えた記憶用のアドレスは、それぞれ1つであることを特徴とする書き込み保護装置を用いる。 Preferably, a write protection device is used in which each of the first register and the second register has one storage address.
好ましくは、データ判断手段は、第1のレジスタと第2のレジスタに直接接続された線路を介して、前記2つのレジスタに記憶されたデータを比較することを特徴とする書き込み保護装置を用いる。 Preferably, the data judging means uses a write protection device characterized by comparing data stored in the two registers via a line directly connected to the first register and the second register.
好ましくは、第1のレジスタに記憶された試験データと、前記プロセッサが第1のレジスタの試験データを読み出し第2のレジスタに書き込んだデータとが一致したとき、前記第3のレジスタに書き込まれたデータの読み出しが前記プロセッサに許可されることを特徴とする書き込み保護装置を用いる。
(2)また、前記プロセッサのデータのうち前記プロセッサが重要と判断したデータは書き込み許可に基づきレジスタ3に書き込まれ、重要でないと判断したデータは書き込み許可なしでレジスタ4に書き込まれる書き込み保護装置を用いる。
(3)本発明では、試験データを第1のレジスタに記憶し、プロセッサが第1のレジスタから読み出した試験データの各ビットを反転したデータを第2のレジスタに書き込み、データ判定手段が第1のレジスタの試験データの各ビットを反転したデータと第2のレジスタのデータとを比較して一致した時に、プロセッサのデータが第3のレジスタへ書き込み許可される書き込み保護装置を用いる。
(4)また、第1のレジスタと第2のレジスタが備えた記憶用のアドレスは、それぞれ1つであり、第2のレジスタのアドレス番号は第1のレジスタのアドレス番号の各ビットを反転したアドレス番号であることを特徴とする書き込み保護装置を用いる。
Preferably, when the test data stored in the first register matches the data read by the processor from the first register and written to the second register, the data is written to the third register. A write protection device is used, wherein the processor is allowed to read data.
(2) A data protection device in which data judged as important by the processor among the data of the processor is written in the
(3) In the present invention, the test data is stored in the first register, the data obtained by inverting each bit of the test data read from the first register by the processor is written in the second register, and the data determination means is the first register. A write protection device is used in which when the data obtained by inverting each bit of the test data of the register of the second register matches the data of the second register, the processor data is permitted to be written to the third register.
(4) The first register and the second register each have one storage address, and the address number of the second register is obtained by inverting each bit of the address number of the first register. A write protector characterized by an address number is used.
本発明により、プロセッサからのデータを確実に記憶装置に書き込める書き込み保護装置を提供することができる。 According to the present invention, it is possible to provide a write protection device capable of reliably writing data from a processor to a storage device.
以下、図面を参照することにより本発明の実施の形態について説明する。
(実施例1)
実施例1では、第1のレジスタ(以下レジスタA)に記憶された試験データと、レジスタAの試験データを読み出し書き込まれた第2のレジスタ(以下レジスタB)の試験データが一致したときのみ、第3のレジスタ(以下保護レジスタ)へのデータ書き込みが許可される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(Example 1)
In the first embodiment, only when the test data stored in the first register (hereinafter referred to as register A) matches the test data in the second register (hereinafter referred to as register B) from which the test data in register A is read and written. Data writing to a third register (hereinafter referred to as a protection register) is permitted.
実施例1における書き込み保護装置の構成を図1、書き込み制御のフローを図2にそれぞれ示す。 FIG. 1 shows the configuration of the write protection device according to the first embodiment, and FIG. 2 shows the flow of write control.
・「書き込み保護装置の構成」
図1において、101は書き込み保護装置、102はCPU、103は記憶装置、104はアドレスデコード部、105は論理和部、106はデータ判定部、107はレジスタA、108はレジスタB、109は試験データ生成部、110は保護レジスタ、111は保護無しレジスタ、112、113、114はバッファ、115、116、117、118はゲートをそれぞれ示す。
・ "Configuration of write protector"
In FIG. 1, 101 is a write protection device, 102 is a CPU, 103 is a storage device, 104 is an address decoding unit, 105 is a logical sum unit, 106 is a data determination unit, 107 is a register A, 108 is a register B, and 109 is a test. A data generation unit, 110 is a protection register, 111 is a no-protection register, 112, 113, and 114 are buffers, and 115, 116, 117, and 118 are gates, respectively.
・「書き込み制御のフロー」
図2において、S201は書き込みを開始するステップ、S202はCPU102が書き込みデータを発生するステップ、S203は書き込みデータが保護データかどうかを判断するステップ、S204は保護無しレジスタ111に書き込むステップ、S205はレジスタA107の試験データを読み出すステップ、S206はレジスタB108にレジスタA107からの試験データを書き込むステップ、S207はレジスタA107に記憶された試験データとレジスタB108に記憶された試験データとを比較するステップ、S208はCPU102に異常を通知するステップ、S209は保護レジスタ110への書き込みを禁止するステップ、S210は保護レジスタ110への書き込みを許可するステップをそれぞれ示す。
・ "Write control flow"
In FIG. 2, S201 is a step for starting writing, S202 is a step for generating write data by the CPU 102, S203 is a step for determining whether the write data is protected data, S204 is a step for writing to the
図2の書き込み制御のフローに基づき、図1の構成図を用いて実施例1における書き込み制御動作を説明する。 Based on the flow of write control in FIG. 2, the write control operation in the first embodiment will be described using the configuration diagram in FIG.
以下のステップにおいて記憶装置103へのデータの書き込み、および読み出しの制御はCPU102が行う。
In the following steps, the CPU 102 controls the writing and reading of data to and from the
ステップS201で書き込み制御を開始する。 Write control is started in step S201.
ステップS202ではCPU102が記憶すべき書き込みデータを発生する。このときCPU102は、書き込み保護装置101を含む全体システム(図示せず)に影響する重要データに対しては書き込み先として保護レジスタ110のアドレスが指定され、重要度が少ないデータに対しては保護無しレジスタ111のアドレスが指定される。
In step S202, write data to be stored by the CPU 102 is generated. At this time, the CPU 102 designates the address of the
ステップS203では、アドレスデコード部104が書き込み先アドレスをチェックすることにより、書き込みデータが保護すべきデータ(以下保護データ)か、保護しないデータ(以下保護無しデータ)かを判断する。 In step S203, the address decoding unit 104 checks the write destination address to determine whether the write data should be protected (hereinafter protected data) or not protected (hereinafter unprotected data).
ステップS204は、ステップS203がNoで保護無しデータと判断された場合であり、アドレスデコード部104がCPU102から指定されたアドレスを保護無しレジスタ111に送信し、CPU102からのデータが書き込まれる。
Step S204 is a case where step S203 is No and it is determined that there is no protection data. The address decoding unit 104 transmits the address designated by the CPU 102 to the no
ステップS205は、ステップS203がYesで保護データと判断された場合であり、CPU102はレジスタA107から試験データを読み出す。なお、レジスタA107は試験データ生成部109からランダムな試験データを供給されデータAとして記憶している。 Step S205 is a case where it is determined that the protected data is Yes in step S203, and the CPU 102 reads the test data from the register A107. The register A 107 is supplied with random test data from the test data generation unit 109 and stores it as data A.
ステップS206では、CPU102はステップS205により読み出したデータAをレジスタB108に書き込み、レジスタB108にデータBとして記憶される。 In step S206, the CPU 102 writes the data A read out in step S205 into the register B108 and stores it as data B in the register B108.
ステップS207は、レジスタA107に記憶されたデータAとレジスタB108に記憶されたデータBとを、データ判定部106がハード的に比較する。即ち、このデータ比較においてCPU102は書き込みおよび読み出し処理は行わないで、直接データ判定部106がデータの比較を行う。
In step S207, the data determination unit 106 compares the data A stored in the register A 107 with the data B stored in the
ステップS208は、ステップS207がNoでデータAとデータBが異なる場合であり、書き込みと読み出し処理において誤りが発生したことを示すので、データ判定部106はCPU102に異常の発生を通知し、保護レジスタ110へのアドレス信号を制御するゲート117に書きこみ禁止を通知する。 Step S208 is a case where step S207 is No and data A and data B are different, and indicates that an error has occurred in the writing and reading processing. Therefore, the data determination unit 106 notifies the CPU 102 of the occurrence of an abnormality, and the protection register The gate 117 that controls the address signal to 110 is notified of write prohibition.
ステップS209は、異常の発生の通知を受けたCPU102が保護レジスタ110へのデータ書き込みを禁止し、管理者等に警報を発信する。
In step S209, the CPU 102 having received the notification of the occurrence of the abnormality prohibits data writing to the
ステップS210は、ステップS207がYesでデータAとデータBが一致した場合であり、書き込みと読み出し処理が正常であることを示すので、データ判定部106はCPU102と、保護レジスタ110へのアドレス信号を制御するゲート117に書き込み許可を伝える。書き込みと読み出しが正常の通知を受けたCPU102は、バス制御信号によりアドレスデコード部104に保護レジスタ110へのデータ書き込みを指令する。
Step S210 is a case where step S207 is Yes and data A and data B match, indicating that the writing and reading processes are normal. Therefore, the data determination unit 106 sends an address signal to the CPU 102 and the
ステップS210が終了するとステップS202に帰り、次のデータの処理を繰り返す。 When step S210 ends, the process returns to step S202, and the next data processing is repeated.
従って、保護データは逐一上記のステップを踏んで、書き込みが許可された場合のみ保護レジスタ110に書き込まれる。
Accordingly, the protection data is written into the
保護無しデータは前記プロセスの全部は通過しないので、保護無しレジスタ111に短時間で書き込みが行われる。
Since unprotected data does not pass through the entire process, the
・「レジスタへの書き込み動作」
前記の書き込み可否の判断の後、CPU102から保護レジスタ110および、保護無しレジスタ111へのデータ書き込み動作について、図1の構成図を用いて説明する。
・ "Write operation to register"
A data write operation from the CPU 102 to the
CPU102が生成したデータが保護無しデータの場合、CPU102はアドレスデコード部104に書き込み先アドレスとして、保護無しレジスタ111内の1つのアドレス番号を指定する。アドレスデコード部104は、保護無しレジスタ111に前記書き込み先アドレス番号を通知し、CPU102は記憶すべきデータをバッファ112を介して、保護無しレジスタ111に送信する。保護無しレジスタ111は、指定されたアドレスに前記データを書き込み記憶する。
When the data generated by the CPU 102 is unprotected data, the CPU 102 designates one address number in the
CPU102が生成したデータが保護データの場合、CPU102はアドレスデコード部104に書き込み先アドレスとして、保護レジスタ110内の1つのアドレスを指定する。アドレスデコード部104は、保護レジスタ110に前記書き込み先アドレス番号を通知し、CPU102は記憶すべきデータをバッファ112を介して、保護レジスタ110に送信する。
When the data generated by the CPU 102 is protection data, the CPU 102 designates one address in the
データ判定部106が書き込み許可信号を出力するとゲート117が開かれ、アドレスデコード部104からのアドレス指定信号が保護レジスタ110に接続され、保護レジスタ110へのデータの書き込みが実施される。
When the data determination unit 106 outputs a write permission signal, the gate 117 is opened, the address designation signal from the address decoding unit 104 is connected to the
従って、CPU102から保護レジスタ110へのデータの書き込みは、図2のS202から始まりS210のステップまで通過した場合のみ実行される。
Therefore, the writing of data from the CPU 102 to the
即ち図2のフローによる保護レジスタ110への書き込みの許可は、CPU102、アドレスデコード部104、レジスタA107、レジスタB108、およびこれらを接続するアドレスバス、データバス、バス制御信号系が正常に動作している場合に行われる。
That is, permission to write to the
また、前記フローにおいては保護レジスタ110自身を用いないが、記憶装置103は1個の微小な半導体チップで形成されており、保護レジスタ110のアドレスの1部がレジスタA107および、レジスタB108のアドレスとして設定されたと見なすことが出来る。
In the above flow, the
従って、レジスタA107およびレジスタB108が正常であれば、同一条件で製造された1つのチップ上で同一環境条件(外来雑音や温度等)におかれた保護レジスタ110は正常であることが確認できる。
Therefore, if the register A 107 and the
さらに、図2のフローで使用されるレジスタA107、レジスタB108のアドレスはそれぞれ1個であり、両方のアドレスに記憶された1組のデータの比較は1回であるので、書き込み処理は短時間で行える。
Further, the address of the register A 107 and the
・「レジスタからの読み出し動作」
各レジスタからのデータの読み出しを、図1の構成図を用いて説明する。
・ "Read operation from register"
Reading data from each register will be described with reference to the block diagram of FIG.
CPU102からバス制御信号によりデータの読み出し指令と、記憶したレジスタのアドレス番号がアドレスデコード部104に出力される。 The CPU 102 outputs a data read command and the stored register address number to the address decoding unit 104 by a bus control signal.
アドレスデコード部104はCPU102から指令されたアドレス番号に対応するゲートに読み出し指令信号を送る。読み出し指令信号を受信したゲートは対応するレジスタのアドレスからデータを読み出す。 The address decoding unit 104 sends a read command signal to the gate corresponding to the address number commanded from the CPU 102. The gate that has received the read command signal reads data from the corresponding register address.
例えば、保護レジスタ110のデータ読み出しは、ゲート116に指令された読み出し指令信号により、指定されたアドレスから読み出される。
For example, data read from the
読み出されたデータは、論理和部105により取り出され、バッファ113を介してCPU102に入力する。 The read data is taken out by the logical sum unit 105 and input to the CPU 102 via the buffer 113.
1度に読み出されるデータは、保護無しレジスタ111、保護レジスタ110、レジスタA107からのどれか1つであるので、各読み出しデータはこれらデータの論理和により論理和部105により取り出すことが出来る。
Since the data read at a time is one of the
レジスタB108のデータは、データ判定部がハード的に直接取り出すので、CPU102による読み出し処理は必要とされない。 Since the data determination unit directly takes out the data of the register B108 in hardware, the reading process by the CPU 102 is not required.
これまでの説明では、保護レジスタ110からの読み出しに対し、書き込み時におけるような動作のチェックは行われないが、データの読み出しを正しく行うための読み出し制御を行ってもよい。
In the description so far, for the reading from the
図3に読み出し制御を行う場合のフローを示す。 FIG. 3 shows a flow for performing the read control.
図3において、S301は読み出しを開始するステップ、S302はCPUに読み出しデータが発生するステップ、S303は読み出しデータが保護データかどうかを判断するステップ、S304は保護無しレジスタから読み出すステップ、S305はレジスタAのデータを読み出すステップ、S306はレジスタBにレジスタAからのデータを書き込むステップ、S307はレジスタAに記憶されたデータとレジスタBに記憶されたデータとを比較するステップ、S308はCPUに異常を通知するステップ、S309は保護レジスタからの読み出しみを禁止するステップ、S310は保護レジスタからの読み出しを許可するステップをそれぞれ示す。 In FIG. 3, S301 is a step of starting reading, S302 is a step of generating read data in the CPU, S303 is a step of determining whether the read data is protected data, S304 is a step of reading from the unprotected register, and S305 is a register A Step S306 is a step of writing data from the register A to the register B, S307 is a step of comparing the data stored in the register A with the data stored in the register B, and S308 notifies the CPU of the abnormality. S309 indicates a step of prohibiting reading from the protection register, and S310 indicates a step of permitting reading from the protection register.
図3の読み出し制御のフローに基づき、図1の構成図を用いて実施例1における読み出し制御動作を説明する。 Based on the flow of read control in FIG. 3, the read control operation in the first embodiment will be described using the configuration diagram in FIG.
以下のステップにおいて記憶装置103からのデータの書き込み、および読み出しの制御はCPU102が行う。
In the following steps, the CPU 102 controls the writing and reading of data from the
ステップS301で読み出し制御を開始する。 In step S301, read control is started.
ステップS302ではCPU102に読み出すべきデータが発生する。このとき、書き込み保護装置を含む全体システム(図示せず)に影響する重要データは、保護レジスタ110のアドレスが指定され、重要度が少ないデータに対しては保護無しレジスタ111のアドレスが指定される。
In step S302, data to be read out is generated in the CPU. At this time, the important data affecting the entire system (not shown) including the write protection device is designated with the address of the
ステップS303では、アドレスデコード部104が読み出し先アドレス番号をチェックすることにより、読み出しデータが保護データか保護無しデータかを判断する。 In step S303, the address decoding unit 104 checks the read destination address number to determine whether the read data is protected data or unprotected data.
ステップS304は、ステップS303がNoで保護無しデータと判断された場合であり、アドレスデコード部104はCPU102から指定された保護無しレジスタ111のアドレスを通知し、データが読み出されCPU102に取り込まれる。
Step S304 is a case where step S303 is No and it is determined that the data is unprotected, and the address decoding unit 104 notifies the address of the
ステップS305は、ステップS303がYesで保護データと判断された場合であり、CPU102はレジスタA107から試験用データを読み出す。なお、レジスタA107は試験データ生成部109からランダムな試験用データを供給されデータAとして記憶している。 Step S305 is a case where step S303 is Yes and it is determined as protection data, and the CPU 102 reads test data from the register A107. The register A 107 is supplied with random test data from the test data generation unit 109 and stores it as data A.
ステップS306では、CPU102はステップS205により読み出されたデータAをレジスタB108に書き込み、データBとして記憶される。 In step S306, the CPU 102 writes the data A read in step S205 to the register B108 and stores it as data B.
ステップS307は、レジスタA107に記憶されたデータAとレジスタB108に記憶されたデータBとを、データ判定部106がハード的に比較する。このデータ比較においてCPU102は書き込みおよび読み出し処理は行わないで、直接データ判定部106がデータの比較を行う。 In step S307, the data determination unit 106 compares the data A stored in the register A107 and the data B stored in the register B108 in hardware. In this data comparison, the CPU 102 does not perform writing and reading processing, and the direct data determination unit 106 performs data comparison.
ステップS308は、ステップS307がNoでデータAとデータBが異なる場合であり、書き込みと読み出し処理において誤りが発生したことを示すので、データ判定部106はCPU102に異常の発生を通知し、保護レジスタ110のアドレス信号を制御するゲート116に読み出し禁止を伝える(図1に図示せず)。
Step S308 is a case where step S307 is No and data A and data B are different, and indicates that an error has occurred in the writing and reading processing. Therefore, the data determination unit 106 notifies the CPU 102 of the occurrence of the abnormality, and the protection register Read prohibition is transmitted to the
ステップS309は、異常の発生の通知を受けたCPU102が保護レジスタ110からのデータ読み出しを禁止し、管理者等に警報を発信する。
In step S309, the CPU 102 that has received the notification of the occurrence of the abnormality prohibits data reading from the
ステップS310は、ステップS307がYesでデータAとデータBが一致した場合であり、書き込みと読み出し処理が正常であることを示すので、データ判定部106はCPU102と、保護レジスタ110のアドレス信号を制御するゲート116に読み出し許可を伝える。
Step S310 is a case where step S307 is Yes and data A and data B match, and indicates that the writing and reading processes are normal. Therefore, the data determination unit 106 controls the CPU 102 and the address signal of the
ステップS310は、書き込みと読み出しが正常の通知を受けたCPU102が、バス制御信号によりアドレスデコード部104に保護レジスタ110からのデータ読み出しを指令する。
In step S310, the CPU 102 that has received notification of normal writing and reading instructs the address decoding unit 104 to read data from the
ステップS310が終了するとステップS302に帰り、次のデータの処理を繰り返す。 When step S310 ends, the process returns to step S302 to repeat the next data processing.
従って、保護データは逐一上記のステップを踏んで、読み出しが許可された場合のみ保護レジスタ110からデータが読み出される。
(実施例2)
実施例2では、第1のレジスタ(レジスタA)に記憶された試験データの反転データと、レジスタAのデータを読み出し反転して書き込まれた第2のレジスタ(レジスタB)の試験データが一致したときのみ、保護レジスタへのデータ書き込みが許可される。
Therefore, the protection data is read from the
(Example 2)
In the second embodiment, the inverted data of the test data stored in the first register (register A) matches the test data of the second register (register B) written by reading and inverting the data of the register A. Only when is data writing to the protection register permitted.
実施例2における書き込み保護装置の構成を図4、書き込み制御のフローを図5にそれぞれ示す。 FIG. 4 shows the configuration of the write protection apparatus according to the second embodiment, and FIG. 5 shows the flow of write control.
・「書き込み保護装置の構成」
図4において、401は書き込み保護装置、402はCPU、403は記憶装置、404はアドレスデコード部、405は論理和部、406はデータ判定部、407はレジスタA、408はレジスタB、409は試験データ生成部、410は保護レジスタ、411は保護無しレジスタ、412、113はバッファ、414は反転バッファ、415、416、417、418はゲートをそれぞれ示す。
・ "Configuration of write protector"
In FIG. 4, 401 is a write protection device, 402 is a CPU, 403 is a storage device, 404 is an address decoding unit, 405 is a logical sum unit, 406 is a data determination unit, 407 is a register A, 408 is a register B, and 409 is a test. A data generation unit, 410 is a protection register, 411 is a non-protection register, 412, 113 are buffers, 414 is an inversion buffer, 415, 416, 417, and 418 are gates, respectively.
実施例の図1と異なるのは、414が反転バッファとなっていることである。 1 differs from FIG. 1 of the embodiment in that 414 is an inverting buffer.
・「書き込み制御のフロー」
図5において、S501は書き込みを開始するステップ、S502はCPU402が書き込みデータを発生するステップ、S503は書き込みデータが保護データかどうかを判断するステップ、S504は保護無しレジスタ411に書き込むステップ、S505はレジスタA407の試験データを読み出すステップ、S506はレジスタB408にレジスタA407からのデータを反転して書き込むステップ、S507はレジスタA407に記憶された試験データの反転データとレジスタB408に記憶された試験データとを比較するステップ、S508はCPU402に異常を通知するステップ、S509は保護レジスタ410への書き込みを禁止するステップ、S510は保護レジスタ410への書き込みを許可するステップをそれぞれ示す。
・ "Write control flow"
In FIG. 5, S501 is a step of starting writing, S502 is a step of generating write data by the
図5の書き込み制御のフローに基づき、図4の構成図を用いて実施例2における書き込み制御動作を説明する。 Based on the flow of write control in FIG. 5, the write control operation in the second embodiment will be described with reference to the configuration diagram in FIG.
以下のステップにおいて記憶装置403へのデータの書き込み、および読み出しの制御はCPU402が行う。
In the following steps, the
ステップS501で書き込み制御を開始する。 Write control is started in step S501.
ステップS502ではCPU402が記憶すべき書き込みデータを発生する。このときCPU402は、書き込み保護装置を含む全体システム(図示せず)に影響する重要データに対しては書き込み先として保護レジスタ410のアドレスを与え、重要度が少ないデータに対しては保護無しレジスタ411のアドレスを与える。
In step S502, write data to be stored by the
ステップS503では、アドレスデコード部404が書き込み先アドレスをチェックすることにより、書き込みデータが保護すべきデータ(以下保護データ)か、保護しないデータ(以下保護無しデータ)かを判断する。
In step S503, the
ステップS504は、ステップS503がNoで保護無しデータと判断された場合であり、アドレスデコード部404がCPU402から指定されたアドレスを保護無しレジスタ411に送信し、CPU402からのデータが書き込まれる。
Step S504 is a case where step S503 is No and it is determined that there is no protection data. The
ステップS505は、ステップS503がYesで保護データと判断された場合であり、CPU402はレジスタA407から試験データを読み出す。なお、レジスタA407は試験データ生成部409からランダムな試験データを供給されデータAとして記憶している。
Step S505 is a case where step S503 is determined as Yes and protection data, and the
ステップS506では、CPU402はステップS505により読み出されたデータAを反転してレジスタB408に書き込み、レジスタB408にデータBとして記憶される。
In step S506, the
図6に、レジスタA407に記憶されたデータAと、レジスタB408にデータAが正しく反転されて記憶されたデータBの例を示す。 FIG. 6 shows an example of data A stored in the register A407 and data B stored by inverting the data A in the register B408.
図6には、レジスタA407に記憶されたデータA(D61)が16進データでAAAAの場合を示す。16進データのAは、物理的に伝送される2進データではD62に示す1010である。 FIG. 6 shows a case where the data A (D61) stored in the register A407 is hexadecimal data and is AAAA. Hexadecimal data A is 1010 shown in D62 in the binary data physically transmitted.
レジスタB408へは、データAが反転されて書き込まれデータB(D63)となる。 Data A is inverted and written into the register B408 to become data B (D63).
D62の2進データの1010が反転されると0101であり、これは16進データの5となる。 When the binary data 1010 of D62 is inverted, it becomes 0101, which becomes 5 of the hexadecimal data.
即ち、データAのデータAAAAが正しく反転して書き込まれたデータBは5555となる。 That is, the data B written by inverting the data AAAA of the data A correctly becomes 5555.
ステップS507は、レジスタA407に記憶されたデータAとレジスタB408に記憶されたデータBとを、データ判定部406がハード的に比較する。即ち、このデータ比較においてCPU402は書き込みおよび読み出し処理は行わないで、直接データ判定部406がデータの比較を行う。レジスタA407に記憶されたデータAは、反転バッファ414によりビットが反転されデータ判定部406においてデータBと比較される。
In step S507, the
図7に、レジスタA407に記憶されたデータAの読み出しにおいてデータバス上で誤り、レジスタB408に書き込まれたデータBの例を示す。
FIG. 7 shows an example of the data B written in the register B 408 due to an error on the data bus in reading the data A stored in the
図7には、レジスタA407に記憶されたデータA(D71)が16進データでAAAAの場合を示す。16進データのAは、ハード的には2進データD72に示す2進データの1010である。 FIG. 7 shows a case where the data A (D71) stored in the register A407 is hexadecimal data and is AAAA. A of hexadecimal data is 1010 of binary data shown in binary data D72 in hardware.
CPU402がレジスタA407からのデータAの読み出しにおいて、データバスが16ビット目を0に固定する誤りを起こした場合、図7の2進データD74となるので16進データでは2AAAとなる。
When the
CPU402がデータD77を正しく反転して、レジスタに正しく書き込んでもデータBは2進データD76となり、16進データではD555となる。
Even if the
レジスタA407のデータAAAAが正しく反転された2進データは5555であり、このレジスタB408の2進データD555と比較され不一致となる。 The binary data obtained by correctly inverting the data AAAA in the register A407 is 5555, which is compared with the binary data D555 in the register B408 and does not match.
ステップS508は、ステップS507がNoでデータAとデータBが異なった場合であり、書き込みと読み出し処理において誤りが発生したことを示すので、データ判定部406はCPU402に異常の発生を通知し、保護レジスタ410へのアドレス信号を制御するゲート417に書きこみ禁止を伝える。
Step S508 is a case where Step S507 is No and data A and data B are different, and indicates that an error has occurred in the writing and reading processing. Therefore, the
ステップS509は、異常の発生の通知を受けたCPU402が保護レジスタ410へのデータ書き込みを禁止し、管理者等に警報を発信する。
In step S509, the
ステップS510は、ステップS507がYesでデータAとデータBが一致した場合であり、書き込みと読み出し処理が正常であることを示すので、データ判定部406はCPU402と、保護レジスタ410へのアドレス信号を制御するゲート417に書き込み許可を伝える。
Step S510 is a case where Step S507 is Yes and the data A and the data B match, and indicates that the writing and reading processes are normal. Therefore, the
ステップS510は、書き込みと読み出しが正常の通知を受けたCPU402が、バス制御信号によりアドレスデコード部404に保護レジスタ410へのデータ書き込みを指令する。
In step S510, the
ステップS510が終了するとステップS502に帰り、次のデータの処理を繰り返す。 When step S510 ends, the process returns to step S502, and the next data processing is repeated.
従って、保護データは逐一上記のステップを踏んで、書き込みが許可された場合のみ保護レジスタ410に書き込まれる。 Accordingly, the protection data is written into the protection register 410 only when the above steps are followed and writing is permitted.
実施例2では、レジスタA407のデータAとレジスタB408に書き込まれたデータBは異なっているが反転したデータであるから、2つのデータの比較はCPU402によるデータ反転処理を介さないで、データAを反転バッファ414によりハード的にビット反転することにより短時間で容易に行うことが出来る。
In the second embodiment, the data A in the register A407 and the data B written in the register B408 are different but inverted data. Therefore, the comparison between the two data does not involve the data inversion processing by the
また、保護無しデータは前記プロセスの全部は通過しないので、保護無しレジスタ411に短時間で書き込みが行われる。
Further, since the unprotected data does not pass through the entire process, the
・「レジスタへの書き込み動作」
前記の書き込み可否の判断の後、CPU402から保護レジスタ410および、保護無しレジスタ411へのデータ書き込み動作について、図4の構成図を用いて説明する。
・ "Write operation to register"
After the determination of whether or not writing is possible, the data write operation from the
CPU402が生成したデータが保護無しデータの場合、CPU402はアドレスデコード部404に書き込み先アドレスとして、保護無しレジスタ411内の1つのアドレスを指定する。アドレスデコード部404は、保護無しレジスタ411に前記書き込み先アドレスを通知すると共に、記憶すべきデータをバッファ412を介して、保護無しレジスタ411に送信する。保護無しレジスタ111は、指定されたアドレスに前記データを書き込み記憶する。
When the data generated by the
CPU402が生成したデータが保護データの場合、CPU402はアドレスデコード部404に書き込み先アドレスとして、保護レジスタ410内の1つのアドレスを指定する。アドレスデコード部404は、保護レジスタ410に前記書き込み先アドレスを通知し、CPU402は記憶すべきデータをバッファ412を介して、保護レジスタ410に送信する。
When the data generated by the
データ判定部406が書き込み許可信号を出力するとゲート417が開かれ、アドレスデコード部404からのアドレス指定信号が保護レジスタ410に接続され、保護レジスタ410へのデータの書き込みが実施される。
When the
従って、CPU402から保護レジスタ410へのデータの書き込みは、図5のS502から始まりS510のステップまで通過した場合のみ実行される。
Therefore, the writing of data from the
従って、図5のフローによる保護レジスタ410への書き込みの許可は、CPU402、アドレスデコード部404、レジスタA407、レジスタB408、およびこれらを接続するアドレスバス、データバス、バス制御信号系が正常に動作している場合に行われる。
Therefore, the permission to write to the protection register 410 according to the flow of FIG. 5 is that the
また、前記フローにおいては保護レジスタ410自身を用いないが、記憶装置403は1個の微小な半導体チップで形成され、保護レジスタ410のアドレスの1部がレジスタA407および、レジスタB408のアドレスとして設定されたと見なすことが出来る。
In the above flow, the protection register 410 itself is not used, but the
従って、レジスタA407およびレジスタB408が正常であれば、同一条件で製造された1つのチップ上で同一環境条件(外来雑音や温度等)におかれた保護レジスタ410は正常であることが確認できる。
Therefore, if the
さらに、図5のフローで使用されるレジスタA407、レジスタB408のアドレスはそれぞれ1個であり、両方のアドレスに記憶された1組のデータの比較は1回であるので、書き込み処理は短時間で行える。 Furthermore, the register A407 and the register B408 used in the flow of FIG. 5 each have one address, and a set of data stored in both addresses is compared once, so the writing process can be performed in a short time. Yes.
・「レジスタからの読み出し動作」
各レジスタからのデータの読み出しを、図4の構成図を用いて説明する。
・ "Read operation from register"
Reading data from each register will be described with reference to the block diagram of FIG.
CPU402からバス制御信号によりデータの読み出し指令と、記憶したレジスタのアドレスがアドレスデコード部404に出力される。アドレスデコード部404はCPU402から指令されたアドレスに対応するゲートに読み出し指令信号を送る。
The
読み出し指令信号を受信したゲートは対応するレジスタのアドレスからデータを読み出す。 The gate that has received the read command signal reads data from the corresponding register address.
例えば、保護レジスタ410のデータ読み出しは、ゲート416に指令された読み出し指令信号により、指定されたアドレスから読み出される。 For example, data read from the protection register 410 is read from a specified address by a read command signal commanded to the gate 416.
読み出されたデータは、論理和部405により取り出され、バッファ413を介してCPU402に入力する。
The read data is extracted by the
1度に読み出されるデータは、保護無しレジスタ411、保護レジスタ410、レジスタA407からのどれか1つであるので、各読み出しデータはこれらの論理和により論理和部405から取り出すことが出来る。
Since the data read at one time is any one of the
レジスタB408のデータは、データ判定部がハード的に直接取り出すのでCPU402による読み出し処理は必要とされない。
The data in the register B 408 is directly taken out by the data determination unit, so that the reading process by the
これまでの説明では、保護レジスタ410からの読み出しに対し、書き込み時におけるような動作のチェックは行われないが、データの読み出しを正しく行うための読み出し制御を行ってもよい。 In the description so far, for the reading from the protection register 410, the operation check at the time of writing is not performed, but reading control for correctly reading the data may be performed.
読み出し制御を行う場合については、実施例1と同様であるから説明は省略する。 The case where the read control is performed is the same as that in the first embodiment, and the description thereof is omitted.
・「アドレス番号を反転したアドレス指定による書き込み制御」
実施例2においては、レジスタA407へ指定されたアドレス番号を反転したアドレス番号を、レジスタB408へのアドレス指定に用いてもよい。
・ "Write control by address designation with address number reversed"
In the second embodiment, an address number obtained by inverting the address number specified in the register A407 may be used for addressing in the register B408.
この場合、レジスタA407およびレジスタB408へのアドレス指定は、CPU402が行うので、書き込み保護装置の構成は図4と同じであり、読み出しと書き込み先のアドレス番号が反転しているところが特徴である。
In this case, since the
図8は図4を詳細化したフローであり、図8によりアドレス番号を反転する書き込み制御フローを説明する。 FIG. 8 is a detailed flow of FIG. 4, and a write control flow for inverting the address number will be described with reference to FIG.
この場合のフローは基本的には図5と同じであるが、レジスタA407とレジスタB408へのアドレス指定に特徴があり、図5のステップS503の次からを詳細に示す。
The flow in this case is basically the same as that in FIG. 5, but is characterized by addressing to the
図8において、ステップS801は書き込み保護装置401がIDLE(休止)状態に置かれ書き込みが禁止されたステップ、ステップS802はレジスタA407が試験データを取り込みデータAとして保持するステップ、ステップS803はCPU402がデータAを読み出すステップ、ステップS804はCPU402が試験データの書き込み指令を出すステップ、ステップS805は指令されたアドレス番号がレジスタBにあるかどうかを判断するステップ、ステップS806はCPU402がデータを反転しレジスタB408に書き込みデータBとして記憶するステップ、ステップS807はデータAの反転とデータBの一致を判断するステップ、ステップS808はCPU402に異常を通知し、書き込み保護装置401をIDLE状態にリセットするステップ、ステップS809は書き込みを許可するステップ、ステップS810はCPU402が情報データ書き込みを指令するステップ、ステップS811は書き込み指令されたアドレスが保護レジスタかどうかを判断するステップ、ステップS812は保護レジスタに書き込むステップ、ステップS813はIDLE(休止)状態にリセットするステップをそれぞれ示す。ステップS813の次は、図5のステップS502に帰り、CPU402の次の書き込みデータ生成に対応する。
In FIG. 8, step S801 is a step in which the
実施例2において書き込みアドレス番号を反転して指定し書き込み制御する動作を、図8の書き込み制御のフローと図4の構成図を用いて説明する。 The operation of inverting and specifying the write address number in the second embodiment will be described with reference to the write control flow of FIG. 8 and the configuration diagram of FIG.
以下のステップにおいて記憶装置403へのデータの書き込み、および読み出しの制御はCPU402が行う。
In the following steps, the
ステップS801は、図5のステップS503でCPU402が書き込み指令したデータが保護データの場合の処理からの始まりを示し、書き込み保護装置401は書き込み禁止状態で休止しておりIDLE状態と称することとする。
Step S801 indicates the start from the processing in the case where the data commanded by the
ステップS802はレジスタA407が試験データを試験データ生成部409から供給され保持するステップで、レジスタA407に保持されたデータをデータAとする。ステップS802〜ステップS807は書き込み保護装置を検査しているプロセスで、書き込み禁止状態でありSTATE1と称することとする。
Step S 802 is a step in which the
ステップS803では、CPU402はレジスタA407のアドレス番号を指定して保持されたデータAを読み出す。
In step S803, the
この場合のアドレスデータの例を図9に示す。図9のD91(16進データで5555)は予め設定されたレジスタA407のアドレス番号であり、CPU402によりアドレスデコード部404、データ判定部406を介してレジスタA407に通知され、レジスタA407のデータAがCPU402に読み出される。
An example of the address data in this case is shown in FIG. D91 (hexadecimal data 5555) in FIG. 9 is a preset address number of the register A407. The
ステップS804では、CPU402がデータAを反転したデータBをレジスタB408に書き込むため、レジスタB408のアドレスである図9のD93(16進データでAAAA)を書き込み先アドレスとして指定する。
In step S804, in order for the
例えばこの書き込み先アドレス番号をCPU402からアドレスデコード部404に伝送するアドレスバスにおいて、16ビット目が0に固定される誤りを起こした場合、図9のD95(16進で2AAA)となり、レジスタB408の正しいアドレス番号(16進でAAAA)とは異なってしまう。
For example, in the address bus that transmits this write destination address number from the
ステップS805では、アドレスデコード部404がアドレスチェックを行い、STATE1においてCPU402から指令された書き込み先アドレス番号が、レジスタB408に設定されたアドレス番号(例えば16進でAAAA)と一致するかどうかを判断する。
In step S805, the
ステップS805がNoでレジスタB408でない場合、レジスタB408のアドレス(16進でAAAA)にはデータBが書き込まれないと判断し、スッテップS808に移行してCPU402に異常を通知し、書き込み保護装置はIDLEにリセットされる。YesでレジスタB408の場合は、ステップS806に移る。
If step S805 is No and not the register B408, it is determined that the data B is not written to the address of the register B408 (AAAA in hexadecimal), the process proceeds to step S808, the
ステップS806では、CPU402がデータAを反転したデータBを、レジスタB408に書き込む。
In step S806, the
ステップS807では、レジスタA407に記憶されたデータAのビットを反転バッファ414により反転されたデータとレジスタB408に記憶されたデータBとを、データ判定部406がハード的に比較する。このデータ比較においてCPU402は書き込みおよび読み出し処理は行わないで、直接データ判定部406がデータの比較を行う。
In step S807, the
ステップS807でNoの場合、データ判定部406は、正しい読み出しと書き込みが行われなかったと判断し、ステップS808に移行してCPU402に異常を通知し、書き込み保護装置はIDLEにリセットされる。
In the case of No in step S807, the
なお、ステップS807でNoの場合、レジスタA407のデータAの反転データとレジスタB408のデータBが一致しない原因として、データの読み出し、反転処理、書き込みにおけるデータ自身の誤りと、レジスタA407またはアドレスB408のアドレス番号の誤りがある。 In the case of No in step S807, the reason why the inverted data of the data A of the register A407 and the data B of the register B408 do not coincide is the error of the data itself in the data reading, inversion processing, and writing, and the register A407 or the address B408. There is an error in the address number.
書き込み先アドレス番号の誤りは、ステップS805によりアドレスデコード部404まではチェックされるが、アドレスデコード部404からデータ判定部406、レジスタB408までの障害は、このステップS807で検出される。
An error in the write destination address number is checked up to the
ステップS807でYesの場合は、試験データが正しく読み出され、正しく書き込みが行われたとして、ステップS809においてデータ判定部406が書き込み許可する。
In the case of Yes in step S807, the
この時、書き込み保護装置は書き込み許可状態になりSTATE2状態と称することとする。
At this time, the write protection device is in a write permission state and is referred to as a
ステップS810では、CPU402がアドレスデコード部404に対しデータの書き込みを指令する。
In step S810, the
ステップS811では、アドレスデコード部404が、CPU402により指令された書き込み先アドレスが保護レジスタ410にあるかどうかを判断する。
In
図8のこれまでのステップを通過した場合は、保護レジスタ410向けのものであり、その他のアドレス番号は書き込み先アドレスを誤った場合と判断する。 When the steps up to this point in FIG. 8 are passed, it is for the protection register 410, and other address numbers are determined to be incorrect write destination addresses.
ステップS811でNoの場合で指定アドレスが保護レジスタ410に無い場合、ステップS808に移行してCPU402に異常を通知し、書き込み保護装置はIDLEにリセットされる。
ステップS811でYesの場合で一致した場合で指定アドレスが保護レジスタ410にある場合、ステップS812に移り、CPU402より送られたデータは、保護レジスタ410の指定先アドレスに書き込まれる。
If the designated address is not in the protection register 410 in the case of No in step S811, the process proceeds to step S808 to notify the
If YES in step S811, if the designated address is in the protection register 410, the process proceeds to step S812, and the data sent from the
データの書き込みが終了すると、書き込み保護装置401はIDLE(書き込み禁止)状態にリセットされ、図5のステップS502に帰り、次にCPU402が生成する書き込みデータに対応する。
When the data writing is completed, the
従って、CPU402から保護レジスタ410へのデータの書き込みは、図8のS801から始まりS811ステップでyesまでのプロセスを通過した場合のみ実行される。
Therefore, the writing of data from the
従って、図8のフローによる保護レジスタ410への書き込みの許可は、CPU402、アドレスデコード部404、レジスタA407、レジスタB408、およびこれらを接続するアドレスバス、データバス、バス制御信号系が正常に動作している場合に行われる。
Therefore, permission to write to the protection register 410 according to the flow of FIG. 8 indicates that the
また、レジスタA407のアドレス番号を反転したアドレス番号がレジスタB408に対し設定されるので、STATE1におけるCPU402のアドレス指定が簡単であり短時間で行える。
(付記1)
プロセッサによるデータ書き込みを制御する書き込み保護装置において、
試験用データを記憶する第1の記憶手段と、
前記第1の記憶手段から前記試験用データの読み出しを行った前記プロセッサが、読み出したデータの書き込みを行う第2の記憶手段と、
前記第1の記憶手段に記憶された試験用データと前記第2の記憶手段に記憶されたデータとが一致するかを判断する判断手段と、
前記判断手段により一致すると判断されたとき前記プロセッサの第3の記憶手段へのデータ書き込みを許可する制御手段と、
を備えたことを特徴とする書き込み保護装置。
(付記2)
前記第1の記憶手段と前記第2の記憶手段が備えた記憶用のアドレスは、それぞれ1つであることを特徴とする付記1記載の書き込み保護装置。
(付記3)
前記判断手段は、前記第1の記憶手段と前記第2の記憶手段に直接接続された線路を介して、前記2つの記憶手段に記憶された試験用データを比較することを特徴とする付記1記載の書き込み保護装置。
(付記4)
前記第3の記憶手段に書き込まれたプロセッサのデータは、前記第1の記憶手段に記憶された試験用データと、前記プロセッサが前記第1の記憶手段から読み出し前記第2の記憶手段に書き込んだ試験用データとが一致したとき、前記制御手段により読み出しが許可されることを特徴とする付記1記載の書き込み保護装置。
(付記5)
前記プロセッサのデータのうち前記プロセッサが重要と判断したデータは、前記制御手段による書き込み許可に基づき前記記憶手段3に書き込まれ、重要でないと判断したデータは前記制御手段による書き込み許可なしで書き込まれる第4の記憶手段を備えたことを特徴とする付記1記載の書き込み保護装置。
(付記6)
プロセッサによるデータ書き込みを制御する書き込み保護装置において、
試験用データを記憶する第1の記憶手段と、
前記第1の記憶手段から前記試験用データの読み出しを行った前記プロセッサが、読み出したデータの各ビットを反転したデータの書き込みを行う第2の記憶手段と、
前記第1の記憶手段に記憶された試験用データの各ビットを反転したデータと前記第2の記憶手段に記憶されたデータとが一致するかを判断する判断手段と、
前記判断手段により一致すると判断されたとき前記プロセッサの第3の記憶手段へのデータ書き込みを許可する制御手段と、
を備えたことを特徴とする書き込み保護装置。
(付記7)
前記第1の記憶手段と前記第2の記憶手段が備えた記憶用のアドレスは、それぞれ1つであり、前記第2の記憶手段のアドレス番号は前記第1の記憶手段のアドレス番号の各ビットを反転したアドレス番号であることを特徴とする付記6記載の書き込み保護装置。
(付記8)
前記判断手段は、前記第1の記憶手段は極性反転回路を介し、前記第2の記憶手段は直接接続された線路を介して、前記2つの記憶手段に記憶された試験用データを比較することを特徴とする付記6記載の書き込み保護装置。
(付記9)
前記プロセッサのデータのうち前記プロセッサが重要と判断したデータは、前記制御手段による書き込み許可に基づき前記記憶手段3に書き込まれ、重要でないと判断したデータは前記制御手段による書き込み許可なしで書き込まれる第4の記憶手段を備えたことを特徴とする付記6記載の書き込み保護装置。
Further, since the address number obtained by inverting the address number of the register A407 is set for the register B408, the address designation of the
(Appendix 1)
In a write protection device for controlling data writing by a processor,
First storage means for storing test data;
A second storage means for writing the read data, wherein the processor that has read the test data from the first storage means;
Determining means for determining whether the test data stored in the first storage means and the data stored in the second storage means match;
A control means for permitting data writing to the third storage means of the processor when it is judged by the judging means that they match,
A write protection device comprising:
(Appendix 2)
The write protection device according to
(Appendix 3)
The determination unit compares the test data stored in the two storage units via a line directly connected to the first storage unit and the second storage unit. The write protector described.
(Appendix 4)
The processor data written in the third storage means is the test data stored in the first storage means, and the processor reads from the first storage means and writes it in the second storage means. The write protection device according to
(Appendix 5)
Of the data of the processor, the data judged as important by the processor is written in the storage means 3 based on the write permission by the control means, and the data judged not important is written without the write permission by the control means. 4. The write protection device according to
(Appendix 6)
In a write protection device for controlling data writing by a processor,
First storage means for storing test data;
A second storage means for writing the data obtained by inverting each bit of the read data, wherein the processor that has read the test data from the first storage means;
Determination means for determining whether data obtained by inverting each bit of the test data stored in the first storage means matches data stored in the second storage means;
A control means for permitting data writing to the third storage means of the processor when it is judged by the judging means that they match,
A write protection device comprising:
(Appendix 7)
The first storage means and the second storage means each have one storage address, and the address number of the second storage means is each bit of the address number of the first storage means. The write protection device according to appendix 6, wherein the address number is obtained by inverting the address number.
(Appendix 8)
The determination means compares the test data stored in the two storage means through the polarity inverting circuit and the second storage means through a directly connected line. The write protector according to appendix 6, wherein:
(Appendix 9)
Of the data of the processor, the data judged as important by the processor is written in the storage means 3 based on the write permission by the control means, and the data judged not important is written without the write permission by the control means. 4. The write protection device according to appendix 6, further comprising four storage means.
101 書き込み保護装置
102 CPU
103 記憶装置
104 アドレスデコード部
105 論理和部
106 レジスタA
108 レジスタB
109 試験データ生成部
110 保護レジスタ
111 保護無しレジスタ
112 バッファ
113 バッファ
114 バッファ
115 ゲート
116 ゲート
117 ゲート
118 ゲート
401 書き込み保護装置
402 CPU
403 記憶装置
404 アドレスデコード部
405 論理和部
406 データ判定部
407 レジスタA
408 レジスタB
409 試験データ生成部
410 保護レジスタ
411 保護無しレジスタ
412 バッファ
113 バッファ
414 反転バッファ
415 ゲート
416 ゲート
417 ゲート
418 ゲート
101 Write protector 102 CPU
103 Storage Device 104 Address Decoding Unit 105 OR Unit 106 Register A
108 Register B
109 Test
403
408 Register B
409 Test data generation unit 410
Claims (4)
試験用データを記憶する第1の記憶手段と、
前記第1の記憶手段から前記試験用データの読み出しを行った前記プロセッサが、読み出したデータの書き込みを行う第2の記憶手段と、
前記第1の記憶手段に記憶された試験用データと前記第2の記憶手段に記憶されたデータとが一致するかを判断する判断手段と、
前記判断手段により一致すると判断されたとき前記プロセッサの第3の記憶手段へのデータ書き込みを許可する制御手段と、
を備えたことを特徴とする書き込み保護装置。 In a write protection device for controlling data writing by a processor,
First storage means for storing test data;
A second storage means for writing the read data, wherein the processor that has read the test data from the first storage means;
Determining means for determining whether the test data stored in the first storage means and the data stored in the second storage means match;
A control means for permitting data writing to the third storage means of the processor when it is judged by the judging means that they match,
A write protection device comprising:
試験用データを記憶する第1の記憶手段と、
前記第1の記憶手段から前記試験用データの読み出しを行った前記プロセッサが、読み出したデータの各ビットを反転したデータの書き込みを行う第2の記憶手段と、
前記第1の記憶手段に記憶された試験用データの各ビットを反転したデータと前記第2の記憶手段に記憶されたデータとが一致するかを判断する判断手段と、
前記判断手段により一致すると判断されたとき前記プロセッサの第3の記憶手段へのデータ書き込みを許可する制御手段と、
を備えたことを特徴とする書き込み保護装置。 In a write protection device for controlling data writing by a processor,
First storage means for storing test data;
A second storage means for writing the data obtained by inverting each bit of the read data, wherein the processor that has read the test data from the first storage means;
Determination means for determining whether data obtained by inverting each bit of the test data stored in the first storage means matches data stored in the second storage means;
A control means for permitting data writing to the third storage means of the processor when it is judged by the judging means that they match,
A write protection device comprising:
The first storage means and the second storage means each have one storage address, and the address number of the second storage means is each bit of the address number of the first storage means. 4. The write protection apparatus according to claim 3, wherein the address number is obtained by inverting the address number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007051999A JP4910778B2 (en) | 2007-03-01 | 2007-03-01 | Write protector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007051999A JP4910778B2 (en) | 2007-03-01 | 2007-03-01 | Write protector |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008217268A true JP2008217268A (en) | 2008-09-18 |
JP4910778B2 JP4910778B2 (en) | 2012-04-04 |
Family
ID=39837255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007051999A Expired - Fee Related JP4910778B2 (en) | 2007-03-01 | 2007-03-01 | Write protector |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4910778B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012148729A (en) * | 2011-01-21 | 2012-08-09 | Kyosan Electric Mfg Co Ltd | Electronic terminal device and electronic interlocking device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01191400A (en) * | 1988-01-26 | 1989-08-01 | Seiko Instr & Electron Ltd | Ic with testing memory for rewriting |
JP2005050393A (en) * | 2003-07-29 | 2005-02-24 | Toshiba Lsi System Support Kk | Semiconductor device and its failure detection method |
JP2005122540A (en) * | 2003-10-17 | 2005-05-12 | Nec Saitama Ltd | Cpu device having wrong setting function |
-
2007
- 2007-03-01 JP JP2007051999A patent/JP4910778B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01191400A (en) * | 1988-01-26 | 1989-08-01 | Seiko Instr & Electron Ltd | Ic with testing memory for rewriting |
JP2005050393A (en) * | 2003-07-29 | 2005-02-24 | Toshiba Lsi System Support Kk | Semiconductor device and its failure detection method |
JP2005122540A (en) * | 2003-10-17 | 2005-05-12 | Nec Saitama Ltd | Cpu device having wrong setting function |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012148729A (en) * | 2011-01-21 | 2012-08-09 | Kyosan Electric Mfg Co Ltd | Electronic terminal device and electronic interlocking device |
Also Published As
Publication number | Publication date |
---|---|
JP4910778B2 (en) | 2012-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI344600B (en) | Circuitry for determining access permission | |
JP5535547B2 (en) | Secure memory interface | |
TWI384356B (en) | Method and system for validating a computer system | |
JP2007249323A (en) | Microcomputer | |
TWI393137B (en) | Semiconductor memory device and its driving method | |
JP2007535067A (en) | Intrusion detection during program execution on a computer | |
JP4910778B2 (en) | Write protector | |
KR100738969B1 (en) | Apparatus and method for controlling on-die termination of semiconductor memory | |
CN111630595A (en) | Memory device, memory address decoder, system and related methods for memory attack detection | |
JP2005063403A (en) | Operation mode control circuit, microcomputer including the same and control system using microcomputer | |
JP2007066232A (en) | Data processor | |
US7821846B2 (en) | Semiconductor memory device and its driving method | |
JP6070315B2 (en) | Register file device and information processing device | |
JP2007052481A (en) | Lsi for ic card | |
KR20190062913A (en) | Semiconductor Memory Apparatus | |
JP2005292959A (en) | Nonvolatile memory module and nonvolatile memory system | |
JP2018525712A (en) | Method and apparatus for protecting the program counter structure of a processor system and method and apparatus for monitoring the processing of interrupt requests | |
JP2016066344A (en) | Memory diagnostic circuit | |
JP2005092344A (en) | Semiconductor device | |
JP5070137B2 (en) | Storage device and data writing device | |
JP5140512B2 (en) | Storage device | |
JP2005085398A (en) | Nonvolatile memory | |
JP2007293593A (en) | Memory self-test circuit and semiconductor device equipped with the same and ic card and memory self-test method | |
JP2009043036A (en) | Information protection system and information protection system for compact flash disk | |
KR20020054519A (en) | Applied Program Bungle Detection Apparatus and Method by Interrupt |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091110 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111013 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111018 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111201 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20111220 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120102 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150127 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |