JPS6356750A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPS6356750A
JPS6356750A JP61202233A JP20223386A JPS6356750A JP S6356750 A JPS6356750 A JP S6356750A JP 61202233 A JP61202233 A JP 61202233A JP 20223386 A JP20223386 A JP 20223386A JP S6356750 A JPS6356750 A JP S6356750A
Authority
JP
Japan
Prior art keywords
data
address
confidential
write
flag
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
JP61202233A
Other languages
Japanese (ja)
Inventor
Wataru Okamoto
渉 岡本
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP61202233A priority Critical patent/JPS6356750A/en
Publication of JPS6356750A publication Critical patent/JPS6356750A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize a secure fail safe by providing a special area in a writable ROM and providing an access control circuit including a semi-fixed writing prohibiting flag which can be used again and an address decoding circuit to select the special area. CONSTITUTION:An access control circuit 14 is composed of an address decoder 14-1, a writing prohibiting flag 14-2 and three two-input AND gates. When the address decoder 14-1 decodes the address data on an address bus 3 and the area of a confidential zone 11-2 is selected, a confidential zone selecting line 14-7 is made into a high level. The writing prohibiting flag 14-2 is the flag to prohibit the writing to the confidential zone 11-2, mapped on a PROM space, set by the exclusive-use instruction of the processor to write to a built-in PROM, and is the semi-fixed flag which cannot be reset once setting is executed and is composed of a PROM cell.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、単一半導体基盤上にメモリ機能及びコンピュ
ータ機能を集積したシングルチップマイクロコンピュー
タにおいて、プログラム可能な内部データメモリ中に再
書込み不可能なメモリ領域を有し、その領域に対するア
クセスを管理する手段を内蔵したシングルチップマイク
ロコンピュータに関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention provides a single-chip microcomputer that integrates memory and computer functions on a single semiconductor substrate, in which a programmable internal data memory is non-rewritable. The present invention relates to a single-chip microcomputer having a large memory area and a built-in means for managing access to the area.

〔従来の技術〕[Conventional technology]

近年はLSI製造技術の進歩により、シングルチップマ
イクロコンピュータの分野においても高集積化が進み、
単位機能当たりのコストの低下も著しくなってきている
In recent years, advances in LSI manufacturing technology have led to higher integration in the field of single-chip microcomputers.
The cost per unit function is also decreasing significantly.

従来、銀行などの金融機関においては8気カードが主に
使用されてき友が、磁気カードは記憶容量が少なく、ま
たセキ)リティの面で問題があり、最近では不正使用、
偽造など多くの犯罪が頻発し、大きな社会問題となって
いる。そこでこの志気カードに代るものとして、シング
ルチップマイコンを搭載したICカードが登場し、国内
外において実用化に向けて大規模な実験が進んでいる。
Traditionally, 8-ki cards have been mainly used at banks and other financial institutions, but magnetic cards have low storage capacity and security issues, and have recently become more susceptible to unauthorized use.
Many crimes such as counterfeiting occur frequently and have become a major social problem. Therefore, an IC card equipped with a single-chip microcomputer has appeared as an alternative to the morale card, and large-scale experiments are underway in Japan and abroad to put it into practical use.

前記ICカードは迅気カードに比べ、記憶肉量も数段大
きく、またカード内にコンビエータ機能を内蔵している
のでセ4..IJティの面でも格段の信頼度がある。
The IC card has a much larger memory capacity than the quick card, and also has a combiator function built into the card, so it is very convenient.4. .. It is also extremely reliable in terms of IJ tee.

一般にシングルチップマイコンを搭載したICカードに
おいては、データメモリの大部分にUV−EPROM(
Ultra−Violet Erasabie Pro
g −rammable ROM)またはEEPROM
(El ec t r −1cal  Erasabl
e  Progra mmable ROM)を使用し
ておシ(以後UVEPROM、EEPROMを総じてF
ROMと称する)、そのデータメモリをいくつかの領域
に分割しそのアクセスを管理している。
Generally, in an IC card equipped with a single-chip microcontroller, most of the data memory is UV-EPROM (
Ultra-Violet Erasabie Pro
g-rammable ROM) or EEPROM
(El ect r -1cal Erasable
e Programmable ROM) (hereinafter UVEPROM and EEPROM are generally referred to as F).
(referred to as ROM), its data memory is divided into several areas and its access is managed.

銀行などの金融部間においてキャッシュカード、クレジ
ットカードとしてICカードを使用する場合、この分割
されたデータメモリの一部をコンフィデンシャル・シー
y(Confidential  Zone)と呼び、
銀行の支店番号、口座番号など機密性の高いデータを格
納するのに使用している。このコンフィデンシャル・ゾ
ーンはICカードの不正使用、偽造を防止する上で最も
重要な部分であって、従来ソフトウェアにより前記領域
に対するアクセスを管理し、通常は一度秘匿データを書
込んだら再書込みは許可せず、特別な場合だけ前記領域
に対しアクセスできるようになっている。
When an IC card is used as a cash card or credit card between financial departments such as banks, a part of this divided data memory is called a Confidential Zone.
It is used to store highly confidential data such as bank branch numbers and account numbers. This confidential zone is the most important part in preventing unauthorized use and counterfeiting of IC cards, and conventional software controls access to this area, and normally once confidential data is written, rewriting is permitted. The above area can only be accessed in special cases.

以下、データメモリ中にコンフィデンシャル・ゾーンを
有した従来のシングルチップマイクロコンピュータの例
について第5図のマイクロコンビ二−タのブロック図、
第6図のフローチャートを用いて説明する。
Below, an example of a conventional single-chip microcomputer having a confidential zone in the data memory is shown in the block diagram of the microcomputer shown in FIG.
This will be explained using the flowchart shown in FIG.

まず構成要素の説明を行なう。First, the constituent elements will be explained.

第5図においてプログラムカウンタ1は命令コードの格
納アドレスを指すポインタである。ROM(Read 
0nly Memory)2はユーザプログラム格納に
用いる読み出し専用メモリである。アドレスバス3はア
ドレスデータを転送するバスである。データバス4は中
央処理装置(以下CPUと呼ぶ)の処理データを転送す
るパスである。命令レジスタ5はROM2から読み出し
た命令コードを格納するレジスタである。命令デコーダ
6は命令レジスタ5に格納された命令コードで指定され
たCPU動作を制御する装置である。テンポラリレジス
タ7及び8は算術論理演算ユニット9への入力データを
一時保持するためのレジスタである。
In FIG. 5, program counter 1 is a pointer pointing to the storage address of the instruction code. ROM (Read
0nly Memory) 2 is a read-only memory used to store user programs. Address bus 3 is a bus for transferring address data. The data bus 4 is a path for transferring processing data of a central processing unit (hereinafter referred to as CPU). The instruction register 5 is a register that stores the instruction code read from the ROM 2. The instruction decoder 6 is a device that controls the CPU operation specified by the instruction code stored in the instruction register 5. Temporary registers 7 and 8 are registers for temporarily holding input data to the arithmetic and logic unit 9.

算術論理演算ユニット9はテンポラリレジスタ7゜8に
格納てれたデータに対し算術論理演算を行ない、結果を
データバス4へ出力する。RAMl0は汎用レジスタ及
び様々な処理データ格納用として用いられる読み出し、
書込みが可能なメモリで、アドレスバス3でアドレス指
定される格納データをデータバス4へ出力するか、デー
タバス4上のデータをアドレスバス3で指定されるアド
レスに格納する。RAMl0内には、演算の中心となる
汎用レジスタ群10−1、カードユーザーが端末よシ入
力したデータをボート12を介して格納するキー人力デ
ータ格納領域10−2.コンフイデンシヤル・ゾーン内
のデータリードの許可を示す読み出し許可フラグ10−
3を有している。
The arithmetic and logic operation unit 9 performs arithmetic and logic operations on the data stored in the temporary register 7.8 and outputs the result to the data bus 4. RAMl0 is a general-purpose register and a readout register used for storing various processing data;
A writable memory that outputs stored data addressed by the address bus 3 to the data bus 4 or stores data on the data bus 4 at an address designated by the address bus 3. The RAM 10 includes a general-purpose register group 10-1 that is the center of calculations, and a key manual data storage area 10-2 that stores data input by the card user from the terminal via the board 12. Read permission flag 10- indicating permission to read data within the confidential zone
It has 3.

FROMII はデータメモリとしてUVEFROMま
たはEEf’ROM を内蔵しており、データメモリ内
にはカードの暗証番号格納領域11−1.コンフィデン
シャル・ゾーン11−2、コンフィデンシャル・ゾーン
内に対する書込みを禁止する書込み禁止フラグ11−3
を有しておシ、ライト信号線15のハイレベルの信号に
より、アドレスバス3上のアドレスに対しデータバス4
上のデータを書込み、リードストローブ信号線16のハ
イレベルの信号によりアドレスバス3上のアドレスデー
タで指定されるデータをデータバス4上に出力する。
FROM II has a built-in UVEFROM or EEf'ROM as a data memory, and the data memory includes a card password storage area 11-1. Confidential zone 11-2, write prohibition flag 11-3 that prohibits writing into the confidential zone
A high level signal on the write signal line 15 causes the address on the address bus 3 to be sent to the data bus 4.
The data specified by the address data on the address bus 3 is output onto the data bus 4 by the high level signal on the read strobe signal line 16.

ボート12は、チップ外部との通信を行なうためのボー
トで、データバス4のデータを外部に出力し、外部から
のデータを入力する機能を持つ。
The boat 12 is a boat for communicating with the outside of the chip, and has the function of outputting data on the data bus 4 to the outside and inputting data from the outside.

プログラムカウンタ1、命令レジスタ5、命令デコーダ
6、テンポラリレジスタ7及び8、汎用レジスタ群10
−1.算術論理演算ユニット9からなるブロックは中央
処理装置(CPU)を構成している。
Program counter 1, instruction register 5, instruction decoder 6, temporary registers 7 and 8, general-purpose register group 10
-1. The block consisting of the arithmetic and logic unit 9 constitutes a central processing unit (CPU).

割込み制御回路131dボート12などの周辺ノ・ハー
ドウェアから発生する割込み信号の受は付け、制御を行
ない、CPUに割込み処理を実行させる。
The interrupt control circuit 131d receives and controls interrupt signals generated from peripheral hardware such as the board 12, and causes the CPU to execute interrupt processing.

上記構成要素を用いて動作説明を行なう。The operation will be explained using the above components.

280M11内にコンフィデンシャル・ゾーンを有した
シングルチップマイクロコンピュータにおいては、プロ
グラムカウンタ1で指定されるアドレスの命令コードを
ROM2から読み出し、データバス4を介して命令レジ
スタ5に格納する。命令レジスタ5に格納され几命令コ
ードは命令デコーダ6へ入力され、プログラマブル・ロ
ジック・プレイ(PLA)などのハードウェアによって
デコードされて命令機能が実行される。
In a single-chip microcomputer having a confidential zone in 280M11, the instruction code at the address specified by the program counter 1 is read from the ROM 2 and stored in the instruction register 5 via the data bus 4. The instruction code stored in the instruction register 5 is input to the instruction decoder 6, and is decoded by hardware such as a programmable logic play (PLA) to execute the instruction function.

例えば汎用レジスタ間の二項演算の場合、汎用レジスタ
10−1の内容をRAMl0から読み出し、テンポラリ
レジスタ7及び8に格納する。次に算術論理演算ユニッ
ト9を動作させ、演算結果をデータバス4を介してデス
ティネーションが汎用レジスタの場合RAMl0内の汎
用レジスタ群10−1の対応し几レジスタに書込む。
For example, in the case of a binary operation between general-purpose registers, the contents of general-purpose register 10-1 are read from RAM10 and stored in temporary registers 7 and 8. Next, the arithmetic and logic operation unit 9 is operated, and the operation result is written to the corresponding register in the general-purpose register group 10-1 in the RAM 10 via the data bus 4 if the destination is a general-purpose register.

次に第6図のフローチャートを用いてFROMII内の
コンフィデンシャル・ゾーン11−2へのアクセス方法
について説明する。
Next, a method of accessing the confidential zone 11-2 in FROM II will be explained using the flowchart of FIG.

まず最初にユーザーが外部装置よりキー人力したデータ
(暗証番号)をボート12を介してRAM10内のキー
人力データ格納領域10−2に格納する。
First, data (password) entered manually by the user from an external device is stored in the key entered data storage area 10-2 in the RAM 10 via the boat 12.

次にROM2に格納されているプログラムにより、キー
人力データ格納領域10−2に格納されているキー人力
された暗証番号とあらかじめ定義されていてPROMI
I 内に設定もれている暗証番号格納領域11−1の値
との比較を行なう。比較した結果、一致した場合は、更
に乱数などを発生させてキー人力されたデータに算術論
理演算ユニット9で演算処理を施し、同様の演算をオン
ラインコンピュータで実行後、結果をボート12を介し
て受は取り、前記演算結果と同一の場合のみ正当なカー
ドアクセスであることを確認する。
Next, the program stored in the ROM 2 predefines the key manually entered PIN stored in the key data storage area 10-2 and the PROMI.
A comparison is made with the value of the password storage area 11-1 that is not set in I. If the comparison results in a match, the arithmetic and logic unit 9 performs arithmetic processing on the keyed data by further generating random numbers, executes the same arithmetic operation on an online computer, and then sends the results via the boat 12. The card is accepted, and only if the result of the calculation is the same as the above, it is confirmed that the card access is valid.

前記確認の結果、正当なカードアクセスと判定した場合
はRAMl0内の読み出し許可フラグ1〇−3を′1″
にし、PR,OMI l内のコンフィデンシャル・ゾー
ン11−2内のデータ読み出しを許可する。不一致の場
合Fi読み出し許可フラグ1〇−3は0″とし、コンフ
ィデンシャル・ゾーン10−3内のデータ読み出しを許
可しないと共に、以後のカードアクセスを禁止する。
As a result of the above confirmation, if it is determined that the card access is valid, the read permission flag 10-3 in RAM10 is set to '1''.
and permits reading of data in the confidential zone 11-2 in PR, OMI I. In the case of a mismatch, the Fi read permission flag 10-3 is set to 0'', and reading of data in the confidential zone 10-3 is not permitted and subsequent card access is prohibited.

次に、ROM2に格納されているプログラムにおいてコ
ンフィデンシャル・ゾーン11−2へのアクセス彷令が
実行され几場合はコンフィデンシャル・ゾーンアクセス
判定ルーチン(ROMZ内のプログラム)に分岐し、以
下の処理を行なう(第6図参照)。
Next, if the access command to the confidential zone 11-2 is executed in the program stored in the ROM2, the process branches to the confidential zone access determination routine (program in the ROMZ) and performs the following processing. (See Figure 6).

■ コンフィデンシャル・ゾーンアクセスルーチンでは
、最初に当該命令がデータライト命令かデータリード命
令か判別する。
■ In the confidential zone access routine, first it is determined whether the instruction in question is a data write instruction or a data read instruction.

■ ■の猪果データライト命令と判定すると、書込み禁
止フラグ11−3の値をチェックし、10″の場合は書
込みが許可され九としてアドレスデータ、書込みデータ
を各々アドレスバス3、データバス4に出力後、ライト
信号線15をハイレベルにしてコンフィデンシャル・ゾ
ーンへの書込み動作をFROMII に行なわせる。
■ If it is determined that it is a boar data write command, the value of the write prohibition flag 11-3 is checked, and if it is 10'', writing is permitted and the address data and write data are transferred to the address bus 3 and data bus 4, respectively. After the output, the write signal line 15 is set to high level to cause FROM II to perform a write operation to the confidential zone.

そして以後コンフィデンシャル・ゾーンへの書込みを禁
止したい場合には書込み禁止フラグ11−3を11″に
する。ま之、曹込み禁止フラグ11−3が′1″の場合
は書込み禁止であるので書込み動作(ツ°行なわず、ア
クセスニラ−ルーチンを実行する。
If you want to prohibit writing to the confidential zone from now on, set the write inhibit flag 11-3 to 11''.However, if the write inhibit flag 11-3 is '1'', writing is prohibited, so no writing can be done. Execute the access niller routine without performing any action.

■の結果データリード命令と判別すると、RAhilO
内の読み出し許可フラグ10−3の値をチェックし、1
”の場合はコンフィデンシャル・ゾーン内のデータ読み
出しが許可されたとしてアドレスバス3にアドレスデー
タを出力後、リードストローブa16fcハイレベルト
シ、コンフィデンシャル・ゾーン11−2よF)f−タ
をデータバス4上に証み出す。また読み出し許可フラグ
10−3が0″の場合は読み出し動作は行なわず、アク
セスニラ−ルーチンと実行する。
If the result of ■ is determined to be a data read command, RAhilO
Check the value of read permission flag 10-3 in
”, it is assumed that reading data in the confidential zone is permitted, and after outputting the address data to the address bus 3, the read strobe a16fc high level transfers the confidential zone 11-2 to F) data to the data bus. 4. If the read permission flag 10-3 is 0'', no read operation is performed and the access niler routine is executed.

■ アクセスエラー処理ルーチンではアクセスエラーの
回数の計数などの処理全行ない、その値によりカードを
使用不能とするような処理を行なう。
■ The access error handling routine performs all processes such as counting the number of access errors, and performs processing such as making the card unusable based on that value.

よって最初のカード使用時に、必要なデータをコンフィ
デンシャル・ゾーン11−2にプロセッサの命令により
書込んでおいて書込み禁止フラグ11−3’)セットし
、以後のコンフィデンシャル・シー711−2へのデー
タ書込みを禁止しておけば、前記のコンフィデンシャル
・ゾーンアクセス判定ルーチンを用いることにより、次
回からのカード使用時にはコンフィデンシャル・ゾーン
への再書込みは禁止される。
Therefore, when using the card for the first time, necessary data is written to the confidential zone 11-2 by instructions from the processor, and the write inhibit flag 11-3') is set. If data writing is prohibited, rewriting to the confidential zone will be prohibited the next time the card is used by using the confidential zone access determination routine described above.

以上述べ念ように従来のシングルチップマイクロコンピ
ュータにおいては、秘匿データ?格納スるコンフィデン
シャル・ゾーンに対するアクセス管理をすべてユーザー
のソフトウェアにより行なっている。このようなマイク
ロコンピュータをカードに搭載し之場合、外部から通信
手段などによる不当なアクセスまたは内蔵ROMパター
ンの解読により、上記コンフィデンシャル・ゾーンへ不
当なデータが書込まれることが考えられる。またデータ
メモリとして紫外縁消去型読み出し専用メモ1.1 (
UVEP几OM)が使用さnている時は、ROMセルに
常に電圧?印加している場合もあるので、プログラムが
暴走した時、書込み禁止フラグのデータが失わ詐た勺、
コンフィデンシャル・ゾーンに対し不当な書込みが行な
われ、その結果カードが使用不可能となる危険性がある
。さらにデータメモリに電気消去型読み出し専用メモ!
J (EEPROM)が使用されている場合には、書込
み命令が実行されると280M  内部で自動的に書込
み用の電圧が生成されるので、前記UVFROMの場合
と同様、コンフィデンシャル・ゾーンに対し、不当な書
込みが行なわれる可能性がある。
As mentioned above, in conventional single-chip microcomputers, confidential data? All access management to the stored Confidential Zone is performed by the user's software. When such a microcomputer is mounted on a card, it is conceivable that illegal data may be written into the confidential zone due to illegal access from outside by a communication means or the like or by decoding of the built-in ROM pattern. In addition, as data memory, ultraviolet edge erase type read-only memo 1.1 (
When UVEP (OM) is used, is there always a voltage on the ROM cell? In some cases, the write protect flag data may be lost when the program goes out of control.
There is a risk that illegal writing will be performed on the confidential zone, resulting in the card becoming unusable. Furthermore, there is an electrically erasable read-only memo in the data memory!
When a write command is executed when a J (EEPROM) is used, a write voltage is automatically generated inside the 280M. Illegal writing may occur.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したように、従来のデータメモリにおける書込み禁
止の領域であるコンフィデンシャル・ゾーンへのアクセ
スをソフトウェアによJ!理しているシングルチップマ
イクロコンピュータにおいては、秘匿データを格納して
いるコンフィデンシャル・ゾーンへのアクセス管理をす
べてソフトウェアによって行なっているので、そのソフ
トウェアが伺らかの方法で解読されてしまい、不正なア
クセスが行なわれてコンフィデンシャル・ゾーン内のデ
ータが失わ詐たり、また故意にデータが書き換えられる
危険性が生じる。てらに前記ソフトウェアが暴走した場
合、同様にコンフィデンシャル・ゾーン中の秘匿データ
が曹き侯えられる危険性かりシ、ソフトウェアのみによ
るメモリ管理はフェイル・セーフの面において不完全と
いう欠点があった。
As mentioned above, access to the confidential zone, which is a write-protected area in conventional data memory, is controlled by software. In the single-chip microcomputers used in the management system, all access control to the confidential zone that stores confidential data is performed by software, so if that software is decrypted using an unknown method, unauthorized There is a risk that the data in the confidential zone may be lost or fraudulently accessed, or that the data may be intentionally rewritten. Furthermore, if the software goes out of control, there is a risk that the confidential data in the confidential zone will be compromised, and memory management based solely on software has the disadvantage that it is incomplete in terms of fail-safety.

〔問題点を解決するための手段〕[Means for solving problems]

本発明におけるシングルチップマイクロコンピュータは
、単一半導体基盤上に書込み可能なROM (Prog
rammable Read 0nly Memory
The single-chip microcomputer according to the present invention has a ROM (Prog.
rammable Read 0nly Memory
.

以下FROMと称する)及びコンピュータ機能を集積し
たシングルチップマイクロコンビエータにおいて、前記
FROM  中に特定領域を有し、再使用可能な半固定
の書込み禁止フラグ及び前記領域を選定するアドレスデ
コード回路から成るアクセス制御回路と備え、前記特定
領域に対し前記アクセス制御回路により書込みを禁止す
ることによル、前記領域内のデータに対しフェイル・セ
ーフを実現しかつ前記半固定書込み禁止フラグの消去手
段を内蔵することにより再使用を可能としたことを特徴
とする。
In a single-chip microcombiator that integrates a FROM (hereinafter referred to as FROM) and a computer function, the FROM has a specific area, and the access consists of a reusable semi-fixed write-inhibit flag and an address decoding circuit that selects the area. and a built-in means for erasing the semi-fixed write prohibition flag, which achieves fail-safety for data in the area by prohibiting writing to the specific area by the access control circuit. This makes it possible to reuse the product.

従来のシングルチップマイクロコンピュータにおいては
、コンフィデンシャル・ゾーンへのアクセスの管理をソ
フトウェアのみによって行なっていたため、プログラム
暴走時または不当なアクセスにより、データの書込みが
上記ゾーンに対し行なわれる可能性が存在することに対
し、本発明は簡単なアクセス制御回路を付加し、より確
実なフェール・セーフが容易に得られるという優れた効
果が得られる。
In conventional single-chip microcomputers, access to the confidential zone is managed only by software, so there is a possibility that data may be written to the zone due to program runaway or unauthorized access. In contrast, the present invention adds a simple access control circuit and provides an excellent effect in that more reliable fail-safe can be easily obtained.

さらに、本発明におけるシングルチップマイクロコンピ
ュータは、前記FROM  中の特定領域?指定する再
使用可能な半固定のアドレスレジスタ、及び再使用可能
な半固定の書込み禁止フラグ、前記アドレスレジスタと
アドレスデータの内容を比較する比較器から成るアクセ
ス制御回路を備え、前記特定領域に対し前記アクセス制
御回路によシ書込みを禁止することによ)、前記特定領
域内データに対しフェイル・セーフを実現し、前記特定
領域の指定がフレキシブルに行なえかつ前記半固定アド
レスレジスタ及び書込み禁止フラグの消去手段を内蔵す
るようにしてもよい。
Furthermore, the single-chip microcomputer according to the present invention has a specific area in the FROM. an access control circuit consisting of a reusable semi-fixed address register to specify, a reusable semi-fixed write inhibit flag, and a comparator that compares the contents of the address register and address data; By prohibiting writing by the access control circuit), fail-safe is realized for the data in the specific area, the specific area can be specified flexibly, and the semi-fixed address register and write inhibit flag are A built-in erasing means may also be provided.

〔実施例−1〕 次に本発明に係わるシングルチップマイクロコンピュー
タの第1の実施例について第1図、第2図を用いて説明
する。
[Embodiment 1] Next, a first embodiment of a single-chip microcomputer according to the present invention will be described with reference to FIGS. 1 and 2.

第1図は本発明に係わる第1の実施例のシングルチップ
マイクロコンピュータのブロック図である。第2図は第
1図におけるアクセス制御回路14の詳訓図である。
FIG. 1 is a block diagram of a single-chip microcomputer according to a first embodiment of the present invention. FIG. 2 is a detailed diagram of the access control circuit 14 in FIG. 1.

まず構成要素の説明を行なう。First, the constituent elements will be explained.

本発明に係わる第1の実施例のシングルチップマイクロ
コンピュータにおいては、FROMII と本実施例で
新たに追加し几アクセス制御回路14以外の構成要素は
、第5図に示す従来例と相違がないので、以下FROM
II  とアクセス制御回路14について構成及び力作
を第2図を用いて説明する。
In the single-chip microcomputer of the first embodiment according to the present invention, the components other than the FROM II and the access control circuit 14 newly added in this embodiment are the same as the conventional example shown in FIG. , hereafter FROM
The configuration and performance of the access control circuit 14 and the access control circuit 14 will be explained with reference to FIG.

第21fA K示j PROMI 1 ハUVEPRO
M t *tdEEPR,OMで、その中には従来例と
同様、暗証番号格納領域x1−1、コンフィデンシャル
・ゾーン11−2を有している。またFROMIIはア
クセス判定回路14からのコンフィデンシャル・ゾーン
ライトストローブ信号線14−10を受は取るとアドレ
スバス3上のアドレスデータで指足されるアドレスにデ
ータバス4上のデータ?格納する。
21st fA K PROMI 1 UVEPRO
M t *tdEEPR,OM, which includes a password storage area x1-1 and a confidential zone 11-2, as in the conventional example. Also, when FROM II receives the confidential zone write strobe signal line 14-10 from the access determination circuit 14, the address indicated by the address data on the address bus 3 is changed to the data on the data bus 4? Store.

アクセス制御回路14はアドレスデコーダ14−1、書
込み禁止フラグ14−2、及び3個の2人カアンドゲー
トから構成されるブロックである。
The access control circuit 14 is a block composed of an address decoder 14-1, a write inhibit flag 14-2, and three two-person AND gates.

アドレスデコーダ14−1はアドレスバス3上のアドレ
スデータをデコードし、コンフィデンシャル・ゾーン1
1−2の領域が選択でれた場合に、コンフィデンシャル
・ゾーン選Rmx4−rをハイレベルにする。
The address decoder 14-1 decodes the address data on the address bus 3 and decodes the address data on the confidential zone 1.
When area 1-2 is selected, confidential zone selection Rmx4-r is set to high level.

書込み禁止フラグ14−2は、コンフィデンシャル・ゾ
ーン11−2への書込みを禁止するためノフラクで、F
ROM  空間上にマツプさnており、内iJFROM
  へのライトラ行なうプロセッサの専用命令でセット
し、−旦セットするとリセット不可能なFROM  セ
ルで構成される半固定フラグである。
The write prohibition flag 14-2 is a no-fragment flag to prohibit writing to the confidential zone 11-2.
It is mapped in ROM space, and iJFROM is mapped in the ROM space.
This is a semi-fixed flag that is set by a dedicated instruction of the processor that performs a write operation, and is made up of FROM cells that cannot be reset once it is set.

書込み禁止フラグ14−2は、I’ROMII内のセル
と同一のセルで構成された1ビツトのフラグで、FRO
Mll がUVEPROM  −C構成されfc場合は
、第4−1図に示すようにセレクト線18、プログラム
線20がハイの時かつライト電圧が印加されている時に
フラグがセットされ、書込み禁止線14−6がハイとな
る。
The write inhibit flag 14-2 is a 1-bit flag made up of the same cells as those in I'ROMII, and is
When Mll is configured as UVEPROM-C and fc, the flag is set when the select line 18 and the program line 20 are high and the write voltage is applied, as shown in FIG. 4-1, and the write inhibit line 14- 6 becomes high.

セレクト線18は、FROMll によって上記フラグ
に対応したアドレスに対するアクセスの時のみハイとな
る。
The select line 18 becomes high only when the address corresponding to the flag is accessed by FROMll.

FROMII カIJ:PIjOM  !り構成すf’
Lルi合は、第4−2図に示すように上記UVI)RO
Mの場合に加えて消去砿21が存在する。
FROMII KaiJ:PIjOM! configuration f'
As shown in Figure 4-2, the above UVI)RO
In addition to the case of M, there is an eraser 21.

消去腺21は、プロセッサの専用命令によシPROMl
1内の全てのEEFROM セルの内容と消去する時の
みFROMllがハイとする。
The erase gland 21 erases the PROM1 according to a dedicated instruction of the processor.
FROM11 is set high only when erasing the contents of all EEFROM cells in 1.

書込み禁止フラグ14−2の出力である書込み禁止線1
4−6とコンフィデンシャル・ゾーン選択線14−7は
第1のアントゲ−)14−8に入力され、前記アンドゲ
ートの出力14−9は第2のアントゲ−)14−12に
入力される。
Write inhibit line 1 which is the output of write inhibit flag 14-2
4-6 and the confidential zone selection line 14-7 are input to the first analog gate 14-8, and the output 14-9 of the AND gate is input to the second analog gate 14-12.

第1のアンドゲートの出力14−9とライト信号線15
は第2のアントゲ−)14−12に入力され、第1のア
ンドゲートの出力14−9がロウレベルで、ライト信号
線15がハイレベルの時、コンフィデンシャル・ゾーン
ライトストローブ信号線14−10がハイレベルとなる
First AND gate output 14-9 and write signal line 15
is input to the second AND gate) 14-12, and when the output 14-9 of the first AND gate is low level and the write signal line 15 is high level, the confidential zone write strobe signal line 14-10 is input to the second AND gate 14-12. Becomes a high level.

第1のアンドゲートの出力14−9とライト信号線15
は第3のアンドゲート14−13に入力され、第1のア
ンドゲートの出力14−9がハイレベル(@込ミ禁止中
にコンフィデンシャル・ゾーンが選択された時)で、ラ
イト信号15が入丈されると、コンフィデンシャル・ゾ
ーンライトストローブ信号線14−10はロウレベルの
ままで、アクセスエラー割込み信号線14−11よりア
クセスエラー割込み信号分割込み処理制御回路13に対
し発生する。
First AND gate output 14-9 and write signal line 15
is input to the third AND gate 14-13, and when the output 14-9 of the first AND gate is at a high level (when the confidential zone is selected while the @ message is prohibited), the write signal 15 is input. When the access error interrupt signal is increased, the confidential zone write strobe signal line 14-10 remains at a low level, and an access error interrupt signal is generated from the access error interrupt signal line 14-11 to the divided processing control circuit 13.

上記構成要素を用いて、コンフィデンシャル・ゾーンア
クセスの際の動作説明を行なう。
The operation during confidential zone access will be explained using the above components.

以下、FROMII内のPR,OMは、EEPROMに
より構成てれているものとする。
Hereinafter, it is assumed that PR and OM in FROMII are constituted by EEPROM.

まfi初にコンフィデンシャル・ゾーン11−2に、カ
ード使用時に必要な最重要秘匿データをプロセッサの命
令にようプログラムする。この書込み動作は、アドレス
バス3上のアドレスデータをPROMI l 内のアド
レスデコード部がデコードし、ライト信号線15をハイ
レベルにすることにより、データバス4上のデータを書
込むことにより行なわれる。この時は書込み禁止フラグ
14−2はセットされていないので、第1のア/ドゲー
ト14−8の出力14−9は常にロウレベルであり、コ
ンフィデンシャル・ゾーン11−2と含めFROM  
メモリ全体に自由にデータを書込むことができる。
First, the most important confidential data required when using the card is programmed into the confidential zone 11-2 according to instructions from the processor. This write operation is performed by decoding the address data on the address bus 3 by the address decoding section in PROMI l and writing the data on the data bus 4 by setting the write signal line 15 to a high level. At this time, the write inhibit flag 14-2 is not set, so the output 14-9 of the first add gate 14-8 is always at a low level, and the FROM including the confidential zone 11-2 is
Data can be written freely throughout the memory.

次に、以上の動作で必要なデータをコンフィデンシャル
・ゾーン11−2+で誉込んだら、以後のコンフィデン
シャル・ゾーン11−2への書込ミを不可能にするため
、プロセッサのPll、oM  ライト専用命令により
書込み祭主フラグ14−2のマツプされたアドレスに対
し書込み全行なう。
Next, after the necessary data is written into the confidential zone 11-2+ by the above operation, the processor's PLL, oM write A dedicated command performs all writing to the mapped address of the write master flag 14-2.

その時、FROMII はセレクト線18、プログラム
線20をハイとし、ライト電圧19を供給して書込み禁
止フラグ14−2t−セットする。書込み禁止フラグ1
4−2は一旦セットされると、プロセッサの専用命令に
より全てのPROM セルを消去する場合以外リセット
できない半固定フラグであるので、以後書込み禁止線1
4−6は常に71イレベルとなる。よって以後アドレス
デコーダ14−1によりコンフィデンシャル・ゾーンが
選択されてコンフィデンシャル・ゾーン選択114−7
がハイレベルとなると、第1のアンドゲートの出力14
−9はハイレベルとなり、ライト信号線15がハイレベ
ルであっても第2のアンドゲート14−12の出力であ
るコンフィデンシャル・ゾーンライトストローブ線14
−10はロウレベルとなルノテ、以後はフンフイデンシ
ャル・ゾーン11−2への書込みは全く不可能となる。
At this time, FROM II sets the select line 18 and the program line 20 to high, supplies the write voltage 19, and sets the write inhibit flag 14-2t-. Write protect flag 1
Once set, 4-2 is a semi-fixed flag that cannot be reset except when all PROM cells are erased by a dedicated command from the processor.
4-6 is always a 71 level. Therefore, the confidential zone is subsequently selected by the address decoder 14-1 and the confidential zone selection 114-7 is performed.
becomes high level, the output 14 of the first AND gate
-9 becomes a high level, and even if the write signal line 15 is at a high level, the confidential zone write strobe line 14 which is the output of the second AND gate 14-12
-10 is a low level, and from then on writing to the confidential zone 11-2 is completely impossible.

また、もしコンフィデンシャル・ゾーン11−2へのデ
ータ書込み禁止中にデータを書込む動作を行なえば、第
3のアントゲ−)14−13に二りアクセスエラー割込
み信号線14−11よシ、ノンマスカブルな割込み信号
?発生し、プロセッサにアクセスエラーの割込み処理を
実行させる。
Furthermore, if data is written to the confidential zone 11-2 while data writing is prohibited, the second access error interrupt signal line 14-11 becomes non-maskable. What interrupt signal? occurs, causing the processor to perform access error interrupt processing.

従って木簡1の実施例においては、半固定の書込み禁止
フラグなど簡単なハードウェアを付加することにより、
コンフィデンシャル・ゾーン内のデータに対する不轟な
書き換えや、プログラムの暴走によるコンフィデンシャ
ル・シー7 内ノデータの消失を防ぐことができ、フェ
ール・セーフが完全となる。
Therefore, in the embodiment of Wooden Tablet 1, by adding simple hardware such as a semi-fixed write-protection flag,
It is possible to prevent data in the Confidential Zone from being irrevocably rewritten or data in the Confidential Zone from being lost due to runaway programs, making it completely fail-safe.

ま几、半固定フラグをFROM  セルで構成している
ので、特殊な半導体製造技術を使用することなく容易に
実現可能である。
Since the semi-fixed flag is composed of FROM cells, it can be easily realized without using any special semiconductor manufacturing technology.

さらに本実施例におけるようにFROM  とじてEE
FROMを便用し友場合、プロセッサの専用命令により
FROM  セルの内容を全て消去することにより再便
用することが可能であり、ICカードの再利用が可能と
なりコストの低下に大きな効果がある。
Furthermore, as in this embodiment, FROM and EE
When using FROM, it is possible to use it again by erasing all the contents of the FROM cell using a dedicated instruction from the processor, which makes it possible to reuse the IC card, which has a great effect on reducing costs.

以上が本発明の第1の実施例におけるコンフィデンシャ
ル・ゾーンへのデータ書込み動作であるが、コンフィデ
ンシャル・ゾーン内のデータ読み出し動作については従
来例と同様に行ない、不正なアクセスに対する対処はソ
フトウェア処理によシ行なう。
The above is the data writing operation to the confidential zone in the first embodiment of the present invention, but the data reading operation in the confidential zone is performed in the same manner as in the conventional example, and countermeasures against unauthorized access are performed by software processing. Let's do good.

〔実施例−2〕 次に本発明に係わるシングルチップマイクロコンピュー
タの第2の実施例について、第1図、第3図を用いて説
明する。
[Embodiment 2] Next, a second embodiment of the single-chip microcomputer according to the present invention will be described with reference to FIGS. 1 and 3.

第1図は本発明における第2のシングルチップマイクロ
コンピュータのブロック図である。この第10のブロッ
ク図は第1の実施例におけるブロック図と同一のもので
ある。第3図は第1図におけるアクセス制御回路14の
詳細図である。
FIG. 1 is a block diagram of a second single-chip microcomputer according to the present invention. This tenth block diagram is the same as the block diagram in the first embodiment. FIG. 3 is a detailed diagram of the access control circuit 14 in FIG. 1.

まず構成要素の説明を行なう。First, the constituent elements will be explained.

本発明に係わる第2の実施例のシングルチップマイクロ
コンピュータにおいては、アクセス制御回路14以外の
構成要素は第1の実施例のものと相違がないので、以下
アクセス制御回路14のみについて第3図を用いて説明
する。
In the single-chip microcomputer of the second embodiment of the present invention, the components other than the access control circuit 14 are the same as those of the first embodiment, so FIG. I will explain using

第3図に示すアクセス制御回路14はアドレスレジスタ
14−21、比較器14−20、書込み禁止フラグ14
−2、及び3個のアンドゲートを有している。
The access control circuit 14 shown in FIG. 3 includes an address register 14-21, a comparator 14-20, and a write inhibit flag 14.
-2, and three AND gates.

アドレスレジスタ14−21はFROM セルで構成さ
れる8ビツトのレジスタで、上位7ビツトによりFRO
M  領域のコンフィデンシャル・ゾーン11−2の上
位アドレスを記憶し、最下位ビットは書込み禁止フラグ
14−2となっている。アドレスレジスタ14−21の
各ビットは前記第1の実施例における書込み禁止フラグ
と同様な構成となっており、−度データを書込んだら書
き換え不可能な半固定のレジスタである。ま几このレジ
スタはFROM 空間上にマツプされている。
Address registers 14-21 are 8-bit registers made up of FROM cells, and the upper 7 bits
The upper address of the confidential zone 11-2 of the M area is stored, and the least significant bit is a write inhibit flag 14-2. Each bit of the address registers 14-21 has the same structure as the write inhibit flag in the first embodiment, and is a semi-fixed register that cannot be rewritten once data has been written. This register is mapped onto FROM space.

比較W1420はアドレスバス3上のアドレスデータの
上位7ビツトとアドレスレジスタ14−21に格納され
ている7ビツトのアドレスデータを比較し、一致したら
コンフィデンシャル・ゾーン選択線14−7をハイレベ
ルにする。
Comparison W1420 compares the upper 7 bits of address data on address bus 3 with 7 bits of address data stored in address register 14-21, and if they match, sets confidential zone selection line 14-7 to high level. .

上記構成要素を用いて、コンフィデンシャル・ゾーンア
クセスの際の動作説明と行なう。
Using the above components, we will explain the operation when accessing the confidential zone.

以下、Pl’l、OM  ブロック11は、EEPRO
hlで構成されているとする。
Hereinafter, Pl'l, OM block 11 is EEPRO
Suppose that it is composed of hl.

まず最初に第1の従来例と同様にコンフィデンシャル・
ゾーン11−2にカード使用時に必要な秘匿データなど
をプロセッサの命令により格納する。この時は書込み東
上フラグ14−2はセ、ソトされていないので、第1の
アンドゲートの出力14−9はロウレベルであり、ライ
ト信号線15がノ・インベルになればコンフィデンシャ
ル・ゾーンライトストローブ線14−10がハイレベル
となるので、コンフィデンシャル・ゾーン11−2に含
めFROM  メモリ全体に自由にブータラ書込むこと
ができる。
First, as in the first conventional example, the confidential
Confidential data necessary when using the card is stored in zone 11-2 according to instructions from the processor. At this time, the write east flag 14-2 has not been set or sorted, so the output 14-9 of the first AND gate is at a low level, and when the write signal line 15 becomes zero level, the confidential zone write strobe is activated. Since the line 14-10 goes high, the booter can be freely written to the entire FROM memory, including in the confidential zone 11-2.

次に以上の動作で必要なデータをコンフィデンシャル・
ゾーン11−2に書込んだら、 FROMライトを行な
うプロセッサの専用命令によりアドレスレジスタ14−
21のマツプされているアドレスVこ対しデータバス4
上のデータをライトしアドレスレジスタ14−21にコ
ンフィデンシャル・ゾーンを指定するアドレス上位の7
ビツトデータと、書込み禁止フラグ14−2である竜下
位ビットに1″ft:格納して書込み禁止フラグ14−
2ff:セットする。不用2の実施例におけるアドレス
レジスタ14−21は7ビツトのアドレスデータを洛7
泊する構成になっているので、アドレスバスが16ビy
)の場合、FROM  セル全512バイト単位に指定
できるが、前記アドレスレジスタ14−21のビブト長
を変更することにより、任意の客層のメモリ領域をコン
フィデンシャル・ゾーンとして指定できる。以上アドレ
スレジスタ14−21にデータを設定することにより、
コンフィデンシャル・シー711−2のアドレス値が確
定し、以後コンフィデンシャル・シー:/11−2への
データ書込みが禁止でれる。
Next, use the above operations to convert the necessary data into a confidential file.
After writing to zone 11-2, address register 14-2 is written by a dedicated command of the processor that performs FROM write.
21 mapped addresses V to data bus 4
Write the above data and specify the confidential zone in address registers 14-21. Upper 7 addresses
The bit data and the write inhibit flag 14-2 are stored in the lower bit of the lower bit, and the write inhibit flag 14-2 is stored.
2ff: Set. The address register 14-21 in the second embodiment stores 7-bit address data.
Since the address bus is configured to stay overnight, the address bus is 16 bits.
), the entire FROM cell can be specified in units of 512 bytes, but by changing the bibut length of the address register 14-21, the memory area of any customer class can be specified as the confidential zone. By setting the data in the address register 14-21 above,
The address value of confidential sea 711-2 is determined, and data writing to confidential sea:/11-2 is prohibited from now on.

次にアドレスレジスタ14−21に対しPRO八1へイ
トを行なうプロセッサ専用命令を用いてアドレスレジス
タ14−21に対応したアドレスにたいしデータバス上
のデータをライトし、書込み禁止フラグ14−2をセッ
トしt後、コンフィデンシャル・ゾーン11−2への書
込みが実行されたとする。比較器14−20はアドレス
バス3上のコンフィデンシャル・ゾーンのアドレス領域
ドアドレスレジスタ14−21内のコンフィデンシャル
・ゾーンのアドレスデータの一致を検出し、そO−4信
号?コンフィデンシャル・ゾーン選択線14−7に出力
してコンフィデンシャル・シー711−2が選択された
ことを通知する。しかし書込み禁止フラグ14−2がセ
ラ)−Jれていることによ#)書込み禁止線14−6は
ハイレベルであるので、第1のアンドグー)14−8%
第2のアントゲ−)14 12によりライト信号線15
がアクティブになっても、コンフィデンシャル・ゾーン
ライトストローブffJ14 101dハイレベルとな
らf、コンフィデンシャル・ゾーンへのデータ書込みは
行なうことができない。さらに第1のアンドゲートの出
力14−9がハイレベルで(書込み禁止中にコンフィデ
ンシャル・ゾーンが選択された時)ライト信号腺15が
ハイレベルになると、第3のアンドゲート14−13に
よりアクセスエラー割込み信号14−11を発生し、プ
ロセッサにアクセスエラーの割込み処理を実行させる。
Next, data on the data bus is written to the address corresponding to the address register 14-21 using a processor-specific instruction to write PRO81 to the address register 14-21, and the write inhibit flag 14-2 is set. Assume that after setting t, writing to the confidential zone 11-2 is executed. The comparator 14-20 detects a match between the confidential zone address data in the confidential zone address register 14-21 on the address bus 3, and outputs the O-4 signal? It is output to the confidential zone selection line 14-7 to notify that the confidential zone 711-2 has been selected. However, since the write inhibit flag 14-2 is set to 14-8%, the write inhibit line 14-6 is at a high level.
Write signal line 15 by 14 12
Even if becomes active, if the confidential zone write strobe ffJ14101d is at high level, data cannot be written to the confidential zone. Furthermore, when the output 14-9 of the first AND gate is at a high level (when the confidential zone is selected while write is prohibited) and the write signal gland 15 is at a high level, access is made by the third AND gate 14-13. An error interrupt signal 14-11 is generated to cause the processor to execute access error interrupt processing.

よって上述のように、本第2の実施例においては半固定
のアドレスレジスタ(書込み禁止フラグを含む)及び比
較器を付加することにより、コンフィデンシャル・ゾー
ン11−2の領域の指定を行なうことができる。さらに
前記アドレスレジスタは半固定である九め、前記コンフ
ィデンシャル・ゾーン領域指定後の前記領域の変更及び
コンフィデンシャル・ゾーン内のデータの不当な書き換
えやプログラムの暴走によるコンフィデンシャル・ゾー
ン内のデータの破壊を防止することができ、コンフィデ
ンシャル・ゾーンのフェイル・セーフが完全となる。
Therefore, as described above, in the second embodiment, by adding a semi-fixed address register (including a write inhibit flag) and a comparator, the area of the confidential zone 11-2 can be specified. can. Furthermore, since the address register is semi-fixed, data in the confidential zone may be changed due to changes to the area after the confidential zone area has been specified, illegal rewriting of data in the confidential zone, or runaway of the program. Destruction can be prevented, making the Confidential Zone completely fail-safe.

さらに本第2の実施例におけるようにPRC)Mとして
EEPROMを用いた場合、プロセッサの専用命令によ
、9FROM  セルの内容を全て消去することにより
再(史用が可能であり、ICカードの再使用を可能とす
るため、コストの低下に大きな効果がある。
Furthermore, when an EEPROM is used as the PRC) M as in the second embodiment, it is possible to reuse the IC card by erasing all the contents of the 9FROM cells using a dedicated instruction from the processor. This has a significant effect on reducing costs.

次にコンフィデンシャル・ゾーン内のデータ読み出しに
ついてであるが、こ扛も前記従来列と同様に行ない、不
正なアクセスに対する対処はソフトウェア処理によシ行
なう。
Next, data in the confidential zone is read out in the same manner as in the conventional column, and countermeasures against unauthorized access are performed by software processing.

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

以上説明したように本発明においては、従来データメモ
リとして使用しているFROMブロックに対し、書込み
禁止フラグやPRO,’d  メモリ中のコンフィデン
シャル・ゾーンに対するアドレスデコーダまたはアドレ
スレジスタ、比較器など簡単なハードウェア乞付力口す
ることにより、従来コンフィデンシャル・ゾーンへのデ
ータ書込み禁止をソフトウェア処理によう行なっていた
時に生じる不当なデータ書込みに対してセキュリティ性
?より高める効果がある。
As explained above, in the present invention, for the FROM block conventionally used as a data memory, a write inhibit flag, PRO, 'd, address decoder or address register for the confidential zone in the memory, a comparator, etc. are provided. Is there security against illegal data writing that occurs when software processing is traditionally prohibited from writing data to the confidential zone by forcing the hardware? It has a further enhancing effect.

−i7jROM内のプログラムが暴走し友場合でも、コ
ンフィデンシャル・ゾーン内のデータは前記ハードウェ
アにより完全に保護されるため、より確実なフェイル・
セーフが実現できる効果がある。
- Even if the program in the i7j ROM goes out of control, the data in the confidential zone is completely protected by the hardware, which ensures more reliable fail-safety.
It has the effect of achieving safety.

さらに上記書込み禁止フラグ、アドレスレジスタをFR
OM  セルで構成することにより既存の半導体製技術
金柑いることによシ容易に実現可能であり、また、プロ
セッサの専用命令により全てのFROM  セルの内容
?消去することにより高度セキュリティを損なうことな
(ICカードの再使用が実現可能であるという効果があ
る。
Furthermore, the above write inhibit flag and address register are set to FR.
By constructing OM cells, it can be easily realized using existing semiconductor technology, and the content of all FROM cells can be determined by the processor's dedicated instructions. Erasure has the effect of making it possible to reuse the IC card without compromising high security.

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

第1図は本発明の第1及び第2の実施例におけるシング
ルチップマイクロコンピュータのブロック図、第2図は
第1図における第1の実施例のアクセス制御回路及びP
R,OM  の詳細図、第3図は第1図における第2の
実施例のアクセス制御回路及びFROM  の詳細11
第4−1図は本発明におけるUVPROMセルで構成て
れた書込み禁止フラグの構成図、第4−2図は本発明に
おけるEEP−ROMセルで構成された書込み素止フラ
グの1成図、第5図は従来のシングルチップマイクロコ
ンピュータのブロックl、第6図は従来のコンフィデン
シャル・ゾーンアクセスのフローチャートである。 1・・・・・・プログラムカウンタ、2・・・・・・>
%OM、3・・・・・・アドレスバス、4・・・・・・
f−’;’バス、5・川・・3令レジスタ、6・・・・
・・命令デコーダ、7・山・・テンポラリレジスタ、8
・・・・・・テンポラリレジスタ、9.・・・・・算術
論理演算ユニット、1o・・・・・・R,AM、10−
1・・・・・・汎用レジスタ群、10−2・・・・・・
キー人力データ格納領域、10−3・・・・・・読み出
し許可フラグ、11・・・・・・PRC鴇 11−1・
・・・・・暗証番号格納fl、11−2・・・・・・コ
ンフィデンシャル・ゾーン、11−3・・・・・・書込
み禁止フラグ、12・・・・・・ポート、13・・・・
・・割込み制御回路、14・・・・・・アクセス制御回
路、14−1・・・・・・アドレスデコーダ、14−2
・・・・・・書込み禁止フラグ、14−6・・・・・・
書込み禁止!、14−7・・・・・・コンフィデンシャ
ル・ゾーン選択か、14−8・・・・・・第1のアント
ゲ−)、14−9・・・・・・第1のアンドゲートの出
力、14−10・・・・・・コンフィデンシャル・ゾー
ンライトストローブ線、1411・・・・・・アクセス
エラー割込み信号線、14−12・・・・・・第2のア
ンドゲート、14−13・・・・・・第3のアンドゲー
ト、14−20・・・・・・比較器、14−21・・・
・・・アドレスレジスタ、15・・・・・ライト信号線
、16・・・・・・リー トストロープ信号線、18・
・・・・・セレクト線、19・・・・・・ライト電圧、
20・・・・・・プログラム綜、21・・・・・・消去
線。 1″会 万30 筋4−10 第4−2図
FIG. 1 is a block diagram of a single-chip microcomputer in the first and second embodiments of the present invention, and FIG. 2 is a block diagram of the access control circuit and P of the first embodiment in FIG.
A detailed diagram of R, OM, and FIG. 3 is a detailed diagram of the access control circuit and FROM of the second embodiment in FIG. 1.
Fig. 4-1 is a configuration diagram of a write-inhibit flag made up of UVPROM cells in the present invention, and Fig. 4-2 is a configuration diagram of a write-inhibit flag made up of EEP-ROM cells in the present invention. FIG. 5 is a block l of a conventional single-chip microcomputer, and FIG. 6 is a flowchart of conventional confidential zone access. 1...Program counter, 2...>
%OM, 3... Address bus, 4...
f-';' bus, 5, river, 3rd order register, 6...
・・Instruction decoder, 7・・・・Temporary register, 8
...Temporary register, 9. ...Arithmetic logic unit, 1o...R, AM, 10-
1...General-purpose register group, 10-2...
Key human data storage area, 10-3...Read permission flag, 11...PRC 11-1.
...Password storage fl, 11-2 ... Confidential zone, 11-3 ... Write-protect flag, 12 ... Port, 13 ...・
...Interrupt control circuit, 14...Access control circuit, 14-1...Address decoder, 14-2
...Write protection flag, 14-6...
Writing is prohibited! , 14-7...confidential zone selection, 14-8...first AND gate), 14-9...output of first AND gate, 14-10... Confidential zone write strobe line, 1411... Access error interrupt signal line, 14-12... Second AND gate, 14-13... ...Third AND gate, 14-20...Comparator, 14-21...
...Address register, 15...Write signal line, 16...Leitstrope signal line, 18...
...Select wire, 19...Write voltage,
20... Program line, 21... Erase line. 1″ meeting 30 lines 4-10 Figure 4-2

Claims (1)

【特許請求の範囲】[Claims] (1)単一半導体基盤上に書込み可能なROM及びコン
ピュータ機能を集積したシングルチップマイクロコンピ
ュータにおいて、前記ROM中に特定領域を有し、再使
用可能な半固定の書込み禁止フラグ及び前記領域を選定
するアドレスデコード回路とを含むアクセス制御回路を
備え、前記特定領域に対し前記アクセス制御回路により
書込みを禁止することにより、前記領域内のデータに対
しフェイル・セーフを行ない、かつ前記半固定書込み禁
止フラグの消去手段を内蔵することにより再使用を可能
としたことを特徴とするシングルチップマイクロコンピ
ュータ。
(1) In a single-chip microcomputer that integrates a writable ROM and computer functions on a single semiconductor substrate, the ROM has a specific area, and a reusable semi-fixed write-inhibit flag and the area are selected. an access control circuit including an address decoding circuit to prevent writing to the specific area by the access control circuit, and fail-safe the data in the area; A single-chip microcomputer characterized by having a built-in erasing means to enable reuse.
JP61202233A 1986-08-27 1986-08-27 Single chip microcomputer Pending JPS6356750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61202233A JPS6356750A (en) 1986-08-27 1986-08-27 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61202233A JPS6356750A (en) 1986-08-27 1986-08-27 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPS6356750A true JPS6356750A (en) 1988-03-11

Family

ID=16454163

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61202233A Pending JPS6356750A (en) 1986-08-27 1986-08-27 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPS6356750A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02230444A (en) * 1989-03-03 1990-09-12 Mitsubishi Electric Corp Semiconductor integrated circuit
JP2001142654A (en) * 1999-11-17 2001-05-25 Melco Inc External storage device and access controlling method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02230444A (en) * 1989-03-03 1990-09-12 Mitsubishi Electric Corp Semiconductor integrated circuit
JP2001142654A (en) * 1999-11-17 2001-05-25 Melco Inc External storage device and access controlling method

Similar Documents

Publication Publication Date Title
JP2755828B2 (en) Secure application card for sharing application data and procedures between multiple microprocessors
CN101238473B (en) A secure terminal and a method of protecting a secret key
US8041912B2 (en) Memory devices with data protection
JP3493047B2 (en) memory card
JP3529800B2 (en) Data protection microprocessor circuit for portable data carrier
KR970004513B1 (en) Data processor having two modes of operation
US7249231B2 (en) Semiconductor memory with access protection scheme
US6832320B1 (en) Ownership tag on power-up screen
JPS63225841A (en) Semiconductor memory device
RU2266559C2 (en) Microprocessor circuit for data carrier and method for providing access to data, loaded in memory
US7409251B2 (en) Method and system for writing NV memories in a controller architecture, corresponding computer program product and computer-readable storage medium
US20200272581A1 (en) Method for protecting memory against unauthorized access
KR100505106B1 (en) Smart card with enhanced security
US6948041B2 (en) Permanent memory block protection in a flash memory device
US20040186947A1 (en) Access control system for nonvolatile memory
JPS6356750A (en) Single chip microcomputer
JPS6356749A (en) Single chip microcomputer
JP2000148594A (en) Read protection circuit for rom data
US11379580B1 (en) Mixed storage of data fields
JP2929696B2 (en) Single chip microcomputer
JPS62251841A (en) Single chip microcomputer
JPH05265867A (en) Single chip microcomputer
JP2677342B2 (en) Portable semiconductor memory device system
JPH05282472A (en) Microcomputer and card incorporating the same
JPH03278150A (en) Microcomputer