JP2003203012A - Microcomputer device - Google Patents

Microcomputer device

Info

Publication number
JP2003203012A
JP2003203012A JP2002183755A JP2002183755A JP2003203012A JP 2003203012 A JP2003203012 A JP 2003203012A JP 2002183755 A JP2002183755 A JP 2002183755A JP 2002183755 A JP2002183755 A JP 2002183755A JP 2003203012 A JP2003203012 A JP 2003203012A
Authority
JP
Japan
Prior art keywords
access
flag
microcomputer device
volatile memory
memory
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
JP2002183755A
Other languages
Japanese (ja)
Inventor
Rie Ariga
理恵 有賀
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002183755A priority Critical patent/JP2003203012A/en
Publication of JP2003203012A publication Critical patent/JP2003203012A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer device capable of surely protecting data in a nonvolatile memory from the leak to a third person with unknown internal data by preventing the illicit read of data from the nonvolatile memory. <P>SOLUTION: This microcomputer device comprises a prohibiting flag 94 for prohibiting the read or write verify of the nonvolatile memory 92, for example, in the input of a power supply, and controls the read or write verify of the nonvolatile memory 92 to be released only when it is confirmed that the prohibiting flag 94 is eliminated by an eliminating verify. Accordingly, the microcode or data in the nonvolatile memory 92 cannot be externally indirectly accessed by the third person with unknown internal data, or decoded by use of any means by such a third person. The nonvolatile memory 92 is divided to blocks, and no prohibiting flag is provided for a block which does not need the read prohibition. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性メモリを
搭載したマイクロコンピュータ装置であって、その不揮
発性メモリに書き込まれたマイクロコード等のデータに
対する漏洩防止機能を有するマイクロコンピュータ装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer device equipped with a non-volatile memory and having a leakage prevention function for data such as microcode written in the non-volatile memory. .

【0002】[0002]

【従来の技術】従来から、不揮発性メモリを搭載したマ
イクロコンピュータ装置には、不揮発性メモリに書き込
まれたマイクロコード等のデータを第三者への漏洩から
保護するため、そのデータに対する漏洩防止機能を持た
せていた。
2. Description of the Related Art Conventionally, a microcomputer device having a nonvolatile memory has a function of preventing leakage of data such as microcode written in the nonvolatile memory in order to protect the data from being leaked to a third party. Had.

【0003】このような漏洩防止機能を有効にするため
に、マイクロコンピュータ装置において、不揮発性メモ
リに書き込まれたマイクロコード等のデータを読み出す
ために不揮発性メモリに対してアクセスする際には、そ
のアクセス方法として、製品に特有のIDコードをユー
ザが付与できるような回路を用いて、使用時にIDコー
ドとの一致を確認し、IDコードが一致すればアクセス
可能とする方法と、メモリに書かれているデータを外部
より入力して、それらの一致が確認できたらアクセス可
能とする方法とがあった。
In order to make such a leak prevention function effective, when accessing the non-volatile memory in order to read data such as microcode written in the non-volatile memory in the microcomputer device, As an access method, a circuit that allows the user to give an ID code unique to the product is used to check the match with the ID code when in use. There is a method of inputting the data from the outside and making it accessible if the matches can be confirmed.

【0004】以上のような従来のマイクロコンピュータ
装置について、その漏洩防止機能を有効にするために、
不揮発性メモリに書き込まれたマイクロコード等のデー
タを読み出すためのアクセス方法を、以下に説明する。
In order to enable the leakage prevention function of the conventional microcomputer device as described above,
An access method for reading data such as microcode written in the nonvolatile memory will be described below.

【0005】図16は従来のマイクロコンピュータ装置
の構成を示すブロック図である。このマイクロコンピュ
ータ装置では、例えば図16に示すように、製品固有の
IDコードを格納するためのIDコード用メモリ45を
備えて、このIDコード用メモリ45にはユーザが固有
のコードを予め書き込んでおき、不揮発性メモリ42の
読み出しおよび書き込みを行う際は、必ず外部よりID
コードを入力し、このIDコードについて、データバス
を通じて、比較器49により製品のIDコード用メモリ
45のIDコードとの一致をとり、一致しないと不揮発
性メモリ42へはアクセスができないようにしている。
このような方式では、不揮発性メモリ42に書き込まれ
たマイクロコード等のデータが、製品固有のIDコード
が判らない第三者に対して漏洩する危険性は少なくな
る。
FIG. 16 is a block diagram showing the structure of a conventional microcomputer device. This microcomputer device is provided with an ID code memory 45 for storing a product-specific ID code, for example, as shown in FIG. 16, and a user writes a unique code in advance in the ID code memory 45. In addition, when reading and writing to the nonvolatile memory 42, be sure to use the ID from the outside.
A code is input, and this ID code is matched with the ID code of the product ID code memory 45 by the comparator 49 through the data bus, and if it does not match, the nonvolatile memory 42 cannot be accessed. .
In such a system, there is less risk that the data such as the microcode written in the non-volatile memory 42 will be leaked to a third party whose product-specific ID code is unknown.

【0006】一方、別のアクセス方法としては、不揮発
性メモリの書き換えを行う際には、メモリのデータは外
部へ一切出力せず、外部より入力されたデータとの比較
による一致あるいは不一致の結果のみを出力するように
している。このような方式では、不揮発性メモリに書き
込まれたマイクロコード等のデータを全く外部へ出力し
ないので、メモリの内容の判らない第三者に対してメモ
リの内容が漏洩する危険性は少なくなる。
On the other hand, as another access method, when the non-volatile memory is rewritten, the data in the memory is not output to the outside at all, but only the result of matching or non-matching by comparison with the data input from the outside is obtained. Is output. In such a system, data such as microcode written in the non-volatile memory is not output to the outside at all, so that the risk of leaking the contents of the memory to a third party who does not know the contents of the memory is reduced.

【0007】以上のようにして、従来のマイクロコンピ
ュータ装置では、その不揮発性メモリに書き込まれたマ
イクロコード等のデータを、製品固有のIDコードが判
らない第三者、あるいはメモリの内容の判らない第三者
への漏洩から保護するようにしている。
As described above, in the conventional microcomputer device, the data such as the microcode written in the non-volatile memory cannot be understood by the third party whose product-specific ID code is unknown, or the contents of the memory. I try to protect it from leakage to a third party.

【0008】[0008]

【発明が解決しようとする課題】しかしながら上記のよ
うな従来のマイクロコンピュータ装置では、IDコード
あるいはメモリの内容の判らない第三者に対してメモリ
の内容が漏洩する危険性は少なくなるが、IDコードや
データをそれらが一致するまで何度も繰り返し入力し、
最終的に一致した場合には、それを検知した時点で不揮
発性メモリへのアクセスが可能となり、不正に不揮発性
メモリからデータが読み出されてしまうことがある。
However, in the conventional microcomputer device as described above, the risk that the contents of the memory will be leaked to a third party whose ID code or contents of the memory cannot be known is reduced. Enter the code or data over and over until they match,
If they finally match, the non-volatile memory can be accessed at the time of detection, and data may be illegally read from the non-volatile memory.

【0009】したがって、IDコードあるいはメモリの
内容の判らない第三者に対するメモリ内容の漏洩を完全
になくすことができず、そのような第三者への漏洩か
ら、不揮発性メモリに書き込まれたマイクロコード等の
データを確実に保護することが難しいという問題点を有
していた。
Therefore, it is impossible to completely prevent the leakage of the memory contents to a third party whose ID code or the contents of the memory are unknown, and the micro-program written in the non-volatile memory from such leakage to the third party. There is a problem that it is difficult to reliably protect data such as codes.

【0010】本発明は、上記従来の問題点を解決するも
ので、不揮発性メモリから不正にデータが読み出されな
いようにして、IDコードあるいはメモリの内容の判ら
ない第三者に対するメモリ内容の漏洩を完全になくすこ
とができ、そのような第三者への漏洩から、不揮発性メ
モリに書き込まれたマイクロコード等のデータを確実に
保護することができるマイクロコンピュータ装置を提供
する。
The present invention solves the above-mentioned problems of the prior art by preventing unauthorized reading of data from a non-volatile memory and leaking memory contents to a third party whose ID code or memory contents are unknown. There is provided a microcomputer device capable of completely eliminating the above, and reliably protecting data such as a microcode written in a non-volatile memory from such leakage to a third party.

【0011】[0011]

【課題を解決するための手段】上記の課題を解決するた
めに本発明のマイクロコンピュータ装置は、各種機能動
作するためのマイクロコード等の各種データを格納する
不揮発性メモリを搭載したマイクロコンピュータ装置で
あって、前記不揮発性メモリに対するアクセスを制御す
るときに前記アクセスの許可を与えるためのフラッグ
と、前記フラッグの状態により前記不揮発性メモリに対
するアクセスを制御するとともに、前記不揮発性メモリ
の内容を消去した後にのみ前記フラッグが前記不揮発性
メモリに対するアクセスを許可するように制御する制御
部とを設けた構成としたことを特徴とする。
In order to solve the above-mentioned problems, a microcomputer device of the present invention is a microcomputer device equipped with a non-volatile memory for storing various data such as a microcode for operating various functions. There is a flag for granting the access permission when controlling the access to the non-volatile memory, and the access to the non-volatile memory is controlled according to the state of the flag, and the contents of the non-volatile memory are erased. And a control unit for controlling the flag so as to permit access to the nonvolatile memory only later.

【0012】以上により、例えば電源投入時にメモリの
読み出しあるいは書き込みベリファイを禁止するフラッ
グに対して、メモリへの消去ベリファイでメモリの消去
が確認されない限り、メモリの読み出しあるいは書き込
みベリファイの禁止が解除されないように制御を行うこ
とにより、不揮発性メモリ内のマイクロコードやデータ
に対して、IDコードあるいはメモリの内容の判らない
第三者による外部からの間接的なアクセスをも不可能に
し、そのような第三者によるどのような手段での解読も
不可能にすることができる。
From the above, for example, with respect to the flag for prohibiting the read or write verification of the memory when the power is turned on, the prohibition of the read or write verify of the memory is not released unless the erase of the memory is confirmed by the erase verify of the memory. By controlling the above, the indirect access from the outside to the microcode and the data in the non-volatile memory by the third party whose ID code or the contents of the memory is unknown is also impossible. Decryption by any means by the three can be made impossible.

【0013】[0013]

【発明の実施の形態】本発明の請求項1に記載のマイク
ロコンピュータ装置は、各種機能動作するためのマイク
ロコード等の各種データを格納する不揮発性メモリを搭
載したマイクロコンピュータ装置であって、前記不揮発
性メモリに対するアクセスを制御するときに前記アクセ
スの許可を与えるためのフラッグと、前記フラッグの状
態により前記不揮発性メモリに対するアクセスを制御す
るとともに、前記不揮発性メモリの内容を消去した後に
のみ前記フラッグが前記不揮発性メモリに対するアクセ
スを許可するように制御する制御部とを設けた構成とす
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A microcomputer device according to claim 1 of the present invention is a microcomputer device equipped with a non-volatile memory for storing various data such as a microcode for operating various functions. A flag for granting the access permission when controlling the access to the non-volatile memory, and controlling the access to the non-volatile memory according to the state of the flag, and the flag only after erasing the contents of the non-volatile memory. And a control unit for controlling so as to permit access to the nonvolatile memory.

【0014】請求項2に記載のマイクロコンピュータ装
置は、請求項1に記載の不揮発性メモリの全領域を複数
の消去単位ブロックに分割し、フラッグを、前記複数の
消去単位ブロックのそれぞれに対して1対1で独立して
存在するよう構成するとともに、制御部を、前記複数の
消去単位ブロックの内容をそれぞれ個々に消去した後
に、当該消去単位ブロックに対応した前記フラッグが前
記当該消去単位ブロックに対するアクセスを許可するよ
うに制御するよう構成する。
A microcomputer device according to a second aspect divides the entire area of the nonvolatile memory according to the first aspect into a plurality of erase unit blocks, and a flag is provided for each of the plurality of erase unit blocks. The control unit erases the contents of each of the plurality of erase unit blocks individually, and then the flag corresponding to the erase unit block is associated with the erase unit block. Configure to control to allow access.

【0015】請求項3に記載のマイクロコンピュータ装
置は、請求項1に記載の制御部を、不揮発性メモリに書
き込むデータが検査用テストパターンである時は、フラ
ッグが前記不揮発性メモリに対するアクセスを許可する
ように制御するよう構成する。
According to a third aspect of the present invention, there is provided a microcomputer device, wherein when the data to be written in the non-volatile memory by the control section according to the first aspect is a test pattern for inspection, a flag permits access to the non-volatile memory. It is configured to control so that

【0016】請求項4に記載のマイクロコンピュータ装
置は、請求項1に記載の制御部を、Vt制御タイプのメ
モリを使用したFPGAにより構成する。請求項5に記
載のマイクロコンピュータ装置は、請求項1に記載のフ
ラッグを、チップ固有情報領域に格納した制御信号によ
り不揮発性メモリに対するアクセスを許可するのみで、
前記不揮発性メモリへのアクセスの状態によっては、前
記不揮発性メモリに対するアクセスを許可することのな
いよう構成する。
According to a fourth aspect of the present invention, there is provided a microcomputer device in which the control section according to the first aspect is constituted by an FPGA using a Vt control type memory. The microcomputer device according to claim 5 only permits access to the nonvolatile memory by a control signal that stores the flag according to claim 1 in a chip-specific information area.
Depending on the state of access to the non-volatile memory, access to the non-volatile memory is not permitted.

【0017】請求項6に記載のマイクロコンピュータ装
置は、請求項2に記載の制御部を、アクセス制限の必要
なブロックに関してのみアクセス制限のフラッグを有効
とし、その他のブロックに関してはアクセスを許可する
ように制御するよう構成する。
According to a sixth aspect of the present invention, the microcomputer device of the second aspect enables the control unit according to the second aspect to enable the access restriction flag only for blocks that require access restriction and permit access for other blocks. It is configured to control.

【0018】請求項7に記載のマイクロコンピュータ装
置は、請求項6に記載のマイクロコンピュータ装置であ
って、アクセス制限の必要なブロックに関してのみアク
セス制限のフラッグを備え、その他のブロックに関して
は前記フラッグを設けず、制御部を、前記フラッグが設
けられていないブロックに対しては、フラッグの確認な
しにアクセスを許可するように制御するよう構成する。
According to a seventh aspect of the present invention, there is provided a microcomputer apparatus according to the sixth aspect, which is provided with an access restriction flag only for a block that requires access restriction, and has the flag for other blocks. If not provided, the control unit is configured to control access to the block not provided with the flag without confirming the flag.

【0019】請求項8に記載のマイクロコンピュータ装
置は、請求項1から請求項7のいずれかに記載のマイク
ロコンピュータ装置であって、同一基板上もしくは同一
パッケージ上に、電源投入時にアクセス禁止フラッグを
有効にしてメモリアクセスを禁止するパワーオンクリア
手段を設け、前記パワーオンクリア手段を、電源投入時
にマイクロコンピュータの動作とは無関係に禁止フラッ
グを有効にするように制御するよう構成する。
The microcomputer device according to claim 8 is the microcomputer device according to any one of claims 1 to 7, wherein an access prohibition flag is provided on the same substrate or the same package when the power is turned on. Power-on-clear means for enabling and prohibiting memory access is provided, and the power-on-clear means is configured to control the prohibition flag to be effective at power-on regardless of the operation of the microcomputer.

【0020】請求項9に記載のマイクロコンピュータ装
置は、請求項1から請求項7のいずれかに記載のマイク
ロコンピュータ装置であって、マイクロコンピュータ用
のシステムリセット信号に基づいて、アクセス禁止フラ
ッグを有効にしてメモリアクセスを禁止する手段を設
け、前記メモリアクセス禁止手段を、前記システムリセ
ット信号によってフラッグの禁止を行うように制御する
よう構成する。
According to a ninth aspect of the present invention, there is provided a microcomputer device according to any one of the first to seventh aspects, wherein the access prohibition flag is enabled based on a system reset signal for the microcomputer. Thus, means for prohibiting memory access is provided, and the memory access prohibition means is configured to be controlled to prohibit the flag by the system reset signal.

【0021】請求項10に記載のマイクロコンピュータ
装置は、請求項1から請求項7のいずれかに記載のマイ
クロコンピュータ装置であって、電源投入時にその出力
の論理値が常に同じになるように設計されたラッチ、フ
リップフロップなどを用いて、アクセス禁止フラッグを
有効にしてメモリアクセスを禁止する手段を設け、前記
メモリアクセス禁止手段を、電源投入時に常に同じ論理
値になってフラッグの禁止を行うように制御するよう構
成する。
According to a tenth aspect of the present invention, there is provided a microcomputer device according to any one of the first to seventh aspects, which is designed so that the logical value of its output is always the same when the power is turned on. Means for prohibiting memory access by enabling the access prohibition flag by using the latch, flip-flop, etc., so that the memory access prohibition means always has the same logical value when the power is turned on to prohibit the flag. It is configured to control.

【0022】これらの構成によると、例えば電源投入時
にメモリの読み出しあるいは書き込みベリファイを禁止
するフラッグに対して、メモリへの消去ベリファイでメ
モリの消去が確認されない限り、メモリの読み出しある
いは書き込みベリファイの禁止が解除されないように制
御を行うことにより、不揮発性メモリ内のマイクロコー
ドやデータに対して、IDコードあるいはメモリの内容
の判らない第三者による外部からの間接的なアクセスを
も不可能にし、そのような第三者によるどのような手段
での解読も不可能にする。
According to these configurations, for example, with respect to the flag for prohibiting the reading or writing verification of the memory when the power is turned on, the reading or writing verification of the memory is prohibited unless the erasing of the memory confirms the erasing of the memory. By controlling so as not to be released, indirect access from outside to the microcode and data in the non-volatile memory by a third party whose ID code or the contents of the memory is unknown is also impossible. It makes it impossible for a third party to decipher by any means.

【0023】以下、本発明の実施の形態を示すマイクロ
コンピュータ装置について、図面を参照しながら具体的
に説明する。 (実施の形態1)本発明の実施の形態1のマイクロコン
ピュータ装置を説明する。
A microcomputer device showing an embodiment of the present invention will be specifically described below with reference to the drawings. (Embodiment 1) A microcomputer device according to Embodiment 1 of the present invention will be described.

【0024】図1は本実施の形態1のマイクロコンピュ
ータ装置の構成を示すブロック図である。本実施の形態
のマイクロコンピュータ装置は、図1に示すように、マ
イクロコンピュータ(CPU)1と、不揮発性メモリ2
と、インターフェース3と、不揮発性メモリ2からの読
み出し禁止を示すための禁止フラッグ4と、パワーオン
クリア信号発生手段5と、禁止フラッグ4を受けて不揮
発性メモリ2からの読み出しを禁止する制御回路6と、
不揮発性メモリ2に対する制御信号が入力される制御信
号入力バッファ7と、不揮発性メモリ2に対するアクセ
スアドレスが入力されるアドレス入力バッファ8とから
構成される。
FIG. 1 is a block diagram showing the configuration of the microcomputer device according to the first embodiment. As shown in FIG. 1, the microcomputer device of the present embodiment includes a microcomputer (CPU) 1 and a non-volatile memory 2.
An interface 3, an inhibition flag 4 for indicating inhibition of reading from the non-volatile memory 2, a power-on-clear signal generating means 5, and a control circuit for inhibiting the reading from the non-volatile memory 2 by receiving the inhibition flag 4. 6 and
It comprises a control signal input buffer 7 into which a control signal for the non-volatile memory 2 is input, and an address input buffer 8 into which an access address for the non-volatile memory 2 is input.

【0025】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。本実施
の形態1のマイクロコンピュータ装置においては、当該
ユーザにより通常的に組み込まれた機器での機能動作を
実行する通常動作モードの場合は、不揮発性メモリ2か
らのデータを、データバスを通じて同一チップ内のマイ
クロコンピュータ(CPU)1に対して転送しながら、
そのマイクロコンピュータ(CPU)1により上記機能
動作のためのプログラムを実行している。
The operation of the microcomputer device configured as described above will be described below. In the microcomputer device according to the first embodiment, in the normal operation mode in which the device normally incorporated by the user executes the functional operation, the data from the non-volatile memory 2 is sent to the same chip through the data bus. While transferring to the internal microcomputer (CPU) 1
The microcomputer (CPU) 1 executes a program for the above functional operation.

【0026】しかし、不揮発性メモリ2の書き換えを行
う場合には、組み込まれた機器上またはチップ単体で、
専用の書き換え装置と接続して不揮発性メモリ2のデー
タを書き換えることが可能であり、この状態では、不揮
発性メモリ2内のデータを外部に直接出力することが可
能である。この場合、ユーザによる通常動作モードとは
異なる不揮発性メモリ2への書き換えモードとなる。
However, when the non-volatile memory 2 is rewritten, it is possible to use the built-in device or the chip itself as a unit.
It is possible to rewrite the data in the non-volatile memory 2 by connecting to a dedicated rewriting device, and in this state, the data in the non-volatile memory 2 can be directly output to the outside. In this case, the rewriting mode for the nonvolatile memory 2 is different from the normal operation mode by the user.

【0027】この特殊な書き換えモード時には、禁止フ
ラッグ4は、電源投入時に例えば不揮発性メモリ2に対
する読み出し禁止状態および書き込みベリファイ禁止状
態を示すように設定される。この書き込みベリファイと
は、不揮発性メモリ2への書き込み後のデータが、その
読み出し時に充分に信頼性が得られるようなマージンを
持っていることを、確認するための特殊な読み出しのこ
とを示す。
In this special rewrite mode, the prohibition flag 4 is set to indicate, for example, a read prohibition state and a write verify prohibition state with respect to the nonvolatile memory 2 when the power is turned on. The write verify refers to a special read for confirming that the data after writing to the non-volatile memory 2 has a margin such that sufficient reliability can be obtained at the time of reading.

【0028】上記のような禁止フラッグ4によって、書
き換えモードであるにも関わらず、不揮発性メモリ2か
らのデータの読み出し、または書き込みベリファイによ
る不揮発性メモリ2へのデータ入力後の一致を確認する
比較動作が不可能となる。禁止フラッグ4による禁止の
かかっている状態で、読み出しや書き込みベリファイを
行うと、不揮発性メモリ2から読み出されたデータとし
て、不揮発性メモリ2の状態に関わらず全てが論理
“1”以外の任意の値を出力するように、制御回路6に
より制御する。
By the prohibition flag 4 as described above, a comparison is performed to confirm the coincidence after the data is read from the nonvolatile memory 2 or the data is input to the nonvolatile memory 2 by the write verify even in the rewrite mode. It becomes impossible to operate. When read or write verify is performed in a state in which the inhibition by the inhibition flag 4 is applied, all the data read from the nonvolatile memory 2 is arbitrary except the logic "1" regardless of the state of the nonvolatile memory 2. The control circuit 6 controls to output the value of.

【0029】出力データが全て論理“1”とすると、現
在の状態が禁止されているのか消去されているのかの判
定を誤る可能性があるため、全てが論理“1”のデータ
は出力しないようにしている。なお、各禁止状態での出
力データを論理“1”以外とする中でも、特に全てのデ
ータを論理“0”に制御することが、回路の負担が少な
く汎用のメモリ書き換え装置との相性も良い。
If all the output data are logic "1", it may be erroneously determined whether the current state is prohibited or erased. Therefore, all data which is logic "1" should not be output. I have to. Even when the output data in each prohibited state is other than logic "1", controlling all data to logic "0" is particularly compatible with a general-purpose memory rewriting device because the load on the circuit is small.

【0030】次に、禁止フラッグ4における禁止状態の
解除であるが、不揮発性メモリ2のデータが全て消去さ
れて書き換えが可能な状態、つまり消去状態になってい
ることが確認されたときにのみ解除を行う。そのため、
不揮発性メモリ2に対する消去ベリファイを行う。この
消去ベリファイとは、不揮発性メモリ2の消去後のデー
タが読み出し時に信頼性的なマージンを持っていること
を確認するための特殊な読み出しのことで、書き込みと
異なり読み出しデータは通常論理1を示す。
Next, the prohibition state of the prohibition flag 4 is released, but only when it is confirmed that all the data in the nonvolatile memory 2 is erased and rewritable, that is, the erased state is confirmed. Cancel. for that reason,
Erase verify is performed on the nonvolatile memory 2. The erase verify is a special read for confirming that the erased data in the nonvolatile memory 2 has a reliable margin at the time of read. Unlike write, read data usually has a logic 1 Show.

【0031】消去ベリファイにおいて、ベリファイの結
果がOKならOKの信号を受けて禁止フラッグ4におけ
る禁止状態を解除するが、ベリファイの結果がNGなら
禁止フラッグ4における禁止状態は解除されない。この
禁止状態を解除するためには、不揮発性メモリ2を消去
することにより消去ベリファイをOKとしなければなら
ない。
In the erase verify, if the verify result is OK, an OK signal is received to release the prohibition state in the prohibition flag 4, but if the verification result is NG, the prohibition state in the prohibition flag 4 is not released. In order to remove this prohibition state, the erase verify must be OK by erasing the nonvolatile memory 2.

【0032】つまり、禁止フラッグ4における禁止状態
を解除する目的で消去ベリファイをOKとするために不
揮発性メモリ2を消去すれば、当然、それまで不揮発性
メモリ2に格納されていたマイクロコード等のデータが
消去されてしまい、結果的に、それらのデータは、当該
ユーザ以外で無関係な第三者には解読されないことにな
る。
That is, if the non-volatile memory 2 is erased in order to make the erase verify OK for the purpose of canceling the prohibition state in the prohibition flag 4, the microcode etc. stored in the non-volatile memory 2 up to that time will naturally be erased. The data will be erased, and as a result, the data will not be decrypted by an unrelated third party other than the user.

【0033】図2は本実施の形態1のマイクロコンピュ
ータ装置における書き換え動作のシーケンスを示すフロ
ーチャートである。図2のフローチャートで示すシーケ
ンスでは、まず電源投入によりパワーオンクリア信号発
生手段5からの信号で禁止フラッグ4に読み出し禁止を
示すデータを設定する(ステップ201)。次に、不揮
発性メモリ2の内容が消去状態になっているかを確認す
るため消去ベリファイを実行する(ステップ202)。
もし消去状態になっていなければ、不揮発性メモリ2の
メモリ消去を実行して(ステップ203)、再度、消去
ベリファイを実行する(ステップ202)。
FIG. 2 is a flowchart showing the sequence of the rewriting operation in the microcomputer device of the first embodiment. In the sequence shown in the flowchart of FIG. 2, first, when the power is turned on, the signal from the power-on-clear signal generating means 5 is used to set the data indicating the inhibition of reading in the inhibition flag 4 (step 201). Next, erase verify is executed to confirm whether the content of the nonvolatile memory 2 is in the erased state (step 202).
If it is not in the erased state, the memory erase of the nonvolatile memory 2 is executed (step 203), and the erase verify is executed again (step 202).

【0034】ここで、不揮発性メモリ2の消去ベリファ
イがOKとなると(ステップ202)、禁止フラッグ4
はオフとなり読み出し禁止を解除する(ステップ20
4)。その後、消去された不揮発性メモリ2に書き込み
あるいは読み出しなど通常のアクセスを行い、必要なマ
イクロコードの書き込みを実行して(ステップ205)
終了する。
When the erase verify of the nonvolatile memory 2 is OK (step 202), the inhibition flag 4
Turns off and cancels the read prohibition (step 20).
4). After that, the erased nonvolatile memory 2 is subjected to normal access such as writing or reading, and the necessary microcode is written (step 205).
finish.

【0035】以上に述べたように、本実施の形態によれ
ば、外部からコードやメモリデータを間接的にもアクセ
スができないような構成となっているため、従来のよう
に、繰り返しのデータ一致などの手段での解読も不可能
である。また、チップ毎にIDコードを設定するための
メモリも不用とすることができる。 (実施の形態2)本発明の実施の形態2のマイクロコン
ピュータ装置を説明する。
As described above, according to the present embodiment, since the code and the memory data cannot be indirectly accessed from the outside, the repeated data matching can be performed as in the conventional case. It is impossible to decipher by such means. Further, a memory for setting an ID code for each chip can be dispensed with. (Second Embodiment) A microcomputer device according to a second embodiment of the present invention will be described.

【0036】図3は本実施の形態2のマイクロコンピュ
ータ装置の構成を示すブロック図である。図3におい
て、11はCPUであり、マイクロコンピュータ装置全
体の制御を行う。12は不揮発性メモリであり、全領域
が複数の消去単位ブロックに分割され、各消去単位ブロ
ック毎にマイクロコードを格納する不揮発性メモリアレ
イブロック(0)〜(4)と、書き込み回路および読み
出し回路と、データバスに対してデータの入出力をバッ
ファリングする入出力バッファと、アクセスアドレスを
デコードするデコーダとで構成される。13はインター
フェースであり、外部からマイクロコードを入力したり
内部信号を外部に出力するためのインターフェースの役
割を果たす。14は禁止フラッグであり、不揮発性メモ
リアレイブロック(0)〜(4)に対応する禁止フラッ
グ(0)〜(4)と、デコーダとで構成される。15は
パワーオンクリア信号発生手段であり、電源を投入した
時に、禁止フラッグ(0)〜(4)をリセットする。1
6は制御回路であり、入出力バッファの方向性、および
データ出力の有無を決定するための制御を行う。17は
制御信号入力バッファであり、外部からの制御信号をバ
ッファリングする。18はアドレス入力バッファであ
り、アクセスアドレスをバッファリングする。
FIG. 3 is a block diagram showing the configuration of the microcomputer device according to the second embodiment. In FIG. 3, reference numeral 11 denotes a CPU, which controls the entire microcomputer device. Reference numeral 12 denotes a non-volatile memory, the entire area of which is divided into a plurality of erasing unit blocks, and non-volatile memory array blocks (0) to (4) for storing a microcode for each erasing unit block, a writing circuit and a reading circuit. And an input / output buffer for buffering input / output of data with respect to the data bus, and a decoder for decoding the access address. An interface 13 serves as an interface for inputting a microcode from the outside and outputting an internal signal to the outside. Reference numeral 14 is a prohibition flag, which is composed of prohibition flags (0) to (4) corresponding to the nonvolatile memory array blocks (0) to (4) and a decoder. Reference numeral 15 is a power-on-clear signal generating means, which resets the prohibition flags (0) to (4) when the power is turned on. 1
Reference numeral 6 denotes a control circuit, which performs control for determining the directionality of the input / output buffer and the presence / absence of data output. A control signal input buffer 17 buffers a control signal from the outside. An address input buffer 18 buffers an access address.

【0037】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。本実施
の形態2のマイクロコンピュータ装置においては、不揮
発性メモリ12のデコーダと禁止フラッグ14のデコー
ダの各々でアドレスをデコードすることで、不揮発性メ
モリアレイの消去単位毎のブロックを認識して、禁止フ
ラッグ14で禁止されたブロックのみの読み出しを禁止
して、禁止フラッグ14の解除されているブロックは読
み出しおよび書き込みを可能にする。
The operation of the microcomputer device configured as described above will be described below. In the microcomputer device of the second embodiment, the decoder of the non-volatile memory 12 and the decoder of the prohibition flag 14 decode the address, thereby recognizing the block for each erase unit of the non-volatile memory array and prohibiting it. Only the block prohibited by the flag 14 is prohibited from being read, and the block in which the prohibit flag 14 is released enables reading and writing.

【0038】図4は本実施の形態2のマイクロコンピュ
ータ装置における書き換え動作のシーケンスを示すフロ
ーチャートである。図4のフローチャートで示すシーケ
ンスでは、まず電源投入によりパワーオンクリア信号発
生手段15からの信号で、禁止フラッグ14の全てに読
み出し禁止を示すデータを設定する(ステップ40
1)。次に、不揮発性メモリ12の書き込みを行いたい
ブロック、例えばブロック(0)の内容が消去状態にな
っているかを確認するため、消去ベリファイ(確認)を
実行する(ステップ402)。
FIG. 4 is a flowchart showing the sequence of the rewriting operation in the microcomputer device of the second embodiment. In the sequence shown in the flowchart of FIG. 4, first, when power is turned on, a signal from the power-on-clear signal generating means 15 is used to set data indicating read inhibition to all of the inhibition flags 14 (step 40).
1). Next, erase verification (confirmation) is executed in order to confirm whether the content of the block to be written in the nonvolatile memory 12, for example, the block (0) is in the erased state (step 402).

【0039】不揮発性メモリ12のブロック(0)が消
去状態になっておらず、ブロック(0)への書き込みを
行いたい場合は(ステップ405)、ブロック(0)の
消去を実行して(ステップ406)、再度、消去ベリフ
ァイを実行し、ブロック(0)の消去ベリファイがOK
となると(ステップ402)、ブロック(0)に対応す
る禁止フラッグ(0)をオフとし、ブロック(0)に対
する読み出し禁止を解除する(ステップ403)。
If the block (0) of the nonvolatile memory 12 is not in the erased state and it is desired to write to the block (0) (step 405), the block (0) is erased (step 406), erase verify is executed again, and erase verify of block (0) is OK.
When this happens (step 402), the inhibition flag (0) corresponding to the block (0) is turned off, and the read inhibition for the block (0) is released (step 403).

【0040】その後、不揮発性メモリ12の消去された
ブロック(0)に書き込みおよび読み出しなど通常のア
クセスを行い、ブロック(0)に対して必要なマイクロ
コードの書き込みを実行して(ステップ404)、次に
書き込みを行いたい例えばブロックnの消去ベリファイ
を行う。
Thereafter, the erased block (0) of the non-volatile memory 12 is subjected to normal access such as writing and reading, and the necessary microcode is written to the block (0) (step 404). Next, for example, erase verify of the block n to be written is performed.

【0041】以上のように、不揮発性メモリ12のブロ
ック(0)に対して行った手順を繰り返し、最後のブロ
ックまでアクセスし(ステップ407、408、41
0、411)、最後のブロックに対して必要なマイクロ
コードの書き込みを実行して(ステップ409)、終了
する。
As described above, the procedure performed for the block (0) of the nonvolatile memory 12 is repeated to access the last block (steps 407, 408, 41).
0, 411), the necessary microcode is written to the last block (step 409), and the process is terminated.

【0042】以上のように、禁止フラッグを不揮発性メ
モリのブロック毎に対応させて設け、既に消去されてい
るブロックへの読み出しおよび書き込みを可能にするこ
とで、例えば不揮発性メモリの全ての領域を再度書き換
えしなくても、必要なブロックのみの書き換えをおこな
うことにより、デバッグ中のマイクロコードの書き込み
を容易にし、また必要な部分のみ書き込みを行えばよい
ため、不揮発性メモリの書き換え時間を短縮することが
できる。
As described above, the inhibition flag is provided for each block of the non-volatile memory to enable reading and writing to the already erased block, so that, for example, all areas of the non-volatile memory are By rewriting only the necessary blocks without rewriting again, writing of microcode during debugging is facilitated, and only the necessary parts need to be written, so the rewriting time of the non-volatile memory is shortened. be able to.

【0043】なお、本シーケンスでは、たまたまブロッ
ク(0)から順番に書き込みを行うように表現している
が、ブロックのアクセス順は、任意に選択して実行する
ことも可能である。 (実施の形態3)本発明の実施の形態3のマイクロコン
ピュータ装置を説明する。
In the present sequence, writing is performed so that it happens to sequentially start from the block (0), but the access order of the blocks can be arbitrarily selected and executed. (Third Embodiment) A microcomputer device according to a third embodiment of the present invention will be described.

【0044】本実施の形態3のマイクロコンピュータ装
置は、構成的には図1に示す場合と同様に、マイクロコ
ンピュータ(CPU)1と、不揮発性メモリ2と、イン
ターフェース3と、読み出し禁止フラッグ4と、パワー
オンクリア信号発生手段5と、禁止フラッグ4を受けて
読み出しを禁止する制御回路6と、不揮発性メモリの制
御信号の入力バッファ7と、アドレスバッファ8とで構
成される。
The microcomputer device of the third embodiment is structurally similar to the case shown in FIG. 1, and includes a microcomputer (CPU) 1, a non-volatile memory 2, an interface 3, and a read prohibition flag 4. , A power-on-clear signal generating means 5, a control circuit 6 for inhibiting reading by receiving the inhibition flag 4, an input buffer 7 for a control signal of a non-volatile memory, and an address buffer 8.

【0045】本実施の形態3のマイクロコンピュータ装
置においては、禁止フラッグ4の解除のためには、不揮
発性メモリ2の消去状態のみならず、検査に必要なデー
タの内容、例えば全て論理“0”である場合や、チェッ
カーパターンのようにアドレスで交互に論理“1”と論
理“0”が出力されるようなパターンなどの特殊なテス
トパターンの場合は、禁止フラッグ4を解除するように
している。
In the microcomputer device of the third embodiment, in order to release the prohibition flag 4, not only the erased state of the non-volatile memory 2 but also the content of data necessary for the inspection, for example, all logic "0". In the case of a special test pattern such as a checker pattern in which a logical "1" and a logical "0" are alternately output by an address like a checker pattern, the prohibition flag 4 is released. .

【0046】図5は本実施の形態3のマイクロコンピュ
ータ装置における書き換え動作のシーケンスを示すフロ
ーチャートである。図5のフローチャートで示すシーケ
ンスでは、まず電源投入により、パワーオンクリア信号
発生手段5からの信号で、禁止フラッグ4に読み出し禁
止を示すデータを設定する(ステップ501)。次に、
不揮発性メモリ2の内容が消去状態になっているかを確
認するため、消去ベリファイを実行する(ステップ50
2)。
FIG. 5 is a flowchart showing the sequence of the rewriting operation in the microcomputer device of the third embodiment. In the sequence shown in the flowchart of FIG. 5, first, when the power is turned on, a signal from the power-on-clear signal generating means 5 is used to set data indicating the read prohibition in the prohibition flag 4 (step 501). next,
In order to confirm whether the content of the non-volatile memory 2 is in the erased state, erase verify is executed (step 50).
2).

【0047】もし消去状態になっていなければ、不揮発
性メモリ2内のデータがAll“0”パターン状態か
(ステップ503)、チェカーパターン状態か(ステッ
プ504)、その他のテストパターン状態か(ステップ
505)など検査に使用する特殊な繰り返しパターン状
態であることを確認し、一致が取れなかったら、不揮発
性メモリ2の消去を実行して(ステップ506)再度消
去ベリファイを実行する(ステップ502)。
If the data is not in the erased state, the data in the non-volatile memory 2 is the All "0" pattern state (step 503), the checker pattern state (step 504), or another test pattern state (step 505). ) And the like are confirmed to be in a special repeated pattern state used for inspection, and if they do not match, the nonvolatile memory 2 is erased (step 506) and the erase verify is performed again (step 502).

【0048】消去ベリファイがOKまたは、検査用の各
種パターンとの一致が取れれば、禁止フラッグ4をオフ
とし、読み出し禁止を解除する(ステップ507)。そ
の後、消去された不揮発性メモリ2に書き込みおよび読
み出しなど通常のアクセスを行い、必要なマイクロコー
ドの書き込みを実行して(ステップ508)終了する。
When the erase verify is OK or coincides with the various inspection patterns, the inhibition flag 4 is turned off and the readout inhibition is released (step 507). After that, the erased nonvolatile memory 2 is subjected to normal access such as writing and reading, and the necessary microcode is written (step 508), and the process is terminated.

【0049】以上のようにして、読み出しがされても全
く問題の無いテスト・パターン等の場合は、開放されて
おり、検査の時間短縮によるコストパフォーマンスの向
上が図れる。 (実施の形態4)本発明の実施の形態4のマイクロコン
ピュータ装置を説明する。
As described above, in the case of a test pattern or the like in which there is no problem even if it is read out, it is opened, and the cost performance can be improved by shortening the inspection time. (Fourth Embodiment) A microcomputer device according to a fourth embodiment of the present invention will be described.

【0050】図6は本実施の形態4のマイクロコンピュ
ータ装置の構成を示すブロック図である。本実施の形態
のマイクロコンピュータ装置は、図6に示すように、マ
イクロコンピュータ(CPU)21と、不揮発性メモリ
22と、インターフェース23と、禁止フラッグ24
と、パワーオンクリア信号発生手段25と、禁止フラッ
グ24を受けて読み出しを禁止し、不揮発性メモリ22
の閾値を制御するFPGAからなる制御回路26と、不
揮発性メモリ22に対する制御信号を入力するための制
御信号入力バッファ27と、アドレス入力バッファ28
とで構成される。
FIG. 6 is a block diagram showing the configuration of the microcomputer device according to the fourth embodiment. As shown in FIG. 6, the microcomputer device of the present embodiment has a microcomputer (CPU) 21, a non-volatile memory 22, an interface 23, and a prohibition flag 24.
The power-on-clear signal generating means 25 and the prohibition flag 24 are used to prohibit reading, and the nonvolatile memory 22
A control circuit 26 including an FPGA for controlling the threshold value of, a control signal input buffer 27 for inputting a control signal to the non-volatile memory 22, and an address input buffer 28.
Composed of and.

【0051】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。本実施
の形態4のマイクロコンピュータ装置においては、制御
回路26が不揮発性メモリ22の閾値Vtで制御する構
成のFPGAとなっており、その制御ロジックは、FP
GAを構成するメモリの中に存在しているため、チップ
解析によって制御回路26内のメモリのデータを読み取
ることは不可能となり、特殊なテスト・モードによるメ
モリの開放のシーケンスは解読することができない。
The operation of the microcomputer device configured as described above will be described below. In the microcomputer device of the fourth embodiment, the control circuit 26 is an FPGA that is controlled by the threshold value Vt of the non-volatile memory 22, and its control logic is FP.
Since it exists in the memory which constitutes the GA, it becomes impossible to read the data in the memory in the control circuit 26 by the chip analysis, and the sequence of opening the memory in the special test mode cannot be decoded. .

【0052】従って、制御回路26内から解読されたメ
モリ開放のシーケンスにより不揮発性メモリ22の内容
が読み出されることを防ぐことができる。FPGAを構
成するメモリは、不揮発性メモリまたは、メモリセルの
製造過程で閾値Vtを制御する不純物の濃度を変えるこ
とで、メモリを読み出す際のゲート電圧に対して閾値を
ゲート電圧より高くしたメモリセルと、低くしたメモリ
セルの2種類の状態を作ることにより、データの“1”
または“0”を認識できるようにするものである。 (実施の形態5)本発明の実施の形態5のマイクロコン
ピュータ装置を説明する。
Therefore, it is possible to prevent the contents of the non-volatile memory 22 from being read by the memory opening sequence decoded from the control circuit 26. The memory that constitutes the FPGA is a non-volatile memory or a memory cell in which the threshold voltage is higher than the gate voltage when reading the memory by changing the concentration of impurities that control the threshold Vt in the manufacturing process of the memory cell. By creating two states of the lowered memory cell,
Alternatively, "0" can be recognized. (Fifth Embodiment) A microcomputer device according to a fifth embodiment of the present invention will be described.

【0053】図7は本実施の形態5のマイクロコンピュ
ータ装置の構成を示すブロック図である。本実施の形態
のマイクロコンピュータ装置は、図7に示すように、マ
イクロコンピュータ(CPU)31と、不揮発性メモリ
32と、インターフェース33と、初期情報レジスタ3
4と、制御回路35と、不揮発性メモリ32に対する制
御信号を入力するための制御信号入力バッファ36と、
アドレス入力バッファ37とで構成される。
FIG. 7 is a block diagram showing the configuration of the microcomputer device according to the fifth embodiment. As shown in FIG. 7, the microcomputer device of the present embodiment has a microcomputer (CPU) 31, a non-volatile memory 32, an interface 33, and an initial information register 3.
4, a control circuit 35, a control signal input buffer 36 for inputting a control signal to the nonvolatile memory 32,
It is composed of an address input buffer 37.

【0054】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。本実施
の形態5のマイクロコンピュータ装置においては、不揮
発性メモリ32において、初期情報レジスタ34上の冗
長アドレス情報や内部発生電源のトリミング情報など、
初期設定情報を格納するエリアに、読み出し禁止フラッ
グの設定情報を割り当てることで、専用の禁止フラッグ
やパワーオンクリア信号発生手段が不用となる。
The operation of the microcomputer device configured as described above will be described below. In the microcomputer device of the fifth embodiment, in the nonvolatile memory 32, redundant address information on the initial information register 34, trimming information of the internally generated power source, etc.
By assigning the setting information of the read prohibition flag to the area for storing the initial setting information, the exclusive prohibition flag and the power-on-clear signal generating means are unnecessary.

【0055】なお、禁止フラッグは初期設定のシーケン
スで設定され、その後の動作は、図2の場合と同様であ
る。図8は本実施の形態5のマイクロコンピュータ装置
における書き換え動作のシーケンスを示すフローチャー
トである。
The prohibition flag is set in the initial setting sequence, and the subsequent operation is the same as in the case of FIG. FIG. 8 is a flowchart showing the sequence of the rewriting operation in the microcomputer device of the fifth embodiment.

【0056】図8のフローチャートで示すシーケンスで
は、まず電源投入により、不揮発性メモリ32内の初期
情報格納エリアのデータ読み出しを行い、初期情報レジ
スタ34に設定する(ステップ801)。初期情報レジ
スタ34の任意のビットを読み出し禁止用に割り当てて
あるため、不揮発性メモリ32に対して読み出しの禁止
状態となる(ステップ802)。
In the sequence shown in the flowchart of FIG. 8, the power is first turned on to read the data from the initial information storage area in the nonvolatile memory 32 and set it in the initial information register 34 (step 801). Since an arbitrary bit of the initial information register 34 is assigned to read prohibition, the reading of the nonvolatile memory 32 is prohibited (step 802).

【0057】次に、不揮発性メモリ32の内容が消去状
態になっているかを確認するため消去ベリファイを実行
する(ステップ803)。もし消去状態になっていなけ
れば、不揮発性メモリ32の消去を実行して(ステップ
804)、再度、消去ベリファイを実行する(ステップ
803)。消去ベリファイがOKとなると、初期情報レ
ジスタ34の読み出し禁止ビットはオフとなり、読み出
し禁止を解除する(ステップ805)。
Next, erase verify is executed to confirm whether the contents of the non-volatile memory 32 are in the erased state (step 803). If it is not in the erased state, the nonvolatile memory 32 is erased (step 804) and the erase verify is performed again (step 803). When the erase verify is OK, the read prohibition bit of the initial information register 34 is turned off and the read prohibition is released (step 805).

【0058】その後、消去された不揮発性メモリ32に
書き込みおよび読み出しなど、通常のアクセスを行い、
必要なマイクロコードの書き込みを実行して(ステップ
806)終了する。
After that, the erased non-volatile memory 32 is subjected to normal access such as writing and reading,
The necessary microcode is written (step 806) and the process ends.

【0059】以上のように、禁止フラッグをチップ固有
の情報領域に格納し、制御信号により無効化すること
で、検査の自由度を上げると共に、万が一問題の起きた
場合の解析もデータを破壊することなく実行可能とな
る。 (実施の形態6)本発明の実施の形態6のマイクロコン
ピュータ装置を説明する。
As described above, by storing the prohibition flag in the information area peculiar to the chip and invalidating it by the control signal, the degree of freedom of the inspection is increased and the data is destroyed in the analysis in case of any problem. It can be executed without any (Sixth Embodiment) A microcomputer device according to a sixth embodiment of the present invention will be described.

【0060】図9は本実施の形態6のマイクロコンピュ
ータ装置の構成を示すブロック図である。図9におい
て、51はマイクロコンピュータ(CPU)であり、マ
イクロコンピュータ装置全体の制御を行う。52は不揮
発性メモリであり、全領域が複数の消去単位ブロックに
分割され、各消去単位ブロック毎にマイクロコードを格
納する不揮発性メモリアレイブロック(0)〜(n)
と、書き込み回路および読み出し回路と、データバスに
対してデータの入出力をバッファリングする入出力バッ
ファと、アクセスアドレスをデコードするデコーダとで
構成される。53はインターフェースであり、外部から
マイクロコードを入力したり内部信号を外部に出力する
ためのインターフェースの役割を果たす。54は禁止フ
ラッグであり、不揮発性メモリアレイブロック(0)〜
(n)に対応する禁止フラッグ(0)〜(n)と、デコ
ーダとで構成される。55はパワーオンクリア信号発生
手段であり、電源を投入した時に、禁止フラッグをリセ
ットする信号を発生する。56は制御回路であり、入出
力バッファの方向性、およびデータ出力の有無を決定す
るための制御を行う。57は制御信号入力バッファであ
り、外部からの制御信号をバッファリングする。58は
アドレス入力バッファであり、アクセスアドレスをバッ
ファリングする。59はセット信号設定回路であり、メ
モリアレイブロック(0)〜(n)のうち、禁止の必要
な例えばメモリアレイブロック(0)〜(1)の禁止フ
ラッグ(0)〜(1)には、パワーオンクリア信号によ
って禁止設定を行うよう信号を発生し、禁止の不用な例
えばメモリアレイブロック(2)〜(n)の禁止フラッ
グ(2)〜(n)には禁止の解除を行うような信号を発
生する。このように、禁止の必要な任意のブロックに対
して禁止フラッグを選択することが可能である。選択の
方法としては、禁止フラッグのセット信号の信号固定を
ハードワイヤーまたはヒューズ手段により設定する。
FIG. 9 is a block diagram showing the structure of the microcomputer device according to the sixth embodiment. In FIG. 9, reference numeral 51 denotes a microcomputer (CPU), which controls the entire microcomputer device. Reference numeral 52 denotes a non-volatile memory, the entire area of which is divided into a plurality of erase unit blocks, and a non-volatile memory array block (0) to (n) which stores a microcode for each erase unit block.
A write circuit and a read circuit, an input / output buffer for buffering data input / output with respect to a data bus, and a decoder for decoding an access address. Reference numeral 53 is an interface, which serves as an interface for inputting a microcode from the outside and outputting an internal signal to the outside. Reference numeral 54 is a prohibition flag, which is a nonvolatile memory array block (0) to
It is composed of prohibition flags (0) to (n) corresponding to (n) and a decoder. Reference numeral 55 is a power-on-clear signal generating means, which generates a signal for resetting the prohibition flag when the power is turned on. Reference numeral 56 denotes a control circuit, which performs control for determining the directionality of the input / output buffer and the presence / absence of data output. Reference numeral 57 is a control signal input buffer, which buffers a control signal from the outside. An address input buffer 58 buffers an access address. Reference numeral 59 denotes a set signal setting circuit, which includes, among the memory array blocks (0) to (n), the prohibition flags (0) to (1) of the memory array blocks (0) to (1) that need to be prohibited. A signal for generating a prohibition setting by a power-on-clear signal and for canceling prohibition, for example, for prohibition flags (2) to (n) of unnecessary memory array blocks (2) to (n). To occur. In this way, it is possible to select the prohibition flag for any block that needs to be prohibited. As a selection method, the signal fixation of the set signal of the prohibition flag is set by a hard wire or a fuse means.

【0061】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。本実施
の形態6のマイクロコンピュータ装置においては、不揮
発性メモリ52のデコーダと禁止フラッグ54のデコー
ダの各々でアドレスをデコードすることで、不揮発性メ
モリアレイの消去単位毎のブロックを認識して、禁止フ
ラッグ54で禁止されたブロックのみの読み出しを禁止
して、禁止フラッグ54の解除されているブロックは読
み出しおよび書き込みを可能にする。禁止フラッグ
(2)〜(n)に対応するブロックでは常に禁止が解除
されている状態なので、消去を行わなくても読出し、書
き込みが可能である。
The operation of the microcomputer device configured as described above will be described below. In the microcomputer device of the sixth embodiment, the decoder of the non-volatile memory 52 and the decoder of the prohibition flag 54 decode the address to recognize the block for each erase unit of the non-volatile memory array and prohibit it. Reading of only the block prohibited by the flag 54 is prohibited, and the block in which the prohibition flag 54 is released enables reading and writing. In the blocks corresponding to the prohibition flags (2) to (n), the prohibition is always released, so that reading and writing can be performed without erasing.

【0062】図10は本実施の形態6のマイクロコンピ
ュータ装置における書き換え動作のシーケンスを示すフ
ローチャートである。図10のフローチャートで示すシ
ーケンスでは、まず電源投入によりパワーオンクリア信
号発生手段55からの信号で、禁止フラッグ54のアク
セス制限をするブロックに対応した禁止フラッグに読み
出し禁止を示すデータを設定する(ステップ110
1)。次に、不揮発性メモリ52のアクセス制限のされ
ていないブロックに関しては(ステップ1102)、消
去、書き込み、読み出しを実施する(ステップ110
3)。アクセス制限されており書き込みを行いたいブロ
ック、例えばブロック(0)の内容が消去状態になって
いるかを確認するため、消去ベリファイ(確認)を実行
する(ステップ1104)。
FIG. 10 is a flowchart showing the sequence of the rewriting operation in the microcomputer device of the sixth embodiment. In the sequence shown in the flowchart of FIG. 10, first, when power is turned on, a signal from the power-on-clear signal generating means 55 is used to set data indicating read prohibition in a prohibition flag corresponding to a block that restricts access to the prohibition flag 54 (step). 110
1). Next, with respect to the block of the non-volatile memory 52 for which access is not restricted (step 1102), erase, write and read are executed (step 110).
3). Erase verify (confirmation) is executed in order to confirm whether the contents of the block whose access is restricted and which is desired to be written, for example, the block (0) is in the erased state (step 1104).

【0063】不揮発性メモリ52のブロック(0)が消
去状態になっておらず、ブロック(0)への書き込みを
行いたい場合は(ステップ1107)、ブロック(0)
の消去を実行して(ステップ1108)、再度、消去ベ
リファイを実行し、ブロック(0)の消去ベリファイが
OKとなると(ステップ1104)、ブロック(0)に
対応する禁止フラッグ(0)をオフとし、ブロック
(0)に対する読み出し禁止を解除する(ステップ11
05)。
If the block (0) of the nonvolatile memory 52 is not in the erased state and it is desired to write to the block (0) (step 1107), the block (0) is set.
Is erased (step 1108), the erase verify is performed again, and when the erase verify of the block (0) is OK (step 1104), the inhibition flag (0) corresponding to the block (0) is turned off. , Read protection for block (0) is released (step 11
05).

【0064】その後、不揮発性メモリ52の消去された
ブロック(0)に書き込みおよび読み出しなど通常のア
クセスを行い、ブロック(0)に対して必要なマイクロ
コードの書き込みを実行して(ステップ1106)、次
にアクセス制限がされていて書き込みを行いたい例えば
ブロック(1)の消去ベリファイを、ブロック(0)の
場合と同様に行う(ステップ1109、1112、11
13、1110、1111)。
Thereafter, the erased block (0) of the non-volatile memory 52 is subjected to normal access such as writing and reading, and the necessary microcode is written to the block (0) (step 1106). Next, for example, the erase verify of the block (1) whose access is restricted and is desired to be written is performed similarly to the case of the block (0) (steps 1109, 1112, 11).
13, 1110, 1111).

【0065】以上のように、不揮発性メモリ52のブロ
ック(0)に対して行った手順を繰り返し、最後のブロ
ックまでアクセスし、最後のブロックに対して必要なマ
イクロコードの書き込みを実行して(ブロック(1)の
消去ベリファイ動作と同様のステップ1109、111
2、1113、1110、1111を繰り返す)、終了
する。
As described above, the procedure for the block (0) of the non-volatile memory 52 is repeated, the last block is accessed, and the necessary microcode is written to the last block ( Steps 1109 and 111 similar to the erase verify operation of block (1)
(2, 1113, 1110, 1111 are repeated), and the process ends.

【0066】以上のように、禁止フラッグを不揮発性メ
モリのアクセス制限の必要なブロックのみに対応させて
設け、アクセス制限の必要無いブロックへの読み出しお
よび書き込みを可能にすることで、禁止フラッグの解除
の手続きが必要なブロックのみに対して行えば良いた
め、不揮発性メモリの書き換え時間を短縮することがで
きる。 (実施の形態7)本発明の実施の形態7のマイクロコン
ピュータ装置を説明する。
As described above, the prohibition flag is provided so as to correspond only to the block of the non-volatile memory in which access restriction is required, and reading and writing can be performed in the block in which access restriction is not required, thereby canceling the prohibition flag. Since it suffices to perform this procedure only for blocks that require the procedure, the rewriting time of the nonvolatile memory can be shortened. (Embodiment 7) A microcomputer device according to Embodiment 7 of the present invention will be described.

【0067】図11は本実施の形態7のマイクロコンピ
ュータ装置の構成を示すブロック図である。図11にお
いて、61はマイクロコンピュータ(CPU)であり、
マイクロコンピュータ装置全体の制御を行う。62は不
揮発性メモリであり、全領域が複数の消去単位ブロック
に分割され、各消去単位ブロック毎にマイクロコードを
格納する不揮発性メモリアレイブロック(0)〜(4)
と、書き込み回路および読み出し回路と、データバスに
対してデータの入出力をバッファリングする入出力バッ
ファと、アクセスアドレスをデコードするデコーダとで
構成される。63はインターフェースであり、外部から
マイクロコードを入力したり内部信号を外部に出力する
ためのインターフェースの役割を果たす。64は禁止フ
ラッグであり、不揮発性メモリアレイブロック(0)〜
(4)のうち、アクセス制限されるブロック(0)〜
(1)に対応する禁止フラッグ(0)〜(1)と、デコ
ーダとで構成される。65はパワーオンクリア信号発生
手段であり、電源を投入した時に、禁止フラッグ(0)
〜(1)をリセットする。禁止フラッグを解除するため
の信号は回路の設計によって異なる。66は制御回路で
あり、入出力バッファの方向性、およびデータ出力の有
無を決定するための制御を行う。67は制御信号入力バ
ッファであり、外部からの制御信号をバッファリングす
る。68はアドレス入力バッファであり、アクセスアド
レスをバッファリングする。
FIG. 11 is a block diagram showing the configuration of the microcomputer device according to the seventh embodiment. In FIG. 11, 61 is a microcomputer (CPU),
Controls the entire microcomputer device. Reference numeral 62 denotes a non-volatile memory, the entire area of which is divided into a plurality of erase unit blocks, and a non-volatile memory array block (0) to (4) for storing a microcode for each erase unit block.
A write circuit and a read circuit, an input / output buffer for buffering data input / output with respect to a data bus, and a decoder for decoding an access address. Reference numeral 63 denotes an interface, which serves as an interface for inputting a microcode from the outside and outputting an internal signal to the outside. Reference numeral 64 is a prohibition flag, which is a nonvolatile memory array block (0) to
Blocks (0) to (4) whose access is restricted
It is composed of prohibition flags (0) to (1) corresponding to (1) and a decoder. Reference numeral 65 is a power-on clear signal generating means, which is a prohibition flag (0) when the power is turned on.
~ Reset (1). The signal for clearing the inhibit flag depends on the circuit design. Reference numeral 66 denotes a control circuit, which performs control for determining the directionality of the input / output buffer and the presence / absence of data output. A control signal input buffer 67 buffers a control signal from the outside. 68 is an address input buffer for buffering access addresses.

【0068】以上のように構成されたマイクロコンピュ
ータ装置について、その動作を以下に説明する。実施の
形態7においては、実施の形態6との違いはアクセス禁
止ブロックに対応した禁止フラッグが必要なもの(禁止
フラッグ(0)、(1))のみに付加しており、不要な
回路(禁止フラッグ(2)〜(4))を削除している点
であり、動作は実施の形態6と同じである。
The operation of the microcomputer device configured as described above will be described below. In the seventh embodiment, the difference from the sixth embodiment is that the prohibition flags corresponding to the access prohibition blocks are added only to those requiring (prohibition flags (0) and (1)), and unnecessary circuits (prohibition flags are prohibited). The flags (2) to (4) are deleted, and the operation is the same as in the sixth embodiment.

【0069】以上のように、禁止フラッグを不揮発性メ
モリのアクセス制限の必要なブロックのみに対応させて
設け、アクセス制限の必要無いブロックへの禁止フラッ
グを無くして読み出しおよび書き込みを可能にすること
で、禁止フラッグの解除の手続きが必要なブロックのみ
に対して行えば良いため、不揮発性メモリの書き換え時
間を短縮し、かつチップ面積、不用回路を削除すること
で製造コスト(チップ面積小、歩留り向上)を減少する
ことができる。 (実施の形態8)本発明の実施の形態8のマイクロコン
ピュータ装置を説明する。ここでは、上記の実施の形態
1から7のマイクロコンピュータ装置において、電源投
入時にマイクロコンピュータの動作とは無関係に、禁止
フラッグを有効にするように制御する。
As described above, the prohibition flag is provided so as to correspond only to the block of the non-volatile memory where access restriction is required, and reading and writing can be performed by eliminating the prohibition flag to the block where access restriction is not required. Since it is only necessary to perform the procedure for releasing the prohibition flag for the blocks that require the non-volatile memory, the rewriting time of the non-volatile memory is shortened, and the chip area and unnecessary circuits are deleted to reduce the manufacturing cost (small chip area, improved yield). ) Can be reduced. (Embodiment 8) A microcomputer device according to Embodiment 8 of the present invention will be described. Here, in the microcomputer devices of the above-described first to seventh embodiments, the prohibition flag is controlled to be effective when the power is turned on, regardless of the operation of the microcomputer.

【0070】以上のような制御について以下に説明をす
る。図12にパワーオンクリア回路の一例を示す。図1
2において、71はノード73のレベルを電源電圧投入
時に電源電圧まで立ち上げる際に、立上りを遅延させる
ための抵抗、72はノード73のレベルを電源電圧投入
時に電源電圧まで立ち上げる際に、立上りを遅延させる
ための容量、74はノード73の波形を整形するための
インバーターである。
The above control will be described below. FIG. 12 shows an example of the power-on clear circuit. Figure 1
In FIG. 2, reference numeral 71 is a resistor for delaying the rise when the level of the node 73 is raised to the power supply voltage when the power supply voltage is turned on, and 72 is a resistor that rises when the level of the node 73 is raised to the power supply voltage when the power supply voltage is turned on. And 74 is an inverter for shaping the waveform of the node 73.

【0071】以上のように構成されたパワーオンクリア
回路について、その動作を以下に説明する。図13はパ
ワーオンクリア回路の動作タイミングを示す。電源81
が投入されて電源電圧が立ち上がるが、ノード73の信
号82は、抵抗71と容量72によって遅延して立ちあ
がる。この信号は、これを受けた波形整形回路74によ
って禁止フラッグセット信号83として整形され、論理
“L”の区間に禁止フラッグを有効にしてメモリアクセ
スを禁止する。また、消去、消去ベリファイ動作などに
よって禁止フラッグリセット信号84を発生し、T2〜
T3の期間に禁止フラッグを解除する。
The operation of the power-on-clear circuit configured as above will be described below. FIG. 13 shows the operation timing of the power-on-clear circuit. Power 81
Is turned on and the power supply voltage rises, but the signal 82 at the node 73 rises with a delay due to the resistor 71 and the capacitor 72. This signal is shaped as a prohibition flag set signal 83 by the waveform shaping circuit 74 which receives the signal, and the prohibition flag is enabled in the section of logic "L" to prohibit the memory access. In addition, the prohibit flag set signal 84 is generated by erasing, erasing verify operation, etc.
The prohibition flag is released during the period of T3.

【0072】以上のように、禁止フラッグを電源投入時
に有効にすることで、マイクロコンピュータが正常に動
作しなくても、メモリの外部への読出しを禁止すること
が可能となる。 (実施の形態9)本発明の実施の形態9のマイクロコン
ピュータ装置を説明する。ここでは、上記の実施の形態
1から7のマイクロコンピュータ装置において、禁止フ
ラッグをマイクロコンピュータ用のシステムリセット信
号によってフラッグの禁止を行うように制御する。
As described above, by enabling the prohibition flag when the power is turned on, it is possible to prohibit the reading of the memory to the outside even if the microcomputer does not operate normally. (Ninth Embodiment) A microcomputer device according to a ninth embodiment of the present invention will be described. Here, in the microcomputer devices of the above-described first to seventh embodiments, the prohibition flag is controlled so as to be prohibited by the system reset signal for the microcomputer.

【0073】以上のような制御について以下に説明をす
る。図14は実施の形態7で説明したマイクロコンピュ
ータ装置で、禁止フラッグ94を有効にするための信号
として、マイクロコンピュータ用のシステムリセット信
号を用いている。システムリセット信号は、マイクロコ
ンピュータが電源投入後正常な状態で動作を開始するた
めの初期状態設定信号であり、システムリセット信号を
入力しないと、マイクロコンピュータの制御による外部
からのメモリアクセスも不可能となる。
The above control will be described below. FIG. 14 shows the microcomputer device described in the seventh embodiment, which uses a system reset signal for the microcomputer as a signal for enabling the prohibition flag 94. The system reset signal is an initial state setting signal for the microcomputer to start operating in a normal state after the power is turned on. If the system reset signal is not input, external memory access under the control of the microcomputer is also impossible. Become.

【0074】以上のように、禁止フラッグをシステムリ
セット信号を用いて有効にすることで、マイクロコンピ
ュータの正常な動作と同時にメモリの外部への読出しを
禁止することが可能となる。マイクロコンピュータが正
常な動作を行わないとメモリが外部へ読み出せない場合
に有効な手段となる。 (実施の形態10)本発明の実施の形態10のマイクロ
コンピュータ装置を説明する。ここでは、上記の実施の
形態1から7のマイクロコンピュータ装置において、禁
止フラッグを電源投入時にマイクロコンピュータの動作
とは無関係に、パワーオンクリア手段を使用せずに禁止
フラッグを有効にするように制御する。
As described above, by enabling the prohibition flag by using the system reset signal, it becomes possible to prohibit normal reading of the memory at the same time as the normal operation of the microcomputer. This is an effective means when the memory cannot be read out to the outside unless the microcomputer operates normally. (Embodiment 10) A microcomputer apparatus according to Embodiment 10 of the present invention will be described. Here, in the microcomputer device of the above-described first to seventh embodiments, the prohibition flag is controlled so that the prohibition flag is enabled without using the power-on-clear means regardless of the operation of the microcomputer when the power is turned on. To do.

【0075】以上のような制御について以下に説明をす
る。図15に禁止フラッグのラッチ回路の一例を示す。
図15において、101はラッチを構成するNAND、
102はラッチを構成するインバータ、103は電源投
入時に読み出し禁止信号105を論理“L”とするため
の容量、104は読出し禁止状態を解除する場合に、ラ
ッチの出力を論理“H”とするためのセット信号であ
る。
The above control will be described below. FIG. 15 shows an example of the inhibition flag latch circuit.
In FIG. 15, 101 is a NAND constituting a latch,
Reference numeral 102 is an inverter forming a latch, 103 is a capacitance for setting the read prohibition signal 105 to the logic "L" when the power is turned on, and 104 is for setting the output of the latch to the logic "H" when the read prohibition state is released. Is a set signal of.

【0076】以上のように構成された禁止フラッグ回路
のラッチ回路について、その動作を以下に説明する。読
出し禁止状態を解除してラッチの出力を論理“H”とす
るための禁止フラッグセット信号104は、電源投入時
には論理“H”となっている。一方、読み出し禁止信号
105はラッチの出力で容量が付加されている。従って
電源投入時に読み出し禁止信号105は立ち上がりが遅
くなり、ラッチのインバータ102の出力を論理“H”
とすることで、電源投入時にラッチ出力である読み出し
禁止信号105を論理“L”とすることができる。
The operation of the latch circuit of the prohibition flag circuit configured as described above will be described below. The prohibition flag set signal 104 for releasing the read prohibition state and setting the output of the latch to the logic "H" is logic "H" when the power is turned on. On the other hand, the read inhibit signal 105 has a capacitance added by the output of the latch. Therefore, when the power is turned on, the read prohibition signal 105 rises slowly, and the output of the latch inverter 102 is set to logic "H".
By doing so, the read inhibit signal 105, which is a latch output when the power is turned on, can be set to the logic “L”.

【0077】以上のように、禁止フラッグを電源投入時
にパワーオンクリア回路を持たずに有効にすることで、
マイクロコンピュータが正常に動作しなくても、メモリ
の外部への読出しを禁止することが可能となり、回路の
縮小化、また外部からの解析も困難となる。
As described above, by enabling the prohibition flag without having the power-on clear circuit when the power is turned on,
Even if the microcomputer does not operate normally, it is possible to prohibit the reading of the memory to the outside, which makes it difficult to reduce the size of the circuit and analyze it from the outside.

【0078】なお、上記の実施の形態2、4、5を組み
合わせることで、消去ブロック毎のデバッグが可能にな
り、開封して回路を読み取られることに対するセキュリ
ティーが高いため、ユーザにとって扱いの自由度が高
く、セキュリティの高い製品となり、初期情報格納エリ
アの一部を禁止フラッグとして流用し、テストモードで
書き換えを自由に行えることで、製造者にとっても取り
扱いの自由度が高い製品を実現することができる。
By combining the above-described second, fourth, and fifth embodiments, it becomes possible to debug each erase block, and since the security against reading the circuit by opening the package is high, the degree of freedom of handling for the user is high. It becomes a product with high security and high security. By diverting part of the initial information storage area as a prohibition flag and freely rewriting in the test mode, it is possible to realize a product with high flexibility for the manufacturer. it can.

【0079】[0079]

【発明の効果】以上のように本発明によれば、例えば電
源投入時にメモリの読み出しあるいは書き込みベリファ
イを禁止するフラッグに対して、メモリへの消去ベリフ
ァイでメモリの消去が確認されない限り、メモリの読み
出しあるいは書き込みベリファイの禁止が解除されない
ように制御を行うことにより、不揮発性メモリ内のマイ
クロコードやデータに対して、IDコードあるいはメモ
リの内容の判らない第三者による外部からの間接的なア
クセスをも不可能にし、そのような第三者によるどのよ
うな手段での解読も不可能にすることができる。
As described above, according to the present invention, for example, in response to a flag that prohibits read or write verify of the memory when the power is turned on, unless the erase of the memory is confirmed by the erase verify of the memory, the read of the memory is performed. Alternatively, by controlling so that the prohibition of write verify is not released, microcode and data in the non-volatile memory can be indirectly accessed by a third party whose ID code or memory contents are unknown. Can be made impossible, and decryption by any means by such a third party is impossible.

【0080】そのため、不揮発性メモリから不正にデー
タが読み出されないようにして、IDコードあるいはメ
モリの内容の判らない第三者に対するメモリ内容の漏洩
を完全になくすことができ、そのような第三者への漏洩
から、不揮発性メモリに書き込まれたマイクロコード等
のデータを確実に保護することができる。
Therefore, it is possible to prevent illegal reading of data from the non-volatile memory and completely prevent the leakage of the memory contents to a third party who does not know the ID code or the contents of the memory. Data such as microcode written in the non-volatile memory can be reliably protected from being leaked to a person.

【0081】また、チップ毎にIDコードを設定するた
めのメモリが不用となり、回路規模を小さくすることが
できる。
Further, the memory for setting the ID code for each chip becomes unnecessary, and the circuit scale can be reduced.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施の形態1のマイクロコンピュータ
装置の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of a microcomputer device according to a first embodiment of the present invention.

【図2】同実施の形態1のマイクロコンピュータ装置に
おける書き換え動作のシーケンスを示すフローチャート
FIG. 2 is a flowchart showing a sequence of a rewriting operation in the microcomputer device of the first embodiment.

【図3】本発明の実施の形態2のマイクロコンピュータ
装置の構成を示すブロック図
FIG. 3 is a block diagram showing a configuration of a microcomputer device according to a second embodiment of the present invention.

【図4】同実施の形態2のマイクロコンピュータ装置に
おける書き換え動作のシーケンスを示すフローチャート
FIG. 4 is a flowchart showing a sequence of a rewriting operation in the microcomputer device of the second embodiment.

【図5】本発明の実施の形態3のマイクロコンピュータ
装置における書き換え動作のシーケンスを示すフローチ
ャート
FIG. 5 is a flowchart showing a sequence of rewriting operation in the microcomputer device according to the third embodiment of the present invention.

【図6】本発明の実施の形態4のマイクロコンピュータ
装置の構成を示すブロック図
FIG. 6 is a block diagram showing a configuration of a microcomputer device according to a fourth embodiment of the present invention.

【図7】本発明の実施の形態5のマイクロコンピュータ
装置の構成を示すブロック図
FIG. 7 is a block diagram showing a configuration of a microcomputer device according to a fifth embodiment of the present invention.

【図8】同実施の形態5のマイクロコンピュータ装置に
おける書き換え動作のシーケンスを示すフローチャート
FIG. 8 is a flowchart showing a sequence of a rewriting operation in the microcomputer device of the fifth embodiment.

【図9】本発明の実施の形態6のマイクロコンピュータ
装置の構成を示すブロック図
FIG. 9 is a block diagram showing a configuration of a microcomputer device according to a sixth embodiment of the present invention.

【図10】同実施の形態6のマイクロコンピュータ装置
における書き換え動作のシーケンスを示すフローチャー
FIG. 10 is a flowchart showing a rewriting operation sequence in the microcomputer device of the sixth embodiment.

【図11】本発明の実施の形態7のマイクロコンピュー
タ装置の構成を示すブロック図
FIG. 11 is a block diagram showing a configuration of a microcomputer device according to a seventh embodiment of the present invention.

【図12】本発明の実施の形態8のマイクロコンピュー
タ装置におけるパワーオンクリア回路の構成を示す回路
FIG. 12 is a circuit diagram showing a configuration of a power-on-clear circuit in a microcomputer device according to an eighth embodiment of the present invention.

【図13】同実施の形態8のマイクロコンピュータ装置
におけるパワーオンクリア回路の動作を示すタイミング
チャート
FIG. 13 is a timing chart showing the operation of the power-on-clear circuit in the microcomputer device of the eighth embodiment.

【図14】本発明の実施の形態9のマイクロコンピュー
タ装置の構成を示すブロック図
FIG. 14 is a block diagram showing a configuration of a microcomputer device according to a ninth embodiment of the present invention.

【図15】本発明の実施の形態10のマイクロコンピュ
ータ装置における禁止フラッグラッチ回路の構成を示す
回路図
FIG. 15 is a circuit diagram showing a configuration of an inhibition flag latch circuit in a microcomputer device according to a tenth embodiment of the present invention.

【図16】従来のマイクロコンピュータ装置の構成を示
すブロック図
FIG. 16 is a block diagram showing a configuration of a conventional microcomputer device.

【符号の説明】[Explanation of symbols]

1、11、21、31、51、61、91 マイクロ
コンピュータ(CPU) 2、12、22、32、52、62、92 不揮発性
メモリ 3、13、23、33、53、63、93 インター
フェース 4、14、24、54、64、94 禁止フラッグ 34 初期情報レジスタ 5、15、25、55、65 パワーオンクリア信号
発生手段 6、16、26、35、56、66、96 制御回路 45 IDコード用メモリ 7、17、27、36、57、67、97 制御信号
入力バッファ 8、18、28、37、58、68、98 アドレス
入力バッファ 59 セット信号設定回路 49 比較器
1, 11, 21, 31, 31, 51, 61, 91 Microcomputer (CPU) 2, 12, 22, 32, 52, 62, 92 Non-volatile memory 3, 13, 23, 33, 53, 63, 93 Interface 4, 14, 24, 54, 64, 94 Prohibition flag 34 Initial information register 5, 15, 25, 55, 65 Power-on-clear signal generating means 6, 16, 26, 35, 56, 66, 96 Control circuit 45 ID code memory 7, 17, 27, 36, 57, 67, 97 Control signal input buffer 8, 18, 28, 37, 58, 68, 98 Address input buffer 59 Set signal setting circuit 49 Comparator

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 各種機能動作するためのマイクロコード
等の各種データを格納する不揮発性メモリを搭載したマ
イクロコンピュータ装置であって、前記不揮発性メモリ
に対するアクセスを制御するときに前記アクセスの許可
を与えるためのフラッグと、前記フラッグの状態により
前記不揮発性メモリに対するアクセスを制御するととも
に、前記不揮発性メモリの内容を消去した後にのみ前記
フラッグが前記不揮発性メモリに対するアクセスを許可
するように制御する制御部とを設けたことを特徴とする
マイクロコンピュータ装置。
1. A microcomputer device equipped with a non-volatile memory for storing various data such as a microcode for operating various functions, wherein the access permission is given when controlling access to the non-volatile memory. And a control unit for controlling access to the non-volatile memory according to the state of the flag and for permitting the flag to access the non-volatile memory only after erasing the contents of the non-volatile memory. And a microcomputer device provided with.
【請求項2】 不揮発性メモリの全領域を複数の消去単
位ブロックに分割し、フラッグを、前記複数の消去単位
ブロックのそれぞれに対して1対1で独立して存在する
よう構成するとともに、制御部を、前記複数の消去単位
ブロックの内容をそれぞれ個々に消去した後に、当該消
去単位ブロックに対応した前記フラッグが前記当該消去
単位ブロックに対するアクセスを許可するように制御す
るよう構成したことを特徴とする請求項1に記載のマイ
クロコンピュータ装置。
2. The entire area of the nonvolatile memory is divided into a plurality of erase unit blocks, and a flag is configured to exist independently for each of the plurality of erase unit blocks in a one-to-one manner and control is performed. A part of the plurality of erase unit blocks is erased individually, and then the flag corresponding to the erase unit block is controlled to permit access to the erase unit block. The microcomputer device according to claim 1.
【請求項3】 制御部を、不揮発性メモリに書き込むデ
ータが検査用テストパターンである時は、フラッグが前
記不揮発性メモリに対するアクセスを許可するように制
御するよう構成したことを特徴とする請求項1に記載の
マイクロコンピュータ装置。
3. The control unit is configured to control the flag so as to permit access to the non-volatile memory when the data to be written in the non-volatile memory is a test pattern for inspection. 1. The microcomputer device according to 1.
【請求項4】 制御部を、Vt制御タイプのメモリを使
用したFPGAにより構成したことを特徴とする請求項
1に記載のマイクロコンピュータ装置。
4. The microcomputer device according to claim 1, wherein the control unit is composed of an FPGA using a Vt control type memory.
【請求項5】 フラッグを、チップ固有情報領域に格納
した制御信号により不揮発性メモリに対するアクセスを
許可するのみで、前記不揮発性メモリへのアクセスの状
態によっては、前記不揮発性メモリに対するアクセスを
許可することのないよう構成したことを特徴とする請求
項1に記載のマイクロコンピュータ装置。
5. The flag is only permitted to access the non-volatile memory by a control signal stored in the chip-specific information area, and depending on the state of access to the non-volatile memory, access to the non-volatile memory is permitted. The microcomputer device according to claim 1, wherein the microcomputer device is configured so as not to cause a problem.
【請求項6】 制御部を、アクセス制限の必要なブロッ
クに関してのみアクセス制限のフラッグを有効とし、そ
の他のブロックに関してはアクセスを許可するように制
御するよう構成したことを特徴とする請求項2に記載の
マイクロコンピュータ装置。
6. The control unit is configured so as to enable the access restriction flag only for blocks that require access restriction and to permit access for other blocks. The described microcomputer device.
【請求項7】 アクセス制限の必要なブロックに関して
のみアクセス制限のフラッグを備え、その他のブロック
に関しては前記フラッグを設けず、制御部を、前記フラ
ッグが設けられていないブロックに対しては、フラッグ
の確認なしにアクセスを許可するように制御するよう構
成したことを特徴とする請求項6に記載のマイクロコン
ピュータ装置。
7. A flag for access restriction is provided only for a block requiring access restriction, the flag is not provided for other blocks, and a control unit sets a flag for a block not provided with the flag. 7. The microcomputer device according to claim 6, wherein the microcomputer device is configured to be controlled to allow access without confirmation.
【請求項8】 同一基板上もしくは同一パッケージ上
に、電源投入時にアクセス禁止フラッグを有効にしてメ
モリアクセスを禁止するパワーオンクリア手段を設け、
前記パワーオンクリア手段を、電源投入時にマイクロコ
ンピュータの動作とは無関係に禁止フラッグを有効にす
るように制御するよう構成したことを特徴とする請求項
1から請求項7のいずれかに記載のマイクロコンピュー
タ装置。
8. A power-on-clear means is provided on the same substrate or on the same package to prohibit the memory access by enabling an access prohibition flag when the power is turned on,
8. The microcomputer according to claim 1, wherein the power-on-clear means is configured to control the prohibition flag to be effective when the power is turned on regardless of the operation of the microcomputer. Computer equipment.
【請求項9】 マイクロコンピュータ用のシステムリセ
ット信号に基づいて、アクセス禁止フラッグを有効にし
てメモリアクセスを禁止する手段を設け、前記メモリア
クセス禁止手段を、前記システムリセット信号によって
フラッグの禁止を行うように制御するよう構成したこと
を特徴とする請求項1から請求項7のいずれかに記載の
マイクロコンピュータ装置。
9. A means for prohibiting memory access by enabling an access prohibition flag based on a system reset signal for a microcomputer is provided, and the memory access prohibition means is adapted to prohibit the flag by the system reset signal. The microcomputer device according to any one of claims 1 to 7, wherein the microcomputer device is configured to be controlled by the above.
【請求項10】 電源投入時にその出力の論理値が常に
同じになるように設計されたラッチ、フリップフロップ
などを用いて、アクセス禁止フラッグを有効にしてメモ
リアクセスを禁止する手段を設け、前記メモリアクセス
禁止手段を、電源投入時に常に同じ論理値になってフラ
ッグの禁止を行うように制御するよう構成したことを特
徴とする請求項1から請求項7のいずれかに記載のマイ
クロコンピュータ装置。
10. A means for inhibiting a memory access by enabling an access inhibition flag by using a latch, a flip-flop or the like designed such that the logical value of its output is always the same when the power is turned on is provided. 8. The microcomputer device according to any one of claims 1 to 7, wherein the access prohibiting unit is configured to control so that the flag always has the same logical value when the power is turned on to prohibit the flag.
JP2002183755A 2001-10-30 2002-06-25 Microcomputer device Pending JP2003203012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002183755A JP2003203012A (en) 2001-10-30 2002-06-25 Microcomputer device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001331743 2001-10-30
JP2001-331743 2001-10-30
JP2002183755A JP2003203012A (en) 2001-10-30 2002-06-25 Microcomputer device

Publications (1)

Publication Number Publication Date
JP2003203012A true JP2003203012A (en) 2003-07-18

Family

ID=27666628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002183755A Pending JP2003203012A (en) 2001-10-30 2002-06-25 Microcomputer device

Country Status (1)

Country Link
JP (1) JP2003203012A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006350885A (en) * 2005-06-20 2006-12-28 Renesas Technology Corp Semiconductor device
JP2008123106A (en) * 2006-11-09 2008-05-29 Nec Electronics Corp Microcomputer and debug method for microcomputer
JP2012234607A (en) * 2011-05-09 2012-11-29 Nec Access Technica Ltd Data writing device and data writing method
JP2016509731A (en) * 2013-02-04 2016-03-31 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method and memory device for protecting the contents of a memory device
US10031702B2 (en) 2016-08-29 2018-07-24 Samsung Electronics Co., Ltd. Nonvolatile memory and a nonvolatile memory system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006350885A (en) * 2005-06-20 2006-12-28 Renesas Technology Corp Semiconductor device
US7421534B2 (en) 2005-06-20 2008-09-02 Renesas Technology Corp. Data protection for non-volatile semiconductor memory using block protection flags
US7822914B2 (en) 2005-06-20 2010-10-26 Renesas Electronics Corporation Data protection for non-volatile semiconductor memory using block protection flags
JP4584044B2 (en) * 2005-06-20 2010-11-17 ルネサスエレクトロニクス株式会社 Semiconductor device
US7979630B2 (en) 2005-06-20 2011-07-12 Renesas Electronics Corporation Data protection for non-volatile semiconductor memory block using block protection flags
US8156280B2 (en) 2005-06-20 2012-04-10 Renesas Electronics Corporation Data protection for non-volatile semiconductor memory using block protection
JP2008123106A (en) * 2006-11-09 2008-05-29 Nec Electronics Corp Microcomputer and debug method for microcomputer
JP2012234607A (en) * 2011-05-09 2012-11-29 Nec Access Technica Ltd Data writing device and data writing method
JP2016509731A (en) * 2013-02-04 2016-03-31 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method and memory device for protecting the contents of a memory device
US10031702B2 (en) 2016-08-29 2018-07-24 Samsung Electronics Co., Ltd. Nonvolatile memory and a nonvolatile memory system

Similar Documents

Publication Publication Date Title
US7145799B2 (en) Chip protection register unlocking
US6229731B1 (en) Nonvolatile semiconductor memory device with security function and protect function
JP3891539B2 (en) Semiconductor device and control device thereof
US8843695B2 (en) Reversible write-protection for non-volatile semiconductor memory device
EP2709034A1 (en) Systems and methods for code protection in non-volatile memory systems
US9164927B2 (en) Integrated circuit and memory data protection apparatus and methods thereof
KR100830910B1 (en) Semiconductor memory device
JP2011210037A (en) Semiconductor device and data processing method
JP2002025278A (en) Semiconductor storage device
CN110968254B (en) Partition protection method and device for nonvolatile memory
CN110020561B (en) Semiconductor device and method of operating semiconductor device
JP3891863B2 (en) Semiconductor device and driving method of semiconductor device
JP6518798B2 (en) Device and method for managing secure integrated circuit conditions
JP2000268584A (en) Nonvolatile semiconductor storage device and its manufacture
US7398554B1 (en) Secure lock mechanism based on a lock word
US6996006B2 (en) Semiconductor memory preventing unauthorized copying
JP2004259385A (en) Semiconductor memory device
US20040186947A1 (en) Access control system for nonvolatile memory
US7262629B2 (en) Apparatus and method for protecting from illegal copy
WO2001061503A1 (en) Nonvolatile memory
JP2003203012A (en) Microcomputer device
JP2004526260A (en) Non-volatile memory partial read protection apparatus and method
US20160328554A1 (en) Integrated circuit access
JP2005292959A (en) Nonvolatile memory module and nonvolatile memory system
JP3810378B2 (en) Nonvolatile semiconductor memory device and security method thereof