JPH04160583A - Single-chip microcomputer - Google Patents

Single-chip microcomputer

Info

Publication number
JPH04160583A
JPH04160583A JP2286086A JP28608690A JPH04160583A JP H04160583 A JPH04160583 A JP H04160583A JP 2286086 A JP2286086 A JP 2286086A JP 28608690 A JP28608690 A JP 28608690A JP H04160583 A JPH04160583 A JP H04160583A
Authority
JP
Japan
Prior art keywords
counter
data
shift register
prom
password
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2286086A
Other languages
Japanese (ja)
Other versions
JP2929696B2 (en
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 JP2286086A priority Critical patent/JP2929696B2/en
Publication of JPH04160583A publication Critical patent/JPH04160583A/en
Application granted granted Critical
Publication of JP2929696B2 publication Critical patent/JP2929696B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To prevent illegal access to a secret zone by comparing the address value of one of passwords with a value stored in a shift register and allowing access to a PROM only when they match each other. CONSTITUTION:Plural passwords are stored in the secret zone 5a of the PROM (Programmable Rom) 5 used as a data memory before ad a password read out of the PROM 5 corresponding to the frequency of input of a password which is inputted from outside is selected; and the value of the password is operated and compared with data inputted to the shift register 20 and only when they match each other, a test mode is allowed by a test circuit 17. Consequently, illegal data access which is caused when data access to the conventional secret zone is freely performed since the test mode is realized is inhibited and high-level security is realized.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はシングルチップマイクロコンピュータに関し、
特に単一半導体基板上にメモリ機能及びコンピュータ機
能を集積したシングルチップマイクロコンピュータに関
する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a single-chip microcomputer,
In particular, the present invention relates to a single-chip microcomputer that integrates memory functions and computer functions on a single semiconductor substrate.

〔従来の技術〕[Conventional technology]

近年のLSI製造技術の進歩により、シングルチップマ
イクロコンピュータ(以下シングルチップマイコンと呼
ぶ)の分野においても高集積化が進み、単位機能肖なり
のコストの低下も著しくなってきている。
Due to recent advances in LSI manufacturing technology, the field of single-chip microcomputers (hereinafter referred to as single-chip microcomputers) has become highly integrated, and the cost per unit function has been significantly reduced.

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

このICカードは磁気カードに比べ、記憶容量も数段大
きく、またカード内にコンピュータ機能を内蔵している
のでセキュリティの面でも格段の信頼度かある。
This IC card has a much larger storage capacity than a magnetic card, and since it has a built-in computer function, it is extremely reliable in terms of security.

一般にシングルチップマイコンを搭載したICカードに
おいて、データメモリの大部分にUVEP ROM (
Ult、ra−Violet Erasable Pr
ogrammableROM )またはE E P R
OM (Electrical ErasablePr
ogrammable ROM)を使用しており(以後
UVEPROM、EEPROMを総してPROMと称す
る)、その子−タメモリをいくつかの領域に分割しその
アクセスを管理している。
Generally speaking, an IC card equipped with a single-chip microcontroller has UVEP ROM (UVEP ROM) in most of the data memory.
Ult, ra-Violet Erasable Pr
ogrammable ROM) or EEP R
OM (Electrical Erasable Pr
(UVEPROM and EEPROM will be collectively referred to as PROM hereinafter), and its child memory is divided into several areas and access to them is managed.

銀行なとの金融機関の発行するキャッシュカート、クレ
ジットカードとしてICカートを使用する場合、この分
割されたシークメモリの一部をシークレット・ゾーン(
Secret Zone)と呼び、銀行の口座番号、I
Dナンバー、シークレットナンバーなと機密性の高いデ
ータを格納するのに使用している。
When using an IC cart as a cash cart or credit card issued by a financial institution such as a bank, some of this divided seek memory is stored in a secret zone (
Secret Zone), bank account number, I
It is used to store highly confidential data such as D numbers and secret numbers.

このシークレット・ゾーンはICカードの不正使用、偽
造を防止する上で重要な部分であって、使用時にはソフ
トウェアによりこの領域に対するアクセスを管理し、特
別な場合たけこの領域に対しアクセスできるようになっ
ている。
This secret zone is an important part of preventing unauthorized use and counterfeiting of IC cards, and during use, access to this area is controlled by software, and access to this area is made possible in special cases. There is.

第6図に従来のシングルチップマイコンのブロック図を
示す。同図において、メモリ部3はユーザプログラム格
納及びデータの格納に用いる読み出し専用または、読み
出し書込みともに可能なメモリである。内部バス4はア
ドレス及びデータを時分割に転送し、内部バス8は、テ
ストモート時い、外部端子10を介して内部バス4にア
ドレス及びシークを転送する際に用いる時分割バスであ
る。
FIG. 6 shows a block diagram of a conventional single-chip microcomputer. In the figure, a memory unit 3 is a read-only or read-write memory used for storing user programs and data. The internal bus 4 transfers addresses and data in a time-division manner, and the internal bus 8 is a time-division bus used to transfer addresses and seek to the internal bus 4 via the external terminal 10 during test mode.

中央処理装置(以下CPUと呼ぶ)2は、メモリ部3に
格納したプロクラムに従って、シーク処理を行なう。周
辺部6は、チップ外部との通信を行なうためのボート等
から構成され、内部バス4を介してデータを外部端子6
aに入出力する機能を持つ。
A central processing unit (hereinafter referred to as CPU) 2 performs a seek process according to a program stored in a memory unit 3. The peripheral section 6 is composed of a boat and the like for communicating with the outside of the chip, and transmits data via the internal bus 4 to an external terminal 6.
It has the function of inputting and outputting to a.

PROM5はデータメモリとしてUVEPROMまたは
EEPROMから構成し、メモリ内にはシークレット・
ゾーン5aを有し、カートのIDナンバー、シークレッ
トナンバー、口座番号等を格納しており、CPU2の命
令により読み出し及び書込みを行なう。このシークレッ
ト・シーク5aへのアクセス管理は、ユーザがソフトウ
ェアにより行なっている。
PROM5 consists of UVEPROM or EEPROM as a data memory, and a secret memory is stored in the memory.
It has a zone 5a, which stores cart ID numbers, secret numbers, account numbers, etc., and reads and writes them according to instructions from the CPU 2. Access management to this secret seek 5a is performed by the user using software.

端子]5は、テストモード時にそのレベルが” 1 ”
となる外部入力端子であり、′この時インバータ7の出
力か′0”′となるため、内部バス4にはPROM5の
み接続され、PROM5へのアクセスかチップ外部より
直接可能となる。
Terminal] 5 has a level of “1” in test mode.
Since the output of the inverter 7 becomes '0'' at this time, only the PROM 5 is connected to the internal bus 4, and access to the PROM 5 can be made directly from outside the chip.

端子10は、内部ハス8を介してアドレス及びデータを
外部に入出力する端子てあり、内部バス4に接続されて
いる。
The terminal 10 is a terminal for inputting and outputting addresses and data to the outside via the internal bus 8, and is connected to the internal bus 4.

端子]2は、CPU2の出力するCPUクロック1]を
出力する端子である。端子13は、CP−5= U2をリセットする端子であり、そのレベルが“1”′
の時、リセット信号14が′1″′となり、CPU2を
リセッI〜する。
The terminal]2 is a terminal that outputs the CPU clock1 outputted from the CPU2. Terminal 13 is a terminal that resets CP-5=U2, and when its level is "1"'
At this time, the reset signal 14 becomes '1'' and resets the CPU 2.

次に、テスト時の動作を説明する。端子13のレベルを
” 1 ”のまま、端子]5を“′]″′とし、端子1
3をCPUクロック]−1の立ち下かりに同期して” 
o ”とする。この時、テスト信号9は′1″″となり
、インバータ7の出力は“′O″となるので、CPU2
、メモリ部3、周辺部6は内部バス4から電気的に切り
離される。従って、内部バス4に接続されているのはP
ROM5のみとなる。
Next, the operation during testing will be explained. Keep the level of terminal 13 at "1", set terminal]5 to "']"', and set terminal 1 to
3 in synchronization with the falling edge of CPU clock]-1.
At this time, the test signal 9 becomes ``1'''' and the output of the inverter 7 becomes ``O'', so the CPU 2
, the memory section 3 and the peripheral section 6 are electrically separated from the internal bus 4. Therefore, the one connected to internal bus 4 is P
Only ROM5 is available.

この状態で外部端子10、内部バス8を介してアドレス
及びシークをPROM5に入力し、データの読み出し及
び書込みを行なう。この時、シークレットシーク5aの
アドレスを入力すれば容易にゾーン内シータにアクセス
可能である。従って、シークリード及びライトが容易に
行なえることとなる。
In this state, an address and a seek are input to the PROM 5 via the external terminal 10 and the internal bus 8 to read and write data. At this time, by inputting the address of the secret seeker 5a, it is possible to easily access the theta in the zone. Therefore, seek read and write operations can be easily performed.

以上述べたように従来のシングルチップマイコンにおい
ては、秘匿データを格納するシークレット・ゾーンに対
するアクセス管理をすべてユーザーのソフトウェアによ
り行なっている。このようなシングルチップマイコンを
カードに搭載した場合、テストモードを使用することに
より、シークレット・ゾーンに対し不当なデータアクセ
スを行なうことか可能である。さらに、データメモリに
電気消去型読み出し専用メモリ(EEPROM)が使用
されている場合には、書込み命令が実行さ−れるとFR
OM内部で自動的に書込み用の電圧が生成されるので、
シークレット・ゾーンに対し、不当な書込みが容易に行
なうことが可能である。
As mentioned above, in conventional single-chip microcomputers, all access control to the secret zone where confidential data is stored is performed by the user's software. When such a single-chip microcomputer is installed on a card, it is possible to illegally access data in the secret zone by using the test mode. Furthermore, if an electrically erasable read-only memory (EEPROM) is used as the data memory, when a write command is executed, the FR
Since the voltage for writing is automatically generated inside the OM,
Illegal writing to the secret zone is easily possible.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したように、従来のデータメモリにおいてアクセス
保護の領域であるシークレット・ゾーンへのアクセスを
管理しているシングルチップマイコンにおいては、内蔵
PROMへのアクセス管理をすべてソフトウェアによっ
て行なっているので、テストモード時に容易にアクセス
可能であり、不正のアクセスが行なわれてシークレット
・ゾーン内のデータが悪用されたり、また故意にデータ
が書き換えられる危険性が在るという欠点が存在した。
As mentioned above, in conventional single-chip microcontrollers that manage access to the secret zone, which is an access protection area in data memory, all access management to the built-in PROM is done by software, so test mode is not possible. The disadvantage is that the data in the secret zone can be easily accessed at times, and there is a risk that the data in the secret zone may be misused due to unauthorized access, or that the data may be intentionally rewritten.

本発明の目的は、シークレットゾーンに対する不当なデ
ータアクセスを防止できるシングルチップマイクロコン
ピュータを提供することにある。
An object of the present invention is to provide a single-chip microcomputer that can prevent unauthorized data access to a secret zone.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のシングルチップマイコンは、複数のパスワード
を格納したPROMと、シフトレジスタと、外部からシ
リアルに入力されるデータを格納するシフトレジスタと
、前記シフトレジスタへの入力ビツト数をカウントする
第1のカウンタと、前記シフトレジスタへのデータ入力
回数をカウントする第2のカウンタと、前記第2のカウ
ンタの値に対応した前記複数のパスワードのうち1つの
パスワードのアドレス値と前記シフトレジスタに格納さ
れた値を比較して一致した場合のみ前記PROMに対す
るアクセスを許可する比較手段とを有することを特徴と
する。
The single-chip microcomputer of the present invention includes a PROM that stores a plurality of passwords, a shift register, a shift register that stores data serially input from the outside, and a first register that counts the number of input bits to the shift register. a counter; a second counter that counts the number of times data is input to the shift register; and an address value of one password among the plurality of passwords that corresponds to the value of the second counter and that is stored in the shift register. The present invention is characterized by comprising a comparing means for comparing the values and permitting access to the PROM only when they match.

〔実施例〕〔Example〕

次に本発明の第1の実施例について第1図を用いて説明
する。第1図は本発明の第1の実施例のシングルチップ
マイコンのブロック図である。まず構成について説明す
る。本実施例のシングルチップマイコンは、第6図に示
す従来例の回路構成にテスト回路17を追加した構成と
なっている。
Next, a first embodiment of the present invention will be described using FIG. 1. FIG. 1 is a block diagram of a single-chip microcomputer according to a first embodiment of the present invention. First, the configuration will be explained. The single-chip microcomputer of this embodiment has a configuration in which a test circuit 17 is added to the circuit configuration of the conventional example shown in FIG.

従って、以下テスト回路17を中心に説明する。Therefore, the test circuit 17 will be mainly described below.

テスト回路17は、CPUの出力するクロック信号11
に同期して外部端子1つよりシリアルにデータを入力し
、アドレス信号100てアドレス指定するPROM5内
のシークレット・ゾーン5a内に格納した複数パスワー
ドのうちの1個の値と上記入力データを比較して、一致
する場合のみテストモードを許可する機能を有する。
The test circuit 17 receives a clock signal 11 output from the CPU.
Data is serially inputted from one external terminal in synchronization with , and the above input data is compared with the value of one of the multiple passwords stored in the secret zone 5a in the PROM 5, which is addressed by the address signal 100. It has a function that allows test mode only if the two conditions match.

以下、テスト回路17についての詳細な構成及び動作を
第2図を用いて説明する。
The detailed configuration and operation of the test circuit 17 will be described below with reference to FIG.

テスト回路17はシフトレジスタ20.比較回路22.
カウンタ24.カウンタ101から構成されるブロック
である。シフトレジスタ20は、リセット信号14が“
0″で、シフト許可信号28がII I IIの時、C
PUクロック11の立ち下がりに同期して信号線18上
の10ビツトシリアルデータを入力する。
The test circuit 17 includes a shift register 20. Comparison circuit 22.
Counter 24. This block is composed of a counter 101. The shift register 20 receives the reset signal 14 “
0'', and when the shift permission signal 28 is II I II, C
10-bit serial data on the signal line 18 is input in synchronization with the falling edge of the PU clock 11.

比較回路22はシフトレジスタ20の出力と、カウンタ
101の出力するアドレス信号100てアドレス指定す
るPROM5内のシークレットゾーン5aに格納した複
数パスワードのうちの1個であるパスワード23の値を
比較し、一致した時のみテスト信号9を出力する。
The comparison circuit 22 compares the output of the shift register 20 with the value of the password 23, which is one of the plural passwords stored in the secret zone 5a in the PROM 5, which is addressed by the address signal 100 output from the counter 101, and finds a match. The test signal 9 is output only when this happens.

カウンタ24は、シフトレジスタ20のシフト動作を制
御する回路で、基本クロック11の立上がりに同期し、
テストモード信号]6がパ1°′の時のみ、CPU11
をカウントするとともに、シフトレジスタ20に対しシ
フト許可信号28を出力する。又、カウンタ24は、テ
ストモート信号16が0″の時クリアされ、動作を停止
する。
The counter 24 is a circuit that controls the shift operation of the shift register 20, and is synchronized with the rising edge of the basic clock 11.
Only when test mode signal ] 6 is PA 1°', CPU 11
, and outputs a shift permission signal 28 to the shift register 20. Further, the counter 24 is cleared and stops operating when the test mote signal 16 is 0''.

カウンタ101は、リセット信号]4が” o ”の時
のみカウンタ24のオーパフロウ信号102の立上がり
同期でオーパフロウ信号をカウントするとともに、複数
パスワードを格納するPROM5aに対し格納値をアド
レス信号]00として出力する。このカウンタ101は
、リセット信号14か” 1 ”の時クリアされ、動作
を停止する。
The counter 101 counts the overflow signal in synchronization with the rise of the overflow signal 102 of the counter 24 only when the reset signal]4 is "o", and outputs the stored value as an address signal]00 to the PROM 5a that stores multiple passwords. . This counter 101 is cleared when the reset signal 14 is "1" and stops operating.

以下、テスト回路17の動作を第5図の波形図を参照し
て説明する。まず、リセッ1へ信号14を]″°のまま
で、テストモード信号16を” o ”としておく。次
に、テスト信号モード16を1°′とし、リセット信号
14をCPUクロック]1の立ち下かりに同期して0″
とする。そして、CPUクロック11の立上がりに同期
して、外部端子1つよりシリアルに8ヒツトデータを入
力する。この時、カウンタ24は、CP Uクロック1
1に同期して9回カウントするとともに、シフト許可信
号28を′]″とし、シフトレジスタ20に対し出力す
る。
The operation of the test circuit 17 will be explained below with reference to the waveform diagram in FIG. First, the test mode signal 16 is set to "o" while the signal 14 to the reset 1 remains ]''°.Next, the test signal mode 16 is set to 1°', and the reset signal 14 is set to the falling edge of the CPU clock]1. 0″
shall be. Then, in synchronization with the rise of the CPU clock 11, eight hit data are serially inputted from one external terminal. At this time, the counter 24 is CPU clock 1
1, the shift permission signal 28 is set to ``]'' and is output to the shift register 20.

カウンタ24は、9回カウント動作後シフト許可信号2
8を0′″にして停止する。。また、カウンタ101は
カウンタ24のオーハフロウ信号102に従って1回カ
ウントアツプする。
The counter 24 receives a shift permission signal 2 after counting nine times.
8 is set to 0'' and stops. Further, the counter 101 counts up once in accordance with the OHA flow signal 102 of the counter 24.

シフトレジスタ20は、シフト許可信号28が1”″の
時、CPUクロック]1の立ち下がりに同期してシフト
動作を8回行なった後、シフ1へ許可信号28か0′″
となるため、シフ1へ動作を停止する。また、リセット
信号14がパ1°′のとき、格納値をクリアする。
When the shift permission signal 28 is 1'', the shift register 20 performs a shift operation eight times in synchronization with the falling edge of the CPU clock]1, and then transfers the permission signal 28 to shift 1 to 0''.
Therefore, the operation is stopped at shift 1. Further, when the reset signal 14 is at 1°', the stored value is cleared.

8ビツトのシリアルデータを受信後、シフトレジスタ2
0の格納値は比較回路22に出力される。比較回路22
は、PROM5内のシークレットゾーン5a内に格納し
た複数パスワードのうち、カウンタ101の出力するア
ドレス信号100にてアドレス指定されたパスワード2
3とシフトレジスタ20への入力データを比較し、値か
同一の場合にテスト信号9を出力する。
After receiving 8-bit serial data, shift register 2
The stored value of 0 is output to the comparison circuit 22. Comparison circuit 22
is the password 2 whose address is specified by the address signal 100 output from the counter 101 among the plurality of passwords stored in the secret zone 5a in the PROM 5.
3 and the input data to the shift register 20, and if the values are the same, a test signal 9 is output.

チップ外部からの入力データがパスワード23と一致し
ない場合、さらにもう−度外部より異なるデータを入力
してテストモードにする必要かある。この時、ます外部
端子15をCPUクロック]1−の立ち下がり同期で”
 o ”とし、次にCPUクロック]1の立ち下がり同
期で1′”としてからデータをPCUクロック1]の立
ち上がり同期て入力する。
If the input data from the outside of the chip does not match the password 23, it is necessary to input different data from the outside again to enter the test mode. At this time, the external terminal 15 is connected in synchronization with the falling edge of the CPU clock]1-.
o'', then set to 1''' in synchronization with the falling edge of the CPU clock [1], and then inputting data in synchronization with the rising edge of the PCU clock [1].

外部端子15”O’”とすると、テストモード信号16
が0”°となり、カウンタ24かクリアされる。すると
、シフト許可信号28か1′となり、シフトレジスタ2
0は外部データ入力可能となる。
When external terminal 15 is set to “O’”, test mode signal 16
becomes 0"°, and the counter 24 is cleared. Then, the shift permission signal 28 becomes 1', and the shift register 2
0 enables external data input.

さらに、外部端子15を]”′とすると、テストモード
信号16か°゛1″となりカウンタ24の動作が可能と
なる。こうして再度チップ外部からシーク入力か可能で
あるか、この時カウンタ24はオーパフロウ信号102
を出力するため、カウンタ]、 01は1カウンI〜ア
ツプし格納値か2となる。
Further, when the external terminal 15 is set to ``'', the test mode signal 16 becomes ``1'', allowing the counter 24 to operate. In this way, the counter 24 checks whether a seek input from outside the chip is possible again.
In order to output the counter], 01 increases by 1 count I and becomes the stored value 2.

ずなわち、カウンタ101はリセッ1へ後にチップ外部
より入力されたシータ数をカウントすることとなる。
In other words, the counter 101 counts the number of theta input to reset 1 later from outside the chip.

次に、カウンタ24の構成及び動作を第4図を参照して
説明する。カウンタ24は、4ヒツトのアップカウンタ
3Q、ANDゲート31.NANDゲート32から構成
する。
Next, the configuration and operation of the counter 24 will be explained with reference to FIG. The counter 24 includes a 4-hit up counter 3Q, an AND gate 31. It consists of a NAND gate 32.

テストモード信号16が” o ”の時、アップカウン
タ30はクリアされて、動作を停止する。テストモード
信号16か′1′″の時、カウンタ30はANDゲート
31の出力の立上がりに同期してカウントアツプする。
When the test mode signal 16 is "o", the up counter 30 is cleared and stops operating. When the test mode signal 16 is '1', the counter 30 counts up in synchronization with the rise of the output of the AND gate 31.

すなわち、テス)・モード信号16が0′″でNAND
ゲート32の出力か0″′のため、ANDゲート31は
CPUクロック11をそのまま出力し、カウンタ30は
CP Uクロックをカウントする。
That is, when the test) mode signal 16 is 0'', the NAND
Since the output of the gate 32 is 0'', the AND gate 31 outputs the CPU clock 11 as it is, and the counter 30 counts the CPU clock.

カウンタ24がCPUクロック1]を9回カウントする
と、カウンタ24の第3ビツトと第Oビットが共に1′
′となるため、NANDゲート32の出力が′0″とな
り、シフト許可信号28が” o ”となる。従って、
ANDゲーlへ31の出力も“0′″となり、カウンタ
30はカウント動作を停止する。
When the counter 24 counts the CPU clock 1 nine times, both the third bit and the Oth bit of the counter 24 become 1'.
', so the output of the NAND gate 32 becomes '0' and the shift permission signal 28 becomes 'o'. Therefore,
The output of the AND gate 31 also becomes "0'", and the counter 30 stops counting.

チップ外部から再度データを入力する場合、まず外部端
子15をCPUクロック11の立ち下かり同期で0″と
し、次にCPUクロック11の立ち下がり同期で1″′
としてからデータをCPUクロック11の立ち上がり同
期で入力する。
When inputting data again from outside the chip, first set the external terminal 15 to 0'' in synchronization with the falling edge of the CPU clock 11, then set it to 1'' in synchronization with the falling edge of the CPU clock 11.
After that, data is input in synchronization with the rising edge of the CPU clock 11.

外部端子15をロウとすると、テストモード信号16が
0”′となり、カウンタ24がクリアされる。すると、
シフト許可信号28が′1″となり、シフトレジスタ2
0は外部データ入力可能となる。さらに外部端子15を
1″とすると、テストモード信号16か” 1 ”とな
り、カウンタ24の動作が可能となる。
When the external terminal 15 is set to low, the test mode signal 16 becomes 0"' and the counter 24 is cleared. Then,
The shift permission signal 28 becomes '1'', and the shift register 2
0 enables external data input. Further, when the external terminal 15 is set to 1'', the test mode signal 16 becomes ``1'', and the counter 24 becomes operable.

本実施例は、チップ外部からのデータ入力の回数に応じ
て内蔵PROMに格納するパスワードのアドレスが変化
するので、テストモードを実現可能な8ビツトデータを
検出するのがより困難となる。従って、第三者によるテ
ストモードの実行はより困難となる。
In this embodiment, since the address of the password stored in the built-in PROM changes depending on the number of data inputs from outside the chip, it becomes more difficult to detect 8-bit data that can realize the test mode. Therefore, it becomes more difficult for a third party to execute the test mode.

次に本発明の第2の実施例について、第3図を用いて説
明する。第3図は、テスト回路のブロック図である。テ
スト回路17aは、第2図に示した第1の実施例のテス
ト回路17に対して、カウンタ24のオーハフロウ信号
102により反転するラッチ51の値に従って、反転回
路52かPROM5の出力するパスワード23の値をビ
ット反転し比較回路22に出力する手段を有する点で異
なる。他の構成及び動作に差異はないので、相違点を中
心に説明する。
Next, a second embodiment of the present invention will be described using FIG. 3. FIG. 3 is a block diagram of the test circuit. For the test circuit 17 of the first embodiment shown in FIG. The difference is that it includes means for bit-inverting the value and outputting it to the comparator circuit 22. Since there is no difference in other configurations and operations, the differences will be mainly explained.

ラッチ51は、カウンタ24の出力するオーパフロウ信
号102が1″の時、格納値を反転する1ビツトフラグ
であり、値を反転回路52に出力し、リセット信号14
が1の時Oにクリアされる。このラッチ51は、J−に
フリップフロップ等のマスタスレーブ構成のラッチによ
り容易に構成可能である。
The latch 51 is a 1-bit flag that inverts the stored value when the overflow signal 102 output from the counter 24 is 1'', outputs the value to the inversion circuit 52, and outputs the value to the reset signal 14.
When is 1, it is cleared to O. This latch 51 can be easily configured with a master-slave configuration latch such as a flip-flop.

反転回路52は、ラッチ51の出力値に従って、パスワ
ード23の値を反転出力する回路で、パスワード23の
各ビットに対応して1個の3ステート・バッファ及び1
個の3ステート・インバータから構成される。
The inversion circuit 52 is a circuit that inverts and outputs the value of the password 23 according to the output value of the latch 51, and includes one 3-state buffer and one 3-state buffer corresponding to each bit of the password 23.
It consists of three 3-state inverters.

パスワード23の第7ビツトに対して3ステート・バッ
ファ52a及び3ステート・インバータ52bが対応す
る。3ステート・バッファ52aは、ラッチ51の出力
が0″の時、パスワード23の第7ビツトを出力し、”
 1 ”の時、出力をハイ・インピーダンスとする。ま
た、3ステート・インバータ52bは、ラッチ51の出
力がII I IIの時、パスワード23の第7ビツト
の反転値を出力し、” o ”の時、出力をハイ・イン
ピーダンスとする。
A 3-state buffer 52a and a 3-state inverter 52b correspond to the seventh bit of the password 23. The 3-state buffer 52a outputs the seventh bit of the password 23 when the output of the latch 51 is 0'',
1", the output becomes high impedance. Also, when the output of the latch 51 is II I II, the 3-state inverter 52b outputs the inverted value of the 7th bit of the password 23, and the output becomes high impedance. When the output is high impedance.

従って、3ステート・バッファ52a及び3ステート・
インバータ52bの出力がワイアードされているため、
反転回路22はラッチ51の出力が“1″の時は、パス
ワード23の出力を反転した値を出力する。また、ラッ
チ51の出力がII OIIの時は、反転回路22はパ
スワード23の出力値をそのまま出力する。
Therefore, the 3-state buffer 52a and the 3-state buffer 52a
Since the output of the inverter 52b is wired,
When the output of the latch 51 is "1", the inversion circuit 22 outputs a value obtained by inverting the output of the password 23. Further, when the output of the latch 51 is II OII, the inversion circuit 22 outputs the output value of the password 23 as is.

次に動作を説明する。テスト回路17aは、シフトレジ
スタ20に8ビツトデータを入力後データを比較回路2
2に対して出力する。カウンタ101は、カウンタ24
の出力するオーパフロウ信号102が“O″の時、1を
カウントする。
Next, the operation will be explained. The test circuit 17a inputs 8-bit data to the shift register 20 and then transfers the data to the comparison circuit 2.
Output for 2. The counter 101 is the counter 24
When the overflow signal 102 outputted by is "O", it counts 1.

従って、カウンタ101はリセット後のシフトレジスタ
20へのデータ入力回数をカウントし、その回数をアド
レス信号100としてPROM5aに出力する。ラッチ
51はカウンタ24の出力するオーパフロウ信号102
が0の時値を反転する。カウンタ24の内容が9となる
と、オーパフロウ信号102が′O″となるためラッチ
51はシフトレジスタ20へのデータ入力回数が奇数の
場合″1°′を出力し、偶数の場合II OIIを出力
することになる。
Therefore, the counter 101 counts the number of times data is input to the shift register 20 after being reset, and outputs the number of times as an address signal 100 to the PROM 5a. The latch 51 receives an overflow signal 102 output from the counter 24.
When is 0, invert the value. When the content of the counter 24 becomes 9, the overflow signal 102 becomes 'O', so the latch 51 outputs '1°' if the number of data inputs to the shift register 20 is an odd number, and outputs II OII if the number of data inputs to the shift register 20 is an even number. It turns out.

例えば、シフトレジスタ20への1回目ノシータ入力の
場合、PROM5aのアドレス1からパスワード23を
リードし、かつ反転回路52によりビット反転した値を
シフトレジスタ20の入力値と比較することになる。
For example, in the case of the first notheta input to the shift register 20, the password 23 is read from address 1 of the PROM 5a, and the value whose bits are inverted by the inversion circuit 52 is compared with the input value of the shift register 20.

本実施例は、第1の実施例のテスト回路に比べ、シフト
レジスタへの入力回数に応じてPROM、からリードす
るパスワードを変更する操作に加え、入力回数に応じて
パスワードの値をも操作しており、テストモードを実現
可能な8ビツトテータを検出することが困難となる。
Compared to the test circuit of the first embodiment, this embodiment not only changes the password read from the PROM according to the number of inputs to the shift register, but also manipulates the password value according to the number of inputs. Therefore, it is difficult to detect an 8-bit data that can realize the test mode.

従って、第3者によるテストモードの実現は、第1の実
施例に比べより困難となる。
Therefore, it is more difficult for a third party to implement the test mode than in the first embodiment.

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

以上説明したように本発明においては、従来データメモ
リとして使用しているPROMのシークレット・ゾーン
に複数のパスワードを格納し、外部から入力したパスワ
ードの入力回数に応じてPROMからリードするパスワ
ードを選択し、さらに」二記パスワードの値を操作し、
シフトレジスタに入力したシークと比較した結果一致し
た場合のみテストモートを許可するテスト回路を付加す
ることにより、従来シークレット・ゾーンへのデータア
クセスをテストモートの実現にて自由に行っていた時に
生しる不当なデータアクセスを禁止し、高度なセキュリ
ティを実現する効果がある。
As explained above, in the present invention, a plurality of passwords are stored in the secret zone of the PROM conventionally used as a data memory, and a password to be read from the PROM is selected depending on the number of passwords input from the outside. , further manipulate the value of the second password,
By adding a test circuit that allows test mote only when the result of comparison with the seek input to the shift register matches, data access to the secret zone was previously freely performed by realizing test mote. This has the effect of prohibiting unauthorized data access and achieving a high level of security.

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

第1図は本発明の第1及び第2の実施例におけるシンク
ルチップマイクロコンピュータのフロック図、第2図は
第1の実施例のテスト回路のブロック図、第3図は第2
の実施例のテスト回路のブロック図、第4図はテスト回
路内カウンタのブロック図、第5図はテスト回路の動作
タイミンクを示す波形図、第6図は従来のシングルチッ
プマイクロコンピュータのブロック図である。 1・・・シングルチップマイクロコンピュータ、2・・
・CPU、3・・・メモリ部、4.8・・・内部バス、
5・・・PROM、5a・・シークレット・ゾーン、6
・・・周辺部、7.’1.03・・インバータ、9 ・
テスト信号、10,12,1.3,15.19,6.1
・・・外部端子、1] ・CPUクロック、14・・リ
セット信号、]6・・・テストモード信号、1.7,1
.7a・・・テスト回路、18・・・信号線、20・・
・シフトレジスタ、22・・・比較回路、23・・・パ
スワー1〜.24・・・カウンタ、28・・シフト許可
信号、30・・・カウンタ、31・・・ANDゲート、
32・・・NANDゲート、5]・・・ラッチ、52・
・反転回路、52a・・・3ステート・バッファ、52
b・・・3ステート・イバータ、]00・・アドレス信
号、101・・・カウンタ、102・・・オーパフロウ
信号。
FIG. 1 is a block diagram of a single-chip microcomputer in the first and second embodiments of the present invention, FIG. 2 is a block diagram of a test circuit in the first embodiment, and FIG. 3 is a block diagram of a test circuit in the first embodiment.
4 is a block diagram of the counter in the test circuit, FIG. 5 is a waveform diagram showing the operation timing of the test circuit, and FIG. 6 is a block diagram of a conventional single-chip microcomputer. be. 1... Single-chip microcomputer, 2...
・CPU, 3...Memory section, 4.8...Internal bus,
5...PROM, 5a...Secret zone, 6
... peripheral area, 7. '1.03... Inverter, 9 ・
Test signal, 10, 12, 1.3, 15.19, 6.1
...External terminal, 1] - CPU clock, 14... Reset signal, ]6... Test mode signal, 1.7, 1
.. 7a...Test circuit, 18...Signal line, 20...
- Shift register, 22... Comparison circuit, 23... Password 1~. 24...Counter, 28...Shift permission signal, 30...Counter, 31...AND gate,
32...NAND gate, 5]...Latch, 52...
- Inversion circuit, 52a... 3-state buffer, 52
b...3-state inverter, ]00...address signal, 101...counter, 102...overflow signal.

Claims (2)

【特許請求の範囲】[Claims] 1.複数のパスワードを格納したPROMと、シフトレ
ジスタと、外部からシリアルに入力されるデータを格納
するシフトレジスタと、前記シフトレジスタへの入力ビ
ット数をカウントする第1のカウンタと、前記シフトレ
ジスタへのデータ入力回数をカウントする第2のカウン
タと、前記第2のカウンタの値に対応した前記複数のパ
スワードのうち1つのパスワードのアドレス値と前記シ
フトレジスタに格納された値を比較して一致した場合の
み前記PROMに対するアクセスを許可する比較手段と
を有することを特徴とするシングルチップマイクロコン
ピュータ。
1. A PROM that stores a plurality of passwords, a shift register, a shift register that stores data serially input from the outside, a first counter that counts the number of bits input to the shift register, and a first counter that counts the number of bits input to the shift register. When a second counter that counts the number of data inputs is compared with the address value of one of the plurality of passwords corresponding to the value of the second counter and the value stored in the shift register, and they match. 1. A single-chip microcomputer, comprising comparison means for permitting access only to the PROM.
2.前記シフトレジスタへの入力データに応答して前記
パスワードを反転して前記比較手段に入力させる手段を
有することを特徴とする請求項1記載のシングルチップ
マイクロコンピュータ。
2. 2. The single-chip microcomputer according to claim 1, further comprising means for inverting said password in response to input data to said shift register and inputting said password to said comparing means.
JP2286086A 1990-10-24 1990-10-24 Single chip microcomputer Expired - Lifetime JP2929696B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2286086A JP2929696B2 (en) 1990-10-24 1990-10-24 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2286086A JP2929696B2 (en) 1990-10-24 1990-10-24 Single chip microcomputer

Publications (2)

Publication Number Publication Date
JPH04160583A true JPH04160583A (en) 1992-06-03
JP2929696B2 JP2929696B2 (en) 1999-08-03

Family

ID=17699759

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2286086A Expired - Lifetime JP2929696B2 (en) 1990-10-24 1990-10-24 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JP2929696B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080052A1 (en) * 2005-01-26 2006-08-03 Hitachi Ulsi Systems Co., Ltd. Rfid device
JP2007242029A (en) * 2007-03-26 2007-09-20 Le Tekku:Kk Circuit for preventing program from being decoded in micro-computer chip to control game machine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080052A1 (en) * 2005-01-26 2006-08-03 Hitachi Ulsi Systems Co., Ltd. Rfid device
JPWO2006080052A1 (en) * 2005-01-26 2008-08-07 株式会社日立超エル・エス・アイ・システムズ RFID device
JP4519168B2 (en) * 2005-01-26 2010-08-04 株式会社日立超エル・エス・アイ・システムズ RFID device
JP2007242029A (en) * 2007-03-26 2007-09-20 Le Tekku:Kk Circuit for preventing program from being decoded in micro-computer chip to control game machine
JP4523613B2 (en) * 2007-03-26 2010-08-11 株式会社エルイーテック Program decoding prevention circuit in microcomputer chip for game machine control

Also Published As

Publication number Publication date
JP2929696B2 (en) 1999-08-03

Similar Documents

Publication Publication Date Title
JP3396043B2 (en) Micro circuit
US7149854B2 (en) External locking mechanism for personal computer memory locations
US6138240A (en) Secure general purpose input/output pins for protecting computer system resources
CN101238473B (en) A secure terminal and a method of protecting a secret key
JPS6270993A (en) Portable data carrier for storing and processing data
US20030196100A1 (en) Protection against memory attacks following reset
US20060184799A1 (en) Security circuit and method to secure information in a device
US9612977B2 (en) Method and system for controlling access to embedded nonvolatile memories
JPH08115266A (en) Smart card
US20020194486A1 (en) Apparatus and method for maintaining secured access to relocated plug and play peripheral devices
US7054121B2 (en) Protection circuit for preventing unauthorized access to the memory device of a processor
US20040186947A1 (en) Access control system for nonvolatile memory
US6735697B1 (en) Circuit arrangement for electronic data processing
US5778199A (en) Blocking address enable signal from a device on a bus
US5237531A (en) Read-only memory having a security circuit preventing unauthorized memory retrieval
JPH04160583A (en) Single-chip microcomputer
JPH05265867A (en) Single chip microcomputer
US7089427B1 (en) Security system method and apparatus for preventing application program unauthorized use
US20030079099A1 (en) Nonvolatile semiconductor memory device with password unlock function
JPH03278150A (en) Microcomputer
JP3205998B2 (en) Single chip microcomputer
JPS63208145A (en) Ic card
JPS62160554A (en) Device for preventing wrong access to memory
US20070043993A1 (en) System and method for protection of data contained in an integrated circuit
JPS6356749A (en) Single chip microcomputer